Commit 87c83aaf authored by matzakos's avatar matzakos

Merge remote-tracking branch 'origin/develop' into NR_SA_NGAP_RRC_wk42

Conflicts:
	cmake_targets/CMakeLists.txt
	docker/Dockerfile.enb.rhel7.oc4-4
	openair1/SCHED_NR_UE/pucch_uci_ue_nr.c
	openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
parents 483f4b2d 68619cae
*.log
cmake_targets/log/
cmake_targets/ran_build/
common/utils/T/T_IDs.h
common/utils/T/T_messages.txt.h
common/utils/T/genids
common/utils/T/genids.o
targets/bin/
...@@ -35,6 +35,9 @@ def doFlexranCtrlTest = false ...@@ -35,6 +35,9 @@ def doFlexranCtrlTest = false
// Location of the executor node // Location of the executor node
def nodeExecutor = params.nodeExecutor def nodeExecutor = params.nodeExecutor
// VM Lockable resources
def vmResource = params.vmLockableResource
pipeline { pipeline {
agent { agent {
label nodeExecutor label nodeExecutor
...@@ -159,65 +162,81 @@ pipeline { ...@@ -159,65 +162,81 @@ pipeline {
stage ("Start VM -- basic-sim") { stage ("Start VM -- basic-sim") {
steps { steps {
lock (vmResource) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- gnb-usrp") { stage ("Start VM -- gnb-usrp") {
steps { steps {
lock (vmResource) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- nr-ue-usrp") { stage ("Start VM -- nr-ue-usrp") {
steps { steps {
lock (vmResource) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- enb-usrp") { stage ("Start VM -- enb-usrp") {
steps { steps {
lock (vmResource) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- phy-sim") { stage ("Start VM -- phy-sim") {
steps { steps {
lock (vmResource) {
timeout (time: 5, unit: 'MINUTES') { timeout (time: 5, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- enb-ethernet") { stage ("Start VM -- enb-ethernet") {
steps { steps {
lock (vmResource) {
timeout (time: 7, unit: 'MINUTES') { timeout (time: 7, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- ue-ethernet") { stage ("Start VM -- ue-ethernet") {
steps { steps {
lock (vmResource) {
timeout (time: 7, unit: 'MINUTES') { timeout (time: 7, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
stage ("Start VM -- cppcheck") { stage ("Start VM -- cppcheck") {
steps { steps {
lock (vmResource) {
timeout (time: 7, unit: 'MINUTES') { timeout (time: 7, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon" sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
} }
}
} }
} }
...@@ -288,11 +307,14 @@ pipeline { ...@@ -288,11 +307,14 @@ pipeline {
} }
stage ("Build UE-ethernet") { stage ("Build UE-ethernet") {
steps { steps {
// This is typically the last one to finish.
lock (vmResource) {
gitlabCommitStatus(name: "Build UE-ethernet") { gitlabCommitStatus(name: "Build UE-ethernet") {
timeout (time: 20, unit: 'MINUTES') { timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive" sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
} }
} }
}
} }
} }
} }
...@@ -354,6 +376,7 @@ pipeline { ...@@ -354,6 +376,7 @@ pipeline {
stages { stages {
stage ("Test physical simulators") { stage ("Test physical simulators") {
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 90, unit: 'MINUTES') { timeout (time: 90, unit: 'MINUTES') {
try { try {
...@@ -365,6 +388,7 @@ pipeline { ...@@ -365,6 +388,7 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Build Flexran Controller") { stage ("Build Flexran Controller") {
...@@ -372,6 +396,7 @@ pipeline { ...@@ -372,6 +396,7 @@ pipeline {
expression {doFlexranCtrlTest} expression {doFlexranCtrlTest}
} }
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 20, unit: 'MINUTES') { timeout (time: 20, unit: 'MINUTES') {
try { try {
...@@ -381,10 +406,12 @@ pipeline { ...@@ -381,10 +406,12 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Test basic simulator") { stage ("Test basic simulator") {
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 30, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
try { try {
...@@ -396,10 +423,12 @@ pipeline { ...@@ -396,10 +423,12 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Test L1 simulator") { stage ("Test L1 simulator") {
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 30, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
try { try {
...@@ -411,10 +440,12 @@ pipeline { ...@@ -411,10 +440,12 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Test RF simulator") { stage ("Test RF simulator") {
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 40, unit: 'MINUTES') { timeout (time: 40, unit: 'MINUTES') {
try { try {
...@@ -426,10 +457,12 @@ pipeline { ...@@ -426,10 +457,12 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Test L2 simulator") { stage ("Test L2 simulator") {
steps { steps {
lock (vmResource) {
script { script {
timeout (time: 30, unit: 'MINUTES') { timeout (time: 30, unit: 'MINUTES') {
try { try {
...@@ -441,11 +474,14 @@ pipeline { ...@@ -441,11 +474,14 @@ pipeline {
} }
} }
} }
}
} }
} }
stage ("Destroy all Virtual Machines") { stage ("Destroy all Virtual Machines") {
steps { steps {
lock (vmResource) {
sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool destroy --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
}
} }
} }
} }
......
...@@ -72,6 +72,9 @@ class OaiCiTest(): ...@@ -72,6 +72,9 @@ class OaiCiTest():
self.ADBCentralized = True self.ADBCentralized = True
self.testCase_id = '' self.testCase_id = ''
self.testXMLfiles = [] self.testXMLfiles = []
self.testUnstable = False
self.testMinStableId = '999999'
self.testStabilityPointReached = False
self.desc = '' self.desc = ''
self.ping_args = '' self.ping_args = ''
self.ping_packetloss_threshold = '' self.ping_packetloss_threshold = ''
...@@ -211,7 +214,7 @@ class OaiCiTest(): ...@@ -211,7 +214,7 @@ class OaiCiTest():
logging.error('\u001B[1m Building OAI UE Failed\u001B[0m') logging.error('\u001B[1m Building OAI UE Failed\u001B[0m')
HTML.CreateHtmlTestRow(self.Build_OAI_UE_args, 'KO', CONST.ALL_PROCESSES_OK, 'OAI UE') HTML.CreateHtmlTestRow(self.Build_OAI_UE_args, 'KO', CONST.ALL_PROCESSES_OK, 'OAI UE')
HTML.CreateHtmlTabFooter(False) HTML.CreateHtmlTabFooter(False)
sys.exit(1) self.ConditionalExit()
def CheckFlexranCtrlInstallation(self,RAN,EPC): def CheckFlexranCtrlInstallation(self,RAN,EPC):
if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '': if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '':
...@@ -335,7 +338,7 @@ class OaiCiTest(): ...@@ -335,7 +338,7 @@ class OaiCiTest():
if (pStatus < 0): if (pStatus < 0):
HTML.CreateHtmlTestRow(self.air_interface + ' ' + self.Initialize_OAI_UE_args, 'KO', pStatus) HTML.CreateHtmlTestRow(self.air_interface + ' ' + self.Initialize_OAI_UE_args, 'KO', pStatus)
HTML.CreateHtmlTabFooter(False) HTML.CreateHtmlTabFooter(False)
sys.exit(1) self.ConditionalExit()
UE_prefix = '' UE_prefix = ''
else: else:
UE_prefix = 'NR ' UE_prefix = 'NR '
...@@ -719,7 +722,7 @@ class OaiCiTest(): ...@@ -719,7 +722,7 @@ class OaiCiTest():
logging.debug('Using the OAI EPC HSS: not implemented yet') logging.debug('Using the OAI EPC HSS: not implemented yet')
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus) HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
HTML.CreateHtmlTabFooter(False) HTML.CreateHtmlTabFooter(False)
sys.exit(1) self.ConditionalExit()
else: else:
SSH.command('egrep --color=never "Allocated ipv4 addr" /opt/ltebox/var/log/xGwLog.0', '\$', 5) SSH.command('egrep --color=never "Allocated ipv4 addr" /opt/ltebox/var/log/xGwLog.0', '\$', 5)
result = re.search('Allocated ipv4 addr: (?P<ipaddr>[0-9\.]+) from Pool', SSH.getBefore()) result = re.search('Allocated ipv4 addr: (?P<ipaddr>[0-9\.]+) from Pool', SSH.getBefore())
...@@ -1046,7 +1049,7 @@ class OaiCiTest(): ...@@ -1046,7 +1049,7 @@ class OaiCiTest():
if (pStatus < 0): if (pStatus < 0):
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus) HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
HTML.CreateHtmlTabFooter(False) HTML.CreateHtmlTabFooter(False)
sys.exit(1) self.ConditionalExit()
multi_jobs = [] multi_jobs = []
for device_id in self.UEDevices: for device_id in self.UEDevices:
p = Process(target = self.RebootUE_common, args = (device_id,)) p = Process(target = self.RebootUE_common, args = (device_id,))
...@@ -1154,15 +1157,18 @@ class OaiCiTest(): ...@@ -1154,15 +1157,18 @@ class OaiCiTest():
self.UEDevicesRebootCmd.append(comma_split[5]) self.UEDevicesRebootCmd.append(comma_split[5])
phone_list_file.close() phone_list_file.close()
# better handling of the case when no UE detected
# Sys-exit is now dealt by the calling function
if terminate_ue_flag == True: if terminate_ue_flag == True:
if len(self.UEDevices) == 0: if len(self.UEDevices) == 0:
logging.debug('\u001B[1;37;41m UE Not Found! \u001B[0m') logging.debug('\u001B[1;37;41m UE Not Found! \u001B[0m')
sys.exit(1) return False
if len(self.UEDevicesStatus) == 0: if len(self.UEDevicesStatus) == 0:
cnt = 0 cnt = 0
while cnt < len(self.UEDevices): while cnt < len(self.UEDevices):
self.UEDevicesStatus.append(CONST.UE_STATUS_DETACHED) self.UEDevicesStatus.append(CONST.UE_STATUS_DETACHED)
cnt += 1 cnt += 1
return True
def GetAllCatMDevices(self, terminate_ue_flag): def GetAllCatMDevices(self, terminate_ue_flag):
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '': if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
...@@ -1248,7 +1254,7 @@ class OaiCiTest(): ...@@ -1248,7 +1254,7 @@ class OaiCiTest():
if (pStatus < 0): if (pStatus < 0):
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus) HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
HTML.CreateHtmlTabFooter(False) HTML.CreateHtmlTabFooter(False)
sys.exit(1) self.ConditionalExit()
multi_jobs = [] multi_jobs = []
lock = Lock() lock = Lock()
status_queue = SimpleQueue() status_queue = SimpleQueue()
...@@ -1386,7 +1392,14 @@ class OaiCiTest(): ...@@ -1386,7 +1392,14 @@ class OaiCiTest():
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('cd ' + EPC.SourceCodePath, '\$', 5) SSH.command('cd ' + EPC.SourceCodePath, '\$', 5)
SSH.command('cd scripts', '\$', 5) SSH.command('cd scripts', '\$', 5)
ping_status = SSH.command('stdbuf -o0 ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 | stdbuf -o0 tee ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5) # In case of a docker-based deployment, we need to ping from the trf-gen container
launchFromTrfContainer = False
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
launchFromTrfContainer = True
if launchFromTrfContainer:
ping_status = SSH.command('docker exec -it prod-trf-gen /bin/bash -c "ping ' + self.ping_args + ' ' + UE_IPAddress + '" 2>&1 | tee ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5)
else:
ping_status = SSH.command('stdbuf -o0 ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 | stdbuf -o0 tee ping_' + self.testCase_id + '_' + device_id + '.log', '\$', int(ping_time[0])*1.5)
else: else:
cmd = 'ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + device_id + '.log' cmd = 'ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + device_id + '.log'
message = cmd + '\n' message = cmd + '\n'
...@@ -2028,7 +2041,8 @@ class OaiCiTest(): ...@@ -2028,7 +2041,8 @@ class OaiCiTest():
SSH.command('adb -s ' + device_id + ' shell "ls /data/local/tmp"', '\$', 5) SSH.command('adb -s ' + device_id + ' shell "ls /data/local/tmp"', '\$', 5)
else: else:
SSH.command('ssh ' + self.UEDevicesRemoteUser[idx] + '@' + self.UEDevicesRemoteServer[idx] + ' \'adb -s ' + device_id + ' shell "ls /data/local/tmp"\'', '\$', 60) SSH.command('ssh ' + self.UEDevicesRemoteUser[idx] + '@' + self.UEDevicesRemoteServer[idx] + ' \'adb -s ' + device_id + ' shell "ls /data/local/tmp"\'', '\$', 60)
result = re.search('iperf3', SSH.getBefore()) # DEBUG: disabling iperf3 usage for the moment
result = re.search('iperf4', SSH.getBefore())
if result is None: if result is None:
result = re.search('iperf', SSH.getBefore()) result = re.search('iperf', SSH.getBefore())
if result is None: if result is None:
...@@ -2105,6 +2119,10 @@ class OaiCiTest(): ...@@ -2105,6 +2119,10 @@ class OaiCiTest():
launchFromEpc = True launchFromEpc = True
if re.match('OAI-Rel14-CUPS', EPC.Type, re.IGNORECASE): if re.match('OAI-Rel14-CUPS', EPC.Type, re.IGNORECASE):
launchFromEpc = False launchFromEpc = False
# When using a docker-based deployment, IPERF client shall be launched from trf container
launchFromTrfContainer = False
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
launchFromTrfContainer = True
if launchFromEpc: if launchFromEpc:
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password) SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
SSH.command('cd ' + EPC.SourceCodePath + '/scripts', '\$', 5) SSH.command('cd ' + EPC.SourceCodePath + '/scripts', '\$', 5)
...@@ -2129,7 +2147,16 @@ class OaiCiTest(): ...@@ -2129,7 +2147,16 @@ class OaiCiTest():
self.Iperf_analyzeV3Output(lock, UE_IPAddress, device_id, statusQueue,SSH) self.Iperf_analyzeV3Output(lock, UE_IPAddress, device_id, statusQueue,SSH)
else: else:
if launchFromEpc: if launchFromEpc:
iperf_status = SSH.command('stdbuf -o0 iperf -c ' + UE_IPAddress + ' ' + modified_options + ' 2>&1 | stdbuf -o0 tee iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0) if launchFromTrfContainer:
if self.ueIperfVersion == self.dummyIperfVersion:
prefix = ''
else:
prefix = ''
if self.ueIperfVersion == '2.0.5':
prefix = '/iperf-2.0.5/bin/'
iperf_status = SSH.command('docker exec -it prod-trf-gen /bin/bash -c "' + prefix + 'iperf -c ' + UE_IPAddress + ' ' + modified_options + '" 2>&1 | tee iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0)
else:
iperf_status = SSH.command('stdbuf -o0 iperf -c ' + UE_IPAddress + ' ' + modified_options + ' 2>&1 | stdbuf -o0 tee iperf_' + self.testCase_id + '_' + device_id + '.log', '\$', int(iperf_time)*5.0)
else: else:
if self.ueIperfVersion == self.dummyIperfVersion: if self.ueIperfVersion == self.dummyIperfVersion:
prefix = '' prefix = ''
...@@ -3148,6 +3175,12 @@ class OaiCiTest(): ...@@ -3148,6 +3175,12 @@ class OaiCiTest():
HTML.CpuMHz[idx]=CpuMHz HTML.CpuMHz[idx]=CpuMHz
SSH.close() SSH.close()
def ConditionalExit(self):
if self.testUnstable:
if self.testStabilityPointReached or self.testMinStableId == '999999':
sys.exit(0)
sys.exit(1)
def ShowTestID(self): def ShowTestID(self):
logging.debug('\u001B[1m----------------------------------------\u001B[0m') logging.debug('\u001B[1m----------------------------------------\u001B[0m')
logging.debug('\u001B[1mTest ID:' + self.testCase_id + '\u001B[0m') logging.debug('\u001B[1mTest ID:' + self.testCase_id + '\u001B[0m')
......
...@@ -65,6 +65,7 @@ class EPCManagement(): ...@@ -65,6 +65,7 @@ class EPCManagement():
self.testCase_id = '' self.testCase_id = ''
self.MmeIPAddress = '' self.MmeIPAddress = ''
self.containerPrefix = 'prod' self.containerPrefix = 'prod'
self.mmeConfFile = 'mme.conf'
#----------------------------------------------------------- #-----------------------------------------------------------
...@@ -127,7 +128,7 @@ class EPCManagement(): ...@@ -127,7 +128,7 @@ class EPCManagement():
logging.debug('Using the OAI EPC Release 14 MME in Docker') logging.debug('Using the OAI EPC Release 14 MME in Docker')
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup tshark -i eth0 -i lo:s10 -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 5) mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup tshark -i eth0 -i lo:s10 -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
time.sleep(5) time.sleep(5)
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup ./bin/oai_mme -c ./etc/mme.conf > mme_check_run.log 2>&1"', '\$', 5) mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup ./bin/oai_mme -c ./etc/' + self.mmeConfFile + ' > mme_check_run.log 2>&1"', '\$', 5)
elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE): elif re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
logging.debug('Using the OAI EPC Release 14 MME') logging.debug('Using the OAI EPC Release 14 MME')
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5) mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
......
...@@ -64,6 +64,10 @@ class HTMLManagement(): ...@@ -64,6 +64,10 @@ class HTMLManagement():
self.htmlTabIcons = [] self.htmlTabIcons = []
self.testXMLfiles = [] self.testXMLfiles = []
self.testUnstable = False
self.testMinStableId = '999999'
self.testStabilityPointReached = False
self.htmleNBFailureMsg = '' self.htmleNBFailureMsg = ''
self.htmlUEFailureMsg = '' self.htmlUEFailureMsg = ''
...@@ -230,13 +234,20 @@ class HTMLManagement(): ...@@ -230,13 +234,20 @@ class HTMLManagement():
def CreateHtmlTabFooter(self, passStatus): def CreateHtmlTabFooter(self, passStatus):
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)): if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
testOkEvenIfUnstable = False
if self.testUnstable and not passStatus:
if self.testStabilityPointReached or self.testMinStableId == '999999':
testOkEvenIfUnstable = True
self.htmlFile = open('test_results.html', 'a') self.htmlFile = open('test_results.html', 'a')
self.htmlFile.write(' <tr>\n') self.htmlFile.write(' <tr>\n')
self.htmlFile.write(' <th bgcolor = "#33CCFF" colspan=3>Final Tab Status</th>\n') self.htmlFile.write(' <th bgcolor = "#33CCFF" colspan=3>Final Tab Status</th>\n')
if passStatus: if passStatus:
self.htmlFile.write(' <th bgcolor = "green" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">PASS <span class="glyphicon glyphicon-ok"></span> </font></th>\n') self.htmlFile.write(' <th bgcolor = "green" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">PASS <span class="glyphicon glyphicon-ok"></span> </font></th>\n')
else: else:
self.htmlFile.write(' <th bgcolor = "red" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n') if testOkEvenIfUnstable:
self.htmlFile.write(' <th bgcolor = "orange" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">KNOWN UNSTABLE SCENARIO <span class="glyphicon glyphicon-exclamation-sign"></span> </font></th>\n')
else:
self.htmlFile.write(' <th bgcolor = "red" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
self.htmlFile.write(' </tr>\n') self.htmlFile.write(' </tr>\n')
self.htmlFile.write(' </table>\n') self.htmlFile.write(' </table>\n')
self.htmlFile.write(' </div>\n') self.htmlFile.write(' </div>\n')
...@@ -246,7 +257,10 @@ class HTMLManagement(): ...@@ -246,7 +257,10 @@ class HTMLManagement():
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html" cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html"
subprocess.run(cmd, shell=True) subprocess.run(cmd, shell=True)
else: else:
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html" if testOkEvenIfUnstable:
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-exclamation-sign\"><\/span>/' test_results.html"
else:
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
subprocess.run(cmd, shell=True) subprocess.run(cmd, shell=True)
self.htmlFooterCreated = False self.htmlFooterCreated = False
......
...@@ -283,6 +283,11 @@ def GetParametersFromXML(action): ...@@ -283,6 +283,11 @@ def GetParametersFromXML(action):
else: else:
ldpc.forced_workspace_cleanup=False ldpc.forced_workspace_cleanup=False
elif action == 'Initialize_MME':
string_field = test.findtext('option')
if (string_field is not None):
EPC.mmeConfFile = string_field
else: # ie action == 'Run_PhySim': else: # ie action == 'Run_PhySim':
ldpc.runargs = test.findtext('physim_run_args') ldpc.runargs = test.findtext('physim_run_args')
...@@ -489,6 +494,9 @@ elif re.match('^FinalizeHtml$', mode, re.IGNORECASE): ...@@ -489,6 +494,9 @@ elif re.match('^FinalizeHtml$', mode, re.IGNORECASE):
CiTestObj.RetrieveSystemVersion('UE',HTML,RAN) CiTestObj.RetrieveSystemVersion('UE',HTML,RAN)
HTML.CreateHtmlFooter(CiTestObj.finalStatus) HTML.CreateHtmlFooter(CiTestObj.finalStatus)
elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE): elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re.IGNORECASE):
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
logging.debug('\u001B[1m Starting Scenario \u001B[0m')
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
if re.match('^TesteNB$', mode, re.IGNORECASE): if re.match('^TesteNB$', mode, re.IGNORECASE):
if RAN.eNBIPAddress == '' or RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '' or EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '' or CiTestObj.ADBIPAddress == '' or CiTestObj.ADBUserName == '' or CiTestObj.ADBPassword == '': if RAN.eNBIPAddress == '' or RAN.ranRepository == '' or RAN.ranBranch == '' or RAN.eNBUserName == '' or RAN.eNBPassword == '' or RAN.eNBSourceCodePath == '' or EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.Type == '' or EPC.SourceCodePath == '' or CiTestObj.ADBIPAddress == '' or CiTestObj.ADBUserName == '' or CiTestObj.ADBPassword == '':
HELP.GenericHelp(CONST.Version) HELP.GenericHelp(CONST.Version)
...@@ -524,7 +532,14 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -524,7 +532,14 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-0')) HTML.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-0'))
HTML.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='Test-0')) HTML.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='Test-0'))
repeatCount = xmlRoot.findtext('repeatCount',default='1') repeatCount = xmlRoot.findtext('repeatCount',default='1')
testStability = xmlRoot.findtext('TestUnstable',default='False')
CiTestObj.repeatCounts.append(int(repeatCount)) CiTestObj.repeatCounts.append(int(repeatCount))
if testStability == 'True':
CiTestObj.testUnstable = True
HTML.testUnstable = True
CiTestObj.testMinStableId = xmlRoot.findtext('TestMinId',default='999999')
HTML.testMinStableId = CiTestObj.testMinStableId
logging.debug('Test is tagged as Unstable -- starting from TestID ' + str(CiTestObj.testMinStableId))
all_tests=xmlRoot.findall('testCase') all_tests=xmlRoot.findall('testCase')
exclusion_tests=exclusion_tests.split() exclusion_tests=exclusion_tests.split()
...@@ -605,7 +620,11 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -605,7 +620,11 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
if (CiTestObj.ADBIPAddress != 'none'): if (CiTestObj.ADBIPAddress != 'none'):
#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 #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 terminate_ue_flag = True
CiTestObj.GetAllUEDevices(terminate_ue_flag) # Now we stop properly the test-suite --> clean reporting
status = CiTestObj.GetAllUEDevices(terminate_ue_flag)
if not status:
RAN.prematureExit = True
break
if action == 'Build_eNB': if action == 'Build_eNB':
RAN.BuildeNB() RAN.BuildeNB()
elif action == 'WaitEndBuild_eNB': elif action == 'WaitEndBuild_eNB':
...@@ -681,11 +700,19 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -681,11 +700,19 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML=ldpc.Run_PhySim(HTML,CONST,id) HTML=ldpc.Run_PhySim(HTML,CONST,id)
else: else:
sys.exit('Invalid class (action) from xml') sys.exit('Invalid class (action) from xml')
if not RAN.prematureExit:
if CiTestObj.testCase_id == CiTestObj.testMinStableId:
logging.debug('Scenario has reached minimal stability point')
CiTestObj.testStabilityPointReached = True
HTML.testStabilityPointReached = True
CiTestObj.FailReportCnt += 1 CiTestObj.FailReportCnt += 1
if CiTestObj.FailReportCnt == CiTestObj.repeatCounts[0] and RAN.prematureExit: if CiTestObj.FailReportCnt == CiTestObj.repeatCounts[0] and RAN.prematureExit:
logging.debug('Testsuite failed ' + str(CiTestObj.FailReportCnt) + ' time(s)') logging.debug('Testsuite failed ' + str(CiTestObj.FailReportCnt) + ' time(s)')
HTML.CreateHtmlTabFooter(False) HTML.CreateHtmlTabFooter(False)
sys.exit('Failed Scenario') if CiTestObj.testUnstable and (CiTestObj.testStabilityPointReached or CiTestObj.testMinStableId == '999999'):
logging.debug('Scenario has reached minimal stability point -- Not a Failure')
else:
sys.exit('Failed Scenario')
else: else:
logging.info('Testsuite passed after ' + str(CiTestObj.FailReportCnt) + ' time(s)') logging.info('Testsuite passed after ' + str(CiTestObj.FailReportCnt) + ' time(s)')
HTML.CreateHtmlTabFooter(True) HTML.CreateHtmlTabFooter(True)
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<htmlTabName>Test-LTE-M-10MHz-TM1</htmlTabName> <htmlTabName>Test-LTE-M-10MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount> <repeatCount>1</repeatCount>
<TestUnstable>True</TestUnstable>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040102 040102
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
<htmlTabName>Test-05MHz-TM2</htmlTabName> <htmlTabName>Test-05MHz-TM2</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount> <repeatCount>2</repeatCount>
<TestUnstable>True</TestUnstable>
<TestMinId>040608</TestMinId>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040101 040101
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
<htmlTabRef>test-10-tm1</htmlTabRef> <htmlTabRef>test-10-tm1</htmlTabRef>
<htmlTabName>Test-10MHz-TM1</htmlTabName> <htmlTabName>Test-10MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<TestUnstable>True</TestUnstable>
<TestMinId>040615</TestMinId>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040101 040101
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
<htmlTabName>Test-20MHz-TM1</htmlTabName> <htmlTabName>Test-20MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount> <repeatCount>4</repeatCount>
<TestUnstable>True</TestUnstable>
<TestMinId>040623</TestMinId>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040101 040101
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
<htmlTabRef>test-20-tm1-defSched</htmlTabRef> <htmlTabRef>test-20-tm1-defSched</htmlTabRef>
<htmlTabName>Test-20MHz-TM1-default-scheduler</htmlTabName> <htmlTabName>Test-20MHz-TM1-default-scheduler</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<TestUnstable>True</TestUnstable>
<TestMinId>040522</TestMinId>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040101 040101
......
<!--
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>epc-start-tab</htmlTabRef>
<htmlTabName>EPC-Start</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
000100 000101 000102
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="000100">
<class>Initialize_HSS</class>
<desc>Initialize HSS</desc>
</testCase>
<testCase id="000101">
<class>Initialize_MME</class>
<desc>Initialize MME</desc>
<option>mme-verizon.conf</option>
</testCase>
<testCase id="000102">
<class>Initialize_SPGW</class>
<desc>Initialize SPGW</desc>
</testCase>
</testCaseList>
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
030101 040301 040501 040603 040604 040605 040606 040607 040641 040642 040643 040644 040401 040201 030201
-->
<testCaseList>
<htmlTabRef>test-05-tm1</htmlTabRef>
<htmlTabName>Test-05MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
030201
040101
030101 040301 000001 040501 040603 040401 030201
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
</testCase>
<testCase id="030101">
<class>Initialize_eNB</class>
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].plmn_list.[0].mcc 311 --eNBs.[0].plmn_list.[0].mnc 480 --eNBs.[0].plmn_list.[0].mnc_length 3 --eNBs.[0].component_carriers.[0].Nid_cell 10</Initialize_eNB_args>
</testCase>
<testCase id="030201">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
</testCase>
<testCase id="040101">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="040201">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="040301">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="040401">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="040501">
<class>Ping</class>
<desc>ping (5MHz - 20 sec)</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>5</ping_packetloss_threshold>
</testCase>
<testCase id="040603">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040604">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040605">
<class>Iperf</class>
<desc>iperf (5MHz - DL/15Mbps/UDP)(30 sec)(unbalanced profile)</desc>
<iperf_args>-u -b 15M -t 30 -i 1</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>unbalanced</iperf_profile>
</testCase>
<testCase id="040606">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)(single-ue profile)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040607">
<class>Iperf</class>
<desc>iperf (5MHz - DL/TCP)(30 sec)(balanced profile)</desc>
<iperf_args>-t 30 -i 1 -fm</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040641">
<class>Iperf</class>
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(balanced profile)</desc>
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
<testCase id="040642">
<class>Iperf</class>
<desc>iperf (5MHz - UL/9Mbps/UDP)(30 sec)(single-ue profile)</desc>
<iperf_args>-u -b 9M -t 30 -i 1 -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040643">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)(single-ue profile)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>single-ue</iperf_profile>
</testCase>
<testCase id="040644">
<class>Iperf</class>
<desc>iperf (5MHz - UL/TCP)(30 sec)(balanced profile)</desc>
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
<iperf_profile>balanced</iperf_profile>
</testCase>
</testCaseList>
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
<htmlTabName>Test-10MHz</htmlTabName> <htmlTabName>Test-10MHz</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount> <repeatCount>2</repeatCount>
<TestUnstable>True</TestUnstable>
<TestMinId>040612</TestMinId>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040101 040101
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
<htmlTabName>Test-X2-HO-FDD-05MHz-TM1</htmlTabName> <htmlTabName>Test-X2-HO-FDD-05MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount> <repeatCount>2</repeatCount>
<TestUnstable>True</TestUnstable>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030202 030201 030202
040101 040101
......
...@@ -1648,6 +1648,7 @@ set(PHY_SRC_UE ...@@ -1648,6 +1648,7 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c ${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_dmrs_rx.c ${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_dmrs_rx.c
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_csi_rs.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold.c ${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c ${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c ${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c
......
...@@ -42,7 +42,6 @@ MSC_GEN=0 ...@@ -42,7 +42,6 @@ MSC_GEN=0
XFORMS="True" XFORMS="True"
SKIP_SHARED_LIB_FLAG="False" SKIP_SHARED_LIB_FLAG="False"
UE_EXPANSION="False" UE_EXPANSION="False"
UESIM_EXPANSION="False"
PRINT_STATS="False" PRINT_STATS="False"
VCD_TIMING="False" VCD_TIMING="False"
DEADLINE_SCHEDULER_FLAG_USER="" DEADLINE_SCHEDULER_FLAG_USER=""
...@@ -267,10 +266,6 @@ function main() { ...@@ -267,10 +266,6 @@ function main() {
UE_EXPANSION="True" UE_EXPANSION="True"
echo_info "Will compile with UE_EXPANSION" echo_info "Will compile with UE_EXPANSION"
shift;; shift;;
--musim)
UESIM_EXPANSION="True"
echo_info "Will compile with UESIM_EXPANSION"
shift;;
--UE-conf-nvram) --UE-conf-nvram)
conf_nvram_path=$(readlink -f $2) conf_nvram_path=$(readlink -f $2)
shift 2;; shift 2;;
...@@ -601,7 +596,6 @@ function main() { ...@@ -601,7 +596,6 @@ function main() {
echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file # echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( UESIM_EXPANSION $UESIM_EXPANSION )" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
......
...@@ -4,7 +4,6 @@ set ( CMAKE_BUILD_TYPE ) ...@@ -4,7 +4,6 @@ set ( CMAKE_BUILD_TYPE )
set ( CFLAGS_PROCESSOR_USER "" ) set ( CFLAGS_PROCESSOR_USER "" )
set ( UE_EXPANSION False ) set ( UE_EXPANSION False )
set ( PRE_SCD_THREAD False ) set ( PRE_SCD_THREAD False )
set ( UESIM_EXPANSION False )
set ( ENABLE_VCD_FIFO False ) set ( ENABLE_VCD_FIFO False )
set ( RF_BOARD "None") set ( RF_BOARD "None")
set ( TRANSP_PRO "None") set ( TRANSP_PRO "None")
......
...@@ -49,6 +49,7 @@ RUN yum update -y && \ ...@@ -49,6 +49,7 @@ RUN yum update -y && \
nettle \ nettle \
atlas \ atlas \
net-tools \ net-tools \
iputils \
iproute \ iproute \
libyaml && \ libyaml && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
...@@ -120,3 +121,4 @@ WORKDIR /opt/oai-enb ...@@ -120,3 +121,4 @@ WORKDIR /opt/oai-enb
#CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"] #CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
...@@ -51,6 +51,7 @@ RUN yum update -y && \ ...@@ -51,6 +51,7 @@ RUN yum update -y && \
atlas \ atlas \
net-tools \ net-tools \
iproute \ iproute \
iputils \
libyaml && \ libyaml && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
...@@ -121,4 +122,4 @@ WORKDIR /opt/oai-enb ...@@ -121,4 +122,4 @@ WORKDIR /opt/oai-enb
#CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"] #CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
...@@ -57,6 +57,7 @@ RUN apt-get update && \ ...@@ -57,6 +57,7 @@ RUN apt-get update && \
libconfig9 \ libconfig9 \
openssl \ openssl \
net-tools \ net-tools \
iputils-ping \
iproute2 \ iproute2 \
libyaml-0-2 && \ libyaml-0-2 && \
# Install UHD driver from ettus ppa # Install UHD driver from ettus ppa
...@@ -120,3 +121,4 @@ WORKDIR /opt/oai-enb ...@@ -120,3 +121,4 @@ WORKDIR /opt/oai-enb
#CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"] #CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for RHEL7 in the OpenShift context (v4.4)
#
#---------------------------------------------------------------------
FROM image-registry.openshift-image-registry.svc:5000/oai/oai-ran:latest AS enb-build
WORKDIR /oai-enb
COPY . .
#run build_oai to build the target image
RUN /bin/sh oaienv && \
cd cmake_targets && \
mkdir -p log && \
./build_oai --eNB
#start from scratch for target executable
FROM registry.access.redhat.com/ubi7/ubi:latest as oai-enb
# Entitlements and RHSM configurations are Open-Shift Secret and ConfigMaps
# It is pre-requisite
RUN rm -Rf /etc/rhsm/ca /etc/pki/entitlement
# Copy the entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement
# Copy the subscription manager configurations
COPY ./rhsm-conf /etc/rhsm
COPY ./rhsm-ca /etc/rhsm/ca
#install developers pkg/repo
RUN rm /etc/rhsm-host && \
# Initialize /etc/yum.repos.d/redhat.repo
# See https://access.redhat.com/solutions/1443553
yum repolist --disablerepo=* && \
yum-config-manager --enable rhel-7-server-optional-rpms rhel-server-rhscl-7-rpms && \
yum update -y && \
yum install -y \
lksctp-tools \
protobuf-c \
nettle \
libyaml && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf
WORKDIR /opt/oai-enb/bin
COPY --from=enb-build /oai-enb/targets/bin/lte-softmodem.Rel15 .
RUN ldd lte-softmodem.Rel15
#EXPOSE 2152/udp # S1U, GTP/UDP
#EXPOSE 22100/tcp # ?
#EXPOSE 36412/udp # S1C, SCTP/UDP
#EXPOSE 36422/udp # X2C, SCTP/UDP
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
#CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
...@@ -52,6 +52,8 @@ RUN yum repolist --disablerepo=* && \ ...@@ -52,6 +52,8 @@ RUN yum repolist --disablerepo=* && \
atlas \ atlas \
lksctp-tools \ lksctp-tools \
nettle \ nettle \
net-tools \
iputils \
libyaml && \ libyaml && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
...@@ -123,4 +125,4 @@ WORKDIR /opt/oai-gnb ...@@ -123,4 +125,4 @@ WORKDIR /opt/oai-gnb
#CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"] #CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
...@@ -53,6 +53,8 @@ RUN yum repolist --disablerepo=* && \ ...@@ -53,6 +53,8 @@ RUN yum repolist --disablerepo=* && \
atlas \ atlas \
lksctp-tools \ lksctp-tools \
nettle \ nettle \
net-tools \
iputils \
libyaml && \ libyaml && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
...@@ -124,4 +126,4 @@ WORKDIR /opt/oai-gnb ...@@ -124,4 +126,4 @@ WORKDIR /opt/oai-gnb
#CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"] #CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
...@@ -59,6 +59,7 @@ RUN apt-get update && \ ...@@ -59,6 +59,7 @@ RUN apt-get update && \
openssl \ openssl \
net-tools \ net-tools \
iproute2 \ iproute2 \
iputils-ping \
libyaml-0-2 && \ libyaml-0-2 && \
# Install UHD driver from ettus ppa # Install UHD driver from ettus ppa
# At time of writing, it is 3.14 # At time of writing, it is 3.14
...@@ -121,4 +122,4 @@ WORKDIR /opt/oai-gnb ...@@ -121,4 +122,4 @@ WORKDIR /opt/oai-gnb
#CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"] #CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
#ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
...@@ -51,6 +51,7 @@ RUN yum update -y && \ ...@@ -51,6 +51,7 @@ RUN yum update -y && \
atlas \ atlas \
iproute \ iproute \
net-tools \ net-tools \
iputils \
libyaml && \ libyaml && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
...@@ -114,8 +115,9 @@ RUN ldconfig ...@@ -114,8 +115,9 @@ RUN ldconfig
# Copy the relevant configuration files for eNB # Copy the relevant configuration files for eNB
WORKDIR /opt/oai-lte-ue/etc WORKDIR /opt/oai-lte-ue/etc
COPY --from=lte-ue-build /oai-ran/ci-scripts/conf_files/ue.* . COPY --from=lte-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
COPY --from=lte-ue-build /oai-ran/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf ./ue_usim.conf
WORKDIR /opt/oai-lte-ue WORKDIR /opt/oai-lte-ue
#CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem", "-O", "/opt/oai-lte-ue/etc/enb.conf"] #CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem", "-O", "/opt/oai-lte-ue/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
...@@ -51,6 +51,7 @@ RUN yum update -y && \ ...@@ -51,6 +51,7 @@ RUN yum update -y && \
atlas \ atlas \
iproute \ iproute \
net-tools \ net-tools \
iputils \
libyaml && \ libyaml && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \ echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
...@@ -114,8 +115,9 @@ RUN ldd /usr/local/lib/libdfts.so ...@@ -114,8 +115,9 @@ RUN ldd /usr/local/lib/libdfts.so
# Copy the relevant configuration files for eNB # Copy the relevant configuration files for eNB
WORKDIR /opt/oai-lte-ue/etc WORKDIR /opt/oai-lte-ue/etc
COPY --from=lte-ue-build /oai-ran/ci-scripts/conf_files/ue.* . COPY --from=lte-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
COPY --from=lte-ue-build /oai-ran/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf ./ue_usim.conf
WORKDIR /opt/oai-lte-ue WORKDIR /opt/oai-lte-ue
#CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem", "-O", "/opt/oai-lte-ue/etc/enb.conf"] #CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem", "-O", "/opt/oai-lte-ue/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
...@@ -58,6 +58,7 @@ RUN apt-get update && \ ...@@ -58,6 +58,7 @@ RUN apt-get update && \
libconfig9 \ libconfig9 \
openssl \ openssl \
net-tools \ net-tools \
iputils-ping \
iproute2 \ iproute2 \
libyaml-0-2 && \ libyaml-0-2 && \
# Install UHD driver from ettus ppa # Install UHD driver from ettus ppa
...@@ -114,8 +115,9 @@ RUN ldconfig ...@@ -114,8 +115,9 @@ RUN ldconfig
# Copy the relevant configuration files for eNB # Copy the relevant configuration files for eNB
WORKDIR /opt/oai-lte-ue/etc WORKDIR /opt/oai-lte-ue/etc
COPY --from=lte-ue-build /oai-ran/ci-scripts/conf_files/ue.* ./ COPY --from=lte-ue-build /oai-ran/ci-scripts/conf_files/ue.* ./
COPY --from=lte-ue-build /oai-ran/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf ./ue_usim.conf
WORKDIR /opt/oai-lte-ue WORKDIR /opt/oai-lte-ue
#CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem", "-O", "/opt/oai-lte-ue/etc/enb.conf"] #CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem", "-O", "/opt/oai-lte-ue/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
...@@ -48,6 +48,8 @@ RUN yum update -y && \ ...@@ -48,6 +48,8 @@ RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \ yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \ lksctp-tools \
nettle \ nettle \
net-tools \
iputils \
atlas \ atlas \
libXpm \ libXpm \
libX11 \ libX11 \
...@@ -114,4 +116,4 @@ COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* . ...@@ -114,4 +116,4 @@ COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
WORKDIR /opt/oai-nr-ue WORKDIR /opt/oai-nr-ue
#CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"] #CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
...@@ -49,6 +49,8 @@ RUN yum update -y && \ ...@@ -49,6 +49,8 @@ RUN yum update -y && \
yum install -y --enablerepo="ubi-8-codeready-builder" \ yum install -y --enablerepo="ubi-8-codeready-builder" \
lksctp-tools \ lksctp-tools \
nettle \ nettle \
net-tools \
iputils \
atlas \ atlas \
libXpm \ libXpm \
libX11 \ libX11 \
...@@ -115,4 +117,4 @@ COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* . ...@@ -115,4 +117,4 @@ COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
WORKDIR /opt/oai-nr-ue WORKDIR /opt/oai-nr-ue
#CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"] #CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
...@@ -58,6 +58,7 @@ RUN apt-get update && \ ...@@ -58,6 +58,7 @@ RUN apt-get update && \
libconfig9 \ libconfig9 \
openssl \ openssl \
net-tools \ net-tools \
iputils-ping \
iproute2 \ iproute2 \
libyaml-0-2 && \ libyaml-0-2 && \
# Install UHD driver from ettus ppa # Install UHD driver from ettus ppa
...@@ -114,4 +115,4 @@ COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* . ...@@ -114,4 +115,4 @@ COPY --from=nr-ue-build /oai-ran/ci-scripts/conf_files/ue.* .
WORKDIR /opt/oai-nr-ue WORKDIR /opt/oai-nr-ue
#CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"] #CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/enb.conf"]
#ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"] #ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
CMD ["sleep", "infinity"]
<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 Docker/Podman Build and Usage Procedures</font></b>
</td>
</tr>
</table>
--- ---
to be done **Table of Contents**
1. [Build Strategy](#1-build-strategy)
2. [File organization](#2-file-organization)
3. [Building using docker under Ubuntu 18.04](#3-building-using-docker-under-ubuntu-1804)
4. [Building using podman under Red Hat Entreprise Linux 8.2](#4-building-using-podman-under-red-hat-entreprise-linux-82)
5. [Running modems using docker under Ubuntu 18.04](#5-running-modems-using-docker-under-ubuntu-1804)
6. [Running modems using podman under Red Hat Entreprise Linux 8.2](#6-running-modems-using-podman-under-red-hat-entreprise-linux-82)
--- ---
# 1. Build Strategy #
For all platforms, the strategy for building docker/podman images is the same:
* First we create a common shared image that contains:
- the latest source files (by using the `COPY` function)
- all the means to build an OAI RAN executable
* all packages, compilers, ...
* especially UHD is installed
* Then from this shared image (`ran-build`) we can build target images for:
- eNB
- gNB
- lte-UE
- nr-UE
* These target images will only contain:
- the generated executable (for example `lte-softmodem.Rel15`)
- the generated shared libraries (for example `liboai_usrpdevif.so.Rel15`)
- the needed libraries and packages to run these generated binaries
- Some configuration file templates
- Some tools (such as `ping`, `ifconfig`)
TO DO:
- Proper entrypoints
- Proper port exposure
- ...
# 2. File organization #
Dockerfiles are named with the following naming convention: `Dockerfile.${target}.${OS-version}.${cluster-version}`
Targets can be:
- `ran` for an image named `ran-build` (the shared image)
- `eNB` for an image named `oai-enb`
- `gNB` for an image named `oai-gnb`
- `lteUE` for an image named `oai-lte-ue`
- `nrUE` for an image named `oai-nr-ue`
The currently-supported OS are:
- `rhel8.2` for Red Hat Entreprise Linux
- `ubuntu18` for Ubuntu 18.04 LTS
The currently-supported cluster version is:
- `rhel8.2.oc4-4`
We have also `rhel7.oc4-4` support but it will be discontinued soon.
For more details in build within a Openshift Cluster, see [OpenShift README](../openshift/README.md) for more details.
# 3. Building using `docker` under Ubuntu 18.04 #
## 3.1. Pre-requisites ##
* `git` installed
* `docker-ce` installed
* Pulling `ubuntu:bionic` from DockerHub
## 3.2. Building the shared image ##
This can be done starting `2020.w41` tag on the `develop` branch, or any branch that includes that tag.
```bash
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
cd openairinterface5g
git checkout develop
```
In our Eurecom/OSA environment we need to pass a GIT proxy.
```bash
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.ran.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
```
if you don't need it, do NOT pass any value:
```bash
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.ran.ubuntu18 .
```
After a while:
```bash
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
ran-build latest ccb721bc0b57 1 minute ago 4.06GB
...
```
## 3.3. Building any target image ##
For example, the eNB:
```bash
docker build --target oai-enb --tag oai-enb:latest --file docker/Dockerfile.eNB.ubuntu18 .
```
After a while:
```
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
oai-enb latest 25ddbd8b7187 1 minute ago 516MB
<none> <none> 875ea3b05b60 8 minutes ago 8.18GB
ran-build latest ccb721bc0b57 1 hour ago 4.06GB
```
Do not forget to remove the temporary image:
```
docker image prune --force
```
# 4. Building using `podman` under Red Hat Entreprise Linux 8.2 #
TODO.
# 5. Running modems using `docker` under Ubuntu 18.04 #
TODO.
# 6. Running modems using `podman` under Red Hat Entreprise Linux 8.2 #
TODO.
...@@ -1260,7 +1260,7 @@ typedef struct ...@@ -1260,7 +1260,7 @@ typedef struct
typedef struct typedef struct
{ {
uint8_t pdu_idx;//This value is an index for number of PDU identified by nPDU in this message Value: 0 -> 65535 uint8_t pdu_idx;//This value is an index for number of PDU identified by nPDU in this message Value: 0 -> 255
} nfapi_nr_ul_tti_request_number_of_ue_t; } nfapi_nr_ul_tti_request_number_of_ue_t;
...@@ -1541,7 +1541,7 @@ typedef struct ...@@ -1541,7 +1541,7 @@ typedef struct
}nfapi_nr_uci_pucch_pdu_format_2_3_4_t; }nfapi_nr_uci_pucch_pdu_format_2_3_4_t;
typedef enum { typedef enum {
NFAPI_NR_UCI_PDCCH_PDU_TYPE = 0, NFAPI_NR_UCI_PUSCH_PDU_TYPE = 0,
NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE = 1, NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE = 1,
NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE = 2, NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE = 2,
} nfapi_nr_uci_pdu_type_e; } nfapi_nr_uci_pdu_type_e;
......
...@@ -260,7 +260,7 @@ crc6 (unsigned char * inptr, int bitlen) ...@@ -260,7 +260,7 @@ crc6 (unsigned char * inptr, int bitlen)
} }
if (resbit > 0) if (resbit > 0)
crc = (crc << resbit) ^ (crc8Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 24); crc = (crc << resbit) ^ (crc6Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 24);
return crc; return crc;
} }
......
...@@ -181,9 +181,27 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, ...@@ -181,9 +181,27 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
LOG_D(PHY,"Initializing PUSCH DMRS Gold sequence with (%x,%x)\n",Nid_pusch[0],Nid_pusch[1]); LOG_D(PHY,"Initializing PUSCH DMRS Gold sequence with (%x,%x)\n",Nid_pusch[0],Nid_pusch[1]);
nr_gold_pusch(gNB, &Nid_pusch[0]); nr_gold_pusch(gNB, &Nid_pusch[0]);
//CSI RS init
gNB->nr_gold_csi_rs = (uint32_t ***)malloc16(fp->slots_per_frame*sizeof(uint32_t **));
uint32_t ***csi_rs = gNB->nr_gold_csi_rs;
AssertFatal(csi_rs!=NULL, "NR init: csi reference signal malloc failed\n");
for (int slot=0; slot<fp->slots_per_frame; slot++) {
csi_rs[slot] = (uint32_t **)malloc16(fp->symbols_per_slot*sizeof(uint32_t *));
AssertFatal(csi_rs[slot]!=NULL, "NR init: csi reference signal for slot %d - malloc failed\n", slot);
for (int symb=0; symb<fp->symbols_per_slot; symb++) {
csi_rs[slot][symb] = (uint32_t *)malloc16(NR_MAX_CSI_RS_INIT_LENGTH_DWORD*sizeof(uint32_t));
AssertFatal(csi_rs[slot][symb]!=NULL, "NR init: csi reference signal for slot %d symbol %d - malloc failed\n", slot, symb);
}
}
nr_init_csi_rs(gNB, 0); // TODO scramblingID currently hardcoded to 0, to be taken from higher layer parameter scramblingID when implemented
/// Transport init necessary for NR synchro /// Transport init necessary for NR synchro
init_nr_transport(gNB); init_nr_transport(gNB);
gNB->first_run_I0_measurements = 1; gNB->first_run_I0_measurements = 1;
common_vars->rxdata = (int32_t **)malloc16(Prx*sizeof(int32_t*)); common_vars->rxdata = (int32_t **)malloc16(Prx*sizeof(int32_t*));
......
...@@ -65,7 +65,7 @@ void nr_init_pdcch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid) ...@@ -65,7 +65,7 @@ void nr_init_pdcch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid)
for (uint8_t symb=0; symb<fp->symbols_per_slot; symb++) { for (uint8_t symb=0; symb<fp->symbols_per_slot; symb++) {
reset = 1; reset = 1;
x2 = ((1<<17) * (14*slot+symb+1) * ((Nid<<1)+1)) + (Nid<<1); x2 = ((1<<17) * (fp->symbols_per_slot*slot+symb+1) * ((Nid<<1)+1) + (Nid<<1));
for (uint32_t n=0; n<NR_MAX_PDCCH_DMRS_INIT_LENGTH_DWORD; n++) { for (uint32_t n=0; n<NR_MAX_PDCCH_DMRS_INIT_LENGTH_DWORD; n++) {
pdcch_dmrs[slot][symb][n] = lte_gold_generic(&x1, &x2, reset); pdcch_dmrs[slot][symb][n] = lte_gold_generic(&x1, &x2, reset);
...@@ -130,3 +130,26 @@ void nr_gold_pusch(PHY_VARS_gNB* gNB, uint32_t *Nid) { ...@@ -130,3 +130,26 @@ void nr_gold_pusch(PHY_VARS_gNB* gNB, uint32_t *Nid) {
} }
} }
} }
void nr_init_csi_rs(PHY_VARS_gNB* gNB, uint32_t Nid)
{
NR_DL_FRAME_PARMS *fp = &gNB->frame_parms;
uint32_t ***csi_rs = gNB->nr_gold_csi_rs;
uint32_t x1, x2;
uint8_t reset;
for (uint8_t slot=0; slot<fp->slots_per_frame; slot++) {
for (uint8_t symb=0; symb<fp->symbols_per_slot; symb++) {
reset = 1;
x2 = ((1<<10) * (fp->symbols_per_slot*slot+symb+1) * ((Nid<<1)+1) + (Nid));
for (uint32_t n=0; n<NR_MAX_PDCCH_DMRS_INIT_LENGTH_DWORD; n++) {
csi_rs[slot][symb][n] = lte_gold_generic(&x1, &x2, reset);
reset = 0;
}
}
}
}
...@@ -38,6 +38,7 @@ void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB); ...@@ -38,6 +38,7 @@ void nr_init_pbch_dmrs(PHY_VARS_gNB* gNB);
*/ */
void nr_init_pdcch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid); void nr_init_pdcch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid);
void nr_init_pdsch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid); void nr_init_pdsch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid);
void nr_init_csi_rs(PHY_VARS_gNB* gNB, uint32_t Nid);
void nr_gold_pusch(PHY_VARS_gNB* gNB, uint32_t *Nid); void nr_gold_pusch(PHY_VARS_gNB* gNB, uint32_t *Nid);
......
This diff is collapsed.
...@@ -327,6 +327,13 @@ int nr_find_pucch(uint16_t rnti, ...@@ -327,6 +327,13 @@ int nr_find_pucch(uint16_t rnti,
void init_prach_list(PHY_VARS_gNB *gNB); void init_prach_list(PHY_VARS_gNB *gNB);
void init_prach_ru_list(RU_t *ru); void init_prach_ru_list(RU_t *ru);
void free_nr_ru_prach_entry(RU_t *ru, int prach_id); void free_nr_ru_prach_entry(RU_t *ru, int prach_id);
int nr_generate_csi_rs(uint32_t **gold_csi_rs,
int32_t **txdataF,
int16_t amp,
NR_DL_FRAME_PARMS frame_parms,
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t csi_params);
void free_nr_prach_entry(PHY_VARS_gNB *gNB, int prach_id); void free_nr_prach_entry(PHY_VARS_gNB *gNB, int prach_id);
void nr_decode_pucch1(int32_t **rxdataF, void nr_decode_pucch1(int32_t **rxdataF,
...@@ -354,5 +361,10 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB, ...@@ -354,5 +361,10 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
nfapi_nr_uci_pucch_pdu_format_0_1_t* uci_pdu, nfapi_nr_uci_pucch_pdu_format_0_1_t* uci_pdu,
nfapi_nr_pucch_pdu_t* pucch_pdu); nfapi_nr_pucch_pdu_t* pucch_pdu);
void nr_decode_pucch2(PHY_VARS_gNB *gNB,
int slot,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t* uci_pdu,
nfapi_nr_pucch_pdu_t* pucch_pdu);
#endif /*__NR_TRANSPORT__H__*/ #endif /*__NR_TRANSPORT__H__*/
...@@ -1136,8 +1136,8 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB, ...@@ -1136,8 +1136,8 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
rel15_ul); rel15_ul);
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) { for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++) {
gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] = signal_energy(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aarx][symbol*frame_parms->ofdm_symbol_size], gNB->pusch_vars[ulsch_id]->ulsch_power[aarx] = signal_energy_nodc(&gNB->pusch_vars[ulsch_id]->ul_ch_estimates[aarx][symbol*frame_parms->ofdm_symbol_size],
rel15_ul->rb_size*12); rel15_ul->rb_size*12);
if (gNB->pusch_vars[ulsch_id]->ulsch_power[aarx]==1) return (1); if (gNB->pusch_vars[ulsch_id]->ulsch_power[aarx]==1) return (1);
} }
......
This diff is collapsed.
...@@ -87,6 +87,10 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue, ...@@ -87,6 +87,10 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
unsigned char rank_adaptation, unsigned char rank_adaptation,
uint8_t subframe); uint8_t subframe);
void nr_ue_rsrp_measurements(PHY_VARS_NR_UE *ue,
uint8_t slot,
uint8_t abstraction_flag);
void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue, void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue,
uint32_t rx_power_fil_dB, uint32_t rx_power_fil_dB,
uint8_t eNB_id); uint8_t eNB_id);
...@@ -94,4 +98,6 @@ void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue, ...@@ -94,4 +98,6 @@ void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue,
int16_t get_nr_PL(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_index); int16_t get_nr_PL(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_index);
float_t get_nr_RSRP(module_id_t Mod_id,uint8_t CC_id,uint8_t gNB_index);
#endif #endif
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "PHY/phy_extern_nr_ue.h" #include "PHY/phy_extern_nr_ue.h"
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
//#define k1 1000 //#define k1 1000
#define k1 ((long long int) 1000) #define k1 ((long long int) 1000)
...@@ -76,6 +77,35 @@ int16_t get_nr_PL(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_index){ ...@@ -76,6 +77,35 @@ int16_t get_nr_PL(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_index){
//(ue->frame_parms.pdsch_config_common.referenceSignalPower*10))/10)); //(ue->frame_parms.pdsch_config_common.referenceSignalPower*10))/10));
} }
uint32_t get_nr_rx_total_gain_dB (module_id_t Mod_id,uint8_t CC_id)
{
PHY_VARS_NR_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
if (ue)
return ue->rx_total_gain_dB;
return 0xFFFFFFFF;
}
float_t get_nr_RSRP(module_id_t Mod_id,uint8_t CC_id,uint8_t gNB_index)
{
AssertFatal(PHY_vars_UE_g!=NULL,"PHY_vars_UE_g is null\n");
AssertFatal(PHY_vars_UE_g[Mod_id]!=NULL,"PHY_vars_UE_g[%d] is null\n",Mod_id);
AssertFatal(PHY_vars_UE_g[Mod_id][CC_id]!=NULL,"PHY_vars_UE_g[%d][%d] is null\n",Mod_id,CC_id);
PHY_VARS_NR_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
if (ue)
return (10*log10(ue->measurements.rsrp[gNB_index])-
get_nr_rx_total_gain_dB(Mod_id,0) -
10*log10(20*12));
return -140.0;
}
void nr_ue_measurements(PHY_VARS_NR_UE *ue, void nr_ue_measurements(PHY_VARS_NR_UE *ue,
unsigned int subframe_offset, unsigned int subframe_offset,
unsigned char N0_symbol, unsigned char N0_symbol,
...@@ -191,4 +221,74 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue, ...@@ -191,4 +221,74 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
_mm_empty(); _mm_empty();
_m_empty(); _m_empty();
#endif #endif
} }
\ No newline at end of file
void nr_ue_rsrp_measurements(PHY_VARS_NR_UE *ue,
uint8_t slot,
uint8_t abstraction_flag)
{
int aarx,rb, symbol_offset;
int16_t *rxF;
uint16_t Nid_cell = ue->frame_parms.Nid_cell;
uint8_t eNB_offset=0,l,nushift;
uint16_t off,nb_rb;
// NR_UE_MAC_INST_t *mac = get_mac_inst(0);
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[slot]].rxdataF;
nushift = ue->frame_parms.Nid_cell%4;
ue->frame_parms.nushift = nushift;
unsigned int ssb_offset = ue->frame_parms.first_carrier_offset + ue->frame_parms.ssb_start_subcarrier;
if (ssb_offset>= ue->frame_parms.ofdm_symbol_size) ssb_offset-=ue->frame_parms.ofdm_symbol_size;
symbol_offset = ue->frame_parms.ofdm_symbol_size*(ue->symbol_offset+1);
ue->measurements.rsrp[eNB_offset] = 0;
//if (mac->csirc->reportQuantity.choice.ssb_Index_RSRP){
nb_rb = 20;
//} else{
// LOG_E(PHY,"report quantity not supported \n");
//}
if (abstraction_flag == 0) {
for (l=0; l<1; l++) {
LOG_D(PHY,"[UE %d] slot %d Doing ue_rrc_measurements rsrp/rssi (Nid_cell %d, nushift %d, eNB_offset %d, l %d)\n",ue->Mod_id,slot,Nid_cell,nushift,
eNB_offset,l);
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+ssb_offset+nushift)];
off = 0;
if (l==0) {
for (rb=0; rb<nb_rb; rb++) {
ue->measurements.rsrp[eNB_offset] += (((int32_t)(rxF[off])*rxF[off])+((int32_t)(rxF[off+1])*rxF[off+1]));
//printf("rb %d, off %d : %d\n",rb,off,((((int32_t)rxF[off])*rxF[off])+((int32_t)(rxF[off+1])*rxF[off+1])));
off = (off+4) % ue->frame_parms.ofdm_symbol_size;
}
}
}
}
ue->measurements.rsrp[eNB_offset]/=nb_rb;
} else {
ue->measurements.rsrp[eNB_offset] = -93 ;
}
if (eNB_offset == 0)
LOG_I(PHY,"[UE %d] slot %d RRC Measurements (idx %d, Cell id %d) => rsrp: %3.1f dBm/RE (%d)\n",
ue->Mod_id,
slot,eNB_offset,
(eNB_offset>0) ? ue->measurements.adj_cell_id[eNB_offset-1] : ue->frame_parms.Nid_cell,
10*log10(ue->measurements.rsrp[eNB_offset])-ue->rx_total_gain_dB,
ue->measurements.rsrp[eNB_offset]);
}
...@@ -1045,7 +1045,11 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue, ...@@ -1045,7 +1045,11 @@ void nr_generate_pucch2(PHY_VARS_NR_UE *ue,
for (int l=0; l<nrofSymbols; l++) { for (int l=0; l<nrofSymbols; l++) {
x2 = (((1<<17)*((14*nr_tti_tx) + (l+startingSymbolIndex) + 1)*((2*dmrs_scrambling_id) + 1)) + (2*dmrs_scrambling_id))%(1U<<31); // c_init calculation according to TS38.211 subclause x2 = (((1<<17)*((14*nr_tti_tx) + (l+startingSymbolIndex) + 1)*((2*dmrs_scrambling_id) + 1)) + (2*dmrs_scrambling_id))%(1U<<31); // c_init calculation according to TS38.211 subclause
s = lte_gold_generic(&x1, &x2, 1); int reset = 1;
for (int ii=0; ii<=(startingPRB>>2); ii++) {
s = lte_gold_generic(&x1, &x2, reset);
reset = 0;
}
m = 0; m = 0;
for (int rb=0; rb<nrofPRB; rb++) { for (int rb=0; rb<nrofPRB; rb++) {
//startingPRB = startingPRB + rb; //startingPRB = startingPRB + rb;
......
...@@ -752,6 +752,9 @@ typedef struct PHY_VARS_gNB_s { ...@@ -752,6 +752,9 @@ typedef struct PHY_VARS_gNB_s {
uint32_t rb_mask_ul[9]; uint32_t rb_mask_ul[9];
int ulmask_symb; int ulmask_symb;
/// CSI RS sequence
uint32_t ***nr_gold_csi_rs;
/// Indicator set to 0 after first SR /// Indicator set to 0 after first SR
uint8_t first_sr[NUMBER_OF_NR_SR_MAX]; uint8_t first_sr[NUMBER_OF_NR_SR_MAX];
......
...@@ -82,6 +82,9 @@ ...@@ -82,6 +82,9 @@
#define NR_MAX_PDSCH_DMRS_LENGTH 3300 //275*6(k)*2(QPSK real+imag) #define NR_MAX_PDSCH_DMRS_LENGTH 3300 //275*6(k)*2(QPSK real+imag)
#define NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD 104 // ceil(NR_MAX_PDSCH_DMRS_LENGTH/32) #define NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD 104 // ceil(NR_MAX_PDSCH_DMRS_LENGTH/32)
#define NR_MAX_CSI_RS_LENGTH 4400 //275*8(max allocation per RB)*2(QPSK)
#define NR_MAX_CSI_RS_INIT_LENGTH_DWORD 138 // ceil(NR_MAX_CSI_RS_LENGTH/32)
#define NR_MAX_PUSCH_DMRS_LENGTH NR_MAX_PDSCH_DMRS_LENGTH #define NR_MAX_PUSCH_DMRS_LENGTH NR_MAX_PDSCH_DMRS_LENGTH
#define NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD #define NR_MAX_PUSCH_DMRS_INIT_LENGTH_DWORD NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD
......
...@@ -136,8 +136,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -136,8 +136,6 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
int offset = gNB->CC_id; int offset = gNB->CC_id;
uint8_t ssb_frame_periodicity = 1; // every how many frames SSB are generated uint8_t ssb_frame_periodicity = 1; // every how many frames SSB are generated
int txdataF_offset = (slot%2)*fp->samples_per_slot_wCP; int txdataF_offset = (slot%2)*fp->samples_per_slot_wCP;
if (cfg->ssb_table.ssb_period.value > 1) if (cfg->ssb_table.ssb_period.value > 1)
ssb_frame_periodicity = 1 <<(cfg->ssb_table.ssb_period.value -1) ; ssb_frame_periodicity = 1 <<(cfg->ssb_table.ssb_period.value -1) ;
...@@ -518,7 +516,6 @@ void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -518,7 +516,6 @@ void phy_procedures_gNB_common_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
0); 0);
} }
} }
} }
void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) { void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) {
...@@ -538,10 +535,8 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -538,10 +535,8 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
nfapi_nr_pucch_pdu_t *pucch_pdu = &pucch->pucch_pdu; nfapi_nr_pucch_pdu_t *pucch_pdu = &pucch->pucch_pdu;
uint16_t num_ucis; uint16_t num_ucis;
switch (pucch_pdu->format_type) { switch (pucch_pdu->format_type) {
case 0: case 0:
num_ucis = gNB->UL_INFO.uci_ind.num_ucis; num_ucis = gNB->UL_INFO.uci_ind.num_ucis;
gNB->UL_INFO.uci_ind.uci_list = &gNB->uci_pdu_list[0]; gNB->UL_INFO.uci_ind.uci_list = &gNB->uci_pdu_list[0];
gNB->UL_INFO.uci_ind.sfn = frame_rx; gNB->UL_INFO.uci_ind.sfn = frame_rx;
...@@ -558,8 +553,25 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx) ...@@ -558,8 +553,25 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
gNB->UL_INFO.uci_ind.num_ucis += 1; gNB->UL_INFO.uci_ind.num_ucis += 1;
pucch->active = 0; pucch->active = 0;
break; break;
case 2:
num_ucis = gNB->UL_INFO.uci_ind.num_ucis;
gNB->UL_INFO.uci_ind.uci_list = &gNB->uci_pdu_list[0];
gNB->UL_INFO.uci_ind.sfn = frame_rx;
gNB->UL_INFO.uci_ind.slot = slot_rx;
gNB->uci_pdu_list[num_ucis].pdu_type = NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE;
gNB->uci_pdu_list[num_ucis].pdu_size = sizeof(nfapi_nr_uci_pucch_pdu_format_2_3_4_t);
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_pdu_format2 = &gNB->uci_pdu_list[num_ucis].pucch_pdu_format_2_3_4;
nr_decode_pucch2(gNB,
slot_rx,
uci_pdu_format2,
pucch_pdu);
gNB->UL_INFO.uci_ind.num_ucis += 1;
pucch->active = 0;
break;
default: default:
AssertFatal(1==0,"Only PUCCH format 0 is currently supported\n"); AssertFatal(1==0,"Only PUCCH formats 0 and 2 are currently supported\n");
} }
} }
} }
......
...@@ -50,7 +50,9 @@ ...@@ -50,7 +50,9 @@
#include "SCHED/phy_procedures_emos.h" #include "SCHED/phy_procedures_emos.h"
#endif #endif
#include "executables/softmodem-common.h" #include "executables/softmodem-common.h"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
//#define DEBUG_PHY_PROC
#define NR_PDCCH_SCHED #define NR_PDCCH_SCHED
//#define NR_PDCCH_SCHED_DEBUG //#define NR_PDCCH_SCHED_DEBUG
//#define NR_PUCCH_SCHED //#define NR_PUCCH_SCHED
...@@ -1649,6 +1651,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ...@@ -1649,6 +1651,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
uint8_t dci_cnt = 0; uint8_t dci_cnt = 0;
NR_DL_FRAME_PARMS *fp = &ue->frame_parms; NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
//NR_UE_MAC_INST_t *mac = get_mac_inst(0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_IN);
LOG_D(PHY," ****** start RX-Chain for Frame.Slot %d.%d ****** \n", frame_rx%1024, nr_tti_rx); LOG_D(PHY," ****** start RX-Chain for Frame.Slot %d.%d ****** \n", frame_rx%1024, nr_tti_rx);
...@@ -1687,6 +1691,12 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ...@@ -1687,6 +1691,12 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
#endif #endif
} }
//if (mac->csirc->reportQuantity.choice.ssb_Index_RSRP){
nr_ue_rsrp_measurements(ue,nr_tti_rx,0);
//}
nr_ue_pbch_procedures(gNB_id, ue, proc, 0); nr_ue_pbch_procedures(gNB_id, ue, proc, 0);
if (ue->no_timing_correction==0) { if (ue->no_timing_correction==0) {
......
This diff is collapsed.
...@@ -60,6 +60,111 @@ ...@@ -60,6 +60,111 @@
/************** VARIABLES *****************************************/ /************** VARIABLES *****************************************/
float RSRP_meas_mapping_nr[98]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H
= {
-140,
-139,
-138,
-137,
-136,
-135,
-134,
-133,
-132,
-131,
-130,
-129,
-128,
-127,
-126,
-125,
-124,
-123,
-122,
-121,
-120,
-119,
-118,
-117,
-116,
-115,
-114,
-113,
-112,
-111,
-110,
-109,
-108,
-107,
-106,
-105,
-104,
-103,
-102,
-101,
-100,
-99,
-98,
-97,
-96,
-95,
-94,
-93,
-92,
-91,
-90,
-89,
-88,
-87,
-86,
-85,
-84,
-83,
-82,
-81,
-80,
-79,
-78,
-77,
-76,
-75,
-74,
-73,
-72,
-71,
-70,
-69,
-68,
-67,
-66,
-65,
-64,
-63,
-62,
-61,
-60,
-59,
-58,
-57,
-56,
-55,
-54,
-53,
-52,
-51,
-50,
-49,
-48,
-47,
-46,
-45,
-44,
-43
}
#endif
;
/* TS 36.213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */ /* TS 36.213 Table 9.2.1-1: PUCCH resource sets before dedicated PUCCH resource configuration */
const initial_pucch_resource_t initial_pucch_resource[NB_INITIAL_PUCCH_RESOURCE] const initial_pucch_resource_t initial_pucch_resource[NB_INITIAL_PUCCH_RESOURCE]
#ifdef INIT_VARIABLES_PUCCH_UE_NR_H #ifdef INIT_VARIABLES_PUCCH_UE_NR_H
...@@ -226,12 +331,14 @@ int trigger_periodic_scheduling_request(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_n ...@@ -226,12 +331,14 @@ int trigger_periodic_scheduling_request(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_n
@param csi_payload is updated with CSI @param csi_payload is updated with CSI
@returns number of bits of CSI */ @returns number of bits of CSI */
int get_csi_nr(PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint32_t *csi_payload); int get_csi_nr(NR_UE_MAC_INST_t *mac, PHY_VARS_NR_UE *ue, uint8_t gNB_id, uint32_t *csi_payload);
/** \brief This dummy function sets current CSI for simulation /** \brief This dummy function sets current CSI for simulation
@param csi_status @param csi_status
@param csi_payload is updated with CSI @param csi_payload is updated with CSI
@returns none */ @returns none */
uint16_t get_nr_csi_bitlen(NR_UE_MAC_INST_t *mac);
void set_csi_nr(int csi_status, uint32_t csi_payload); void set_csi_nr(int csi_status, uint32_t csi_payload);
......
...@@ -537,13 +537,14 @@ int main(int argc, char **argv) ...@@ -537,13 +537,14 @@ int main(int argc, char **argv)
uint64_t ssb_bitmap; uint64_t ssb_bitmap;
fill_scc(rrc.carrier.servingcellconfigcommon,&ssb_bitmap,N_RB_DL,N_RB_DL,mu,mu); fill_scc(rrc.carrier.servingcellconfigcommon,&ssb_bitmap,N_RB_DL,N_RB_DL,mu,mu);
fix_scc(scc,ssb_bitmap);
fill_default_secondaryCellGroup(scc, fill_default_secondaryCellGroup(scc,
secondaryCellGroup, secondaryCellGroup,
0, 0,
1, 1,
n_tx, n_tx,
0); 0);
fix_scc(scc,ssb_bitmap);
xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup); xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "PHY/NR_REFSIG/refsig_defs_ue.h" #include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/MODULATION/modulation_eNB.h" #include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h" #include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/INIT/phy_init.h" #include "PHY/INIT/phy_init.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
......
...@@ -565,13 +565,14 @@ int main(int argc, char **argv) ...@@ -565,13 +565,14 @@ int main(int argc, char **argv)
uint64_t ssb_bitmap; uint64_t ssb_bitmap;
fill_scc(rrc.carrier.servingcellconfigcommon,&ssb_bitmap,N_RB_DL,N_RB_DL,mu,mu); fill_scc(rrc.carrier.servingcellconfigcommon,&ssb_bitmap,N_RB_DL,N_RB_DL,mu,mu);
fix_scc(scc,ssb_bitmap);
fill_default_secondaryCellGroup(scc, fill_default_secondaryCellGroup(scc,
secondaryCellGroup, secondaryCellGroup,
0, 0,
1, 1,
n_tx, n_tx,
0); 0);
fix_scc(scc,ssb_bitmap);
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup); // xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
......
...@@ -65,18 +65,6 @@ ...@@ -65,18 +65,6 @@
#define MAX_NR_RRC_UE_CONTEXTS 64 #define MAX_NR_RRC_UE_CONTEXTS 64
#ifndef UE_EXPANSION #ifndef UE_EXPANSION
// TODO:L2 FAPI simulator.
// UESIM_EXPANSION is used to be same value of MAX_MOBILES_PER_ENB
// in eNB and UE.
// now , if we use --mu option in UE, compiling error will occur.
// This problem will be fixed in the future.
#ifdef UESIM_EXPANSION
#define MAX_MOBILES_PER_ENB 256
#define MAX_MOBILES_PER_ENB_NB_IoT 256
#define MAX_MOBILES_PER_GNB 256
#define MAX_eNB 2
#define MAX_gNB 2
#else
#ifdef LARGE_SCALE #ifdef LARGE_SCALE
#define MAX_MOBILES_PER_ENB 128 #define MAX_MOBILES_PER_ENB 128
#define MAX_MOBILES_PER_ENB_NB_IoT 128 #define MAX_MOBILES_PER_ENB_NB_IoT 128
...@@ -90,7 +78,6 @@ ...@@ -90,7 +78,6 @@
#define MAX_eNB 2 #define MAX_eNB 2
#define MAX_gNB 2 #define MAX_gNB 2
#endif #endif
#endif
#else #else
#define MAX_MOBILES_PER_ENB 256 #define MAX_MOBILES_PER_ENB 256
#define MAX_MOBILES_PER_ENB_NB_IoT 256 #define MAX_MOBILES_PER_ENB_NB_IoT 256
......
...@@ -1451,7 +1451,7 @@ nr_bandentry_t nr_bandtable[] = { ...@@ -1451,7 +1451,7 @@ nr_bandentry_t nr_bandtable[] = {
{5, 824000, 849000, 869000, 894000, 20, 173800, 100}, {5, 824000, 849000, 869000, 894000, 20, 173800, 100},
{7, 2500000, 2570000, 2620000, 2690000, 20, 524000, 100}, {7, 2500000, 2570000, 2620000, 2690000, 20, 524000, 100},
{8, 880000, 915000, 925000, 960000, 20, 185000, 100}, {8, 880000, 915000, 925000, 960000, 20, 185000, 100},
{12, 698000, 716000, 728000, 746000, 20, 145800, 100}, {12, 698000, 716000, 729000, 746000, 20, 145800, 100},
{20, 832000, 862000, 791000, 821000, 20, 158200, 100}, {20, 832000, 862000, 791000, 821000, 20, 158200, 100},
{25, 1850000, 1915000, 1930000, 1995000, 20, 386000, 100}, {25, 1850000, 1915000, 1930000, 1995000, 20, 386000, 100},
{28, 703000, 758000, 758000, 813000, 20, 151600, 100}, {28, 703000, 758000, 758000, 813000, 20, 151600, 100},
...@@ -1473,22 +1473,22 @@ nr_bandentry_t nr_bandtable[] = { ...@@ -1473,22 +1473,22 @@ nr_bandentry_t nr_bandtable[] = {
{77, 3300000, 4200000, 3300000, 4200000, 2, 620000, 30}, {77, 3300000, 4200000, 3300000, 4200000, 2, 620000, 30},
{78, 3300000, 3800000, 3300000, 3800000, 1, 620000, 15}, {78, 3300000, 3800000, 3300000, 3800000, 1, 620000, 15},
{78, 3300000, 3800000, 3300000, 3800000, 2, 620000, 30}, {78, 3300000, 3800000, 3300000, 3800000, 2, 620000, 30},
{79, 4400000, 5000000, 4400000, 5000000, 1, 693334, 15}, {79, 4400010, 5000000, 4400010, 5000000, 1, 693334, 15},
{79, 4400000, 5000000, 4400000, 5000000, 2, 693334, 30}, {79, 4400010, 5000000, 4400010, 5000000, 2, 693334, 30},
{80, 1710000, 1785000, 000, 000, 20, 342000, 100}, {80, 1710000, 1785000, 000, 000, 20, 342000, 100},
{81, 860000, 915000, 000, 000, 20, 176000, 100}, {81, 880000, 915000, 000, 000, 20, 176000, 100},
{82, 832000, 862000, 000, 000, 20, 166400, 100}, {82, 832000, 862000, 000, 000, 20, 166400, 100},
{83, 703000, 748000, 000, 000, 20, 140600, 100}, {83, 703000, 748000, 000, 000, 20, 140600, 100},
{84, 1920000, 1980000, 000, 000, 20, 384000, 100}, {84, 1920000, 1980000, 000, 000, 20, 384000, 100},
{86, 1710000, 1785000, 000, 000, 20, 342000, 100}, {86, 1710000, 1785000, 000, 000, 20, 342000, 100},
{257,26500000,29500000,26500000,29500000, 1,2054166, 60}, {257,26500020,29500000,26500020,29500000, 1,2054166, 60},
{257,26500000,29500000,26500000,29500000, 2,2054167, 120}, {257,26500080,29500000,26500080,29500000, 2,2054167, 120},
{258,24250000,27500000,24250000,27500000, 1,2016667, 60}, {258,24250080,27500000,24250080,27500000, 1,2016667, 60},
{258,24250000,27500000,24250000,27500000, 2,2016667, 120}, {258,24250080,27500000,24250080,27500000, 2,2016667, 120},
{260,37000000,40000000,37000000,40000000, 1,2229166, 60}, {260,37000020,40000000,37000020,40000000, 1,2229166, 60},
{260,37000000,40000000,37000000,40000000, 2,2229167, 120}, {260,37000080,40000000,37000080,40000000, 2,2229167, 120},
{261,27500000,28350000,27500000,28350000, 1,2070833, 60}, {261,27500040,28350000,27500040,28350000, 1,2070833, 60},
{261,27500000,28350000,27500000,28350000, 2,2070833, 120} {261,27500040,28350000,27500040,28350000, 2,2070833, 120}
}; };
......
...@@ -63,7 +63,11 @@ ...@@ -63,7 +63,11 @@
#include "NR_PhysicalCellGroupConfig.h" #include "NR_PhysicalCellGroupConfig.h"
#include "NR_CellGroupConfig.h" #include "NR_CellGroupConfig.h"
#include "NR_ServingCellConfig.h" #include "NR_ServingCellConfig.h"
#include "NR_MeasConfig.h"
#include "fapi_nr_ue_interface.h"
#include "NR_IF_Module.h"
#include "PHY/defs_nr_common.h"
#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac.h"
#define NB_NR_UE_MAC_INST 1 #define NB_NR_UE_MAC_INST 1
/*!\brief Maximum number of logical channl group IDs */ /*!\brief Maximum number of logical channl group IDs */
...@@ -158,6 +162,7 @@ typedef struct { ...@@ -158,6 +162,7 @@ typedef struct {
NR_CellGroupConfig_t *scg; NR_CellGroupConfig_t *scg;
NR_RACH_ConfigDedicated_t *rach_ConfigDedicated; NR_RACH_ConfigDedicated_t *rach_ConfigDedicated;
int servCellIndex; int servCellIndex;
NR_CSI_ReportConfig_t *csirc;
//// MAC config //// MAC config
NR_DRX_Config_t *drx_Config; NR_DRX_Config_t *drx_Config;
NR_SchedulingRequestConfig_t *schedulingRequestConfig; NR_SchedulingRequestConfig_t *schedulingRequestConfig;
......
...@@ -538,7 +538,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id, ...@@ -538,7 +538,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
first_symbol_index = 0; first_symbol_index = 0;
} }
// 38.213 chapter 13: over two consecutive slots // 38.213 chapter 13: over two consecutive slots
search_space_duration = 2; //search_space_duration = 2;
} }
/// MUX PATTERN 2 /// MUX PATTERN 2
......
...@@ -315,6 +315,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm ...@@ -315,6 +315,7 @@ void config_common(int Mod_idP, int pdsch_AntennaPorts, NR_ServingCellConfigComm
} }
int rrc_mac_config_req_gNB(module_id_t Mod_idP, int rrc_mac_config_req_gNB(module_id_t Mod_idP,
int ssb_SubcarrierOffset, int ssb_SubcarrierOffset,
int pdsch_AntennaPorts, int pdsch_AntennaPorts,
...@@ -367,6 +368,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, ...@@ -367,6 +368,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
if (add_ue == 1 && get_softmodem_params()->phy_test) { if (add_ue == 1 && get_softmodem_params()->phy_test) {
const int UE_id = add_new_nr_ue(Mod_idP,rnti); const int UE_id = add_new_nr_ue(Mod_idP,rnti);
UE_info->secondaryCellGroup[UE_id] = secondaryCellGroup; UE_info->secondaryCellGroup[UE_id] = secondaryCellGroup;
compute_csi_bitlen (secondaryCellGroup, UE_info, UE_id);
struct NR_ServingCellConfig__downlinkBWP_ToAddModList *bwpList = struct NR_ServingCellConfig__downlinkBWP_ToAddModList *bwpList =
secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList; secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList;
AssertFatal(bwpList->list.count == 1, AssertFatal(bwpList->list.count == 1,
......
...@@ -344,9 +344,8 @@ void nr_schedule_pucch(int Mod_idP, ...@@ -344,9 +344,8 @@ void nr_schedule_pucch(int Mod_idP,
frame_t frameP, frame_t frameP,
sub_frame_t slotP) { sub_frame_t slotP) {
uint16_t O_uci; uint16_t O_csi, O_ack, O_uci;
uint16_t O_ack; uint8_t O_sr = 0; // no SR in PUCCH implemented for now
uint8_t SR_flag = 0; // no SR in PUCCH implemented for now
NR_ServingCellConfigCommon_t *scc = RC.nrmac[Mod_idP]->common_channels->ServingCellConfigCommon; NR_ServingCellConfigCommon_t *scc = RC.nrmac[Mod_idP]->common_channels->ServingCellConfigCommon;
NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info; NR_UE_info_t *UE_info = &RC.nrmac[Mod_idP]->UE_info;
AssertFatal(UE_info->active[UE_id],"Cannot find UE_id %d is not active\n",UE_id); AssertFatal(UE_info->active[UE_id],"Cannot find UE_id %d is not active\n",UE_id);
...@@ -359,31 +358,36 @@ void nr_schedule_pucch(int Mod_idP, ...@@ -359,31 +358,36 @@ void nr_schedule_pucch(int Mod_idP,
NR_sched_pucch *curr_pucch; NR_sched_pucch *curr_pucch;
for (int k=0; k<nr_ulmix_slots; k++) { for (int k=0; k<nr_ulmix_slots; k++) {
curr_pucch = &UE_info->UE_sched_ctrl[UE_id].sched_pucch[k]; for (int l=0; l<2; l++) {
if ((curr_pucch->dai_c > 0) && (frameP == curr_pucch->frame) && (slotP == curr_pucch->ul_slot)) { curr_pucch = &UE_info->UE_sched_ctrl[UE_id].sched_pucch[k][l];
UL_tti_req->SFN = curr_pucch->frame;
UL_tti_req->Slot = curr_pucch->ul_slot;
UL_tti_req->pdus_list[UL_tti_req->n_pdus].pdu_type = NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE;
UL_tti_req->pdus_list[UL_tti_req->n_pdus].pdu_size = sizeof(nfapi_nr_pucch_pdu_t);
nfapi_nr_pucch_pdu_t *pucch_pdu = &UL_tti_req->pdus_list[UL_tti_req->n_pdus].pucch_pdu;
memset(pucch_pdu,0,sizeof(nfapi_nr_pucch_pdu_t));
UL_tti_req->n_pdus+=1;
O_ack = curr_pucch->dai_c; O_ack = curr_pucch->dai_c;
O_uci = O_ack; // for now we are just sending acknacks in pucch O_csi = curr_pucch->csi_bits;
O_uci = O_ack + O_csi + O_sr;
LOG_D(MAC, "Scheduling pucch reception for frame %d slot %d\n", frameP, slotP); if ((O_uci>0) && (frameP == curr_pucch->frame) && (slotP == curr_pucch->ul_slot)) {
UL_tti_req->SFN = curr_pucch->frame;
nr_configure_pucch(pucch_pdu, UL_tti_req->Slot = curr_pucch->ul_slot;
scc, UL_tti_req->pdus_list[UL_tti_req->n_pdus].pdu_type = NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE;
ubwp, UL_tti_req->pdus_list[UL_tti_req->n_pdus].pdu_size = sizeof(nfapi_nr_pucch_pdu_t);
curr_pucch->resource_indicator, nfapi_nr_pucch_pdu_t *pucch_pdu = &UL_tti_req->pdus_list[UL_tti_req->n_pdus].pucch_pdu;
O_uci, memset(pucch_pdu,0,sizeof(nfapi_nr_pucch_pdu_t));
O_ack, UL_tti_req->n_pdus+=1;
SR_flag);
LOG_I(MAC,"Scheduling pucch reception for frame %d slot %d with (%d, %d, %d) (SR ACK, CSI) bits\n",
memset((void *) &UE_info->UE_sched_ctrl[UE_id].sched_pucch[k], frameP,slotP,O_sr,O_ack,curr_pucch->csi_bits);
0,
sizeof(NR_sched_pucch)); nr_configure_pucch(pucch_pdu,
scc,
ubwp,
UE_info->rnti[UE_id],
curr_pucch->resource_indicator,
O_csi,
O_ack,
O_sr);
memset((void *) &UE_info->UE_sched_ctrl[UE_id].sched_pucch[k][l],
0,
sizeof(NR_sched_pucch));
}
} }
} }
} }
...@@ -395,6 +399,7 @@ bool is_xlsch_in_slot(uint64_t bitmap, sub_frame_t slot) { ...@@ -395,6 +399,7 @@ bool is_xlsch_in_slot(uint64_t bitmap, sub_frame_t slot) {
void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
frame_t frame, frame_t frame,
sub_frame_t slot){ sub_frame_t slot){
protocol_ctxt_t ctxt; protocol_ctxt_t ctxt;
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frame, slot,module_idP); PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frame, slot,module_idP);
...@@ -411,19 +416,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -411,19 +416,6 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
const int num_slots_per_tdd = slots_per_frame[*scc->ssbSubcarrierSpacing] >> (7 - tdd_pattern->dl_UL_TransmissionPeriodicity); const int num_slots_per_tdd = slots_per_frame[*scc->ssbSubcarrierSpacing] >> (7 - tdd_pattern->dl_UL_TransmissionPeriodicity);
const int nr_ulmix_slots = tdd_pattern->nrofUplinkSlots + (tdd_pattern->nrofUplinkSymbols!=0); const int nr_ulmix_slots = tdd_pattern->nrofUplinkSlots + (tdd_pattern->nrofUplinkSymbols!=0);
if (slot == 0 && UE_info->active[UE_id]) {
for (int k=0; k<nr_ulmix_slots; k++) {
/* Seems to be covered 384? */
/*memset((void *) &UE_info->UE_sched_ctrl[UE_id].sched_pucch[k],
0,
sizeof(NR_sched_pucch));*/
/* Seems to be covered in line 335? */
/*memset((void *) &UE_info->UE_sched_ctrl[UE_id].sched_pusch[k],
0,
sizeof(NR_sched_pusch));*/
}
}
start_meas(&RC.nrmac[module_idP]->eNB_scheduler); start_meas(&RC.nrmac[module_idP]->eNB_scheduler);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER,VCD_FUNCTION_IN);
...@@ -466,8 +458,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, ...@@ -466,8 +458,9 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
// This schedule SR // This schedule SR
// TODO // TODO
// This schedule CSI // This schedule CSI measurement reporting
// TODO if (UE_info->active[UE_id])
nr_csi_meas_reporting(module_idP, UE_id, frame, slot, num_slots_per_tdd, nr_ulmix_slots, slots_per_frame[*scc->ssbSubcarrierSpacing]);
// This schedule RA procedure if not in phy_test mode // This schedule RA procedure if not in phy_test mode
// Otherwise already consider 5G already connected // Otherwise already consider 5G already connected
......
...@@ -343,68 +343,98 @@ int nr_generate_dlsch_pdu(module_id_t module_idP, ...@@ -343,68 +343,98 @@ int nr_generate_dlsch_pdu(module_id_t module_idP,
return offset; return offset;
} }
void handle_nr_uci(NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl, NR_mac_stats_t *stats, int target_snrx10) { void nr_rx_acknack(nfapi_nr_uci_pusch_pdu_t *uci_pusch,
nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_01,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_234,
NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl, NR_mac_stats_t *stats) {
// TODO // TODO
int max_harq_rounds = 4; // TODO define macro int max_harq_rounds = 4; // TODO define macro
int num_ucis = UL_info->uci_ind.num_ucis;
nfapi_nr_uci_t *uci_list = UL_info->uci_ind.uci_list; if (uci_01 != NULL) {
// handle harq
for (int i = 0; i < num_ucis; i++) { int harq_idx_s = 0;
switch (uci_list[i].pdu_type) {
case NFAPI_NR_UCI_PDCCH_PDU_TYPE: break; // iterate over received harq bits
for (int harq_bit = 0; harq_bit < uci_01->harq->num_harq; harq_bit++) {
case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: { // search for the right harq process
//if (get_softmodem_params()->phy_test == 0) { for (int harq_idx = harq_idx_s; harq_idx < NR_MAX_NB_HARQ_PROCESSES; harq_idx++) {
nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu = &uci_list[i].pucch_pdu_format_0_1; // if the gNB received ack with a good confidence
// handle harq if ((UL_info->slot-1) == sched_ctrl->harq_processes[harq_idx].feedback_slot) {
int harq_idx_s = 0; if ((uci_01->harq->harq_list[harq_bit].harq_value == 1) &&
// tpc (power control) (uci_01->harq->harq_confidence_level == 0)) {
sched_ctrl->tpc1 = nr_get_tpc(target_snrx10,uci_pdu->ul_cqi,30); // toggle NDI and reset round
// iterate over received harq bits sched_ctrl->harq_processes[harq_idx].ndi ^= 1;
for (int harq_bit = 0; harq_bit < uci_pdu->harq->num_harq; harq_bit++) { sched_ctrl->harq_processes[harq_idx].round = 0;
// search for the right harq process }
for (int harq_idx = harq_idx_s; harq_idx < NR_MAX_NB_HARQ_PROCESSES; harq_idx++) { else
// if the gNB received ack with a good confidence sched_ctrl->harq_processes[harq_idx].round++;
if ((UL_info->slot-1) == sched_ctrl->harq_processes[harq_idx].feedback_slot) { sched_ctrl->harq_processes[harq_idx].is_waiting = 0;
if ((uci_pdu->harq->harq_list[harq_bit].harq_value == 1) && harq_idx_s = harq_idx + 1;
(uci_pdu->harq->harq_confidence_level == 0)) { // if the max harq rounds was reached
// toggle NDI and reset round if (sched_ctrl->harq_processes[harq_idx].round == max_harq_rounds) {
sched_ctrl->harq_processes[harq_idx].ndi ^= 1; sched_ctrl->harq_processes[harq_idx].ndi ^= 1;
sched_ctrl->harq_processes[harq_idx].round = 0; sched_ctrl->harq_processes[harq_idx].round = 0;
} stats->dlsch_errors++;
else }
sched_ctrl->harq_processes[harq_idx].round++; break;
sched_ctrl->harq_processes[harq_idx].is_waiting = 0; }
harq_idx_s = harq_idx + 1; // if feedback slot processing is aborted
// if the max harq rounds was reached else if (((UL_info->slot-1) > sched_ctrl->harq_processes[harq_idx].feedback_slot) &&
if (sched_ctrl->harq_processes[harq_idx].round == max_harq_rounds) { (sched_ctrl->harq_processes[harq_idx].is_waiting)) {
sched_ctrl->harq_processes[harq_idx].ndi ^= 1; sched_ctrl->harq_processes[harq_idx].round++;
sched_ctrl->harq_processes[harq_idx].round = 0; if (sched_ctrl->harq_processes[harq_idx].round == max_harq_rounds) {
stats->dlsch_errors++; sched_ctrl->harq_processes[harq_idx].ndi ^= 1;
} sched_ctrl->harq_processes[harq_idx].round = 0;
break;
}
// if feedback slot processing is aborted
else if (((UL_info->slot-1) > sched_ctrl->harq_processes[harq_idx].feedback_slot) &&
(sched_ctrl->harq_processes[harq_idx].is_waiting)) {
sched_ctrl->harq_processes[harq_idx].round++;
if (sched_ctrl->harq_processes[harq_idx].round == max_harq_rounds) {
sched_ctrl->harq_processes[harq_idx].ndi ^= 1;
sched_ctrl->harq_processes[harq_idx].round = 0;
}
sched_ctrl->harq_processes[harq_idx].is_waiting = 0;
}
}
} }
//} sched_ctrl->harq_processes[harq_idx].is_waiting = 0;
break; }
} }
case NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE: break;
} }
} }
UL_info->uci_ind.num_ucis = 0;
if (uci_234 != NULL) {
int harq_idx_s = 0;
int acknack;
// iterate over received harq bits
for (int harq_bit = 0; harq_bit < uci_234->harq.harq_bit_len; harq_bit++) {
acknack = ((uci_234->harq.harq_payload[harq_bit>>3])>>harq_bit)&0x01;
for (int harq_idx = harq_idx_s; harq_idx < NR_MAX_NB_HARQ_PROCESSES-1; harq_idx++) {
// if the gNB received ack with a good confidence or if the max harq rounds was reached
if ((UL_info->slot-1) == sched_ctrl->harq_processes[harq_idx].feedback_slot) {
// TODO add some confidence level for when there is no CRC
if ((uci_234->harq.harq_crc != 1) && acknack) {
// toggle NDI and reset round
sched_ctrl->harq_processes[harq_idx].ndi ^= 1;
sched_ctrl->harq_processes[harq_idx].round = 0;
}
else
sched_ctrl->harq_processes[harq_idx].round++;
sched_ctrl->harq_processes[harq_idx].is_waiting = 0;
harq_idx_s = harq_idx + 1;
// if the max harq rounds was reached
if (sched_ctrl->harq_processes[harq_idx].round == max_harq_rounds) {
sched_ctrl->harq_processes[harq_idx].ndi ^= 1;
sched_ctrl->harq_processes[harq_idx].round = 0;
stats->dlsch_errors++;
}
break;
}
// if feedback slot processing is aborted
else if (((UL_info->slot-1) > sched_ctrl->harq_processes[harq_idx].feedback_slot) &&
(sched_ctrl->harq_processes[harq_idx].is_waiting)) {
sched_ctrl->harq_processes[harq_idx].round++;
if (sched_ctrl->harq_processes[harq_idx].round == max_harq_rounds) {
sched_ctrl->harq_processes[harq_idx].ndi ^= 1;
sched_ctrl->harq_processes[harq_idx].round = 0;
}
sched_ctrl->harq_processes[harq_idx].is_waiting = 0;
}
}
}
}
} }
int getNrOfSymbols(NR_BWP_Downlink_t *bwp, int tda) { int getNrOfSymbols(NR_BWP_Downlink_t *bwp, int tda) {
...@@ -505,8 +535,14 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id, ...@@ -505,8 +535,14 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
UE_info->num_pdcch_cand[UE_id][cid]++; UE_info->num_pdcch_cand[UE_id][cid]++;
/* Find PUCCH occasion */ /* Find PUCCH occasion */
nr_update_pucch_scheduling( nr_acknack_scheduling(module_id,
module_id, UE_id, frame, slot, num_slots_per_tdd, &sched_ctrl->pucch_sched_idx); UE_id,
frame,
slot,
num_slots_per_tdd,
&sched_ctrl->pucch_sched_idx,
&sched_ctrl->pucch_occ_idx);
AssertFatal(sched_ctrl->pucch_sched_idx >= 0, "no uplink slot for PUCCH found!\n"); AssertFatal(sched_ctrl->pucch_sched_idx >= 0, "no uplink slot for PUCCH found!\n");
uint8_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map; uint8_t *vrb_map = RC.nrmac[module_id]->common_channels[CC_id].vrb_map;
...@@ -634,7 +670,7 @@ void nr_schedule_ue_spec(module_id_t module_id, ...@@ -634,7 +670,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
const int current_harq_pid = sched_ctrl->current_harq_pid; const int current_harq_pid = sched_ctrl->current_harq_pid;
NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid]; NR_UE_harq_t *harq = &sched_ctrl->harq_processes[current_harq_pid];
NR_sched_pucch *pucch = &sched_ctrl->sched_pucch[sched_ctrl->pucch_sched_idx]; NR_sched_pucch *pucch = &sched_ctrl->sched_pucch[sched_ctrl->pucch_sched_idx][sched_ctrl->pucch_occ_idx];
harq->feedback_slot = pucch->ul_slot; harq->feedback_slot = pucch->ul_slot;
harq->is_waiting = 1; harq->is_waiting = 1;
UE_info->mac_stats[UE_id].dlsch_rounds[harq->round]++; UE_info->mac_stats[UE_id].dlsch_rounds[harq->round]++;
......
...@@ -369,7 +369,6 @@ int configure_fapi_dl_pdu_phytest(int Mod_idP, ...@@ -369,7 +369,6 @@ int configure_fapi_dl_pdu_phytest(int Mod_idP,
dci_pdu_rel15[0].ndi = UE_info->UE_sched_ctrl[UE_id].harq_processes[current_harq_pid].ndi; dci_pdu_rel15[0].ndi = UE_info->UE_sched_ctrl[UE_id].harq_processes[current_harq_pid].ndi;
// DAI // DAI
dci_pdu_rel15[0].dai[0].val = (pucch_sched->dai_c-1)&3; dci_pdu_rel15[0].dai[0].val = (pucch_sched->dai_c-1)&3;
// TPC for PUCCH // TPC for PUCCH
dci_pdu_rel15[0].tpc = UE_info->UE_sched_ctrl[UE_id].tpc1; // table 7.2.1-1 in 38.213 dci_pdu_rel15[0].tpc = UE_info->UE_sched_ctrl[UE_id].tpc1; // table 7.2.1-1 in 38.213
// PUCCH resource indicator // PUCCH resource indicator
......
...@@ -340,6 +340,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -340,6 +340,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
LOG_I(MAC, "reset RA state information for RA-RNTI %04x\n", ra->rnti); LOG_I(MAC, "reset RA state information for RA-RNTI %04x\n", ra->rnti);
const int UE_id = add_new_nr_ue(gnb_mod_idP, ra->rnti); const int UE_id = add_new_nr_ue(gnb_mod_idP, ra->rnti);
UE_info->secondaryCellGroup[UE_id] = ra->secondaryCellGroup; UE_info->secondaryCellGroup[UE_id] = ra->secondaryCellGroup;
compute_csi_bitlen (ra->secondaryCellGroup, UE_info, UE_id);
UE_info->UE_beam_index[UE_id] = ra->beam_id; UE_info->UE_beam_index[UE_id] = ra->beam_id;
struct NR_ServingCellConfig__downlinkBWP_ToAddModList *bwpList = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList; struct NR_ServingCellConfig__downlinkBWP_ToAddModList *bwpList = ra->secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList;
AssertFatal(bwpList->list.count == 1, AssertFatal(bwpList->list.count == 1,
......
...@@ -36,8 +36,6 @@ ...@@ -36,8 +36,6 @@
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h" #include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "NR_TAG-Id.h" #include "NR_TAG-Id.h"
#define MAX_ACK_BITS 2 //only format 0 is available for now
void set_cset_offset(uint16_t); void set_cset_offset(uint16_t);
void mac_top_init_gNB(void); void mac_top_init_gNB(void);
...@@ -163,6 +161,11 @@ int configure_fapi_dl_pdu_phytest(int Mod_id, ...@@ -163,6 +161,11 @@ int configure_fapi_dl_pdu_phytest(int Mod_id,
uint16_t *rbSize, uint16_t *rbSize,
uint16_t *rbStart); uint16_t *rbStart);
void nr_rx_acknack(nfapi_nr_uci_pusch_pdu_t *uci_pusch,
nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_01,
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_234,
NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl, NR_mac_stats_t *stats);
void config_uldci(NR_BWP_Uplink_t *ubwp, void config_uldci(NR_BWP_Uplink_t *ubwp,
nfapi_nr_pusch_pdu_t *pusch_pdu, nfapi_nr_pusch_pdu_t *pusch_pdu,
nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15, nfapi_nr_dl_tti_pdcch_pdu_rel15_t *pdcch_pdu_rel15,
...@@ -198,12 +201,23 @@ void nr_schedule_pucch(int Mod_idP, ...@@ -198,12 +201,23 @@ void nr_schedule_pucch(int Mod_idP,
frame_t frameP, frame_t frameP,
sub_frame_t slotP); sub_frame_t slotP);
void nr_update_pucch_scheduling(int Mod_idP, void nr_csi_meas_reporting(int Mod_idP,
int UE_id, int UE_id,
frame_t frameP, frame_t frameP,
sub_frame_t slotP, sub_frame_t slotP,
int slots_per_tdd, int slots_per_tdd,
int *pucch_id); int ul_slots,
int n_slots_frame);
void nr_acknack_scheduling(int Mod_idP,
int UE_id,
frame_t frameP,
sub_frame_t slotP,
int slots_per_tdd,
int *pucch_id,
int *pucch_occ);
int get_pucch_resource(NR_UE_info_t *UE_info,int UE_id,int k,int l);
void get_pdsch_to_harq_feedback(int Mod_idP, void get_pdsch_to_harq_feedback(int Mod_idP,
int UE_id, int UE_id,
...@@ -232,10 +246,11 @@ int nr_is_dci_opportunity(nfapi_nr_search_space_t search_space, ...@@ -232,10 +246,11 @@ int nr_is_dci_opportunity(nfapi_nr_search_space_t search_space,
void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu, void nr_configure_pucch(nfapi_nr_pucch_pdu_t* pucch_pdu,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
NR_BWP_Uplink_t *bwp, NR_BWP_Uplink_t *bwp,
uint16_t rnti,
uint8_t pucch_resource, uint8_t pucch_resource,
uint16_t O_uci, uint16_t O_csi,
uint16_t O_ack, uint16_t O_ack,
uint8_t SR_flag); uint8_t O_sr);
void find_search_space(int ss_type, void find_search_space(int ss_type,
NR_BWP_Downlink_t *bwp, NR_BWP_Downlink_t *bwp,
...@@ -320,6 +335,17 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac, ...@@ -320,6 +335,17 @@ int allocate_nr_CCEs(gNB_MAC_INST *nr_mac,
int m, int m,
int nr_of_candidates); int nr_of_candidates);
uint16_t compute_pucch_prb_size(uint8_t format,
uint8_t nr_prbs,
uint16_t O_tot,
uint16_t O_csi,
NR_PUCCH_MaxCodeRate_t *maxCodeRate,
uint8_t Qm,
uint8_t n_symb,
uint8_t n_re_ctrl);
void compute_csi_bitlen (NR_CellGroupConfig_t *secondaryCellGroup, NR_UE_info_t *UE_info, int UE_id);
int get_dlscs(nfapi_nr_config_request_t *cfg); int get_dlscs(nfapi_nr_config_request_t *cfg);
int get_ulscs(nfapi_nr_config_request_t *cfg); int get_ulscs(nfapi_nr_config_request_t *cfg);
......
...@@ -274,10 +274,12 @@ typedef struct UE_info { ...@@ -274,10 +274,12 @@ typedef struct UE_info {
typedef struct NR_sched_pucch { typedef struct NR_sched_pucch {
int frame; int frame;
int ul_slot; int ul_slot;
bool sr_flag;
int csi_bits;
bool simultaneous_harqcsi;
uint8_t dai_c; uint8_t dai_c;
uint8_t timing_indicator; uint8_t timing_indicator;
uint8_t resource_indicator; uint8_t resource_indicator;
bool active;
} NR_sched_pucch; } NR_sched_pucch;
typedef struct NR_sched_pusch { typedef struct NR_sched_pusch {
...@@ -315,6 +317,25 @@ typedef struct NR_UE_ul_harq { ...@@ -315,6 +317,25 @@ typedef struct NR_UE_ul_harq {
NR_UL_harq_states_t state; NR_UL_harq_states_t state;
} NR_UE_ul_harq_t; } NR_UE_ul_harq_t;
typedef struct {
uint8_t nb_ssbri_cri;
uint8_t cri_ssbri_bitlen;
uint8_t rsrp_bitlen;
uint8_t diff_rsrp_bitlen;
}CRI_SSBRI_RSRP_bitlen_t;
#define MAX_CSI_RESOURCE_SET_IN_CSI_RESOURCE_CONFIG 16
typedef struct nr_csi_report {
NR_CSI_ReportConfig__reportQuantity_PR reportQuantity_type;
NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR CSI_Resource_type;
uint8_t nb_of_nzp_csi_report;
uint8_t nb_of_csi_ssb_report;
CRI_SSBRI_RSRP_bitlen_t CSI_report_bitlen[MAX_CSI_RESOURCE_SET_IN_CSI_RESOURCE_CONFIG];
} nr_csi_report_t;
/*! \brief scheduling control information set through an API */ /*! \brief scheduling control information set through an API */
typedef struct { typedef struct {
/// total amount of data awaiting for this UE /// total amount of data awaiting for this UE
...@@ -324,9 +345,10 @@ typedef struct { ...@@ -324,9 +345,10 @@ typedef struct {
/// the currently active BWP in DL /// the currently active BWP in DL
NR_BWP_Downlink_t *active_bwp; NR_BWP_Downlink_t *active_bwp;
NR_sched_pucch *sched_pucch; NR_sched_pucch **sched_pucch;
/// selected PUCCH index, if scheduled /// selected PUCCH index, if scheduled
int pucch_sched_idx; int pucch_sched_idx;
int pucch_occ_idx;
NR_sched_pusch *sched_pusch; NR_sched_pusch *sched_pusch;
/// CCE index and aggregation, should be coherent with cce_list /// CCE index and aggregation, should be coherent with cce_list
...@@ -385,9 +407,11 @@ typedef struct { ...@@ -385,9 +407,11 @@ typedef struct {
} NR_UE_list_t; } NR_UE_list_t;
/*! \brief UE list used by gNB to order UEs/CC for scheduling*/ /*! \brief UE list used by gNB to order UEs/CC for scheduling*/
#define MAX_CSI_REPORTCONFIG 48
typedef struct { typedef struct {
DLSCH_PDU DLSCH_pdu[4][MAX_MOBILES_PER_GNB]; DLSCH_PDU DLSCH_pdu[4][MAX_MOBILES_PER_GNB];
/// scheduling control info /// scheduling control info
nr_csi_report_t csi_report_template[MAX_MOBILES_PER_GNB][MAX_CSI_REPORTCONFIG];
NR_UE_sched_ctrl_t UE_sched_ctrl[MAX_MOBILES_PER_GNB]; NR_UE_sched_ctrl_t UE_sched_ctrl[MAX_MOBILES_PER_GNB];
NR_mac_stats_t mac_stats[MAX_MOBILES_PER_GNB]; NR_mac_stats_t mac_stats[MAX_MOBILES_PER_GNB];
NR_UE_list_t list; NR_UE_list_t list;
......
...@@ -996,17 +996,7 @@ pdcp_data_ind( ...@@ -996,17 +996,7 @@ pdcp_data_ind(
* TODO: be sure of this * TODO: be sure of this
*/ */
if (NFAPI_MODE == NFAPI_UE_STUB_PNF ) { if (NFAPI_MODE == NFAPI_UE_STUB_PNF ) {
#ifdef UESIM_EXPANSION
if (UE_NAS_USE_TUN) {
pdcpHead->inst = ctxt_pP->module_id;
} else {
pdcpHead->inst = 0;
}
#else
pdcpHead->inst = ctxt_pP->module_id; pdcpHead->inst = ctxt_pP->module_id;
#endif
} else { // nfapi_mode } else { // nfapi_mode
if (UE_NAS_USE_TUN) { if (UE_NAS_USE_TUN) {
pdcpHead->inst = ctxt_pP->module_id; pdcpHead->inst = ctxt_pP->module_id;
...@@ -2287,7 +2277,7 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) { ...@@ -2287,7 +2277,7 @@ uint64_t pdcp_module_init( uint64_t pdcp_optmask ) {
nas_getparams(); nas_getparams();
if(UE_NAS_USE_TUN) { if(UE_NAS_USE_TUN) {
int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )?MAX_NUMBER_NETIF:1; int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )? MAX_MOBILES_PER_ENB : 1;
netlink_init_tun("ue",num_if); netlink_init_tun("ue",num_if);
if (IS_SOFTMODEM_NOS1) if (IS_SOFTMODEM_NOS1)
nas_config(1, 1, 2, "ue"); nas_config(1, 1, 2, "ue");
......
...@@ -53,9 +53,6 @@ typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *cons ...@@ -53,9 +53,6 @@ typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *cons
typedef boolean_t (*pdcp_data_ind_func_t)( const protocol_ctxt_t *, const srb_flag_t, typedef boolean_t (*pdcp_data_ind_func_t)( const protocol_ctxt_t *, const srb_flag_t,
const MBMS_flag_t, const rb_id_t, const sdu_size_t, const MBMS_flag_t, const rb_id_t, const sdu_size_t,
mem_block_t *,const uint32_t *const, const uint32_t *const); mem_block_t *,const uint32_t *const, const uint32_t *const);
/* maximum number of tun interfaces that will be created to emulates UEs */
/* UEs beyond that will be multiplexed on the same tun */
#define MAX_NUMBER_NETIF 16
#define ENB_NAS_USE_TUN_W_MBMS_BIT (1<< 10) #define ENB_NAS_USE_TUN_W_MBMS_BIT (1<< 10)
#define PDCP_USE_NETLINK_BIT (1<< 11) #define PDCP_USE_NETLINK_BIT (1<< 11)
......
...@@ -86,12 +86,6 @@ extern struct msghdr nas_msg_rx; ...@@ -86,12 +86,6 @@ extern struct msghdr nas_msg_rx;
#ifdef UESIM_EXPANSION
extern uint16_t inst_pdcp_list[NUMBER_OF_UE_MAX];
#endif
# include "gtpv1u_eNB_task.h" # include "gtpv1u_eNB_task.h"
# include "gtpv1u_eNB_defs.h" # include "gtpv1u_eNB_defs.h"
...@@ -503,11 +497,7 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx ...@@ -503,11 +497,7 @@ int pdcp_fifo_read_input_sdus_fromnetlinksock (const protocol_ctxt_t *const ctx
} }
} else { // ctxt.enb_flag => UE } else { // ctxt.enb_flag => UE
if (NFAPI_MODE == NFAPI_UE_STUB_PNF) { if (NFAPI_MODE == NFAPI_UE_STUB_PNF) {
#ifdef UESIM_EXPANSION
ctxt.module_id = inst_pdcp_list[pdcp_read_header_g.inst];
#else
ctxt.module_id = pdcp_read_header_g.inst; ctxt.module_id = pdcp_read_header_g.inst;
#endif
} else { } else {
ctxt.module_id = 0; ctxt.module_id = 0;
} }
......
...@@ -368,7 +368,7 @@ uint64_t pdcp_module_init(uint64_t _pdcp_optmask) ...@@ -368,7 +368,7 @@ uint64_t pdcp_module_init(uint64_t _pdcp_optmask)
nas_getparams(); nas_getparams();
if(UE_NAS_USE_TUN) { if(UE_NAS_USE_TUN) {
int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )?MAX_NUMBER_NETIF:1; int num_if = (NFAPI_MODE == NFAPI_UE_STUB_PNF || IS_SOFTMODEM_SIML1 )? MAX_MOBILES_PER_ENB : 1;
netlink_init_tun("ue",num_if); netlink_init_tun("ue",num_if);
//Add --nr-ip-over-lte option check for next line //Add --nr-ip-over-lte option check for next line
if (IS_SOFTMODEM_NOS1) if (IS_SOFTMODEM_NOS1)
......
...@@ -287,18 +287,6 @@ ue_ip_common_ip2wireless( ...@@ -287,18 +287,6 @@ ue_ip_common_ip2wireless(
printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]); printk("[UE_IP_DRV][%s] Dest %d.%d.%d.%d\n",__FUNCTION__, dst_addr[0],dst_addr[1],dst_addr[2],dst_addr[3]);
} }
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator start
#ifdef UESIM_EXPANSION
if ((src_addr[3] - 2)> instP) {
pdcph.inst = src_addr[3] - 2;
printk("[UE_IP_DRV] change INST from %d to %d\n",instP, pdcph.inst);
instP = src_addr[3] - 2;
priv_p=netdev_priv(ue_ip_dev[instP]);
}
#endif
// modify inst by IP address for the U-Plane of multiple UEs while L2 fapi simulator end
//get Ipv4 address and pass to PCDP header //get Ipv4 address and pass to PCDP header
printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id ); printk("[UE_IP_DRV] source Id: 0x%08x\n",pdcph.sourceL2Id );
printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id ); printk("[UE_IP_DRV] destinationL2Id Id: 0x%08x\n",pdcph.destinationL2Id );
......
...@@ -79,6 +79,44 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) { ...@@ -79,6 +79,44 @@ void handle_nr_rach(NR_UL_IND_t *UL_info) {
} }
void handle_nr_uci(NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl, NR_mac_stats_t *stats, int target_snrx10) {
int num_ucis = UL_info->uci_ind.num_ucis;
nfapi_nr_uci_t *uci_list = UL_info->uci_ind.uci_list;
for (int i = 0; i < num_ucis; i++) {
switch (uci_list[i].pdu_type) {
case NFAPI_NR_UCI_PUSCH_PDU_TYPE: break;
case NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE: {
nfapi_nr_uci_pucch_pdu_format_0_1_t *uci_pdu = &uci_list[i].pucch_pdu_format_0_1;
// tpc (power control)
sched_ctrl->tpc1 = nr_get_tpc(target_snrx10,uci_pdu->ul_cqi,30);
if( (uci_pdu->pduBitmap>>1) & 0x01)
nr_rx_acknack(NULL,uci_pdu,NULL,UL_info,sched_ctrl,stats);
break;
}
case NFAPI_NR_UCI_FORMAT_2_3_4_PDU_TYPE: {
nfapi_nr_uci_pucch_pdu_format_2_3_4_t *uci_pdu = &uci_list[i].pucch_pdu_format_2_3_4;
// tpc (power control)
sched_ctrl->tpc1 = nr_get_tpc(target_snrx10,uci_pdu->ul_cqi,30);
if( (uci_pdu->pduBitmap>>1) & 0x01)
nr_rx_acknack(NULL,NULL,uci_pdu,UL_info,sched_ctrl,stats);
break;
}
}
}
UL_info->uci_ind.num_ucis = 0;
}
void handle_nr_ulsch(NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl, NR_mac_stats_t *stats) { void handle_nr_ulsch(NR_UL_IND_t *UL_info, NR_UE_sched_ctrl_t *sched_ctrl, NR_mac_stats_t *stats) {
if(nfapi_mode == 1) { if(nfapi_mode == 1) {
......
This diff is collapsed.
...@@ -55,10 +55,6 @@ Description Defines functions used to handle EPS bearer contexts. ...@@ -55,10 +55,6 @@ Description Defines functions used to handle EPS bearer contexts.
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#ifdef UESIM_EXPANSION
#include "openairinterface5g_limits.h"
extern uint16_t inst_pdcp_list[NUMBER_OF_UE_MAX];
#endif
/****************************************************************************/ /****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/ /**************** E X T E R N A L D E F I N I T I O N S ****************/
...@@ -200,7 +196,7 @@ int esm_ebr_context_create( ...@@ -200,7 +196,7 @@ int esm_ebr_context_create(
char *tmp = NULL; char *tmp = NULL;
char ipv4_addr[INET_ADDRSTRLEN]; char ipv4_addr[INET_ADDRSTRLEN];
//char ipv6_addr[INET6_ADDRSTRLEN]; //char ipv6_addr[INET6_ADDRSTRLEN];
char *netmask = NULL; int netmask = 32;
char broadcast[INET_ADDRSTRLEN]; char broadcast[INET_ADDRSTRLEN];
struct in_addr in_addr; struct in_addr in_addr;
char command_line[500]; char command_line[500];
...@@ -227,7 +223,7 @@ int esm_ebr_context_create( ...@@ -227,7 +223,7 @@ int esm_ebr_context_create(
strcpy(ipv4_addr, tmp); strcpy(ipv4_addr, tmp);
if (IN_CLASSA(ntohl(in_addr.s_addr))) { if (IN_CLASSA(ntohl(in_addr.s_addr))) {
netmask = "255.0.0.0"; netmask = 8;
in_addr.s_addr = pdn->ip_addr[0] << 24 | in_addr.s_addr = pdn->ip_addr[0] << 24 |
((255 << 16) & 0x00FF0000) | ((255 << 16) & 0x00FF0000) |
((255 << 8) & 0x0000FF00) | ((255 << 8) & 0x0000FF00) |
...@@ -239,7 +235,7 @@ int esm_ebr_context_create( ...@@ -239,7 +235,7 @@ int esm_ebr_context_create(
// in_addr.s_addr); // in_addr.s_addr);
strcpy(broadcast, tmp); strcpy(broadcast, tmp);
} else if (IN_CLASSB(ntohl(in_addr.s_addr))) { } else if (IN_CLASSB(ntohl(in_addr.s_addr))) {
netmask = "255.255.0.0"; netmask = 16;
in_addr.s_addr = pdn->ip_addr[0] << 24 | in_addr.s_addr = pdn->ip_addr[0] << 24 |
((pdn->ip_addr[1] << 16) & 0x00FF0000) | ((pdn->ip_addr[1] << 16) & 0x00FF0000) |
((255 << 8) & 0x0000FF00) | ((255 << 8) & 0x0000FF00) |
...@@ -251,7 +247,7 @@ int esm_ebr_context_create( ...@@ -251,7 +247,7 @@ int esm_ebr_context_create(
// in_addr.s_addr); // in_addr.s_addr);
strcpy(broadcast, tmp); strcpy(broadcast, tmp);
} else if (IN_CLASSC(ntohl(in_addr.s_addr))) { } else if (IN_CLASSC(ntohl(in_addr.s_addr))) {
netmask = "255.255.255.0"; netmask = 24;
in_addr.s_addr = pdn->ip_addr[0] << 24 | in_addr.s_addr = pdn->ip_addr[0] << 24 |
((pdn->ip_addr[1] << 16) & 0x00FF0000) | ((pdn->ip_addr[1] << 16) & 0x00FF0000) |
((pdn->ip_addr[2] << 8) & 0x0000FF00) | ((pdn->ip_addr[2] << 8) & 0x0000FF00) |
...@@ -263,56 +259,23 @@ int esm_ebr_context_create( ...@@ -263,56 +259,23 @@ int esm_ebr_context_create(
// in_addr.s_addr); // in_addr.s_addr);
strcpy(broadcast, tmp); strcpy(broadcast, tmp);
} else { } else {
netmask = "255.255.255.255"; netmask = 32;
strcpy(broadcast, ipv4_addr); strcpy(broadcast, ipv4_addr);
} }
if(NFAPI_MODE==NFAPI_UE_STUB_PNF) { res = sprintf(command_line,
// this is for L2 FAPI simulator. "ip address add %s/%d broadcast %s dev %s%d && "
// change for multiple UE's like 256UEs. "ip link set %s%d up && "
// if it's made too many tables , OS may crush so we use one table. "ip rule add from %s/32 table %d && "
if(PDCP_USE_NETLINK) { "ip rule add to %s/32 table %d && "
#ifdef UESIM_EXPANSION "ip route add default dev %s%d table %d",
uint16_t inst_nic = (pdn->ip_addr[3] & 0x000000FF) - 2; ipv4_addr, netmask, broadcast,
res = sprintf(command_line, UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1,
"ifconfig %s%d %s netmask %s broadcast %s up && " UE_NAS_USE_TUN ? "oaitun_ue" : "oip", ueid + 1,
"ip rule add from %s/24 table %d && " ipv4_addr, ueid + 10000,
"ip rule add to %s/24 table %d && " ipv4_addr, ueid + 10000,
"ip route add default dev %s%d table %d", UE_NAS_USE_TUN ? "oaitun_ue" : "oip",
UE_NAS_USE_TUN?"oaitun_ue":"oip", ueid + 1, ueid + 10000);
inst_nic + 1, ipv4_addr, netmask, broadcast,
ipv4_addr, 201,
ipv4_addr, 201,
UE_NAS_USE_TUN?"oaitun_ue":"oip",
inst_nic + 1, 201);
inst_pdcp_list[inst_nic] = ueid;
#else
res = sprintf(command_line,
"ifconfig %s%d %s netmask %s broadcast %s up && "
"ip rule add from %s/32 table %d && "
"ip rule add to %s/32 table %d && "
"ip route add default dev %s%d table %d",
UE_NAS_USE_TUN?"oaitun_ue":"oip",
ueid + 1, ipv4_addr, netmask, broadcast,
ipv4_addr, ueid + 201,
ipv4_addr, ueid + 201,
UE_NAS_USE_TUN?"oaitun_ue":"oip",
ueid + 1, ueid + 201);
#endif
} // PDCP_USE_NETLINK
} else {
res = sprintf(command_line,
"ifconfig %s%d %s netmask %s broadcast %s up && "
"ip rule add from %s/32 table %d && "
"ip rule add to %s/32 table %d && "
"ip route add default dev %s%d table %d",
UE_NAS_USE_TUN?"oaitun_ue":"oip",
ueid + 1, ipv4_addr, netmask, broadcast,
ipv4_addr, ueid + 201,
ipv4_addr, ueid + 201,
UE_NAS_USE_TUN?"oaitun_ue":"oip",
ueid + 1, ueid + 201);
}
if ( res<0 ) { if ( res<0 ) {
LOG_TRACE(WARNING, "ESM-PROC - Failed to system command string"); LOG_TRACE(WARNING, "ESM-PROC - Failed to system command string");
......
<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">OpenShift Build and Usage Procedures</font></b>
</td>
</tr>
</table>
-----
**CAUTION: this is experimental. Still a lot to be done.**
-----
# 1. Build pre-requisites #
To build our RAN images, we SHALL use the `codeready-builder-for-rhel-8-x86_64-rpms` repository with all the proper development libraries.
This repository is not directly accessible from the UBI RHEL8 image (`registry.access.redhat.com/ubi8/ubi:latest`).
So we need to copy from a register RHEL8 machine certificates and subsccription manager configuration files.
SO on a `RHEL8` physical machine (or a virtual machine) connected to the OpenShift Cluster, recover the entitlement and the RH subscription manager configs:
```bash
oc create configmap rhsm-conf --from-file /etc/rhsm/rhsm.conf
oc create configmap rhsm-ca --from-file /etc/rhsm/ca/redhat-uep.pem
oc create secret generic etc-pki-entitlement --from-file /etc/pki/entitlement/{NUMBER_ON_YOUR_COMPUTER}.pem --from-file /etc/pki/entitlement/{NUMBER_ON_YOUR_COMPUTER}-key.pem
```
These configmaps and secret will be shared by all the build configs in your OC project. No need to do it each time.
**CAUTION: these files expire every month or so. If you have done a build on your OC project and try again a few weeks later, you may need to re-copy them**.
```bash
oc delete secret etc-pki-entitlement
oc delete cm rhsm-conf
oc delete cm rhsm-ca
```
**LAST POINT: your OC project SHALL be `oai`.**
# 2. Build the Builder shared image #
In our Eurecom/OSA environment we need to pass a GIT proxy.
2 things are impacted by this situation:
* In `openshift/oai-ran-rh8-build-config.yml` file
* `httpProxy: http://proxy.eurecom.fr:8080`
* `httpsProxy: https://proxy.eurecom.fr:8080`
* Add a environment variable to the build config
```bash
oc apply -f openshift/oai-ran-rh8-image-stream.yml
oc apply -f openshift/oai-ran-rh8-build-config.yml
oc set env bc/oai-ran-rhel8-build-config NEEDED_GIT_PROXY=http://proxy.eurecom.fr:8080
oc start-build oai-ran-rhel8-build-config --follow
```
In case you do NOT require a GIT proxy: **you SHALL remove the 2 lines in `openshift/oai-ran-rh8-build-config.yml` file.**
And no need to add a `NEEDED_GIT_PROXY` variable to the build config.
```bash
oc apply -f openshift/oai-ran-rh8-image-stream.yml
oc apply -f openshift/modified-oai-ran-rh8-build-config.yml
oc start-build oai-ran-rhel8-build-config --follow
```
After a while it should be successful.
# 3. Build an OAI target image #
For the example the eNB:
```bash
oc apply -f openshift/oai-enb-rh8-image-stream.yml
oc apply -f openshift/oai-enb-rh8-build-config.yml
oc start-build oai-enb-rh8-build-config --follow
```
**CAUTION: if you are pushing modifications to the branch you are using, it won't be taken into account besides the Dockerfile.**
**Because the source files are copied during the shared image creation.**
**Only way to regenerate images w/ modified source code is to re-start from step #2.**
# 4. Deployment using HELM charts #
**CAUTION: even more experimental.**
Helm charts are located in another repository:
```bash
git clone https://github.com/OPENAIRINTERFACE/openair-k8s.git
cd openair-k8s
git checkout helm-deployment-S6a-S1C-S1U-in-network-18-with-enb
helm install mme /path-to-your-cloned/openair-k8s/charts/oai-mme/
```
#!/bin/sh
oc apply -f openshift/oai-enb-image-stream.yml
oc apply -f openshift/oai-enb-build-config.yml
oc set env bc/oai-enb-build-config NEEDED_GIT_PROXY=http://proxy.eurecom.fr:8080
oc start-build oai-enb-build-config --follow
#!/bin/sh
oc apply -f openshift/oai-gnb-image-stream.yml
oc apply -f openshift/oai-gnb-build-config.yml
oc set env bc/oai-gnb-build-config NEEDED_GIT_PROXY=http://proxy.eurecom.fr:8080
oc start-build oai-gnb-build-config --follow
#!/bin/sh
oc apply -f openshift/oai-ran-image-stream.yml
oc apply -f openshift/oai-ran-build-config.yml
oc set env bc/oai-ran-build-config NEEDED_GIT_PROXY=http://proxy.eurecom.fr:8080
oc start-build oai-ran-build-config --follow
...@@ -8,23 +8,11 @@ ...@@ -8,23 +8,11 @@
# define NUMBER_OF_NR_RU_MAX 2 # define NUMBER_OF_NR_RU_MAX 2
# ifndef PHYSIM # ifndef PHYSIM
# ifndef UE_EXPANSION # ifndef UE_EXPANSION
// TODO:L2 FAPI simulator.
// UESIM_EXPANSION is used to be same value of NUMBER_OF_UE_MAX
// in eNB and UE.
// now , if we use --mu option in UE, compiling error will occur.
// This problem will be fixed in the future.
# ifndef UESIM_EXPANSION
# define NUMBER_OF_UE_MAX 4 # define NUMBER_OF_UE_MAX 4
# define NUMBER_OF_NR_UE_MAX 4 # define NUMBER_OF_NR_UE_MAX 4
# define NUMBER_OF_UCI_VARS_MAX 14 # define NUMBER_OF_UCI_VARS_MAX 14
# define NUMBER_OF_CONNECTED_eNB_MAX 1 # define NUMBER_OF_CONNECTED_eNB_MAX 1
# define NUMBER_OF_CONNECTED_gNB_MAX 1 # define NUMBER_OF_CONNECTED_gNB_MAX 1
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_UCI_VARS_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# define NUMBER_OF_CONNECTED_gNB_MAX 3
# endif
# else # else
# define NUMBER_OF_UE_MAX 256 # define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_UCI_VARS_MAX 256 # define NUMBER_OF_UCI_VARS_MAX 256
...@@ -48,17 +36,10 @@ eNB process will exit because unexpected access happens. ...@@ -48,17 +36,10 @@ eNB process will exit because unexpected access happens.
Now some parts are using NUMBER_OF_UE_MAX Now some parts are using NUMBER_OF_UE_MAX
and the other are using MAX_MOBILES_PER_ENB in for-loop. and the other are using MAX_MOBILES_PER_ENB in for-loop.
*/ */
# ifndef UESIM_EXPANSION
# define NUMBER_OF_UE_MAX 16 # define NUMBER_OF_UE_MAX 16
# define NUMBER_OF_UCI_VARS_MAX 56 # define NUMBER_OF_UCI_VARS_MAX 56
# define NUMBER_OF_CONNECTED_eNB_MAX 3 # define NUMBER_OF_CONNECTED_eNB_MAX 3
# define NUMBER_OF_CONNECTED_gNB_MAX 3 # define NUMBER_OF_CONNECTED_gNB_MAX 3
# else
# define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_UCI_VARS_MAX 256
# define NUMBER_OF_CONNECTED_eNB_MAX 1
# define NUMBER_OF_CONNECTED_gNB_MAX 3
# endif
# else # else
# define NUMBER_OF_UE_MAX 256 # define NUMBER_OF_UE_MAX 256
# define NUMBER_OF_UCI_VARS_MAX 256 # define NUMBER_OF_UCI_VARS_MAX 256
......
...@@ -95,9 +95,6 @@ pthread_mutex_t nfapi_sync_mutex; ...@@ -95,9 +95,6 @@ pthread_mutex_t nfapi_sync_mutex;
int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex int nfapi_sync_var=-1; //!< protected by mutex \ref nfapi_sync_mutex
#ifdef UESIM_EXPANSION
uint16_t inst_pdcp_list[NUMBER_OF_UE_MAX];
#endif
uint16_t sf_ahead=2; uint16_t sf_ahead=2;
int tddflag; int tddflag;
char *emul_iface; char *emul_iface;
...@@ -546,9 +543,6 @@ void init_pdcp(void) { ...@@ -546,9 +543,6 @@ void init_pdcp(void) {
int main( int argc, char **argv ) { int main( int argc, char **argv ) {
int CC_id; int CC_id;
uint8_t abstraction_flag=0; uint8_t abstraction_flag=0;
#ifdef UESIM_EXPANSION
memset(inst_pdcp_list, 0, sizeof(inst_pdcp_list));
#endif
// Default value for the number of UEs. It will hold, // Default value for the number of UEs. It will hold,
// if not changed from the command line option --num-ues // if not changed from the command line option --num-ues
NB_UE_INST=1; NB_UE_INST=1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment