Commit 6c6e29fa authored by Shweta Shrivastava's avatar Shweta Shrivastava

Merge branch 'develop' into NR_UE_UL_DCI_improvements

parents 590a9d41 5372a347
......@@ -12,3 +12,9 @@ targets/bin/
# vscode
.vscode
# Tags for vim/global
GPATH
GRTAGS
GTAGS
tags
......@@ -21,3 +21,7 @@ The Regents of the University of California: BSD 3-Clause Licence.
Niels Provos <provos@citi.umich.edu>: BSD 2-Clause Licence.
## Credits for source code openair3/GTPV1-U/nw-gtpv1u: ##
Amit Chawre <http://www.amitchawre.net/contact.html>: BSD 2-Clause Licence.
......@@ -30,7 +30,6 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
}
}
def doRedHatBuild = false
def doFlexranCtrlTest = false
// Location of the executor node
......@@ -85,21 +84,6 @@ pipeline {
echo "Platform is ${env.TESTPLATFORM_OWNER}"
}
if (params.RedHatRemoteServer == null) {
allParametersPresent = false
}
if (params.RedHatRemoteCredentials == null) {
allParametersPresent = false
}
if (params.RedHatWorkingPath == null) {
allParametersPresent = false
}
if (allParametersPresent) {
echo "Performing Red Hat Build"
doRedHatBuild = true
} else {
doRedHatBuild = false
}
if (params.FlexRanRtcGitLabRepository_Credentials != null) {
doFlexranCtrlTest = true
}
......@@ -279,7 +263,7 @@ pipeline {
steps {
gitlabCommitStatus(name: "Build eNB-USRP") {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
}
}
}
......@@ -311,28 +295,6 @@ pipeline {
}
}
}
stage ("Build eNB-USRP on Red Hat") {
when {
expression {doRedHatBuild}
}
steps {
gitlabCommitStatus(name: "Build eNB-USRP-RHE") {
script {
try {
withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.RedHatRemoteCredentials}", usernameVariable: 'RH_Username', passwordVariable: 'RH_Password']
]) {
timeout (time: 20, unit: 'MINUTES') {
sh "./ci-scripts/buildOnRH.sh --workspace $WORKSPACE --job-name ${JOB_NAME} --build-id ${BUILD_ID} --remote-host ${params.RedHatRemoteServer} --remote-path ${params.RedHatWorkingPath} --remote-user-name ${RH_Username} --remote-password ${RH_Password}"
}
}
} catch (Exception e) {
echo "Red Hat build failed but we could keep running pipeline if all ubuntu-based build passed"
}
}
}
}
}
}
post {
failure {
......
......@@ -34,7 +34,7 @@
import sys # arg
import re # reg
import yaml
import constants as CONST
#-----------------------------------------------------------
# Parsing Command Line Arguements
......
......@@ -77,7 +77,7 @@ then
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext"`
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE`
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FILE`
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h"`
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_"`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
......@@ -194,12 +194,12 @@ do
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext"`
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE`
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FULLFILE`
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h"`
IS_EXCEPTION=`echo $FULLFILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h|openair3/GTPV1-U/nw-gtpv1u|openair2/UTIL/OPT/ws_"`
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
then
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
then
echo $FILE >> ./files-w-suspect-banner.txt
echo $FULLFILE >> ./files-w-suspect-banner.txt
fi
fi
fi
......
......@@ -27,61 +27,111 @@
# pexpect
#---------------------------------------------------------------------
#to use isfile
import os
import sys
#to use logging.info()
import logging
#to create a SSH object locally in the methods
import sshconnection
#time.sleep
import time
#to load cots_ue dictionary
import yaml
class CotsUe:
def __init__(self,model,UEIPAddr,UEUserName,UEPassWord):
self.model = model
self.UEIPAddr = UEIPAddr
self.UEUserName = UEUserName
self.UEPassWord = UEPassWord
self.runargs = '' #on of off to toggle airplane mode on/off
def __init__(self,ADBIPAddr,ADBUserName,ADBPassWord):
self.cots_id = '' #cots id from yaml oppo, s10 etc...
self.ADBIPAddr = ADBIPAddr
self.ADBUserName = ADBUserName
self.ADBPassWord = ADBPassWord
self.cots_run_mode = '' #on of off to toggle airplane mode on/off
self.__cots_cde_dict_file = 'cots_ue_ctl.yaml'
self.__SetAirplaneRetry = 3
#-----------------$
#PUBLIC Methods$
#-----------------$
def Check_Airplane(self):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.UEIPAddr, self.UEUserName, self.UEPassWord)
status=mySSH.cde_check_value('sudo adb shell settings get global airplane_mode_on ', ['0','1'],5)
mySSH.open(self.ADBIPAddr, self.ADBUserName, self.ADBPassWord)
status=mySSH.cde_check_value('adb shell settings get global airplane_mode_on ', ['0','1'],5)
mySSH.close()
return status
#simply check if the device id exists in the dictionary
#returns true if it exists, false otherwise
def Check_Exists(self,target_id):
#load cots commands dictionary
if (os.path.isfile(self.__cots_cde_dict_file)):
yaml_file=self.__cots_cde_dict_file
elif (os.path.isfile('ci-scripts/'+self.__cots_cde_dict_file)):
yaml_file='ci-scripts/'+self.__cots_cde_dict_file
else:
logging.error("COTS UE dictionary yaml file cannot be found")
sys.exit("COTS UE dictionary yaml file cannot be found")
#load cots commands dictionary
with open(yaml_file,'r') as file:
cots_ue_ctl = yaml.load(file,Loader=yaml.FullLoader)
#check if ue id is in the dictionary
if target_id in cots_ue_ctl:
return True
else:
return False
def Set_Airplane(self, target_id, target_state_str):
#loading cots commands dictionary
def Set_Airplane(self,target_state_str):
mySSH = sshconnection.SSHConnection()
mySSH.open(self.UEIPAddr, self.UEUserName, self.UEPassWord)
mySSH.command('sudo adb start-server','$',5)
logging.info("Toggling COTS UE Airplane mode to : "+target_state_str)
current_state = self.Check_Airplane()
if target_state_str.lower()=="on":
target_state=1
if (os.path.isfile(self.__cots_cde_dict_file)):
yaml_file=self.__cots_cde_dict_file
elif (os.path.isfile('ci-scripts/'+self.__cots_cde_dict_file)):
yaml_file='ci-scripts/'+self.__cots_cde_dict_file
else:
target_state=0
if current_state != target_state:
#toggle state
retry = 0
while (current_state!=target_state) and (retry < self.__SetAirplaneRetry):
mySSH.command('sudo adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS', '\$', 5)
mySSH.command('sudo adb shell input keyevent 20', '\$', 5)
mySSH.command('sudo adb shell input tap 968 324', '\$', 5)
time.sleep(1)
current_state = self.Check_Airplane()
retry+=1
logging.error("COTS UE dictionary yaml file cannot be found")
sys.exit("COTS UE dictionary yaml file cannot be found")
#load cots commands dictionary
with open(yaml_file,'r') as file:
cots_ue_ctl = yaml.load(file,Loader=yaml.FullLoader)
#check if ue id is in the dictionary
if target_id in cots_ue_ctl:
mySSH = sshconnection.SSHConnection()
mySSH.open(self.ADBIPAddr, self.ADBUserName, self.ADBPassWord)
logging.info(str(self.ADBIPAddr)+' '+str(self.ADBUserName)+' '+str(self.ADBPassWord))
mySSH.command('adb start-server','\$',5)
mySSH.command('adb devices','\$',5)
logging.info("Toggling COTS UE Airplane mode to : "+target_state_str)
#get current state
current_state = self.Check_Airplane()
if target_state_str.lower()=="on":
target_state=1
else:
target_state=0
if current_state != target_state:
logging.error("ATTENTION : Could not toggle to : "+target_state_str)
logging.error("Current state is : "+ str(current_state))
#toggle state
retry = 0
while (current_state!=target_state) and (retry < self.__SetAirplaneRetry):
#loop over the command list from dictionary for the selected ue, to switch to required state
for i in range (0,len(cots_ue_ctl[target_id])):
mySSH.command(cots_ue_ctl[target_id][i], '\$', 5)
time.sleep(1)
current_state = self.Check_Airplane()
retry+=1
#could not toggle despite the retry
if current_state != target_state:
logging.error("ATTENTION : Could not toggle to : "+target_state_str)
logging.error("Current state is : "+ str(current_state))
else:
logging.info("Airplane mode is already "+ target_state_str)
mySSH.command('adb kill-server','\$',5)
mySSH.close()
#ue id is NOT in the dictionary
else:
print("Airplane mode is already "+ target_state_str)
mySSH.command('sudo adb kill-server','$',5)
mySSH.close()
logging.error("COTS UE Id from XML could not be found in UE YAML dictionary " + self.__cots_cde_dict_file)
sys.exit("COTS UE Id from XML could not be found in UE YAML dictionary " + self.__cots_cde_dict_file)
......
9d690a12: #oppo
- adb shell input keyevent KEYCODE_POWER
- adb shell input swipe 300 700 300 0
- adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
- adb shell input keyevent 20
- adb shell input tap 968 324
002: #s10
- adb shell input keyevent KEYCODE_POWER
- adb shell input swipe 200 900 200 300
- adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
- adb shell input tap 968 324
003: #s20
- adb shell input keyevent KEYCODE_POWER
- adb shell input swipe 200 900 200 300
- adb shell am start -a android.settings.AIRPLANE_MODE_SETTINGS
- adb shell input tap 968 324
004: #xperia
- tbd
- tbd
- tbd
This diff is collapsed.
......@@ -90,6 +90,7 @@ class RANManagement():
self.epcPcapFile = ''
self.htmlObj = None
self.epcObj = None
self.runtime_stats= ''
......@@ -614,7 +615,7 @@ class RANManagement():
logging.debug('\u001B[1m Analyzing eNB replay logfile \u001B[0m')
logStatus = self.AnalyzeLogFile_eNB(extracted_log_file)
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
self.htmlObj.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
self.eNBLogFiles[int(self.eNB_instance)] = ''
else:
analyzeFile = False
......@@ -643,10 +644,10 @@ class RANManagement():
return
else:
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
self.htmlObj.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
else:
if self.htmlObj is not None:
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
self.htmlObj.CreateHtmlTestRow(self.runtime_stats, 'OK', CONST.ALL_PROCESSES_OK)
self.eNBmbmsEnables[int(self.eNB_instance)] = False
self.eNBstatuses[int(self.eNB_instance)] = -1
......@@ -712,16 +713,20 @@ class RANManagement():
if runTime != '':
result = re.search('Time executing user inst', str(line))
if result is not None:
userTime = 'to be decoded - 1'
fields=line.split(':')
userTime = 'userTime : ' + fields[1].replace('\n','')
result = re.search('Time executing system inst', str(line))
if result is not None:
systemTime = 'to be decoded - 2'
fields=line.split(':')
systemTime = 'systemTime : ' + fields[1].replace('\n','')
result = re.search('Max. Phy. memory usage:', str(line))
if result is not None:
maxPhyMemUsage = 'to be decoded - 3'
fields=line.split(':')
maxPhyMemUsage = 'maxPhyMemUsage : ' + fields[1].replace('\n','')
result = re.search('Number of context switch.*process origin', str(line))
if result is not None:
nbContextSwitches = 'to be decoded - 4'
fields=line.split(':')
nbContextSwitches = 'nbContextSwitches : ' + fields[1].replace('\n','')
if X2HO_state == CONST.X2_HO_REQ_STATE__IDLE:
result = re.search('target eNB Receives X2 HO Req X2AP_HANDOVER_REQ', str(line))
if result is not None:
......@@ -978,11 +983,12 @@ class RANManagement():
global_status = CONST.ENB_PROCESS_REALTIME_ISSUE
if self.htmlObj is not None:
self.htmlObj.htmleNBFailureMsg=htmleNBFailureMsg
# Runtime statistics
# Runtime statistics for console output and HTML
if runTime != '':
logging.debug(runTime)
logging.debug('Time executing user inst : ' + userTime)
logging.debug('Time executing system inst : ' + systemTime)
logging.debug('Max Physical Memory Usage : ' + maxPhyMemUsage)
logging.debug('Nb Context Switches : ' + nbContextSwitches)
logging.debug(userTime)
logging.debug(systemTime)
logging.debug(maxPhyMemUsage)
logging.debug(nbContextSwitches)
self.runtime_stats='<pre>'+runTime + '\n'+ userTime + '\n' + systemTime + '\n' + maxPhyMemUsage + '\n' + nbContextSwitches+'</pre>'
return global_status
......@@ -2027,30 +2027,6 @@ function run_test_on_vm {
done
full_l2_sim_destroy
echo "############################################################"
echo "Checking run status"
echo "############################################################"
if [ $PING_STATUS -ne 0 ]; then STATUS=-1; fi
if [ $IPERF_STATUS -ne 0 ]; then STATUS=-1; fi
if [ $MBMS_STATUS -eq 0 ]
then
echo "LTE MBMS RFSIM seems OK"
else
echo "LTE MBMS RFSIM seems to FAIL"
STATUS=-1
fi
if [ $STATUS -eq 0 ]
then
echo "LTE RFSIM seems OK"
echo "LTE: TEST_OK" > $ARCHIVES_LOC/test_final_status.log
else
echo "LTE RFSIM seems to FAIL"
echo "LTE: TEST_KO" > $ARCHIVES_LOC/test_final_status.log
fi
####################
## FeMBMS CASE noS1 ##
####################
......@@ -2123,6 +2099,13 @@ function run_test_on_vm {
if [ $PING_STATUS -ne 0 ]; then STATUS=-1; fi
if [ $IPERF_STATUS -ne 0 ]; then STATUS=-1; fi
if [ $MBMS_STATUS -eq 0 ]
then
echo "LTE MBMS RFSIM seems OK"
else
echo "LTE MBMS RFSIM seems to FAIL"
STATUS=-1
fi
if [ $FeMBMS_STATUS -eq 0 ]
then
echo "LTE FeMBMS RFSIM seems OK"
......@@ -2153,7 +2136,7 @@ function run_test_on_vm {
NR_STATUS=0
######### start of loop
while [ $try_cnt -lt 1 ]
while [ $try_cnt -lt 4 ]
do
SYNC_STATUS=0
PING_STATUS=0
......
- COTS_UE_Airplane
- Build_PhySim
- Run_PhySim
- Build_eNB
......
......@@ -21,19 +21,27 @@
-->
<testCaseList>
<htmlTabRef>test-airplane-mode</htmlTabRef>
<htmlTabName>AirplaneToggle</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<htmlTabRef>epc-closure</htmlTabRef>
<htmlTabName>EPC-Closure</htmlTabName>
<htmlTabIcon>log-out</htmlTabIcon>
<TestCaseRequestedList>
010000
060000 060001 060002
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000">
<class>COTS_UE_Airplane</class>
<desc>Toggle COTS Airplane mode ON</desc>
<cots_ue_airplane_args>ON</cots_ue_airplane_args>
<testCase id="060000">
<class>Terminate_HSS</class>
<desc>Terminate HSS</desc>
</testCase>
<testCase id="060001">
<class>Terminate_MME</class>
<desc>Terminate MME</desc>
</testCase>
<testCase id="060002">
<class>Terminate_SPGW</class>
<desc>Terminate SPGW</desc>
</testCase>
</testCaseList>
......@@ -21,30 +21,28 @@
-->
<testCaseList>
<htmlTabRef>test-fr1-tm1</htmlTabRef>
<htmlTabName>Test-FR1-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>1</repeatCount>
<htmlTabRef>epc-start-tab</htmlTabRef>
<htmlTabName>EPC-Start</htmlTabName>
<htmlTabIcon>log-in</htmlTabIcon>
<TestCaseRequestedList>
070001
070000
000100 000101 000102
</TestCaseRequestedList>
<TestCaseExclusionList>
</TestCaseExclusionList>
<testCase id="070000">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<testCase id="000100">
<class>Initialize_HSS</class>
<desc>Initialize HSS</desc>
</testCase>
<testCase id="070001">
<class>Terminate_eNB</class>
<desc>Terminate gNB</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<testCase id="000101">
<class>Initialize_MME</class>
<desc>Initialize MME</desc>
</testCase>
</testCaseList>
<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
-->
<testCaseList>
<htmlTabRef>TEST-FR1-TM1</htmlTabRef>
<htmlTabName>FR1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
010000
030000
040000
010001
000001
050000
050001
070001
070000
010002
010003
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="010000">
<class>Initialize_UE</class>
<desc>Initialize UE</desc>
</testCase>
<testCase id="010003">
<class>Terminate_UE</class>
<desc>Terminate UE</desc>
</testCase>
<testCase id="010001">
<class>Attach_UE</class>
<desc>Attach UE</desc>
</testCase>
<testCase id="010002">
<class>Detach_UE</class>
<desc>Detach UE</desc>
</testCase>
<testCase id="030000">
<class>Initialize_eNB</class>
<desc>Initialize eNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.fr1.25PRB.usrpb210.conf</Initialize_eNB_args>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
<air_interface>lte</air_interface>
</testCase>
<testCase id="040000">
<class>Initialize_eNB</class>
<desc>Initialize gNB</desc>
<Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.fr1.106PRB.usrpb210.conf -E</Initialize_eNB_args>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
<air_interface>nr</air_interface>
</testCase>
<testCase id="000001">
<class>IdleSleep</class>
<desc>Sleep</desc>
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
</testCase>
<testCase id="050000">
<class>Ping</class>
<desc>Ping: 20pings in 20sec</desc>
<ping_args>-c 20</ping_args>
<ping_packetloss_threshold>0</ping_packetloss_threshold>
</testCase>
<testCase id="050001">
<class>Ping</class>
<desc>Ping: 5pings in 1sec</desc>
<ping_args>-c 5 -i 0.2</ping_args>
<ping_packetloss_threshold>0</ping_packetloss_threshold>
</testCase>
<testCase id="070000">
<class>Terminate_eNB</class>
<desc>Terminate eNB</desc>
<eNB_instance>0</eNB_instance>
<eNB_serverId>0</eNB_serverId>
</testCase>
<testCase id="070001">
<class>Terminate_eNB</class>
<desc>Terminate gNB</desc>
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</testCase>
</testCaseList>
......@@ -2377,6 +2377,7 @@ add_library(LFDS7
add_library(SIMU_COMMON
${OPENAIR1_DIR}/SIMULATION/TOOLS/random_channel.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/rangen_double.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/phase_noise.c
)
# Simulation library
......
......@@ -1276,7 +1276,10 @@
(Test2: MCS 16 50 PRBs),
(Test3: MCS 28 50 PRBs),
(Test4: MCS 9 217 PRBs),
(Test5: MCS 9 273 PRBs)</desc>
(Test5: MCS 9 273 PRBs),
(Test6: DMRS Type A, 3 DMRS, 4 PTRS, 5 Interpolated Symbols),
(Test7: DMRS Type B, 3 DMRS, 2 PTRS, 7 Interpolated Symbols),
(Test8: DMRS Type B, 3 DMRS, 2 PTRS, 3 Interpolated Symbols)</desc>
<pre_compile_prog></pre_compile_prog>
<compile_prog>$OPENAIR_DIR/cmake_targets/build_oai</compile_prog>
<compile_prog_args> --phy_simulators -c </compile_prog_args>
......@@ -1287,8 +1290,11 @@
-n100 -m16 -s10
-n100 -m28 -s20
-n100 -m9 -R217 -r217 -s5
-n100 -m9 -R273 -r273 -s5</main_exec_args>
<tags>nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5</tags>
-n100 -m9 -R273 -r273 -s5
-n100 -s5 -T 2 1 2 -U 2 0 2
-n100 -s5 -T 2 2 2 -U 2 1 2
-n100 -s5 -a4 -b8 -T 2 1 2 -U 2 1 3</main_exec_args>
<tags>nr_ulsim.test1 nr_ulsim.test2 nr_ulsim.test3 nr_ulsim.test4 nr_ulsim.test5 nr_ulsim.test6 nr_ulsim.test7 nr_ulsim.test8</tags>
<search_expr_true>PUSCH test OK</search_expr_true>
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
<nruns>3</nruns>
......
......@@ -211,7 +211,7 @@ function main() {
GDB=0
CMAKE_BUILD_TYPE="RelWithDebInfo"
echo_info "Will Compile with gdb symbols"
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=RelWithDebInfo"
CMAKE_CMD="$CMAKE_CMD -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=1"
shift
;;
"MinSizeRel")
......
#ifndef _TRACER_DEFS_H_
#define _TRACER_DEFS_H_
#ifndef _COMMON_UTILS_T_DEFS_H_
#define _COMMON_UTILS_T_DEFS_H_
/* types of plots */
#define PLOT_VS_TIME 0
......@@ -27,4 +27,4 @@ void *forwarder(char *ip, int port);
void forward(void *forwarder, char *buf, int size);
void forward_start_client(void *forwarder, int socket);
#endif /* _TRACER_DEFS_H_ */
#endif /* _COMMON_UTILS_T_DEFS_H_ */
#ifndef _TRACER_DEFS_H_
#define _TRACER_DEFS_H_
#ifndef _COMMON_UTILS_T_TRACER_DEFS_H_
#define _COMMON_UTILS_T_TRACER_DEFS_H_
/* types of plots */
#define PLOT_VS_TIME 0
......@@ -21,4 +21,4 @@ void t_gui_start(void);
void t_gui_set_input_signal(int eNB, int frame, int subframe, int antenna,
int size, void *buf);
#endif /* _TRACER_DEFS_H_ */
#endif /* _COMMON_UTILS_T_TRACER_DEFS_H_ */
......@@ -16,6 +16,7 @@ This page is valid on tags starting from **`2019.w09`**.
# Soft Modem Build Script
The OAI EPC is developed in a distinct project with it's own [documentation](https://github.com/OPENAIRINTERFACE/openair-epc-fed/wiki) , it is not described here.
OAI softmodem sources, which aim to implement 3GPP compliant UEs, eNodeB and gNodeB can be downloaded from the Eurecom [gitlab repository](./GET_SOURCES.md).
......
......@@ -33,12 +33,8 @@ holds the source code for (eNB RAN + UE RAN).
For legal issues (licenses), the core network (EPC) source code is now moved away from
the above openairinterface5g git repository.
* A very old version of the EPC is located under the same GitLab Eurecom server (splitted into 2 Git repos):
* [openair-cn](https://gitlab.eurecom.fr/oai/openair-cn.git) with apache license
* [xtables-addons-oai](https://gitlab.eurecom.fr/oai/xtables-addons-oai.git) with GPL license
* **These repositories are no more maintained.**
* A more recent version is available under our GitHub domain:
* [OAI GitHub openair-cn](https://github.com/OPENAIRINTERFACE/openair-cn)
* [OAI GitHub openair-cn domain](https://github.com/OPENAIRINTERFACE)
* Check its wiki pages for more details
Configure git with your name/email address (only important if you are developer and want to contribute/push code to Git Repository):
......@@ -80,8 +76,6 @@ you do not have account on gitlab.eurecom.fr, please register yourself to gitlab
* `git clone git@gitlab.eurecom.fr:oai/openairinterface5g.git`
* Clone with user name/password prompt:
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/openairinterface5g.git`
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/openair-cn.git`
* `git clone https://YOUR_USERNAME@gitlab.eurecom.fr/oai/xtables-addons-oai.git` (optional, openair-cn build script can do it for you)
# Which branch to checkout?
......
## Table of Contents ##
1. [Legacy 1 Bench](#legacy-1-bench)
2. [Legacy 2 Bench](#legacy-2-bench)
3. [Next Bench for DEV](#next-bench-for-dev)
4. [Next Bench for CI](#next-bench-for-ci)
5. [Indoor Live Network Bench](#indoor-live-network-bench)
6. [Outdoor Live Network Bench](#outdoor-live-network-bench)
## Legacy 1 Bench
**Purpose** : FDD Band 7 and Band 13, LTE-M
**Note** : Legacy1 and Legacy2 are duplicated so that they can run in parallel, thus avoiding a CI bottleneck
**Note** : Faraday Cages 1 and 2 are physically the same cage
![image info](./testbenches_doc_resources/legacy1.jpg)
## Legacy 2 Bench
**Purpose** : TDD Band 40, TM2 2xTX 2xRX
**Note** : CN can run in a container, could also run on Massive
![image info](./testbenches_doc_resources/legacy2.jpg)
## Next Bench for DEV
**Note** : Benetel CI can also run on this bench at night
![image info](./testbenches_doc_resources/next_dev.jpg)
## Next Bench for CI
**Note** : The current test running on Caracal could run on this bench with a N300/N300 setup
![image info](./testbenches_doc_resources/next_ci.jpg)
## Indoor Live Network Bench
![image info](./testbenches_doc_resources/indoor_live.jpg)
## Outdoor Live Network Bench
![image info](./testbenches_doc_resources/outdoor_live.jpg)
STATUS 2020/07/30 : under continuous improvement ; updated the configuration files links with CI approved reference files
STATUS 2020/09/10 : updated the status of interop (end to end UL/DL traffic)
## Table of Contents ##
......@@ -12,6 +12,7 @@ STATUS 2020/07/30 : under continuous improvement ; updated the configuration fil
7. [Log file monitoring](#log-file-monitoring)
6. [Required tools for debug](#required-tools-for-debug)
7. [Status of interoperability](#status-of-interoperability)
8. [CI integration](#ci-integration)
## Configuration Overview
......@@ -70,7 +71,7 @@ cd cmake_targets/
- **EPC**
for reference:
https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master-documentation/docs/DEPLOY_HOME.md
https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master/docs/DEPLOY_HOME.md
......@@ -204,7 +205,7 @@ The test takes typically a few seconds, max 10-15 seconds. If it takes more than
- **EPC** (on EPC host):
for reference:
https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master-documentation/docs/DEPLOY_HOME.md
https://github.com/OPENAIRINTERFACE/openair-epc-fed/blob/master/docs/DEPLOY_HOME.md
......@@ -220,17 +221,16 @@ Execute:
- **gNB** (on the gNB host)
**ATTENTION** : for the gNB execution,
The **-E** option is required to enable the tri-quarter sampling rate when using a B2xx serie USRP
The **-E** option is **NOT supported** when using a a N300 USRP
Execute:
```
~/openairinterface5g/cmake_targets/ran_build/build$ sudo ./nr-softmodem -O **YOUR_GNB_CONF_FILE** -E | tee **YOUR_LOG_FILE**
```
**ATTENTION** : for the gNB execution,
The -E option is required to enable the tri-quarter sampling rate when using a B2xx serie USRP
The -E opton is not needed when using a a N300 USRP
## Test Case
......@@ -377,13 +377,24 @@ The following parts have been validated with FR1 COTS UE:
PDCCH DCI format 1_1 and correponding PDSCH are decoded correctlyby the phone
ACK/NACK (PUCCH format 0) are successfully received at gNB
- On going:
validation of HARQ procedures
Integration with higher layers to replace dummy data with real traffic
- **End-to end UL / DL traffic with HARQ procedures validated (ping, iperf)**
- Known limitations as of May 2020:
only dummy DL traffic
no UL traffic
no end-to-end traffic possible
- Known limitations as of September 2020:
DL traffic : 3Mbps
UL traffic : 1Mbps
some packet losses might still occur even in ideal channel conditions
## CI integration
The automation scripts are available on ILIADE.
The end-to-end test is integrated in the CI flow in a semi-automated manner, comprising 3 steps:
- update a YAML file comprising the IT resources definition, branch and commit number the test has to run on
- run the python script that generates the test from the YAML file
```
python3 obj_build_from_yaml.py py_params_template.yaml fr1.sh
```
- run the test (fr1.sh)
At the date of writing, the test comprises the deployment of the components (epc, eNB, gNB, cots ue) and the execution of 2 pings procedures (20 pings in 20sec, then 5 pings in 1sec)
This automation is run for every integration branch to be merged into develop.
#/*
# * 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 eNB service
# Valid for RHEL7 in the OpenShift context (v4.4)
#
#---------------------------------------------------------------------
ARG REGISTRY=localhost
FROM $REGISTRY/oai-build-base:latest.el7 AS builder
ARG GIT_TAG=v1.1.1
WORKDIR /root
RUN if [ "$EURECOM_PROXY" == true ]; then git config --global http.proxy http://:@proxy.eurecom.fr:8080; fi
RUN git clone --depth=1 --branch=$GIT_TAG https://gitlab.eurecom.fr/oai/openairinterface5g.git
COPY patches patches/
RUN patch -p1 -d openairinterface5g < patches/disable_building_nasmesh_and_rbtool.patch \
&& patch -p1 -d openairinterface5g < patches/disable_sched_fifo_fail_exits.patch
RUN cd openairinterface5g/cmake_targets \
&& ln -sf /usr/local/bin/asn1c_oai /usr/local/bin/asn1c \
&& ln -sf /usr/local/share/asn1c_oai /usr/local/share/asn1c \
&& ./build_oai -c --eNB -w USRP --verbose-compile
FROM registry.redhat.io/ubi7/ubi
LABEL name="oai-enb" \
version="$GIT_TAG" \
maintainer="Frank A. Zdarsky <fzdarsky@redhat.com>" \
io.k8s.description="openairinterface5g eNB $GIT_TAG." \
io.openshift.tags="oai,enb" \
io.openshift.non-scalable="true"
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
&& REPOLIST="rhel-7-server-optional-rpms" \
&& PKGLIST="boost libconfig lksctp-tools protobuf-c iproute iputils procps-ng bind-utils xforms nettle libyaml libusb" \
# && yum -y upgrade-minimal --setopt=tsflags=nodocs --security --sec-severity=Critical --sec-severity=Important && \
&& yum -y install --enablerepo ${REPOLIST} --setopt=tsflag=nodocs ${PKGLIST} \
&& yum -y clean all \
&& rm -rf /var/cache/yum
ENV APP_ROOT=/opt/oai-enb
ENV PATH=${APP_ROOT}:${PATH} HOME=${APP_ROOT}
COPY --from=builder /root/openairinterface5g/cmake_targets/lte_build_oai/build/lte-softmodem ${APP_ROOT}/bin/
COPY --from=builder /root/openairinterface5g/cmake_targets/lte_build_oai/build/*.so* /lib64
COPY --from=builder /usr/local/lib64 /lib64
COPY --from=builder /usr/local/bin/uhd_* /usr/local/bin
COPY --from=builder /usr/local/share/uhd /usr/local/share/uhd
RUN cd /lib64 \
&& ln -sf liboai_eth_transpro.so liboai_transpro.so \
&& ln -sf liboai_usrpdevif.so liboai_device.so \
&& ln -sf libuhd.so.3.13 libuhd.so.3 \
&& ln -sf libuhd.so.3 libuhd.so
COPY scripts ${APP_ROOT}/bin/
COPY configs ${APP_ROOT}/etc/
RUN chmod -R u+x ${APP_ROOT} && \
chgrp -R 0 ${APP_ROOT} && \
chmod -R g=u ${APP_ROOT} /etc/passwd
USER 10001
WORKDIR ${APP_ROOT}
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"]
......@@ -21,8 +21,8 @@
/* Header file generated by fdesign on Thu Aug 28 12:13:51 2014 */
#ifndef FD_stats_form_h_
#define FD_stats_form_h_
#ifndef _EXECUTABLES_STATS_H_
#define _EXECUTABLES_STATS_H_
#include <forms.h>
......@@ -43,4 +43,4 @@ typedef struct {
extern FD_stats_form *create_form_stats_form( void );
#endif /* FD_stats_form_h_ */
#endif /* _EXECUTABLES_STATS_H_ */
#ifndef _THREADS_T_H_
#define _THREADS_T_H_
#ifndef _EXECUTABLES_THREADS_T_H_
#define _EXECUTABLES_THREADS_T_H_
typedef struct threads_s {
int main;
......@@ -18,4 +18,4 @@ typedef struct threads_s {
//int dlsch_td1_three;
} threads_t;
#endif /* _THREADS_T_H_ */
#endif /* _EXECUTABLES_THREADS_T_H_ */
......@@ -251,10 +251,11 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
pusch_vars[ULSCH_id]->ul_ch_estimates_ext = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates_ext = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ptrs_phase_per_slot = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ul_ch_estimates_time = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->rxdataF_comp = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ul_ch_mag0 = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ul_ch_magb0 = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ul_ch_mag0 = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ul_ch_magb0 = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ul_ch_mag = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->ul_ch_magb = (int32_t **)malloc16(Prx*sizeof(int32_t *) );
pusch_vars[ULSCH_id]->rho = (int32_t **)malloc16_clear(Prx*sizeof(int32_t*) );
......@@ -268,16 +269,18 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
pusch_vars[ULSCH_id]->ul_ch_estimates_time[i] = (int32_t *)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size );
pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2*fp->symbols_per_slot ); // max intensity in freq is 1 sc every 2 RBs
pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2*fp->symbols_per_slot );
pusch_vars[ULSCH_id]->ptrs_phase_per_slot[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->symbols_per_slot); // symbols per slot
pusch_vars[ULSCH_id]->rxdataF_comp[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*N_RB_UL*12*fp->symbols_per_slot );
pusch_vars[ULSCH_id]->ul_ch_mag0[i] = (int32_t *)malloc16_clear( fp->symbols_per_slot*sizeof(int32_t)*N_RB_UL*12 );
pusch_vars[ULSCH_id]->ul_ch_magb0[i] = (int32_t *)malloc16_clear( fp->symbols_per_slot*sizeof(int32_t)*N_RB_UL*12 );
pusch_vars[ULSCH_id]->ul_ch_mag0[i] = (int32_t *)malloc16_clear( fp->symbols_per_slot*sizeof(int32_t)*N_RB_UL*12 );
pusch_vars[ULSCH_id]->ul_ch_magb0[i] = (int32_t *)malloc16_clear( fp->symbols_per_slot*sizeof(int32_t)*N_RB_UL*12 );
pusch_vars[ULSCH_id]->ul_ch_mag[i] = (int32_t *)malloc16_clear( fp->symbols_per_slot*sizeof(int32_t)*N_RB_UL*12 );
pusch_vars[ULSCH_id]->ul_ch_magb[i] = (int32_t *)malloc16_clear( fp->symbols_per_slot*sizeof(int32_t)*N_RB_UL*12 );
pusch_vars[ULSCH_id]->rho[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(fp->N_RB_UL*12*7*2) );
}
printf("ULSCH_id %d (before llr alloc) : %p\n",ULSCH_id,gNB->dlsch[0][0]->harq_processes[0]);
pusch_vars[ULSCH_id]->llr = (int16_t *)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) ); // [hna] 6144 is LTE and (8*((3*8*6144)+12)) is not clear
printf("ULSCH_id %d (after llr alloc) : %p\n",ULSCH_id,gNB->dlsch[0][0]->harq_processes[0]);
printf("ULSCH_id %d (after llr alloc) : %p\n",ULSCH_id,gNB->dlsch[0][0]->harq_processes[0]);
pusch_vars[ULSCH_id]->ul_valid_re_per_slot = (int16_t *)malloc16_clear( sizeof(int16_t)*fp->symbols_per_slot);
} //ulsch_id
/*
for (ulsch_id=0; ulsch_id<NUMBER_OF_UE_MAX; ulsch_id++)
......@@ -338,6 +341,7 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_estimates_time[i]);
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates[i]);
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates_ext[i]);
free_and_zero(pusch_vars[ULSCH_id]->ptrs_phase_per_slot[i]);
free_and_zero(pusch_vars[ULSCH_id]->rxdataF_comp[i]);
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_mag0[i]);
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_magb0[i]);
......@@ -353,6 +357,8 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates);
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_ptrs_estimates_ext);
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_estimates_time);
free_and_zero(pusch_vars[ULSCH_id]->ptrs_phase_per_slot);
free_and_zero(pusch_vars[ULSCH_id]->ul_valid_re_per_slot);
free_and_zero(pusch_vars[ULSCH_id]->rxdataF_comp);
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_mag0);
free_and_zero(pusch_vars[ULSCH_id]->ul_ch_magb0);
......
......@@ -51,4 +51,30 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB);
int nr_est_timing_advance_pusch(PHY_VARS_gNB* phy_vars_gNB, int UE_id);
void nr_pusch_ptrs_processing(PHY_VARS_gNB *gNB,
nfapi_nr_pusch_pdu_t *rel15_ul,
uint8_t ulsch_id,
uint8_t nr_tti_rx,
uint8_t dmrs_symbol_flag,
unsigned char symbol,
uint32_t nb_re_pusch);
void nr_pusch_phase_estimation(NR_DL_FRAME_PARMS *frame_parms,
nfapi_nr_pusch_pdu_t *rel15_ul,
int16_t *ptrs_ch_p,
unsigned char Ns,
unsigned char symbol,
int16_t *rxF_comp,
uint32_t ***ptrs_gold_seq,
int16_t *error_est,
uint16_t *ptrs_sc);
void nr_pusch_phase_interpolation(int16_t *error_est,
uint8_t start_symbol,
uint8_t end_symbol);
int nr_ptrs_find_next_estimate(int16_t *error_est,
uint8_t counter,
uint8_t end_symbol);
#endif
......@@ -362,4 +362,25 @@ void generate_dmrs_pbch(uint32_t dmrs_pbch_bitmap[DMRS_PBCH_I_SSB][DMRS_PBCH_N_H
free(dmrs_sequence);
#endif
}
/* return the position of next dmrs symbol in a slot */
int get_next_dmrs_symbol_in_slot(uint16_t ul_dmrs_symb_pos, uint8_t counter, uint8_t end_symbol)
{
for(uint8_t symbol = counter; symbol < end_symbol; symbol++)
if((ul_dmrs_symb_pos >>symbol)&0x01 )
{
return symbol;
}
return 0;
}
/* return the total number of dmrs symbol in a slot */
uint8_t get_dmrs_symbols_in_slot(uint16_t l_prime_mask, uint16_t nb_symb)
{
uint8_t tmp = 0;
for (int i = 0; i < nb_symb; i++)
{
tmp += (l_prime_mask >> i) & 0x01;
}
return tmp;
}
......@@ -223,3 +223,27 @@ int nr_pbch_dmrs_rx(int symbol,
return(0);
}
/*!
\brief This function generate gold ptrs sequence for each OFDM symbol
\param *in gold sequence for ptrs per OFDM symbol
\param length is number of RE in a OFDM symbol
\param *output pointer to all ptrs RE in a OFDM symbol
*/
void nr_gen_ref_conj_symbols(uint32_t *in, uint32_t length, int16_t *output, uint16_t offset, int mod_order)
{
uint8_t idx, b_idx;
for (int i=0; i<length/mod_order; i++)
{
idx = 0;
for (int j=0; j<mod_order; j++)
{
b_idx = (i*mod_order+j)&0x1f;
if (i && (!b_idx))
in++;
idx ^= (((*in)>>b_idx)&1)<<(mod_order-j-1);
}
output[i<<1] = nr_rx_mod_table[(offset+idx)<<1];
output[(i<<1)+1] = nr_rx_mod_table[((offset+idx)<<1)+1];
}
}
......@@ -52,6 +52,9 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
uint8_t dmrs_type);
void init_scrambling_luts(void);
void nr_gen_ref_conj_symbols(uint32_t *in, uint32_t length, int16_t *output, uint16_t offset, int mod_order);
uint8_t get_next_dmrs_symbol_in_slot(uint16_t ul_dmrs_symb_pos, uint8_t counter, uint8_t end_symbol);
uint8_t get_dmrs_symbols_in_slot(uint16_t l_prime_mask, uint16_t nb_symb);
void nr_generate_modulation_table(void);
......
......@@ -157,7 +157,6 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
NR_gNB_PUSCH *pusch_vars,
unsigned char symbol,
uint8_t is_dmrs_symbol,
uint8_t is_ptrs_symbol,
nfapi_nr_pusch_pdu_t *pusch_pdu,
NR_DL_FRAME_PARMS *frame_parms);
......
......@@ -67,7 +67,7 @@ int nr_find_pucch(uint16_t rnti,
AssertFatal(gNB!=NULL,"gNB is null\n");
int index = -1;
for (int i=0; i<NUMBER_OF_NR_ULSCH_MAX; i++) {
for (int i=0; i<NUMBER_OF_NR_PUCCH_MAX; i++) {
AssertFatal(gNB->pucch[i]!=NULL,"gNB->pucch[%d] is null\n",i);
if ((gNB->pucch[i]->active >0) &&
(gNB->pucch[i]->pucch_pdu.rnti==rnti) &&
......
......@@ -226,12 +226,12 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
/////////////////////////PTRS parameters' initialization/////////////////////////
///////////
int16_t mod_ptrs[(nb_rb/2)*(NR_SYMBOLS_PER_SLOT-1)*2]; // assume maximum number of PTRS per pusch allocation
int16_t mod_ptrs[nb_rb] __attribute((aligned(16))); // assume maximum number of PTRS per pusch allocation
K_ptrs = 0; // just to avoid a warning
if (harq_process_ul_ue->pusch_pdu.pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) {
K_ptrs = (harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_freq_density)?4:2;
K_ptrs = harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_freq_density;
L_ptrs = 1<<harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_time_density;
beta_ptrs = 1; // temp value until power control is implemented
......@@ -322,7 +322,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
uint16_t m=0, n=0, dmrs_idx=0, ptrs_idx = 0;
for (l=start_symbol; l<start_symbol+number_of_symbols; l++) {
ptrs_idx = 0; // every PTRS symbol has a new gold sequence
k = start_sc;
n = 0;
dmrs_idx = 0;
......
......@@ -397,8 +397,6 @@ typedef struct {
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index (definition from phy_init_lte_eNB()): ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t **rxdataF_ext2;
/// \brief Offset for calculating the index of rxdataF_ext for the current symbol
uint32_t rxdataF_ext_offset;
/// \brief Hold the channel estimates in time domain based on DRS.
/// - first index: rx antenna id [0..nb_antennas_rx[
/// - second index: ? [0..4*ofdm_symbol_size[
......@@ -466,6 +464,13 @@ typedef struct {
uint16_t ptrs_symbols;
// PTRS subcarriers per OFDM symbol
uint16_t ptrs_sc_per_ofdm_symbol;
/// \brief Estimated phase error based upon PTRS on each symbol .
/// - first index: ? [0..7] Number of Antenna
/// - second index: ? [0...14] smybol per slot
int32_t **ptrs_phase_per_slot;
/// \brief Total RE count after DMRS/PTRS RE's are extracted from respective symbol.
/// - first index: ? [0...14] smybol per slot
int16_t *ul_valid_re_per_slot;
/// flag to verify if channel level computation is done
uint8_t cl_done;
} NR_gNB_PUSCH;
......@@ -807,10 +812,12 @@ typedef struct PHY_VARS_gNB_s {
time_stats_t ulsch_deinterleaving_stats;
time_stats_t ulsch_unscrambling_stats;
time_stats_t ulsch_channel_estimation_stats;
time_stats_t ulsch_ptrs_processing_stats;
time_stats_t ulsch_channel_compensation_stats;
time_stats_t ulsch_rbs_extraction_stats;
time_stats_t ulsch_mrc_stats;
time_stats_t ulsch_llr_stats;
/*
time_stats_t rx_dft_stats;
time_stats_t ulsch_freq_offset_estimation_stats;
......
This diff is collapsed.
/*
* 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
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include "sim.h"
/* linear phase noise model */
void phase_noise(double ts, int16_t * InRe, int16_t * InIm)
{
double fd = 300;//0.01*30000
static double i=0;
double real, imag,x ,y;
i++;
real = cos(fd * 2 * M_PI * i * ts);
imag = sin (fd * 2 * M_PI * i * ts);
x = ((real * (double)InRe[0]) - (imag * (double)InIm[0])) ;
y= ((real * (double)InIm[0]) + (imag * (double)InRe[0])) ;
InRe[0]= (int16_t)(x);
InIm[0]= (int16_t)(y);
}
......@@ -460,6 +460,14 @@ void init_channelmod(void) ;
double N_RB2sampling_rate(uint16_t N_RB);
double N_RB2channel_bandwidth(uint16_t N_RB);
/* Linear phase noise model */
/*!
\brief This function produce phase noise and add to input signal
\param ts Sampling time
\param *Re *Im Real and Imag part of the signal
*/
void phase_noise(double ts, int16_t * InRe, int16_t * InIm);
#include "targets/RT/USER/rfsim.h"
void do_DL_sig(sim_t *sim,
......
......@@ -1940,9 +1940,9 @@ uint8_t get_K_ptrs(uint16_t nrb0, uint16_t nrb1, uint16_t N_RB) {
LOG_I(PHY,"PUSH PT-RS is not present.\n");
return -1;
} else if (N_RB >= nrb0 && N_RB < nrb1)
return 0;
return 2;
else
return 1;
return 4;
}
uint16_t nr_dci_size(NR_ServingCellConfigCommon_t *scc,
......
......@@ -442,6 +442,11 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
pdcp_run(&ctxt);
//rrc_rx_tx(&ctxt, CC_id);
/* send tick to RLC every ms */
if ((slot & ((1 << *scc->ssbSubcarrierSpacing) - 1)) == 0) {
void nr_rlc_tick(int frame, int subframe);
nr_rlc_tick(frame, slot >> *scc->ssbSubcarrierSpacing);
}
dlsch_in_slot_bitmap = &RC.nrmac[module_idP]->UE_list.UE_sched_ctrl[UE_id].dlsch_in_slot_bitmap; // static bitmap signaling which slot in a tdd period contains dlsch
ulsch_in_slot_bitmap = &RC.nrmac[module_idP]->UE_list.UE_sched_ctrl[UE_id].ulsch_in_slot_bitmap; // static bitmap signaling which slot in a tdd period contains ulsch
......
......@@ -158,14 +158,6 @@ mac_rlc_status_resp_t mac_rlc_status_ind(
mac_rlc_status_resp_t ret;
nr_rlc_entity_t *rb;
/* TODO: handle time a bit more properly */
if (nr_rlc_current_time_last_frame != frameP ||
nr_rlc_current_time_last_subframe != subframeP) {
nr_rlc_current_time++;
nr_rlc_current_time_last_frame = frameP;
nr_rlc_current_time_last_subframe = subframeP;
}
nr_rlc_manager_lock(nr_rlc_ue_manager);
ue = nr_rlc_manager_get_ue(nr_rlc_ue_manager, rntiP);
......@@ -921,3 +913,10 @@ rlc_op_status_t rrc_rlc_remove_ue (const protocol_ctxt_t* const x)
return RLC_OP_STATUS_OK;
}
void nr_rlc_tick(int frame, int subframe)
{
if (frame != nr_rlc_current_time_last_frame ||
subframe != nr_rlc_current_time_last_subframe)
nr_rlc_current_time++;
}
#ifndef _LOG_H_
#define _LOG_H_
#ifndef _NR_RLC_TESTS_LOG_H_
#define _NR_RLC_TESTS_LOG_H_
#include <stdio.h>
......@@ -7,4 +7,4 @@
#define LOG_D(x, ...) printf(__VA_ARGS__)
#define LOG_W(x, ...) printf(__VA_ARGS__)
#endif /* _LOG_H_ */
#endif /* _NR_RLC_TESTS_LOG_H_ */
#ifndef _LOG_H_
#define _LOG_H_
#ifndef _RLC_V2_TESTS_LOG_H_
#define _RLC_V2_TESTS_LOG_H_
#include <stdio.h>
......@@ -7,4 +7,4 @@
#define LOG_D(x, ...) printf(__VA_ARGS__)
#define LOG_W(x, ...) printf(__VA_ARGS__)
#endif /* _LOG_H_ */
#endif /* _RLC_V2_TESTS_LOG_H_ */
This diff is collapsed.
......@@ -16,13 +16,13 @@
#include "NwEvt.h"
#include "NwLog.h"
#ifndef __NW_MINI_LOG_MGR_H__
#define __NW_MINI_LOG_MGR_H__
#ifndef NW_ASSERT
#define NW_ASSERT assert
#endif
#ifndef __NW_MINI_LOG_MGR_H__
#define __NW_MINI_LOG_MGR_H__
extern uint32_t g_log_level;
......
......@@ -17,13 +17,13 @@
#include "NwEvt.h"
#include "NwLog.h"
#ifndef __NW_MINI_TMR_MGR_H__
#define __NW_MINI_TMR_MGR_H__
#ifndef NW_ASSERT
#define NW_ASSERT assert
#endif
#ifndef __NW_MINI_TMR_MGR_H__
#define __NW_MINI_TMR_MGR_H__
typedef struct {
NwEventT ev;
void* timeoutArg;
......
......@@ -17,13 +17,13 @@
#include "NwEvt.h"
#include "NwLog.h"
#ifndef __NW_MINI_UDP_ENTITY_H__
#define __NW_MINI_UDP_ENTITY_H__
#ifndef NW_ASSERT
#define NW_ASSERT assert
#endif
#ifndef __NW_MINI_UDP_ENTITY_H__
#define __NW_MINI_UDP_ENTITY_H__
typedef struct {
uint32_t hSocket;
NwEventT ev;
......
#ifndef _THREADS_T_H_
#define _THREADS_T_H_
#ifndef _TARGETS_COMMON_THREADS_T_H_
#define _TARGETS_COMMON_THREADS_T_H_
typedef struct threads_s {
int main;
......@@ -18,4 +18,4 @@ typedef struct threads_s {
//int dlsch_td1_three;
} threads_t;
#endif /* _THREADS_T_H_ */
#endif /* _TARGETS_COMMON_THREADS_T_H_ */
......@@ -21,8 +21,8 @@
/* Header file generated by fdesign on Thu Aug 28 12:13:51 2014 */
#ifndef FD_stats_form_h_
#define FD_stats_form_h_
#ifndef _TARGETS_RT_USER_STATS_H_
#define _TARGETS_RT_USER_STATS_H_
#include <forms.h>
......@@ -43,4 +43,4 @@ typedef struct {
extern FD_stats_form * create_form_stats_form( void );
#endif /* FD_stats_form_h_ */
#endif /* _TARGETS_RT_USER_STATS_H_ */
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