fix CUDA latency
This commit is contained in:
parent
579cfad82d
commit
0e5d4fe268
+4
-5
@@ -2,13 +2,12 @@
|
||||
|
||||
We want to make contributing to this project as easy and transparent as possible.
|
||||
|
||||
Please refer to the steps described on our website: [How to contribute to OAI](https://www.openairinterface.org/?page_id=112)
|
||||
|
||||
1. Sign and return a Contributor License Agreement to OAI team.
|
||||
2. Create an account on [Eurecom GitLab Server](https://gitlab.eurecom.fr).
|
||||
3. Provide the identifiant of this account to the OAI team (mailto:contact@openairinterface.org) so you have developer rights on this repository.
|
||||
2. We recommend that you provide us with a professional or student email address
|
||||
2. Register on [Eurecom GitLab Server](https://gitlab.eurecom.fr/users/sign_in)
|
||||
3. Provide the OAI team with the **username** of this account to (mailto:contact@openairinterface.org) ; we will give you the developer rights on this repository.
|
||||
4. The policies are described in these wiki pages: [OAI Policies](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/oai-policies-home)
|
||||
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account. It just eats up space on our servers.
|
||||
- PLEASE DO NOT FORK the OAI repository on your own Eurecom GitLab account. It just eats up space on our servers.
|
||||
- You can fork onto another hosting system. But we will NOT accept a merge request from a forked repository.
|
||||
* This decision was made for the license reasons.
|
||||
* The Continuous Integration will reject your merge request.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
r*.raw
|
||||
enb_*.log
|
||||
ue_*.log
|
||||
ping_*.*
|
||||
|
||||
@@ -110,7 +110,7 @@ MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-sta
|
||||
NB_WARNINGS_FILES=0
|
||||
|
||||
# Retrieve list of warnings
|
||||
LIST_WARNING_FILES=`egrep "error:|warning:" archives/*/*.Rel15.txt archives/*/basic_simulator_*txt | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
|
||||
LIST_WARNING_FILES=`egrep "error:|warning:" archives/*/*.Rel15.txt | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
|
||||
|
||||
echo ""
|
||||
echo "List of files that have been modified by the Merge Request AND"
|
||||
|
||||
@@ -57,6 +57,7 @@ OAI_UE_PROCESS_ASSERTION = -22
|
||||
OAI_UE_PROCESS_FAILED = -23
|
||||
OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = -24
|
||||
OAI_UE_PROCESS_SEG_FAULT = -25
|
||||
OAI_UE_PROCESS_NO_MBMS_MSGS = -26
|
||||
OAI_UE_PROCESS_OK = +6
|
||||
|
||||
UE_STATUS_DETACHED = 0
|
||||
|
||||
@@ -37,6 +37,7 @@ memleak:openair2/UTIL/OMG/omg_hashtable.c
|
||||
// _emm_as_encode function creates the encoded buffer
|
||||
//
|
||||
memleak:openair3/NAS/UE/EMM/SAP/emm_as.c
|
||||
memleak:openair1/PHY/INIT/nr_init_ue.c
|
||||
//-----------------------------------------------------------------------------
|
||||
//*****************************************************************************
|
||||
// section for files not used in oai exec's included in CI.
|
||||
|
||||
@@ -38,7 +38,6 @@ Last point, this documentation is valid for all CI-supported branches:
|
||||
|
||||
* `master`
|
||||
* `develop`
|
||||
* `develop-nr`
|
||||
|
||||
But the feature set may not be aligned. **The principles still apply.**
|
||||
|
||||
|
||||
+1
-1
@@ -326,7 +326,7 @@ class HTMLManagement():
|
||||
continue
|
||||
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <th colspan=8>' + str('eNB') + ' Server Characteristics</th>\n')
|
||||
self.htmlFile.write(' <th colspan=8>' + str(machine) + ' Server Characteristics</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td>OS Version</td>\n')
|
||||
|
||||
+56
-20
@@ -30,6 +30,7 @@
|
||||
|
||||
import constants as CONST
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
@@ -332,12 +333,6 @@ class OaiCiTest():
|
||||
logging.debug('Found a N3xx device --> resetting it')
|
||||
SSH.command('cd ' + self.UESourceCodePath, '\$', 5)
|
||||
# Initialize_OAI_UE_args usually start with -C and followed by the location in repository
|
||||
# in case of NR-UE, we may have rrc_config_path (Temporary?)
|
||||
modifiedUeOptions = str(self.Initialize_OAI_UE_args)
|
||||
if RAN.Getair_interface() == 'nr':
|
||||
result = re.search('--rrc_config_path ', modifiedUeOptions)
|
||||
if result is not None:
|
||||
modifiedUeOptions = modifiedUeOptions.replace('rrc_config_path ', 'rrc_config_path ' + self.UESourceCodePath + '/')
|
||||
SSH.command('source oaienv', '\$', 5)
|
||||
SSH.command('cd cmake_targets/ran_build/build', '\$', 5)
|
||||
if RAN.Getair_interface() == 'lte':
|
||||
@@ -352,7 +347,17 @@ class OaiCiTest():
|
||||
SSH.command('sed -e "s#93#92#" -e "s#8baf473f2f8fd09487cccbd7097c6862#fec86ba6eb707ed08905757b1bb44b8f#" -e "s#e734f8734007d6c5ce7a0508809e7e9c#C42449363BBAD02B66D16BC975D77CC1#" ../../../openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf > ../../../openair3/NAS/TOOLS/ci-ue_eurecom_test_sfr.conf', '\$', 5)
|
||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S rm -Rf .u*', '\$', 5)
|
||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S ../../../targets/bin/conf2uedata -c ../../../openair3/NAS/TOOLS/ci-ue_eurecom_test_sfr.conf -o .', '\$', 5)
|
||||
SSH.command('echo "ulimit -c unlimited && ./'+ RAN.Getair_interface() +'-uesoftmodem ' + modifiedUeOptions + '" > ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
|
||||
else:
|
||||
SSH.command('if [ -e rbconfig.raw ]; then echo ' + self.UEPassword + ' | sudo -S rm rbconfig.raw; fi', '\$', 5)
|
||||
SSH.command('if [ -e reconfig.raw ]; then echo ' + self.UEPassword + ' | sudo -S rm reconfig.raw; fi', '\$', 5)
|
||||
# Copy the RAW files from gNB running directory (maybe on another machine)
|
||||
copyin_res = SSH.copyin(RAN.GeteNBIPAddress(), RAN.GeteNBUserName(), RAN.GeteNBPassword(), RAN.GeteNBSourceCodePath() + '/cmake_targets/rbconfig.raw', '.')
|
||||
if (copyin_res == 0):
|
||||
SSH.copyout(self.UEIPAddress, self.UEUserName, self.UEPassword, './rbconfig.raw', self.UESourceCodePath + '/cmake_targets/ran_build/build')
|
||||
copyin_res = SSH.copyin(RAN.GeteNBIPAddress(), RAN.GeteNBUserName(), RAN.GeteNBPassword(), RAN.GeteNBSourceCodePath() + '/cmake_targets/reconfig.raw', '.')
|
||||
if (copyin_res == 0):
|
||||
SSH.copyout(self.UEIPAddress, self.UEUserName, self.UEPassword, './reconfig.raw', self.UESourceCodePath + '/cmake_targets/ran_build/build')
|
||||
SSH.command('echo "ulimit -c unlimited && ./'+ RAN.Getair_interface() +'-uesoftmodem ' + self.Initialize_OAI_UE_args + '" > ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
|
||||
SSH.command('chmod 775 ./my-lte-uesoftmodem-run' + str(self.UE_instance) + '.sh', '\$', 5)
|
||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S rm -Rf ' + self.UESourceCodePath + '/cmake_targets/ue_' + self.testCase_id + '.log', '\$', 5)
|
||||
self.UELogFile = 'ue_' + self.testCase_id + '.log'
|
||||
@@ -2432,6 +2437,7 @@ class OaiCiTest():
|
||||
nrCRCOK = 0
|
||||
mbms_messages = 0
|
||||
HTML.SethtmlUEFailureMsg('')
|
||||
global_status = CONST.ALL_PROCESSES_OK
|
||||
for line in ue_log_file.readlines():
|
||||
result = re.search('nr_synchro_time', str(line))
|
||||
if result is not None:
|
||||
@@ -2554,14 +2560,14 @@ class OaiCiTest():
|
||||
logging.debug('\033[94m' + mibMsg + '\033[0m')
|
||||
except Exception as e:
|
||||
logging.error('\033[91m' + "SIB5 InterFreqCarrierFreq element not found" + '\033[0m')
|
||||
result = re.search("DL Carrier Frequency/ARFCN : (?P<carrier_frequency>\d{1,15}/\d{1,4})", str(line))
|
||||
result = re.search("DL Carrier Frequency/ARFCN : \-*(?P<carrier_frequency>\d{1,15}/\d{1,4})", str(line))
|
||||
if result is not None:
|
||||
try:
|
||||
freq = result.group('carrier_frequency')
|
||||
new_freq = re.sub('/[0-9]+','',freq)
|
||||
float_freq = float(new_freq) / 1000000
|
||||
HTMLSethtmlUEFailureMsg(HTMLGethtmlUEFailureMsg() + 'DL Freq: ' + ('%.1f' % float_freq) + ' MHz')
|
||||
logging.debug('\033[94m' + " DL Carrier Frequency is: " + freq + '\033[0m')
|
||||
HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + 'DL Freq: ' + ('%.1f' % float_freq) + ' MHz')
|
||||
logging.debug('\033[94m' + " DL Carrier Frequency is: " + str(freq) + '\033[0m')
|
||||
except Exception as e:
|
||||
logging.error('\033[91m' + " DL Carrier Frequency not found" + '\033[0m')
|
||||
result = re.search("AllowedMeasBandwidth : (?P<allowed_bandwidth>\d{1,7})", str(line))
|
||||
@@ -2625,36 +2631,36 @@ class OaiCiTest():
|
||||
else:
|
||||
statMsg = 'UE did NOT SHOW "TRIED TO PUSH MBMS DATA" message(s)'
|
||||
logging.debug('\u001B[1;30;41m ' + statMsg + ' \u001B[0m')
|
||||
global_status = OAI_UE_PROCESS_NO_MBMS_MSGS
|
||||
HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + statMsg + '\n')
|
||||
if foundSegFault:
|
||||
logging.debug('\u001B[1;37;41m UE ended with a Segmentation Fault! \u001B[0m')
|
||||
if not nrUEFlag:
|
||||
return CONST.OAI_UE_PROCESS_SEG_FAULT
|
||||
global_status = CONST.OAI_UE_PROCESS_SEG_FAULT
|
||||
else:
|
||||
if not frequency_found:
|
||||
return CONST.OAI_UE_PROCESS_SEG_FAULT
|
||||
global_status = CONST.OAI_UE_PROCESS_SEG_FAULT
|
||||
if foundAssertion:
|
||||
logging.debug('\u001B[1;30;43m UE showed an assertion! \u001B[0m')
|
||||
HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + 'UE showed an assertion!\n')
|
||||
if not nrUEFlag:
|
||||
if not mib_found or not frequency_found:
|
||||
return CONST.OAI_UE_PROCESS_ASSERTION
|
||||
global_status = CONST.OAI_UE_PROCESS_ASSERTION
|
||||
else:
|
||||
if not frequency_found:
|
||||
return CONST.OAI_UE_PROCESS_ASSERTION
|
||||
global_status = CONST.OAI_UE_PROCESS_ASSERTION
|
||||
if foundRealTimeIssue:
|
||||
logging.debug('\u001B[1;37;41m UE faced real time issues! \u001B[0m')
|
||||
HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + 'UE faced real time issues!\n')
|
||||
#return CONST.ENB_PROCESS_REALTIME_ISSUE
|
||||
if nrUEFlag:
|
||||
if not frequency_found:
|
||||
return CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
|
||||
global_status = CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
|
||||
else:
|
||||
if no_cell_sync_found and not mib_found:
|
||||
logging.debug('\u001B[1;37;41m UE could not synchronize ! \u001B[0m')
|
||||
HTML.SethtmlUEFailureMsg(HTML.GethtmlUEFailureMsg() + 'UE could not synchronize!\n')
|
||||
return CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
|
||||
return 0
|
||||
global_status = CONST.OAI_UE_PROCESS_COULD_NOT_SYNC
|
||||
return global_status
|
||||
|
||||
|
||||
def TerminateFlexranCtrl(self):
|
||||
@@ -3061,7 +3067,7 @@ class OaiCiTest():
|
||||
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
|
||||
|
||||
def CheckClassValidity(action,id):
|
||||
if action != 'Build_eNB' and action != 'WaitEndBuild_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Build_OAI_UE' and action != 'Initialize_OAI_UE' and action != 'Terminate_OAI_UE' and action != 'DataDisable_UE' and action != 'DataEnable_UE' and action != 'CheckStatusUE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_FlexranCtrl' and action != 'Terminate_FlexranCtrl' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep' and action != 'Perform_X2_Handover':
|
||||
if action!='Build_PhySim' and action!='Run_PhySim' and action != 'Build_eNB' and action != 'WaitEndBuild_eNB' and action != 'Initialize_eNB' and action != 'Terminate_eNB' and action != 'Initialize_UE' and action != 'Terminate_UE' and action != 'Attach_UE' and action != 'Detach_UE' and action != 'Build_OAI_UE' and action != 'Initialize_OAI_UE' and action != 'Terminate_OAI_UE' and action != 'DataDisable_UE' and action != 'DataEnable_UE' and action != 'CheckStatusUE' and action != 'Ping' and action != 'Iperf' and action != 'Reboot_UE' and action != 'Initialize_FlexranCtrl' and action != 'Terminate_FlexranCtrl' and action != 'Initialize_HSS' and action != 'Terminate_HSS' and action != 'Initialize_MME' and action != 'Terminate_MME' and action != 'Initialize_SPGW' and action != 'Terminate_SPGW' and action != 'Initialize_CatM_module' and action != 'Terminate_CatM_module' and action != 'Attach_CatM_module' and action != 'Detach_CatM_module' and action != 'Ping_CatM_module' and action != 'IdleSleep' and action != 'Perform_X2_Handover':
|
||||
logging.debug('ERROR: test-case ' + id + ' has wrong class ' + action)
|
||||
return False
|
||||
return True
|
||||
@@ -3208,6 +3214,19 @@ def GetParametersFromXML(action):
|
||||
else:
|
||||
CiTestObj.x2_ho_options = string_field
|
||||
|
||||
if action == 'Build_PhySim':
|
||||
ldpc.buildargs = test.findtext('physim_build_args')
|
||||
forced_workspace_cleanup = test.findtext('forced_workspace_cleanup')
|
||||
if (forced_workspace_cleanup is None):
|
||||
ldpc.forced_workspace_cleanup=False
|
||||
else:
|
||||
if re.match('true', forced_workspace_cleanup, re.IGNORECASE):
|
||||
ldpc.forced_workspace_cleanup=True
|
||||
else:
|
||||
ldpc.forced_workspace_cleanup=False
|
||||
|
||||
if action == 'Run_PhySim':
|
||||
ldpc.runargs = test.findtext('physim_run_args')
|
||||
|
||||
#check if given test is in list
|
||||
#it is in list if one of the strings in 'list' is at the beginning of 'test'
|
||||
@@ -3243,6 +3262,9 @@ EPC.SetHtmlObj(HTML)
|
||||
RAN.SetHtmlObj(HTML)
|
||||
RAN.SetEpcObj(EPC)
|
||||
|
||||
import cls_physim #class PhySim for physical simulators build and test
|
||||
ldpc=cls_physim.PhySim() #create an instance for LDPC test using GPU or CPU build
|
||||
|
||||
argvs = sys.argv
|
||||
argc = len(argvs)
|
||||
cwd = os.getcwd()
|
||||
@@ -3264,12 +3286,14 @@ while len(argvs) > 1:
|
||||
CiTestObj.ranRepository = matchReg.group(1)
|
||||
RAN.SetranRepository(matchReg.group(1))
|
||||
HTML.SetranRepository(matchReg.group(1))
|
||||
ldpc.ranRepository=matchReg.group(1)
|
||||
elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||
else:
|
||||
matchReg = re.match('^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||
doMerge = matchReg.group(1)
|
||||
ldpc.ranAllowMerge=matchReg.group(1)
|
||||
if ((doMerge == 'true') or (doMerge == 'True')):
|
||||
CiTestObj.ranAllowMerge = True
|
||||
RAN.SetranAllowMerge(True)
|
||||
@@ -3282,6 +3306,7 @@ while len(argvs) > 1:
|
||||
CiTestObj.ranBranch = matchReg.group(1)
|
||||
RAN.SetranBranch(matchReg.group(1))
|
||||
HTML.SetranBranch(matchReg.group(1))
|
||||
ldpc.ranBranch=matchReg.group(1)
|
||||
elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||
@@ -3290,6 +3315,7 @@ while len(argvs) > 1:
|
||||
CiTestObj.ranCommitID = matchReg.group(1)
|
||||
RAN.SetranCommitID(matchReg.group(1))
|
||||
HTML.SetranCommitID(matchReg.group(1))
|
||||
ldpc.ranCommitID=matchReg.group(1)
|
||||
elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||
@@ -3298,10 +3324,12 @@ while len(argvs) > 1:
|
||||
CiTestObj.ranTargetBranch = matchReg.group(1)
|
||||
RAN.SetranTargetBranch(matchReg.group(1))
|
||||
HTML.SetranTargetBranch(matchReg.group(1))
|
||||
ldpc.ranTargetBranch=matchReg.group(1)
|
||||
elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.SeteNBIPAddress(matchReg.group(1))
|
||||
ldpc.eNBIpAddr=matchReg.group(1)
|
||||
elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.SeteNB1IPAddress(matchReg.group(1))
|
||||
@@ -3312,6 +3340,7 @@ while len(argvs) > 1:
|
||||
if re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.SeteNBUserName(matchReg.group(1))
|
||||
ldpc.eNBUserName=matchReg.group(1)
|
||||
elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.SeteNB1UserName(matchReg.group(1))
|
||||
@@ -3322,6 +3351,7 @@ while len(argvs) > 1:
|
||||
if re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.SeteNBPassword(matchReg.group(1))
|
||||
ldpc.eNBPassWord=matchReg.group(1)
|
||||
elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.SeteNB1Password(matchReg.group(1))
|
||||
@@ -3332,6 +3362,7 @@ while len(argvs) > 1:
|
||||
if re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.SeteNBSourceCodePath(matchReg.group(1))
|
||||
ldpc.eNBSourceCodePath=matchReg.group(1)
|
||||
elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||
RAN.SeteNB1SourceCodePath(matchReg.group(1))
|
||||
@@ -3499,7 +3530,7 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
|
||||
foundCount += 1
|
||||
count += 1
|
||||
if foundCount != HTML.GetnbTestXMLfiles():
|
||||
HTML.SetnbTestXMLfiles(foundcount)
|
||||
HTML.SetnbTestXMLfiles(foundCount)
|
||||
|
||||
if (CiTestObj.ADBIPAddress != 'none'):
|
||||
terminate_ue_flag = False
|
||||
@@ -3702,6 +3733,11 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
CiTestObj.IdleSleep()
|
||||
elif action == 'Perform_X2_Handover':
|
||||
CiTestObj.Perform_X2_Handover()
|
||||
elif action == 'Build_PhySim':
|
||||
HTML=ldpc.Build_PhySim(HTML,CONST)
|
||||
if ldpc.exitStatus==1:sys.exit()
|
||||
elif action == 'Run_PhySim':
|
||||
HTML=ldpc.Run_PhySim(HTML,CONST,id)
|
||||
else:
|
||||
sys.exit('Invalid action')
|
||||
CiTestObj.FailReportCnt += 1
|
||||
|
||||
@@ -186,7 +186,7 @@ function variant__v3__phy_sim {
|
||||
BUILD_OPTIONS="--phy_simulators"
|
||||
VM_MEMORY=8192
|
||||
VM_DISK=20
|
||||
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510* 015111\" -q -np -b"
|
||||
RUN_OPTIONS="./run_exec_autotests.bash -g \"01510* 015111 015112\" -q -np -b"
|
||||
}
|
||||
|
||||
function variant__v4__cppcheck {
|
||||
@@ -197,7 +197,7 @@ function variant__v4__cppcheck {
|
||||
}
|
||||
|
||||
function variant__v5__gnb_usrp {
|
||||
VM_MEMORY=8192
|
||||
VM_MEMORY=10240
|
||||
VM_CPU=8
|
||||
NB_PATTERN_FILES=9
|
||||
BUILD_OPTIONS="--gNB -w USRP"
|
||||
|
||||
+41
-16
@@ -366,7 +366,7 @@ class RANManagement():
|
||||
count = 40
|
||||
buildOAIprocess = True
|
||||
while (count > 0) and buildOAIprocess:
|
||||
mySSH.command('ps aux | grep --color=never build_ | grep -v grep', '\$', 3)
|
||||
mySSH.command('ps aux | grep --color=never build_ | grep -v grep', '\$', 6)
|
||||
result = re.search('build_oai', mySSH.getBefore())
|
||||
if result is None:
|
||||
buildOAIprocess = False
|
||||
@@ -546,6 +546,9 @@ class RANManagement():
|
||||
# Launch eNB with the modified config file
|
||||
mySSH.command('source oaienv', '\$', 5)
|
||||
mySSH.command('cd cmake_targets', '\$', 5)
|
||||
if self.air_interface == 'nr':
|
||||
mySSH.command('if [ -e rbconfig.raw ]; then echo ' + lPassWord + ' | sudo -S rm rbconfig.raw; fi', '\$', 5)
|
||||
mySSH.command('if [ -e reconfig.raw ]; then echo ' + lPassWord + ' | sudo -S rm reconfig.raw; fi', '\$', 5)
|
||||
mySSH.command('echo "ulimit -c unlimited && ./ran_build/build/' + self.air_interface + '-softmodem -O ' + lSourcePath + '/' + ci_full_config_file + extra_options + '" > ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
||||
mySSH.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
|
||||
mySSH.command('echo ' + lPassWord + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5)
|
||||
@@ -607,7 +610,11 @@ class RANManagement():
|
||||
enbDidSync = True
|
||||
time.sleep(10)
|
||||
|
||||
if enbDidSync and eNBinNoS1:
|
||||
rruCheck = False
|
||||
result = re.search('^rru|^du.band', str(config_file))
|
||||
if result is not None:
|
||||
rruCheck = True
|
||||
if enbDidSync and eNBinNoS1 and not rruCheck:
|
||||
mySSH.command('ifconfig oaitun_enb1', '\$', 4)
|
||||
mySSH.command('ifconfig oaitun_enb1', '\$', 4)
|
||||
result = re.search('inet addr:1|inet 1', mySSH.getBefore())
|
||||
@@ -774,7 +781,7 @@ class RANManagement():
|
||||
mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5)
|
||||
mySSH.command('cd cmake_targets', '\$', 5)
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm -f enb.log.zip', '\$', 5)
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt', '\$', 60)
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S zip enb.log.zip enb*.log core* enb_*record.raw enb_*.pcap enb_*txt physim_*.log', '\$', 60)
|
||||
mySSH.command('echo ' + self.eNBPassword + ' | sudo -S rm enb*.log core* enb_*record.raw enb_*.pcap enb_*txt', '\$', 5)
|
||||
mySSH.close()
|
||||
|
||||
@@ -800,8 +807,11 @@ class RANManagement():
|
||||
uciStatMsgCount = 0
|
||||
pdcpFailure = 0
|
||||
ulschFailure = 0
|
||||
ulschAllocateCCEerror = 0
|
||||
uplinkSegmentsAborted = 0
|
||||
ulschReceiveOK = 0
|
||||
gnbRxTxWakeUpFailure = 0
|
||||
gnbTxWriteThreadEnabled = False
|
||||
cdrxActivationMessageCount = 0
|
||||
dropNotEnoughRBs = 0
|
||||
mbmsRequestMsg = 0
|
||||
@@ -812,6 +822,7 @@ class RANManagement():
|
||||
X2HO_state = CONST.X2_HO_REQ_STATE__IDLE
|
||||
X2HO_inNbProcedures = 0
|
||||
X2HO_outNbProcedures = 0
|
||||
global_status = CONST.ALL_PROCESSES_OK
|
||||
for line in enb_log_file.readlines():
|
||||
if X2HO_state == CONST.X2_HO_REQ_STATE__IDLE:
|
||||
result = re.search('target eNB Receives X2 HO Req X2AP_HANDOVER_REQ', str(line))
|
||||
@@ -914,9 +925,18 @@ class RANManagement():
|
||||
result = re.search('could not wakeup gNB rxtx process', str(line))
|
||||
if result is not None:
|
||||
gnbRxTxWakeUpFailure += 1
|
||||
result = re.search('tx write thread ready', str(line))
|
||||
if result is not None:
|
||||
gnbTxWriteThreadEnabled = True
|
||||
result = re.search('ULSCH in error in round|ULSCH 0 in error', str(line))
|
||||
if result is not None:
|
||||
ulschFailure += 1
|
||||
result = re.search('ERROR ALLOCATING CCEs', str(line))
|
||||
if result is not None:
|
||||
ulschAllocateCCEerror += 1
|
||||
result = re.search('uplink segment error.*aborted [1-9] segments', str(line))
|
||||
if result is not None:
|
||||
uplinkSegmentsAborted += 1
|
||||
result = re.search('ULSCH received ok', str(line))
|
||||
if result is not None:
|
||||
ulschReceiveOK += 1
|
||||
@@ -948,6 +968,10 @@ class RANManagement():
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(gnbRxTxWakeUpFailure) + ' "could not wakeup gNB rxtx process" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
htmleNBFailureMsg += statMsg + '\n'
|
||||
if gnbTxWriteThreadEnabled:
|
||||
statMsg = nodeB_prefix + 'NB ran with TX Write thread enabled'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
htmleNBFailureMsg += statMsg + '\n'
|
||||
if uciStatMsgCount > 0:
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
@@ -960,6 +984,14 @@ class RANManagement():
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(ulschFailure) + ' "ULSCH in error in round" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
htmleNBFailureMsg += statMsg + '\n'
|
||||
if ulschAllocateCCEerror > 0:
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(ulschAllocateCCEerror) + ' "eNB_dlsch_ulsch_scheduler(); ERROR ALLOCATING CCEs" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
htmleNBFailureMsg += statMsg + '\n'
|
||||
if uplinkSegmentsAborted > 0:
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(uplinkSegmentsAborted) + ' "uplink segment error 0/2, aborted * segments" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
htmleNBFailureMsg += statMsg + '\n'
|
||||
if dropNotEnoughRBs > 0:
|
||||
statMsg = 'eNB showed ' + str(dropNotEnoughRBs) + ' "dropping, not enough RBs" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
@@ -1030,30 +1062,23 @@ class RANManagement():
|
||||
rruMsg = 'Slave RRU DID NOT receive the RRU_frame_resynch command from RAU'
|
||||
logging.debug('\u001B[1;37;41m ' + rruMsg + ' \u001B[0m')
|
||||
htmleNBFailureMsg += rruMsg + '\n'
|
||||
self.prematureExit(True)
|
||||
return CONST.ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
|
||||
self.prematureExit = True
|
||||
global_status = CONST.ENB_PROCESS_SLAVE_RRU_NOT_SYNCED
|
||||
if foundSegFault:
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with a Segmentation Fault! \u001B[0m')
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.SetHmleNBFailureMsg(htmleNBFailureMsg)
|
||||
return CONST.ENB_PROCESS_SEG_FAULT
|
||||
global_status = CONST.ENB_PROCESS_SEG_FAULT
|
||||
if foundAssertion:
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB ended with an assertion! \u001B[0m')
|
||||
htmleNBFailureMsg += msgAssertion
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.SetHmleNBFailureMsg(htmleNBFailureMsg)
|
||||
return CONST.ENB_PROCESS_ASSERTION
|
||||
global_status = CONST.ENB_PROCESS_ASSERTION
|
||||
if foundRealTimeIssue:
|
||||
logging.debug('\u001B[1;37;41m ' + nodeB_prefix + 'NB faced real time issues! \u001B[0m')
|
||||
htmleNBFailureMsg += nodeB_prefix + 'NB faced real time issues!\n'
|
||||
#return CONST.ENB_PROCESS_REALTIME_ISSUE
|
||||
if rlcDiscardBuffer > 0:
|
||||
rlcMsg = nodeB_prefix + 'NB RLC discarded ' + str(rlcDiscardBuffer) + ' buffer(s)'
|
||||
logging.debug('\u001B[1;37;41m ' + rlcMsg + ' \u001B[0m')
|
||||
htmleNBFailureMsg += rlcMsg + '\n'
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.SetHmleNBFailureMsg(htmleNBFailureMsg)
|
||||
return CONST.ENB_PROCESS_REALTIME_ISSUE
|
||||
global_status = CONST.ENB_PROCESS_REALTIME_ISSUE
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.SetHmleNBFailureMsg(htmleNBFailureMsg)
|
||||
return 0
|
||||
return global_status
|
||||
|
||||
@@ -53,7 +53,7 @@ function details_table {
|
||||
echo " <th>Message</th>" >> $3
|
||||
echo " </tr>" >> $3
|
||||
|
||||
LIST_MESSAGES=`egrep "error:|warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto"`
|
||||
LIST_MESSAGES=`egrep "error:|warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto|disabling jobserver mode"`
|
||||
COMPLETE_MESSAGE="start"
|
||||
for MESSAGE in $LIST_MESSAGES
|
||||
do
|
||||
@@ -146,7 +146,7 @@ function summary_table_row {
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$NB_ERRORS</th>" >> ./build_results.html
|
||||
fi
|
||||
NB_WARNINGS=`egrep "warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | egrep -c "warning:"`
|
||||
NB_WARNINGS=`egrep "warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto|disabling jobserver mode" | egrep -c "warning:"`
|
||||
if [ $NB_WARNINGS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$NB_WARNINGS</th>" >> ./build_results.html
|
||||
|
||||
@@ -724,8 +724,8 @@ function report_test {
|
||||
echo " </pre></td>" >> ./test_simulator_results.html
|
||||
echo " </tr>" >> ./test_simulator_results.html
|
||||
fi
|
||||
#PING_LOGS=`ls $ARCHIVES_LOC/${TMODE}_${BW}MHz_${UES}users_${CN_CONFIG}_ping*.log 2> /dev/null`
|
||||
#analyzePingFiles
|
||||
PING_LOGS=`ls $ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_ping*.log 2> /dev/null`
|
||||
analyzePingFiles
|
||||
|
||||
IPERF_TESTS=`ls $ARCHIVES_LOC/${TMODE}_${BW}prb_${CN_CONFIG}_iperf_dl*client*txt 2> /dev/null`
|
||||
analyzeIperfFiles
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -89,6 +89,9 @@ function start_basic_sim_enb {
|
||||
fi
|
||||
done
|
||||
ENB_SYNC=0
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_VM_IP_ADDR < $1
|
||||
rm $1
|
||||
if [ $i -lt 50 ]
|
||||
then
|
||||
@@ -151,6 +154,9 @@ function start_basic_sim_ue {
|
||||
i=$[$i+1]
|
||||
fi
|
||||
done
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$2 < $1
|
||||
rm $1
|
||||
if [ $i -lt 50 ]
|
||||
then
|
||||
@@ -523,9 +529,9 @@ function install_epc_on_vm {
|
||||
echo "############################################################"
|
||||
echo "[ -f 01proxy ] && sudo cp 01proxy /etc/apt/apt.conf.d/" > $LOC_EPC_VM_CMDS
|
||||
echo "touch /home/ubuntu/.hushlogin" >> $LOC_EPC_VM_CMDS
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf\"" >> $LOC_EPC_VM_CMDS
|
||||
echo "echo \"sudo apt-get --yes --quiet install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev iperf\"" >> $LOC_EPC_VM_CMDS
|
||||
echo "sudo apt-get update > zip-install.txt 2>&1" >> $LOC_EPC_VM_CMDS
|
||||
echo "sudo apt-get --yes install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev daemon iperf >> zip-install.txt 2>&1" >> $LOC_EPC_VM_CMDS
|
||||
echo "sudo apt-get --yes install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev iperf >> zip-install.txt 2>&1" >> $LOC_EPC_VM_CMDS
|
||||
|
||||
# Installing HSS
|
||||
echo "echo \"cd /opt\"" >> $LOC_EPC_VM_CMDS
|
||||
@@ -588,8 +594,6 @@ function start_epc {
|
||||
echo "echo \"cd /opt/hss_sim0609\"" > $LOC_EPC_VM_CMDS
|
||||
echo "cd /opt/hss_sim0609" >> $LOC_EPC_VM_CMDS
|
||||
echo "sudo rm -f hss.log" >> $LOC_EPC_VM_CMDS
|
||||
#echo "echo \"sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real\"" >> $LOC_EPC_VM_CMDS
|
||||
#echo "sudo daemon --unsafe --name=simulated_hss --chdir=/opt/hss_sim0609 ./starthss_real" >> $LOC_EPC_VM_CMDS
|
||||
echo "echo \"screen -dm -S simulated_hss ./starthss_real\"" >> $LOC_EPC_VM_CMDS
|
||||
echo "sudo su -c \"screen -dm -S simulated_hss ./starthss_real\"" >> $LOC_EPC_VM_CMDS
|
||||
|
||||
@@ -656,8 +660,6 @@ function terminate_epc {
|
||||
echo "cd /opt/ltebox/tools" >> $1
|
||||
echo "echo \"sudo ./stop_ltebox\"" >> $1
|
||||
echo "sudo ./stop_ltebox" >> $1
|
||||
echo "echo \"sudo daemon --name=simulated_hss --stop\"" >> $1
|
||||
echo "sudo daemon --name=simulated_hss --stop" >> $1
|
||||
echo "echo \"sudo killall --signal SIGKILL hss_sim\"" >> $1
|
||||
echo "sudo killall --signal SIGKILL hss_sim" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$2 < $1
|
||||
@@ -764,6 +766,9 @@ function start_l2_sim_enb {
|
||||
i=$[$i+1]
|
||||
fi
|
||||
done
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_ENB_VM_IP_ADDR < $1
|
||||
rm $1
|
||||
ENB_SYNC=1
|
||||
if [ $i -lt 50 ]
|
||||
@@ -872,6 +877,9 @@ function start_l2_sim_ue {
|
||||
i=$[$i+1]
|
||||
fi
|
||||
done
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_UE_VM_IP_ADDR < $1
|
||||
rm $1
|
||||
UE_SYNC=1
|
||||
if [ $i -lt 50 ]
|
||||
@@ -985,6 +993,9 @@ function start_rf_sim_enb {
|
||||
i=$[$i+1]
|
||||
fi
|
||||
done
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_ENB_VM_IP_ADDR < $1
|
||||
rm $1
|
||||
if [ $i -lt 50 ]
|
||||
then
|
||||
@@ -1114,6 +1125,9 @@ function start_rf_sim_ue {
|
||||
i=$[$i+1]
|
||||
fi
|
||||
done
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_UE_VM_IP_ADDR < $1
|
||||
rm $1
|
||||
if [ $i -lt 50 ]
|
||||
then
|
||||
@@ -1158,6 +1172,10 @@ function start_rf_sim_gnb {
|
||||
local LOC_CONF_FILE=$5
|
||||
# 1 is with S1 and 0 without S1 aka noS1
|
||||
local LOC_S1_CONFIGURATION=$6
|
||||
|
||||
if [ -e rbconfig.raw ]; then rm -f rbconfig.raw; fi
|
||||
if [ -e reconfig.raw ]; then rm -f reconfig.raw; fi
|
||||
|
||||
echo "cd /home/ubuntu/tmp" > $1
|
||||
echo "echo \"sudo apt-get --yes --quiet install daemon \"" >> $1
|
||||
echo "sudo apt-get --yes install daemon >> /home/ubuntu/tmp/cmake_targets/log/daemon-install.txt 2>&1" >> $1
|
||||
@@ -1171,6 +1189,7 @@ function start_rf_sim_gnb {
|
||||
echo "echo \"cd /home/ubuntu/tmp/cmake_targets/ran_build/build/\"" >> $1
|
||||
echo "sudo chmod 777 /home/ubuntu/tmp/cmake_targets/ran_build/build/" >> $1
|
||||
echo "cd /home/ubuntu/tmp/cmake_targets/ran_build/build/" >> $1
|
||||
echo "sudo rm -f r*config.raw" >> $1
|
||||
if [ $LOC_S1_CONFIGURATION -eq 0 ]
|
||||
then
|
||||
echo "echo \"RFSIMULATOR=server ./nr-softmodem -O /home/ubuntu/tmp/ci-scripts/conf_files/ci-$LOC_CONF_FILE --log_config.global_log_options level,nocolor --parallel-config PARALLEL_SINGLE_THREAD --noS1 --nokrnmod 1 --rfsim --phy-test\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
@@ -1231,6 +1250,13 @@ function start_rf_sim_gnb {
|
||||
fi
|
||||
fi
|
||||
sleep 10
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_GNB_VM_IP_ADDR < $1
|
||||
rm $1
|
||||
# Copy the RAW files from the gNB run for the NR-UE
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$LOC_GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/ran_build/build/rbconfig.raw .
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$LOC_GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/ran_build/build/reconfig.raw .
|
||||
}
|
||||
|
||||
function start_rf_sim_nr_ue {
|
||||
@@ -1241,14 +1267,21 @@ function start_rf_sim_nr_ue {
|
||||
local LOC_FREQUENCY=$6
|
||||
# 1 is with S1 and 0 without S1 aka noS1
|
||||
local LOC_S1_CONFIGURATION=$7
|
||||
|
||||
# Copy the RAW files from the gNB run
|
||||
scp -o StrictHostKeyChecking=no rbconfig.raw ubuntu@$LOC_NR_UE_VM_IP_ADDR:/home/ubuntu/tmp
|
||||
scp -o StrictHostKeyChecking=no reconfig.raw ubuntu@$LOC_NR_UE_VM_IP_ADDR:/home/ubuntu/tmp
|
||||
|
||||
echo "echo \"sudo apt-get --yes --quiet install daemon \"" > $1
|
||||
echo "sudo apt-get --yes install daemon >> /home/ubuntu/tmp/cmake_targets/log/daemon-install.txt 2>&1" >> $1
|
||||
echo "echo \"cd /home/ubuntu/tmp/cmake_targets/ran_build/build/\"" >> $1
|
||||
echo "sudo chmod 777 /home/ubuntu/tmp/cmake_targets/ran_build/build/" >> $1
|
||||
echo "sudo cp /home/ubuntu/tmp/r*config.raw /home/ubuntu/tmp/cmake_targets/ran_build/build/" >> $1
|
||||
echo "sudo chmod 666 /home/ubuntu/tmp/cmake_targets/ran_build/build/r*config.raw" >> $1
|
||||
echo "cd /home/ubuntu/tmp/cmake_targets/ran_build/build/" >> $1
|
||||
if [ $LOC_S1_CONFIGURATION -eq 0 ]
|
||||
then
|
||||
echo "echo \"RFSIMULATOR=${LOC_GNB_VM_IP_ADDR} ./nr-uesoftmodem --nokrnmod 1 --rfsim --phy-test --rrc_config_path /home/ubuntu/tmp/ci-scripts/rrc-files --log_config.global_log_options level,nocolor --noS1\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
echo "echo \"RFSIMULATOR=${LOC_GNB_VM_IP_ADDR} ./nr-uesoftmodem --nokrnmod 1 --rfsim --phy-test --rrc_config_path /home/ubuntu/tmp/cmake_targets/ran_build/build/ --log_config.global_log_options level,nocolor --noS1\" > ./my-nr-softmodem-run.sh " >> $1
|
||||
fi
|
||||
echo "chmod 775 ./my-nr-softmodem-run.sh" >> $1
|
||||
echo "cat ./my-nr-softmodem-run.sh" >> $1
|
||||
@@ -1295,6 +1328,9 @@ function start_rf_sim_nr_ue {
|
||||
i=$[$i+1]
|
||||
fi
|
||||
done
|
||||
echo "echo \"free -m\"" > $1
|
||||
echo "free -m" >> $1
|
||||
ssh -T -o StrictHostKeyChecking=no ubuntu@$LOC_NR_UE_VM_IP_ADDR < $1
|
||||
rm $1
|
||||
if [ $i -lt 50 ]
|
||||
then
|
||||
@@ -2028,7 +2064,7 @@ function run_test_on_vm {
|
||||
NR_STATUS=0
|
||||
|
||||
######### start of loop
|
||||
while [ $try_cnt -lt 5 ]
|
||||
while [ $try_cnt -lt 1 ]
|
||||
do
|
||||
SYNC_STATUS=0
|
||||
PING_STATUS=0
|
||||
@@ -2050,6 +2086,8 @@ function run_test_on_vm {
|
||||
echo "Problem w/ gNB and NR-UE not syncing"
|
||||
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
|
||||
terminate_enb_ue_basic_sim $GNB_VM_CMDS $GNB_VM_IP_ADDR 1
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC
|
||||
SYNC_STATUS=-1
|
||||
try_cnt=$[$try_cnt+1]
|
||||
continue
|
||||
@@ -2089,6 +2127,8 @@ function run_test_on_vm {
|
||||
echo "DL test not OK"
|
||||
terminate_enb_ue_basic_sim $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 2
|
||||
terminate_enb_ue_basic_sim $GNB_VM_CMDS $GNB_VM_IP_ADDR 1
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_GNB_LOG_FILE $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/tmp/cmake_targets/log/$CURRENT_NR_UE_LOG_FILE $ARCHIVES_LOC
|
||||
try_cnt=$[$try_cnt+1]
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -25,23 +25,10 @@
|
||||
<htmlTabName>EPC-Start</htmlTabName>
|
||||
<htmlTabIcon>log-in</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
010101 090101
|
||||
050101 060101 070101
|
||||
</TestCaseRequestedList>
|
||||
<TestCaseExclusionList></TestCaseExclusionList>
|
||||
|
||||
<testCase id="010101">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build eNB (USRP)</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="090101">
|
||||
<class>Build_OAI_UE</class>
|
||||
<desc>Build OAI UE</desc>
|
||||
<Build_OAI_UE_args>-w USRP --UE</Build_OAI_UE_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="050101">
|
||||
<class>Initialize_HSS</class>
|
||||
<desc>Initialize HSS</desc>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<htmlTabRef>test-05-tm1-rrc-no-flex</htmlTabRef>
|
||||
<htmlTabName>Test-05MHz-TM1-RRC-Inactivity</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<testCase id="090102">
|
||||
<class>Initialize_OAI_UE</class>
|
||||
<desc>Initialize NR UE USRP</desc>
|
||||
<Initialize_OAI_UE_args>--phy-test --usrp-args "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=external,time_source=external" --threadoffset 16 --rrc_config_path ci-scripts/rrc-files</Initialize_OAI_UE_args>
|
||||
<Initialize_OAI_UE_args>--phy-test --usrp-args "addr=192.168.30.2,second_addr=192.168.50.2,clock_source=external,time_source=external" --threadoffset 16 --rrc_config_path .</Initialize_OAI_UE_args>
|
||||
<air_interface>NR</air_interface>
|
||||
</testCase>
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<htmlTabRef>gnb-build-tab</htmlTabRef>
|
||||
<htmlTabName>Build-gNB</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010101
|
||||
</TestCaseRequestedList>
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<htmlTabRef>test-10</htmlTabRef>
|
||||
<htmlTabName>Test-10MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<testCase id="010101">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build RCC</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
<Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
<backgroundBuild>True</backgroundBuild>
|
||||
@@ -42,7 +42,7 @@
|
||||
<testCase id="000101">
|
||||
<class>WaitEndBuild_eNB</class>
|
||||
<desc>Wait for end of Build RCC</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
<Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
@@ -50,7 +50,7 @@
|
||||
<testCase id="010102">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build Master RRU</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
<Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
<eNB_serverId>1</eNB_serverId>
|
||||
<backgroundBuild>True</backgroundBuild>
|
||||
@@ -59,7 +59,7 @@
|
||||
<testCase id="000102">
|
||||
<class>WaitEndBuild_eNB</class>
|
||||
<desc>Wait for end of Build Master RRU</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
<Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
<eNB_serverId>1</eNB_serverId>
|
||||
</testCase>
|
||||
@@ -67,7 +67,7 @@
|
||||
<testCase id="010103">
|
||||
<class>Build_eNB</class>
|
||||
<desc>Build Slave RRU</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
<Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
|
||||
<eNB_instance>2</eNB_instance>
|
||||
<eNB_serverId>2</eNB_serverId>
|
||||
<backgroundBuild>True</backgroundBuild>
|
||||
@@ -76,7 +76,7 @@
|
||||
<testCase id="000103">
|
||||
<class>WaitEndBuild_eNB</class>
|
||||
<desc>Wait for end of Build Slave RRU</desc>
|
||||
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||
<Build_eNB_args>-w USRP -c --eNB --ninja</Build_eNB_args>
|
||||
<eNB_instance>2</eNB_instance>
|
||||
<eNB_serverId>2</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<htmlTabRef>test-multi-rru-10</htmlTabRef>
|
||||
<htmlTabName>Test-Multi-RRU-10MHz</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030211 030212 030213
|
||||
030111 030112 030113
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<htmlTabRef>nr-ue-build-tab</htmlTabRef>
|
||||
<htmlTabName>Build-NR-UE</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
010102
|
||||
</TestCaseRequestedList>
|
||||
|
||||
+165
-130
@@ -20,34 +20,9 @@
|
||||
# */
|
||||
|
||||
# Author: laurent THOMAS, Lionel GAUTHIER
|
||||
###################### FOR CUDA#############################
|
||||
# author NCTU OpinConnect Terng-Yin Hsu,WEI-YING,LIN:
|
||||
# Add for PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
|
||||
# email tyhsu@cs.nctu.edu.tw
|
||||
###################### FOR CUDA#############################
|
||||
|
||||
cmake_minimum_required (VERSION 3.0)
|
||||
|
||||
|
||||
|
||||
##############################################
|
||||
# Base CUDA setting
|
||||
##############################################
|
||||
find_package(CUDA)
|
||||
message ("cuda include ${CUDA_INCLUDE_DIRS}")
|
||||
message ("cuda library ${CUDA_LIBRARY_DIRS}")
|
||||
|
||||
add_definitions("-L/usr/local/cuda/lib64")
|
||||
|
||||
SET(CUDA_NVCC_FLAGS
|
||||
"${CUDA_NVCC_FLAGS};-arch=sm_75;")
|
||||
|
||||
# Disable warnings for CUDA
|
||||
SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-lpthread;-w;-O3;--default-stream;per-thread;-I/usr/local/cuda/inc;-L/usr/local/cuda/lib -lcutil;-rdc=true;-lcudadevrt")
|
||||
SET(CUDA_VERBOSE_BUILD ON)
|
||||
SET(CUDA_HOST_COMPILER "/usr/bin/g++")
|
||||
|
||||
SET(CUDA_SEPARABLE_COMPILATION ON)
|
||||
|
||||
#########################################################
|
||||
# Base directories, compatible with legacy OAI building #
|
||||
#########################################################
|
||||
@@ -64,6 +39,33 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
|
||||
|
||||
project (OpenAirInterface)
|
||||
|
||||
|
||||
|
||||
##############################################
|
||||
# Base CUDA setting
|
||||
##############################################
|
||||
find_package(CUDA)
|
||||
if (CUDA_FOUND)
|
||||
message ("cuda include ${CUDA_INCLUDE_DIRS}")
|
||||
message ("cuda library ${CUDA_LIBRARY_DIRS}")
|
||||
|
||||
add_definitions("-L/usr/local/cuda/lib64")
|
||||
|
||||
SET(CUDA_NVCC_FLAGS
|
||||
"${CUDA_NVCC_FLAGS};-arch=sm_60;")
|
||||
|
||||
# Disable warnings for CUDA
|
||||
SET(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS};-lpthread;-w;-O3;--default-stream;per-thread;-I/usr/local/cuda/inc;-L/usr/local/cuda/lib -lcutil;-rdc=true;-lcudadevrt")
|
||||
SET(CUDA_VERBOSE_BUILD ON)
|
||||
SET(CUDA_HOST_COMPILER "/usr/bin/g++")
|
||||
|
||||
SET(CUDA_SEPARABLE_COMPILATION ON)
|
||||
|
||||
else (CUDA_FOUND)
|
||||
message ("No CUDA tool installed")
|
||||
endif ()
|
||||
|
||||
|
||||
###########################################
|
||||
# macros to define options as there is numerous options in oai
|
||||
################################################
|
||||
@@ -194,13 +196,30 @@ endif()
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -pipe -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC")
|
||||
# add autotools definitions that were maybe used!
|
||||
# set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP "
|
||||
)
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 "
|
||||
)
|
||||
if (CUDA_FOUND)
|
||||
set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
|
||||
set(CUDA_CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D CUDA_FLAG"
|
||||
)
|
||||
set(CUDA_CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D CUDA_FLAG"
|
||||
)
|
||||
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER} -D CUDA_FLAG"
|
||||
)
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D${MKVER} -D CUDA_FLAG"
|
||||
)
|
||||
else (CUDA_FOUND)
|
||||
set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP -D${MKVER}"
|
||||
)
|
||||
set(CMAKE_CXX_FLAGS
|
||||
"${CMAKE_CXX_FLAGS} ${C_FLAGS_PROCESSOR} -Wno-packed-bitfield-compat -fPIC -Wall -fno-strict-aliasing -rdynamic -std=c++11 -D${MKVER}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
add_definitions("-DASN_DISABLE_OER_SUPPORT")
|
||||
|
||||
@@ -1655,7 +1674,7 @@ add_library(PHY_MEX ${PHY_MEX_UE} ${CONFIG_LIB})
|
||||
#Layer 2 library
|
||||
#####################
|
||||
set(MAC_DIR ${OPENAIR2_DIR}/LAYER2/MAC)
|
||||
set(NR_MAC_DIR ${OPENAIR2_DIR}/LAYER2/NR_MAC_gNB)
|
||||
set(NR_GNB_MAC_DIR ${OPENAIR2_DIR}/LAYER2/NR_MAC_gNB)
|
||||
set(NR_UE_MAC_DIR ${OPENAIR2_DIR}/LAYER2/NR_MAC_UE)
|
||||
set(PHY_INTERFACE_DIR ${OPENAIR2_DIR}/PHY_INTERFACE)
|
||||
set(NR_PHY_INTERFACE_DIR ${OPENAIR2_DIR}/NR_PHY_INTERFACE)
|
||||
@@ -1811,20 +1830,22 @@ set (MAC_SRC
|
||||
${MAC_DIR}/eNB_scheduler_fairRR.c
|
||||
${MAC_DIR}/eNB_scheduler_phytest.c
|
||||
${MAC_DIR}/pre_processor.c
|
||||
${MAC_DIR}/slicing/slicing.c
|
||||
${MAC_DIR}/config.c
|
||||
${MAC_DIR}/config_ue.c
|
||||
)
|
||||
|
||||
set (MAC_NR_SRC
|
||||
${NR_PHY_INTERFACE_DIR}/NR_IF_Module.c
|
||||
${NR_MAC_DIR}/main.c
|
||||
${NR_MAC_DIR}/config.c
|
||||
${NR_MAC_DIR}/gNB_scheduler.c
|
||||
${NR_MAC_DIR}/gNB_scheduler_bch.c
|
||||
${NR_MAC_DIR}/gNB_scheduler_dlsch.c
|
||||
${NR_MAC_DIR}/gNB_scheduler_ulsch.c
|
||||
${NR_MAC_DIR}/gNB_scheduler_primitives.c
|
||||
${NR_MAC_DIR}/gNB_scheduler_phytest.c
|
||||
${NR_GNB_MAC_DIR}/main.c
|
||||
${NR_GNB_MAC_DIR}/config.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_bch.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_dlsch.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_ulsch.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_primitives.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_phytest.c
|
||||
${NR_GNB_MAC_DIR}/gNB_scheduler_RA.c
|
||||
)
|
||||
|
||||
|
||||
@@ -1836,7 +1857,6 @@ set (MAC_SRC_UE
|
||||
${MAC_DIR}/l1_helpers.c
|
||||
${MAC_DIR}/rar_tools_ue.c
|
||||
${MAC_DIR}/config_ue.c
|
||||
|
||||
)
|
||||
|
||||
set (MAC_NR_SRC_UE
|
||||
@@ -1846,6 +1866,9 @@ set (MAC_NR_SRC_UE
|
||||
${NR_UE_MAC_DIR}/main_ue_nr.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_procedures.c
|
||||
${NR_UE_MAC_DIR}/nr_ue_dci_configuration.c
|
||||
${NR_UE_MAC_DIR}/nr_l1_helpers.c
|
||||
${NR_UE_MAC_DIR}/nr_ra_procedures.c
|
||||
${NR_UE_MAC_DIR}/rar_tools_nrUE.c
|
||||
)
|
||||
|
||||
set (ENB_APP_SRC
|
||||
@@ -1909,7 +1932,7 @@ add_library( NR_L2_UE ${NR_L2_SRC_UE} ${MAC_NR_SRC_UE} )
|
||||
add_library( MAC_NR_COMMON ${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c ${OPENAIR2_DIR}/LAYER2/NR_MAC_gNB/nr_compute_tbs_common.c)
|
||||
|
||||
include_directories("${OPENAIR2_DIR}/NR_UE_PHY_INTERFACE")
|
||||
include_directories("${OPENAIR2_DIR}/LAYER2/NR_MAC_UE")
|
||||
include_directories("${OPENAIR2_DIR}/LAYER2")
|
||||
include_directories("${OPENAIR1_DIR}/SCHED_NR_UE")
|
||||
#include_directories("${NFAPI_USER_DIR}"")
|
||||
|
||||
@@ -1937,6 +1960,19 @@ set (GTPV1U_SRC
|
||||
add_library(GTPV1U ${GTPV1U_SRC})
|
||||
add_dependencies(GTPV1U rrc_flag)
|
||||
|
||||
#NR case
|
||||
set (NR_GTPV1U_SRC
|
||||
${NR_RRC_DIR}/rrc_gNB_GTPV1U.c
|
||||
${RRC_DIR}/rrc_eNB_GTPV1U.c
|
||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTunnelEndPoint.c
|
||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uTrxn.c
|
||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1uMsg.c
|
||||
${GTPV1U_DIR}/nw-gtpv1u/src/NwGtpv1u.c
|
||||
${GTPV1U_DIR}/gtpv1u_teid_pool.c
|
||||
)
|
||||
add_library(NR_GTPV1U ${NR_GTPV1U_SRC})
|
||||
add_dependencies(NR_GTPV1U rrc_flag)
|
||||
|
||||
set (MME_APP_SRC
|
||||
${OPENAIR3_DIR}/MME_APP/mme_app.c
|
||||
${OPENAIR3_DIR}/MME_APP/mme_config.c
|
||||
@@ -2264,26 +2300,28 @@ add_library(LFDS7
|
||||
${lfds7_queue} ${lfds7_ring} ${lfds7_qbss} ${lfds7_stack} ${lfds7_freelist} ${lfds7_btree} ${lfds7_hash} ${lfds7_ordered_list} ${lfds7_unordered_list} ${lfds7_misc}
|
||||
)
|
||||
|
||||
# Simulation library
|
||||
##########################
|
||||
set (SIMUSRC
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/random_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/rangen_double.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/abstraction.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/channel_sim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/rf.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/dac.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/adc.c
|
||||
${OPENAIR_DIR}/targets/ARCH/rfsimulator/apply_channelmod.c
|
||||
#${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
)
|
||||
add_library(SIMU_COMMON
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/random_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/rangen_double.c
|
||||
)
|
||||
|
||||
# Simulation library
|
||||
##########################
|
||||
add_library( SIMU SHARED ${SIMUSRC} )
|
||||
set (SIMUSRC
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/abstraction.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/channel_sim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/rf.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/dac.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/adc.c
|
||||
#${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
)
|
||||
|
||||
# Simulation library
|
||||
##########################
|
||||
add_library(SIMU SHARED ${SIMUSRC} )
|
||||
|
||||
add_library(SIMU_ETH
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
@@ -2441,9 +2479,11 @@ target_link_libraries(gnbscope ${XFORMS_LIBRARIES})
|
||||
|
||||
|
||||
add_library(rfsimulator MODULE
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/simulator.c
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/simulator.c
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/apply_channelmod.c
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/new_channel_sim.c
|
||||
)
|
||||
target_link_libraries(rfsimulator SIMU ${ATLAS_LIBRARIES})
|
||||
target_link_libraries(rfsimulator SIMU_COMMON ${ATLAS_LIBRARIES})
|
||||
|
||||
add_library(oai_iqplayer MODULE
|
||||
${OPENAIR_TARGETS}/ARCH/iqplayer/iqplayer_lib.c
|
||||
@@ -2466,7 +2506,7 @@ endif (${T_TRACER})
|
||||
add_custom_command (
|
||||
OUTPUT ${OPENAIR_DIR}/common/utils/T/T_IDs.h
|
||||
COMMAND make clean
|
||||
COMMAND make
|
||||
COMMAND make -j2
|
||||
COMMAND make check_vcd
|
||||
WORKING_DIRECTORY ${OPENAIR_DIR}/common/utils/T
|
||||
DEPENDS ${OPENAIR_DIR}/common/utils/T/T_messages.txt
|
||||
@@ -2589,7 +2629,7 @@ add_dependencies(ocp-enb rrc_flag s1ap_flag x2_flag oai_iqplayer)
|
||||
target_link_libraries (ocp-enb
|
||||
-Wl,--start-group
|
||||
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
|
||||
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7
|
||||
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
||||
-Wl,--end-group z dl)
|
||||
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
|
||||
@@ -2659,7 +2699,7 @@ target_link_libraries (lte-uesoftmodem
|
||||
-Wl,--start-group
|
||||
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP F1AP_LIB
|
||||
GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
|
||||
PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
@@ -2685,6 +2725,7 @@ add_executable(nr-softmodem
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR3_DIR}/GTPV1-U/gtpv1u_gNB.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
@@ -2698,7 +2739,7 @@ add_executable(nr-softmodem
|
||||
|
||||
target_link_libraries (nr-softmodem
|
||||
-Wl,--start-group
|
||||
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS GTPV1U SECU_CN SECU_OSA
|
||||
UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU LFDS NR_GTPV1U SECU_CN SECU_OSA
|
||||
${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} RRC_LIB NR_RRC_LIB
|
||||
S1AP_LIB S1AP_ENB L2 L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
|
||||
@@ -2742,9 +2783,9 @@ add_executable(nr-uesoftmodem
|
||||
target_link_libraries (nr-uesoftmodem
|
||||
-Wl,--start-group
|
||||
RRC_LIB NR_RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
|
||||
PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS NR_L2_UE L2_UE MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
|
||||
NFAPI_USER_LIB S1AP_LIB S1AP_ENB
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
||||
PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS L2_UE NR_L2_UE MAC_NR_COMMON S1AP_LIB S1AP_ENB
|
||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries (nr-uesoftmodem ${LIBXML2_LIBRARIES})
|
||||
@@ -2754,29 +2795,6 @@ target_link_libraries (nr-uesoftmodem ${T_LIB})
|
||||
|
||||
add_dependencies( nr-uesoftmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||
|
||||
# USIM process
|
||||
#################
|
||||
#add_executable(usim
|
||||
# ${OPENAIR3_DIR}/NAS/TOOLS/usim_data.c
|
||||
# ${OPENAIR3_DIR}/NAS/USER/API/USIM/usim_api.c
|
||||
# ${OPENAIR3_DIR}/NAS/USER/API/USIM/aka_functions.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/memory.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/nas_log.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/OctetString.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/TLVEncoder.c
|
||||
# )
|
||||
#target_link_libraries (usim ${NAS_LIB} UTIL ${ITTI_LIB} LFDS pthread rt nettle crypto m)
|
||||
|
||||
# ???
|
||||
#####################
|
||||
#add_executable(nvram
|
||||
# ${OPENAIR3_DIR}/NAS/TOOLS/ue_data.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/memory.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/nas_log.c
|
||||
# )
|
||||
#target_link_libraries (nvram LIB_NAS_UE UTIL ${ITTI_LIB} LFDS pthread rt nettle crypto m)
|
||||
|
||||
|
||||
###################################"
|
||||
# Addexecutables for tests
|
||||
####################################
|
||||
@@ -2793,7 +2811,7 @@ add_executable(dlsim_tm4
|
||||
${T_SOURCE}
|
||||
)
|
||||
target_link_libraries (dlsim_tm4
|
||||
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group
|
||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group
|
||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${T_LIB}
|
||||
)
|
||||
|
||||
@@ -2806,7 +2824,7 @@ add_executable(polartest
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(polartest
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} dl
|
||||
)
|
||||
|
||||
@@ -2821,35 +2839,51 @@ add_executable(smallblocktest
|
||||
|
||||
|
||||
target_link_libraries(smallblocktest
|
||||
-Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} dl
|
||||
)
|
||||
|
||||
<<<<<<< HEAD
|
||||
|
||||
# temp_C_flag = CMAKE_C_FLAGS
|
||||
#set(CMAKE_C_FLAGS " ")
|
||||
set (TEMP_C_FLAG ${CMAKE_C_FLAGS})
|
||||
set (CMAKE_C_FLAGS ${CUDA_CMAKE_C_FLAGS})
|
||||
|
||||
set (TEMP_CXX_FLAG ${CMAKE_CXX_FLAGS})
|
||||
set (CMAKE_CXX_FLAGS ${CUDA_CMAKE_CXX_FLAGS})
|
||||
if (CUDA_FOUND)
|
||||
###################################################
|
||||
# For CUDA library
|
||||
###################################################
|
||||
CUDA_ADD_LIBRARY(LDPC_CU
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
|
||||
)
|
||||
CUDA_ADD_CUFFT_TO_TARGET(LDPC_CU)
|
||||
cuda_add_executable(ldpctest
|
||||
=======
|
||||
add_executable(ldpctest
|
||||
${PHY_NR_CODINGIF}
|
||||
>>>>>>> origin/develop
|
||||
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
<<<<<<< HEAD
|
||||
|
||||
CUDA_ADD_LIBRARY(LDPC_CU
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.cu
|
||||
)
|
||||
CUDA_ADD_CUFFT_TO_TARGET(LDPC_CU)
|
||||
cuda_add_executable(ldpctest
|
||||
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(ldpctest -ldl
|
||||
-Wl,--start-group
|
||||
LDPC_CU UTIL SIMU PHY_NR CONFIG_LIB
|
||||
-Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} dl
|
||||
)
|
||||
|
||||
else (CUDA_FOUND)
|
||||
add_executable(ldpctest
|
||||
${PHY_NR_CODINGIF}
|
||||
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/ldpctest.c
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
|
||||
endif ()
|
||||
set (CMAKE_C_FLAGS ${TEMP_C_FLAG})
|
||||
set (CMAKE_CXX_FLAGS ${TEMP_CXX_FLAG})
|
||||
|
||||
target_link_libraries(ldpctest -ldl
|
||||
-Wl,--start-group
|
||||
LDPC_CU UTIL SIMU PHY_NR CONFIG_LIB
|
||||
-Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} dl
|
||||
)
|
||||
|
||||
# add_executable(ldpctest
|
||||
# ${PHY_NR_CODINGIF}
|
||||
@@ -2857,36 +2891,36 @@ target_link_libraries(ldpctest -ldl
|
||||
# ${T_SOURCE}
|
||||
# ${SHLIB_LOADER_SOURCES}
|
||||
# )
|
||||
=======
|
||||
>>>>>>> origin/develop
|
||||
add_dependencies( ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||
|
||||
target_link_libraries(ldpctest
|
||||
-Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} dl
|
||||
)
|
||||
|
||||
add_executable(nr_dlschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_dlschsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
|
||||
add_executable(nr_pbchsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_pbchsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
|
||||
@@ -2901,7 +2935,7 @@ add_executable(nr_pucchsim
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_pucchsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
|
||||
@@ -2915,7 +2949,7 @@ add_executable(nr_dlsim
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_dlsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||
@@ -2929,17 +2963,18 @@ add_executable(nr_prachsim
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES})
|
||||
target_link_libraries(nr_prachsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB RRC_LIB NR_RRC_LIB L2_NR CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl)
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB MAC_UE_NR SCHED_NR_UE_LIB RRC_LIB NR_RRC_LIB L2_NR CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl)
|
||||
|
||||
add_executable(nr_ulschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${OPENAIR_DIR}/common/utils/nr/nr_common.c
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_ulschsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
|
||||
@@ -2953,7 +2988,7 @@ add_executable(nr_ulsim
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_ulsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||
@@ -2972,7 +3007,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
)
|
||||
target_link_libraries (${myExe}
|
||||
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group
|
||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group
|
||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
|
||||
)
|
||||
|
||||
@@ -3052,8 +3087,8 @@ if (${T_TRACER})
|
||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
||||
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
|
||||
L2 L2_LTE L2_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_NR MAC_UE_NR
|
||||
CN_UTILS GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU SIMU_ETH OPENAIR0_LIB
|
||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT)
|
||||
CN_UTILS GTPV1U NR_GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
|
||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT dfts)
|
||||
if (TARGET ${i})
|
||||
add_dependencies(${i} generate_T)
|
||||
endif()
|
||||
@@ -3096,7 +3131,7 @@ function(make_driver name dir)
|
||||
endforeach()
|
||||
CONFIGURE_FILE(${OPENAIR_CMAKE}/tools/Kbuild.cmake ${OPENAIR_BIN_DIR}/${name}/Kbuild)
|
||||
add_custom_command(OUTPUT ${name}.ko
|
||||
COMMAND make -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name}
|
||||
COMMAND make -j2 -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name}
|
||||
WORKING_DIRECTORY ${OPENAIR_BIN_DIR}/${name}
|
||||
COMMENT "building ${module}.ko"
|
||||
VERBATIM
|
||||
|
||||
@@ -142,10 +142,14 @@ Obj.# Case# Test# Description
|
||||
(Test 11: 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%))
|
||||
(TM2 Test 1 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)),
|
||||
(TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)),
|
||||
01 51 11 nr_ulsim Test cases. (Test1: MCS 9),
|
||||
(Test2: MCS 16),
|
||||
(Test3: MCS 28)
|
||||
|
||||
01 51 11 nr_ulsim Test cases. (Test1: MCS 9 106 PRBs),
|
||||
(Test2: MCS 16 50 PRBs),
|
||||
(Test3: MCS 28 50 PRBs),
|
||||
(Test4: MCS 9 217 PRBs),
|
||||
(Test5: MCS 9 273 PRBs)
|
||||
01 51 12 nr_prachsim Test cases.(Test1: 106 PRBs),
|
||||
(Test2: 217 PRBs),
|
||||
(Test3: 273 PRBs)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1036,7 +1036,9 @@
|
||||
<testCase id="015103">
|
||||
<class>execution</class>
|
||||
<desc>polartest Test cases. (Test1: PBCH polar test),
|
||||
(Test2: DCI polar test)</desc>
|
||||
(Test2: DCI polar test),
|
||||
(Test3: UCI polar test,6-bit CRC),
|
||||
(Test4: UCI polar test,11-bit CRC)</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>
|
||||
@@ -1044,8 +1046,10 @@
|
||||
<pre_exec_args></pre_exec_args>
|
||||
<main_exec> $OPENAIR_DIR/targets/bin/polartest.Rel15</main_exec>
|
||||
<main_exec_args>-q -s-10 -f0
|
||||
-q -s-10 -f0 -m1</main_exec_args>
|
||||
<tags>polartest.test1 polartest.test2</tags>
|
||||
-q -s-10 -f0 -m1
|
||||
-q -s-2 -f2 -m2 -k12
|
||||
-q -s-2 -f2 -m2 -k20</main_exec_args>
|
||||
<tags>polartest.test1 polartest.test2 polartest.test3 polartest.test4</tags>
|
||||
<search_expr_true>BLER= 0.000000</search_expr_true>
|
||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||
<nruns>3</nruns>
|
||||
@@ -1067,9 +1071,9 @@
|
||||
<main_exec> $OPENAIR_DIR/targets/bin/nr_pbchsim.Rel15</main_exec>
|
||||
<main_exec_args>-s0 -S1 -n1000 -R106
|
||||
-s0 -S1 -n10 -I -R106
|
||||
-s0 -S1 -n1000 -R217
|
||||
-s0 -S1 -n1000 -R217
|
||||
-s0 -S1 -n10 -I -R217
|
||||
-s0 -S1 -n1000 -R273
|
||||
-s0 -S1 -n1000 -R273
|
||||
-s0 -S1 -n10 -I -R273</main_exec_args>
|
||||
<tags>nr_pbchsim.test1 nr_pbchsim.test2 nr_pbchsim.test3 nr_pbchsim.test4 nr_pbchsim.test5 nr_pbchsim.test6</tags>
|
||||
<search_expr_true>PBCH test OK</search_expr_true>
|
||||
@@ -1087,8 +1091,11 @@
|
||||
(Test6: 217 PRB 100 PDSCH-PRBs),
|
||||
(Test7: 217 PRB 80 PDSCH-Offset),
|
||||
(Test8: 217 PRB 100 PDSCH-PRBs 110 PDSCH-Offset),
|
||||
(Test9: 106 PRBs 50 PDSCH-PRBs MCS Index 27)
|
||||
(Test10: 106 PRBs 50 PDSCH-PRBs MCS Index 16)</desc>
|
||||
(Test9: 106 PRBs 50 PDSCH-PRBs MCS Index 27),
|
||||
(Test10: 106 PRBs 50 PDSCH-PRBs MCS Index 16),
|
||||
(Test11: HARQ test 25% TP (4 rounds),
|
||||
(Test12: HARQ test 33% TP (3 rounds),
|
||||
(Test13: HARQ test 50% TP (2 rounds)</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>
|
||||
@@ -1104,8 +1111,11 @@
|
||||
-n100 -R217 -a80 -s5
|
||||
-n100 -R217 -a110 -s5 -b100
|
||||
-n100 -e27 -s30
|
||||
-n100 -e16 -s10</main_exec_args>
|
||||
<tags>nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10</tags>
|
||||
-n100 -e16 -s10
|
||||
-n100 -s1 -t25
|
||||
-n100 -s1 -t33
|
||||
-n100 -s1 -t50</main_exec_args>
|
||||
<tags>nr_dlsim.test1 nr_dlsim.test2 nr_dlsim.test3 nr_dlsim.test4 nr_dlsim.test5 nr_dlsim.test6 nr_dlsim.test7 nr_dlsim.test8 nr_dlsim.test9 nr_dlsim.test10 nr_dlsim.test11 nr_dlsim.test12 nr_dlsim.test13</tags>
|
||||
<search_expr_true>PDSCH test OK</search_expr_true>
|
||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||
<nruns>3</nruns>
|
||||
@@ -1179,15 +1189,20 @@
|
||||
<desc>nr_pucchsim Test cases. (Test1: Format 0 1-bit ACK miss 106 PRB),
|
||||
(Test2: Format 0 2-bit ACK miss 106 PRB),
|
||||
(Test3: Format 0 2-bit ACK miss, 1-bit SR 106 PRB),
|
||||
(Test4: Format 2 3-bit 106 PRB),
|
||||
(Test5: Format 2 4-bit 106 PRB),
|
||||
(Test6: Format 2 5-bit 106 PRB),
|
||||
(Test7: Format 2 6-bit 106 PRB),
|
||||
(Test8: Format 2 7-bit 106 PRB),
|
||||
(Test9: Format 2 8-bit 106 PRB),
|
||||
(Test10: Format 2 9-bit 106 PRB),
|
||||
(Test11: Format 2 10-bit 106 PRB),
|
||||
(Test12: Format 2 11-bit 106 PRB)</desc>
|
||||
(Test4: Format 2 3-bit 2/106 PRB),
|
||||
(Test5: Format 2 4-bit 2/106 PRB),
|
||||
(Test6: Format 2 5-bit 2/106 PRB),
|
||||
(Test7: Format 2 6-bit 2/106 PRB),
|
||||
(Test8: Format 2 7-bit 2/106 PRB),
|
||||
(Test9: Format 2 8-bit 2/106 PRB),
|
||||
(Test10: Format 2 9-bit 2/106 PRB),
|
||||
(Test11: Format 2 10-bit 2/106 PRB),
|
||||
(Test12: Format 2 11-bit 2/106 PRB),
|
||||
(Test13: Format 2 12-bit 8/106 PRB),
|
||||
(Test14: Format 2 19-bit 8/106 PRB),
|
||||
(Test15: Format 2 32-bit 8/106 PRB),
|
||||
(Test16: Format 2 32-bit 16/106 PRB),
|
||||
(Test17: Format 2 64-bit 16/106 PRB)</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>
|
||||
@@ -1206,8 +1221,12 @@
|
||||
-R 106 -i 1 -P 2 -b 9 -s5 -n1000
|
||||
-R 106 -i 1 -P 2 -b 10 -s6 -n1000
|
||||
-R 106 -i 1 -P 2 -b 11 -s6 -n1000
|
||||
</main_exec_args>
|
||||
<tags>nr_pucchsim.test1 nr_pucchsim.test2 nr_pucchsim.test3 nr_pucchsim.test4 nr_pucchsim.test5 nr_pucchsim.test6 nr_pucchsim.test7 nr_pucchsim.test8 nr_pucchsim.test9 nr_pucchsim.test10 nr_pucchsim.test11 nr_pucchsim.test12 </tags>
|
||||
-R 106 -i 1 -P 2 -q8 -b 12 -s-3 -n1000
|
||||
-R 106 -i 1 -P 2 -q8 -b 19 -s-3 -n1000
|
||||
-R 106 -i 1 -P 2 -q8 -b 32 -s-3 -n1000
|
||||
-R 106 -i 1 -P 2 -q16 -b 32 -s-3 -n1000
|
||||
-R 106 -i 1 -P 2 -q16 -b 64 -s-3 -n1000</main_exec_args>
|
||||
<tags>nr_pucchsim.test1 nr_pucchsim.test2 nr_pucchsim.test3 nr_pucchsim.test4 nr_pucchsim.test5 nr_pucchsim.test6 nr_pucchsim.test7 nr_pucchsim.test8 nr_pucchsim.test9 nr_pucchsim.test10 nr_pucchsim.test11 nr_pucchsim.test12 nr_pucchsim.test13 nr_pucchsim.test14 nr_pucchsim.test15 nr_pucchsim.test16 nr_pucchsim.test17</tags>
|
||||
<search_expr_true>PUCCH test OK</search_expr_true>
|
||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||
<nruns>3</nruns>
|
||||
@@ -1275,6 +1294,28 @@
|
||||
<nruns>3</nruns>
|
||||
</testCase>
|
||||
|
||||
<testCase id="015112">
|
||||
<class>execution</class>
|
||||
<desc>nr_prachsim Test cases. (Test1: 106 PRBs - Prach format A2),
|
||||
(Test2: 217 PRBs - Prach format A2),
|
||||
(Test3: 273 PRBs - Prach format A2),
|
||||
(Test4: 106 PRBs - Prach format 0)</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>
|
||||
<pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</pre_exec>
|
||||
<pre_exec_args></pre_exec_args>
|
||||
<main_exec> $OPENAIR_DIR/targets/bin/nr_prachsim.Rel15</main_exec>
|
||||
<main_exec_args>-a -s -30 -n 100 -p 63 -R 106
|
||||
-a -s -30 -n 100 -p 63 -R 217
|
||||
-a -s -30 -n 100 -p 63 -R 273
|
||||
-a -s -30 -n 100 -p 63 -R 106 -c 4</main_exec_args>
|
||||
<tags>nr_prachsim.test1 nr_prachsim.test2 nr_prachsim.test3 nr_prachsim.test4</tags>
|
||||
<search_expr_true>PRACH test OK</search_expr_true>
|
||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||
<nruns>3</nruns>
|
||||
</testCase>
|
||||
|
||||
<testCase id="015500" >
|
||||
<class>lte-softmodem</class>
|
||||
<desc></desc>
|
||||
|
||||
@@ -406,7 +406,7 @@ function main() {
|
||||
shift 1;;
|
||||
-k | --skip-shared-libraries)
|
||||
SKIP_SHARED_LIB_FLAG="True"
|
||||
echo_info "Skipping build of shared libraries, rfsimulator, basicsimulator and transport protocol libraries"
|
||||
echo_info "Skipping build of shared libraries, rfsimulator and transport protocol libraries"
|
||||
shift;;
|
||||
--ninja)
|
||||
CMAKE_CMD="$CMAKE_CMD -GNinja"
|
||||
@@ -701,7 +701,8 @@ function main() {
|
||||
if [ "$SIMUS_PHY" = "1" ] ; then
|
||||
echo_info "Compiling physical unitary tests simulators"
|
||||
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
|
||||
simlist="dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
|
||||
# simlist="dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
|
||||
simlist="ldpctest"
|
||||
for f in $simlist ; do
|
||||
compilations \
|
||||
phy_simulators $f \
|
||||
@@ -896,7 +897,7 @@ function main() {
|
||||
$build_dir rfsimulator \
|
||||
librfsimulator.so $dbin/librfsimulator.so.$REL
|
||||
|
||||
echo_info "Compiling basicsimulator"
|
||||
echo_info "Compiling tcp_bridge_oai"
|
||||
compilations \
|
||||
$build_dir tcp_bridge_oai \
|
||||
libtcp_bridge_oai.so $dbin/libtcp_bridge_oai.so.$REL
|
||||
@@ -958,6 +959,7 @@ function main() {
|
||||
wait
|
||||
else
|
||||
echo_info "10. Bypassing the Tests ..."
|
||||
echo_success "BUILD SHOULD BE SUCCESSFUL"
|
||||
fi
|
||||
|
||||
}
|
||||
|
||||
@@ -150,7 +150,9 @@ clean_all_files() {
|
||||
set_openair_env
|
||||
dir=$OPENAIR_DIR/cmake_targets
|
||||
rm -rf $dir/log $OPENAIR_DIR/targets/bin/*
|
||||
rm -rf $dir/ran_build $dir/lte-simulators/build
|
||||
rm -rf $dir/ran_build $dir/ran_build_noLOG
|
||||
rm -rf $dir/lte-simulators/build
|
||||
rm -rf $dir/phy_simulators/build $dir/nas_sim_tools/build
|
||||
rm -rf $dir/oaisim_build_oai/build $dir/oaisim_build_oai/CMakeLists.txt
|
||||
rm -rf $dir/autotests/bin $dir/autotests/log $dir/autotests/*/build
|
||||
}
|
||||
@@ -167,17 +169,29 @@ check_warnings() {
|
||||
#we look for 'warning:' in the compilation log file
|
||||
#this is how gcc starts a warning
|
||||
#this is not perfect, we may get false positive
|
||||
warning_count=`grep "warning:" "$1"|wc -l`
|
||||
warning_count=`grep "warning:" "$1" | egrep -v "jobserver unavailable|disabling jobserver mode" | wc -l`
|
||||
if [ $warning_count -gt 0 ]; then
|
||||
echo_error "WARNING: $warning_count warnings. See $1"
|
||||
fi
|
||||
}
|
||||
|
||||
#check_errors:
|
||||
# print error message if the compilation had errors
|
||||
#argument:
|
||||
# $1: log file
|
||||
check_errors() {
|
||||
#we look for 'warning:' in the compilation log file
|
||||
error_count=`grep "error:" "$1" | wc -l`
|
||||
if [ $error_count -gt 0 ]; then
|
||||
echo_error "ERROR: $error_count error. See $1"
|
||||
fi
|
||||
}
|
||||
|
||||
compilations() {
|
||||
cd $OPENAIR_DIR/cmake_targets/$1/build
|
||||
echo_info "Log file for compilation is being written to: $dlog/$2.$REL.txt"
|
||||
set +e
|
||||
{
|
||||
rm -f $3
|
||||
if [ "$BUILD_COVERITY_SCAN" == "1" ]; then
|
||||
COV_SCAN_PREFIX="cov-build --dir cov-int"
|
||||
else
|
||||
@@ -192,15 +206,22 @@ compilations() {
|
||||
$COV_SCAN_PREFIX make -j`nproc` $2
|
||||
fi
|
||||
fi
|
||||
|
||||
ret=$?
|
||||
} > $dlog/$2.$REL.txt 2>&1
|
||||
set -e
|
||||
echo_info "Log file for compilation has been written to: $dlog/$2.$REL.txt"
|
||||
if [[ $ret -ne 0 ]]; then
|
||||
check_warnings "$dlog/$2.$REL.txt"
|
||||
check_errors "$dlog/$2.$REL.txt"
|
||||
echo_error "$2 compilation failed"
|
||||
exit 1
|
||||
fi
|
||||
if [ -s $3 ] ; then
|
||||
cp $3 $4
|
||||
echo_success "$2 compiled"
|
||||
check_warnings "$dlog/$2.$REL.txt"
|
||||
else
|
||||
check_warnings "$dlog/$2.$REL.txt"
|
||||
check_errors "$dlog/$2.$REL.txt"
|
||||
echo_error "$2 compilation failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -179,8 +179,8 @@ int config_libconfig_get(paramdef_t *cfgoptions,int numoptions, char *prefix ) {
|
||||
*(cfgoptions[i].u64ptr) = (uint64_t)llu;
|
||||
printf_params("[LIBCONFIG] %s: %llu\n", cfgpath,(long long unsigned)(*(cfgoptions[i].u64ptr)) );
|
||||
} else {
|
||||
*(cfgoptions[i].iptr) = llu;
|
||||
printf_params("[LIBCONFIG] %s: %llu\n", cfgpath,(long long unsigned)(*(cfgoptions[i].i64ptr)) );
|
||||
*(cfgoptions[i].i64ptr) = llu;
|
||||
printf_params("[LIBCONFIG] %s: %lld\n", cfgpath,(long long)(*(cfgoptions[i].i64ptr)) );
|
||||
}
|
||||
} else {
|
||||
defval=config_setdefault_int64(&(cfgoptions[i]),prefix);
|
||||
|
||||
@@ -518,7 +518,29 @@ const char* eurecomFunctionsNames[] = {
|
||||
"wakeup_txfh",
|
||||
"gNB_thread_rxtx0",
|
||||
"gNB_thread_rxtx1",
|
||||
"ru_thread_tx_wait"
|
||||
"ru_thread_tx_wait",
|
||||
"gNB_ulsch_decoding",
|
||||
"gNB_pdsch_codeword_scrambling",
|
||||
"gNB_dlsch_encoding",
|
||||
"gNB_pdsch_modulation",
|
||||
"gNB_pdcch_tx",
|
||||
"phy_procedures_gNB_tx",
|
||||
"phy_procedures_gNB_common_tx",
|
||||
"phy_procedures_gNB_uespec_rx",
|
||||
"nr_rx_pusch",
|
||||
"nr_ulsch_procedures_rx",
|
||||
"macxface_gNB_dlsch_ulsch_scheduler",
|
||||
|
||||
/*NR ue-softmodem signal*/
|
||||
"nr_ue_ulsch_encoding",
|
||||
"nr_segmentation",
|
||||
"ldpc_encoder_optim",
|
||||
"nr_rate_matching_ldpc",
|
||||
"nr_interleaving_ldpc",
|
||||
"pss_synchro_nr",
|
||||
"pss_search_time_nr",
|
||||
"nr_initial_ue_sync",
|
||||
"beam_switching_gpio"
|
||||
};
|
||||
|
||||
struct vcd_module_s vcd_modules[] = {
|
||||
|
||||
@@ -511,6 +511,29 @@ typedef enum {
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX0,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PROC_RXTX1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_RU_TX_WAIT,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_ULSCH_DECODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_gNB_PDCCH_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_COMMON_TX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_UESPEC_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RX_PUSCH,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_ULSCH_PROCEDURES_RX,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ULSCH_SCHEDULER,
|
||||
|
||||
/* NR ue-softmodem signal*/
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_UE_ULSCH_ENCODING,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_SEGMENTATION,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LDPC_ENCODER_OPTIM,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_RATE_MATCHING_LDPC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INTERLEAVING_LDPC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SYNCHRO_NR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_PSS_SEARCH_TIME_NR,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_BEAM_SWITCHING_GPIO,
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_END
|
||||
} vcd_signal_dump_functions;
|
||||
|
||||
@@ -73,7 +73,7 @@ typedef struct {
|
||||
} T_cache_t;
|
||||
|
||||
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_NUM_FUNCTIONS (249)
|
||||
#define VCD_NUM_FUNCTIONS (269)
|
||||
|
||||
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_NUM_VARIABLES (187)
|
||||
|
||||
@@ -3393,3 +3393,106 @@ ID = VCD_FUNCTION_RU_TX_WAIT
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = ru_thread_tx_wait
|
||||
ID = VCD_FUNCTION_PHY_gNB_ULSCH_DECODING
|
||||
DESC = VCD function PHY_gNB_ULSCH_DECODING
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = gNB_ulsch_decoding
|
||||
ID = VCD_FUNCTION_gNB_PDSCH_CODEWORD_SCRAMBLING
|
||||
DESC = VCD function gNB_PDSCH_CODEWORD_SCRAMBLING
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = gNB_pdsch_codeword_scrambling
|
||||
ID = VCD_FUNCTION_gNB_DLSCH_ENCODING
|
||||
DESC = VCD function gNB_DLSCH_ENCODING
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = gNB_dlsch_encoding
|
||||
ID = VCD_FUNCTION_gNB_PDSCH_MODULATION
|
||||
DESC = VCD function gNB_PDSCH_MODULATION
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = gNB_pdsch_modulation
|
||||
ID = VCD_FUNCTION_PHY_gNB_PDCCH_TX
|
||||
DESC = VCD function PHY_gNB_PDCCH_TX
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = gNB_pdcch_tx
|
||||
ID = VCD_FUNCTION_PHY_PROCEDURES_gNB_TX
|
||||
DESC = VCD function PHY_PROCEDURES_gNB_TX
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = phy_procedures_gNB_tx
|
||||
ID = VCD_FUNCTION_PHY_PROCEDURES_gNB_COMMON_TX
|
||||
DESC = VCD function PHY_PROCEDURES_gNB_COMMON_TX
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = phy_procedures_gNB_common_tx
|
||||
ID = VCD_FUNCTION_PHY_PROCEDURES_gNB_UESPEC_RX
|
||||
DESC = VCD function PHY_PROCEDURES_gNB_UESPEC_RX
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = phy_procedures_gNB_uespec_rx
|
||||
ID = VCD_FUNCTION_NR_RX_PUSCH
|
||||
DESC = VCD function NR_RX_PUSCH
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = nr_rx_pusch
|
||||
ID = VCD_FUNCTION_NR_ULSCH_PROCEDURES_RX
|
||||
DESC = VCD function NR_ULSCH_PROCEDURES_RX
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = nr_ulsch_procedures_rx
|
||||
ID = VCD_FUNCTION_gNB_DLSCH_ULSCH_SCHEDULER
|
||||
DESC = VCD function gNB_DLSCH_ULSCH_SCHEDULER
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = macxface_gNB_dlsch_ulsch_scheduler
|
||||
|
||||
#function for nrUE
|
||||
ID = VCD_FUNCTION_NR_UE_ULSCH_ENCODING
|
||||
DESC = VCD function NR_UE_ULSCH_ENCODING
|
||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = nr_ue_ulsch_encoding
|
||||
ID = VCD_FUNCTION_NR_SEGMENTATION
|
||||
DESC = VCD function NR_SEGMENTATION
|
||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = nr_segmentation
|
||||
ID = VCD_FUNCTION_LDPC_ENCODER_OPTIM
|
||||
DESC = VCD function LDPC_ENCODER_OPTIM
|
||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = ldpc_encoder_optim
|
||||
ID = VCD_FUNCTION_NR_RATE_MATCHING_LDPC
|
||||
DESC = VCD function NR_RATE_MATCHING_LDPC
|
||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = nr_rate_matching_ldpc
|
||||
ID = VCD_FUNCTION_NR_INTERLEAVING_LDPC
|
||||
DESC = VCD function NR_INTERLEAVING_LDPC
|
||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = nr_interleaving_ldpc
|
||||
ID = VCD_FUNCTION_PSS_SYNCHRO_NR
|
||||
DESC = VCD function PSS_SYNCHRO_NR
|
||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = pss_synchro_nr
|
||||
ID = VCD_FUNCTION_PSS_SEARCH_TIME_NR
|
||||
DESC = VCD function PSS_SEARCH_TIME_NR
|
||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = pss_search_time_nr
|
||||
ID = VCD_FUNCTION_NR_INITIAL_UE_SYNC
|
||||
DESC = VCD function NR_INITIAL_UE_SYNC
|
||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = nr_initial_ue_sync
|
||||
ID = VCD_FUNCTION_BEAM_SWITCHING_GPIO
|
||||
DESC = VCD function BEAM_SWITCHING_GPIO
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = beam_switching_gpio
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@ int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB) {
|
||||
else return(N_RB-1-tmp2);
|
||||
}
|
||||
|
||||
/* TS 38.214 ch. 6.1.2.2.2 - Resource allocation type 1 for DL and UL */
|
||||
int PRBalloc_to_locationandbandwidth0(int NPRB,int RBstart,int BWPsize) {
|
||||
AssertFatal(NPRB>0 && (NPRB + RBstart <= BWPsize),"Illegal NPRB/RBstart Configuration (%d,%d) for BWPsize %d\n",NPRB,RBstart,BWPsize);
|
||||
|
||||
@@ -62,14 +63,21 @@ int PRBalloc_to_locationandbandwidth0(int NPRB,int RBstart,int BWPsize) {
|
||||
int PRBalloc_to_locationandbandwidth(int NPRB,int RBstart) {
|
||||
return(PRBalloc_to_locationandbandwidth0(NPRB,RBstart,275));
|
||||
}
|
||||
|
||||
/// Target code rate tables indexed by Imcs
|
||||
/* TS 38.214 table 5.1.3.1-1 - MCS index table 1 for PDSCH */
|
||||
uint16_t nr_target_code_rate_table1[29] = {120, 157, 193, 251, 308, 379, 449, 526, 602, 679, 340, 378, 434, 490, 553, \
|
||||
616, 658, 438, 466, 517, 567, 616, 666, 719, 772, 822, 873, 910, 948};
|
||||
// Imcs values 20 and 26 have been multiplied by 2 to avoid the floating point
|
||||
|
||||
/* TS 38.214 table 5.1.3.1-2 - MCS index table 2 for PDSCH */
|
||||
// Imcs values 20 and 26 have been multiplied by 2 to avoid the floating point
|
||||
uint16_t nr_target_code_rate_table2[28] = {120, 193, 308, 449, 602, 378, 434, 490, 553, 616, 658, 466, 517, 567, \
|
||||
616, 666, 719, 772, 822, 873, 1365, 711, 754, 797, 841, 885, 1833, 948};
|
||||
|
||||
/* TS 38.214 table 5.1.3.1-3 - MCS index table 3 for PDSCH */
|
||||
uint16_t nr_target_code_rate_table3[29] = {30, 40, 50, 64, 78, 99, 120, 157, 193, 251, 308, 379, 449, 526, 602, 340, \
|
||||
378, 434, 490, 553, 616, 438, 466, 517, 567, 616, 666, 719, 772};
|
||||
|
||||
uint16_t nr_tbs_table[93] = {24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168, 176, 184, 192, 208, 224, 240, 256, 272, 288, 304, 320, \
|
||||
336, 352, 368, 384, 408, 432, 456, 480, 504, 528, 552, 576, 608, 640, 672, 704, 736, 768, 808, 848, 888, 928, 984, 1032, 1064, 1128, 1160, 1192, 1224, 1256, \
|
||||
1288, 1320, 1352, 1416, 1480, 1544, 1608, 1672, 1736, 1800, 1864, 1928, 2024, 2088, 2152, 2216, 2280, 2408, 2472, 2536, 2600, 2664, 2728, 2792, 2856, 2976, \
|
||||
|
||||
@@ -91,8 +91,16 @@ task_list_t tasks[TASK_MAX];
|
||||
return (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
// in the two following functions, the +32 in malloc is there to deal with gcc memory alignment
|
||||
// because a struct size can be larger than sum(sizeof(struct components))
|
||||
// We should remove the itti principle of a huge union for all types of messages in paramter "msg_t ittiMsg"
|
||||
// to use a more C classical pointer casting "void * ittiMsg", later casted in the right struct
|
||||
// but we would have to change all legacy macros, as per this example
|
||||
// #define S1AP_REGISTER_ENB_REQ(mSGpTR) (mSGpTR)->ittiMsg.s1ap_register_enb_req
|
||||
// would become
|
||||
// #define S1AP_REGISTER_ENB_REQ(mSGpTR) (s1ap_register_enb_req) mSGpTR)->ittiMsg
|
||||
MessageDef *itti_alloc_new_message_sized(task_id_t origin_task_id, MessagesIds message_id, MessageHeaderSize size) {
|
||||
MessageDef *temp = (MessageDef *)itti_malloc (origin_task_id, TASK_UNKNOWN, sizeof(MessageHeader) + size);
|
||||
MessageDef *temp = (MessageDef *)itti_malloc (origin_task_id, TASK_UNKNOWN, sizeof(MessageHeader) +32 + size);
|
||||
temp->ittiMsgHeader.messageId = message_id;
|
||||
temp->ittiMsgHeader.originTaskId = origin_task_id;
|
||||
temp->ittiMsgHeader.ittiMsgSize = size;
|
||||
@@ -100,7 +108,7 @@ task_list_t tasks[TASK_MAX];
|
||||
}
|
||||
|
||||
MessageDef *itti_alloc_new_message(task_id_t origin_task_id, MessagesIds message_id) {
|
||||
int size=sizeof(MessageHeader) + messages_info[message_id].size;
|
||||
int size=sizeof(MessageHeader) + 32 + messages_info[message_id].size;
|
||||
MessageDef *temp = (MessageDef *)itti_malloc (origin_task_id, TASK_UNKNOWN, size);
|
||||
temp->ittiMsgHeader.messageId = message_id;
|
||||
temp->ittiMsgHeader.originTaskId = origin_task_id;
|
||||
|
||||
@@ -256,6 +256,7 @@ typedef struct IttiMsgText_s {
|
||||
//#include <proto.h>
|
||||
|
||||
#include <openair3/GTPV1-U/gtpv1u_eNB_task.h>
|
||||
#include <openair3/GTPV1-U/gtpv1u_gNB_task.h>
|
||||
void *rrc_enb_process_itti_msg(void *);
|
||||
#include <openair3/SCTP/sctp_eNB_task.h>
|
||||
#include <openair3/S1AP/s1ap_eNB.h>
|
||||
@@ -414,7 +415,7 @@ static const message_info_t messages_info[] = {
|
||||
#undef MESSAGE_DEF
|
||||
};
|
||||
|
||||
typedef struct __attribute__ ((__packed__)) MessageDef_s {
|
||||
typedef struct MessageDef_s {
|
||||
MessageHeader ittiMsgHeader; /**< Message header */
|
||||
msg_t ittiMsg;
|
||||
} MessageDef;
|
||||
|
||||
@@ -16,7 +16,6 @@ This page is valid on tags starting from **`2019.w09`**.
|
||||
|
||||
# Soft Modem Build Script
|
||||
|
||||
oai EPC is developed in a distinct project with it's own [documentation](https://github.com/OPENAIRINTERFACE/openair-cn/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).
|
||||
|
||||
|
||||
+117
-58
@@ -1,6 +1,8 @@
|
||||
**Table of Contents**
|
||||
|
||||
1. [OpenAirInterface eNB Feature Set](#openairinterface-enb-feature-set)
|
||||
1. [Functional Split Architecture](#functional-split-architecture)
|
||||
2. [OpenAirInterface Block Diagram](#openairinterface-block-diagram)
|
||||
2. [OpenAirInterface 4G-LTE eNB Feature Set](#openairinterface-4g-lte-enb-feature-set)
|
||||
1. [eNB PHY Layer](#enb-phy-layer)
|
||||
2. [eNB MAC Layer](#enb-mac-layer)
|
||||
3. [eNB RLC Layer](#enb-rlc-layer)
|
||||
@@ -9,29 +11,38 @@
|
||||
6. [eNB X2AP](#enb-x2ap)
|
||||
7. [eNB/MCE M2AP](#enbmce-m2ap)
|
||||
8. [MCE/MME M3AP](#mcemme-m3ap)
|
||||
9. [eNB Advanced Features](#enb-advanced-features)
|
||||
2. [OpenAirInterface Functional Split](#openairinterface-functional-split)
|
||||
3. [OpenAirInterface UE Feature Set](#openairinterface-ue-feature-set)
|
||||
3. [OpenAirInterface 4G-LTE UE Feature Set](#openairinterface-4g-lte-ue-feature-set)
|
||||
1. [LTE UE PHY Layer](#lte-ue-phy-layer)
|
||||
2. [LTE UE MAC Layer](#lte-ue-mac-layer)
|
||||
3. [LTE UE RLC Layer](#lte-ue-rlc-layer)
|
||||
4. [LTE UE PDCP Layer](#lte-ue-pdcp-layer)
|
||||
5. [LTE UE RRC Layer](#lte-ue-rrc-layer)
|
||||
4. [OpenAirInterface Functional Split](#openairinterface-functional-split)
|
||||
5. [OpenAirInterface 5G-NR Feature Set](#openairinterface-5g-nr-feature-set)
|
||||
4. [OpenAirInterface 5G-NR gNB Feature Set](#openairinterface-5g-nr-feature-set)
|
||||
1. [General Parameters](#general-parameters)
|
||||
2. [gNB Features](#gnb-features)
|
||||
1. [gNB Physical Layer](#gnb-phy-layer)
|
||||
2. [gNB Higher Layers](#gnb-higher-layers)
|
||||
3. [NR UE Features](#nr-ue-features)
|
||||
1. [NR UE Physical Layer](#nr-ue-phy-layer)
|
||||
2. [NR UE Higher Layers](#nr-ue-higher-layers)
|
||||
2. [gNB Physical Layer](#gnb-phy-layer)
|
||||
3. [gNB Higher Layers](#gnb-higher-layers)
|
||||
5. [OpenAirInterface 5G-NR UE Feature Set](#openairinterface-5g-nr-ue-feature-set)
|
||||
1. [UE Physical Layer](#ue-phy-layer)
|
||||
2. [UE Higher Layers](#ue-higher-layers)
|
||||
|
||||
# OpenAirInterface Block diagram #
|
||||
|
||||
# Functional Split Architecture #
|
||||
|
||||
- RCC: Radio-Cloud Center
|
||||
- RAU: Radio-Access Unit
|
||||
- RRU: Remote Radio-Unit
|
||||
- IF4.5 / IF5 : similar to IEEE P1914.1
|
||||
- FAPI (IF2) : specified by Small Cell Forum (open-nFAPI implementation)
|
||||
- IF1 : F1 in 3GPP Release 15
|
||||
|
||||

|
||||
|
||||
|
||||
# OpenAirInterface Block Diagram #
|
||||
|
||||

|
||||
|
||||
# OpenAirInterface eNB Feature Set #
|
||||
# OpenAirInterface 4G LTE eNB Feature Set #
|
||||
|
||||
## eNB PHY Layer ##
|
||||
|
||||
@@ -82,7 +93,11 @@ TDD UL: 20 MHz, 100 PRBS/ MCS **XX** | 3.0 Mbit/s | TM1: 4.21 Mbits/s
|
||||
The MAC layer implements a subset of the **3GPP 36.321** release v8.6 in support of BCH, DLSCH, RACH, and ULSCH channels.
|
||||
|
||||
- RRC interface for CCCH, DCCH, and DTCH
|
||||
- Proportional fair scheduler (round robin scheduler soon)
|
||||
- Proportional fair scheduler (round robin scheduler soon), with the following improvements:
|
||||
- Up to 30 users tested in the L2 simulator, CCE allocation in the preprocessor ; the scheduler was also simplified and made more modular
|
||||
- Adaptative UL-HARQ
|
||||
- Remove out-of-sync UEs
|
||||
- No use of the `first_rb` in the UL scheduler ; respects `vrb_map_UL` and `vrb_map` in the DL
|
||||
- DCI generation
|
||||
- HARQ Support
|
||||
- RA procedures and RNTI management
|
||||
@@ -123,7 +138,7 @@ The current PDCP layer is header compliant with **3GPP 36.323** Rel 10.1.0 and i
|
||||
|
||||
## eNB RRC Layer ##
|
||||
|
||||
The RRC layer is based on **3GPP 36.331** v14.3.0 and implements the following functions:
|
||||
The RRC layer is based on **3GPP 36.331** v15.6 and implements the following functions:
|
||||
|
||||
- System Information broadcast (SIB 1, 2, 3, and 13)
|
||||
* SIB1: Up to 6 PLMN IDs broadcast
|
||||
@@ -150,6 +165,10 @@ The X2AP layer is based on **3GPP 36.423** v14.6.0 and implements the following
|
||||
- X2 timers (t_reloc_prep, tx2_reloc_overall)
|
||||
- Handover Cancel
|
||||
- X2-U interface implemented
|
||||
- EN-DC is implemented
|
||||
- X2AP : Handling of SgNB Addition Request / Addition Request Acknowledge / Reconfiguration Complete
|
||||
- RRC : Handling of RRC Connection Reconfiguration with 5G cell info, configuration of 5G-NR measurements
|
||||
- S1AP : Handling of E-RAB Modification Indication / Confirmation
|
||||
|
||||
## eNB/MCE M2AP ##
|
||||
|
||||
@@ -171,11 +190,8 @@ The M3AP layer is based on **3GPP 36.444** v14.0.1:
|
||||
- M3 Session Start Request
|
||||
- M3 Session Start Response
|
||||
|
||||
## eNB Advanced Features ##
|
||||
|
||||
**To be completed**
|
||||
|
||||
# OpenAirInterface UE Feature Set #
|
||||
# OpenAirInterface 4G LTE UE Feature Set #
|
||||
|
||||
## LTE UE PHY Layer ##
|
||||
|
||||
@@ -230,17 +246,6 @@ The NAS layer is based on **3GPP 24.301** and implements the following functions
|
||||
- EMM attach/detach, authentication, tracking area update, and more
|
||||
- ESM default/dedicated bearer, PDN connectivity, and more
|
||||
|
||||
# OpenAirInterface Functional Split #
|
||||
|
||||
- RCC: Radio-Cloud Center
|
||||
- RAU: Radio-Access Unit
|
||||
- RRU: Remote Radio-Unit
|
||||
|
||||

|
||||
|
||||
- IF4.5 / IF5 : similar to IEEE P1914.1
|
||||
- FAPI (IF2) : specified by Small Cell Forum (open-nFAPI implementation)
|
||||
- IF1 : F1 in 3GPP Release 15
|
||||
|
||||
# OpenAirInterface 5G-NR Feature Set #
|
||||
|
||||
@@ -258,49 +263,103 @@ The following features are valid for the gNB and the 5G-NR UE.
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
* Encoder and decoder for short blocks
|
||||
|
||||
## gNB Features ##
|
||||
|
||||
### gNB PHY Layer ###
|
||||
## gNB PHY Layer ##
|
||||
|
||||
* Generation of PSS/SSS/PBCH for multiple beams and
|
||||
* Generation of PDCCH for SIB1 (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc)
|
||||
* 30KHz SCS for FR1 and 120 KHz SCS for FR2
|
||||
* Generation of NR-PSS/NR-SSS
|
||||
* NR-PBCH supports multiple SSBs and flexible periodicity
|
||||
* Generation of NR-PDCCH for SIB1 (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc)
|
||||
- common search space configured by MIB
|
||||
- user-specific search space configured by RRC
|
||||
- DCI formats: 00, 10
|
||||
* Generation of PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
- Single symbol DMRS, dmrs-TypeA-Position Pos2, DMRS configuration type 1
|
||||
- PDSCH mapping type A
|
||||
- DCI formats: 00, 10 (01 and 11 **under integration**)
|
||||
* Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
- Single symbol DMRS, DMRS-TypeA-Position Pos2, DMRS configuration type 1
|
||||
- PDSCH mapping type A
|
||||
* NR-CSI Generation of sequence at PHY (**under integration**)
|
||||
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
* NR-PUCCH
|
||||
- Format 0 (ACK/NACK)
|
||||
- Format 0 (2 bits, mainly for ACK/NACK)
|
||||
- Format 2 (up to 64 bits, mainly for CSI feedback)
|
||||
* NR-PRACH
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
* Encoder and decoder for short block
|
||||
|
||||
### gNB higher Layers ###
|
||||
|
||||
## gNB Higher Layers ##
|
||||
|
||||
**gNB RRC**
|
||||
- NR RRC (38.331) Rel 15 messages using new asn1c
|
||||
- LTE RRC (36.331) also updated to Rel 15
|
||||
- Generation of MIB
|
||||
- Generation of CellGroupConfig (for eNB) and MIB
|
||||
- Application to read configuration file and program gNB RRC
|
||||
- RRC -> MAC configuration
|
||||
- MAC -> PHY configuration (using NR FAPI P5 interface)
|
||||
- FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
|
||||
- RRC can configure PDCP, RLC, MAC
|
||||
|
||||
For more details see [this document](https://gitlab.eurecom.fr/oai/openairinterface5g/uploads/ba5368448d627743a28c770c29e8978e/OAI_Software_Architecture_for_Dual_Connectivity_in_E-UTRA_and_5G-NR_and_nFAPI_for_MAC-PHY_Interface.docx)
|
||||
**gNB X2AP**
|
||||
- X2 setup with eNB
|
||||
- Handling of SgNB Addition Request / Addition Request Acknowledge / Reconfiguration Complete
|
||||
|
||||
## NR UE Features ##
|
||||
**gNB MAC**
|
||||
- MAC -> PHY configuration using NR FAPI P5 interface
|
||||
- MAC <-> PHY data interface using FAPI P7 interface for BCH PDU, DCI PDU, PDSCH PDU
|
||||
- Scheduler for RA procedreat gNB
|
||||
- MAC downlink scheduler (fixed allocations)
|
||||
- MAC header generation (including timing advance)
|
||||
- ACK / NACK handling and HARQ procedures for downlink
|
||||
- **As of May 2020** only DL was validated with COTS phone ; UL in progress, validated with OAI UE in noS1 mode
|
||||
|
||||
### NR UE PHY Layer ###
|
||||
# OpenAirInterface 5G-NR UE Feature Set #
|
||||
|
||||
- initial synchronization
|
||||
- Time tracking based on PDCCH DMRS
|
||||
- Frequency offset estimation
|
||||
- PBCH RX
|
||||
- PDCCH RX
|
||||
- PDSCH RX
|
||||
- including first version of dual stream receiver for PDSCH
|
||||
**as of May 2020** only supporting "noS1" mode (DL):
|
||||
- Creates TUN interface to PDCP to inject and receive user-place traffic
|
||||
- Will only work with OAI gNB configured in the same mode
|
||||
|
||||
## UE PHY Layer ##
|
||||
|
||||
* Initial synchronization
|
||||
* Time tracking based on PBCH DMRS
|
||||
* Time tracking based on PBCH DMRS
|
||||
* Frequency offset estimation
|
||||
* PBCH RX
|
||||
* PDCCH RX
|
||||
* PDSCH RX, including a first version of dual stream receiver for PDSCH
|
||||
* 30KHz SCS for FR1 and 120 KHz SCS for FR2
|
||||
* Generation of NR-PSS/NR-SSS
|
||||
* NR-PBCH supports multiple SSBs and flexible periodicity
|
||||
* Generation of NR-PDCCH for SIB1 (including generation of DCI, polar encoding, scrambling, modulation, RB mapping, etc)
|
||||
- common search space configured by MIB
|
||||
- user-specific search space configured by RRC
|
||||
- DCI formats: 00, 10 (01 and 11 **under integration**)
|
||||
* Generation of NR-PDSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
- Single symbol DMRS, DMRS-TypeA-Position Pos2, DMRS configuration type 1
|
||||
- PDSCH mapping type A
|
||||
* NR-CSI Generation of sequence at PHY (**under integration**)
|
||||
* NR-PUSCH (including Segmentation, LDPC encoding, rate matching, scrambling, modulation, RB mapping, etc).
|
||||
* NR-PUCCH
|
||||
- Format 0 (2 bits, mainly for ACK/NACK)
|
||||
- Format 2 (up to 64 bits, mainly for CSI feedback)
|
||||
* NR-PRACH
|
||||
- Formats 0,1,2,3, A1-A3, B1-B3
|
||||
* Highly efficient 3GPP compliant LDPC encoder and decoder (BG1 and BG2 are supported)
|
||||
* Highly efficient 3GPP compliant polar encoder and decoder
|
||||
* Encoder and decoder for short block
|
||||
|
||||
|
||||
## UE Higher Layers ##
|
||||
|
||||
**gNB MAC**
|
||||
- Initial sync and MIB detection
|
||||
- MAC -> PHY configuration of PHY via UE FAPI P5 interface
|
||||
- Basic MAC to control PHY via UE FAPI P7 interface
|
||||
- Random access procedure
|
||||
|
||||
|
||||
**RLC**
|
||||
|
||||
**PDCP**
|
||||
|
||||
### NR UE higher Layers ###
|
||||
|
||||
For more details see [this document](https://gitlab.eurecom.fr/oai/openairinterface5g/uploads/f7386f3a64806fd6b2ac1fc3d0252fff/UE_FAPI-like_interface.docx)
|
||||
|
||||
[OAI wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
|
||||
|
||||
@@ -56,9 +56,56 @@ oai supports [number of deployment](FEATURE_SET.md) model, the following are tes
|
||||
1. [Monolithic eNodeB](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/HowToConnectCOTSUEwithOAIeNBNew) where the whole signal processing is performed in a single process
|
||||
2. if4p5 mode, where frequency domain samples are carried over ethernet, from the RRU which implement part of L1(FFT,IFFT,part of PRACH), to a RAU
|
||||
|
||||
# 5G NR
|
||||
|
||||
As of February 2020, all 5G NR development is part of the develop branch (the branch develop-nr is no longer maintained). This also means that all new development will be merged into there once it passes all the CI.
|
||||
|
||||
## NSA setup with COTS UE
|
||||
|
||||
This setup requires an EPC, an OAI eNB and gNB, and a COTS Phone. A dedicated page describe the setup can be found [here](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home/gNB-COTS-UE-testing).
|
||||
|
||||
### Launch gNB
|
||||
|
||||
```bash sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf```
|
||||
|
||||
### Launch eNB
|
||||
|
||||
```bash sudo ./lte-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf```
|
||||
|
||||
|
||||
|
||||
## phy-test setup with OAI UE
|
||||
|
||||
The OAI UE can also be used in front of a OAI gNB without the support of eNB or EPC. In this case both gNB and eNB need to be run with the --phy-test flag. At the gNB this flag does the following
|
||||
- it reads the RRC configuration from the configuration file
|
||||
- it encodes the RRCConfiguration and the RBconfig message and stores them in the binary files rbconfig.raw and reconfig.raw
|
||||
- the MAC uses a pre-configured allocation of PDSCH and PUSCH with randomly generated payload
|
||||
|
||||
At the UE the --phy-test flag will
|
||||
- read the binary files rbconfig.raw and reconfig.raw from the current directory (a different directory can be specified with the flag --rrc_config_path) and process them.
|
||||
|
||||
|
||||
### Launch gNB
|
||||
|
||||
```bash sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf --phy-test```
|
||||
|
||||
### Launch UE in another window
|
||||
|
||||
```bash sudo ./nr-uesoftmodem --phy-test [--rrc_config_path ../../../ci-scripts/rrc-files]```
|
||||
|
||||
Some other useful paramters of the UE are
|
||||
|
||||
- --ue-fo-compensation: enables the frequency offset compenstation at the UE. This is useful when running over the air and/or without an external clock/time source
|
||||
- --usrp-args: this is the equivalend paramter of sdr_addrs field in the gNB config file and can be used to identify the USRP and set some basic paramters (like the clock source)
|
||||
- --clock-source: sets the clock-source (internal or external).
|
||||
- --time-source: sets the time-source (internal or external).
|
||||
|
||||
|
||||
## noS1 setup with OAI UE
|
||||
|
||||
Instead of randomly generated payload, in the phy-test mode we can also inject/receive user-plane traffic over a TUN interface. This is the so-called noS1 mode.
|
||||
|
||||
This setup is described in the [rfsimulator page](../targets/ARCH/rfsimulator/README.md#5g-case). In theory this should also work with the real hardware target although this has yet to be tested.
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
int split73;
|
||||
char * split73_config;
|
||||
int split73;
|
||||
int usrp_tx_thread = 0;
|
||||
|
||||
static void *ru_thread( void *param );
|
||||
void kill_RU_proc(RU_t *ru) {
|
||||
@@ -1152,6 +1153,7 @@ int restart_L1L2(module_id_t enb_id) {
|
||||
}
|
||||
|
||||
int main ( int argc, char **argv ) {
|
||||
//mtrace();
|
||||
int i;
|
||||
int CC_id = 0;
|
||||
int node_type = ngran_eNB;
|
||||
|
||||
+13
-5
@@ -47,7 +47,7 @@
|
||||
#include "SCHED/sched_eNB.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
#include "SCHED_NR/fapi_nr_l1.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
|
||||
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
//#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
|
||||
@@ -61,7 +61,6 @@
|
||||
|
||||
#include "PHY/phy_extern.h"
|
||||
|
||||
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface.h"
|
||||
@@ -162,14 +161,14 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
|
||||
/*if (gNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus||
|
||||
gNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs ||
|
||||
gNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs ||
|
||||
gNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles ||
|
||||
gNB->UL_INFO.rach_ind.number_of_pdus ||
|
||||
gNB->UL_INFO.cqi_ind.number_of_cqis
|
||||
) {
|
||||
LOG_D(PHY, "UL_info[rx_ind:%05d:%d harqs:%05d:%d crcs:%05d:%d preambles:%05d:%d cqis:%d] RX:%04d%d TX:%04d%d \n",
|
||||
LOG_D(PHY, "UL_info[rx_ind:%05d:%d harqs:%05d:%d crcs:%05d:%d rach_pdus:%0d.%d:%d cqis:%d] RX:%04d%d TX:%04d%d \n",
|
||||
NFAPI_SFNSF2DEC(gNB->UL_INFO.rx_ind.sfn_sf), gNB->UL_INFO.rx_ind.rx_indication_body.number_of_pdus,
|
||||
NFAPI_SFNSF2DEC(gNB->UL_INFO.harq_ind.sfn_sf), gNB->UL_INFO.harq_ind.harq_indication_body.number_of_harqs,
|
||||
NFAPI_SFNSF2DEC(gNB->UL_INFO.crc_ind.sfn_sf), gNB->UL_INFO.crc_ind.crc_indication_body.number_of_crcs,
|
||||
NFAPI_SFNSF2DEC(gNB->UL_INFO.rach_ind.sfn_sf), gNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles,
|
||||
gNB->UL_INFO.rach_ind.sfn, gNB->UL_INFO.rach_ind.slot,gNB->UL_INFO.rach_ind.number_of_pdus,
|
||||
gNB->UL_INFO.cqi_ind.number_of_cqis,
|
||||
frame_rx, slot_rx,
|
||||
frame_tx, slot_tx);
|
||||
@@ -202,6 +201,13 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
|
||||
if (rx_slot_type == NR_UPLINK_SLOT || rx_slot_type == NR_MIXED_SLOT) {
|
||||
// UE-specific RX processing for subframe n
|
||||
// TODO: check if this is correct for PARALLEL_RU_L1_TRX_SPLIT
|
||||
|
||||
// Do PRACH RU processing
|
||||
int prach_id=find_nr_prach(gNB,frame_rx,slot_rx,0,SEARCH_EXIST);
|
||||
if (prach_id>=0) {
|
||||
L1_nr_prach_procedures(gNB,frame_rx,slot_rx,&gNB->prach_vars.list[prach_id].pdu);
|
||||
gNB->prach_vars.list[prach_id].frame=-1;
|
||||
}
|
||||
phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx);
|
||||
}
|
||||
|
||||
@@ -957,12 +963,14 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
|
||||
gNB->if_inst->NR_PHY_config_req = nr_phy_config_request;
|
||||
memset((void *)&gNB->UL_INFO,0,sizeof(gNB->UL_INFO));
|
||||
LOG_I(PHY,"Setting indication lists\n");
|
||||
|
||||
gNB->UL_INFO.rx_ind.pdu_list = gNB->rx_pdu_list;
|
||||
gNB->UL_INFO.crc_ind.crc_list = gNB->crc_pdu_list;
|
||||
/*gNB->UL_INFO.sr_ind.sr_indication_body.sr_pdu_list = gNB->sr_pdu_list;
|
||||
gNB->UL_INFO.harq_ind.harq_indication_body.harq_pdu_list = gNB->harq_pdu_list;
|
||||
gNB->UL_INFO.cqi_ind.cqi_pdu_list = gNB->cqi_pdu_list;
|
||||
gNB->UL_INFO.cqi_ind.cqi_raw_pdu_list = gNB->cqi_raw_pdu_list;*/
|
||||
|
||||
gNB->prach_energy_counter = 0;
|
||||
}
|
||||
|
||||
|
||||
+95
-36
@@ -51,6 +51,7 @@
|
||||
#include "PHY/defs_nr_common.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "SCHED/sched_eNB.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
@@ -117,6 +118,7 @@ uint16_t sl_ahead;
|
||||
|
||||
extern int emulate_rf;
|
||||
extern int numerology;
|
||||
extern int usrp_tx_thread;
|
||||
|
||||
/*************************************************************/
|
||||
/* Functions to attach and configure RRU */
|
||||
@@ -289,7 +291,7 @@ void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
// southbound IF4p5 fronthaul
|
||||
void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
{
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->gNB_list[0]->gNB_config;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||
if (ru == RC.ru[0]) VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx&0xffffffff );
|
||||
|
||||
LOG_D(PHY,"Sending IF4p5 for frame %d subframe %d\n",ru->proc.frame_tx,ru->proc.tti_tx);
|
||||
@@ -500,7 +502,7 @@ void fh_if5_north_asynch_in(RU_t *ru,int *frame,int *slot) {
|
||||
|
||||
void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *slot) {
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->gNB_list[0]->gNB_config;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
uint16_t packet_type;
|
||||
uint32_t symbol_number,symbol_mask,symbol_mask_full=0;
|
||||
@@ -697,7 +699,7 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
|
||||
void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->gNB_list[0]->gNB_config;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||
void *txp[ru->nb_tx];
|
||||
unsigned int txs;
|
||||
int i,txsymb;
|
||||
@@ -770,8 +772,8 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
siglen+sf_extension,
|
||||
ru->nb_tx,
|
||||
flags);
|
||||
LOG_D(PHY,"[TXPATH] RU %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, slot %d\n",ru->idx,
|
||||
(long long unsigned int)timestamp,frame,proc->frame_tx_unwrap,slot);
|
||||
LOG_D(PHY,"[TXPATH] RU %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, slot %di, returned %d\n",ru->idx,
|
||||
(long long unsigned int)timestamp,frame,proc->frame_tx_unwrap,slot, txs);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
//AssertFatal(txs == 0,"trx write function error %d\n", txs);
|
||||
}
|
||||
@@ -789,7 +791,7 @@ void *ru_thread_asynch_rxtx( void *param ) {
|
||||
static int ru_thread_asynch_rxtx_status;
|
||||
RU_t *ru = (RU_t *)param;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->gNB_list[0]->gNB_config;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||
int slot=0, frame=0;
|
||||
// wait for top-level synchronization and do one acquisition to get timestamp for setting frame/subframe
|
||||
wait_sync("ru_thread_asynch_rxtx");
|
||||
@@ -1034,10 +1036,10 @@ int wakeup_prach_ru(RU_t *ru) {
|
||||
void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
int i;
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
nfapi_nr_config_request_scf_t *gNB_config = &ru->gNB_list[0]->gNB_config; //tmp index
|
||||
nfapi_nr_config_request_scf_t *config = &ru->config; //tmp index
|
||||
openair0_config_t *cfg = &ru->openair0_cfg;
|
||||
int mu = gNB_config->ssb_config.scs_common.value;
|
||||
int N_RB = gNB_config->carrier_config.dl_grid_size[gNB_config->ssb_config.scs_common.value].value;
|
||||
int mu = config->ssb_config.scs_common.value;
|
||||
int N_RB = config->carrier_config.dl_grid_size[config->ssb_config.scs_common.value].value;
|
||||
|
||||
if (mu == NR_MU_0) { //or if LTE
|
||||
if(N_RB == 100) {
|
||||
@@ -1122,7 +1124,7 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
AssertFatal(0 == 1,"Numerology %d not supported for the moment\n",mu);
|
||||
}
|
||||
|
||||
if (gNB_config->cell_config.frame_duplex_type.value==TDD)
|
||||
if (config->cell_config.frame_duplex_type.value==TDD)
|
||||
cfg->duplex_mode = duplex_mode_TDD;
|
||||
else //FDD
|
||||
cfg->duplex_mode = duplex_mode_FDD;
|
||||
@@ -1161,7 +1163,7 @@ int setup_RU_buffers(RU_t *ru) {
|
||||
int card,ant;
|
||||
//uint16_t N_TA_offset = 0;
|
||||
NR_DL_FRAME_PARMS *frame_parms;
|
||||
//nfapi_nr_config_request_t *gNB_config = ru->gNB_list[0]->gNB_config; //tmp index
|
||||
nfapi_nr_config_request_scf_t *config = &ru->config;
|
||||
|
||||
if (ru) {
|
||||
frame_parms = ru->nr_frame_parms;
|
||||
@@ -1170,12 +1172,54 @@ int setup_RU_buffers(RU_t *ru) {
|
||||
printf("ru pointer is NULL\n");
|
||||
return(-1);
|
||||
}
|
||||
int mu = config->ssb_config.scs_common.value;
|
||||
int N_RB = config->carrier_config.dl_grid_size[config->ssb_config.scs_common.value].value;
|
||||
|
||||
/* if (frame_parms->frame_type == TDD) {
|
||||
if (frame_parms->N_RB_DL == 100) ru->N_TA_offset = 624;
|
||||
else if (frame_parms->N_RB_DL == 50) ru->N_TA_offset = 624/2;
|
||||
else if (frame_parms->N_RB_DL == 25) ru->N_TA_offset = 624/4;
|
||||
} */
|
||||
|
||||
if (config->cell_config.frame_duplex_type.value == TDD) {
|
||||
int N_TA_offset = config->carrier_config.uplink_frequency.value < 6000000 ? 400 : 431; // reference samples for 25600Tc @ 30.72 Ms/s for FR1, same @ 61.44 Ms/s for FR2
|
||||
|
||||
double factor=1;
|
||||
|
||||
switch (mu) {
|
||||
case 0: //15 kHz scs
|
||||
AssertFatal(N_TA_offset == 400,"scs_common 15kHz only for FR1\n");
|
||||
if (N_RB <= 25) factor = .25; // 7.68 Ms/s
|
||||
else if (N_RB <=50) factor = .5; // 15.36 Ms/s
|
||||
else if (N_RB <=75) factor = 1.0; // 30.72 Ms/s
|
||||
else if (N_RB <=100) factor = 1.0; // 30.72 Ms/s
|
||||
else AssertFatal(1==0,"Too many PRBS for mu=0\n");
|
||||
break;
|
||||
case 1: //30 kHz sc
|
||||
AssertFatal(N_TA_offset == 400,"scs_common 30kHz only for FR1\n");
|
||||
if (N_RB <= 106) factor = 2.0; // 61.44 Ms/s
|
||||
else if (N_RB <= 275) factor = 4.0; // 122.88 Ms/s
|
||||
break;
|
||||
case 2: //60 kHz scs
|
||||
AssertFatal(1==0,"scs_common should not be 60 kHz\n");
|
||||
break;
|
||||
case 3: //120 kHz scs
|
||||
AssertFatal(N_TA_offset == 431,"scs_common 120kHz only for FR2\n");
|
||||
break;
|
||||
case 4: //240 kHz scs
|
||||
AssertFatal(1==0,"scs_common should not be 60 kHz\n");
|
||||
if (N_RB <= 32) factor = 1.0; // 61.44 Ms/s
|
||||
else if (N_RB <= 66) factor = 2.0; // 122.88 Ms/s
|
||||
else AssertFatal(1==0,"N_RB %d is too big for curretn FR2 implementation\n",N_RB);
|
||||
break;
|
||||
|
||||
if (N_RB == 100) ru->N_TA_offset = 624;
|
||||
else if (N_RB == 50) ru->N_TA_offset = 624/2;
|
||||
else if (N_RB == 25) ru->N_TA_offset = 624/4;
|
||||
}
|
||||
if (frame_parms->threequarter_fs == 1) factor = factor*.75;
|
||||
ru->N_TA_offset = (int)(N_TA_offset * factor);
|
||||
LOG_I(PHY,"RU %d Setting N_TA_offset to %d samples (factor %f, UL Freq %d, N_RB %d)\n",ru->idx,ru->N_TA_offset,factor,
|
||||
config->carrier_config.uplink_frequency.value, N_RB);
|
||||
}
|
||||
else ru->N_TA_offset = 0;
|
||||
|
||||
|
||||
if (ru->openair0_cfg.mmapped_dma == 1) {
|
||||
// replace RX signal buffers with mmaped HW versions
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
@@ -1388,7 +1432,7 @@ void *ru_thread( void *param ) {
|
||||
int i = 0;
|
||||
int aa;
|
||||
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->gNB_list[0]->gNB_config;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||
|
||||
// set default return value
|
||||
ru_thread_status = 0;
|
||||
@@ -1400,7 +1444,7 @@ void *ru_thread( void *param ) {
|
||||
|
||||
if(emulate_rf) {
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
nr_init_frame_parms(&ru->gNB_list[0]->gNB_config, fp);
|
||||
nr_init_frame_parms(&ru->config, fp);
|
||||
nr_dump_frame_parms(fp);
|
||||
nr_phy_init_RU(ru);
|
||||
|
||||
@@ -1420,8 +1464,10 @@ void *ru_thread( void *param ) {
|
||||
AssertFatal(ret==0,"Cannot connect to remote radio\n");
|
||||
}
|
||||
|
||||
memcpy((void*)&ru->config,(void*)&RC.gNB[0]->gNB_config,sizeof(ru->config));
|
||||
|
||||
if (ru->if_south == LOCAL_RF) { // configure RF parameters only
|
||||
nr_init_frame_parms(&ru->gNB_list[0]->gNB_config, fp);
|
||||
nr_init_frame_parms(&ru->config, fp);
|
||||
nr_dump_frame_parms(fp);
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
nr_phy_init_RU(ru);
|
||||
@@ -1465,12 +1511,14 @@ void *ru_thread( void *param ) {
|
||||
if ((ru->is_slave) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru);
|
||||
|
||||
// start trx write thread
|
||||
if (ru->start_write_thread){
|
||||
if(ru->start_write_thread(ru) != 0){
|
||||
LOG_E(HW,"Could not start tx write thread\n");
|
||||
}
|
||||
else{
|
||||
LOG_I(PHY,"tx write thread ready\n");
|
||||
if(usrp_tx_thread == 1){
|
||||
if (ru->start_write_thread){
|
||||
if(ru->start_write_thread(ru) != 0){
|
||||
LOG_E(HW,"Could not start tx write thread\n");
|
||||
}
|
||||
else{
|
||||
LOG_I(PHY,"tx write thread ready\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1532,6 +1580,17 @@ void *ru_thread( void *param ) {
|
||||
for (aa=0;aa<ru->nb_rx;aa++)
|
||||
memcpy((void*)RC.gNB[0]->common_vars.rxdataF[aa],
|
||||
(void*)ru->common.rxdataF[aa], fp->symbols_per_slot*fp->ofdm_symbol_size*sizeof(int32_t));
|
||||
|
||||
// Do PRACH RU processing
|
||||
int prach_id=find_nr_prach_ru(ru,proc->frame_rx,proc->tti_rx,SEARCH_EXIST);
|
||||
if (prach_id>=0) {
|
||||
rx_nr_prach_ru(ru,
|
||||
ru->prach_list[prach_id].fmt,
|
||||
ru->prach_list[prach_id].numRA,
|
||||
ru->prach_list[prach_id].prachStartSymbol,
|
||||
proc->frame_rx,proc->tti_rx);
|
||||
free_nr_ru_prach_entry(ru,prach_id);
|
||||
}
|
||||
}
|
||||
|
||||
// At this point, all information for subframe has been received on FH interface
|
||||
@@ -1903,7 +1962,7 @@ void configure_ru(int idx,
|
||||
RU_t *ru = RC.ru[idx];
|
||||
RRU_config_t *config = (RRU_config_t *)arg;
|
||||
RRU_capabilities_t *capabilities = (RRU_capabilities_t *)arg;
|
||||
nfapi_nr_config_request_scf_t *gNB_config = &ru->gNB_list[0]->gNB_config;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||
int ret;
|
||||
LOG_I(PHY, "Received capabilities from RRU %d\n",idx);
|
||||
|
||||
@@ -1926,15 +1985,15 @@ void configure_ru(int idx,
|
||||
//config->tdd_config_S[0] = ru->nr_frame_parms->tdd_config_S;
|
||||
config->att_tx[0] = ru->att_tx;
|
||||
config->att_rx[0] = ru->att_rx;
|
||||
config->N_RB_DL[0] = gNB_config->carrier_config.dl_grid_size[gNB_config->ssb_config.scs_common.value].value;
|
||||
config->N_RB_UL[0] = gNB_config->carrier_config.dl_grid_size[gNB_config->ssb_config.scs_common.value].value;
|
||||
config->N_RB_DL[0] = cfg->carrier_config.dl_grid_size[cfg->ssb_config.scs_common.value].value;
|
||||
config->N_RB_UL[0] = cfg->carrier_config.dl_grid_size[cfg->ssb_config.scs_common.value].value;
|
||||
config->threequarter_fs[0] = ru->nr_frame_parms->threequarter_fs;
|
||||
/* if (ru->if_south==REMOTE_IF4p5) {
|
||||
config->prach_FreqOffset[0] = ru->nr_frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset;
|
||||
config->prach_ConfigIndex[0] = ru->nr_frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
|
||||
LOG_I(PHY,"REMOTE_IF4p5: prach_FrequOffset %d, prach_ConfigIndex %d\n",
|
||||
config->prach_FreqOffset[0],config->prach_ConfigIndex[0]);*/
|
||||
nr_init_frame_parms(&ru->gNB_list[0]->gNB_config, ru->nr_frame_parms);
|
||||
nr_init_frame_parms(&ru->config, ru->nr_frame_parms);
|
||||
nr_phy_init_RU(ru);
|
||||
}
|
||||
|
||||
@@ -1942,23 +2001,23 @@ void configure_rru(int idx,
|
||||
void *arg) {
|
||||
RRU_config_t *config = (RRU_config_t *)arg;
|
||||
RU_t *ru = RC.ru[idx];
|
||||
nfapi_nr_config_request_scf_t *gNB_config = &ru->gNB_list[0]->gNB_config;
|
||||
nfapi_nr_config_request_scf_t *cfg = &ru->config;
|
||||
ru->nr_frame_parms->nr_band = config->band_list[0];
|
||||
ru->nr_frame_parms->dl_CarrierFreq = config->tx_freq[0];
|
||||
ru->nr_frame_parms->ul_CarrierFreq = config->rx_freq[0];
|
||||
|
||||
if (ru->nr_frame_parms->dl_CarrierFreq == ru->nr_frame_parms->ul_CarrierFreq) {
|
||||
gNB_config->cell_config.frame_duplex_type.value = TDD;
|
||||
cfg->cell_config.frame_duplex_type.value = TDD;
|
||||
//ru->nr_frame_parms->tdd_config = config->tdd_config[0];
|
||||
//ru->nr_frame_parms->tdd_config_S = config->tdd_config_S[0];
|
||||
} else
|
||||
gNB_config->cell_config.frame_duplex_type.value = FDD;
|
||||
cfg->cell_config.frame_duplex_type.value = FDD;
|
||||
|
||||
ru->att_tx = config->att_tx[0];
|
||||
ru->att_rx = config->att_rx[0];
|
||||
int mu = gNB_config->ssb_config.scs_common.value;
|
||||
gNB_config->carrier_config.dl_grid_size[mu].value = config->N_RB_DL[0];
|
||||
gNB_config->carrier_config.dl_grid_size[mu].value = config->N_RB_UL[0];
|
||||
int mu = cfg->ssb_config.scs_common.value;
|
||||
cfg->carrier_config.dl_grid_size[mu].value = config->N_RB_DL[0];
|
||||
cfg->carrier_config.dl_grid_size[mu].value = config->N_RB_UL[0];
|
||||
ru->nr_frame_parms->threequarter_fs = config->threequarter_fs[0];
|
||||
|
||||
//ru->nr_frame_parms->pdsch_config_common.referenceSignalPower = ru->max_pdschReferenceSignalPower-config->att_tx[0];
|
||||
@@ -1973,7 +2032,7 @@ void configure_rru(int idx,
|
||||
}
|
||||
|
||||
fill_rf_config(ru,ru->rf_config_file);
|
||||
nr_init_frame_parms(&ru->gNB_list[0]->gNB_config, ru->nr_frame_parms);
|
||||
nr_init_frame_parms(&ru->config, ru->nr_frame_parms);
|
||||
nr_phy_init_RU(ru);
|
||||
}
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#define CONFIG_HLP_DLSHIFT "dynamic shift for LLR compuation for TM3/4 (default 0)\n"
|
||||
#define CONFIG_HLP_UELOOP "get softmodem (UE) to loop through memory instead of acquiring from HW\n"
|
||||
#define CONFIG_HLP_PHYTST "test UE phy layer, mac disabled\n"
|
||||
#define CONFIG_HLP_DORA "test gNB and UE with RA procedures\n"
|
||||
#define CONFIG_HLP_DMAMAP "sets flag for improved EXMIMO UE performance\n"
|
||||
#define CONFIG_HLP_EXCCLK "tells hardware to use a clock reference (0:internal(default), 1:external, 2:gpsdo)\n"
|
||||
#define CONFIG_HLP_USIM "use XOR autentication algo in case of test usim mode\n"
|
||||
@@ -89,6 +90,7 @@
|
||||
#define CONFIG_HLP_EMULATE_RF "Emulated RF enabled(disable by defult)\n"
|
||||
#define CONFIG_HLP_PARALLEL_CMD "three config for level of parallelism 'PARALLEL_SINGLE_THREAD', 'PARALLEL_RU_L1_SPLIT', or 'PARALLEL_RU_L1_TRX_SPLIT'\n"
|
||||
#define CONFIG_HLP_WORKER_CMD "two option for worker 'WORKER_DISABLE' or 'WORKER_ENABLE'\n"
|
||||
#define CONFIG_HLP_USRP_THREAD "having extra thead for usrp tx\n"
|
||||
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
||||
|
||||
#define CONFIG_HLP_USRP_ARGS "set the arguments to identify USRP (same syntax as in UHD)\n"
|
||||
@@ -143,6 +145,10 @@ extern int sync_var;
|
||||
extern int transmission_mode;
|
||||
extern double cpuf;
|
||||
|
||||
extern int emulate_rf;
|
||||
extern int numerology;
|
||||
extern int usrp_tx_thread;
|
||||
|
||||
extern volatile int start_eNB;
|
||||
extern volatile int start_UE;
|
||||
|
||||
|
||||
+37
-25
@@ -178,10 +178,12 @@ extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
|
||||
extern void init_eNB_afterRU(void);
|
||||
extern void *udp_eNB_task(void *args_p);
|
||||
|
||||
int transmission_mode=1;
|
||||
int emulate_rf = 0;
|
||||
int numerology = 0;
|
||||
int usrp_tx_thread = 0;
|
||||
|
||||
|
||||
static char *parallel_config = NULL;
|
||||
@@ -384,10 +386,10 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
|
||||
if (gnb_nb > 0) {
|
||||
/* Last task to create, others task must be ready before its start */
|
||||
if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
|
||||
/*if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
|
||||
LOG_E(GNB_APP, "Create task for gNB APP failed\n");
|
||||
return -1;
|
||||
}
|
||||
}*/
|
||||
if(itti_create_task(TASK_SCTP, sctp_eNB_task, NULL) < 0){
|
||||
LOG_E(SCTP, "Create task for SCTP failed\n");
|
||||
return -1;
|
||||
@@ -402,35 +404,39 @@ int create_gNB_tasks(uint32_t gnb_nb) {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (EPC_MODE_ENABLED) {
|
||||
if (gnb_nb > 0) {
|
||||
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
|
||||
LOG_E(SCTP, "Create task for SCTP failed\n");
|
||||
return -1;
|
||||
}
|
||||
if (EPC_MODE_ENABLED && (get_softmodem_params()->phy_test==0 && get_softmodem_params()->do_ra==0)) {
|
||||
if (gnb_nb > 0) {
|
||||
/*if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
|
||||
LOG_E(SCTP, "Create task for SCTP failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (itti_create_task (TASK_S1AP, s1ap_eNB_task, NULL) < 0) {
|
||||
LOG_E(S1AP, "Create task for S1AP failed\n");
|
||||
return -1;
|
||||
}
|
||||
if(!emulate_rf){
|
||||
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
|
||||
LOG_E(UDP_, "Create task for UDP failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (itti_create_task (TASK_S1AP, s1ap_eNB_task, NULL) < 0) {
|
||||
LOG_E(S1AP, "Create task for S1AP failed\n");
|
||||
return -1;
|
||||
}*/
|
||||
|
||||
if (itti_create_task (TASK_GTPV1_U, >pv1u_eNB_task, NULL) < 0) {
|
||||
LOG_E(GTPU, "Create task for GTPV1U failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(!emulate_rf){
|
||||
if (itti_create_task (TASK_UDP, udp_eNB_task, NULL) < 0) {
|
||||
LOG_E(UDP_, "Create task for UDP failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (itti_create_task (TASK_GTPV1_U, >pv1u_gNB_task, NULL) < 0) {
|
||||
LOG_E(GTPU, "Create task for GTPV1U failed\n");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
if (gnb_nb > 0) {
|
||||
if (itti_create_task (TASK_GNB_APP, gNB_app_task, NULL) < 0) {
|
||||
LOG_E(GNB_APP, "Create task for gNB APP failed\n");
|
||||
return -1;
|
||||
}
|
||||
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
|
||||
|
||||
if (itti_create_task (TASK_RRC_GNB, rrc_gnb_task, NULL) < 0) {
|
||||
@@ -819,6 +825,10 @@ int main( int argc, char **argv )
|
||||
}
|
||||
|
||||
openair0_cfg[0].threequarter_fs = threequarter_fs;
|
||||
EPC_MODE_ENABLED = !IS_SOFTMODEM_NOS1; //!get_softmodem_params()->phy_test;
|
||||
|
||||
if (get_softmodem_params()->do_ra)
|
||||
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
|
||||
|
||||
#if T_TRACER
|
||||
T_Config_Init();
|
||||
@@ -954,7 +964,9 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
scopeParms_t p;
|
||||
p.argc=&argc;
|
||||
p.argv=argv;
|
||||
startScope(&p);
|
||||
p.gNB=RC.gNB[0];
|
||||
p.ru=RC.ru[0];
|
||||
gNBinitScope(&p);
|
||||
}
|
||||
|
||||
if (nfapi_mode != 1 && nfapi_mode != 2) {
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
|
||||
{"parallel-config", CONFIG_HLP_PARALLEL_CMD,0, strptr:(char **)¶llel_config, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{"worker-config", CONFIG_HLP_WORKER_CMD, 0, strptr:(char **)&worker_config, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{"usrp-tx-thread-config", CONFIG_HLP_USRP_THREAD, 0, iptr:&usrp_tx_thread, defstrval:0, TYPE_INT, 0}, \
|
||||
{"s" , CONFIG_HLP_SNR, 0, dblptr:&snr_dB, defdblval:25, TYPE_DOUBLE, 0}, \
|
||||
}
|
||||
|
||||
|
||||
+62
-113
@@ -21,7 +21,7 @@
|
||||
#include "executables/thread-common.h"
|
||||
#include "executables/nr-uesoftmodem.h"
|
||||
|
||||
#include "LAYER2/NR_MAC_UE/mac.h"
|
||||
#include "NR_MAC_UE/mac.h"
|
||||
//#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface_extern.h"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "PHY/phy_extern_nr_ue.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/MODULATION/modulation_UE.h"
|
||||
#include "LAYER2/NR_MAC_UE/mac_proto.h"
|
||||
#include "NR_MAC_UE/mac_proto.h"
|
||||
#include "RRC/NR_UE/rrc_proto.h"
|
||||
|
||||
//#ifndef NO_RAT_NR
|
||||
@@ -142,15 +142,24 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
|
||||
uint8_t abstraction_flag)
|
||||
{
|
||||
|
||||
int nb_connected_gNB = 1, gNB_id;
|
||||
|
||||
memcpy(&(ue->frame_parms), frame_parms, sizeof(NR_DL_FRAME_PARMS));
|
||||
|
||||
ue->Mod_id = UE_id;
|
||||
ue->mac_enabled = 1;
|
||||
|
||||
// Setting UE mode to NOT_SYNCHED by default
|
||||
for (gNB_id = 0; gNB_id < nb_connected_gNB; gNB_id++){
|
||||
ue->UE_mode[gNB_id] = NOT_SYNCHED;
|
||||
ue->prach_resources[gNB_id] = (NR_PRACH_RESOURCES_t *)malloc16_clear(sizeof(NR_PRACH_RESOURCES_t));
|
||||
}
|
||||
|
||||
// initialize all signal buffers
|
||||
init_nr_ue_signal(ue,1,abstraction_flag);
|
||||
init_nr_ue_signal(ue, nb_connected_gNB, abstraction_flag);
|
||||
|
||||
// intialize transport
|
||||
init_nr_ue_transport(ue,abstraction_flag);
|
||||
init_nr_ue_transport(ue, abstraction_flag);
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -358,82 +367,32 @@ static void UE_synch(void *arg) {
|
||||
|
||||
void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
|
||||
uint32_t rb_size, rb_start;
|
||||
uint16_t rnti, l_prime_mask, n_rb0, n_rb1, pdu_bit_map;
|
||||
uint8_t nr_of_symbols, start_symbol_index, mcs_index, mcs_table, nrOfLayers, harq_process_id, rv_index, dmrs_config_type;
|
||||
uint8_t ptrs_mcs1, ptrs_mcs2, ptrs_mcs3, ptrs_time_density, ptrs_freq_density;
|
||||
nr_dcireq_t dcireq;
|
||||
nr_scheduled_response_t scheduled_response;
|
||||
|
||||
// program PUSCH. this should actually be done by the MAC upon reception of an UL DCI
|
||||
if (proc->nr_tti_tx == 8 || UE->frame_parms.frame_type == FDD){
|
||||
fapi_nr_config_request_t *cfg = &UE->nrUE_config;
|
||||
int tx_slot_type = nr_ue_slot_select(cfg, proc->frame_tx, proc->nr_tti_tx);
|
||||
uint8_t gNB_id = 0;
|
||||
|
||||
dcireq.module_id = UE->Mod_id;
|
||||
dcireq.gNB_index = 0;
|
||||
dcireq.cc_id = 0;
|
||||
dcireq.frame = proc->frame_rx;
|
||||
dcireq.slot = proc->nr_tti_rx;
|
||||
if (tx_slot_type == NR_UPLINK_SLOT || tx_slot_type == NR_MIXED_SLOT){
|
||||
|
||||
scheduled_response.dl_config = NULL;
|
||||
scheduled_response.ul_config = &dcireq.ul_config_req;
|
||||
scheduled_response.tx_request = NULL;
|
||||
scheduled_response.module_id = UE->Mod_id;
|
||||
scheduled_response.CC_id = 0;
|
||||
scheduled_response.frame = proc->frame_rx;
|
||||
scheduled_response.slot = proc->nr_tti_rx;
|
||||
//--------------------------Temporary configuration-----------------------------//
|
||||
rnti = 0x1234;
|
||||
rb_size = 50;
|
||||
rb_start = 0;
|
||||
nr_of_symbols = 12;
|
||||
start_symbol_index = 2;
|
||||
nrOfLayers = 1;
|
||||
mcs_index = 9;
|
||||
mcs_table = 0;
|
||||
harq_process_id = 0;
|
||||
rv_index = 0;
|
||||
l_prime_mask = get_l_prime(nr_of_symbols, typeB, pusch_dmrs_pos0, pusch_len1);
|
||||
dmrs_config_type = 0;
|
||||
ptrs_mcs1 = 2;
|
||||
ptrs_mcs2 = 4;
|
||||
ptrs_mcs3 = 10;
|
||||
n_rb0 = 25;
|
||||
n_rb1 = 75;
|
||||
pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA;
|
||||
ptrs_time_density = get_L_ptrs(ptrs_mcs1, ptrs_mcs2, ptrs_mcs3, mcs_index, mcs_table);
|
||||
ptrs_freq_density = get_K_ptrs(n_rb0, n_rb1, rb_size);
|
||||
//------------------------------------------------------------------------------//
|
||||
// trigger L2 to run ue_scheduler thru IF module
|
||||
// [TODO] mapping right after NR initial sync
|
||||
if(UE->if_inst != NULL && UE->if_inst->ul_indication != NULL) {
|
||||
nr_uplink_indication_t ul_indication;
|
||||
memset((void*)&ul_indication, 0, sizeof(ul_indication));
|
||||
|
||||
scheduled_response.ul_config->slot = 8;
|
||||
scheduled_response.ul_config->number_pdus = 1;
|
||||
scheduled_response.ul_config->ul_config_list[0].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rnti = rnti;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rb_size = rb_size;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rb_start = rb_start;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.nr_of_symbols = nr_of_symbols;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.start_symbol_index = start_symbol_index;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.ul_dmrs_symb_pos = l_prime_mask << start_symbol_index;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.dmrs_config_type = dmrs_config_type;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.mcs_index = mcs_index;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.mcs_table = mcs_table;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.new_data_indicator = 0;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.rv_index = rv_index;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.nrOfLayers = nrOfLayers;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.harq_process_id = harq_process_id;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pdu_bit_map = pdu_bit_map;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_time_density = ptrs_time_density;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_freq_density = ptrs_freq_density;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_ports_list = (nfapi_nr_ue_ptrs_ports_t *) malloc(2*sizeof(nfapi_nr_ue_ptrs_ports_t));
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset = 0;
|
||||
ul_indication.module_id = UE->Mod_id;
|
||||
ul_indication.gNB_index = gNB_id;
|
||||
ul_indication.cc_id = UE->CC_id;
|
||||
ul_indication.frame_rx = proc->frame_rx;
|
||||
ul_indication.slot_rx = proc->nr_tti_rx;
|
||||
ul_indication.frame_tx = proc->frame_tx;
|
||||
ul_indication.slot_tx = proc->nr_tti_tx;
|
||||
|
||||
if (1 << ptrs_time_density >= nr_of_symbols) {
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pdu_bit_map &= ~PUSCH_PDU_BITMAP_PUSCH_PTRS; // disable PUSCH PTRS
|
||||
UE->if_inst->ul_indication(&ul_indication);
|
||||
}
|
||||
|
||||
nr_ue_scheduled_response(&scheduled_response);
|
||||
|
||||
if (UE->mode != loop_through_memory) {
|
||||
uint8_t thread_id = PHY_vars_UE_g[UE->Mod_id][0]->current_thread_id[proc->nr_tti_tx];
|
||||
uint8_t thread_id = PHY_vars_UE_g[UE->Mod_id][0]->current_thread_id[proc->nr_tti_rx];
|
||||
phy_procedures_nrUE_TX(UE,proc,0,thread_id);
|
||||
}
|
||||
}
|
||||
@@ -441,41 +400,26 @@ void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
|
||||
void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
|
||||
nr_dcireq_t dcireq;
|
||||
nr_scheduled_response_t scheduled_response;
|
||||
uint8_t ssb_period = UE->nrUE_config.ssb_table.ssb_period;
|
||||
fapi_nr_config_request_t *cfg = &UE->nrUE_config;
|
||||
int rx_slot_type = nr_ue_slot_select(cfg, proc->frame_rx, proc->nr_tti_rx);
|
||||
uint8_t gNB_id = 0;
|
||||
|
||||
//program DCI for slot 1
|
||||
//TODO: all of this has to be moved to the MAC!!!
|
||||
if (proc->nr_tti_rx == NR_DOWNLINK_SLOT || UE->frame_parms.frame_type == FDD){
|
||||
dcireq.module_id = UE->Mod_id;
|
||||
dcireq.gNB_index = 0;
|
||||
dcireq.cc_id = 0;
|
||||
dcireq.frame = proc->frame_rx;
|
||||
dcireq.slot = proc->nr_tti_rx;
|
||||
nr_ue_dcireq(&dcireq); //to be replaced with function pointer later
|
||||
if (rx_slot_type == NR_DOWNLINK_SLOT || rx_slot_type == NR_MIXED_SLOT){
|
||||
|
||||
// we should have received a DL DCI here, so configure DL accordingly
|
||||
scheduled_response.dl_config = &dcireq.dl_config_req;
|
||||
scheduled_response.ul_config = NULL;
|
||||
scheduled_response.tx_request = NULL;
|
||||
scheduled_response.module_id = UE->Mod_id;
|
||||
scheduled_response.CC_id = 0;
|
||||
if (!((proc->frame_rx)%(1<<(ssb_period-1)))) {
|
||||
if(proc->frame_rx > dcireq.dl_config_req.sfn)
|
||||
UE->frame_gap = proc->frame_rx - dcireq.dl_config_req.sfn;
|
||||
if(proc->frame_rx < dcireq.dl_config_req.sfn)
|
||||
UE->frame_gap = dcireq.dl_config_req.sfn - proc->frame_rx;
|
||||
proc->frame_rx = dcireq.dl_config_req.sfn;
|
||||
if(UE->if_inst != NULL && UE->if_inst->dl_indication != NULL) {
|
||||
nr_downlink_indication_t dl_indication;
|
||||
memset((void*)&dl_indication, 0, sizeof(dl_indication));
|
||||
|
||||
dl_indication.module_id = UE->Mod_id;
|
||||
dl_indication.gNB_index = gNB_id;
|
||||
dl_indication.cc_id = UE->CC_id;
|
||||
dl_indication.frame = proc->frame_rx;
|
||||
dl_indication.slot = proc->nr_tti_rx;
|
||||
|
||||
UE->if_inst->dl_indication(&dl_indication, NULL);
|
||||
}
|
||||
scheduled_response.frame = proc->frame_rx;
|
||||
scheduled_response.slot = proc->nr_tti_rx;
|
||||
|
||||
nr_ue_scheduled_response(&scheduled_response);
|
||||
}
|
||||
|
||||
// Process Rx data for one sub-frame
|
||||
if ( proc->nr_tti_rx >=0 && proc->nr_tti_rx <= 1 ) {
|
||||
#ifdef UE_SLOT_PARALLELISATION
|
||||
phy_procedures_slot_parallelization_nrUE_RX( UE, proc, 0, 0, 1, UE->mode, no_relay, NULL );
|
||||
#else
|
||||
@@ -510,6 +454,7 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -526,7 +471,7 @@ typedef struct processingData_s {
|
||||
} processingData_t;
|
||||
|
||||
void UE_processing(void *arg) {
|
||||
processingData_t *rxtxD=(processingData_t *) arg;
|
||||
processingData_t *rxtxD = (processingData_t *) arg;
|
||||
UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
|
||||
PHY_VARS_NR_UE *UE = rxtxD->UE;
|
||||
|
||||
@@ -556,9 +501,7 @@ void UE_processing(void *arg) {
|
||||
}
|
||||
|
||||
processSlotRX(UE, proc);
|
||||
|
||||
processSlotTX(UE, proc);
|
||||
|
||||
}
|
||||
|
||||
void dummyWrite(PHY_VARS_NR_UE *UE,openair0_timestamp timestamp, int writeBlockSize) {
|
||||
@@ -633,8 +576,9 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
|
||||
}
|
||||
|
||||
int computeSamplesShift(PHY_VARS_NR_UE *UE) {
|
||||
|
||||
if (IS_SOFTMODEM_RFSIM) {
|
||||
LOG_E(PHY,"SET rx_offset %d \n",UE->rx_offset);
|
||||
LOG_D(PHY,"SET rx_offset %d \n",UE->rx_offset);
|
||||
//UE->rx_offset_diff=0;
|
||||
return 0;
|
||||
}
|
||||
@@ -704,8 +648,11 @@ void *UE_thread(void *arg) {
|
||||
if (res) {
|
||||
syncRunning=false;
|
||||
syncData_t *tmp=(syncData_t *)NotifiedFifoData(res);
|
||||
// shift the frame index with all the frames we trashed meanwhile we perform the synch search
|
||||
decoded_frame_rx=(tmp->proc.decoded_frame_rx + (!UE->init_sync_frame) + trashed_frames) % MAX_FRAME_NUMBER;
|
||||
if (UE->is_synchronized) {
|
||||
decoded_frame_rx=(((mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused)<<4) | tmp->proc.decoded_frame_rx);
|
||||
// shift the frame index with all the frames we trashed meanwhile we perform the synch search
|
||||
decoded_frame_rx=(decoded_frame_rx + (!UE->init_sync_frame) + trashed_frames) % MAX_FRAME_NUMBER;
|
||||
}
|
||||
delNotifiedFIFO_elt(res);
|
||||
} else {
|
||||
readFrame(UE, ×tamp, true);
|
||||
@@ -750,6 +697,7 @@ void *UE_thread(void *arg) {
|
||||
|
||||
|
||||
absolute_slot++;
|
||||
|
||||
// whatever means thread_idx
|
||||
// Fix me: will be wrong when slot 1 is slow, as slot 2 finishes
|
||||
// Slot 3 will overlap if RX_NB_TH is 2
|
||||
@@ -762,13 +710,13 @@ void *UE_thread(void *arg) {
|
||||
curMsg->UE=UE;
|
||||
// update thread index for received subframe
|
||||
curMsg->UE->current_thread_id[slot_nr] = thread_idx;
|
||||
curMsg->proc.CC_id = 0;
|
||||
curMsg->proc.CC_id = UE->CC_id;
|
||||
curMsg->proc.nr_tti_rx= slot_nr;
|
||||
curMsg->proc.subframe_rx=slot_nr/(nb_slot_frame/10);
|
||||
curMsg->proc.nr_tti_tx = (absolute_slot + DURATION_RX_TO_TX) % nb_slot_frame;
|
||||
curMsg->proc.subframe_tx=curMsg->proc.nr_tti_rx;
|
||||
curMsg->proc.frame_rx = ((absolute_slot/nb_slot_frame)+UE->frame_gap) % MAX_FRAME_NUMBER;
|
||||
curMsg->proc.frame_tx = (((absolute_slot+DURATION_RX_TO_TX)/nb_slot_frame)+UE->frame_gap) % MAX_FRAME_NUMBER;
|
||||
curMsg->proc.frame_rx = (absolute_slot/nb_slot_frame) % MAX_FRAME_NUMBER;
|
||||
curMsg->proc.frame_tx = ((absolute_slot+DURATION_RX_TO_TX)/nb_slot_frame) % MAX_FRAME_NUMBER;
|
||||
curMsg->proc.decoded_frame_rx=-1;
|
||||
//LOG_I(PHY,"Process slot %d thread Idx %d total gain %d\n", slot_nr, thread_idx, UE->rx_total_gain_dB);
|
||||
|
||||
@@ -857,8 +805,9 @@ void *UE_thread(void *arg) {
|
||||
usleep(200);
|
||||
}
|
||||
|
||||
if ( decoded_frame_rx != curMsg->proc.frame_rx &&
|
||||
((decoded_frame_rx+1) % MAX_FRAME_NUMBER) != curMsg->proc.frame_rx )
|
||||
if ( (decoded_frame_rx != curMsg->proc.frame_rx) &&
|
||||
(((decoded_frame_rx+1) % MAX_FRAME_NUMBER) != curMsg->proc.frame_rx) &&
|
||||
(((decoded_frame_rx+2) % MAX_FRAME_NUMBER) != curMsg->proc.frame_rx))
|
||||
LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
|
||||
decoded_frame_rx, curMsg->proc.frame_rx );
|
||||
|
||||
|
||||
@@ -76,36 +76,11 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#include <openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h>
|
||||
#include <openair1/SCHED_NR_UE/fapi_nr_ue_l1.h>
|
||||
|
||||
#include <forms.h>
|
||||
|
||||
|
||||
/* Callbacks, globals and object handlers */
|
||||
|
||||
extern void reset_stats( FL_OBJECT *, long );
|
||||
//extern void initTpool(char *params, tpool_t *pool, bool performanceMeas);
|
||||
|
||||
/* Forms and Objects */
|
||||
|
||||
typedef struct {
|
||||
FL_FORM *stats_form;
|
||||
void *vdata;
|
||||
char *cdata;
|
||||
long ldata;
|
||||
FL_OBJECT *stats_text;
|
||||
FL_OBJECT *stats_button;
|
||||
} FD_stats_form;
|
||||
|
||||
extern FD_stats_form *create_form_stats_form( void );
|
||||
|
||||
#include "PHY/TOOLS/nr_phy_scope.h"
|
||||
//#include "stats.h"
|
||||
// current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
|
||||
#include "PHY/TOOLS/nr_phy_scope.h"
|
||||
// at eNB 0, an UL scope for every UE
|
||||
FD_phy_scope_nrue *form_nrue[NUMBER_OF_UE_MAX];
|
||||
//FD_lte_phy_scope_enb *form_enb[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
|
||||
//FD_stats_form *form_stats=NULL,*form_stats_l2=NULL;
|
||||
char title[255];
|
||||
static pthread_t forms_thread; //xforms
|
||||
|
||||
#include <executables/nr-uesoftmodem.h>
|
||||
#include "executables/softmodem-common.h"
|
||||
@@ -198,6 +173,7 @@ uint64_t num_missed_slots=0; // counter for the number of missed slots
|
||||
|
||||
int transmission_mode=1;
|
||||
int numerology = 0;
|
||||
int usrp_tx_thread = 0;
|
||||
|
||||
/* flag set by eNB conf file to specify if the radio head is local or remote (default option is local) */
|
||||
//uint8_t local_remote_radio = BBU_LOCAL_RADIO_HEAD;
|
||||
@@ -274,7 +250,7 @@ void exit_function(const char *file, const char *function, const int line, const
|
||||
}
|
||||
|
||||
|
||||
void reset_stats(FL_OBJECT *button, long arg) {
|
||||
void reset_stats(long arg) {
|
||||
//int i,j,k;
|
||||
/*PHY_VARS_eNB *phy_vars_eNB = PHY_vars_eNB_g[0][0];
|
||||
|
||||
@@ -304,35 +280,6 @@ void reset_stats(FL_OBJECT *button, long arg) {
|
||||
}*/
|
||||
}
|
||||
|
||||
static void *scope_thread(void *arg) {
|
||||
sleep(5);
|
||||
|
||||
while (!oai_exit) {
|
||||
phy_scope_nrUE(form_nrue[0],
|
||||
PHY_vars_UE_g[0][0],
|
||||
0,0,1);
|
||||
usleep(100*1000);
|
||||
}
|
||||
|
||||
pthread_exit((void *)arg);
|
||||
}
|
||||
|
||||
|
||||
void init_scope(void) {
|
||||
int fl_argc=1;
|
||||
|
||||
if (do_forms==1) {
|
||||
char *name="5G-UE-scope";
|
||||
fl_initialize (&fl_argc, &name, NULL, 0, 0);
|
||||
int UE_id = 0;
|
||||
form_nrue[UE_id] = create_phy_scope_nrue();
|
||||
sprintf (title, "NR DL SCOPE UE");
|
||||
fl_show_form (form_nrue[UE_id]->phy_scope_nrue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
|
||||
threadCreate(&forms_thread, scope_thread, NULL, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void *l2l1_task(void *arg) {
|
||||
MessageDef *message_p = NULL;
|
||||
int result;
|
||||
@@ -720,6 +667,9 @@ int main( int argc, char **argv ) {
|
||||
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_NR_UE **));
|
||||
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_NR_UE *)*MAX_NUM_CCs);
|
||||
|
||||
if (get_softmodem_params()->do_ra)
|
||||
AssertFatal(get_softmodem_params()->phy_test == 0,"RA and phy_test are mutually exclusive\n");
|
||||
|
||||
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
printf("frame_parms %d\n",frame_parms[CC_id]->ofdm_symbol_size);
|
||||
frame_parms[CC_id]->nb_antennas_tx = nb_antenna_tx;
|
||||
@@ -746,11 +696,6 @@ int main( int argc, char **argv ) {
|
||||
|
||||
init_nr_ue_vars(UE[CC_id],frame_parms[CC_id],0,abstraction_flag);
|
||||
|
||||
if (get_softmodem_params()->phy_test==1)
|
||||
UE[CC_id]->mac_enabled = 0;
|
||||
else
|
||||
UE[CC_id]->mac_enabled = 1;
|
||||
|
||||
UE[CC_id]->mac_enabled = 1;
|
||||
UE[CC_id]->if_inst = nr_ue_if_module_init(0);
|
||||
UE[CC_id]->UE_scan = UE_scan;
|
||||
@@ -763,15 +708,49 @@ int main( int argc, char **argv ) {
|
||||
UE[CC_id]->rx_total_gain_dB = (int)rx_gain[CC_id][0] + rx_gain_off;
|
||||
UE[CC_id]->tx_power_max_dBm = tx_max_power[CC_id];
|
||||
|
||||
if (frame_parms[CC_id]->frame_type==FDD) {
|
||||
if (UE[CC_id]->frame_parms.frame_type == FDD) {
|
||||
UE[CC_id]->N_TA_offset = 0;
|
||||
} else {
|
||||
if (frame_parms[CC_id]->N_RB_DL == 100)
|
||||
UE[CC_id]->N_TA_offset = 624;
|
||||
else if (frame_parms[CC_id]->N_RB_DL == 50)
|
||||
UE[CC_id]->N_TA_offset = 624/2;
|
||||
else if (frame_parms[CC_id]->N_RB_DL == 25)
|
||||
UE[CC_id]->N_TA_offset = 624/4;
|
||||
int N_RB = UE[CC_id]->frame_parms.N_RB_DL;
|
||||
int N_TA_offset = UE[CC_id]->frame_parms.ul_CarrierFreq < 6e9 ? 400 : 431; // reference samples for 25600Tc @ 30.72 Ms/s for FR1, same @ 61.44 Ms/s for FR2
|
||||
double factor=1;
|
||||
switch (UE[CC_id]->frame_parms.numerology_index) {
|
||||
case 0: //15 kHz scs
|
||||
AssertFatal(N_TA_offset == 400, "scs_common 15kHz only for FR1\n");
|
||||
if (N_RB <= 25) factor = .25; // 7.68 Ms/s
|
||||
else if (N_RB <=50) factor = .5; // 15.36 Ms/s
|
||||
else if (N_RB <=75) factor = 1.0; // 30.72 Ms/s
|
||||
else if (N_RB <=100) factor = 1.0; // 30.72 Ms/s
|
||||
else AssertFatal(1==0,"Too many PRBS for mu=0\n");
|
||||
break;
|
||||
case 1: //30 kHz sc
|
||||
AssertFatal(N_TA_offset == 400, "scs_common 30kHz only for FR1\n");
|
||||
if (N_RB <= 106) factor = 2.0; // 61.44 Ms/s
|
||||
else if (N_RB <= 275) factor = 4.0; // 122.88 Ms/s
|
||||
break;
|
||||
case 2: //60 kHz scs
|
||||
AssertFatal(1==0,"scs_common should not be 60 kHz\n");
|
||||
break;
|
||||
case 3: //120 kHz scs
|
||||
AssertFatal(N_TA_offset == 431, "scs_common 120kHz only for FR2\n");
|
||||
break;
|
||||
case 4: //240 kHz scs
|
||||
AssertFatal(1==0,"scs_common should not be 60 kHz\n");
|
||||
if (N_RB <= 32) factor = 1.0; // 61.44 Ms/s
|
||||
else if (N_RB <= 66) factor = 2.0; // 122.88 Ms/s
|
||||
else AssertFatal(1==0,"N_RB %d is too big for curretn FR2 implementation\n",N_RB);
|
||||
break;
|
||||
|
||||
if (N_RB == 100)
|
||||
UE[CC_id]->N_TA_offset = 624;
|
||||
else if (N_RB == 50)
|
||||
UE[CC_id]->N_TA_offset = 624/2;
|
||||
else if (N_RB == 25)
|
||||
UE[CC_id]->N_TA_offset = 624/4;
|
||||
}
|
||||
if (UE[CC_id]->frame_parms.threequarter_fs == 1) factor = factor*.75;
|
||||
UE[CC_id]->N_TA_offset = (int)(N_TA_offset * factor);
|
||||
LOG_I(PHY,"UE %d Setting N_TA_offset to %d samples (factor %f, UL Freq %lu, N_RB %d)\n", UE[CC_id]->Mod_id, UE[CC_id]->N_TA_offset, factor, UE[CC_id]->frame_parms.ul_CarrierFreq, N_RB);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -782,7 +761,8 @@ int main( int argc, char **argv ) {
|
||||
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*NUMBER_OF_UE_MAX*MAX_NUM_CCs);
|
||||
configure_linux();
|
||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||
init_scope();
|
||||
if (do_forms)
|
||||
nrUEinitScope(PHY_vars_UE_g[0][0]);
|
||||
number_of_cards = 1;
|
||||
|
||||
for(int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
#include <executables/softmodem-common.h>
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
#include "SIMULATION/ETH_TRANSPORT/proto.h"
|
||||
#include <openair2/LAYER2/NR_MAC_gNB/mac_proto.h>
|
||||
|
||||
/***************************************************************************************************************************************/
|
||||
/* command line options definitions, CMDLINE_XXXX_DESC macros are used to initialize paramdef_t arrays which are then used as argument
|
||||
|
||||
@@ -55,6 +55,7 @@ extern "C"
|
||||
#define CONFIG_HLP_DUMPFRAME "dump UE received frame to rxsig_frame0.dat and exit\n"
|
||||
#define CONFIG_HLP_UELOOP "get softmodem (UE) to loop through memory instead of acquiring from HW\n"
|
||||
#define CONFIG_HLP_PHYTST "test UE phy layer, mac disabled\n"
|
||||
#define CONFIG_HLP_DORA "test gNB and UE with RA procedures\n"
|
||||
#define CONFIG_HLP_EXTS "tells hardware to use an external timing reference\n"
|
||||
#define CONFIG_HLP_DMRSSYNC "tells RU to insert DMRS in subframe 1 slot 0"
|
||||
#define CONFIG_HLP_CLK "tells hardware to use a clock reference (0:internal, 1:external, 2:gpsdo)\n"
|
||||
@@ -97,6 +98,7 @@ extern "C"
|
||||
#define SPLIT73 softmodem_params.split73
|
||||
#define TP_CONFIG softmodem_params.threadPoolConfig
|
||||
#define PHY_TEST softmodem_params.phy_test
|
||||
#define DO_RA softmodem_params.do_ra
|
||||
#define WAIT_FOR_SYNC softmodem_params.wait_for_sync
|
||||
#define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag
|
||||
#define CHAIN_OFFSET softmodem_params.chain_offset
|
||||
@@ -114,6 +116,7 @@ extern "C"
|
||||
{"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)},\
|
||||
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:(char **)&TP_CONFIG, defstrval:"n", TYPE_STRING, sizeof(TP_CONFIG)}, \
|
||||
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \
|
||||
{"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, iptr:&DO_RA, defintval:0, TYPE_INT, 0}, \
|
||||
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"clock-source", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \
|
||||
{"time-source", CONFIG_HLP_TME, 0, uptr:&TIMING_SOURCE, defintval:0, TYPE_UINT, 0}, \
|
||||
@@ -205,6 +208,7 @@ typedef struct {
|
||||
char split73[1024];
|
||||
char threadPoolConfig[1024];
|
||||
int phy_test;
|
||||
int do_ra;
|
||||
uint8_t usim_test;
|
||||
int emulate_rf;
|
||||
int wait_for_sync; //eNodeB only
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#define FAPI_NR_RX_PDU_TYPE_SIB 0x02
|
||||
#define FAPI_NR_RX_PDU_TYPE_DLSCH 0x03
|
||||
#define FAPI_NR_DCI_IND 0x04
|
||||
#define FAPI_NR_RX_PDU_TYPE_RAR 0x05
|
||||
|
||||
#define FAPI_NR_SIBS_MASK_SIB1 0x1
|
||||
|
||||
@@ -42,6 +43,7 @@
|
||||
|
||||
#define FAPI_NR_DL_CONFIG_TYPE_DCI 0x01
|
||||
#define FAPI_NR_DL_CONFIG_TYPE_DLSCH 0x02
|
||||
#define FAPI_NR_DL_CONFIG_TYPE_RA_DLSCH 0x03
|
||||
|
||||
|
||||
#define FAPI_NR_CCE_REG_MAPPING_TYPE_INTERLEAVED 0x01
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef struct {
|
||||
uint8_t CoreSetType;
|
||||
uint8_t precoder_granularity;
|
||||
uint16_t pdcch_dmrs_scrambling_id;
|
||||
|
||||
uint16_t scrambling_rnti;
|
||||
uint8_t tci_state_pdcch;
|
||||
uint8_t tci_present_in_dci;
|
||||
} fapi_nr_coreset_t;
|
||||
@@ -158,22 +158,29 @@ typedef struct {
|
||||
fapi_nr_tx_request_body_t *tx_request_body;
|
||||
} fapi_nr_tx_request_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t preamble_index;
|
||||
uint8_t prach_configuration_index;
|
||||
uint16_t preamble_length;
|
||||
uint8_t power_ramping_step;
|
||||
uint16_t preamble_received_target_power;
|
||||
uint8_t msg1_fdm;
|
||||
uint8_t msg1_frequency_start;
|
||||
uint8_t zero_correlation_zone_config;
|
||||
uint8_t subcarrier_spacing;
|
||||
uint8_t restrictedset_config;
|
||||
uint16_t root_sequence_index;
|
||||
uint16_t rsrp_threshold_ssb;
|
||||
uint16_t rsrp_threshold_sul;
|
||||
uint16_t prach_freq_offset;
|
||||
} fapi_nr_ul_config_prach_pdu;
|
||||
/// This struct replaces:
|
||||
/// PRACH-ConfigInfo from 38.331 RRC spec
|
||||
/// PRACH-ConfigSIB or PRACH-Config
|
||||
typedef struct {
|
||||
/// PHY cell ID
|
||||
uint16_t phys_cell_id;
|
||||
/// Num PRACH occasions
|
||||
uint8_t num_prach_ocas;
|
||||
/// PRACH format
|
||||
uint8_t prach_format;
|
||||
/// Num RA
|
||||
uint8_t num_ra;
|
||||
uint8_t prach_start_symbol;
|
||||
/// 38.211 (NCS 38.211 6.3.3.1).
|
||||
uint16_t num_cs;
|
||||
/// Parameter: prach-rootSequenceIndex, see TS 38.211 (6.3.3.2).
|
||||
uint16_t root_seq_id;
|
||||
/// Parameter: High-speed-flag, see TS 38.211 (6.3.3.1). 1 corresponds to Restricted set and 0 to Unrestricted set.
|
||||
uint8_t restricted_set;
|
||||
/// see TS 38.211 (6.3.3.2).
|
||||
uint16_t freq_msg1;
|
||||
// nfapi_nr_ul_beamforming_t beamforming;
|
||||
} fapi_nr_ul_config_prach_pdu;
|
||||
|
||||
typedef struct {
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ typedef enum {
|
||||
NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION= 0X86,
|
||||
NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION= 0X87,
|
||||
NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION= 0X88,
|
||||
NFAPI_NR_PHY_MSG_TYPE_PACH_INDICATION= 0X89
|
||||
NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION= 0X89
|
||||
//RESERVED 0X8a ~ 0xff
|
||||
} nfapi_nr_phy_msg_type_e;
|
||||
|
||||
@@ -623,22 +623,35 @@ typedef struct {
|
||||
|
||||
//table 3-37
|
||||
|
||||
#define DCI_PAYLOAD_BTYE_LEN 12 //? TS38.212 sec 7.3.1
|
||||
#define DCI_PAYLOAD_BYTE_LEN 8 // 12 ? TS38.212 sec 7.3.1
|
||||
#define MAX_DCI_CORESET 8
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t rnti;//
|
||||
uint16_t scrambling_id;//
|
||||
uint16_t scrambling_rnti;/* */
|
||||
uint8_t cce_index;//
|
||||
uint8_t aggregation_level;//
|
||||
nfapi_nr_tx_precoding_and_beamforming_t* precoding_and_beamforming_list;
|
||||
//tx power info
|
||||
uint8_t beta_pdcch_1_0;/*PDCCH power value used for PDCCH Format 1_0 with CRC scrambled by SI-RNTI, PI-RNTI or RA-RNTI. This is ratio of
|
||||
SSB/PBCH EPRE to PDCCH and PDCCH DMRS EPRE [TS38.213, sec 4.1] Value :0->17 */
|
||||
uint8_t power_control_offset_ss;//PDCCH power value used for all other PDCCH Formats. This is ratio of SSB/PBCH block EPRE to PDCCH and PDCCH DMRS EPRE [TS38.214, sec 4.1] Values: 0: -3dB, 1: 0dB, 2: 3dB, 3: 6dB
|
||||
uint16_t payload_size_bits;//The total DCI length (in bits) including padding bits [TS38.212 sec 7.3.1] Range 0-> DCI_PAYLOAD_BTYE_LEN*8
|
||||
uint8_t payload[DCI_PAYLOAD_BTYE_LEN];//DCI payload, where the actual size is defined by PayloadSizeBits. The bit order is as following bit0-bit7 are mapped to first byte of MSB - LSB
|
||||
typedef struct {
|
||||
// The RNTI used for identifying the UE when receiving the PDU Value: 1 -> 65535.
|
||||
uint16_t RNTI[MAX_DCI_CORESET];
|
||||
// For a UE-specific search space it equals the higher-layer parameter PDCCH-DMRSScrambling-ID if configured,
|
||||
// otherwise it should be set to the phy cell ID. [TS38.211, sec 7.3.2.3] Value: 0->65535
|
||||
uint16_t ScramblingId[MAX_DCI_CORESET];
|
||||
// For a UE-specific search space where PDCCH-DMRSScrambling- ID is configured This param equals the CRNTI.
|
||||
// Otherwise, it should be set to 0. [TS38.211, sec 7.3.2.3] Value: 0 -> 65535
|
||||
uint16_t ScramblingRNTI[MAX_DCI_CORESET];
|
||||
// CCE start Index used to send the DCI Value: 0->135
|
||||
uint8_t CceIndex[MAX_DCI_CORESET];
|
||||
// Aggregation level used [TS38.211, sec 7.3.2.1] Value: 1,2,4,8,16
|
||||
uint8_t AggregationLevel[MAX_DCI_CORESET];
|
||||
// Precoding and Beamforming structure See Table 3-43
|
||||
nfapi_nr_tx_precoding_and_beamforming_t precodingAndBeamforming[MAX_DCI_CORESET];
|
||||
// PDCCH power value used for PDCCH Format 1_0 with CRC scrambled by SI-RNTI, PI-RNTI or RA-RNTI.
|
||||
// This is ratio of SSB/PBCH EPRE to PDCCH and PDCCH DMRS EPRE [TS38.213, sec 4.1]
|
||||
// Value :0->17 Report title: 5G FAPI: PHY API Specification Issue date: 29 June 2019 Version: 222.10.17 68 Field Type Description representing -8 to 8 dB in 1dB steps
|
||||
uint8_t beta_PDCCH_1_0[MAX_DCI_CORESET];
|
||||
// PDCCH power value used for all other PDCCH Formats.
|
||||
// This is ratio of SSB/PBCH block EPRE to PDCCH and PDCCH DMRS EPRE [TS38.214, sec 4.1] Values: 0: -3dB,1: 0dB,2: 3dB,3: 6dB
|
||||
uint8_t powerControlOffsetSS[MAX_DCI_CORESET];
|
||||
// The total DCI length (in bits) including padding bits [TS38.212 sec 7.3.1] Range 0->DCI_PAYLOAD_BYTE_LEN*8
|
||||
uint16_t PayloadSizeBits[MAX_DCI_CORESET];
|
||||
// DCI payload, where the actual size is defined by PayloadSizeBits. The bit order is as following bit0-bit7 are mapped to first byte of MSB - LSB
|
||||
uint8_t Payload[MAX_DCI_CORESET][DCI_PAYLOAD_BYTE_LEN];
|
||||
|
||||
} nfapi_nr_dl_dci_pdu_t;
|
||||
|
||||
@@ -653,9 +666,6 @@ typedef struct {
|
||||
uint16_t *beamIdx[275];
|
||||
} nr_beamforming_t;
|
||||
|
||||
#define MAX_DCI_CORESET 8
|
||||
#define DCI_PAYLOAD_BYTE_LEN 8
|
||||
|
||||
typedef struct {
|
||||
///Bandwidth part size [TS38.213 sec12]. Number of contiguous PRBs allocated to the BWP,Value: 1->275
|
||||
uint16_t BWPSize;
|
||||
@@ -685,26 +695,8 @@ typedef struct {
|
||||
uint8_t precoderGranularity;
|
||||
///Number of DCIs in this CORESET.Value: 0->MaxDciPerSlot
|
||||
uint16_t numDlDci;
|
||||
///The RNTI used for identifying the UE when receiving the PDU Value: 1 -> 65535.
|
||||
uint16_t RNTI[MAX_DCI_CORESET];
|
||||
///For a UE-specific search space it equals the higher-layer parameter PDCCH-DMRSScrambling-ID if configured, otherwise it should be set to the phy cell ID. [TS38.211, sec 7.3.2.3] Value: 0->65535
|
||||
uint16_t ScramblingId[MAX_DCI_CORESET];
|
||||
///For a UE-specific search space where PDCCH-DMRSScrambling- ID is configured This param equals the CRNTI. Otherwise, it should be set to 0. [TS38.211, sec 7.3.2.3] Value: 0 -> 65535
|
||||
uint16_t ScramblingRNTI[MAX_DCI_CORESET];
|
||||
///CCE start Index used to send the DCI Value: 0->135
|
||||
uint8_t CceIndex[MAX_DCI_CORESET];
|
||||
///Aggregation level used [TS38.211, sec 7.3.2.1] Value: 1,2,4,8,16
|
||||
uint8_t AggregationLevel[MAX_DCI_CORESET];
|
||||
///Precoding and Beamforming structure See Table 3-43
|
||||
nfapi_nr_tx_precoding_and_beamforming_t precodingAndBeamforming[MAX_DCI_CORESET];
|
||||
///PDCCH power value used for PDCCH Format 1_0 with CRC scrambled by SI-RNTI, PI-RNTI or RA-RNTI. This is ratio of SSB/PBCH EPRE to PDCCH and PDCCH DMRS EPRE [TS38.213, sec 4.1] Value :0->17 Report title: 5G FAPI: PHY API Specification Issue date: 29 June 2019 Version: 222.10.17 68 Field Type Description representing -8 to 8 dB in 1dB steps
|
||||
uint8_t beta_PDCCH_1_0[MAX_DCI_CORESET];
|
||||
///PDCCH power value used for all other PDCCH Formats. This is ratio of SSB/PBCH block EPRE to PDCCH and PDCCH DMRS EPRE [TS38.214, sec 4.1] Values: 0: -3dB,1: 0dB,2: 3dB,3: 6dB
|
||||
uint8_t powerControlOffsetSS[MAX_DCI_CORESET];
|
||||
///The total DCI length (in bits) including padding bits [TS38.212 sec 7.3.1] Range 0->DCI_PAYLOAD_BTYE_LEN*8
|
||||
uint16_t PayloadSizeBits[MAX_DCI_CORESET];
|
||||
///DCI payload, where the actual size is defined by PayloadSizeBits. The bit order is as following bit0-bit7 are mapped to first byte of MSB - LSB
|
||||
uint8_t Payload[MAX_DCI_CORESET][DCI_PAYLOAD_BYTE_LEN];
|
||||
///DL DCI PDU
|
||||
nfapi_nr_dl_dci_pdu_t dci_pdu;
|
||||
} nfapi_nr_dl_tti_pdcch_pdu_rel15_t;
|
||||
|
||||
typedef struct {
|
||||
@@ -1037,10 +1029,12 @@ typedef struct
|
||||
{
|
||||
uint16_t phys_cell_id;
|
||||
uint8_t num_prach_ocas;
|
||||
// SCF PRACH PDU format field does not consider A1/B1 etc. possibilities
|
||||
// We added 9 = A1/B1 10 = A2/B2 11 A3/B3
|
||||
uint8_t prach_format;
|
||||
uint8_t num_ra;
|
||||
uint8_t prach_start_symbol;
|
||||
uint16_t num_cs;//
|
||||
uint16_t num_cs;
|
||||
nfapi_nr_ul_beamforming_t beamforming;
|
||||
|
||||
} nfapi_nr_prach_pdu_t;
|
||||
@@ -1126,6 +1120,7 @@ typedef struct
|
||||
uint16_t ul_dmrs_symb_pos;
|
||||
uint8_t dmrs_config_type;
|
||||
uint16_t ul_dmrs_scrambling_id;
|
||||
uint16_t pusch_identity;
|
||||
uint8_t scid;
|
||||
uint8_t num_dmrs_cdm_grps_no_data;
|
||||
uint16_t dmrs_ports;//DMRS ports. [TS38.212 7.3.1.1.2] provides description between DCI 0-1 content and DMRS ports. Bitmap occupying the 11 LSBs with: bit 0: antenna port 1000 bit 11: antenna port 1011 and for each bit 0: DMRS port not used 1: DMRS port used
|
||||
@@ -1498,7 +1493,7 @@ typedef struct
|
||||
//for dci_pusch_pdu
|
||||
typedef struct
|
||||
{
|
||||
uint8_t pdu_bit_map;
|
||||
uint8_t pduBitmap;
|
||||
uint32_t handle;
|
||||
uint16_t rnti;
|
||||
uint8_t ul_cqi;
|
||||
@@ -1513,7 +1508,7 @@ typedef struct
|
||||
//for PUCCH PDU Format 0/1
|
||||
typedef struct
|
||||
{
|
||||
uint8_t pdu_bit_map;
|
||||
uint8_t pduBitmap;
|
||||
uint32_t handle;
|
||||
uint16_t rnti;
|
||||
uint8_t pucch_format;//PUCCH format Value: 0 -> 1 0: PUCCH Format0 1: PUCCH Format1
|
||||
@@ -1529,7 +1524,7 @@ typedef struct
|
||||
//PUCCH PDU Format 2/3/4
|
||||
typedef struct
|
||||
{
|
||||
uint8_t pdu_bit_map;
|
||||
uint8_t pduBitmap;
|
||||
uint32_t handle;
|
||||
uint16_t rnti;
|
||||
uint8_t pucch_format;//PUCCH format Value: 0 -> 2 0: PUCCH Format2 1: PUCCH Format3 2: PUCCH Format4
|
||||
@@ -1566,7 +1561,7 @@ typedef struct
|
||||
uint16_t sfn;
|
||||
uint16_t slot;
|
||||
uint16_t num_ucis;
|
||||
nfapi_nr_uci_t uci_list[NFAPI_MAX_NUM_UCI_INDICATION];
|
||||
nfapi_nr_uci_t *uci_list;
|
||||
|
||||
} nfapi_nr_uci_indication_t;
|
||||
|
||||
|
||||
@@ -526,7 +526,7 @@ uint32_t pullarray8(uint8_t **in, uint8_t out[], uint32_t max_len, uint32_t len,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if((end - out) >= sizeof(uint8_t) * len)
|
||||
if((end - (*in)) >= sizeof(uint8_t) * len)
|
||||
{
|
||||
memcpy(out, (*in), len);
|
||||
(*in)+=len;
|
||||
|
||||
@@ -27,9 +27,7 @@
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "PHY/CODING/nrLDPC_extern.h"
|
||||
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
|
||||
// extern "C" {
|
||||
#include "openair1/PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.h"
|
||||
// }
|
||||
#define MAX_NUM_DLSCH_SEGMENTS 16
|
||||
#define MAX_BLOCK_LENGTH 8448
|
||||
|
||||
@@ -105,7 +103,7 @@ int test_ldpc(short No_iteration,
|
||||
time_stats_t *time_optim,
|
||||
time_stats_t *time_decoder,
|
||||
n_iter_stats_t *dec_iter,
|
||||
short run_cuda)
|
||||
short run_cuda)
|
||||
{
|
||||
//clock initiate
|
||||
//time_stats_t time,time_optim,tinput,tprep,tparity,toutput, time_decoder;
|
||||
@@ -398,23 +396,24 @@ int test_ldpc(short No_iteration,
|
||||
decParams.numMaxIter=No_iteration;
|
||||
decParams.outMode = nrLDPC_outMode_BIT;
|
||||
//decParams.outMode =nrLDPC_outMode_LLRINT8;
|
||||
|
||||
|
||||
set_compact_BG(Zc,BG);
|
||||
init_LLR_DMA_for_CUDA(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], block_length);
|
||||
for(j=0;j<n_segments;j++) {
|
||||
start_meas(time_decoder);
|
||||
|
||||
#ifdef CUDA_FLAG
|
||||
if(run_cuda){
|
||||
printf("***********run ldpc by cuda\n");
|
||||
n_iter = nrLDPC_decoder_LYC(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], block_length, time_decoder);
|
||||
}
|
||||
else{
|
||||
printf("**************run ldpc by cpu\n");
|
||||
// decode the sequence
|
||||
// decoder supports BG2, Z=128 & 256
|
||||
//esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate));
|
||||
///nrLDPC_decoder(&decParams, channel_output_fixed, estimated_output, NULL);
|
||||
}
|
||||
else{
|
||||
// decode the sequence
|
||||
// decoder supports BG2, Z=128 & 256
|
||||
//esimated_output=ldpc_decoder(channel_output_fixed, block_length, No_iteration, (double)((float)nom_rate/(float)denom_rate));
|
||||
///nrLDPC_decoder(&decParams, channel_output_fixed, estimated_output, NULL);
|
||||
n_iter = nrLDPC_decoder(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], p_nrLDPC_procBuf, p_decoder_profiler);
|
||||
}
|
||||
#else
|
||||
n_iter = nrLDPC_decoder(&decParams, (int8_t*)channel_output_fixed[j], (int8_t*)estimated_output[j], p_nrLDPC_procBuf, p_decoder_profiler);
|
||||
}
|
||||
#endif
|
||||
stop_meas(time_decoder);
|
||||
}
|
||||
|
||||
@@ -515,6 +514,7 @@ int test_ldpc(short No_iteration,
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
warmup_for_GPU();
|
||||
unsigned int errors, errors_bit, crc_misses;
|
||||
double errors_bit_uncoded;
|
||||
short block_length=8448; // decoder supports length: 1201 -> 1280, 2401 -> 2560
|
||||
@@ -561,7 +561,7 @@ int main(int argc, char *argv[])
|
||||
block_length = atoi(optarg);
|
||||
break;
|
||||
|
||||
case 'G':
|
||||
case 'G':
|
||||
run_cuda = atoi(optarg);
|
||||
break;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "PHY/CODING/coding_defs.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
|
||||
//#include "PHY/NR_TRANSPORT/nr_transport.h"
|
||||
//#include "common/utils/LOG/log.h"
|
||||
|
||||
//#define DEBUG_DCI_POLAR_PARAMS
|
||||
@@ -27,7 +26,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
//Default simulation values (Aim for iterations = 1000000.)
|
||||
int decoder_int16=0;
|
||||
int itr, iterations = 1000, arguments, polarMessageType = 0; //0=PBCH, 1=DCI, -1=UCI
|
||||
int itr, iterations = 1000, arguments, polarMessageType = 0; //0=PBCH, 1=DCI, 2=UCI
|
||||
double SNRstart = -20.0, SNRstop = 0.0, SNRinc= 0.5; //dB
|
||||
double SNR, SNR_lin;
|
||||
int16_t nBitError = 0; // -1 = Decoding failed (All list entries have failed the CRC checks).
|
||||
@@ -42,6 +41,7 @@ int main(int argc, char *argv[])
|
||||
switch (arguments) {
|
||||
case 's':
|
||||
SNRstart = atof(optarg);
|
||||
SNRstop = SNRstart + 2;
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
case 'k':
|
||||
testLength=atoi(optarg);
|
||||
if (testLength < 12 || testLength > 60) {
|
||||
if (testLength < 12 || testLength > 127) {
|
||||
printf("Illegal packet bitlength %d \n",testLength);
|
||||
exit(-1);
|
||||
}
|
||||
@@ -120,12 +120,13 @@ int main(int argc, char *argv[])
|
||||
crcTableInit();
|
||||
|
||||
if (polarMessageType == 0) { //PBCH
|
||||
aggregation_level = NR_POLAR_PBCH_AGGREGATION_LEVEL;
|
||||
aggregation_level = NR_POLAR_PBCH_AGGREGATION_LEVEL;
|
||||
} else if (polarMessageType == 1) { //DCI
|
||||
coderLength = 108*aggregation_level;
|
||||
} else if (polarMessageType == -1) { //UCI
|
||||
printf("UCI testing not supported yet\n");
|
||||
exit(-1);
|
||||
coderLength = 108*aggregation_level;
|
||||
} else if (polarMessageType == 2) { //UCI
|
||||
//pucch2 parameters, 1 symbol, aggregation_level = NPRB
|
||||
AssertFatal(aggregation_level>2,"For UCI formats, aggregation (N_RB) should be > 2\n");
|
||||
coderLength = 16*aggregation_level;
|
||||
}
|
||||
|
||||
//Logging
|
||||
|
||||
@@ -382,12 +382,24 @@ unsigned int crc16 (unsigned char * inptr, int bitlen);
|
||||
@param bitlen length of inputs in bits*/
|
||||
unsigned int crc12 (unsigned char * inptr, int bitlen);
|
||||
|
||||
/*!\fn uint32_t crc12(uint8_t *inPtr, int32_t bitlen)
|
||||
\brief This computes an 11-bit crc based on 3GPP NR specifications.
|
||||
@param inPtr Pointer to input byte stream
|
||||
@param bitlen length of inputs in bits*/
|
||||
unsigned int crc11 (unsigned char * inptr, int bitlen);
|
||||
|
||||
/*!\fn uint32_t crc8(uint8_t *inPtr, int32_t bitlen)
|
||||
\brief This computes a 8-bit crc based on 3GPP UMTS specifications.
|
||||
@param inPtr Pointer to input byte stream
|
||||
@param bitlen length of inputs in bits*/
|
||||
unsigned int crc8 (unsigned char * inptr, int bitlen);
|
||||
|
||||
/*!\fn uint32_t crc8(uint8_t *inPtr, int32_t bitlen)
|
||||
\brief This computes a 6-bit crc based on 3GPP NR specifications.
|
||||
@param inPtr Pointer to input byte stream
|
||||
@param bitlen length of inputs in bits*/
|
||||
unsigned int crc6 (unsigned char * inptr, int bitlen);
|
||||
|
||||
int check_crc(uint8_t* decoded_bytes, uint32_t n, uint32_t F, uint8_t crc_type);
|
||||
|
||||
/*!\fn void phy_viterbi_dot11_sse2(int8_t *y, uint8_t *decoded_bytes, uint16_t n,int offset,int traceback)
|
||||
@@ -463,6 +475,7 @@ uint32_t nr_compute_tbs(uint16_t Qm,
|
||||
uint16_t nb_symb_sch,
|
||||
uint16_t nb_dmrs_prb,
|
||||
uint16_t nb_rb_oh,
|
||||
uint8_t tb_scaling,
|
||||
uint8_t Nl);
|
||||
|
||||
uint32_t nr_compute_tbslbrm(uint16_t table,
|
||||
|
||||
@@ -90,7 +90,9 @@ static unsigned int crc24bTable[256];
|
||||
static unsigned int crc24cTable[256];
|
||||
static unsigned short crc16Table[256];
|
||||
static unsigned short crc12Table[256];
|
||||
static unsigned short crc11Table[256];
|
||||
static unsigned char crc8Table[256];
|
||||
static unsigned char crc6Table[256];
|
||||
|
||||
void crcTableInit (void)
|
||||
{
|
||||
@@ -102,7 +104,9 @@ void crcTableInit (void)
|
||||
crc24cTable[c] = crcbit (&c, 1, poly24c);
|
||||
crc16Table[c] = (unsigned short) (crcbit (&c, 1, poly16) >> 16);
|
||||
crc12Table[c] = (unsigned short) (crcbit (&c, 1, poly12) >> 16);
|
||||
crc11Table[c] = (unsigned short) (crcbit (&c, 1, poly11) >> 16);
|
||||
crc8Table[c] = (unsigned char) (crcbit (&c, 1, poly8) >> 24);
|
||||
crc6Table[c] = (unsigned char) (crcbit (&c, 1, poly6) >> 24);
|
||||
} while (++c);
|
||||
}
|
||||
|
||||
@@ -207,6 +211,24 @@ crc12 (unsigned char * inptr, int bitlen)
|
||||
return crc;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
crc11 (unsigned char * inptr, int bitlen)
|
||||
{
|
||||
int octetlen, resbit;
|
||||
unsigned int crc = 0;
|
||||
octetlen = bitlen / 8; /* Change in octets */
|
||||
resbit = (bitlen % 8);
|
||||
|
||||
while (octetlen-- > 0) {
|
||||
crc = (crc << 8) ^ (crc11Table[(*inptr++) ^ (crc >> 24)] << 16);
|
||||
}
|
||||
|
||||
if (resbit > 0)
|
||||
crc = (crc << resbit) ^ (crc11Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 16);
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
crc8 (unsigned char * inptr, int bitlen)
|
||||
{
|
||||
@@ -225,6 +247,24 @@ crc8 (unsigned char * inptr, int bitlen)
|
||||
return crc;
|
||||
}
|
||||
|
||||
unsigned int
|
||||
crc6 (unsigned char * inptr, int bitlen)
|
||||
{
|
||||
int octetlen, resbit;
|
||||
unsigned int crc = 0;
|
||||
octetlen = bitlen / 8; /* Change in octets */
|
||||
resbit = (bitlen % 8);
|
||||
|
||||
while (octetlen-- > 0) {
|
||||
crc = crc6Table[(*inptr++) ^ (crc >> 24)] << 24;
|
||||
}
|
||||
|
||||
if (resbit > 0)
|
||||
crc = (crc << resbit) ^ (crc8Table[((*inptr) >> (8 - resbit)) ^ (crc >> (32 - resbit))] << 24);
|
||||
|
||||
return crc;
|
||||
}
|
||||
|
||||
int check_crc(uint8_t* decoded_bytes, uint32_t n, uint32_t F, uint8_t crc_type)
|
||||
{
|
||||
uint32_t crc=0,oldcrc=0;
|
||||
@@ -284,6 +324,7 @@ int check_crc(uint8_t* decoded_bytes, uint32_t n, uint32_t F, uint8_t crc_type)
|
||||
AssertFatal(1,"Invalid crc_type \n");
|
||||
}
|
||||
|
||||
|
||||
if (crc == oldcrc)
|
||||
return(1);
|
||||
else
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
#include <unistd.h>
|
||||
#include <cuda_runtime.h>
|
||||
#include <cuda.h>
|
||||
#include "PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_types.h"
|
||||
#include "PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_defs.h"
|
||||
#include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h"
|
||||
#include "PHY/CODING/nrLDPC_decoder/nrLDPCdecoder_defs.h"
|
||||
|
||||
#include "bgs/BG1_I0"
|
||||
#include "bgs/BG1_I1"
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "bgs/BG2_I6"
|
||||
#include "bgs/BG2_I7"
|
||||
|
||||
#define MAX_ITERATION 5
|
||||
#define MAX_ITERATION 2
|
||||
#define MC 1
|
||||
|
||||
#define cudaCheck(ans) { cudaAssert((ans), __FILE__, __LINE__); }
|
||||
@@ -49,13 +49,21 @@ typedef struct{
|
||||
char y;
|
||||
short value;
|
||||
} h_element;
|
||||
#include "bgs/BG1_compact_in_C.h"
|
||||
|
||||
__device__ char dev_const_llr[68*384];
|
||||
__device__ char dev_dt [46*68*384];
|
||||
__device__ char dev_llr[68*384];
|
||||
__device__ unsigned char dev_tmp[68*384];
|
||||
|
||||
h_element h_compact1 [46*19] = {};
|
||||
h_element h_compact2 [68*30] = {};
|
||||
|
||||
__device__ __constant__ h_element dev_h_compact1[46*19]; // used in kernel 1
|
||||
__device__ __constant__ h_element dev_h_compact2[68*30]; // used in kernel 2
|
||||
__device__ h_element dev_h_compact1[46*19]; // used in kernel 1
|
||||
__device__ h_element dev_h_compact2[68*30]; // used in kernel 2
|
||||
|
||||
// __device__ __constant__ h_element dev_h_compact1[46*19]; // used in kernel 1
|
||||
// __device__ __constant__ h_element dev_h_compact2[68*30]; // used in kernel 2
|
||||
|
||||
// row and col element count
|
||||
__device__ __constant__ char h_ele_row_bg1_count[46] = {
|
||||
@@ -92,9 +100,93 @@ __global__ void warmup()
|
||||
// warm up gpu for time measurement
|
||||
}
|
||||
|
||||
extern "C"
|
||||
void warmup_for_GPU(){
|
||||
|
||||
warmup<<<20,1024 >>>();
|
||||
|
||||
}
|
||||
|
||||
extern "C"
|
||||
void set_compact_BG(int Zc,short BG){
|
||||
|
||||
int row,col;
|
||||
if(BG == 1){
|
||||
row = 46;
|
||||
col = 68;
|
||||
}
|
||||
else{
|
||||
row = 42;
|
||||
col = 52;
|
||||
}
|
||||
int compact_row = 30;
|
||||
int compact_col = 19;
|
||||
if(BG==2){compact_row = 10, compact_col = 23;}
|
||||
int memorySize_h_compact1 = row * compact_col * sizeof(h_element);
|
||||
int memorySize_h_compact2 = compact_row * col * sizeof(h_element);
|
||||
int lift_index = 0;
|
||||
short lift_set[][9] = {
|
||||
{2,4,8,16,32,64,128,256},
|
||||
{3,6,12,24,48,96,192,384},
|
||||
{5,10,20,40,80,160,320},
|
||||
{7,14,28,56,112,224},
|
||||
{9,18,36,72,144,288},
|
||||
{11,22,44,88,176,352},
|
||||
{13,26,52,104,208},
|
||||
{15,30,60,120,240},
|
||||
{0}
|
||||
};
|
||||
|
||||
for(int i = 0; lift_set[i][0] != 0; i++){
|
||||
for(int j = 0; lift_set[i][j] != 0; j++){
|
||||
if(Zc == lift_set[i][j]){
|
||||
lift_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
printf("\nZc = %d BG = %d\n",Zc,BG);
|
||||
switch(lift_index){
|
||||
case 0:
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact1, host_h_compact1_I0, memorySize_h_compact1) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact2, host_h_compact2_I0, memorySize_h_compact2) );
|
||||
break;
|
||||
case 1:
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact1, host_h_compact1_I1, memorySize_h_compact1) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact2, host_h_compact2_I1, memorySize_h_compact2) );
|
||||
break;
|
||||
case 2:
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact1, host_h_compact1_I2, memorySize_h_compact1) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact2, host_h_compact2_I2, memorySize_h_compact2) );
|
||||
break;
|
||||
case 3:
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact1, host_h_compact1_I3, memorySize_h_compact1) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact2, host_h_compact2_I3, memorySize_h_compact2) );
|
||||
break;
|
||||
case 4:
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact1, host_h_compact1_I4, memorySize_h_compact1) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact2, host_h_compact2_I4, memorySize_h_compact2) );
|
||||
break;
|
||||
case 5:
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact1, host_h_compact1_I5, memorySize_h_compact1) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact2, host_h_compact2_I5, memorySize_h_compact2) );
|
||||
break;
|
||||
case 6:
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact1, host_h_compact1_I6, memorySize_h_compact1) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact2, host_h_compact2_I6, memorySize_h_compact2) );
|
||||
break;
|
||||
case 7:
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact1, host_h_compact1_I7, memorySize_h_compact1) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact2, host_h_compact2_I7, memorySize_h_compact2) );
|
||||
break;
|
||||
}
|
||||
|
||||
// return 0;
|
||||
}
|
||||
|
||||
|
||||
// Kernel 1
|
||||
__global__ void ldpc_cnp_kernel_1st_iter(char * dev_llr, char * dev_dt, int BG, int row, int col, int Zc)
|
||||
__global__ void ldpc_cnp_kernel_1st_iter(/*char * dev_llr,*/ int BG, int row, int col, int Zc)
|
||||
{
|
||||
// if(blockIdx.x == 0 && threadIdx.x == 1) printf("cnp %d\n", threadIdx.x);
|
||||
int iMCW = blockIdx.y; // codeword id
|
||||
@@ -153,7 +245,7 @@ __global__ void ldpc_cnp_kernel_1st_iter(char * dev_llr, char * dev_dt, int BG,
|
||||
for(int i = 0; i < s; i++){
|
||||
// v0: Best performance so far. 0.75f is the value of alpha.
|
||||
sq = 1 - 2 * ((Q_sign >> i) & 0x01);
|
||||
R_temp = 0.8 * sign * sq * (i != idx_min ? rmin1 : rmin2);
|
||||
R_temp = 0.75f * sign * sq * (i != idx_min ? rmin1 : rmin2);
|
||||
// write results to global memory
|
||||
h_element_t = dev_h_compact1[i*row+iBlkRow];
|
||||
int addr_temp = offsetR + h_element_t.y * row * Zc;
|
||||
@@ -163,7 +255,7 @@ __global__ void ldpc_cnp_kernel_1st_iter(char * dev_llr, char * dev_dt, int BG,
|
||||
}
|
||||
|
||||
// Kernel_1
|
||||
__global__ void ldpc_cnp_kernel(char * dev_llr, char * dev_dt, int BG, int row, int col, int Zc)
|
||||
__global__ void ldpc_cnp_kernel(/*char * dev_llr, char * dev_dt,*/ int BG, int row, int col, int Zc)
|
||||
{
|
||||
// if(blockIdx.x == 0 && threadIdx.x == 1) printf("cnp\n");
|
||||
int iMCW = blockIdx.y;
|
||||
@@ -223,7 +315,7 @@ __global__ void ldpc_cnp_kernel(char * dev_llr, char * dev_dt, int BG, int row,
|
||||
// The 2nd recursion
|
||||
for(int i = 0; i < s; i ++){
|
||||
sq = 1 - 2 * ((Q_sign >> i) & 0x01);
|
||||
R_temp = 0.8 * sign * sq * (i != idx_min ? rmin1 : rmin2);
|
||||
R_temp = 0.75f * sign * sq * (i != idx_min ? rmin1 : rmin2);
|
||||
|
||||
|
||||
// write results to global memory
|
||||
@@ -236,7 +328,7 @@ __global__ void ldpc_cnp_kernel(char * dev_llr, char * dev_dt, int BG, int row,
|
||||
|
||||
// Kernel 2: VNP processing
|
||||
__global__ void
|
||||
ldpc_vnp_kernel_normal(char * dev_llr, char * dev_dt, char * dev_const_llr, int BG, int row, int col, int Zc)
|
||||
ldpc_vnp_kernel_normal(/*char * dev_llr, char * dev_dt, char * dev_const_llr,*/ int BG, int row, int col, int Zc)
|
||||
{
|
||||
int iMCW = blockIdx.y;
|
||||
int iBlkCol = blockIdx.x;
|
||||
@@ -276,7 +368,7 @@ ldpc_vnp_kernel_normal(char * dev_llr, char * dev_dt, char * dev_const_llr, int
|
||||
}
|
||||
|
||||
|
||||
__global__ void pack_decoded_bit(char *dev, unsigned char *host, int col, int Zc)
|
||||
__global__ void pack_decoded_bit(/*char *dev, unsigned char *host,*/ int col, int Zc)
|
||||
{
|
||||
__shared__ unsigned char tmp[128];
|
||||
int iMCW = blockIdx.y;
|
||||
@@ -284,15 +376,15 @@ __global__ void pack_decoded_bit(char *dev, unsigned char *host, int col, int Zc
|
||||
int btid = threadIdx.x;
|
||||
tmp[btid] = 0;
|
||||
|
||||
if(dev[tid] < 0){
|
||||
if(dev_llr[tid] < 0){
|
||||
tmp[btid] = 1 << (7-(btid&7));
|
||||
}
|
||||
__syncthreads();
|
||||
|
||||
if(threadIdx.x < 16){
|
||||
host[iMCW * col*Zc + blockIdx.x*16+threadIdx.x] = 0;
|
||||
dev_tmp[iMCW * col*Zc + blockIdx.x*16+threadIdx.x] = 0;
|
||||
for(int i = 0; i < 8; i++){
|
||||
host[iMCW * col*Zc + blockIdx.x*16+threadIdx.x] += tmp[threadIdx.x*8+i];
|
||||
dev_tmp[iMCW * col*Zc + blockIdx.x*16+threadIdx.x] += tmp[threadIdx.x*8+i];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -369,18 +461,11 @@ void read_BG(int BG, int *h, int row, int col)
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
extern "C"
|
||||
int32_t nrLDPC_decoder_LYC(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length, time_stats_t *time_decoder)
|
||||
{
|
||||
// alloc mem
|
||||
//unsigned char *decision = (unsigned char*)p_out;
|
||||
|
||||
uint16_t Zc = p_decParams->Z;
|
||||
uint8_t BG = p_decParams->BG;
|
||||
uint8_t numMaxIter = p_decParams->numMaxIter;
|
||||
e_nrLDPC_outMode outMode = p_decParams->outMode;
|
||||
void init_LLR_DMA_for_CUDA(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length){
|
||||
|
||||
uint16_t Zc = p_decParams->Z;
|
||||
uint8_t BG = p_decParams->BG;
|
||||
uint8_t row,col;
|
||||
if(BG == 1){
|
||||
row = 46;
|
||||
@@ -390,96 +475,41 @@ int32_t nrLDPC_decoder_LYC(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8
|
||||
row = 42;
|
||||
col = 52;
|
||||
}
|
||||
int compact_row = 30, compact_col = 19, lift_index=0;;
|
||||
if(BG==2){compact_row = 10, compact_col = 23;}
|
||||
unsigned char *hard_decision = (unsigned char*)p_out;
|
||||
int memorySize_llr_cuda = col * Zc * sizeof(char) * MC;
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_const_llr, p_llr, memorySize_llr_cuda) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_llr, p_llr, memorySize_llr_cuda) );
|
||||
cudaDeviceSynchronize();
|
||||
|
||||
short lift_set[][9] = {
|
||||
{2,4,8,16,32,64,128,256},
|
||||
{3,6,12,24,48,96,192,384},
|
||||
{5,10,20,40,80,160,320},
|
||||
{7,14,28,56,112,224},
|
||||
{9,18,36,72,144,288},
|
||||
{11,22,44,88,176,352},
|
||||
{13,26,52,104,208},
|
||||
{15,30,60,120,240},
|
||||
{0}
|
||||
};
|
||||
|
||||
for(int i = 0; lift_set[i][0] != 0; i++){
|
||||
for(int j = 0; lift_set[i][j] != 0; j++){
|
||||
if(Zc == lift_set[i][j]){
|
||||
lift_index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extern "C"
|
||||
int32_t nrLDPC_decoder_LYC(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length, time_stats_t *time_decoder)
|
||||
{
|
||||
|
||||
|
||||
uint16_t Zc = p_decParams->Z;
|
||||
uint8_t BG = p_decParams->BG;
|
||||
uint8_t numMaxIter = p_decParams->numMaxIter;
|
||||
e_nrLDPC_outMode outMode = p_decParams->outMode;
|
||||
cudaError_t cudaStatus;
|
||||
uint8_t row,col;
|
||||
if(BG == 1){
|
||||
row = 46;
|
||||
col = 68;
|
||||
}
|
||||
|
||||
int *h = NULL;
|
||||
switch(lift_index){
|
||||
case 0:
|
||||
h = (BG == 1)? h_base_0:h_base_8;
|
||||
break;
|
||||
case 1:
|
||||
h = (BG == 1)? h_base_1:h_base_9;
|
||||
break;
|
||||
case 2:
|
||||
h = (BG == 1)? h_base_2:h_base_10;
|
||||
break;
|
||||
case 3:
|
||||
h = (BG == 1)? h_base_3:h_base_11;
|
||||
break;
|
||||
case 4:
|
||||
h = (BG == 1)? h_base_4:h_base_12;
|
||||
break;
|
||||
case 5:
|
||||
h = (BG == 1)? h_base_5:h_base_13;
|
||||
break;
|
||||
case 6:
|
||||
h = (BG == 1)? h_base_6:h_base_14;
|
||||
break;
|
||||
case 7:
|
||||
h = (BG == 1)? h_base_7:h_base_15;
|
||||
break;
|
||||
else{
|
||||
row = 42;
|
||||
col = 52;
|
||||
}
|
||||
/* pack BG in compact graph */
|
||||
read_BG(BG, h, row, col);
|
||||
|
||||
|
||||
int memorySize_h_compact1 = row * compact_col * sizeof(h_element);
|
||||
int memorySize_h_compact2 = compact_row * col * sizeof(h_element);
|
||||
|
||||
// cpu
|
||||
int memorySize_hard_decision = col * Zc * sizeof(unsigned char) * MC;
|
||||
|
||||
|
||||
// alloc memory
|
||||
unsigned char *hard_decision = (unsigned char*)p_out;
|
||||
|
||||
// gpu
|
||||
int memorySize_llr_cuda = col * Zc * sizeof(char) * MC;
|
||||
int memorySize_dt_cuda = row * Zc * col * sizeof(char) * MC;
|
||||
|
||||
|
||||
// alloc memory
|
||||
char *dev_llr;
|
||||
char *dev_dt;
|
||||
char *dev_const_llr;
|
||||
unsigned char *dev_tmp;
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_const_llr, p_llr, memorySize_llr_cuda) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_llr, p_llr, memorySize_llr_cuda) );
|
||||
|
||||
cudaCheck( cudaMalloc((void **)&dev_tmp, memorySize_hard_decision) );
|
||||
cudaCheck( cudaMalloc((void **)&dev_llr, memorySize_llr_cuda) );
|
||||
cudaCheck( cudaMalloc((void **)&dev_const_llr, memorySize_llr_cuda) );
|
||||
cudaCheck( cudaMalloc((void **)&dev_dt, memorySize_dt_cuda) );
|
||||
|
||||
// memcpy host to device
|
||||
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact1, h_compact1, memorySize_h_compact1) );
|
||||
cudaCheck( cudaMemcpyToSymbol(dev_h_compact2, h_compact2, memorySize_h_compact2) );
|
||||
cudaCheck( cudaMemcpy((void*)dev_const_llr, p_llr, memorySize_llr_cuda, cudaMemcpyHostToDevice) );
|
||||
start_meas(time_decoder);
|
||||
cudaCheck( cudaMemcpy((void*)dev_llr, p_llr, memorySize_llr_cuda, cudaMemcpyHostToDevice) );
|
||||
|
||||
|
||||
// Define CUDA kernel dimension
|
||||
int blockSizeX = Zc;
|
||||
dim3 dimGridKernel1(row, MC, 1); // dim of the thread blocks
|
||||
@@ -488,61 +518,35 @@ start_meas(time_decoder);
|
||||
dim3 dimGridKernel2(col, MC, 1);
|
||||
dim3 dimBlockKernel2(blockSizeX, 1, 1);
|
||||
cudaDeviceSynchronize();
|
||||
|
||||
cudaEvent_t start, end;
|
||||
float time;
|
||||
|
||||
warmup<<<dimGridKernel1, dimBlockKernel1>>>();
|
||||
warmup<<<dimGridKernel2, dimBlockKernel2>>>();
|
||||
|
||||
|
||||
cudaEventCreate(&start);
|
||||
cudaEventCreate(&end);
|
||||
cudaEventRecord(start, 0);
|
||||
|
||||
// cudaProfilerStart();
|
||||
|
||||
// lauch kernel
|
||||
|
||||
for(int ii = 0; ii < MAX_ITERATION; ii++){
|
||||
// first kernel
|
||||
if(ii == 0){
|
||||
ldpc_cnp_kernel_1st_iter
|
||||
<<<dimGridKernel1, dimBlockKernel1>>>
|
||||
(dev_llr, dev_dt, BG, row, col, Zc);
|
||||
(/*dev_llr,*/ BG, row, col, Zc);
|
||||
}else{
|
||||
ldpc_cnp_kernel
|
||||
<<<dimGridKernel1, dimBlockKernel1>>>
|
||||
(dev_llr, dev_dt, BG, row, col, Zc);
|
||||
(/*dev_llr,*/ BG, row, col, Zc);
|
||||
}
|
||||
|
||||
// second kernel
|
||||
|
||||
ldpc_vnp_kernel_normal
|
||||
<<<dimGridKernel2, dimBlockKernel2>>>
|
||||
(dev_llr, dev_dt, dev_const_llr, BG, row, col, Zc);
|
||||
|
||||
ldpc_vnp_kernel_normal
|
||||
<<<dimGridKernel2, dimBlockKernel2>>>
|
||||
// (dev_llr, dev_const_llr,BG, row, col, Zc);
|
||||
(BG, row, col, Zc);
|
||||
}
|
||||
|
||||
int pack = (block_length/128)+1;
|
||||
dim3 pack_block(pack, MC, 1);
|
||||
pack_decoded_bit<<<pack_block,128>>>(dev_llr, dev_tmp, col, Zc);
|
||||
|
||||
|
||||
cudaEventRecord(end, 0);
|
||||
cudaEventSynchronize(end);
|
||||
cudaEventElapsedTime(&time, start, end);
|
||||
pack_decoded_bit<<<pack_block,128>>>(/*dev_llr,*/ /*dev_tmp,*/ col, Zc);
|
||||
|
||||
|
||||
//cudaCheck( cudaMemcpy((*)hard_decision, (const void*)dev_tmp, memorySize_hard_decision, cudaMemcpyDeviceToHost) );
|
||||
cudaCheck( cudaMemcpy((void*)hard_decision, (const void*)dev_tmp, (block_length/8)*sizeof(unsigned char), cudaMemcpyDeviceToHost) );
|
||||
cudaCheck( cudaMemcpyFromSymbol((void*)hard_decision, (const void*)dev_tmp, (block_length/8)*sizeof(unsigned char)) );
|
||||
cudaDeviceSynchronize();
|
||||
stop_meas(time_decoder);
|
||||
|
||||
cudaCheck( cudaFree(dev_llr) );
|
||||
cudaCheck( cudaFree(dev_dt) );
|
||||
cudaCheck( cudaFree(dev_const_llr) );
|
||||
cudaCheck( cudaFree(dev_tmp) );
|
||||
|
||||
//free(hard_decision);
|
||||
|
||||
return MAX_ITERATION;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef __NR_LDPC_DECODER_LYC__H__
|
||||
#define __NR_LDPC_DECODER_LYC__H__
|
||||
|
||||
#include "nrLDPC_types.h"
|
||||
#include "nrLDPC_init_mem.h"
|
||||
|
||||
/*! \file PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_decoder_LYC.h
|
||||
* \brief LDPC cuda support BG1 all length
|
||||
@@ -25,4 +23,10 @@
|
||||
|
||||
int32_t nrLDPC_decoder_LYC(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length, time_stats_t *time_decoder);
|
||||
|
||||
void init_LLR_DMA_for_CUDA(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, int block_length);
|
||||
|
||||
void warmup_for_GPU(void);
|
||||
|
||||
void set_compact_BG(int Zc, short BG);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,212 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*! \file PHY/CODING/nrLDPC_decoder_LYC/nrLDPC_defs.h
|
||||
* \brief LDPC cuda support BG1 all length
|
||||
* \author NCTU OpinConnect Terng-Yin Hsu,WEI-YING,LIN
|
||||
* \email tyhsu@cs.nctu.edu.tw
|
||||
* \date 13-05-2020
|
||||
* \version
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
|
||||
/*!\file nrLDPC_defs.h
|
||||
* \brief Defines all constants and buffers for the LDPC decoder
|
||||
* \author Sebastian Wagner (TCL Communications) Email: <mailto:sebastian.wagner@tcl.com>
|
||||
* \date 27-03-2018
|
||||
* \version 1.0
|
||||
* \note
|
||||
* \warning
|
||||
* */
|
||||
|
||||
#ifndef __NR_LDPC_DEFS__H__
|
||||
#define __NR_LDPC_DEFS__H__
|
||||
|
||||
// ==============================================================================
|
||||
// DEFINES
|
||||
|
||||
/** Maximum lifting size */
|
||||
#define NR_LDPC_ZMAX 384
|
||||
|
||||
/** Number of columns in BG1 */
|
||||
#define NR_LDPC_NCOL_BG1 68
|
||||
/** Number of rows in BG1 */
|
||||
#define NR_LDPC_NROW_BG1 46
|
||||
/** Number of edges/entries in BG1 */
|
||||
#define NR_LDPC_NUM_EDGE_BG1 316
|
||||
/** Number of check node (CN) groups in BG1
|
||||
A CN group is defined by its number of connected bit nodes. */
|
||||
#define NR_LDPC_NUM_CN_GROUPS_BG1 9
|
||||
/** First column in BG1 that is connected to only a single CN */
|
||||
#define NR_LDPC_START_COL_PARITY_BG1 26
|
||||
|
||||
/** Number of columns in BG1 for rate 1/3 = 22/(68-2) */
|
||||
#define NR_LDPC_NCOL_BG1_R13 NR_LDPC_NCOL_BG1
|
||||
/** Number of columns in BG1 for rate 2/3 = 22/(35-2) */
|
||||
#define NR_LDPC_NCOL_BG1_R23 35
|
||||
/** Number of columns in BG1 for rate 8/9 ~ 22/(27-2) */
|
||||
#define NR_LDPC_NCOL_BG1_R89 27
|
||||
|
||||
/** Number of bit node (BN) groups in BG1 for rate 1/3
|
||||
A BN group is defined by its number of connected CNs. */
|
||||
#define NR_LDPC_NUM_BN_GROUPS_BG1_R13 30
|
||||
/** Number of bit node (BN) groups in BG1 for rate 2/3 */
|
||||
#define NR_LDPC_NUM_BN_GROUPS_BG1_R23 8
|
||||
/** Number of bit node (BN) groups in BG1 for rate 8/9 */
|
||||
#define NR_LDPC_NUM_BN_GROUPS_BG1_R89 5
|
||||
|
||||
/** Number of columns in BG2 */
|
||||
#define NR_LDPC_NCOL_BG2 52
|
||||
/** Number of rows in BG2 */
|
||||
#define NR_LDPC_NROW_BG2 42
|
||||
/** Number of edges/entries in BG2 */
|
||||
#define NR_LDPC_NUM_EDGE_BG2 197
|
||||
/** Number of check node (CN) groups in BG2
|
||||
A CN group is defined by its number of connected bit nodes. */
|
||||
#define NR_LDPC_NUM_CN_GROUPS_BG2 6
|
||||
/** First column in BG2 that is connected to only a single CN */
|
||||
#define NR_LDPC_START_COL_PARITY_BG2 14
|
||||
|
||||
/** Number of columns in BG2 for rate 1/5 = 10/(52-2) */
|
||||
#define NR_LDPC_NCOL_BG2_R15 NR_LDPC_NCOL_BG2
|
||||
/** Number of columns in BG2 for rate 1/3 = 10/(32-2) */
|
||||
#define NR_LDPC_NCOL_BG2_R13 32
|
||||
/** Number of columns in BG2 for rate 2/3 = 10/(17-2) */
|
||||
#define NR_LDPC_NCOL_BG2_R23 17
|
||||
|
||||
/** Number of bit node (BN) groups in BG2 for rate 1/5
|
||||
A BN group is defined by its number of connected CNs. */
|
||||
#define NR_LDPC_NUM_BN_GROUPS_BG2_R15 23
|
||||
/** Number of bit node (BN) groups in BG2 for rate 1/3 */
|
||||
#define NR_LDPC_NUM_BN_GROUPS_BG2_R13 10
|
||||
/** Number of bit node (BN) groups in BG2 for rate 2/3 */
|
||||
#define NR_LDPC_NUM_BN_GROUPS_BG2_R23 6
|
||||
|
||||
/** Worst case size of the CN processing buffer */
|
||||
#define NR_LDPC_SIZE_CN_PROC_BUF NR_LDPC_NUM_EDGE_BG1*NR_LDPC_ZMAX
|
||||
/** Worst case size of the BN processing buffer */
|
||||
#define NR_LDPC_SIZE_BN_PROC_BUF NR_LDPC_NUM_EDGE_BG1*NR_LDPC_ZMAX
|
||||
|
||||
/** Maximum number of possible input LLR = NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX */
|
||||
#define NR_LDPC_MAX_NUM_LLR 26112
|
||||
|
||||
// ==============================================================================
|
||||
// GLOBAL CONSTANT VARIABLES
|
||||
|
||||
/** Start addresses for the cnProcBuf for each CN group in BG1*/
|
||||
static const uint32_t lut_startAddrCnGroups_BG1[NR_LDPC_NUM_CN_GROUPS_BG1] = {0, 1152, 8832, 43392, 61824, 75264, 81408, 88320, 92160};
|
||||
/** Start addresses for the cnProcBuf for each CN group in BG2*/
|
||||
static const uint32_t lut_startAddrCnGroups_BG2[NR_LDPC_NUM_CN_GROUPS_BG2] = {0, 6912, 37632, 54912, 61824, 67968};
|
||||
|
||||
/** Number of BNs of CN group for BG1.
|
||||
E.g. 10 means that there is a CN group where every CN is connected to 10 BNs */
|
||||
static const uint8_t lut_numBnInCnGroups_BG1_R13[NR_LDPC_NUM_CN_GROUPS_BG1] = {3, 4, 5, 6, 7, 8, 9, 10, 19};
|
||||
/** Number of rows/CNs in every CN group for rate = 1/3 BG1, e.g. 5 rows of CNs connected to 4 BNs */
|
||||
static const uint8_t lut_numCnInCnGroups_BG1_R13[NR_LDPC_NUM_CN_GROUPS_BG1] = {1, 5, 18, 8, 5, 2, 2, 1, 4};
|
||||
/** Number of rows/CNs in every CN group for rate = 2/3 BG1, e.g. 3 rows of CNs connected to 7 BNs */
|
||||
static const uint8_t lut_numCnInCnGroups_BG1_R23[NR_LDPC_NUM_CN_GROUPS_BG1] = {1, 0, 0, 0, 3, 2, 2, 1, 4};
|
||||
/** Number of rows/CNs in every CN group for rate = 8/9 BG1, e.g. 4 rows of CNs connected to 19 BNs */
|
||||
static const uint8_t lut_numCnInCnGroups_BG1_R89[NR_LDPC_NUM_CN_GROUPS_BG1] = {1, 0, 0, 0, 0, 0, 0, 0, 4};
|
||||
|
||||
/** Number of connected BNs for every column in BG1 rate = 1/3, e.g. in first column all BNs are connected to 30 CNs */
|
||||
static const uint8_t lut_numEdgesPerBn_BG1_R13[NR_LDPC_START_COL_PARITY_BG1] = {30, 28, 7, 11, 9, 4, 8, 12, 8, 7, 12, 10, 12, 11, 10, 7, 10, 10, 13, 7, 8, 11, 12, 5, 6, 6};
|
||||
/** Number of connected BNs for every column in BG1 rate = 2/3, e.g. in first column all BNs are connected to 12 CNs */
|
||||
static const uint8_t lut_numEdgesPerBn_BG1_R23[NR_LDPC_START_COL_PARITY_BG1] = {12, 11, 4, 5, 5, 3, 4, 5, 5, 3, 6, 6, 6, 6, 5, 3, 6, 5, 6, 4, 5, 6, 6, 3, 3, 2};
|
||||
/** Number of connected BNs for every column in BG1 rate = 8/9, e.g. in first column all BNs are connected to 5 CNs */
|
||||
static const uint8_t lut_numEdgesPerBn_BG1_R89[NR_LDPC_START_COL_PARITY_BG1] = {5, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2};
|
||||
|
||||
/** Number of BNs of CN group for BG2.
|
||||
E.g. 3 means that there is a CN group where every CN is connected to 3 BNs */
|
||||
static const uint8_t lut_numBnInCnGroups_BG2_R15[NR_LDPC_NUM_CN_GROUPS_BG2] = {3, 4, 5, 6, 8, 10};
|
||||
/** Number of rows/CNs in every CN group for rate = 1/5 BG2, e.g. 6 rows of CNs connected to 3 BNs */
|
||||
static const uint8_t lut_numCnInCnGroups_BG2_R15[NR_LDPC_NUM_CN_GROUPS_BG2] = {6, 20, 9, 3, 2, 2};
|
||||
/** Number of rows/CNs in every CN group for rate = 1/3 BG2, e.g. 8 rows of CNs connected to 4 BNs */
|
||||
static const uint8_t lut_numCnInCnGroups_BG2_R13[NR_LDPC_NUM_CN_GROUPS_BG2] = {0, 8, 7, 3, 2, 2};
|
||||
/** Number of rows/CNs in every CN group for rate = 2/3 BG2, e.g. 1 row of CNs connected to 4 BNs */
|
||||
static const uint8_t lut_numCnInCnGroups_BG2_R23[NR_LDPC_NUM_CN_GROUPS_BG2] = {0, 1, 0, 2, 2, 2};
|
||||
|
||||
/** Number of connected BNs for every column in BG2 rate = 1/5, e.g. in first column all BNs are connected to 22 CNs */
|
||||
static const uint8_t lut_numEdgesPerBn_BG2_R15[NR_LDPC_START_COL_PARITY_BG2] = {22, 23, 10, 5, 5, 14, 7, 13, 6, 8, 9, 16, 9, 12};
|
||||
/** Number of connected BNs for every column in BG2 rate = 1/3, e.g. in first column all BNs are connected to 14 CNs */
|
||||
static const uint8_t lut_numEdgesPerBn_BG2_R13[NR_LDPC_START_COL_PARITY_BG2] = {14, 16, 2, 4, 4, 6, 6, 8, 6, 6, 6, 13, 5, 7};
|
||||
/** Number of connected BNs for every column in BG2 rate = 2/3, e.g. in first column all BNs are connected to 6 CNs */
|
||||
static const uint8_t lut_numEdgesPerBn_BG2_R23[NR_LDPC_START_COL_PARITY_BG2] = { 6, 5, 2, 3, 3, 4, 3, 4, 3, 4, 3, 5, 2, 2};
|
||||
|
||||
// Number of groups for bit node processing
|
||||
/** Number of connected CNs for every column/BN in BG1 for rate = 1/3, Worst case is BG1 with up to 30 CNs connected to one BN
|
||||
E.g. 42 parity BNs connected to single CN */
|
||||
// BG1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
||||
static const uint8_t lut_numBnInBnGroups_BG1_R13[NR_LDPC_NUM_BN_GROUPS_BG1_R13] = {42, 0, 0, 1, 1, 2, 4, 3, 1, 4, 3, 4, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1};
|
||||
/** Number of connected CNs for every column/BN in BG1 for rate = 2/3 */
|
||||
static const uint8_t lut_numBnInBnGroups_BG1_R23[NR_LDPC_NUM_BN_GROUPS_BG1_R13] = { 9, 1, 5, 3, 7, 8, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
/** Number of connected CNs for every column/BN in BG1 for rate = 8/9 */
|
||||
static const uint8_t lut_numBnInBnGroups_BG1_R89[NR_LDPC_NUM_BN_GROUPS_BG1_R13] = { 1, 3,21, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
|
||||
/** Number of connected CNs for every column/BN in BG2 for rate = 1/5, Worst case is BG1 with up to 30 CNs connected to one BN
|
||||
E.g. 38 parity BNs connected to single CN */
|
||||
// BG2: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
||||
static const uint8_t lut_numBnInBnGroups_BG2_R15[NR_LDPC_NUM_BN_GROUPS_BG1_R13] = {38, 0, 0, 0, 2, 1, 1, 1, 2, 1, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0};
|
||||
/** Number of connected CNs for every column/BN in BG2 for rate = 1/3 */
|
||||
static const uint8_t lut_numBnInBnGroups_BG2_R13[NR_LDPC_NUM_BN_GROUPS_BG1_R13] = {18, 1, 0, 2, 1, 5, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
/** Number of connected CNs for every column/BN in BG2 for rate = 2/3 */
|
||||
static const uint8_t lut_numBnInBnGroups_BG2_R23[NR_LDPC_NUM_BN_GROUPS_BG1_R13] = { 3, 3, 5, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
|
||||
// Start addresses for the bnProcBuf for each BN group
|
||||
// BG1
|
||||
/** Start address for every BN group within the BN processing buffer for BG1 rate = 1/3 */
|
||||
static const uint32_t lut_startAddrBnGroups_BG1_R13[NR_LDPC_NUM_BN_GROUPS_BG1_R13] = {0, 16128, 17664, 19584, 24192, 34944, 44160, 47616, 62976, 75648, 94080, 99072, 109824};
|
||||
/** Start address for every BN group within the BN processing buffer for BG1 rate = 2/3 */
|
||||
static const uint32_t lut_startAddrBnGroups_BG1_R23[NR_LDPC_NUM_BN_GROUPS_BG1_R23] = {0, 3456, 4224, 9984, 14592, 28032, 46464, 50688};
|
||||
/** Start address for every BN group within the BN processing buffer for BG1 rate = 8/9 */
|
||||
static const uint32_t lut_startAddrBnGroups_BG1_R89[NR_LDPC_NUM_BN_GROUPS_BG1_R89] = {0, 384, 2688, 26880, 28416};
|
||||
|
||||
/** Start address for every BN group within the LLR processing buffer for BG1 rate = 1/3 */
|
||||
static const uint16_t lut_startAddrBnGroupsLlr_BG1_R13[NR_LDPC_NUM_BN_GROUPS_BG1_R13] = {0, 16128, 16512, 16896, 17664, 19200, 20352, 20736, 22272, 23424, 24960, 25344, 25728};
|
||||
/** Start address for every BN group within the LLR processing buffer for BG1 rate = 2/3 */
|
||||
static const uint16_t lut_startAddrBnGroupsLlr_BG1_R23[NR_LDPC_NUM_BN_GROUPS_BG1_R23] = {0, 3456, 3840, 5760, 6912, 9600, 12672, 13056};
|
||||
/** Start address for every BN group within the LLR processing buffer for BG1 rate = 8/9 */
|
||||
static const uint16_t lut_startAddrBnGroupsLlr_BG1_R89[NR_LDPC_NUM_BN_GROUPS_BG1_R89] = {0, 384, 1536, 9600, 9984};
|
||||
|
||||
// BG2
|
||||
/** Start address for every BN group within the BN processing buffer for BG2 rate = 1/5 */
|
||||
static const uint32_t lut_startAddrBnGroups_BG2_R15[NR_LDPC_NUM_BN_GROUPS_BG2_R15] = {0, 14592, 18432, 20736, 23424, 26496, 33408, 37248, 41856, 46848, 52224, 58368, 66816};
|
||||
/** Start address for every BN group within the BN processing buffer for BG2 rate = 1/3 */
|
||||
static const uint32_t lut_startAddrBnGroups_BG2_R13[NR_LDPC_NUM_BN_GROUPS_BG2_R13] = {0, 6912, 7680, 10752, 12672, 24192, 26880, 29952, 34944, 40320};
|
||||
/** Start address for every BN group within the BN processing buffer for BG2 rate = 2/3 */
|
||||
static const uint32_t lut_startAddrBnGroups_BG2_R23[NR_LDPC_NUM_BN_GROUPS_BG2_R23] = {0, 1152, 3456, 9216, 13824, 17664};
|
||||
|
||||
/** Start address for every BN group within the LLR processing buffer for BG2 rate = 1/5 */
|
||||
static const uint16_t lut_startAddrBnGroupsLlr_BG2_R15[NR_LDPC_NUM_BN_GROUPS_BG2_R15] = {0, 14592, 15360, 15744, 16128, 16512, 17280, 17664, 18048, 18432, 18816, 19200, 19584};
|
||||
/** Start address for every BN group within the LLR processing buffer for BG2 rate = 1/3 */
|
||||
static const uint16_t lut_startAddrBnGroupsLlr_BG2_R13[NR_LDPC_NUM_BN_GROUPS_BG2_R13] = {0, 6912, 7296, 8064, 8448, 10368, 10752, 11136, 11520, 11904};
|
||||
/** Start address for every BN group within the LLR processing buffer for BG2 rate = 2/3 */
|
||||
static const uint16_t lut_startAddrBnGroupsLlr_BG2_R23[NR_LDPC_NUM_BN_GROUPS_BG2_R23] = {0, 1152, 2304, 4224, 5376, 6144};
|
||||
|
||||
/** Vector of 32 '1' in int8 for application with AVX2 */
|
||||
static const int8_t ones256_epi8[32] __attribute__ ((aligned(32))) = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
|
||||
/** Vector of 32 '0' in int8 for application with AVX2 */
|
||||
static const int8_t zeros256_epi8[32] __attribute__ ((aligned(32))) = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||
/** Vector of 32 '127' in int8 for application with AVX2 */
|
||||
static const int8_t maxLLR256_epi8[32] __attribute__ ((aligned(32))) = {127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127,127};
|
||||
|
||||
#endif
|
||||
@@ -1,86 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*!\file nrLDPC_init_mem.h
|
||||
* \brief Defines the function to initialize the LDPC decoder and sets correct LUTs.
|
||||
* \author Sebastian Wagner (TCL Communications) Email: <mailto:sebastian.wagner@tcl.com>
|
||||
* \date 07-12-2018
|
||||
* \version 1.0
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __NR_LDPC_INIT_MEM__H__
|
||||
#define __NR_LDPC_INIT_MEM__H__
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "nrLDPC_defs.h"
|
||||
#include "nrLDPC_types.h"
|
||||
|
||||
#ifndef malloc32_clear
|
||||
/**
|
||||
\brief Allocates 32 byte aligned memory and initializes to zero
|
||||
\param size Input size in bytes
|
||||
\return Pointer to memory
|
||||
*/
|
||||
static inline void* malloc32_clear(size_t size)
|
||||
{
|
||||
void* ptr = (void*) memalign(32, size+32);
|
||||
memset(ptr, 0, size);
|
||||
return ptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
\brief Allocates and initializes the internal decoder processing buffers
|
||||
\param p_decParams Pointer to decoder parameters
|
||||
\param p_lut Pointer to decoder LUTs
|
||||
\return Number of LLR values
|
||||
*/
|
||||
static inline t_nrLDPC_procBuf* nrLDPC_init_mem(void)
|
||||
{
|
||||
t_nrLDPC_procBuf* p_procBuf = (t_nrLDPC_procBuf*) malloc32_clear(sizeof(t_nrLDPC_procBuf));
|
||||
|
||||
if (p_procBuf)
|
||||
{
|
||||
p_procBuf->cnProcBuf = (int8_t*) malloc32_clear(NR_LDPC_SIZE_CN_PROC_BUF*sizeof(int8_t));
|
||||
p_procBuf->cnProcBufRes = (int8_t*) malloc32_clear(NR_LDPC_SIZE_CN_PROC_BUF*sizeof(int8_t));
|
||||
p_procBuf->bnProcBuf = (int8_t*) malloc32_clear(NR_LDPC_SIZE_BN_PROC_BUF*sizeof(int8_t));
|
||||
p_procBuf->bnProcBufRes = (int8_t*) malloc32_clear(NR_LDPC_SIZE_BN_PROC_BUF*sizeof(int8_t));
|
||||
p_procBuf->llrRes = (int8_t*) malloc32_clear(NR_LDPC_MAX_NUM_LLR *sizeof(int8_t));
|
||||
p_procBuf->llrProcBuf = (int8_t*) malloc32_clear(NR_LDPC_MAX_NUM_LLR *sizeof(int8_t));
|
||||
}
|
||||
|
||||
return(p_procBuf);
|
||||
}
|
||||
|
||||
static inline void nrLDPC_free_mem(t_nrLDPC_procBuf* p_procBuf)
|
||||
{
|
||||
free(p_procBuf->cnProcBuf);
|
||||
free(p_procBuf->cnProcBufRes);
|
||||
free(p_procBuf->bnProcBuf);
|
||||
free(p_procBuf->bnProcBufRes);
|
||||
free(p_procBuf->llrRes);
|
||||
free(p_procBuf->llrProcBuf);
|
||||
|
||||
free(p_procBuf);
|
||||
}
|
||||
#endif
|
||||
@@ -1,106 +0,0 @@
|
||||
/*
|
||||
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
* except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.openairinterface.org/?page_id=698
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
/*!\file nrLDPC_types.h
|
||||
* \brief Defines all types for the LDPC decoder
|
||||
* \author Sebastian Wagner (TCL Communications) Email: <mailto:sebastian.wagner@tcl.com>
|
||||
* \date 27-03-2018
|
||||
* \version 1.0
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __NR_LDPC_TYPES__H__
|
||||
#define __NR_LDPC_TYPES__H__
|
||||
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "nrLDPC_defs.h"
|
||||
|
||||
// ==============================================================================
|
||||
// TYPES
|
||||
|
||||
/**
|
||||
Structure containing the pointers to the LUTs.
|
||||
*/
|
||||
typedef struct nrLDPC_lut {
|
||||
const uint32_t* startAddrCnGroups; /**< Start addresses for CN groups in CN processing buffer */
|
||||
const uint8_t* numCnInCnGroups; /**< Number of CNs in every CN group */
|
||||
const uint8_t* numBnInBnGroups; /**< Number of CNs in every BN group */
|
||||
const uint32_t* startAddrBnGroups; /**< Start addresses for BN groups in BN processing buffer */
|
||||
const uint16_t* startAddrBnGroupsLlr; /**< Start addresses for BN groups in LLR processing buffer */
|
||||
const uint16_t** circShift[NR_LDPC_NUM_CN_GROUPS_BG1]; /**< LUT for circular shift values for all CN groups and Zs */
|
||||
const uint32_t** startAddrBnProcBuf[NR_LDPC_NUM_CN_GROUPS_BG1]; /**< LUT of start addresses of CN groups in BN proc buffer */
|
||||
const uint8_t** bnPosBnProcBuf[NR_LDPC_NUM_CN_GROUPS_BG1]; /**< LUT of BN positions in BG for CN groups */
|
||||
const uint16_t* llr2llrProcBufAddr; /**< LUT for transferring input LLRs to LLR processing buffer */
|
||||
const uint8_t* llr2llrProcBufBnPos; /**< LUT BN position in BG */
|
||||
const uint8_t** posBnInCnProcBuf[NR_LDPC_NUM_CN_GROUPS_BG1]; /**< LUT for llr2cnProcBuf */
|
||||
} t_nrLDPC_lut;
|
||||
|
||||
/**
|
||||
Enum with possible LDPC output formats.
|
||||
*/
|
||||
typedef enum nrLDPC_outMode {
|
||||
nrLDPC_outMode_BIT, /**< 32 bits per uint32_t output */
|
||||
nrLDPC_outMode_BITINT8, /**< 1 bit per int8_t output */
|
||||
nrLDPC_outMode_LLRINT8 /**< Single LLR value per int8_t output */
|
||||
} e_nrLDPC_outMode;
|
||||
|
||||
/**
|
||||
Structure containing LDPC decoder parameters.
|
||||
*/
|
||||
typedef struct nrLDPC_dec_params {
|
||||
uint8_t BG; /**< Base graph */
|
||||
uint16_t Z; /**< Lifting size */
|
||||
uint8_t R; /**< Decoding rate: Format 15,13,... for code rates 1/5, 1/3,... */
|
||||
uint8_t numMaxIter; /**< Maximum number of iterations */
|
||||
e_nrLDPC_outMode outMode; /**< Output format */
|
||||
} t_nrLDPC_dec_params;
|
||||
|
||||
/**
|
||||
Structure containing LDPC decoder processing time statistics.
|
||||
*/
|
||||
typedef struct nrLDPC_time_stats {
|
||||
time_stats_t llr2llrProcBuf; /**< Statistics for function llr2llrProcBuf */
|
||||
time_stats_t llr2CnProcBuf; /**< Statistics for function llr2CnProcBuf */
|
||||
time_stats_t cnProc; /**< Statistics for function cnProc */
|
||||
time_stats_t cnProcPc; /**< Statistics for function cnProcPc */
|
||||
time_stats_t bnProcPc; /**< Statistics for function bnProcPc */
|
||||
time_stats_t bnProc; /**< Statistics for function bnProc */
|
||||
time_stats_t cn2bnProcBuf; /**< Statistics for function cn2bnProcBuf */
|
||||
time_stats_t bn2cnProcBuf; /**< Statistics for function bn2cnProcBuf */
|
||||
time_stats_t llrRes2llrOut; /**< Statistics for function llrRes2llrOut */
|
||||
time_stats_t llr2bit; /**< Statistics for function llr2bit */
|
||||
time_stats_t total; /**< Statistics for total processing time */
|
||||
} t_nrLDPC_time_stats;
|
||||
|
||||
/**
|
||||
Structure containing the processing buffers
|
||||
*/
|
||||
typedef struct nrLDPC_procBuf {
|
||||
int8_t* cnProcBuf; /**< CN processing buffer */
|
||||
int8_t* cnProcBufRes; /**< Buffer for CN processing results */
|
||||
int8_t* bnProcBuf; /**< BN processing buffer */
|
||||
int8_t* bnProcBufRes; /**< Buffer for BN processing results */
|
||||
int8_t* llrRes; /**< Buffer for LLR results */
|
||||
int8_t* llrProcBuf; /**< LLR processing buffer */
|
||||
} t_nrLDPC_procBuf;
|
||||
|
||||
#endif
|
||||
@@ -569,7 +569,7 @@ int8_t polar_decoder_dci(double *input,
|
||||
}
|
||||
|
||||
void init_polar_deinterleaver_table(t_nrPolar_params *polarParams) {
|
||||
AssertFatal(polarParams->K > 32, "K = %d < 33, is not supported yet\n",polarParams->K);
|
||||
AssertFatal(polarParams->K > 17, "K = %d < 18, is not allowed\n",polarParams->K);
|
||||
AssertFatal(polarParams->K < 129, "K = %d > 128, is not supported yet\n",polarParams->K);
|
||||
int bit_i,ip,ipmod64;
|
||||
int numbytes = polarParams->K>>3;
|
||||
@@ -670,7 +670,9 @@ uint32_t polar_decoder_int16(int16_t *input,
|
||||
A32_flip[1+offset]=((uint8_t *)&Aprime)[2];
|
||||
A32_flip[2+offset]=((uint8_t *)&Aprime)[1];
|
||||
A32_flip[3+offset]=((uint8_t *)&Aprime)[0];
|
||||
crc = (uint64_t)(crc24c(A32_flip,8*offset+len)>>8);
|
||||
if (crclen == 24) crc = (uint64_t)((crc24c(A32_flip,8*offset+len)>>8)&0xffffff);
|
||||
else if (crclen == 11) crc = (uint64_t)((crc11(A32_flip,8*offset+len)>>21)&0x7ff);
|
||||
else if (crclen == 6) crc = (uint64_t)((crc6(A32_flip,8*offset+len)>>26)&0x3f);
|
||||
} else if (len<=64) {
|
||||
Ar = (B[0]>>crclen) | (B[1]<<(64-crclen));;
|
||||
uint8_t A64_flip[8+offset];
|
||||
@@ -688,7 +690,9 @@ uint32_t polar_decoder_int16(int16_t *input,
|
||||
A64_flip[5+offset]=((uint8_t *)&Aprime)[2];
|
||||
A64_flip[6+offset]=((uint8_t *)&Aprime)[1];
|
||||
A64_flip[7+offset]=((uint8_t *)&Aprime)[0];
|
||||
crc = (uint64_t)(crc24c(A64_flip,8*offset+len)>>8);
|
||||
if (crclen==24) crc = (uint64_t)(crc24c(A64_flip,8*offset+len)>>8)&0xffffff;
|
||||
else if (crclen==11) crc = (uint64_t)(crc11(A64_flip,8*offset+len)>>21)&0x7ff;
|
||||
else if (crclen==6) crc = (uint64_t)(crc6(A64_flip,8*offset+len)>>26)&0x3f;
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
||||
@@ -197,8 +197,10 @@ decoder_node_t *add_nodes(int level, int first_leaf_index, t_nrPolar_params *pol
|
||||
}
|
||||
|
||||
for (int i=0;i<Nv;i++) {
|
||||
if (polarParams->information_bit_pattern[i+first_leaf_index]>0)
|
||||
all_frozen_below=0;
|
||||
if (polarParams->information_bit_pattern[i+first_leaf_index]>0) {
|
||||
all_frozen_below=0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (all_frozen_below==0)
|
||||
|
||||
@@ -146,7 +146,7 @@ void polar_encoder_dci(uint32_t *in,
|
||||
uint16_t n_RNTI);
|
||||
|
||||
void polar_encoder_fast(uint64_t *A,
|
||||
uint32_t *out,
|
||||
void *out,
|
||||
int32_t crcmask,
|
||||
uint8_t ones_flag,
|
||||
t_nrPolar_params *polarParams);
|
||||
|
||||
@@ -295,8 +295,8 @@ static inline void polar_rate_matching(t_nrPolar_params *polarParams,void *in,vo
|
||||
|
||||
void build_polar_tables(t_nrPolar_params *polarParams) {
|
||||
// build table b -> c'
|
||||
AssertFatal(polarParams->K > 32, "K = %d < 33, is not supported yet\n",polarParams->K);
|
||||
AssertFatal(polarParams->K < 129, "K = %d > 64, is not supported yet\n",polarParams->K);
|
||||
AssertFatal(polarParams->K > 17, "K = %d < 18, is not possible\n",polarParams->K);
|
||||
AssertFatal(polarParams->K < 129, "K = %d > 128, is not supported yet\n",polarParams->K);
|
||||
int bit_i,ip;
|
||||
int numbytes = polarParams->K>>3;
|
||||
int residue = polarParams->K&7;
|
||||
@@ -327,7 +327,7 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
|
||||
AssertFatal(polarParams->N==512 || polarParams->N==256 || polarParams->N==128,"N = %d, not done yet\n",polarParams->N);
|
||||
// build G bit vectors for information bit positions and convert the bit as bytes tables in nr_polar_kronecker_power_matrices.c to 64 bit packed vectors.
|
||||
// keep only rows of G which correspond to information/crc bits
|
||||
polarParams->G_N_tab = (uint64_t **)malloc(polarParams->K * sizeof(int64_t *));
|
||||
polarParams->G_N_tab = (uint64_t **)malloc((polarParams->K + polarParams->n_pc) * sizeof(int64_t *));
|
||||
int k=0;
|
||||
|
||||
for (int i=0; i<polarParams->N; i++) {
|
||||
@@ -408,18 +408,18 @@ void build_polar_tables(t_nrPolar_params *polarParams) {
|
||||
}
|
||||
|
||||
void polar_encoder_fast(uint64_t *A,
|
||||
uint32_t *out,
|
||||
void *out,
|
||||
int32_t crcmask,
|
||||
uint8_t ones_flag,
|
||||
t_nrPolar_params *polarParams) {
|
||||
AssertFatal(polarParams->K > 32, "K = %d < 33, is not supported yet\n",polarParams->K);
|
||||
// AssertFatal(polarParams->K > 32, "K = %d < 33, is not supported yet\n",polarParams->K);
|
||||
AssertFatal(polarParams->K < 129, "K = %d > 128, is not supported yet\n",polarParams->K);
|
||||
AssertFatal(polarParams->payloadBits < 65, "payload bits = %d > 64, is not supported yet\n",polarParams->payloadBits);
|
||||
uint64_t B[4]= {0,0,0,0},Cprime[4]= {0,0,0,0};
|
||||
int bitlen = polarParams->payloadBits;
|
||||
// append crc
|
||||
AssertFatal(bitlen<129,"support for payloads <= 128 bits\n");
|
||||
AssertFatal(polarParams->crcParityBits == 24,"support for 24-bit crc only for now\n");
|
||||
// AssertFatal(polarParams->crcParityBits == 24,"support for 24-bit crc only for now\n");
|
||||
//int bitlen0=bitlen;
|
||||
uint64_t tcrc=0;
|
||||
uint8_t offset = 0;
|
||||
@@ -444,7 +444,9 @@ void polar_encoder_fast(uint64_t *A,
|
||||
A32_flip[1+offset]=((uint8_t *)&Aprime)[2];
|
||||
A32_flip[2+offset]=((uint8_t *)&Aprime)[1];
|
||||
A32_flip[3+offset]=((uint8_t *)&Aprime)[0];
|
||||
tcrc = (uint64_t)((crcmask^(crc24c(A32_flip,8*offset+bitlen)>>8)));
|
||||
if (polarParams->crcParityBits == 24) tcrc = (uint64_t)(((crcmask^(crc24c(A32_flip,8*offset+bitlen)>>8)))&0xffffff);
|
||||
else if (polarParams->crcParityBits == 11) tcrc = (uint64_t)(((crcmask^(crc11(A32_flip,bitlen)>>21)))&0x7ff);
|
||||
else if (polarParams->crcParityBits == 6) tcrc = (uint64_t)(((crcmask^(crc6(A32_flip,bitlen)>>26)))&0x3f);
|
||||
} else if (bitlen<=64) {
|
||||
uint8_t A64_flip[8+offset];
|
||||
if (ones_flag) {
|
||||
@@ -461,7 +463,8 @@ void polar_encoder_fast(uint64_t *A,
|
||||
A64_flip[5+offset]=((uint8_t *)&Aprime)[2];
|
||||
A64_flip[6+offset]=((uint8_t *)&Aprime)[1];
|
||||
A64_flip[7+offset]=((uint8_t *)&Aprime)[0];
|
||||
tcrc = (uint64_t)((crcmask^(crc24c(A64_flip,8*offset+bitlen)>>8)));
|
||||
if (polarParams->crcParityBits == 24) tcrc = (uint64_t)((crcmask^(crc24c(A64_flip,8*offset+bitlen)>>8)))&0xffffff;
|
||||
else if (polarParams->crcParityBits == 11) tcrc = (uint64_t)((crcmask^(crc11(A64_flip,bitlen)>>21)))&0x7ff;
|
||||
}
|
||||
else if (bitlen<=128) {
|
||||
uint8_t A128_flip[16+offset];
|
||||
@@ -479,7 +482,8 @@ void polar_encoder_fast(uint64_t *A,
|
||||
A128_flip[10+offset]=((uint8_t*)&Aprime)[5]; A128_flip[11+offset]=((uint8_t*)&Aprime)[4];
|
||||
A128_flip[12+offset]=((uint8_t*)&Aprime)[3]; A128_flip[13+offset]=((uint8_t*)&Aprime)[2];
|
||||
A128_flip[14+offset]=((uint8_t*)&Aprime)[1]; A128_flip[15+offset]=((uint8_t*)&Aprime)[0];
|
||||
tcrc = (uint64_t)((crcmask^(crc24c(A128_flip,8*offset+bitlen)>>8)));
|
||||
if (polarParams->crcParityBits == 24) tcrc = (uint64_t)((crcmask^(crc24c(A128_flip,8*offset+bitlen)>>8)))&0xffffff;
|
||||
else if (polarParams->crcParityBits == 11) tcrc = (uint64_t)((crcmask^(crc11(A128_flip,bitlen)>>21)))&0x7ff;
|
||||
}
|
||||
|
||||
int n;
|
||||
@@ -522,6 +526,7 @@ void polar_encoder_fast(uint64_t *A,
|
||||
|
||||
#ifdef DEBUG_POLAR_ENCODER
|
||||
|
||||
printf("Polar encoder: (N,K) : (%d,%d)\n",polarParams->N,polarParams->K);
|
||||
if (polarParams->K<65)
|
||||
printf("A %llx B %llx Cprime %llx (payload bits %d,crc %x)\n",
|
||||
(unsigned long long)(A[0]&(((uint64_t)1<<bitlen)-1)),
|
||||
@@ -546,7 +551,7 @@ void polar_encoder_fast(uint64_t *A,
|
||||
crc24c((uint8_t *)A,bitlen)>>8);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
/* printf("Bbytes : %x.%x.%x.%x.%x.%x.%x.%x\n",Bbyte[0],Bbyte[1],Bbyte[2],Bbyte[3],Bbyte[4],Bbyte[5],Bbyte[6],Bbyte[7]);
|
||||
printf("%llx,%llx,%llx,%llx,%llx,%llx,%llx,%llx\n",polarParams->cprime_tab[0][Bbyte[0]] ,
|
||||
polarParams->cprime_tab[1][Bbyte[1]] ,
|
||||
@@ -671,5 +676,5 @@ void polar_encoder_fast(uint64_t *A,
|
||||
}
|
||||
}
|
||||
memset((void*)out,0,polarParams->encoderLength>>3);
|
||||
polar_rate_matching(polarParams,(void *)D,(void *)out);
|
||||
polar_rate_matching(polarParams,(void *)D, out);
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#ifndef __NR_POLAR_UCI_DEFS__H__
|
||||
#define __NR_POLAR_UCI_DEFS__H__
|
||||
|
||||
#define NR_POLAR_UCI_MESSAGE_TYPE -1 //int8_t
|
||||
#define NR_POLAR_UCI_CRC_ERROR_CORRECTION_BITS 3
|
||||
#define NR_POLAR_UCI_PUCCH_MESSAGE_TYPE 2 //int8_t
|
||||
#define NR_POLAR_PUCCH_CRC_ERROR_CORRECTION_BITS 3
|
||||
#define NR_POLAR_PUCCH_PAYLOAD_BITS 32
|
||||
#define NR_POLAR_PUCCH_E 32
|
||||
|
||||
|
||||
@@ -43,11 +43,12 @@ static void nr_polar_init(t_nrPolar_params * *polarParams,
|
||||
uint8_t aggregation_level,
|
||||
int decoder_flag) {
|
||||
t_nrPolar_params *currentPtr = *polarParams;
|
||||
uint16_t aggregation_prime = nr_polar_aggregation_prime(aggregation_level);
|
||||
uint16_t aggregation_prime = (messageType >= 2) ? aggregation_level : nr_polar_aggregation_prime(aggregation_level);
|
||||
|
||||
//Parse the list. If the node is already created, return without initialization.
|
||||
while (currentPtr != NULL) {
|
||||
//printf("currentPtr->idx %d, (%d,%d)\n",currentPtr->idx,currentPtr->payloadBits,currentPtr->encoderLength);
|
||||
//LOG_D(PHY,"Looking for index %d\n",(messageType * messageLength * aggregation_prime));
|
||||
if (currentPtr->idx == (messageType * messageLength * aggregation_prime)) return;
|
||||
else currentPtr = currentPtr->nextPtr;
|
||||
}
|
||||
@@ -55,8 +56,9 @@ static void nr_polar_init(t_nrPolar_params * *polarParams,
|
||||
// printf("currentPtr %p (polarParams %p)\n",currentPtr,polarParams);
|
||||
//Else, initialize and add node to the end of the linked list.
|
||||
t_nrPolar_params *newPolarInitNode = calloc(sizeof(t_nrPolar_params),1);
|
||||
|
||||
|
||||
if (newPolarInitNode != NULL) {
|
||||
// LOG_D(PHY,"Setting new polarParams index %d, messageType %d, messageLength %d, aggregation_prime %d\n",(messageType * messageLength * aggregation_prime),messageType,messageLength,aggregation_prime);
|
||||
newPolarInitNode->idx = (messageType * messageLength * aggregation_prime);
|
||||
newPolarInitNode->nextPtr = NULL;
|
||||
//printf("newPolarInitNode->idx %d, (%d,%d,%d:%d)\n",newPolarInitNode->idx,messageType,messageLength,aggregation_prime,aggregation_level);
|
||||
@@ -87,15 +89,44 @@ static void nr_polar_init(t_nrPolar_params * *polarParams,
|
||||
newPolarInitNode->crcCorrectionBits = NR_POLAR_DCI_CRC_ERROR_CORRECTION_BITS;
|
||||
newPolarInitNode->crc_generator_matrix=crc24c_generator_matrix(newPolarInitNode->payloadBits+newPolarInitNode->crcParityBits);//G_P
|
||||
//printf("Initializing polar parameters for DCI (K %d, E %d, L %d)\n",newPolarInitNode->payloadBits,newPolarInitNode->encoderLength,aggregation_level);
|
||||
} else if (messageType == -1) { //UCI
|
||||
} else if (messageType == 2) { //UCI PUCCH2
|
||||
AssertFatal(aggregation_level>2,"Aggregation level (%d) for PUCCH 2 encoding is NPRB and should be > 2\n",aggregation_level);
|
||||
AssertFatal(messageLength>11,"Message length %d is too short for polar encoding of UCI\n",messageLength);
|
||||
newPolarInitNode->n_max = NR_POLAR_PUCCH_N_MAX;
|
||||
newPolarInitNode->i_il = NR_POLAR_PUCCH_I_IL;
|
||||
newPolarInitNode->encoderLength = aggregation_level * 16;
|
||||
|
||||
newPolarInitNode->i_seg = 0;
|
||||
|
||||
if ((messageLength >= 360 && newPolarInitNode->encoderLength >= 1088)||
|
||||
(messageLength >= 1013)) newPolarInitNode->i_seg = 1;
|
||||
|
||||
newPolarInitNode->crcParityBits = 11;
|
||||
newPolarInitNode->n_pc = 0;
|
||||
newPolarInitNode->n_pc_wm = 0;
|
||||
|
||||
if (messageLength < 20) {
|
||||
newPolarInitNode->crcParityBits = 6;
|
||||
newPolarInitNode->n_pc = 3;
|
||||
if ((newPolarInitNode->encoderLength - messageLength - 6 + 3) < 193) newPolarInitNode->n_pc_wm = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
newPolarInitNode->i_bil = NR_POLAR_PUCCH_I_BIL;
|
||||
|
||||
newPolarInitNode->payloadBits = messageLength;
|
||||
newPolarInitNode->crcCorrectionBits = NR_POLAR_PUCCH_CRC_ERROR_CORRECTION_BITS;
|
||||
//newPolarInitNode->crc_generator_matrix=crc24c_generator_matrix(newPolarInitNode->payloadBits+newPolarInitNode->crcParityBits);//G_P
|
||||
//LOG_D(PHY,"New polar node, encoderLength %d, aggregation_level %d\n",newPolarInitNode->encoderLength,aggregation_level);
|
||||
} else {
|
||||
AssertFatal(1 == 0, "[nr_polar_init] Incorrect Message Type(%d)", messageType);
|
||||
}
|
||||
|
||||
newPolarInitNode->K = newPolarInitNode->payloadBits + newPolarInitNode->crcParityBits; // Number of bits to encode.
|
||||
newPolarInitNode->N = nr_polar_output_length(newPolarInitNode->K,
|
||||
newPolarInitNode->encoderLength,
|
||||
newPolarInitNode->n_max);
|
||||
newPolarInitNode->encoderLength,
|
||||
newPolarInitNode->n_max);
|
||||
newPolarInitNode->n = log2(newPolarInitNode->N);
|
||||
newPolarInitNode->G_N = nr_polar_kronecker_power_matrices(newPolarInitNode->n);
|
||||
//polar_encoder vectors:
|
||||
@@ -191,16 +222,19 @@ t_nrPolar_params *nr_polar_params (int8_t messageType,
|
||||
nr_polar_init(polarList_ext != NULL ? polarList_ext : &polarList,
|
||||
messageType,messageLength,aggregation_level,decoding_flag);
|
||||
t_nrPolar_params *polarParams=polarList_ext != NULL ? *polarList_ext : polarList;
|
||||
const int tag=messageType * messageLength * nr_polar_aggregation_prime(aggregation_level);
|
||||
const int tag=messageType * messageLength * (messageType>=2 ? aggregation_level : nr_polar_aggregation_prime(aggregation_level));
|
||||
|
||||
|
||||
|
||||
while (polarParams != NULL) {
|
||||
// LOG_D(PHY,"nr_polar_params : tag %d (from nr_polar_init %d)\n",tag,polarParams->idx);
|
||||
if (polarParams->idx == tag)
|
||||
return polarParams;
|
||||
|
||||
polarParams = polarParams->nextPtr;
|
||||
}
|
||||
|
||||
AssertFatal(false,"Polar Init tables internal failure\n");
|
||||
AssertFatal(false,"Polar Init tables internal failure, no polarParams found\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -364,8 +364,8 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
|
||||
if (ind < Foffset) { // case where we have some bits before the filler and the rest after
|
||||
memcpy((void*)e,(void*)(w+ind),Foffset-ind);
|
||||
|
||||
if (E + F <= Ncb) { // E+F doesn't contain all coded bits
|
||||
memcpy((void*)(e+Foffset-ind),(void*)(w+Foffset+F-ind),E-Foffset+ind);
|
||||
if (E + F <= Ncb-ind) { // E+F doesn't contain all coded bits
|
||||
memcpy((void*)(e+Foffset-ind),(void*)(w+Foffset+F),E-Foffset+ind);
|
||||
k=E;
|
||||
}
|
||||
else {
|
||||
@@ -375,11 +375,12 @@ int nr_rate_matching_ldpc(uint8_t Ilbrm,
|
||||
}
|
||||
else {
|
||||
if (E + F <= Ncb-ind) { //E+F doesn't contain all coded bits
|
||||
memcpy((void*)(e+Foffset-ind),(void*)(w+Foffset+F-ind),E-Foffset+ind);
|
||||
memcpy((void*)(e),(void*)(w+ind),E);
|
||||
k=E;
|
||||
}
|
||||
else {
|
||||
|
||||
memcpy((void*)(e),(void*)(w+ind),Ncb-ind);
|
||||
k=Ncb-ind;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
/*#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
#include "TDD-Config.h"
|
||||
@@ -39,7 +40,6 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_ulsch.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
#include "SCHED_NR/fapi_nr_l1.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "nfapi_nr_interface.h"
|
||||
|
||||
/*
|
||||
@@ -153,11 +153,11 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
nr_init_pdsch_dmrs(gNB, cfg->cell_config.phy_cell_id.value);
|
||||
|
||||
//PUSCH DMRS init
|
||||
gNB->nr_gold_pusch_dmrs = (uint32_t ****)malloc16(2*sizeof(uint32_t ***));
|
||||
|
||||
uint32_t ****pusch_dmrs = gNB->nr_gold_pusch_dmrs;
|
||||
|
||||
for(int nscid=0; nscid<2; nscid++) {
|
||||
@@ -176,6 +176,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
|
||||
uint32_t Nid_pusch[2] = {cfg->cell_config.phy_cell_id.value,cfg->cell_config.phy_cell_id.value};
|
||||
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]);
|
||||
|
||||
/// Transport init necessary for NR synchro
|
||||
@@ -232,6 +233,8 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
*/
|
||||
prach_vars->prach_ifft = (int32_t *)malloc16_clear(1024*2*sizeof(int32_t));
|
||||
|
||||
init_prach_list(gNB);
|
||||
|
||||
int N_RB_UL = cfg->carrier_config.ul_grid_size[cfg->ssb_config.scs_common.value].value;
|
||||
|
||||
printf("Before ULSCH init : %p\n",gNB->dlsch[0][0]->harq_processes[0]);
|
||||
@@ -405,7 +408,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
|
||||
fp->dl_CarrierFreq = 3500000000;//from_nrarfcn(gNB_config->nfapi_config.rf_bands.rf_band[0],gNB_config->nfapi_config.nrarfcn.value);
|
||||
fp->ul_CarrierFreq = 3500000000;//fp->dl_CarrierFreq - (get_uldl_offset(gNB_config->nfapi_config.rf_bands.rf_band[0])*100000);
|
||||
fp->nr_band = 78;
|
||||
fp->threequarter_fs= 0;
|
||||
// fp->threequarter_fs= 0;
|
||||
|
||||
gNB_config->carrier_config.dl_bandwidth.value = config_bandwidth(mu, N_RB_DL, fp->nr_band);
|
||||
|
||||
@@ -417,6 +420,7 @@ void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,
|
||||
|
||||
void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
|
||||
uint8_t Mod_id = phy_config->Mod_id;
|
||||
uint8_t short_sequence, num_sequences, rootSequenceIndex, fd_occasion;
|
||||
NR_DL_FRAME_PARMS *fp = &RC.gNB[Mod_id]->frame_parms;
|
||||
nfapi_nr_config_request_scf_t *gNB_config = &RC.gNB[Mod_id]->gNB_config;
|
||||
|
||||
@@ -480,6 +484,14 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config) {
|
||||
return;
|
||||
}
|
||||
|
||||
fd_occasion = 0;
|
||||
nfapi_nr_prach_config_t *prach_config = &gNB_config->prach_config;
|
||||
short_sequence = prach_config->prach_sequence_length.value;
|
||||
num_sequences = prach_config->num_prach_fd_occasions_list[fd_occasion].num_root_sequences.value;
|
||||
rootSequenceIndex = prach_config->num_prach_fd_occasions_list[fd_occasion].prach_root_sequence_index.value;
|
||||
|
||||
compute_nr_prach_seq(short_sequence, num_sequences, rootSequenceIndex, RC.gNB[Mod_id]->X_u);
|
||||
|
||||
RC.gNB[Mod_id]->configured = 1;
|
||||
LOG_I(PHY,"gNB %d configured\n",Mod_id);
|
||||
}
|
||||
@@ -492,6 +504,12 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
|
||||
LOG_I(PHY, "Initialise nr transport\n");
|
||||
uint16_t grid_size = cfg->carrier_config.dl_grid_size[fp->numerology_index].value;
|
||||
|
||||
for (i=0; i<NUMBER_OF_NR_PUCCH_MAX; i++) {
|
||||
LOG_I(PHY,"Allocating Transport Channel Buffers for PUCCH %d/%d\n",i,NUMBER_OF_NR_PUCCH_MAX);
|
||||
gNB->pucch[i] = new_gNB_pucch();
|
||||
AssertFatal(gNB->pucch[i]!=NULL,"Can't initialize pucch %d \n", i);
|
||||
}
|
||||
|
||||
for (i=0; i<NUMBER_OF_NR_DLSCH_MAX; i++) {
|
||||
|
||||
LOG_I(PHY,"Allocating Transport Channel Buffers for DLSCH %d/%d\n",i,NUMBER_OF_NR_DLSCH_MAX);
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "phy_init.h"
|
||||
#include "SCHED/sched_common.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "SIMULATION/TOOLS/sim.h"
|
||||
/*#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "RadioResourceConfigDedicated.h"
|
||||
@@ -44,9 +45,11 @@ int nr_phy_init_RU(RU_t *ru) {
|
||||
nfapi_nr_config_request_scf_t *cfg;
|
||||
ru->nb_log_antennas=0;
|
||||
for (int n=0;n<RC.nb_nr_L1_inst;n++) {
|
||||
cfg = &RC.gNB[n]->gNB_config;
|
||||
cfg = &ru->config;
|
||||
if (cfg->carrier_config.num_tx_ant.value > ru->nb_log_antennas) ru->nb_log_antennas = cfg->carrier_config.num_tx_ant.value;
|
||||
}
|
||||
// copy configuration from gNB[0] in to RU, assume that all gNB instances sharing RU use the same configuration (at least the parts that are needed by the RU, numerology and PRACH)
|
||||
|
||||
AssertFatal(ru->nb_log_antennas > 0 && ru->nb_log_antennas < 13, "ru->nb_log_antennas %d ! \n",ru->nb_log_antennas);
|
||||
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals
|
||||
// Time-domain signals
|
||||
@@ -107,7 +110,8 @@ int nr_phy_init_RU(RU_t *ru) {
|
||||
ru->prach_rxsigF = (int16_t**)malloc(ru->nb_rx * sizeof(int16_t*));
|
||||
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
ru->prach_rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
// largest size for PRACH FFT is 4x98304 (16*24576)
|
||||
ru->prach_rxsigF[i] = (int16_t*)malloc16_clear( 4*98304*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]);
|
||||
}
|
||||
|
||||
@@ -144,6 +148,8 @@ int nr_phy_init_RU(RU_t *ru) {
|
||||
|
||||
ru->common.sync_corr = (uint32_t*)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_subframe_wCP );
|
||||
|
||||
init_prach_ru_list(ru);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -77,19 +77,19 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id,
|
||||
|
||||
LOG_I(PHY,"[UE%d] Applying radioResourceConfigCommon from eNB%d\n",Mod_id,eNB_id);
|
||||
|
||||
fp->prach_config_common.rootSequenceIndex =radioResourceConfigCommon->prach_Config.rootSequenceIndex;
|
||||
ue->prach_vars[eNB_id]->prach_pdu.root_seq_id =radioResourceConfigCommon->prach_Config.rootSequenceIndex;
|
||||
|
||||
fp->prach_config_common.prach_Config_enabled=1;
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_ConfigIndex;
|
||||
fp->prach_config_common.prach_ConfigInfo.highSpeedFlag =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.highSpeedFlag;
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig;
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset;
|
||||
ue->prach_vars[eNB_id]->prach_Config_enabled=1;
|
||||
//ue->prach_vars[eNB_id]->prach_pdu.prach_ConfigIndex =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_ConfigIndex;
|
||||
ue->prach_vars[eNB_id]->prach_pdu.restricted_set =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.highSpeedFlag;
|
||||
ue->prach_vars[eNB_id]->prach_pdu.num_cs =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig;
|
||||
//ue->prach_vars[eNB_id]->prach_pdu.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset;
|
||||
|
||||
compute_prach_seq(fp->prach_config_common.rootSequenceIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->frame_type,ue->X_u);
|
||||
//compute_prach_seq(fp->prach_config_common.rootSequenceIndex,
|
||||
// fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
// fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
// fp->prach_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
// fp->frame_type,ue->X_u);
|
||||
|
||||
|
||||
|
||||
@@ -226,12 +226,12 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_
|
||||
LOG_I(PHY,"[UE%d] Handover triggered: Applying radioResourceConfigCommon from eNB %d\n",
|
||||
Mod_id,eNB_id);
|
||||
|
||||
fp->prach_config_common.rootSequenceIndex =radioResourceConfigCommon->prach_Config.rootSequenceIndex;
|
||||
fp->prach_config_common.prach_Config_enabled=1;
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_ConfigIndex;
|
||||
fp->prach_config_common.prach_ConfigInfo.highSpeedFlag =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->highSpeedFlag;
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->zeroCorrelationZoneConfig;
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_FreqOffset;
|
||||
ue->prach_vars[eNB_id]->prach_pdu.root_seq_id =radioResourceConfigCommon->prach_Config.rootSequenceIndex;
|
||||
ue->prach_vars[eNB_id]->prach_Config_enabled=1;
|
||||
//ue->prach_vars[eNB_id]->prach_pdu.prach_ConfigIndex =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_ConfigIndex;
|
||||
ue->prach_vars[eNB_id]->prach_pdu.restricted_set =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->highSpeedFlag;
|
||||
ue->prach_vars[eNB_id]->prach_pdu.num_cs =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->zeroCorrelationZoneConfig;
|
||||
//ue->prach_vars[eNB_id]->prach_pdu.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_FreqOffset;
|
||||
|
||||
// prach_fmt = get_prach_fmt(radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_ConfigIndex,fp->frame_type);
|
||||
// N_ZC = (prach_fmt <4)?839:139;
|
||||
@@ -239,12 +239,12 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_
|
||||
// prach_root_sequence_map4[fp->prach_config_common.rootSequenceIndex];
|
||||
|
||||
//compute_prach_seq(u,N_ZC, PHY_vars_UE_g[Mod_id]->X_u);
|
||||
compute_prach_seq(PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.rootSequenceIndex,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->frame_type,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->X_u);
|
||||
//compute_prach_seq(PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.rootSequenceIndex,
|
||||
// PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
// PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
// PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
// fp->frame_type,
|
||||
// PHY_vars_UE_g[Mod_id][CC_id]->X_u);
|
||||
|
||||
|
||||
fp->pucch_config_common.deltaPUCCH_Shift = 1+radioResourceConfigCommon->pucch_ConfigCommon->deltaPUCCH_Shift;
|
||||
@@ -958,7 +958,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
// enable MIB/SIB decoding by default
|
||||
ue->decode_MIB = 1;
|
||||
ue->decode_SIB = 1;
|
||||
init_prach_tables(839);
|
||||
|
||||
init_nr_prach_tables(839);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,18 +112,12 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
|
||||
int lte_est_timing_advance_pusch(PHY_VARS_eNB *eNB,
|
||||
module_id_t UE_id)
|
||||
int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **ul_ch_estimates_time)
|
||||
{
|
||||
int temp, i, aa, max_pos=0, max_val=0;
|
||||
short Re,Im;
|
||||
|
||||
RU_t *ru;
|
||||
ru = RC.ru[UE_id];
|
||||
LTE_DL_FRAME_PARMS *frame_parms = (eNB==NULL) ? ru->frame_parms : &eNB->frame_parms;
|
||||
LTE_eNB_PUSCH *eNB_pusch_vars = (eNB!=NULL) ? eNB->pusch_vars[UE_id] : (LTE_eNB_PUSCH*)NULL;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
int32_t **ul_ch_estimates_time = (eNB==NULL) ? calibration->drs_ch_estimates_time : eNB_pusch_vars->drs_ch_estimates_time;
|
||||
uint8_t cyclic_shift = 0;
|
||||
int sync_pos = (frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size);
|
||||
|
||||
@@ -149,7 +143,7 @@ int lte_est_timing_advance_pusch(PHY_VARS_eNB *eNB,
|
||||
max_pos = max_pos-frame_parms->ofdm_symbol_size;
|
||||
|
||||
//#ifdef DEBUG_PHY
|
||||
LOG_D(PHY,"frame %d: max_pos = %d, sync_pos=%d\n",eNB->proc.frame_rx,max_pos,sync_pos);
|
||||
LOG_D(PHY,"max_pos = %d, sync_pos=%d\n",max_pos,sync_pos);
|
||||
//#endif //DEBUG_PHY
|
||||
|
||||
return max_pos - sync_pos;
|
||||
|
||||
@@ -220,8 +220,12 @@ void phy_adjust_gain (PHY_VARS_UE *phy_vars_ue,
|
||||
uint32_t rx_power_fil_dB,
|
||||
unsigned char eNB_id);
|
||||
|
||||
int lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
|
||||
int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
L1_rxtx_proc_t *proc,
|
||||
LTE_eNB_ULSCH_t * ulsch,
|
||||
int32_t **ul_ch_estimates,
|
||||
int32_t **ul_ch_estimates_time,
|
||||
int32_t **rxdataF_ext,
|
||||
module_id_t UE_id,
|
||||
uint8_t l,
|
||||
uint8_t Ns);
|
||||
@@ -258,7 +262,8 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char number_of_cards,
|
||||
short coef);
|
||||
|
||||
int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,module_id_t UE_id);
|
||||
int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **ul_ch_estimates_time);
|
||||
|
||||
void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
|
||||
int subframe,
|
||||
|
||||
@@ -34,23 +34,17 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
|
||||
|
||||
#define SCALE 0x3FFF
|
||||
|
||||
int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
L1_rxtx_proc_t *proc,
|
||||
LTE_eNB_ULSCH_t * ulsch,
|
||||
int32_t **ul_ch_estimates,
|
||||
int32_t **ul_ch_estimates_time,
|
||||
int32_t **rxdataF_ext,
|
||||
module_id_t UE_id,
|
||||
unsigned char l,
|
||||
unsigned char Ns) {
|
||||
RU_t *ru;
|
||||
ru = RC.ru[UE_id];
|
||||
LTE_DL_FRAME_PARMS *frame_parms = (eNB!=NULL) ? &eNB->frame_parms : ru->frame_parms;
|
||||
LTE_eNB_PUSCH *pusch_vars = (eNB!=NULL) ? eNB->pusch_vars[UE_id] : NULL;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
int32_t **ul_ch_estimates = (eNB!=NULL) ? pusch_vars->drs_ch_estimates : calibration->drs_ch_estimates;
|
||||
AssertFatal(ul_ch_estimates != NULL, "ul_ch_estimates is null (eNB %p, pusch %p, pusch->drs_ch_estimates %p, pusch->drs_ch_estimates[0] %p ul_ch_estimates %p UE_id %d)\n",eNB,pusch_vars,
|
||||
pusch_vars->drs_ch_estimates,pusch_vars->drs_ch_estimates[0],ul_ch_estimates,UE_id);
|
||||
int32_t **ul_ch_estimates_time = (eNB!=NULL) ? pusch_vars->drs_ch_estimates_time : calibration->drs_ch_estimates_time;
|
||||
AssertFatal(ul_ch_estimates != NULL, "ul_ch_estimates is null ");
|
||||
AssertFatal(ul_ch_estimates_time != NULL, "ul_ch_estimates_time is null\n");
|
||||
int32_t **rxdataF_ext = (eNB!=NULL) ? pusch_vars->rxdataF_ext : calibration->rxdataF_ext;
|
||||
|
||||
int subframe = proc->subframe_rx;
|
||||
|
||||
uint8_t harq_pid;
|
||||
@@ -83,16 +77,16 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
#endif
|
||||
int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
|
||||
|
||||
if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0;
|
||||
if (ulsch->ue_type > 0) harq_pid = 0;
|
||||
else {
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
}
|
||||
|
||||
uint16_t N_rb_alloc = eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb;
|
||||
uint16_t N_rb_alloc = ulsch->harq_processes[harq_pid]->nb_rb;
|
||||
int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
|
||||
Msc_RS = N_rb_alloc*12;
|
||||
cyclic_shift = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
|
||||
eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
|
||||
ulsch->harq_processes[harq_pid]->n_DMRS2 +
|
||||
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
|
||||
Msc_idx_ptr = (uint16_t *) bsearch(&Msc_RS, dftsizes, 34, sizeof(uint16_t), compareints);
|
||||
|
||||
@@ -276,7 +270,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
#if T_TRACER
|
||||
|
||||
if (aa == 0)
|
||||
T(T_ENB_PHY_UL_CHANNEL_ESTIMATE, T_INT(0), T_INT(eNB->ulsch[UE_id]->rnti),
|
||||
T(T_ENB_PHY_UL_CHANNEL_ESTIMATE, T_INT(0), T_INT(ulsch->rnti),
|
||||
T_INT(proc->frame_rx), T_INT(subframe),
|
||||
T_INT(0), T_BUFFER(ul_ch_estimates_time[0], 512 * 4));
|
||||
|
||||
|
||||
@@ -2006,11 +2006,6 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
|
||||
return;
|
||||
}
|
||||
|
||||
//AssertFatal(ulsch->harq_processes[harq_pid]->nb_rb>0,"nb_rb = 0\n");
|
||||
if(ulsch->harq_processes[harq_pid]->nb_rb == 0) {
|
||||
LOG_E(PHY, "fill_ulsch UE_id %d nb_rb = 0\n", UE_id);
|
||||
}
|
||||
|
||||
ulsch->harq_processes[harq_pid]->frame = frame;
|
||||
ulsch->harq_processes[harq_pid]->subframe = subframe;
|
||||
ulsch->harq_processes[harq_pid]->handled = 0;
|
||||
|
||||
@@ -422,6 +422,6 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
|
||||
else
|
||||
r_offset += Nl*Qm * ((GpmodC==0?0:1) + (Gp/C));
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -1047,7 +1047,11 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
l%(frame_parms->symbols_per_tti/2),
|
||||
l/(frame_parms->symbols_per_tti/2),
|
||||
frame_parms);
|
||||
lte_ul_channel_estimation(eNB,proc,
|
||||
lte_ul_channel_estimation(&eNB->frame_parms,proc,
|
||||
eNB->ulsch[UE_id],
|
||||
eNB->pusch_vars[UE_id]->drs_ch_estimates,
|
||||
eNB->pusch_vars[UE_id]->drs_ch_estimates_time,
|
||||
eNB->pusch_vars[UE_id]->rxdataF_ext,
|
||||
UE_id,
|
||||
l%(frame_parms->symbols_per_tti/2),
|
||||
l/(frame_parms->symbols_per_tti/2));
|
||||
|
||||
@@ -821,15 +821,14 @@ int rx_pdsch(PHY_VARS_UE *ue,
|
||||
pllr_symbol_cw0 += llr_offset_symbol;
|
||||
pllr_symbol_cw1 += llr_offset_symbol;
|
||||
|
||||
/*
|
||||
LOG_I(PHY,"compute LLRs [AbsSubframe %d.%d-%d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %p @LLR Buff(symb) %p\n",
|
||||
LOG_D(PHY,"compute LLRs [AbsSubframe %d.%d-%d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %p @LLR Buff(symb) %p energy: %d\n",
|
||||
frame, subframe,symbol,
|
||||
nb_rb,dlsch0_harq->Qm,
|
||||
pdsch_vars[eNB_id]->llr_length[symbol],
|
||||
pdsch_vars[eNB_id]->llr_offset[symbol],
|
||||
(int16_t*)pdsch_vars[eNB_id]->llr[0],
|
||||
pllr_symbol_cw0);
|
||||
*/
|
||||
pllr_symbol_cw0,
|
||||
signal_energy(pdsch_vars[eNB_id]->rxdataF_comp0[0], 7*2*frame_parms->N_RB_DL*12));
|
||||
switch (dlsch0_harq->Qm) {
|
||||
case 2 :
|
||||
if ((rx_type==rx_standard) || (codeword_TB1 == -1)) {
|
||||
|
||||
@@ -34,6 +34,8 @@ void nr_modulation(uint32_t *in,
|
||||
offset = (mod_order==2)? NR_MOD_TABLE_QPSK_OFFSET : (mod_order==4)? NR_MOD_TABLE_QAM16_OFFSET : \
|
||||
(mod_order==6)? NR_MOD_TABLE_QAM64_OFFSET: (mod_order==8)? NR_MOD_TABLE_QAM256_OFFSET : 0;
|
||||
|
||||
LOG_D(PHY,"nr_modulation: length %d, mod_order %d\n",length,mod_order);
|
||||
|
||||
for (int i=0; i<length/mod_order; i++)
|
||||
{
|
||||
idx = 0;
|
||||
|
||||
@@ -212,10 +212,10 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
|
||||
int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
unsigned char symbol,
|
||||
unsigned char Ns,
|
||||
int sample_offset,
|
||||
int no_prefix)
|
||||
unsigned char symbol,
|
||||
unsigned char Ns,
|
||||
int sample_offset,
|
||||
int no_prefix)
|
||||
{
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
NR_UE_COMMON *common_vars = &ue->common_vars;
|
||||
@@ -339,7 +339,7 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
#endif
|
||||
|
||||
|
||||
dft(dftsize,(int16_t *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsize,(int16_t *) &common_vars->rxdata[aa][rx_offset],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
@@ -363,7 +363,7 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
dft(dftsize,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
dft(dftsize,(int16_t *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsize,(int16_t *) &common_vars->rxdata[aa][rx_offset],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
}
|
||||
#if UE_TIMING_TRACE
|
||||
@@ -395,12 +395,13 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
|
||||
int sample_offset,
|
||||
int no_prefix)
|
||||
{
|
||||
uint32_t slot_offset;
|
||||
uint32_t rxdata_offset;
|
||||
int32_t slot_offset, rxdata_offset;
|
||||
|
||||
unsigned int nb_prefix_samples = (no_prefix ? 0 : frame_parms->nb_prefix_samples);
|
||||
unsigned int nb_prefix_samples0 = (no_prefix ? 0 : frame_parms->nb_prefix_samples0);
|
||||
|
||||
int tmp_dft_in[8192] __attribute__ ((aligned (32)));
|
||||
|
||||
dft_size_idx_t dftsize;
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
@@ -443,14 +444,29 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
slot_offset = frame_parms->get_samples_slot_timestamp(Ns,frame_parms,0);
|
||||
|
||||
|
||||
if(symbol == 0)
|
||||
rxdata_offset = slot_offset + nb_prefix_samples0 - SOFFSET;
|
||||
else
|
||||
rxdata_offset = slot_offset + nb_prefix_samples0 + (symbol * (frame_parms->ofdm_symbol_size + nb_prefix_samples)) - SOFFSET;
|
||||
|
||||
dft(dftsize,(int16_t *)&rxdata[rxdata_offset],
|
||||
(int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
|
||||
if(sample_offset>rxdata_offset) {
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *) &rxdata[frame_parms->samples_per_frame-sample_offset+rxdata_offset],
|
||||
(sample_offset-rxdata_offset)*sizeof(int));
|
||||
|
||||
memcpy((void *)&tmp_dft_in[sample_offset-rxdata_offset],
|
||||
(void *) &rxdata[0],
|
||||
(frame_parms->ofdm_symbol_size-sample_offset+rxdata_offset)*sizeof(int));
|
||||
|
||||
dft(dftsize,(int16_t *)&tmp_dft_in,
|
||||
(int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
|
||||
}
|
||||
else
|
||||
dft(dftsize,(int16_t *)&rxdata[rxdata_offset-sample_offset],
|
||||
(int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
|
||||
|
||||
// clear DC carrier from OFDM symbols
|
||||
rxdataF[symbol * frame_parms->ofdm_symbol_size] = 0;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "PHY/NR_UE_ESTIMATION/filt16a_32.h"
|
||||
|
||||
//#define DEBUG_CH
|
||||
|
||||
//#define DEBUG_PUSCH
|
||||
|
||||
int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
unsigned char Ns,
|
||||
@@ -116,7 +116,10 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
//------------------generate DMRS------------------//
|
||||
|
||||
nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], &pilot[0], 1000, 0, nb_rb_pusch, pusch_pdu->dmrs_config_type);
|
||||
if (pusch_pdu->transform_precoding==1) // if transform precoding is disabled
|
||||
nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], &pilot[0], 1000, 0, nb_rb_pusch, pusch_pdu->rb_start*NR_NB_SC_PER_RB, pusch_pdu->dmrs_config_type);
|
||||
else
|
||||
nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], &pilot[0], 1000, 0, nb_rb_pusch, 0, pusch_pdu->dmrs_config_type);
|
||||
|
||||
//------------------------------------------------//
|
||||
|
||||
@@ -129,8 +132,9 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
memset(ul_ch,0,4*(gNB->frame_parms.ofdm_symbol_size));
|
||||
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("symbol_offset %d, nushift %d\n",symbol_offset,nushift);
|
||||
printf("ch est pilot addr %p RB_DL %d\n",&pilot[0], gNB->frame_parms.N_RB_UL);
|
||||
printf("k %d, first_carrier %d\n",k,gNB->frame_parms.first_carrier_offset);
|
||||
printf("bwp_start_subcarrier %d, k %d, first_carrier %d\n",bwp_start_subcarrier,k,gNB->frame_parms.first_carrier_offset);
|
||||
printf("rxF addr %p p %d\n", rxF,p);
|
||||
printf("ul_ch addr %p nushift %d\n",ul_ch,nushift);
|
||||
#endif
|
||||
@@ -145,7 +149,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("ch 0 %d\n",((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1]));
|
||||
printf("pilot 0 : rxF - > (%d,%d) addr %p ch -> (%d,%d), pil -> (%d,%d) \n",rxF[0],rxF[1],&rxF[0],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("data 0 : rxF - > (%d,%d) addr %p ch -> (%d,%d), pil -> (%d,%d) \n",rxF[2],rxF[3],&rxF[2],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("data 0 : rxF - > (%d,%d)\n",rxF[2],rxF[3]);
|
||||
#endif
|
||||
|
||||
multadd_real_vector_complex_scalar(fl,
|
||||
@@ -163,6 +167,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("pilot 1 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("data 1 : rxF - > (%d,%d)\n",rxF[2],rxF[3]);
|
||||
#endif
|
||||
multadd_real_vector_complex_scalar(fml,
|
||||
ch,
|
||||
@@ -178,6 +183,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("pilot 2 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("data 2 : rxF - > (%d,%d)\n",rxF[2],rxF[3]);
|
||||
#endif
|
||||
multadd_real_vector_complex_scalar(fmm,
|
||||
ch,
|
||||
@@ -198,7 +204,8 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("pilot 1 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("pilot %u : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("data %u : rxF - > (%d,%d)\n",pilot_cnt,rxF[2],rxF[3]);
|
||||
#endif
|
||||
multadd_real_vector_complex_scalar(fml,
|
||||
ch,
|
||||
@@ -214,6 +221,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("pilot %u : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt+1,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("data %u : rxF - > (%d,%d)\n",pilot_cnt+1,rxF[2],rxF[3]);
|
||||
#endif
|
||||
multadd_real_vector_complex_scalar(fmm,
|
||||
ch,
|
||||
@@ -235,6 +243,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("pilot %u : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("data %u : rxF - > (%d,%d)\n",pilot_cnt,rxF[2],rxF[3]);
|
||||
#endif
|
||||
multadd_real_vector_complex_scalar(fm,
|
||||
ch,
|
||||
@@ -253,6 +262,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("ch 0 %d\n",((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1]));
|
||||
printf("pilot %u: rxF - > (%d,%d) addr %p ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt+1,rxF[0],rxF[1],&rxF[0],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("data %u : rxF - > (%d,%d)\n",pilot_cnt+1,rxF[2],rxF[3]);
|
||||
#endif
|
||||
multadd_real_vector_complex_scalar(fmr,
|
||||
ch,
|
||||
@@ -268,6 +278,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("pilot %u: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt+2,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("data %u : rxF - > (%d,%d)\n",pilot_cnt+2,rxF[2],rxF[3]);
|
||||
#endif
|
||||
multadd_real_vector_complex_scalar(fr,
|
||||
ch,
|
||||
@@ -275,70 +286,69 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
8);
|
||||
|
||||
|
||||
// check if PRB crosses DC and improve estimates around DC
|
||||
if ((bwp_start_subcarrier < gNB->frame_parms.ofdm_symbol_size) && (bwp_start_subcarrier+nb_rb_pusch*12 >= gNB->frame_parms.ofdm_symbol_size)) {
|
||||
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
||||
uint16_t idxDC = 2*(gNB->frame_parms.ofdm_symbol_size - bwp_start_subcarrier);
|
||||
uint16_t idxPil = idxDC/2;
|
||||
re_offset = k;
|
||||
pil = (int16_t *)&pilot[0];
|
||||
pil += (idxPil-2);
|
||||
ul_ch += (idxDC-4);
|
||||
ul_ch = memset(ul_ch, 0, sizeof(int16_t)*10);
|
||||
re_offset = (re_offset+idxDC/2-2) % gNB->frame_parms.ofdm_symbol_size;
|
||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
// for proper allignment of SIMD vectors
|
||||
if((gNB->frame_parms.N_RB_UL&1)==0) {
|
||||
// check if PRB crosses DC and improve estimates around DC
|
||||
if ((bwp_start_subcarrier < gNB->frame_parms.ofdm_symbol_size) && (bwp_start_subcarrier+nb_rb_pusch*12 >= gNB->frame_parms.ofdm_symbol_size)) {
|
||||
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
||||
uint16_t idxDC = 2*(gNB->frame_parms.ofdm_symbol_size - bwp_start_subcarrier);
|
||||
uint16_t idxPil = idxDC/2;
|
||||
re_offset = k;
|
||||
pil = (int16_t *)&pilot[0];
|
||||
pil += (idxPil-2);
|
||||
ul_ch += (idxDC-4);
|
||||
ul_ch = memset(ul_ch, 0, sizeof(int16_t)*10);
|
||||
re_offset = (re_offset+idxDC/2-2) % gNB->frame_parms.ofdm_symbol_size;
|
||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
multadd_real_vector_complex_scalar(fdcl,
|
||||
ch,
|
||||
ul_ch-4,
|
||||
8);
|
||||
// for proper allignment of SIMD vectors
|
||||
if((gNB->frame_parms.N_RB_UL&1)==0) {
|
||||
|
||||
multadd_real_vector_complex_scalar(fdcl,
|
||||
ch,
|
||||
ul_ch-4,
|
||||
8);
|
||||
|
||||
pil += 4;
|
||||
re_offset = (re_offset+4) % gNB->frame_parms.ofdm_symbol_size;
|
||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
pil += 4;
|
||||
re_offset = (re_offset+4) % gNB->frame_parms.ofdm_symbol_size;
|
||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
multadd_real_vector_complex_scalar(fdcr,
|
||||
ch,
|
||||
ul_ch-4,
|
||||
8);
|
||||
} else {
|
||||
multadd_real_vector_complex_scalar(fdcr,
|
||||
ch,
|
||||
ul_ch-4,
|
||||
8);
|
||||
}
|
||||
else {
|
||||
multadd_real_vector_complex_scalar(fdclh,
|
||||
ch,
|
||||
ul_ch,
|
||||
8);
|
||||
|
||||
multadd_real_vector_complex_scalar(fdclh,
|
||||
ch,
|
||||
ul_ch,
|
||||
8);
|
||||
pil += 4;
|
||||
re_offset = (re_offset+4) % gNB->frame_parms.ofdm_symbol_size;
|
||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
pil += 4;
|
||||
re_offset = (re_offset+4) % gNB->frame_parms.ofdm_symbol_size;
|
||||
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+nushift+re_offset)];
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
multadd_real_vector_complex_scalar(fdcrh,
|
||||
ch,
|
||||
ul_ch,
|
||||
8);
|
||||
multadd_real_vector_complex_scalar(fdcrh,
|
||||
ch,
|
||||
ul_ch,
|
||||
8);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#ifdef DEBUG_PDSCH
|
||||
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
||||
for(uint16_t idxP=0; idxP<ceil((float)nb_rb_pusch*12/8); idxP++) {
|
||||
for(uint8_t idxI=0; idxI<16; idxI+=2) {
|
||||
printf("%d\t%d\t",ul_ch[idxP*16+idxI],ul_ch[idxP*16+idxI+1]);
|
||||
ul_ch = (int16_t *)&ul_ch_estimates[aarx][ch_offset];
|
||||
for(uint16_t idxP=0; idxP<ceil((float)nb_rb_pusch*12/8); idxP++) {
|
||||
for(uint8_t idxI=0; idxI<16; idxI+=2) {
|
||||
printf("%d\t%d\t",ul_ch[idxP*16+idxI],ul_ch[idxP*16+idxI+1]);
|
||||
}
|
||||
printf("%d\n",idxP);
|
||||
}
|
||||
printf("%d\n",idxP);
|
||||
}
|
||||
#endif
|
||||
|
||||
} else { //pusch_dmrs_type2 |p_r,p_l,d,d,d,d,p_r,p_l,d,d,d,d|
|
||||
}
|
||||
else { //pusch_dmrs_type2 |p_r,p_l,d,d,d,d,p_r,p_l,d,d,d,d|
|
||||
|
||||
// Treat first DMRS specially (left edge)
|
||||
|
||||
@@ -422,13 +432,12 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
|
||||
ul_ch_128 = (__m128i *)&ul_ch_estimates[aarx][ch_offset];
|
||||
|
||||
ul_ch_128[0] = _mm_slli_epi16 (ul_ch_128[0], 2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Convert to time domain
|
||||
|
||||
switch (gNB->frame_parms.ofdm_symbol_size) {
|
||||
switch (gNB->frame_parms.ofdm_symbol_size) {
|
||||
case 128:
|
||||
idft(IDFT_128,(int16_t*) &ul_ch_estimates[aarx][symbol_offset],
|
||||
(int16_t*) ul_ch_estimates_time[aarx],
|
||||
|
||||
@@ -33,7 +33,32 @@
|
||||
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
|
||||
uint8_t allowed_xlsch_re_in_dmrs_symbol(uint16_t k,
|
||||
uint16_t start_sc,
|
||||
uint8_t numDmrsCdmGrpsNoData,
|
||||
uint8_t dmrs_type) {
|
||||
uint8_t delta;
|
||||
uint16_t diff;
|
||||
if (k>start_sc)
|
||||
diff = k-start_sc;
|
||||
else
|
||||
diff = start_sc-k;
|
||||
for (int i = 0; i<numDmrsCdmGrpsNoData; i++){
|
||||
if (dmrs_type==NFAPI_NR_DMRS_TYPE1) {
|
||||
delta = i;
|
||||
if (((diff)%2) == delta)
|
||||
return (0);
|
||||
}
|
||||
else {
|
||||
delta = i<<1;
|
||||
if ( (((diff)%6) == delta) || (((k-start_sc)%6) == (delta+1)) )
|
||||
return (0);
|
||||
}
|
||||
}
|
||||
return (1);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
|
||||
@@ -56,6 +56,11 @@ void lte_gold_new(LTE_DL_FRAME_PARMS *frame_parms, uint32_t lte_gold_table[20][2
|
||||
void generate_dmrs_pbch(uint32_t dmrs_pbch_bitmap[DMRS_PBCH_I_SSB][DMRS_PBCH_N_HF][DMRS_BITMAP_SIZE], uint16_t Nid_cell);
|
||||
uint16_t get_dmrs_freq_idx_ul(uint16_t n, uint8_t k_prime, uint8_t delta, uint8_t dmrs_type);
|
||||
|
||||
uint8_t allowed_xlsch_re_in_dmrs_symbol(uint16_t k,
|
||||
uint16_t start_sc,
|
||||
uint8_t numDmrsCdmGrpsNoData,
|
||||
uint8_t dmrs_type);
|
||||
|
||||
#undef EXTERN
|
||||
|
||||
#endif /* DMRS_NR_H */
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
//#define NR_PBCH_DMRS_LENGTH_DWORD 5
|
||||
//#define NR_PBCH_DMRS_LENGTH 144
|
||||
//#define DEBUG_PDCCH
|
||||
//#define DEBUG_PUSCH
|
||||
|
||||
#include "refsig_defs_ue.h"
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
@@ -45,7 +45,7 @@ int wt1[8][2] = {{1,1},{1,1},{1,1},{1,1},{1,-1},{1,-1},{1,-1},{1,-1}};
|
||||
int wf2[12][2] = {{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,1},{1,1},{1,-1},{1,1},{1,1}};
|
||||
int wt2[12][2] = {{1,1},{1,1},{1,1},{1,1},{1,1},{1,1},{1,-1},{1,-1},{1,-1},{1,-1},{1,-1},{1,-1}};
|
||||
|
||||
|
||||
// complex conjugate of mod table
|
||||
short nr_rx_mod_table[14] = {0,0,23170,-23170,-23170,23170,23170,-23170,23170,23170,-23170,-23170,-23170,23170};
|
||||
short nr_rx_nmod_table[14] = {0,0,-23170,23170,23170,-23170,-23170,23170,-23170,-23170,23170,23170,23170,-23170};
|
||||
|
||||
@@ -57,39 +57,42 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
|
||||
unsigned short p,
|
||||
unsigned char lp,
|
||||
unsigned short nb_pusch_rb,
|
||||
uint32_t re_offset,
|
||||
uint8_t dmrs_type)
|
||||
{
|
||||
int8_t w;
|
||||
int8_t w, nb_dmrs;
|
||||
short *mod_table;
|
||||
unsigned char idx=0;
|
||||
|
||||
int k;
|
||||
typedef int array_of_w[2];
|
||||
array_of_w *wf;
|
||||
array_of_w *wt;
|
||||
|
||||
wf = (dmrs_type==pusch_dmrs_type1) ? wf1 : wf2;
|
||||
wt = (dmrs_type==pusch_dmrs_type1) ? wt1 : wt2;
|
||||
|
||||
int dmrs_offset = re_offset/((dmrs_type==pusch_dmrs_type1)?2:3);
|
||||
|
||||
if (dmrs_type > 2)
|
||||
LOG_E(PHY,"Bad PUSCH DMRS config type %d\n", dmrs_type);
|
||||
LOG_E(PHY,"PUSCH DMRS config type %d not valid\n", dmrs_type+1);
|
||||
|
||||
if ((p>=1000) && (p<((dmrs_type==pusch_dmrs_type1) ? 1008 : 1012))) {
|
||||
if (gNB->frame_parms.Ncp == NORMAL) {
|
||||
|
||||
for (int i=0; i<nb_pusch_rb*((dmrs_type==pusch_dmrs_type1) ? 6:4); i++) {
|
||||
|
||||
nb_dmrs = ((dmrs_type==pusch_dmrs_type1) ? 6:4);
|
||||
for (int i=dmrs_offset; i<dmrs_offset+(nb_pusch_rb*nb_dmrs); i++) {
|
||||
k = i-dmrs_offset;
|
||||
w = (wf[p-1000][i&1])*(wt[p-1000][lp]);
|
||||
mod_table = (w==1) ? nr_rx_mod_table : nr_rx_nmod_table;
|
||||
|
||||
idx = ((((nr_gold_pusch[(i<<1)>>5])>>((i<<1)&0x1f))&1)<<1) ^ (((nr_gold_pusch[((i<<1)+1)>>5])>>(((i<<1)+1)&0x1f))&1);
|
||||
((int16_t*)output)[i<<1] = mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx)<<1];
|
||||
((int16_t*)output)[(i<<1)+1] = mod_table[((NR_MOD_TABLE_QPSK_OFFSET + idx)<<1) + 1];
|
||||
((int16_t*)output)[k<<1] = mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx)<<1];
|
||||
((int16_t*)output)[(k<<1)+1] = mod_table[((NR_MOD_TABLE_QPSK_OFFSET + idx)<<1) + 1];
|
||||
#ifdef DEBUG_PUSCH
|
||||
printf("nr_pusch_dmrs_rx dmrs config type %d port %d nb_pusch_rb %d\n", dmrs_type, p, nb_pusch_rb);
|
||||
printf("wf[%d] = %d wt[%d]= %d\n", i&1, wf[p-1000][i&1], lp, wt[p-1000][lp]);
|
||||
printf("i %d idx %d pusch gold %u b0-b1 %d-%d mod_dmrs %d %d\n", i, idx, nr_gold_pusch[(i<<1)>>5], (((nr_gold_pusch[(i<<1)>>5])>>((i<<1)&0x1f))&1),
|
||||
(((nr_gold_pusch[((i<<1)+1)>>5])>>(((i<<1)+1)&0x1f))&1), ((int16_t*)output)[i<<1], ((int16_t*)output)[(i<<1)+1]);
|
||||
printf("nr_pusch_dmrs_rx dmrs config type %d port %d nb_pusch_rb %d\n", dmrs_type, p, nb_pusch_rb);
|
||||
printf("wf[%d] = %d wt[%d]= %d\n", i&1, wf[p-1000][i&1], lp, wt[p-1000][lp]);
|
||||
printf("i %d idx %d pusch gold %u b0-b1 %d-%d mod_dmrs %d %d\n", i, idx, nr_gold_pusch[(i<<1)>>5], (((nr_gold_pusch[(i<<1)>>5])>>((i<<1)&0x1f))&1),
|
||||
(((nr_gold_pusch[((i<<1)+1)>>5])>>(((i<<1)+1)&0x1f))&1), ((int16_t*)output)[k<<1], ((int16_t*)output)[(k<<1)+1]);
|
||||
#endif
|
||||
|
||||
}
|
||||
} else {
|
||||
LOG_E(PHY,"extended cp not supported for PUSCH DMRS yet\n");
|
||||
@@ -102,7 +105,6 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
|
||||
|
||||
|
||||
int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
|
||||
unsigned int Ns,
|
||||
unsigned int *nr_gold_pdsch,
|
||||
|
||||
@@ -88,6 +88,7 @@ void nr_init_pdsch_dmrs(PHY_VARS_gNB* gNB, uint32_t Nid)
|
||||
uint16_t N_n_scid[NR_MAX_NB_CODEWORDS]={Nid, Nid}; // Not correct, appropriate scrambling IDs have to be updated to support DCI 1_1
|
||||
uint8_t n_scid=0; // again works only for 1_0
|
||||
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<<17) * (fp->symbols_per_slot*slot+symb+1) * ((N_n_scid[n_scid]<<1)+1) +((N_n_scid[n_scid]<<1)+n_scid));
|
||||
|
||||
@@ -48,6 +48,7 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
|
||||
unsigned short p,
|
||||
unsigned char lp,
|
||||
unsigned short nb_pusch_rb,
|
||||
uint32_t re_offset,
|
||||
uint8_t dmrs_type);
|
||||
|
||||
void init_scrambling_luts(void);
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "PHY/impl_defs_nr.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include <common/utils/LOG/log.h>
|
||||
|
||||
__m64 byte2m64_re[256];
|
||||
__m64 byte2m64_im[256];
|
||||
@@ -42,7 +43,7 @@ void init_byte2m64(void) {
|
||||
byte2m64_im[s] = _mm_insert_pi16(byte2m64_im[s],(1-2*((s>>5)&1)),2);
|
||||
byte2m64_re[s] = _mm_insert_pi16(byte2m64_re[s],(1-2*((s>>6)&1)),3);
|
||||
byte2m64_im[s] = _mm_insert_pi16(byte2m64_im[s],(1-2*((s>>7)&1)),3);
|
||||
printf("init_scrambling_luts: s %x (%d) ((%d,%d),(%d,%d),(%d,%d),(%d,%d))\n",
|
||||
LOG_T(PHY,"init_scrambling_luts: s %x (%d) ((%d,%d),(%d,%d),(%d,%d),(%d,%d))\n",
|
||||
((uint16_t*)&s)[0],
|
||||
(1-2*(s&1)),
|
||||
((int16_t*)&byte2m64_re[s])[0],((int16_t*)&byte2m64_im[s])[0],
|
||||
|
||||
@@ -131,12 +131,13 @@ uint16_t nr_get_dci_size(nfapi_nr_dci_format_e format,
|
||||
void nr_pdcch_scrambling(uint32_t *in,
|
||||
uint32_t size,
|
||||
uint32_t Nid,
|
||||
uint32_t n_RNTI,
|
||||
uint32_t scrambling_RNTI,
|
||||
uint32_t *out) {
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
reset = 1;
|
||||
x2 = (n_RNTI<<16) + Nid;
|
||||
x2 = (scrambling_RNTI<<16) + Nid;
|
||||
LOG_D(PHY,"PDCCH Scrambling x2 %x : scrambling_RNTI %x \n", x2, scrambling_RNTI);
|
||||
for (int i=0; i<size; i++) {
|
||||
if ((i&0x1f)==0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
@@ -154,7 +155,7 @@ void nr_pdcch_scrambling(uint32_t *in,
|
||||
|
||||
|
||||
uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
|
||||
nfapi_nr_ul_dci_request_pdus_t *ul_dci_pdu,
|
||||
nfapi_nr_ul_dci_request_pdus_t *ul_dci_pdu,
|
||||
uint32_t **gold_pdcch_dmrs,
|
||||
int32_t *txdataF,
|
||||
int16_t amp,
|
||||
@@ -206,8 +207,8 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
|
||||
AssertFatal(pdcch_pdu_rel15->CceRegMappingType == NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED,
|
||||
"Interleaved CCE REG MAPPING not supported\n");
|
||||
uint32_t dmrs_length = (pdcch_pdu_rel15->CceRegMappingType == NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED)?
|
||||
(n_rb*6) : (pdcch_pdu_rel15->AggregationLevel[d]*36/cset_nsymb); //2(QPSK)*3(per RB)*6(REG per CCE)
|
||||
uint32_t encoded_length = pdcch_pdu_rel15->AggregationLevel[d]*108; //2(QPSK)*9(per RB)*6(REG per CCE)
|
||||
(n_rb*6) : (pdcch_pdu_rel15->dci_pdu.AggregationLevel[d]*36/cset_nsymb); //2(QPSK)*3(per RB)*6(REG per CCE)
|
||||
uint32_t encoded_length = pdcch_pdu_rel15->dci_pdu.AggregationLevel[d]*108; //2(QPSK)*9(per RB)*6(REG per CCE)
|
||||
LOG_D(PHY, "DMRS length per symbol %d\t DCI encoded length %d (precoder_granularity %d,reg_mapping %d)\n", dmrs_length, encoded_length,pdcch_pdu_rel15->precoderGranularity,pdcch_pdu_rel15->CceRegMappingType);
|
||||
dmrs_length += rb_offset*6; // To accommodate more DMRS symbols in case of rb offset
|
||||
|
||||
@@ -228,18 +229,20 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
|
||||
/// DCI payload processing
|
||||
// CRC attachment + Scrambling + Channel coding + Rate matching
|
||||
uint32_t encoder_output[NR_MAX_DCI_SIZE_DWORD];
|
||||
uint16_t n_RNTI = pdcch_pdu_rel15->RNTI[d];
|
||||
uint16_t Nid = pdcch_pdu_rel15->ScramblingId[d];
|
||||
|
||||
|
||||
uint16_t n_RNTI = pdcch_pdu_rel15->dci_pdu.RNTI[d];
|
||||
uint16_t Nid = pdcch_pdu_rel15->dci_pdu.ScramblingId[d];
|
||||
uint16_t scrambling_RNTI = pdcch_pdu_rel15->dci_pdu.ScramblingRNTI[d];
|
||||
|
||||
t_nrPolar_params *currentPtr = nr_polar_params(NR_POLAR_DCI_MESSAGE_TYPE,
|
||||
pdcch_pdu_rel15->PayloadSizeBits[d],
|
||||
pdcch_pdu_rel15->AggregationLevel[d],
|
||||
pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[d],
|
||||
pdcch_pdu_rel15->dci_pdu.AggregationLevel[d],
|
||||
0,NULL);
|
||||
polar_encoder_fast((uint64_t*)pdcch_pdu_rel15->Payload[d], encoder_output, n_RNTI,1,currentPtr);
|
||||
polar_encoder_fast((uint64_t*)pdcch_pdu_rel15->dci_pdu.Payload[d], (void*)encoder_output, n_RNTI,1,currentPtr);
|
||||
#ifdef DEBUG_CHANNEL_CODING
|
||||
printf("polar rnti %x,length %d, L %d\n",n_RNTI, pdcch_pdu_rel15->PayloadSizeBits[d],pdcch_pdu_rel15->AggregationLevel[d]);
|
||||
printf("polar rnti %x,length %d, L %d\n",n_RNTI, pdcch_pdu_rel15->dci_pdu.PayloadSizeBits[d],pdcch_pdu_rel15->dci_pdu.AggregationLevel[d]);
|
||||
printf("DCI PDU: [0]->0x%lx \t [1]->0x%lx\n",
|
||||
((uint64_t*)pdcch_pdu_rel15->Payload[d])[0], ((uint64_t*)pdcch_pdu_rel15->Payload[d])[1]);
|
||||
((uint64_t*)pdcch_pdu_rel15->dci_pdu.Payload[d])[0], ((uint64_t*)pdcch_pdu_rel15->dci_pdu.Payload[d])[1]);
|
||||
printf("Encoded Payload (length:%d dwords):\n", encoded_length>>5);
|
||||
|
||||
for (int i=0; i<encoded_length>>5; i++)
|
||||
@@ -249,7 +252,7 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
|
||||
#endif
|
||||
/// Scrambling
|
||||
uint32_t scrambled_output[NR_MAX_DCI_SIZE_DWORD]= {0};
|
||||
nr_pdcch_scrambling(encoder_output, encoded_length, Nid, n_RNTI, scrambled_output);
|
||||
nr_pdcch_scrambling(encoder_output, encoded_length, Nid, scrambling_RNTI, scrambled_output);
|
||||
#ifdef DEBUG_CHANNEL_CODING
|
||||
printf("scrambled output: [0]->0x%08x \t [1]->0x%08x \t [2]->0x%08x \t [3]->0x%08x\t [4]->0x%08x\t [5]->0x%08x\t \
|
||||
[6]->0x%08x \t [7]->0x%08x \t [8]->0x%08x \t [9]->0x%08x\t [10]->0x%08x\t [11]->0x%08x\n",
|
||||
@@ -272,8 +275,8 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
|
||||
cset_start_sc -= frame_parms.ofdm_symbol_size;
|
||||
|
||||
/*Reorder REG list for a freq first mapping*/
|
||||
uint8_t nb_regs = pdcch_pdu_rel15->AggregationLevel[d]*NR_NB_REG_PER_CCE;
|
||||
uint8_t reg_idx0 = pdcch_pdu_rel15->CceIndex[d]*NR_NB_REG_PER_CCE;
|
||||
uint8_t reg_idx0 = pdcch_pdu_rel15->dci_pdu.CceIndex[d]*NR_NB_REG_PER_CCE;
|
||||
uint8_t nb_regs = pdcch_pdu_rel15->dci_pdu.AggregationLevel[d]*NR_NB_REG_PER_CCE;
|
||||
|
||||
/*Mapping the encoded DCI along with the DMRS */
|
||||
for (int reg_idx=reg_idx0; reg_idx<(nb_regs+reg_idx0); reg_idx++) {
|
||||
@@ -295,8 +298,8 @@ uint8_t nr_generate_dci_top(nfapi_nr_dl_tti_pdcch_pdu *pdcch_pdu,
|
||||
for (int m=0; m<NR_NB_SC_PER_RB; m++) {
|
||||
if ( m == (k_prime<<2)+1) { // DMRS if not already mapped
|
||||
if (pdcch_pdu_rel15->CceRegMappingType == NFAPI_NR_CCE_REG_MAPPING_NON_INTERLEAVED) {
|
||||
((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1] = (2*amp * mod_dmrs[l][dmrs_idx<<1]) >> 15;
|
||||
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1) + 1] = (2*amp * mod_dmrs[l][(dmrs_idx<<1) + 1]) >> 15;
|
||||
((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1] = (amp * mod_dmrs[l][dmrs_idx<<1]) >> 15;
|
||||
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1) + 1] = (amp * mod_dmrs[l][(dmrs_idx<<1) + 1]) >> 15;
|
||||
#ifdef DEBUG_PDCCH_DMRS
|
||||
printf("PDCCH DMRS: l %d position %d => (%d,%d)\n",l,k,((int16_t *)txdataF)[(l*frame_parms.ofdm_symbol_size + k)<<1],
|
||||
((int16_t *)txdataF)[((l*frame_parms.ofdm_symbol_size + k)<<1)+1]);
|
||||
|
||||
@@ -140,7 +140,7 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m) {
|
||||
int C=-1;
|
||||
|
||||
for (int d=0;d<pdcch_pdu_rel15->numDlDci;d++) {
|
||||
int L = pdcch_pdu_rel15->AggregationLevel[d];
|
||||
int L = pdcch_pdu_rel15->dci_pdu.AggregationLevel[d];
|
||||
|
||||
if (pdcch_pdu_rel15->CoreSetType == NFAPI_NR_CSET_CONFIG_MIB_SIB1)
|
||||
AssertFatal(L>=4, "Invalid aggregation level for SIB1 configured PDCCH %d\n", L);
|
||||
@@ -151,10 +151,10 @@ void nr_fill_cce_list(PHY_VARS_gNB *gNB, uint8_t m) {
|
||||
C = N_reg/(bsize*R);
|
||||
}
|
||||
|
||||
LOG_D(PHY, "CCE list generation for candidate %d: bundle size %d ilv size %d CceIndex %d\n", m, bsize, R, pdcch_pdu_rel15->CceIndex[d]);
|
||||
LOG_D(PHY, "CCE list generation for candidate %d: bundle size %d ilv size %d CceIndex %d\n", m, bsize, R, pdcch_pdu_rel15->dci_pdu.CceIndex[d]);
|
||||
for (uint8_t cce_idx=0; cce_idx<L; cce_idx++) {
|
||||
cce = &gNB->cce_list[d][cce_idx];
|
||||
cce->cce_idx = pdcch_pdu_rel15->CceIndex[d] + cce_idx;
|
||||
cce->cce_idx = pdcch_pdu_rel15->dci_pdu.CceIndex[d] + cce_idx;
|
||||
LOG_D(PHY, "cce_idx %d\n", cce->cce_idx);
|
||||
|
||||
if (pdcch_pdu_rel15->CceRegMappingType == NFAPI_NR_CCE_REG_MAPPING_INTERLEAVED) {
|
||||
@@ -210,17 +210,17 @@ void nr_fill_dci(PHY_VARS_gNB *gNB,
|
||||
|
||||
for (int i=0;i<pdcch_pdu_rel15->numDlDci;i++) {
|
||||
|
||||
//uint64_t *dci_pdu = (uint64_t*)pdcch_pdu_rel15->Payload[i];
|
||||
//uint64_t *dci_pdu = (uint64_t*)pdcch_pdu_rel15->dci_pdu.Payload[i];
|
||||
|
||||
|
||||
int dlsch_id = find_nr_dlsch(pdcch_pdu_rel15->RNTI[i],gNB,SEARCH_EXIST_OR_FREE);
|
||||
int dlsch_id = find_nr_dlsch(pdcch_pdu_rel15->dci_pdu.RNTI[i],gNB,SEARCH_EXIST_OR_FREE);
|
||||
if( (dlsch_id<0) || (dlsch_id>=NUMBER_OF_NR_DLSCH_MAX) ){
|
||||
LOG_E(PHY,"illegal dlsch_id found!!! rnti %04x dlsch_id %d\n",(unsigned int)pdcch_pdu_rel15->RNTI[i],dlsch_id);
|
||||
LOG_E(PHY,"illegal dlsch_id found!!! rnti %04x dlsch_id %d\n",(unsigned int)pdcch_pdu_rel15->dci_pdu.RNTI[i],dlsch_id);
|
||||
return;
|
||||
}
|
||||
|
||||
dlsch = gNB->dlsch[dlsch_id][0];
|
||||
int harq_pid = 0;//extract_harq_pid(i,pdu_rel15);
|
||||
int num_slots_tdd = (gNB->frame_parms.slots_per_frame)>>(7-gNB->gNB_config.tdd_table.tdd_period.value);
|
||||
int harq_pid = slot % num_slots_tdd;
|
||||
|
||||
dlsch->slot_tx[slot] = 1;
|
||||
dlsch->harq_ids[frame%2][slot] = harq_pid;
|
||||
@@ -228,7 +228,7 @@ void nr_fill_dci(PHY_VARS_gNB *gNB,
|
||||
"illegal harq_pid %d\n",harq_pid);
|
||||
|
||||
dlsch->harq_mask |= (1<<harq_pid);
|
||||
dlsch->rnti = pdcch_pdu_rel15->RNTI[i];
|
||||
dlsch->rnti = pdcch_pdu_rel15->dci_pdu.RNTI[i];
|
||||
|
||||
nr_fill_cce_list(gNB,0);
|
||||
/*
|
||||
@@ -248,7 +248,7 @@ void nr_fill_ul_dci(PHY_VARS_gNB *gNB,
|
||||
|
||||
for (int i=0;i<pdcch_pdu_rel15->numDlDci;i++) {
|
||||
|
||||
//uint64_t *dci_pdu = (uint64_t*)pdcch_pdu_rel15->Payload[i];
|
||||
//uint64_t *dci_pdu = (uint64_t*)pdcch_pdu_rel15->dci_pdu.Payload[i];
|
||||
|
||||
// if there's no DL DCI then generate CCE list
|
||||
if (gNB->pdcch_pdu) nr_fill_cce_list(gNB,0);
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "nr_dci.h"
|
||||
#include "nr_sch_dmrs.h"
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
//#define DEBUG_DLSCH
|
||||
//#define DEBUG_DLSCH_MAPPING
|
||||
@@ -47,7 +49,7 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
|
||||
|
||||
uint8_t reset, b_idx;
|
||||
uint32_t x1, x2, s=0;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 1);
|
||||
reset = 1;
|
||||
x2 = (n_RNTI<<15) + (q<<14) + Nid;
|
||||
|
||||
@@ -62,7 +64,7 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
|
||||
*out ^= (((in[i])&1) ^ ((s>>b_idx)&1))<<b_idx;
|
||||
//printf("i %d b_idx %d in %d s 0x%08x out 0x%08x\n", i, b_idx, in[i], s, *out);
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_CODEWORD_SCRAMBLING, 0);
|
||||
}
|
||||
|
||||
void nr_pdsch_codeword_scrambling_optim(uint8_t *in,
|
||||
@@ -126,22 +128,29 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
|
||||
time_stats_t *dlsch_interleaving_stats,
|
||||
time_stats_t *dlsch_segmentation_stats) {
|
||||
|
||||
int harq_pid = 0;
|
||||
int harq_pid = dlsch->harq_ids[frame%2][slot];
|
||||
NR_DL_gNB_HARQ_t *harq = dlsch->harq_processes[harq_pid];
|
||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &harq->pdsch_pdu.pdsch_pdu_rel15;
|
||||
uint32_t scrambled_output[NR_MAX_NB_CODEWORDS][NR_MAX_PDSCH_ENCODED_LENGTH>>5];
|
||||
int16_t **mod_symbs = (int16_t**)dlsch->mod_symbs;
|
||||
int16_t **tx_layers = (int16_t**)dlsch->txdataF;
|
||||
int8_t Wf[2], Wt[2], l0, l_prime[2], delta;
|
||||
|
||||
uint8_t dmrs_Type = rel15->dmrsConfigType;
|
||||
int nb_re_dmrs = (dmrs_Type== NFAPI_NR_DMRS_TYPE1) ? 6:4;
|
||||
uint16_t n_dmrs = ((rel15->rbSize+rel15->rbStart)*nb_re_dmrs)<<1;
|
||||
int16_t mod_dmrs[n_dmrs<<1];
|
||||
|
||||
uint16_t nb_re = ((12*rel15->NrOfSymbols)-nb_re_dmrs-xOverhead)*rel15->rbSize*rel15->NrOfCodewords;
|
||||
int nb_re_dmrs;
|
||||
uint16_t n_dmrs;
|
||||
if (rel15->dmrsConfigType==NFAPI_NR_DMRS_TYPE1) {
|
||||
nb_re_dmrs = 6*rel15->numDmrsCdmGrpsNoData;
|
||||
n_dmrs = ((rel15->rbSize+rel15->rbStart)*6)<<1;
|
||||
}
|
||||
else {
|
||||
nb_re_dmrs = 4*rel15->numDmrsCdmGrpsNoData;
|
||||
n_dmrs = ((rel15->rbSize+rel15->rbStart)*4)<<1;
|
||||
}
|
||||
uint16_t nb_re;
|
||||
nb_re = ((12*rel15->NrOfSymbols)-nb_re_dmrs-xOverhead)*rel15->rbSize*rel15->NrOfCodewords;
|
||||
uint8_t Qm = rel15->qamModOrder[0];
|
||||
uint32_t encoded_length = nb_re*Qm;
|
||||
int16_t mod_dmrs[n_dmrs<<1];
|
||||
|
||||
/// CRC, coding, interleaving and rate matching
|
||||
AssertFatal(harq->pdu!=NULL,"harq->pdu is null\n");
|
||||
@@ -193,11 +202,13 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
|
||||
|
||||
/// Modulation
|
||||
start_meas(dlsch_modulation_stats);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION, 1);
|
||||
for (int q=0; q<rel15->NrOfCodewords; q++)
|
||||
nr_modulation(scrambled_output[q],
|
||||
encoded_length,
|
||||
Qm,
|
||||
mod_symbs[q]);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION, 0);
|
||||
stop_meas(dlsch_modulation_stats);
|
||||
#ifdef DEBUG_DLSCH
|
||||
printf("PDSCH Modulation: Qm %d(%d)\n", Qm, nb_re);
|
||||
@@ -297,15 +308,16 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (amp * tx_layers[ap][m<<1]) >> 15;
|
||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (amp * tx_layers[ap][(m<<1) + 1]) >> 15;
|
||||
if( (l != dmrs_symbol) || allowed_xlsch_re_in_dmrs_symbol(k,start_sc,rel15->numDmrsCdmGrpsNoData,dmrs_Type)) {
|
||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)] = (amp * tx_layers[ap][m<<1]) >> 15;
|
||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)] = (amp * tx_layers[ap][(m<<1) + 1]) >> 15;
|
||||
#ifdef DEBUG_DLSCH_MAPPING
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, k, ((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, k, ((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + (2*txdataF_offset)],
|
||||
((int16_t*)txdataF[ap])[((l*frame_parms->ofdm_symbol_size + k)<<1) + 1 + (2*txdataF_offset)]);
|
||||
#endif
|
||||
m++;
|
||||
m++;
|
||||
}
|
||||
}
|
||||
if (++k >= frame_parms->ofdm_symbol_size)
|
||||
k -= frame_parms->ofdm_symbol_size;
|
||||
|
||||
@@ -90,7 +90,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
|
||||
|
||||
|
||||
|
||||
void free_gNB_dlsch(NR_gNB_DLSCH_t **dlschptr,uint16_t N_RB);
|
||||
void free_gNB_dlsch(NR_gNB_DLSCH_t **dlschptr, uint16_t N_RB);
|
||||
|
||||
void clean_gNB_dlsch(NR_gNB_DLSCH_t *dlsch);
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "PHY/CODING/coding_defs.h"
|
||||
#include "PHY/CODING/lte_interleaver_inline.h"
|
||||
#include "PHY/CODING/nrLDPC_extern.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
@@ -49,7 +49,7 @@
|
||||
//#define DEBUG_DLSCH_FREE 1
|
||||
|
||||
|
||||
void free_gNB_dlsch(NR_gNB_DLSCH_t **dlschptr,uint16_t N_RB)
|
||||
void free_gNB_dlsch(NR_gNB_DLSCH_t **dlschptr, uint16_t N_RB)
|
||||
{
|
||||
int i;
|
||||
int r;
|
||||
@@ -130,7 +130,7 @@ void free_gNB_dlsch(NR_gNB_DLSCH_t **dlschptr,uint16_t N_RB)
|
||||
}
|
||||
|
||||
free16(dlsch,sizeof(NR_gNB_DLSCH_t));
|
||||
dlsch = NULL;
|
||||
*dlschptr = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -335,13 +335,19 @@ int nr_dlsch_encoding(unsigned char *a,
|
||||
uint32_t E;
|
||||
uint8_t Ilbrm = 1;
|
||||
uint32_t Tbslbrm = 950984; //max tbs
|
||||
uint8_t nb_re_dmrs = rel15->dmrsConfigType==NFAPI_NR_DMRS_TYPE1 ? 6:4;
|
||||
uint8_t nb_re_dmrs;
|
||||
|
||||
if (rel15->dmrsConfigType==NFAPI_NR_DMRS_TYPE1)
|
||||
nb_re_dmrs = 6*rel15->numDmrsCdmGrpsNoData;
|
||||
else
|
||||
nb_re_dmrs = 4*rel15->numDmrsCdmGrpsNoData;
|
||||
|
||||
uint16_t length_dmrs = get_num_dmrs(rel15->dlDmrsSymbPos);
|
||||
uint16_t R=rel15->targetCodeRate[0];
|
||||
float Coderate = 0.0;
|
||||
uint8_t Nl = 4;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||
|
||||
A = rel15->TBSize[0]<<3;
|
||||
|
||||
@@ -459,6 +465,9 @@ int nr_dlsch_encoding(unsigned char *a,
|
||||
|
||||
}
|
||||
|
||||
F = dlsch->harq_processes[harq_pid]->F;
|
||||
|
||||
Kr = dlsch->harq_processes[harq_pid]->K;
|
||||
for (r=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
|
||||
|
||||
if (F>0) {
|
||||
@@ -530,7 +539,7 @@ int nr_dlsch_encoding(unsigned char *a,
|
||||
r_offset += E;
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -274,25 +274,7 @@ int16_t find_nr_dlsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type) {
|
||||
return first_free_index;
|
||||
}
|
||||
|
||||
int16_t find_nr_ulsch(uint16_t rnti, PHY_VARS_gNB *gNB,find_type_t type) {
|
||||
|
||||
uint16_t i;
|
||||
int16_t first_free_index=-1;
|
||||
|
||||
AssertFatal(gNB!=NULL,"gNB is null\n");
|
||||
for (i=0; i<NUMBER_OF_NR_ULSCH_MAX; i++) {
|
||||
AssertFatal(gNB->ulsch[i]!=NULL,"gNB->ulsch[%d] is null\n",i);
|
||||
AssertFatal(gNB->ulsch[i][0]!=NULL,"gNB->ulsch[%d][0] is null\n",i);
|
||||
LOG_D(PHY,"searching for rnti %x : ulsch_index %d=> harq_mask %x, rnti %x, first_free_index %d\n", rnti,i,gNB->ulsch[i][0]->harq_mask,gNB->ulsch[i][0]->rnti,first_free_index);
|
||||
if ((gNB->ulsch[i][0]->harq_mask >0) &&
|
||||
(gNB->ulsch[i][0]->rnti==rnti)) return i;
|
||||
else if ((gNB->ulsch[i][0]->harq_mask == 0) && (first_free_index==-1)) first_free_index=i;
|
||||
}
|
||||
if (type == SEARCH_EXIST) return -1;
|
||||
if (first_free_index != -1)
|
||||
gNB->ulsch[first_free_index][0]->rnti = 0;
|
||||
return first_free_index;
|
||||
}
|
||||
|
||||
void nr_fill_dlsch(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
@@ -316,26 +298,3 @@ void nr_fill_dlsch(PHY_VARS_gNB *gNB,
|
||||
|
||||
}
|
||||
|
||||
void nr_fill_ulsch(PHY_VARS_gNB *gNB,
|
||||
int frame,
|
||||
int slot,
|
||||
nfapi_nr_pusch_pdu_t *ulsch_pdu) {
|
||||
|
||||
|
||||
int ulsch_id = find_nr_ulsch(ulsch_pdu->rnti,gNB,SEARCH_EXIST_OR_FREE);
|
||||
AssertFatal( (ulsch_id>=0) && (ulsch_id<NUMBER_OF_NR_ULSCH_MAX),
|
||||
"illegal or no ulsch_id found!!! rnti %04x ulsch_id %d\n",ulsch_pdu->rnti,ulsch_id);
|
||||
|
||||
NR_gNB_ULSCH_t *ulsch = gNB->ulsch[ulsch_id][0];
|
||||
int harq_pid = ulsch_pdu->pusch_data.harq_process_id;
|
||||
ulsch->rnti = ulsch_pdu->rnti;
|
||||
//ulsch->rnti_type;
|
||||
ulsch->harq_mask |= 1<<harq_pid;
|
||||
ulsch->harq_process_id[slot] = harq_pid;
|
||||
|
||||
memcpy((void*)&ulsch->harq_processes[harq_pid]->ulsch_pdu, (void*)ulsch_pdu, sizeof(nfapi_nr_pusch_pdu_t));
|
||||
|
||||
LOG_D(PHY,"Initializing nFAPI for ULSCH, UE %d, harq_pid %d\n",ulsch_id,harq_pid);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
|
||||
@@ -297,7 +297,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
|
||||
a_reversed |= (((uint64_t)pbch->pbch_a_prime>>i)&1)<<(31-i);
|
||||
|
||||
/// CRC, coding and rate matching
|
||||
polar_encoder_fast (&a_reversed, (uint32_t *)pbch->pbch_e, 0, 0,
|
||||
polar_encoder_fast (&a_reversed, (void*)pbch->pbch_e, 0, 0,
|
||||
nr_polar_params( NR_POLAR_PBCH_MESSAGE_TYPE, NR_POLAR_PBCH_PAYLOAD_BITS, NR_POLAR_PBCH_AGGREGATION_LEVEL,0,NULL)
|
||||
);
|
||||
#ifdef DEBUG_PBCH_ENCODING
|
||||
|
||||
@@ -31,141 +31,247 @@
|
||||
*/
|
||||
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto_common.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
|
||||
extern uint16_t NCS_unrestricted_delta_f_RA_125[16];
|
||||
extern uint16_t NCS_restricted_TypeA_delta_f_RA_125[15];
|
||||
extern uint16_t NCS_restricted_TypeB_delta_f_RA_125[13];
|
||||
extern uint16_t NCS_unrestricted_delta_f_RA_5[16];
|
||||
extern uint16_t NCS_restricted_TypeA_delta_f_RA_5[16];
|
||||
extern uint16_t NCS_restricted_TypeB_delta_f_RA_5[14];
|
||||
extern uint16_t NCS_unrestricted_delta_f_RA_15[16];
|
||||
extern uint16_t prach_root_sequence_map_0_3[838];
|
||||
extern uint16_t prach_root_sequence_map_abc[138];
|
||||
extern int64_t table_6_3_3_2_2_prachConfig_Index [256][9];
|
||||
extern int64_t table_6_3_3_2_3_prachConfig_Index [256][9];
|
||||
extern int64_t table_6_3_3_2_4_prachConfig_Index [256][10];
|
||||
extern uint16_t nr_du[838];
|
||||
extern int16_t nr_ru[2*839];
|
||||
extern const char *prachfmt[9];
|
||||
|
||||
void init_prach_list(PHY_VARS_gNB *gNB) {
|
||||
|
||||
AssertFatal(gNB!=NULL,"gNB is null\n");
|
||||
for (int i=0; i<NUMBER_OF_NR_PRACH_MAX; i++) gNB->prach_vars.list[i].frame=-1;
|
||||
}
|
||||
|
||||
int16_t find_nr_prach(PHY_VARS_gNB *gNB,int frame,int slot, int numRA, find_type_t type) {
|
||||
|
||||
uint16_t i;
|
||||
int16_t first_free_index=-1;
|
||||
|
||||
AssertFatal(gNB!=NULL,"gNB is null\n");
|
||||
for (i=0; i<NUMBER_OF_NR_PRACH_MAX; i++) {
|
||||
LOG_D(PHY,"searching for PRACH in %d.%d with numRA %d: prach_index %d=> %d.%d numRA %d\n", frame,slot,numRA,i,
|
||||
gNB->prach_vars.list[i].frame,gNB->prach_vars.list[i].slot,gNB->prach_vars.list[i].pdu.num_ra);
|
||||
if ((gNB->prach_vars.list[i].frame == frame) &&
|
||||
(gNB->prach_vars.list[i].slot == slot) &&
|
||||
(gNB->prach_vars.list[i].pdu.num_ra == numRA)) return i;
|
||||
else if ((gNB->prach_vars.list[i].frame == -1) && (first_free_index==-1)) first_free_index=i;
|
||||
}
|
||||
if (type == SEARCH_EXIST) return -1;
|
||||
|
||||
return first_free_index;
|
||||
}
|
||||
|
||||
void nr_fill_prach(PHY_VARS_gNB *gNB,
|
||||
int SFN,
|
||||
int Slot,
|
||||
nfapi_nr_prach_pdu_t *prach_pdu) {
|
||||
|
||||
int prach_id = find_nr_prach(gNB,SFN,Slot,prach_pdu->num_ra,SEARCH_EXIST_OR_FREE);
|
||||
AssertFatal( (prach_id>=0) && (prach_id<NUMBER_OF_NR_PRACH_MAX),
|
||||
"illegal or no prach_id found!!! numRA %d prach_id %d\n",prach_pdu->num_ra,prach_id);
|
||||
|
||||
gNB->prach_vars.list[prach_id].frame=SFN;
|
||||
gNB->prach_vars.list[prach_id].slot=Slot;
|
||||
memcpy((void*)&gNB->prach_vars.list[prach_id].pdu,(void*)prach_pdu,sizeof(*prach_pdu));
|
||||
|
||||
}
|
||||
|
||||
void init_prach_ru_list(RU_t *ru) {
|
||||
|
||||
AssertFatal(ru!=NULL,"ruis null\n");
|
||||
for (int i=0; i<NUMBER_OF_NR_RU_PRACH_MAX; i++) ru->prach_list[i].frame=-1;
|
||||
pthread_mutex_init(&ru->prach_list_mutex,NULL);
|
||||
}
|
||||
|
||||
int16_t find_nr_prach_ru(RU_t *ru,int frame,int slot, find_type_t type) {
|
||||
|
||||
uint16_t i;
|
||||
int16_t first_free_index=-1;
|
||||
|
||||
AssertFatal(ru!=NULL,"ru is null\n");
|
||||
pthread_mutex_lock(&ru->prach_list_mutex);
|
||||
for (i=0; i<NUMBER_OF_NR_RU_PRACH_MAX; i++) {
|
||||
LOG_D(PHY,"searching for PRACH in %d.%d : prach_index %d=> %d.%d\n", frame,slot,i,
|
||||
ru->prach_list[i].frame,ru->prach_list[i].slot);
|
||||
if ((ru->prach_list[i].frame == frame) &&
|
||||
(ru->prach_list[i].slot == slot)) {
|
||||
pthread_mutex_unlock(&ru->prach_list_mutex);
|
||||
return i;
|
||||
}
|
||||
else if ((ru->prach_list[i].frame == -1) && (first_free_index==-1)) first_free_index=i;
|
||||
}
|
||||
pthread_mutex_unlock(&ru->prach_list_mutex);
|
||||
if (type == SEARCH_EXIST) return -1;
|
||||
|
||||
return first_free_index;
|
||||
}
|
||||
|
||||
void nr_fill_prach_ru(RU_t *ru,
|
||||
int SFN,
|
||||
int Slot,
|
||||
nfapi_nr_prach_pdu_t *prach_pdu) {
|
||||
|
||||
int prach_id = find_nr_prach_ru(ru,SFN,Slot,SEARCH_EXIST_OR_FREE);
|
||||
AssertFatal( (prach_id>=0) && (prach_id<NUMBER_OF_NR_PRACH_MAX),
|
||||
"illegal or no prach_id found!!! prach_id %d\n",prach_id);
|
||||
|
||||
pthread_mutex_lock(&ru->prach_list_mutex);
|
||||
ru->prach_list[prach_id].frame = SFN;
|
||||
ru->prach_list[prach_id].slot = Slot;
|
||||
ru->prach_list[prach_id].fmt = prach_pdu->prach_format;
|
||||
ru->prach_list[prach_id].numRA = prach_pdu->num_ra;
|
||||
ru->prach_list[prach_id].prachStartSymbol = prach_pdu->prach_start_symbol;
|
||||
pthread_mutex_unlock(&ru->prach_list_mutex);
|
||||
|
||||
}
|
||||
|
||||
void free_nr_ru_prach_entry(RU_t *ru,
|
||||
int prach_id) {
|
||||
|
||||
pthread_mutex_lock(&ru->prach_list_mutex);
|
||||
ru->prach_list[prach_id].frame=-1;
|
||||
pthread_mutex_unlock(&ru->prach_list_mutex);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void rx_nr_prach_ru(RU_t *ru,
|
||||
int prachFormat,
|
||||
int numRA,
|
||||
int prachStartSymbol,
|
||||
int frame,
|
||||
int subframe) {
|
||||
int slot) {
|
||||
|
||||
AssertFatal(ru!=NULL,"ru is null\n");
|
||||
|
||||
int16_t **rxsigF=NULL;
|
||||
NR_DL_FRAME_PARMS *fp=ru->nr_frame_parms;
|
||||
int16_t prach_ConfigIndex = fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
|
||||
int slot2=slot;
|
||||
|
||||
int16_t *prach[ru->nb_rx];
|
||||
uint8_t prach_fmt = get_nr_prach_fmt(prach_ConfigIndex,fp->frame_type,fp->freq_range);
|
||||
int prach_sequence_length = ru->config.prach_config.prach_sequence_length.value;
|
||||
|
||||
int msg1_frequencystart = ru->config.prach_config.num_prach_fd_occasions_list[numRA].k1.value;
|
||||
|
||||
rxsigF = ru->prach_rxsigF;
|
||||
|
||||
AssertFatal(ru->if_south == LOCAL_RF,"we shouldn't call this if if_south != LOCAL_RF\n");
|
||||
for (int aa=0; aa<ru->nb_rx; aa++)
|
||||
prach[aa] = (int16_t*)&ru->common.rxdata[aa][(subframe*fp->samples_per_subframe)-ru->N_TA_offset];
|
||||
|
||||
|
||||
for (int aa=0; aa<ru->nb_rx; aa++){
|
||||
if (prach_sequence_length == 0) slot2=(slot/fp->slots_per_subframe)*fp->slots_per_subframe;
|
||||
prach[aa] = (int16_t*)&ru->common.rxdata[aa][(slot2*fp->get_samples_per_slot(slot,fp))-ru->N_TA_offset];
|
||||
}
|
||||
|
||||
int dftlen=0;
|
||||
int mu = fp->numerology_index;
|
||||
int Ncp;
|
||||
int Ncp = 0;
|
||||
int16_t *prach2;
|
||||
|
||||
|
||||
switch (prach_fmt) {
|
||||
case 0:
|
||||
Ncp = 3168;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Ncp = 21024;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
Ncp = 4688;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
Ncp = 3168;
|
||||
break;
|
||||
|
||||
case 0xa1:
|
||||
Ncp = 288/(1<<mu);
|
||||
break;
|
||||
|
||||
case 0xa2:
|
||||
Ncp = 576/(1<<mu);
|
||||
break;
|
||||
|
||||
case 0xa3:
|
||||
Ncp = 864/(1<<mu);
|
||||
break;
|
||||
|
||||
case 0xb1:
|
||||
Ncp = 216/(1<<mu);
|
||||
break;
|
||||
|
||||
case 0xb2:
|
||||
Ncp = 360/(1<<mu);
|
||||
break;
|
||||
|
||||
case 0xb3:
|
||||
Ncp = 504/(1<<mu);
|
||||
break;
|
||||
|
||||
case 0xb4:
|
||||
Ncp = 936/(1<<mu);
|
||||
break;
|
||||
|
||||
case 0xc0:
|
||||
Ncp = 1240/(1<<mu);
|
||||
break;
|
||||
|
||||
case 0xc2:
|
||||
Ncp = 2048/(1<<mu);
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"unknown prach format %x\n",prach_fmt);
|
||||
break;
|
||||
if (prach_sequence_length == 0) {
|
||||
LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %d, msg1_frequencyStart %d\n",
|
||||
ru->idx,frame,slot2,prachFormat,msg1_frequencystart);
|
||||
AssertFatal(prachFormat<4,"Illegal prach format %d for length 839\n",prachFormat);
|
||||
switch (prachFormat) {
|
||||
case 0:
|
||||
Ncp = 3168;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
Ncp = 21024;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
Ncp = 4688;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
Ncp = 3168;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
else {
|
||||
LOG_D(PHY,"PRACH (ru %d) in %d.%d, format %s, msg1_frequencyStart %d,startSymbol %d\n",
|
||||
ru->idx,frame,slot,prachfmt[prachFormat],msg1_frequencystart,prachStartSymbol);
|
||||
|
||||
switch (prachFormat) {
|
||||
case 0: //A1
|
||||
Ncp = 288/(1<<mu);
|
||||
break;
|
||||
|
||||
case 1: //A2
|
||||
Ncp = 576/(1<<mu);
|
||||
break;
|
||||
|
||||
case 2: //A3
|
||||
Ncp = 864/(1<<mu);
|
||||
break;
|
||||
|
||||
case 3: //B1
|
||||
Ncp = 216/(1<<mu);
|
||||
break;
|
||||
|
||||
case 4: //B2
|
||||
Ncp = 360/(1<<mu);
|
||||
break;
|
||||
|
||||
case 5: //B3
|
||||
Ncp = 504/(1<<mu);
|
||||
break;
|
||||
|
||||
case 6: //B4
|
||||
Ncp = 936/(1<<mu);
|
||||
break;
|
||||
|
||||
case 7: //C0
|
||||
Ncp = 1240/(1<<mu);
|
||||
break;
|
||||
|
||||
case 8: //C2
|
||||
Ncp = 2048/(1<<mu);
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"unknown prach format %x\n",prachFormat);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Do forward transform
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
LOG_D(PHY,"rx_prach: Doing FFT for N_RB_UL %d nb_rx:%d Ncp:%d\n",fp->N_RB_UL, ru->nb_rx, Ncp);
|
||||
LOG_D(PHY,"rx_prach: Doing PRACH FFT for nb_rx:%d Ncp:%d\n",ru->nb_rx, Ncp);
|
||||
}
|
||||
AssertFatal(mu==1,"only 30 kHz SCS handled for now\n");
|
||||
|
||||
// Note: Assumes PUSCH SCS @ 30 kHz, take values for formats 0-2 and adjust for others below
|
||||
int kbar = 1;
|
||||
int K = 24;
|
||||
if (prach_fmt == 3) {
|
||||
if (prach_sequence_length == 0 && prachFormat == 3) {
|
||||
K=4;
|
||||
kbar=10;
|
||||
}
|
||||
else if (prach_fmt > 3) {
|
||||
else if (prach_sequence_length == 1) {
|
||||
// Note: Assumes that PRACH SCS is same as PUSCH SCS
|
||||
K=1;
|
||||
kbar=2;
|
||||
}
|
||||
int n_ra_prb = fp->prach_config_common.prach_ConfigInfo.msg1_frequencystart;
|
||||
int n_ra_prb = msg1_frequencystart;
|
||||
int k = (12*n_ra_prb) - 6*fp->N_RB_UL;
|
||||
|
||||
int N_ZC = (prach_fmt<4)?839:139;
|
||||
int N_ZC = (prach_sequence_length==0)?839:139;
|
||||
|
||||
if (k<0) k+=(fp->ofdm_symbol_size);
|
||||
|
||||
k*=K;
|
||||
k+=kbar;
|
||||
int reps=1;
|
||||
int dftlen=0;
|
||||
|
||||
for (int aa=0; aa<ru->nb_rx; aa++) {
|
||||
AssertFatal(prach[aa]!=NULL,"prach[%d] is null\n",aa);
|
||||
|
||||
|
||||
// do DFT
|
||||
if (fp->N_RB_UL <= 100)
|
||||
AssertFatal(1==0,"N_RB_UL %d not support for NR PRACH yet\n",fp->N_RB_UL);
|
||||
@@ -173,175 +279,232 @@ void rx_nr_prach_ru(RU_t *ru,
|
||||
if (fp->threequarter_fs==0) {
|
||||
//40 MHz @ 61.44 Ms/s
|
||||
//50 MHz @ 61.44 Ms/s
|
||||
prach2 = prach[aa] + (Ncp<<2);
|
||||
if (prach_fmt == 0 || prach_fmt == 1 || prach_fmt == 2)
|
||||
dft(DFT_49152,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft(DFT_49152,prach2+98304,rxsigF[aa]+98304,1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 2) {
|
||||
dft(DFT_49152,prach2+(98304*2),rxsigF[aa]+(98304*2),1);
|
||||
dft(DFT_49152,prach2+(98304*3),rxsigF[aa]+(98304*3),1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 3) {
|
||||
for (int i=0;i<4;i++) dft(DFT_12288,prach2+(i*12288*2),rxsigF[aa]+(i*12288*2),1);
|
||||
reps=4;
|
||||
}
|
||||
if (prach_fmt >3) {
|
||||
dft(DFT_2048,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt != 0xc0) {
|
||||
dft(DFT_2048,prach2+4096,rxsigF[aa]+4096,1);
|
||||
prach2 = prach[aa] + (Ncp<<2); // Ncp is for 30.72 Ms/s, so multiply by 2 for I/Q, and 2 to bring to 61.44 Ms/s
|
||||
if (prach_sequence_length == 0) {
|
||||
if (prachFormat == 0 || prachFormat == 1 || prachFormat == 2) {
|
||||
dftlen=49152;
|
||||
dft(DFT_49152,prach2,rxsigF[aa],1);
|
||||
}
|
||||
if (prachFormat == 1 || prachFormat == 2) {
|
||||
dft(DFT_49152,prach2+98304,rxsigF[aa]+98304,1);
|
||||
reps++;
|
||||
}
|
||||
}
|
||||
if (prach_fmt == 0xa2 || prach_fmt == 0xa3 || prach_fmt == 0xb2 || prach_fmt == 0xb3 || prach_fmt == 0xb4 || prach_fmt == 0xc2) {
|
||||
dft(DFT_2048,prach2+4096*2,rxsigF[aa]+4096*2,1);
|
||||
dft(DFT_2048,prach2+4096*3,rxsigF[aa]+4096*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xa3 || prach_fmt == 0xb3 || prach_fmt == 0xc2) {
|
||||
dft(DFT_2048,prach2+4096*4,rxsigF[aa]+4096*4,1);
|
||||
dft(DFT_2048,prach2+4096*5,rxsigF[aa]+4096*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xc2) {
|
||||
for (int i=6;i<11;i++) dft(DFT_2048,prach2+(3072*i),rxsigF[aa]+(3072*i),1);
|
||||
reps+=6;
|
||||
if (prachFormat == 2) {
|
||||
dft(DFT_49152,prach2+(98304*2),rxsigF[aa]+(98304*2),1);
|
||||
dft(DFT_49152,prach2+(98304*3),rxsigF[aa]+(98304*3),1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 3) {
|
||||
dftlen=12288;
|
||||
for (int i=0;i<4;i++) dft(DFT_12288,prach2+(i*12288*2),rxsigF[aa]+(i*12288*2),1);
|
||||
reps=4;
|
||||
}
|
||||
}// 839 sequence
|
||||
else {
|
||||
if ((mu==0 &&
|
||||
(prachStartSymbol == 0 || prachStartSymbol == 7)) ||
|
||||
(mu==1 && prachStartSymbol == 0)) prach2+=64; // 32 samples @ 61.44 Ms/s in first symbol of each half subframe (15/30 kHz only)
|
||||
|
||||
if (mu==0) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==1) {
|
||||
dftlen=2048;
|
||||
dft(DFT_2048,prach2,rxsigF[aa],1);
|
||||
if (prachFormat != 7) { // !=C0
|
||||
dft(DFT_2048,prach2+4096,rxsigF[aa]+4096,1);
|
||||
reps++;
|
||||
}
|
||||
if (prachFormat == 1 || prachFormat == 2 || prachFormat == 4 || prachFormat == 5 || prachFormat == 6 || prachFormat == 8) {
|
||||
dft(DFT_2048,prach2+4096*2,rxsigF[aa]+4096*2,1);
|
||||
dft(DFT_2048,prach2+4096*3,rxsigF[aa]+4096*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 2 || prachFormat == 5 || prachFormat == 6) {
|
||||
dft(DFT_2048,prach2+4096*4,rxsigF[aa]+4096*4,1);
|
||||
dft(DFT_2048,prach2+4096*5,rxsigF[aa]+4096*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 6) {
|
||||
for (int i=6;i<12;i++) dft(DFT_2048,prach2+(4096*i),rxsigF[aa]+(4096*i),1);
|
||||
reps+=6;
|
||||
}
|
||||
}
|
||||
else if (mu==2) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==3) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==4) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
}
|
||||
} else {
|
||||
} else { // threequarter sampling
|
||||
// 40 MHz @ 46.08 Ms/s
|
||||
prach2 = prach[aa] + (3*Ncp);
|
||||
AssertFatal(fp->N_RB_UL <= 107,"cannot do 108..136 PRBs with 3/4 sampling\n");
|
||||
if (prach_fmt == 0 || prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft(DFT_36864,prach2,rxsigF[aa],1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft(DFT_36864,prach2+73728,rxsigF[aa]+73728,1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 2) {
|
||||
dft(DFT_36864,prach2+(98304*2),rxsigF[aa]+(98304*2),1);
|
||||
dft(DFT_36864,prach2+(98304*3),rxsigF[aa]+(98304*3),1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 3) {
|
||||
for (int i=0;i<4;i++) dft(DFT_9216,prach2+(i*9216*2),rxsigF[aa]+(i*9216*2),1);
|
||||
reps=4;
|
||||
}
|
||||
if (prach_fmt >3) {
|
||||
dft(DFT_1536,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt != 0xc0) {
|
||||
dft(DFT_1536,prach2+3072,rxsigF[aa]+3072,1);
|
||||
prach2 = prach[aa] + (3*Ncp); // 46.08 is 1.5 * 30.72, times 2 for I/Q
|
||||
if (prach_sequence_length == 0) {
|
||||
AssertFatal(fp->N_RB_UL <= 107,"cannot do 108..136 PRBs with 3/4 sampling\n");
|
||||
if (prachFormat == 0 || prachFormat == 1 || prachFormat == 2) {
|
||||
dftlen=36864;
|
||||
dft(DFT_36864,prach2,rxsigF[aa],1);
|
||||
reps++;
|
||||
}
|
||||
}
|
||||
if (prach_fmt == 0xa2 || prach_fmt == 0xa3 || prach_fmt == 0xb2 || prach_fmt == 0xb3 || prach_fmt == 0xb4 || prach_fmt == 0xc2) {
|
||||
dft(DFT_1536,prach2+3072*2,rxsigF[aa]+3072*2,1);
|
||||
dft(DFT_1536,prach2+3072*3,rxsigF[aa]+3072*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xa3 || prach_fmt == 0xb3 || prach_fmt == 0xc2) {
|
||||
dft(DFT_1536,prach2+3072*4,rxsigF[aa]+3072*4,1);
|
||||
dft(DFT_1536,prach2+3072*5,rxsigF[aa]+3072*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xc2) {
|
||||
for (int i=6;i<11;i++) dft(DFT_1536,prach2+(3072*i),rxsigF[aa]+(3072*i),1);
|
||||
reps+=6;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (prachFormat == 1 || prachFormat == 2) {
|
||||
dft(DFT_36864,prach2+73728,rxsigF[aa]+73728,1);
|
||||
reps++;
|
||||
}
|
||||
if (prachFormat == 2) {
|
||||
dft(DFT_36864,prach2+(73728*2),rxsigF[aa]+(73728*2),1);
|
||||
dft(DFT_36864,prach2+(73728*3),rxsigF[aa]+(73728*3),1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 3) {
|
||||
dftlen=9216;
|
||||
for (int i=0;i<4;i++) dft(DFT_9216,prach2+(i*9216*2),rxsigF[aa]+(i*9216*2),1);
|
||||
reps=4;
|
||||
}
|
||||
} else {
|
||||
if ((mu==0 &&
|
||||
(prachStartSymbol == 0 || prachStartSymbol == 7)) ||
|
||||
(mu==1 && prachStartSymbol == 0)) prach2+=48; // 24 samples @ 46.08 Ms/s in first symbol of each half subframe (15/30 kHz only)
|
||||
if (mu==0) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==1) {
|
||||
dftlen=1536;
|
||||
dft(DFT_1536,prach2,rxsigF[aa],1);
|
||||
if (prachFormat != 7) {
|
||||
dft(DFT_1536,prach2+3072,rxsigF[aa]+3072,1);
|
||||
reps++;
|
||||
}
|
||||
|
||||
if (prachFormat == 1 || prachFormat == 2 || prachFormat == 4 || prachFormat == 5 || prachFormat == 6 || prachFormat == 8) {
|
||||
dft(DFT_1536,prach2+3072*2,rxsigF[aa]+3072*2,1);
|
||||
dft(DFT_1536,prach2+3072*3,rxsigF[aa]+3072*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 2 || prachFormat == 5 || prachFormat == 6) {
|
||||
dft(DFT_1536,prach2+3072*4,rxsigF[aa]+3072*4,1);
|
||||
dft(DFT_1536,prach2+3072*5,rxsigF[aa]+3072*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 6) {
|
||||
for (int i=6;i<12;i++) dft(DFT_1536,prach2+(3072*i),rxsigF[aa]+(3072*i),1);
|
||||
reps+=6;
|
||||
}
|
||||
}// mu==1
|
||||
else if (mu==2) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==3) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==4) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
} // short format
|
||||
} // 3/4 sampling
|
||||
} // <=50 MHz BW
|
||||
else if (fp->N_RB_UL <= 273) {
|
||||
if (fp->threequarter_fs==0) {
|
||||
prach2 = prach[aa] + (Ncp<<3);
|
||||
dftlen=98304;
|
||||
//80,90,100 MHz @ 61.44 Ms/s
|
||||
if (prach_fmt == 0 || prach_fmt == 1 || prach_fmt == 2)
|
||||
dft(DFT_98304,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft(DFT_98304,prach2+196608,rxsigF[aa]+196608,1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft(DFT_98304,prach2+196608,rxsigF[aa]+196608,1);
|
||||
dft(DFT_98304,prach2+(196608*2),rxsigF[aa]+(196608*2),1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 3) {
|
||||
dft(DFT_24576,prach2+(2*49152),rxsigF[aa]+(2*49152),1);
|
||||
reps=4;
|
||||
dftlen=24576;
|
||||
}
|
||||
if (prach_fmt >3) {
|
||||
dftlen=4096;
|
||||
dft(DFT_4096,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt != 0xc0) {
|
||||
dft(DFT_4096,prach2+8192,rxsigF[aa]+8192,1);
|
||||
//80,90,100 MHz @ 122.88 Ms/s
|
||||
|
||||
if (prach_sequence_length == 0) {
|
||||
if (prachFormat == 0 || prachFormat == 1 || prachFormat == 2) {
|
||||
dftlen=98304;
|
||||
dft(DFT_98304,prach2,rxsigF[aa],1);
|
||||
}
|
||||
if (prachFormat == 1 || prachFormat == 2) {
|
||||
dft(DFT_98304,prach2+196608,rxsigF[aa]+196608,1);
|
||||
reps++;
|
||||
}
|
||||
}
|
||||
if (prach_fmt == 0xa2 || prach_fmt == 0xa3 || prach_fmt == 0xb2 || prach_fmt == 0xb3 || prach_fmt == 0xb4 || prach_fmt == 0xc2) {
|
||||
dft(DFT_4096,prach2+8192*2,rxsigF[aa]+8192*2,1);
|
||||
dft(DFT_4096,prach2+8192*3,rxsigF[aa]+8192*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xa3 || prach_fmt == 0xb3 || prach_fmt == 0xc2) {
|
||||
dft(DFT_4096,prach2+8192*4,rxsigF[aa]+8192*4,1);
|
||||
dft(DFT_4096,prach2+8192*5,rxsigF[aa]+8192*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xc2) {
|
||||
for (int i=6;i<11;i++) dft(DFT_4096,prach2+(8192*i),rxsigF[aa]+(8192*i),1);
|
||||
reps+=6;
|
||||
if (prachFormat == 2) {
|
||||
dft(DFT_98304,prach2+(196608*2),rxsigF[aa]+(196608*2),1);
|
||||
dft(DFT_98304,prach2+(196608*3),rxsigF[aa]+(196608*3),1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 3) {
|
||||
dftlen=24576;
|
||||
for (int i=0;i<4;i++) dft(DFT_24576,prach2+(i*2*24576),rxsigF[aa]+(i*2*24576),1);
|
||||
reps=4;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((mu==0 &&
|
||||
(prachStartSymbol == 0 || prachStartSymbol == 7)) ||
|
||||
(mu==1 && prachStartSymbol == 0)) prach2+=128; // 64 samples @ 122.88 Ms/s in first symbol of each half subframe (15/30 kHz only)
|
||||
|
||||
if (mu==0) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==1) {
|
||||
dftlen=4096;
|
||||
dft(DFT_4096,prach2,rxsigF[aa],1);
|
||||
if (prachFormat != 7) { //!=C0
|
||||
dft(DFT_4096,prach2+8192,rxsigF[aa]+8192,1);
|
||||
reps++;
|
||||
}
|
||||
|
||||
if (prachFormat == 1 || prachFormat == 2 || prachFormat == 4 || prachFormat == 5 || prachFormat == 6 || prachFormat == 8) {
|
||||
dft(DFT_4096,prach2+8192*2,rxsigF[aa]+8192*2,1);
|
||||
dft(DFT_4096,prach2+8192*3,rxsigF[aa]+8192*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 2 || prachFormat == 5 || prachFormat == 6) {
|
||||
dft(DFT_4096,prach2+8192*4,rxsigF[aa]+8192*4,1);
|
||||
dft(DFT_4096,prach2+8192*5,rxsigF[aa]+8192*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 6) {
|
||||
for (int i=6;i<12;i++) dft(DFT_4096,prach2+(8192*i),rxsigF[aa]+(8192*i),1);
|
||||
reps+=6;
|
||||
}
|
||||
}
|
||||
else if (mu==2) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==3) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==4) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
}
|
||||
} else {
|
||||
AssertFatal(fp->N_RB_UL <= 217,"cannot do more than 217 PRBs with 3/4 sampling\n");
|
||||
prach2 = prach[aa] + (6*Ncp);
|
||||
// 80 MHz @ 46.08 Ms/s
|
||||
dftlen=73728;
|
||||
if (prach_fmt == 0 || prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft(DFT_73728,prach2,rxsigF[aa],1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 1 || prach_fmt == 2) {
|
||||
dft(DFT_73728,prach2+(2*73728),rxsigF[aa]+(2*73728),1);
|
||||
reps++;
|
||||
}
|
||||
if (prach_fmt == 3) {
|
||||
dft(DFT_73728,prach2+(4*73728),rxsigF[aa]+(4*73728),1);
|
||||
reps=4;
|
||||
dftlen=18432;
|
||||
}
|
||||
|
||||
if (prach_fmt >3) {
|
||||
dftlen=3072;
|
||||
dft(DFT_3072,prach2,rxsigF[aa],1);
|
||||
if (prach_fmt != 0xc0) {
|
||||
dft(DFT_3072,prach2+6144,rxsigF[aa]+6144,1);
|
||||
// 80 MHz @ 92.16 Ms/s
|
||||
if (prach_sequence_length == 0) {
|
||||
if (prachFormat == 0 || prachFormat == 1 || prachFormat == 2) {
|
||||
dftlen=73728;
|
||||
dft(DFT_73728,prach2,rxsigF[aa],1);
|
||||
reps++;
|
||||
}
|
||||
}
|
||||
if (prach_fmt == 0xa2 || prach_fmt == 0xa3 || prach_fmt == 0xb2 || prach_fmt == 0xb3 || prach_fmt == 0xb4 || prach_fmt == 0xc2) {
|
||||
dft(DFT_3072,prach2+6144*2,rxsigF[aa]+6144*2,1);
|
||||
dft(DFT_3072,prach2+6144*3,rxsigF[aa]+6144*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xa3 || prach_fmt == 0xb3 || prach_fmt == 0xc2) {
|
||||
dft(DFT_3072,prach2+6144*4,rxsigF[aa]+6144*4,1);
|
||||
dft(DFT_3072,prach2+6144*5,rxsigF[aa]+6144*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prach_fmt == 0xc2) {
|
||||
for (int i=6;i<11;i++) dft(DFT_3072,prach2+(6144*i),rxsigF[aa]+(6144*i),1);
|
||||
reps+=6;
|
||||
if (prachFormat == 1 || prachFormat == 2) {
|
||||
dft(DFT_73728,prach2+(2*73728),rxsigF[aa]+(2*73728),1);
|
||||
reps++;
|
||||
}
|
||||
if (prachFormat == 3) {
|
||||
dftlen=18432;
|
||||
for (int i=0;i<4;i++) dft(DFT_18432,prach2+(i*2*18432),rxsigF[aa]+(i*2*18432),1);
|
||||
reps=4;
|
||||
}
|
||||
} else {
|
||||
if ((mu==0 &&
|
||||
(prachStartSymbol == 0 || prachStartSymbol == 7)) ||
|
||||
(mu==1 && prachStartSymbol == 0)) prach2+=96; // 64 samples @ 122.88 Ms/s in first symbol of each half subframe (15/30 kHz only)
|
||||
|
||||
if (mu==0) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==1) {
|
||||
dftlen=3072;
|
||||
dft(DFT_3072,prach2,rxsigF[aa],1);
|
||||
if (prachFormat != 7) { //!=C0
|
||||
dft(DFT_3072,prach2+6144,rxsigF[aa]+6144,1);
|
||||
reps++;
|
||||
}
|
||||
|
||||
if (prachFormat == 1 || prachFormat == 2 || prachFormat == 4 || prachFormat == 5 || prachFormat == 6 || prachFormat == 8) {
|
||||
dft(DFT_3072,prach2+6144*2,rxsigF[aa]+6144*2,1);
|
||||
dft(DFT_3072,prach2+6144*3,rxsigF[aa]+6144*3,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 2 || prachFormat == 5 || prachFormat == 6) {
|
||||
dft(DFT_3072,prach2+6144*4,rxsigF[aa]+6144*4,1);
|
||||
dft(DFT_3072,prach2+6144*5,rxsigF[aa]+6144*5,1);
|
||||
reps+=2;
|
||||
}
|
||||
if (prachFormat == 6) {
|
||||
for (int i=6;i<12;i++) dft(DFT_3072,prach2+(6144*i),rxsigF[aa]+(6144*i),1);
|
||||
reps+=6;
|
||||
}
|
||||
}
|
||||
else if (mu==2) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==3) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
else if (mu==4) AssertFatal(1==0,"Shouldn't get here\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Coherent combining of PRACH repetitions (assumes channel does not change, to be revisted for "long" PRACH)
|
||||
LOG_D(PHY,"Doing PRACH combining of %d reptitions N_ZC %d\n",reps,N_ZC);
|
||||
int16_t rxsigF_tmp[N_ZC<<1];
|
||||
// if (k+N_ZC > dftlen) { // PRACH signal is split around DC
|
||||
int16_t *rxsigF2=rxsigF[aa];
|
||||
@@ -350,7 +513,7 @@ void rx_nr_prach_ru(RU_t *ru,
|
||||
for (int j=0;j<N_ZC<<1;j++,k2++) {
|
||||
if (k2==(dftlen<<1)) k2=0;
|
||||
rxsigF_tmp[j] = rxsigF2[k2];
|
||||
for (int i=1;i<reps;i++) rxsigF_tmp[j] += rxsigF2[k2+(i*N_ZC<<1)];
|
||||
for (int i=1;i<reps;i++) rxsigF_tmp[j] += rxsigF2[k2+(i*dftlen<<1)];
|
||||
}
|
||||
memcpy((void*)rxsigF2,(void *)rxsigF_tmp,N_ZC<<2);
|
||||
|
||||
@@ -359,6 +522,7 @@ void rx_nr_prach_ru(RU_t *ru,
|
||||
}
|
||||
|
||||
void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
nfapi_nr_prach_pdu_t *prach_pdu,
|
||||
int frame,
|
||||
int subframe,
|
||||
uint16_t *max_preamble,
|
||||
@@ -370,11 +534,11 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
|
||||
int i;
|
||||
|
||||
nfapi_nr_prach_config_t *cfg=&gNB->gNB_config.prach_config;
|
||||
NR_DL_FRAME_PARMS *fp;
|
||||
lte_frame_type_t frame_type;
|
||||
|
||||
uint16_t rootSequenceIndex;
|
||||
uint8_t prach_ConfigIndex;
|
||||
uint8_t Ncs_config;
|
||||
int numrootSequenceIndex;
|
||||
uint8_t restricted_set;
|
||||
uint8_t n_ra_prb;
|
||||
int16_t *prachF=NULL;
|
||||
@@ -404,59 +568,35 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
int16_t prach_ifft_tmp[2048*2] __attribute__((aligned(32)));
|
||||
int32_t *prach_ifft=(int32_t*)NULL;
|
||||
|
||||
nr_frequency_range_e freq_range;
|
||||
fp = &gNB->frame_parms;
|
||||
|
||||
fp = &gNB->frame_parms;
|
||||
nb_rx = fp->nb_antennas_rx;
|
||||
nb_rx = gNB->gNB_config.carrier_config.num_rx_ant.value;
|
||||
|
||||
frame_type = fp->frame_type;
|
||||
freq_range = fp->freq_range;
|
||||
rootSequenceIndex = fp->prach_config_common.rootSequenceIndex;
|
||||
prach_ConfigIndex = fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
|
||||
Ncs_config = fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig;
|
||||
restricted_set = fp->prach_config_common.prach_ConfigInfo.highSpeedFlag;
|
||||
|
||||
rootSequenceIndex = cfg->num_prach_fd_occasions_list[0].prach_root_sequence_index.value;
|
||||
numrootSequenceIndex = cfg->num_prach_fd_occasions_list[0].num_root_sequences.value;
|
||||
NCS = prach_pdu->num_cs;//cfg->num_prach_fd_occasions_list[0].prach_zero_corr_conf.value;
|
||||
int prach_sequence_length = cfg->prach_sequence_length.value;
|
||||
|
||||
uint8_t prach_fmt = get_nr_prach_fmt(prach_ConfigIndex,frame_type,freq_range);
|
||||
uint16_t N_ZC = (prach_fmt <4)?839:139;
|
||||
int msg1_frequencystart = cfg->num_prach_fd_occasions_list[0].k1.value;
|
||||
// int num_unused_root_sequences = cfg->num_prach_fd_occasions_list[0].num_unused_root_sequences.value;
|
||||
// cfg->num_prach_fd_occasions_list[0].unused_root_sequences_list
|
||||
|
||||
restricted_set = cfg->restricted_set_config.value;
|
||||
|
||||
uint8_t prach_fmt = prach_pdu->prach_format;
|
||||
uint16_t N_ZC = (prach_sequence_length==0)?839:139;
|
||||
|
||||
LOG_D(PHY,"L1 PRACH RX: rooSequenceIndex %d, numRootSeqeuences %d, NCS %d, N_ZC %d \n", rootSequenceIndex,numrootSequenceIndex,NCS,N_ZC);
|
||||
|
||||
prach_ifft = gNB->prach_vars.prach_ifft;
|
||||
prachF = gNB->prach_vars.prachF;
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
if ((frame&1023) < 20) LOG_D(PHY,"PRACH (gNB) : running rx_prach for subframe %d, msg1_frequencystart %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.msg1_frequencystart,prach_ConfigIndex,rootSequenceIndex);
|
||||
if ((frame&1023) < 20) LOG_D(PHY,"PRACH (gNB) : running rx_prach for subframe %d, msg1_frequencystart %d, rootSequenceIndex %d\n", subframe,msg1_frequencystart,rootSequenceIndex);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
int restricted_Type = 0; //this is hardcoded ('0' for restricted_TypeA; and '1' for restricted_TypeB). FIXME
|
||||
if (prach_fmt<3){
|
||||
if (restricted_set == 0) {
|
||||
NCS = NCS_unrestricted_delta_f_RA_125[Ncs_config];
|
||||
} else {
|
||||
if (restricted_Type == 0) NCS = NCS_restricted_TypeA_delta_f_RA_125[Ncs_config]; // for TypeA, this is hardcoded. FIXME
|
||||
if (restricted_Type == 1) NCS = NCS_restricted_TypeB_delta_f_RA_125[Ncs_config]; // for TypeB, this is hardcoded. FIXME
|
||||
}
|
||||
}
|
||||
if (prach_fmt==3){
|
||||
if (restricted_set == 0) {
|
||||
NCS = NCS_unrestricted_delta_f_RA_5[Ncs_config];
|
||||
} else {
|
||||
if (restricted_Type == 0) NCS = NCS_restricted_TypeA_delta_f_RA_5[Ncs_config]; // for TypeA, this is hardcoded. FIXME
|
||||
if (restricted_Type == 1) NCS = NCS_restricted_TypeB_delta_f_RA_5[Ncs_config]; // for TypeB, this is hardcoded. FIXME
|
||||
}
|
||||
}
|
||||
if (prach_fmt>3){
|
||||
NCS = NCS_unrestricted_delta_f_RA_15[Ncs_config];
|
||||
}
|
||||
|
||||
AssertFatal(NCS!=99,"NCS has not been set\n");
|
||||
|
||||
start_meas(&gNB->rx_prach);
|
||||
|
||||
prach_root_sequence_map = (prach_fmt<4) ? prach_root_sequence_map_0_3 : prach_root_sequence_map_abc;
|
||||
prach_root_sequence_map = (cfg->prach_sequence_length.value==0) ? prach_root_sequence_map_0_3 : prach_root_sequence_map_abc;
|
||||
|
||||
// PDP is oversampled, e.g. 1024 sample instead of 839
|
||||
// Adapt the NCS (zero-correlation zones) with oversampling factor e.g. 1024/839
|
||||
@@ -469,16 +609,19 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
|
||||
|
||||
*max_preamble_energy=0;
|
||||
*max_preamble_delay=0;
|
||||
*max_preamble=0;
|
||||
|
||||
for (preamble_index=0 ; preamble_index<64 ; preamble_index++) {
|
||||
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],(N_ZC==839) ? 840: 140));
|
||||
if (en>60) LOG_I(PHY,"frame %d, subframe %d : Trying preamble %d \n",frame,subframe,preamble_index);
|
||||
if (en>60) LOG_D(PHY,"frame %d, subframe %d : Trying preamble %d \n",frame,subframe,preamble_index);
|
||||
}
|
||||
if (restricted_set == 0) {
|
||||
// This is the relative offset in the root sequence table (5.7.2-4 from 36.211) for the given preamble index
|
||||
preamble_offset = ((NCS==0)? preamble_index : (preamble_index/(N_ZC/NCS)));
|
||||
|
||||
|
||||
if (preamble_offset != preamble_offset_old) {
|
||||
preamble_offset_old = preamble_offset;
|
||||
new_dft = 1;
|
||||
@@ -508,13 +651,6 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
// current root depending on rootSequenceIndex
|
||||
int index = (rootSequenceIndex + preamble_offset) % N_ZC;
|
||||
|
||||
if (prach_fmt<4) {
|
||||
// prach_root_sequence_map points to prach_root_sequence_map0_3
|
||||
DevAssert( index < sizeof(prach_root_sequence_map_0_3) / sizeof(prach_root_sequence_map_0_3[0]) );
|
||||
} else {
|
||||
// prach_root_sequence_map points to prach_root_sequence_map4
|
||||
DevAssert( index < sizeof(prach_root_sequence_map_abc) / sizeof(prach_root_sequence_map_abc[0]) );
|
||||
}
|
||||
u = prach_root_sequence_map[index];
|
||||
|
||||
uint16_t n_group_ra = 0;
|
||||
@@ -559,14 +695,21 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
// Compute DFT of RX signal (conjugate input, results in conjugate output) for each new rootSequenceIndex
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if (en>60) LOG_I(PHY,"frame %d, subframe %d : preamble index %d, NCS %d, NCS_config %d, N_ZC/NCS %d: offset %d, preamble shift %d , en %d)\n",
|
||||
frame,subframe,preamble_index,NCS,Ncs_config,N_ZC/NCS,preamble_offset,preamble_shift,en);
|
||||
if (en>60) LOG_I(PHY,"frame %d, subframe %d : preamble index %d, NCS %d, N_ZC/NCS %d: offset %d, preamble shift %d , en %d)\n",
|
||||
frame,subframe,preamble_index,NCS,N_ZC/NCS,preamble_offset,preamble_shift,en);
|
||||
}
|
||||
|
||||
LOG_D(PHY,"PRACH RX preamble_index %d, preamble_offset %d\n",preamble_index,preamble_offset);
|
||||
|
||||
|
||||
if (new_dft == 1) {
|
||||
new_dft = 0;
|
||||
|
||||
Xu=(int16_t*)gNB->X_u[preamble_offset-first_nonzero_root_idx];
|
||||
|
||||
LOG_D(PHY,"PRACH RX new dft preamble_offset-first_nonzero_root_idx %d\n",preamble_offset-first_nonzero_root_idx);
|
||||
|
||||
|
||||
memset(prach_ifft,0,((N_ZC==839) ? 2048 : 256)*sizeof(int32_t));
|
||||
|
||||
|
||||
@@ -590,32 +733,31 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
idft(IDFT_1024,prachF,prach_ifft_tmp,1);
|
||||
// compute energy and accumulate over receive antennas
|
||||
for (i=0;i<2048;i++)
|
||||
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[i<<1] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>10;
|
||||
prach_ifft[i] += ((int32_t)prach_ifft_tmp[i<<1]*(int32_t)prach_ifft_tmp[i<<1] + (int32_t)prach_ifft_tmp[1+(i<<1)]*(int32_t)prach_ifft_tmp[1+(i<<1)])>>10;
|
||||
} else {
|
||||
idft(IDFT_256,prachF,prach_ifft_tmp,1);
|
||||
log2_ifft_size = 8;
|
||||
// compute energy and accumulate over receive antennas and repetitions for BR
|
||||
for (i=0;i<256;i++)
|
||||
prach_ifft[i] += (prach_ifft_tmp[i<<1]*prach_ifft_tmp[(i<<1)] + prach_ifft_tmp[1+(i<<1)]*prach_ifft_tmp[1+(i<<1)])>>10;
|
||||
prach_ifft[i] += ((int32_t)prach_ifft_tmp[i<<1]*(int32_t)prach_ifft_tmp[(i<<1)] + (int32_t)prach_ifft_tmp[1+(i<<1)]*(int32_t)prach_ifft_tmp[1+(i<<1)])>>10;
|
||||
}
|
||||
|
||||
if (LOG_DUMPFLAG(PRACH)) {
|
||||
if (LOG_DUMPFLAG(PRACH)) {
|
||||
if (aa==0) LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
|
||||
if (aa==1) LOG_M("prach_rxF_comp1.m","prach_rxF_comp1",prachF,1024,1,1);
|
||||
}
|
||||
}
|
||||
}// antennas_rx
|
||||
} // new dft
|
||||
|
||||
// check energy in nth time shift, for
|
||||
|
||||
preamble_shift2 = ((preamble_shift==0) ? 0 : ((preamble_shift<<log2_ifft_size)/N_ZC));
|
||||
|
||||
|
||||
|
||||
for (i=0; i<NCS2; i++) {
|
||||
lev = (int32_t)prach_ifft[(preamble_shift2+i)];
|
||||
levdB = dB_fixed_times10(lev);
|
||||
|
||||
if (levdB>*max_preamble_energy) {
|
||||
LOG_D(PHY,"preamble_index %d, delay %d en %d dB > %d dB\n",preamble_index,i,levdB,*max_preamble_energy);
|
||||
*max_preamble_energy = levdB;
|
||||
*max_preamble_delay = i; // Note: This has to be normalized to the 30.72 Ms/s sampling rate
|
||||
*max_preamble = preamble_index;
|
||||
@@ -623,9 +765,34 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
}// preamble_index
|
||||
|
||||
|
||||
// The conversion from *max_preamble_delay from TA value is done here.
|
||||
// It is normalized to the 30.72 Ms/s, considering the numerology, N_RB and the sampling rate
|
||||
// See table 6.3.3.1 -1 and -2 in 38211.
|
||||
|
||||
// Format 0, 1, 2: 24576 samples @ 30.72 Ms/s, 98304 samples @ 122.88 Ms/s
|
||||
// By solving:
|
||||
// max_preamble_delay * ( (24576*(fs/30.72M)) / 1024 ) / fs = TA * 16 * 64 / 2^mu * Tc
|
||||
|
||||
// Format 3: 6144 samples @ 30.72 Ms/s, 24576 samples @ 122.88 Ms/s
|
||||
// By solving:
|
||||
// max_preamble_delay * ( (6144*(fs/30.72M)) / 1024 ) / fs = TA * 16 * 64 / 2^mu * Tc
|
||||
|
||||
// Format >3: 2048/2^mu samples @ 30.72 Ms/s, 2048/2^mu * 4 samples @ 122.88 Ms/s
|
||||
// By solving:
|
||||
// max_preamble_delay * ( (2048/2^mu*(fs/30.72M)) / 256 ) / fs = TA * 16 * 64 / 2^mu * Tc
|
||||
uint16_t *TA = max_preamble_delay;
|
||||
int mu = fp->numerology_index;
|
||||
if (cfg->prach_sequence_length.value==0) {
|
||||
if (prach_fmt == 0 || prach_fmt == 1 || prach_fmt == 2) *TA = *TA*3*(1<<mu)/2;
|
||||
else if (prach_fmt == 3) *TA = *TA*3*(1<<mu)/8;
|
||||
}
|
||||
else *TA = *TA/2;
|
||||
|
||||
|
||||
if (LOG_DUMPFLAG(PRACH)) {
|
||||
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
if (en>60) {
|
||||
//int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
|
||||
// if (en>60) {
|
||||
int k = (12*n_ra_prb) - 6*fp->N_RB_UL;
|
||||
|
||||
if (k<0) k+=fp->ofdm_symbol_size;
|
||||
@@ -639,9 +806,9 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
|
||||
LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
|
||||
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
|
||||
}
|
||||
// }
|
||||
} /* LOG_DUMPFLAG(PRACH) */
|
||||
if (gNB) stop_meas(&gNB->rx_prach);
|
||||
stop_meas(&gNB->rx_prach);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -37,18 +37,6 @@ uint16_t nr_du[838];
|
||||
/*************************************
|
||||
* The following tables defined for NR
|
||||
**************************************/
|
||||
// Table 6.3.3.1-5 (38.211) NCS for preamble formats with delta_f_RA = 1.25 KHz
|
||||
uint16_t NCS_unrestricted_delta_f_RA_125[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419};
|
||||
uint16_t NCS_restricted_TypeA_delta_f_RA_125[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case set Type A
|
||||
uint16_t NCS_restricted_TypeB_delta_f_RA_125[13] = {15,18,22,26,32,38,46,55,68,82,100,118,137}; // high-speed case set Type B
|
||||
|
||||
// Table 6.3.3.1-6 (38.211) NCS for preamble formats with delta_f_RA = 5 KHz
|
||||
uint16_t NCS_unrestricted_delta_f_RA_5[16] = {0,13,26,33,38,41,49,55,64,76,93,119,139,209,279,419};
|
||||
uint16_t NCS_restricted_TypeA_delta_f_RA_5[16] = {36,57,72,81,89,94,103,112,121,132,137,152,173,195,216,237}; // high-speed case set Type A
|
||||
uint16_t NCS_restricted_TypeB_delta_f_RA_5[14] = {36,57,60,63,65,68,71,77,81,85,97,109,122,137}; // high-speed case set Type B
|
||||
|
||||
// Table 6.3.3.1-7 (38.211) NCS for preamble formats with delta_f_RA = 15 * 2mu KHz where mu = {0,1,2,3}
|
||||
uint16_t NCS_unrestricted_delta_f_RA_15[16] = {0,2,4,6,8,10,12,13,15,17,19,23,27,34,46,69};
|
||||
|
||||
//Table 6.3.3.1-3: Mapping from logical index i to sequence number u for preamble formats with L_RA = 839
|
||||
uint16_t prach_root_sequence_map_0_3[838] = {
|
||||
@@ -105,787 +93,3 @@ uint16_t prach_root_sequence_map_abc[138] = {
|
||||
51, 88 , 52, 87 , 53, 86 , 54, 85 , 55, 84 , 56, 83 , 57, 82 , 58, 81 , 59, 80 , 60, 79 ,
|
||||
61, 78 , 62, 77 , 63, 76 , 64, 75 , 65, 74 , 66, 73 , 67, 72 , 68, 71 , 69, 70
|
||||
};
|
||||
|
||||
// Table 6.3.3.2-2: Random access configurations for FR1 and paired spectrum/supplementary uplink
|
||||
// the column 5, (SFN_nbr is a bitmap where we set bit to '1' in the position of the subframe where the RACH can be sent.
|
||||
// E.g. in row 4, and column 5 we have set value 512 ('1000000000') which means RACH can be sent at subframe 9.
|
||||
// E.g. in row 20 and column 5 we have set value 66 ('0001000010') which means RACH can be sent at subframe 1 or 6
|
||||
int64_t table_6_3_3_2_2_prachConfig_Index [256][9] = {
|
||||
//format, format, x, y, SFN_nbr, star_symb, slots_sfn, occ_slot, duration
|
||||
{0, -1, 16, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{0, -1, 16, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{0, -1, 16, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{0, -1, 16, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{0, -1, 8, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{0, -1, 8, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{0, -1, 8, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{0, -1, 8, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{0, -1, 4, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{0, -1, 4, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{0, -1, 4, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{0, -1, 4, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{0, -1, 2, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{0, -1, 2, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{0, -1, 2, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{0, -1, 2, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{0, -1, 1, 0, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{0, -1, 1, 0, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{0, -1, 1, 0, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{0, -1, 1, 0, 66, 0, -1, -1, 0}, // (subframe number) 1,6
|
||||
{0, -1, 1, 0, 132, 0, -1, -1, 0}, // (subframe number) 2,7
|
||||
{0, -1, 1, 0, 264, 0, -1, -1, 0}, // (subframe number) 3,8
|
||||
{0, -1, 1, 0, 146, 0, -1, -1, 0}, // (subframe number) 1,4,7
|
||||
{0, -1, 1, 0, 292, 0, -1, -1, 0}, // (subframe number) 2,5,8
|
||||
{0, -1, 1, 0, 584, 0, -1, -1, 0}, // (subframe number) 3, 6, 9
|
||||
{0, -1, 1, 0, 341, 0, -1, -1, 0}, // (subframe number) 0,2,4,6,8
|
||||
{0, -1, 1, 0, 682, 0, -1, -1, 0}, // (subframe number) 1,3,5,7,9
|
||||
{0, -1, 1, 0, 1023, 0, -1, -1, 0}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{1, -1, 16, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{1, -1, 16, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{1, -1, 16, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{1, -1, 16, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{1, -1, 8, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{1, -1, 8, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{1, -1, 8, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{1, -1, 8, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{1, -1, 4, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{1, -1, 4, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{1, -1, 4, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{1, -1, 4, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{1, -1, 2, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{1, -1, 2, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{1, -1, 2, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{1, -1, 2, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{1, -1, 1, 0, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{1, -1, 1, 0, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{1, -1, 1, 0, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{1, -1, 1, 0, 66, 0, -1, -1, 0}, // (subframe number) 1,6
|
||||
{1, -1, 1, 0, 132, 0, -1, -1, 0}, // (subframe number) 2,7
|
||||
{1, -1, 1, 0, 264, 0, -1, -1, 0}, // (subframe number) 3,8
|
||||
{1, -1, 1, 0, 146, 0, -1, -1, 0}, // (subframe number) 1,4,7
|
||||
{1, -1, 1, 0, 292, 0, -1, -1, 0}, // (subframe number) 2,5,8
|
||||
{1, -1, 1, 0, 584, 0, -1, -1, 0}, // (subframe number) 3,6,9
|
||||
{2, -1, 16, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{2, -1, 8, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{2, -1, 4, 0, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{2, -1, 2, 0, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{2, -1, 2, 0, 32, 0, -1, -1, 0}, // (subframe number) 5
|
||||
{2, -1, 1, 0, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{2, -1, 1, 0, 32, 0, -1, -1, 0}, // (subframe number) 5
|
||||
{3, -1, 16, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{3, -1, 16, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{3, -1, 16, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{3, -1, 16, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{3, -1, 8, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{3, -1, 8, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{3, -1, 8, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{3, -1, 4, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{3, -1, 4, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{3, -1, 4, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{3, -1, 4, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{3, -1, 2, 1, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{3, -1, 2, 1, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{3, -1, 2, 1, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{3, -1, 2, 1, 512, 0, -1, -1, 0}, // (subframe number) 9
|
||||
{3, -1, 1, 0, 2, 0, -1, -1, 0}, // (subframe number) 1
|
||||
{3, -1, 1, 0, 16, 0, -1, -1, 0}, // (subframe number) 4
|
||||
{3, -1, 1, 0, 128, 0, -1, -1, 0}, // (subframe number) 7
|
||||
{3, -1, 1, 0, 66, 0, -1, -1, 0}, // (subframe number) 1,6
|
||||
{3, -1, 1, 0, 132, 0, -1, -1, 0}, // (subframe number) 2,7
|
||||
{3, -1, 1, 0, 264, 0, -1, -1, 0}, // (subframe number) 3,8
|
||||
{3, -1, 1, 0, 146, 0, -1, -1, 0}, // (subframe number) 1,4,7
|
||||
{3, -1, 1, 0, 292, 0, -1, -1, 0}, // (subframe number) 2,5,8
|
||||
{3, -1, 1, 0, 584, 0, -1, -1, 0}, // (subframe number) 3, 6, 9
|
||||
{3, -1, 1, 0, 341, 0, -1, -1, 0}, // (subframe number) 0,2,4,6,8
|
||||
{3, -1, 1, 0, 682, 0, -1, -1, 0}, // (subframe number) 1,3,5,7,9
|
||||
{3, -1, 1, 0, 1023, 0, -1, -1, 0}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{0xa1, -1, 16, 0, 528, 0, 1, 6, 2}, // (subframe number) 4,9
|
||||
{0xa1, -1, 16, 1, 16, 0, 2, 6, 2}, // (subframe number) 4
|
||||
{0xa1, -1, 8, 0, 528, 0, 1, 6, 2}, // (subframe number) 4,9
|
||||
{0xa1, -1, 8, 1, 16, 0, 2, 6, 2}, // (subframe number) 4
|
||||
{0xa1, -1, 4, 0, 528, 0, 1, 6, 2}, // (subframe number) 4,9
|
||||
{0xa1, -1, 4, 1, 528, 0, 1, 6, 2}, // (subframe number) 4,9
|
||||
{0xa1, -1, 4, 0, 16, 0, 2, 6, 2}, // (subframe number) 4
|
||||
{0xa1, -1, 2, 0, 528, 0, 1, 6, 2}, // (subframe number) 4,9
|
||||
{0xa1, -1, 2, 0, 2, 0, 2, 6, 2}, // (subframe number) 1
|
||||
{0xa1, -1, 2, 0, 16, 0, 2, 6, 2}, // (subframe number) 4
|
||||
{0xa1, -1, 2, 0, 128, 0, 2, 6, 2}, // (subframe number) 7
|
||||
{0xa1, -1, 1, 0, 16, 0, 1, 6, 2}, // (subframe number) 4
|
||||
{0xa1, -1, 1, 0, 66, 0, 1, 6, 2}, // (subframe number) 1,6
|
||||
{0xa1, -1, 1, 0, 528, 0, 1, 6, 2}, // (subframe number) 4,9
|
||||
{0xa1, -1, 1, 0, 2, 0, 2, 6, 2}, // (subframe number) 1
|
||||
{0xa1, -1, 1, 0, 128, 0, 2, 6, 2}, // (subframe number) 7
|
||||
{0xa1, -1, 1, 0, 132, 0, 2, 6, 2}, // (subframe number) 2,7
|
||||
{0xa1, -1, 1, 0, 146, 0, 2, 6, 2}, // (subframe number) 1,4,7
|
||||
{0xa1, -1, 1, 0, 341, 0, 2, 6, 2}, // (subframe number) 0,2,4,6,8
|
||||
{0xa1, -1, 1, 0, 1023, 0, 2, 6, 2}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{0xa1, -1, 1, 0, 682, 0, 2, 6, 2}, // (subframe number) 1,3,5,7,9
|
||||
{0xa1, 0xb1, 2, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xa1, 0xb1, 2, 0, 16, 0, 2, 7, 2}, // (subframe number) 4
|
||||
{0xa1, 0xb1, 1, 0, 16, 0, 1, 7, 2}, // (subframe number) 4
|
||||
{0xa1, 0xb1, 1, 0, 66, 0, 1, 7, 2}, // (subframe number) 1,6
|
||||
{0xa1, 0xb1, 1, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xa1, 0xb1, 1, 0, 2, 0, 2, 7, 2}, // (subframe number) 1
|
||||
{0xa1, 0xb1, 1, 0, 128, 0, 2, 7, 2}, // (subframe number) 7
|
||||
{0xa1, 0xb1, 1, 0, 146, 0, 2, 7, 2}, // (subframe number) 1,4,7
|
||||
{0xa1, 0xb1, 1, 0, 341, 0, 2, 7, 2}, // (subframe number) 0,2,4,6,8
|
||||
{0xa2, -1, 16, 1, 580, 0, 1, 3, 4}, // (subframe number) 2,6,9
|
||||
{0xa2, -1, 16, 1, 16, 0, 2, 3, 4}, // (subframe number) 4
|
||||
{0xa2, -1, 8, 1, 580, 0, 1, 3, 4}, // (subframe number) 2,6,9
|
||||
{0xa2, -1, 8, 1, 16, 0, 2, 3, 4}, // (subframe number) 4
|
||||
{0xa2, -1, 4, 0, 580, 0, 1, 3, 4}, // (subframe number) 2,6,9
|
||||
{0xa2, -1, 4, 0, 16, 0, 2, 3, 4}, // (subframe number) 4
|
||||
{0xa2, -1, 2, 1, 580, 0, 1, 3, 4}, // (subframe number) 2,6,9
|
||||
{0xa2, -1, 2, 0, 2, 0, 2, 3, 4}, // (subframe number) 1
|
||||
{0xa2, -1, 2, 0, 16, 0, 2, 3, 4}, // (subframe number) 4
|
||||
{0xa2, -1, 2, 0, 128, 0, 2, 3, 4}, // (subframe number) 7
|
||||
{0xa2, -1, 1, 0, 16, 0, 1, 3, 4}, // (subframe number) 4
|
||||
{0xa2, -1, 1, 0, 66, 0, 1, 3, 4}, // (subframe number) 1,6
|
||||
{0xa2, -1, 1, 0, 528, 0, 1, 3, 4}, // (subframe number) 4,9
|
||||
{0xa2, -1, 1, 0, 2, 0, 2, 3, 4}, // (subframe number) 1
|
||||
{0xa2, -1, 1, 0, 128, 0, 2, 3, 4}, // (subframe number) 7
|
||||
{0xa2, -1, 1, 0, 132, 0, 2, 3, 4}, // (subframe number) 2,7
|
||||
{0xa2, -1, 1, 0, 146, 0, 2, 3, 4}, // (subframe number) 1,4,7
|
||||
{0xa2, -1, 1, 0, 341, 0, 2, 3, 4}, // (subframe number) 0,2,4,6,8
|
||||
{0xa2, -1, 1, 0, 1023, 0, 2, 3, 4}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{0xa2, -1, 1, 0, 682, 0, 2, 3, 4}, // (subframe number) 1,3,5,7,9
|
||||
{0xa2, 0xb2, 2, 1, 580, 0, 1, 3, 4}, // (subframe number) 2,6,9
|
||||
{0xa2, 0xb2, 2, 0, 16, 0, 2, 3, 4}, // (subframe number) 4
|
||||
{0xa2, 0xb2, 1, 0, 16, 0, 1, 3, 4}, // (subframe number) 4
|
||||
{0xa2, 0xb2, 1, 0, 66, 0, 1, 3, 4}, // (subframe number) 1,6
|
||||
{0xa2, 0xb2, 1, 0, 528, 0, 1, 3, 4}, // (subframe number) 4,9
|
||||
{0xa2, 0xb2, 1, 0, 2, 0, 2, 3, 4}, // (subframe number) 1
|
||||
{0xa2, 0xb2, 1, 0, 128, 0, 2, 3, 4}, // (subframe number) 7
|
||||
{0xa2, 0xb2, 1, 0, 146, 0, 2, 3, 4}, // (subframe number) 1,4,7
|
||||
{0xa2, 0xb2, 1, 0, 341, 0, 2, 3, 4}, // (subframe number) 0,2,4,6,8
|
||||
{0xa2, 0xb2, 1, 0, 1023, 0, 2, 3, 4}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{0xa3, -1, 16, 1, 528, 0, 1, 2, 6}, // (subframe number) 4,9
|
||||
{0xa3, -1, 16, 1, 16, 0, 2, 2, 6}, // (subframe number) 4
|
||||
{0xa3, -1, 8, 1, 528, 0, 1, 2, 6}, // (subframe number) 4,9
|
||||
{0xa3, -1, 8, 1, 16, 0, 2, 2, 6}, // (subframe number) 4
|
||||
{0xa3, -1, 4, 0, 528, 0, 1, 2, 6}, // (subframe number) 4,9
|
||||
{0xa3, -1, 4, 0, 16, 0, 2, 2, 6}, // (subframe number) 4
|
||||
{0xa3, -1, 2, 1, 580, 0, 2, 2, 6}, // (subframe number) 2,6,9
|
||||
{0xa3, -1, 2, 0, 2, 0, 2, 2, 6}, // (subframe number) 1
|
||||
{0xa3, -1, 2, 0, 16, 0, 2, 2, 6}, // (subframe number) 4
|
||||
{0xa3, -1, 2, 0, 128, 0, 2, 2, 6}, // (subframe number) 7
|
||||
{0xa3, -1, 1, 0, 16, 0, 1, 2, 6}, // (subframe number) 4
|
||||
{0xa3, -1, 1, 0, 66, 0, 1, 2, 6}, // (subframe number) 1,6
|
||||
{0xa3, -1, 1, 0, 528, 0, 1, 2, 6}, // (subframe number) 4,9
|
||||
{0xa3, -1, 1, 0, 2, 0, 2, 2, 6}, // (subframe number) 1
|
||||
{0xa3, -1, 1, 0, 128, 0, 2, 2, 6}, // (subframe number) 7
|
||||
{0xa3, -1, 1, 0, 132, 0, 2, 2, 6}, // (subframe number) 2,7
|
||||
{0xa3, -1, 1, 0, 146, 0, 2, 2, 6}, // (subframe number) 1,4,7
|
||||
{0xa3, -1, 1, 0, 341, 0, 2, 2, 6}, // (subframe number) 0,2,4,6,8
|
||||
{0xa3, -1, 1, 0, 1023, 0, 2, 2, 6}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{0xa3, -1, 1, 0, 682, 0, 2, 2, 6}, // (subframe number) 1,3,5,7,9
|
||||
{0xa3, 0xb3, 2, 1, 580, 0, 2, 2, 6}, // (subframe number) 2,6,9
|
||||
{0xa3, 0xb3, 2, 0, 16, 0, 2, 2, 6}, // (subframe number) 4
|
||||
{0xa3, 0xb3, 1, 0, 16, 0, 1, 2, 6}, // (subframe number) 4
|
||||
{0xa3, 0xb3, 1, 0, 66, 0, 1, 2, 6}, // (subframe number) 1,6
|
||||
{0xa3, 0xb3, 1, 0, 528, 0, 1, 2, 6}, // (subframe number) 4,9
|
||||
{0xa3, 0xb3, 1, 0, 2, 0, 2, 2, 6}, // (subframe number) 1
|
||||
{0xa3, 0xb3, 1, 0, 128, 0, 2, 2, 6}, // (subframe number) 7
|
||||
{0xa3, 0xb3, 1, 0, 146, 0, 2, 2, 6}, // (subframe number) 1,4,7
|
||||
{0xa3, 0xb3, 1, 0, 341, 0, 2, 2, 6}, // (subframe number) 0,2,4,6,8
|
||||
{0xa3, 0xb3, 1, 0, 1023, 0, 2, 2, 6}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{0xb1, -1, 16, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xb1, -1, 16, 1, 16, 0, 2, 7, 2}, // (subframe number) 4
|
||||
{0xb1, -1, 8, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xb1, -1, 8, 1, 16, 0, 2, 7, 2}, // (subframe number) 4
|
||||
{0xb1, -1, 4, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xb1, -1, 4, 1, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xb1, -1, 4, 0, 16, 0, 2, 7, 2}, // (subframe number) 4
|
||||
{0xb1, -1, 2, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xb1, -1, 2, 0, 2, 0, 2, 7, 2}, // (subframe number) 1
|
||||
{0xb1, -1, 2, 0, 16, 0, 2, 7, 2}, // (subframe number) 4
|
||||
{0xb1, -1, 2, 0, 128, 0, 2, 7, 2}, // (subframe number) 7
|
||||
{0xb1, -1, 1, 0, 16, 0, 1, 7, 2}, // (subframe number) 4
|
||||
{0xb1, -1, 1, 0, 66, 0, 1, 7, 2}, // (subframe number) 1,6
|
||||
{0xb1, -1, 1, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xb1, -1, 1, 0, 2, 0, 2, 7, 2}, // (subframe number) 1
|
||||
{0xb1, -1, 1, 0, 128, 0, 2, 7, 2}, // (subframe number) 7
|
||||
{0xb1, -1, 1, 0, 132, 0, 2, 7, 2}, // (subframe number) 2,7
|
||||
{0xb1, -1, 1, 0, 146, 0, 2, 7, 2}, // (subframe number) 1,4,7
|
||||
{0xb1, -1, 1, 0, 341, 0, 2, 7, 2}, // (subframe number) 0,2,4,6,8
|
||||
{0xb1, -1, 1, 0, 1023, 0, 2, 7, 2}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{0xb1, -1, 1, 0, 682, 0, 2, 7, 2}, // (subframe number) 1,3,5,7,9
|
||||
{0xb4, -1, 16, 0, 528, 0, 2, 1, 12}, // (subframe number) 4,9
|
||||
{0xb4, -1, 16, 1, 16, 0, 2, 1, 12}, // (subframe number) 4
|
||||
{0xb4, -1, 8, 0, 528, 0, 2, 1, 12}, // (subframe number) 4,9
|
||||
{0xb4, -1, 8, 1, 16, 0, 2, 1, 12}, // (subframe number) 4
|
||||
{0xb4, -1, 4, 0, 528, 0, 2, 1, 12}, // (subframe number) 4,9
|
||||
{0xb4, -1, 4, 0, 16, 0, 2, 1, 12}, // (subframe number) 4
|
||||
{0xb4, -1, 4, 1, 528, 0, 2, 1, 12}, // (subframe number) 4,9
|
||||
{0xb4, -1, 2, 0, 528, 0, 2, 1, 12}, // (subframe number) 4,9
|
||||
{0xb4, -1, 2, 0, 2, 0, 2, 1, 12}, // (subframe number) 1
|
||||
{0xb4, -1, 2, 0, 16, 0, 2, 1, 12}, // (subframe number) 4
|
||||
{0xb4, -1, 2, 0, 128, 0, 2, 1, 12}, // (subframe number) 7
|
||||
{0xb4, -1, 1, 0, 2, 0, 2, 1, 12}, // (subframe number) 1
|
||||
{0xb4, -1, 1, 0, 16, 0, 2, 1, 12}, // (subframe number) 4
|
||||
{0xb4, -1, 1, 0, 128, 0, 2, 1, 12}, // (subframe number) 7
|
||||
{0xb4, -1, 1, 0, 66, 0, 2, 1, 12}, // (subframe number) 1,6
|
||||
{0xb4, -1, 1, 0, 132, 0, 2, 1, 12}, // (subframe number) 2,7
|
||||
{0xb4, -1, 1, 0, 528, 0, 2, 1, 12}, // (subframe number) 4,9
|
||||
{0xb4, -1, 1, 0, 146, 0, 2, 1, 12}, // (subframe number) 1,4,7
|
||||
{0xb4, -1, 1, 0, 341, 0, 2, 1, 12}, // (subframe number) 0,2,4,6,8
|
||||
{0xb4, -1, 1, 0, 1023, 0, 2, 1, 12}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{0xb4, -1, 1, 0, 682, 0, 2, 1, 12}, // (subframe number) 1,3,5,7,9
|
||||
{0xc0, -1, 8, 1, 16, 0, 2, 7, 2}, // (subframe number) 4
|
||||
{0xc0, -1, 4, 1, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xc0, -1, 4, 0, 16, 0, 2, 7, 2}, // (subframe number) 4
|
||||
{0xc0, -1, 2, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xc0, -1, 2, 0, 2, 0, 2, 7, 2}, // (subframe number) 1
|
||||
{0xc0, -1, 2, 0, 16, 0, 2, 7, 2}, // (subframe number) 4
|
||||
{0xc0, -1, 2, 0, 128, 0, 2, 7, 2}, // (subframe number) 7
|
||||
{0xc0, -1, 1, 0, 16, 0, 1, 7, 2}, // (subframe number) 4
|
||||
{0xc0, -1, 1, 0, 66, 0, 1, 7, 2}, // (subframe number) 1,6
|
||||
{0xc0, -1, 1, 0, 528, 0, 1, 7, 2}, // (subframe number) 4,9
|
||||
{0xc0, -1, 1, 0, 2, 0, 2, 7, 2}, // (subframe number) 1
|
||||
{0xc0, -1, 1, 0, 128, 0, 2, 7, 2}, // (subframe number) 7
|
||||
{0xc0, -1, 1, 0, 132, 0, 2, 7, 2}, // (subframe number) 2,7
|
||||
{0xc0, -1, 1, 0, 146, 0, 2, 7, 2}, // (subframe number) 1,4,7
|
||||
{0xc0, -1, 1, 0, 341, 0, 2, 7, 2}, // (subframe number) 0,2,4,6,8
|
||||
{0xc0, -1, 1, 0, 1023, 0, 2, 7, 2}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{0xc0, -1, 1, 0, 682, 0, 2, 7, 2}, // (subframe number) 1,3,5,7,9
|
||||
{0xc2, -1, 16, 1, 528, 0, 1, 2, 6}, // (subframe number) 4,9
|
||||
{0xc2, -1, 16, 1, 16, 0, 2, 2, 6}, // (subframe number) 4
|
||||
{0xc2, -1, 8, 1, 528, 0, 1, 2, 6}, // (subframe number) 4,9
|
||||
{0xc2, -1, 8, 1, 16, 0, 2, 2, 6}, // (subframe number) 4
|
||||
{0xc2, -1, 4, 0, 528, 0, 1, 2, 6}, // (subframe number) 4,9
|
||||
{0xc2, -1, 4, 0, 16, 0, 2, 2, 6}, // (subframe number) 4
|
||||
{0xc2, -1, 2, 1, 580, 0, 2, 2, 6}, // (subframe number) 2,6,9
|
||||
{0xc2, -1, 2, 0, 2, 0, 2, 2, 6}, // (subframe number) 1
|
||||
{0xc2, -1, 2, 0, 16, 0, 2, 2, 6}, // (subframe number) 4
|
||||
{0xc2, -1, 2, 0, 128, 0, 2, 2, 6}, // (subframe number) 7
|
||||
{0xc2, -1, 1, 0, 16, 0, 1, 2, 6}, // (subframe number) 4
|
||||
{0xc2, -1, 1, 0, 66, 0, 1, 2, 6}, // (subframe number) 1,6
|
||||
{0xc2, -1, 1, 0, 528, 0, 1, 2, 6}, // (subframe number) 4,9
|
||||
{0xc2, -1, 1, 0, 2, 0, 2, 2, 6}, // (subframe number) 1
|
||||
{0xc2, -1, 1, 0, 128, 0, 2, 2, 6}, // (subframe number) 7
|
||||
{0xc2, -1, 1, 0, 132, 0, 2, 2, 6}, // (subframe number) 2,7
|
||||
{0xc2, -1, 1, 0, 146, 0, 2, 2, 6}, // (subframe number) 1,4,7
|
||||
{0xc2, -1, 1, 0, 341, 0, 2, 2, 6}, // (subframe number) 0,2,4,6,8
|
||||
{0xc2, -1, 1, 0, 1023, 0, 2, 2, 6}, // (subframe number) 0,1,2,3,4,5,6,7,8,9
|
||||
{0xc2, -1, 1, 0, 682, 0, 2, 2, 6} // (subframe number) 1,3,5,7,9
|
||||
};
|
||||
// Table 6.3.3.2-3: Random access configurations for FR1 and unpaired spectrum
|
||||
int64_t table_6_3_3_2_3_prachConfig_Index [256][9] = {
|
||||
//format, format, x, y, SFN_nbr, star_symb, slots_sfn, occ_slot, duration
|
||||
{0, -1, 16, 1, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{0, -1, 8, 1, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{0, -1, 4, 1, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{0, -1, 2, 0, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{0, -1, 2, 1, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{0, -1, 2, 0, 16, 0, -1, -1, 0}, // (subrame number 4)
|
||||
{0, -1, 2, 1, 16, 0, -1, -1, 0}, // (subrame number 4)
|
||||
{0, -1, 1, 0, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{0, -1, 1, 0, 256, 0, -1, -1, 0}, // (subrame number 8)
|
||||
{0, -1, 1, 0, 128, 0, -1, -1, 0}, // (subrame number 7)
|
||||
{0, -1, 1, 0, 64, 0, -1, -1, 0}, // (subrame number 6)
|
||||
{0, -1, 1, 0, 32, 0, -1, -1, 0}, // (subrame number 5)
|
||||
{0, -1, 1, 0, 16, 0, -1, -1, 0}, // (subrame number 4)
|
||||
{0, -1, 1, 0, 8, 0, -1, -1, 0}, // (subrame number 3)
|
||||
{0, -1, 1, 0, 4, 0, -1, -1, 0}, // (subrame number 2)
|
||||
{0, -1, 1, 0, 66, 0, -1, -1, 0}, // (subrame number 1,6)
|
||||
{0, -1, 1, 0, 66, 7, -1, -1, 0}, // (subrame number 1,6)
|
||||
{0, -1, 1, 0, 528, 0, -1, -1, 0}, // (subrame number 4,9)
|
||||
{0, -1, 1, 0, 264, 0, -1, -1, 0}, // (subrame number 3,8)
|
||||
{0, -1, 1, 0, 132, 0, -1, -1, 0}, // (subrame number 2,7)
|
||||
{0, -1, 1, 0, 768, 0, -1, -1, 0}, // (subrame number 8,9)
|
||||
{0, -1, 1, 0, 784, 0, -1, -1, 0}, // (subrame number 4,8,9)
|
||||
{0, -1, 1, 0, 536, 0, -1, -1, 0}, // (subrame number 3,4,9)
|
||||
{0, -1, 1, 0, 896, 0, -1, -1, 0}, // (subrame number 7,8,9)
|
||||
{0, -1, 1, 0, 792, 0, -1, -1, 0}, // (subrame number 3,4,8,9)
|
||||
{0, -1, 1, 0, 960, 0, -1, -1, 0}, // (subrame number 6,7,8,9)
|
||||
{0, -1, 1, 0, 594, 0, -1, -1, 0}, // (subrame number 1,4,6,9)
|
||||
{0, -1, 1, 0, 682, 0, -1, -1, 0}, // (subrame number 1,3,5,7,9)
|
||||
{1, -1, 16, 1, 128, 0, -1, -1, 0}, // (subrame number 7)
|
||||
{1, -1, 8, 1, 128, 0, -1, -1, 0}, // (subrame number 7)
|
||||
{1, -1, 4, 1, 128, 0, -1, -1, 0}, // (subrame number 7)
|
||||
{1, -1, 2, 0, 128, 0, -1, -1, 0}, // (subrame number 7)
|
||||
{1, -1, 2, 1, 128, 0, -1, -1, 0}, // (subrame number 7)
|
||||
{1, -1, 1, 0, 128, 0, -1, -1, 0}, // (subrame number 7)
|
||||
{2, -1, 16, 1, 64, 0, -1, -1, 0}, // (subrame number 6)
|
||||
{2, -1, 8, 1, 64, 0, -1, -1, 0}, // (subrame number 6)
|
||||
{2, -1, 4, 1, 64, 0, -1, -1, 0}, // (subrame number 6)
|
||||
{2, -1, 2, 0, 64, 7, -1, -1, 0}, // (subrame number 6)
|
||||
{2, -1, 2, 1, 64, 7, -1, -1, 0}, // (subrame number 6)
|
||||
{2, -1, 1, 0, 64, 7, -1, -1, 0}, // (subrame number 6)
|
||||
{3, -1, 16, 1, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{3, -1, 8, 1, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{3, -1, 4, 1, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{3, -1, 2, 0, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{3, -1, 2, 1, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{3, -1, 2, 0, 16, 0, -1, -1, 0}, // (subrame number 4)
|
||||
{3, -1, 2, 1, 16, 0, -1, -1, 0}, // (subrame number 4)
|
||||
{3, -1, 1, 0, 512, 0, -1, -1, 0}, // (subrame number 9)
|
||||
{3, -1, 1, 0, 256, 0, -1, -1, 0}, // (subrame number 8)
|
||||
{3, -1, 1, 0, 128, 0, -1, -1, 0}, // (subrame number 7)
|
||||
{3, -1, 1, 0, 64, 0, -1, -1, 0}, // (subrame number 6)
|
||||
{3, -1, 1, 0, 32, 0, -1, -1, 0}, // (subrame number 5)
|
||||
{3, -1, 1, 0, 16, 0, -1, -1, 0}, // (subrame number 4)
|
||||
{3, -1, 1, 0, 8, 0, -1, -1, 0}, // (subrame number 3)
|
||||
{3, -1, 1, 0, 4, 0, -1, -1, 0}, // (subrame number 2)
|
||||
{3, -1, 1, 0, 66, 0, -1, -1, 0}, // (subrame number 1,6)
|
||||
{3, -1, 1, 0, 66, 7, -1, -1, 0}, // (subrame number 1,6)
|
||||
{3, -1, 1, 0, 528, 0, -1, -1, 0}, // (subrame number 4,9)
|
||||
{3, -1, 1, 0, 264, 0, -1, -1, 0}, // (subrame number 3,8)
|
||||
{3, -1, 1, 0, 132, 0, -1, -1, 0}, // (subrame number 2,7)
|
||||
{3, -1, 1, 0, 768, 0, -1, -1, 0}, // (subrame number 8,9)
|
||||
{3, -1, 1, 0, 784, 0, -1, -1, 0}, // (subrame number 4,8,9)
|
||||
{3, -1, 1, 0, 536, 0, -1, -1, 0}, // (subrame number 3,4,9)
|
||||
{3, -1, 1, 0, 896, 0, -1, -1, 0}, // (subrame number 7,8,9)
|
||||
{3, -1, 1, 0, 792, 0, -1, -1, 0}, // (subrame number 3,4,8,9)
|
||||
{3, -1, 1, 0, 594, 0, -1, -1, 0}, // (subrame number 1,4,6,9)
|
||||
{3, -1, 1, 0, 682, 0, -1, -1, 0}, // (subrame number 1,3,5,7,9)
|
||||
{0xa1, -1, 16, 1, 512, 0, 2, 6, 2}, // (subrame number 9)
|
||||
{0xa1, -1, 8, 1, 512, 0, 2, 6, 2}, // (subrame number 9)
|
||||
{0xa1, -1, 4, 1, 512, 0, 1, 6, 2}, // (subrame number 9)
|
||||
{0xa1, -1, 2, 1, 512, 0, 1, 6, 2}, // (subrame number 9)
|
||||
{0xa1, -1, 2, 1, 528, 7, 1, 3, 2}, // (subrame number 4,9)
|
||||
{0xa1, -1, 2, 1, 640, 7, 1, 3, 2}, // (subrame number 7,9)
|
||||
{0xa1, -1, 2, 1, 640, 0, 1, 6, 2}, // (subrame number 7,9)
|
||||
{0xa1, -1, 2, 1, 768, 0, 2, 6, 2}, // (subrame number 8,9)
|
||||
{0xa1, -1, 2, 1, 528, 0, 2, 6, 2}, // (subrame number 4,9)
|
||||
{0xa1, -1, 2, 1, 924, 0, 1, 6, 2}, // (subrame number 2,3,4,7,8,9)
|
||||
{0xa1, -1, 1, 0, 512, 0, 2, 6, 2}, // (subrame number 9)
|
||||
{0xa1, -1, 1, 0, 512, 7, 1, 3, 2}, // (subrame number 9)
|
||||
{0xa1, -1, 1, 0, 512, 0, 1, 6, 2}, // (subrame number 9)
|
||||
{0xa1, -1, 1, 0, 768, 0, 2, 6, 2}, // (subrame number 8,9)
|
||||
{0xa1, -1, 1, 0, 528, 0, 1, 6, 2}, // (subrame number 4,9)
|
||||
{0xa1, -1, 1, 0, 640, 7, 1, 3, 2}, // (subrame number 7,9)
|
||||
{0xa1, -1, 1, 0, 792, 0, 1, 6, 2}, // (subrame number 3,4,8,9)
|
||||
{0xa1, -1, 1, 0, 792, 0, 2, 6, 2}, // (subrame number 3,4,8,9)
|
||||
{0xa1, -1, 1, 0, 682, 0, 1, 6, 2}, // (subrame number 1,3,5,7,9)
|
||||
{0xa1, -1, 1, 0, 1023, 7, 1, 3, 2}, // (subrame number 0,1,2,3,4,5,6,7,8,9)
|
||||
{0xa2, -1, 16, 1, 512, 0, 2, 3, 4}, // (subrame number 9)
|
||||
{0xa2, -1, 8, 1, 512, 0, 2, 3, 4}, // (subrame number 9)
|
||||
{0xa2, -1, 4, 1, 512, 0, 1, 3, 4}, // (subrame number 9)
|
||||
{0xa2, -1, 2, 1, 640, 0, 1, 3, 4}, // (subrame number 7,9)
|
||||
{0xa2, -1, 2, 1, 768, 0, 2, 3, 4}, // (subrame number 8,9)
|
||||
{0xa2, -1, 2, 1, 640, 9, 1, 1, 4}, // (subrame number 7,9)
|
||||
{0xa2, -1, 2, 1, 528, 9, 1, 1, 4}, // (subrame number 4,9)
|
||||
{0xa2, -1, 2, 1, 528, 0, 2, 3, 4}, // (subrame number 4,9)
|
||||
{0xa2, -1, 16, 1, 924, 0, 1, 3, 4}, // (subrame number 2,3,4,7,8,9)
|
||||
{0xa2, -1, 1, 0, 4, 0, 1, 3, 4}, // (subrame number 2)
|
||||
{0xa2, -1, 1, 0, 128, 0, 1, 3, 4}, // (subrame number 7)
|
||||
{0xa2, -1, 2, 1, 512, 0, 1, 3, 4}, // (subrame number 9)
|
||||
{0xa2, -1, 1, 0, 512, 0, 2, 3, 4}, // (subrame number 9)
|
||||
{0xa2, -1, 1, 0, 512, 9, 1, 1, 4}, // (subrame number 9)
|
||||
{0xa2, -1, 1, 0, 512, 0, 1, 3, 4}, // (subrame number 9)
|
||||
{0xa2, -1, 1, 0, 132, 0, 1, 3, 4}, // (subrame number 2,7)
|
||||
{0xa2, -1, 1, 0, 768, 0, 2, 3, 4}, // (subrame number 8,9)
|
||||
{0xa2, -1, 1, 0, 528, 0, 1, 3, 4}, // (subrame number 4,9)
|
||||
{0xa2, -1, 1, 0, 640, 9, 1, 1, 4}, // (subrame number 7,9)
|
||||
{0xa2, -1, 1, 0, 792, 0, 1, 3, 4}, // (subrame number 3,4,8,9)
|
||||
{0xa2, -1, 1, 0, 792, 0, 2, 3, 4}, // (subrame number 3,4,8,9)
|
||||
{0xa2, -1, 1, 0, 682, 0, 1, 3, 4}, // (subrame number 1,3,5,7,9)
|
||||
{0xa2, -1, 1, 0, 1023, 9, 1, 1, 4}, // (subrame number 0,1,2,3,4,5,6,7,8,9)
|
||||
{0xa3, -1, 16, 1, 512, 0, 2, 2, 6}, // (subrame number 9)
|
||||
{0xa3, -1, 8, 1, 512, 0, 2, 2, 6}, // (subrame number 9)
|
||||
{0xa3, -1, 4, 1, 512, 0, 1, 2, 6}, // (subrame number 9)
|
||||
{0xa3, -1, 2, 1, 528, 7, 1, 1, 6}, // (subrame number 4,9)
|
||||
{0xa3, -1, 2, 1, 640, 7, 1, 1, 6}, // (subrame number 7,9)
|
||||
{0xa3, -1, 2, 1, 640, 0, 1, 2, 6}, // (subrame number 7,9)
|
||||
{0xa3, -1, 2, 1, 528, 0, 2, 2, 6}, // (subrame number 4,9)
|
||||
{0xa3, -1, 2, 1, 768, 0, 2, 2, 6}, // (subrame number 8,9)
|
||||
{0xa3, -1, 2, 1, 924, 0, 1, 2, 6}, // (subrame number 2,3,4,7,8,9)
|
||||
{0xa3, -1, 1, 0, 4, 0, 1, 2, 6}, // (subrame number 2)
|
||||
{0xa3, -1, 1, 0, 128, 0, 1, 2, 6}, // (subrame number 7)
|
||||
{0xa3, -1, 2, 1, 512, 0, 1, 2, 6}, // (subrame number 9)
|
||||
{0xa3, -1, 1, 0, 512, 0, 2, 2, 6}, // (subrame number 9)
|
||||
{0xa3, -1, 1, 0, 512, 7, 1, 1, 6}, // (subrame number 9)
|
||||
{0xa3, -1, 1, 0, 512, 0, 1, 2, 6}, // (subrame number 9)
|
||||
{0xa3, -1, 1, 0, 132, 0, 1, 2, 6}, // (subrame number 2,7)
|
||||
{0xa3, -1, 1, 0, 768, 0, 2, 2, 6}, // (subrame number 8,9)
|
||||
{0xa3, -1, 1, 0, 528, 0, 1, 2, 6}, // (subrame number 4,9)
|
||||
{0xa3, -1, 1, 0, 640, 7, 1, 1, 6}, // (subrame number 7,9)
|
||||
{0xa3, -1, 1, 0, 792, 0, 1, 2, 6}, // (subrame number 3,4,8,9)
|
||||
{0xa3, -1, 1, 0, 792, 0, 2, 2, 6}, // (subrame number 3,4,8,9)
|
||||
{0xa3, -1, 1, 0, 682, 0, 1, 2, 6}, // (subrame number 1,3,5,7,9)
|
||||
{0xa3, -1, 1, 0, 1023, 7, 1, 1, 6}, // (subrame number 0,1,2,3,4,5,6,7,8,9)
|
||||
{0xb1, -1, 4, 1, 512, 2, 1, 6, 2}, // (subrame number 9)
|
||||
{0xb1, -1, 2, 1, 512, 2, 1, 6, 2}, // (subrame number 9)
|
||||
{0xb1, -1, 2, 1, 640, 2, 1, 6, 2}, // (subrame number 7,9)
|
||||
{0xb1, -1, 2, 1, 528, 8, 1, 3, 2}, // (subrame number 4,9)
|
||||
{0xb1, -1, 2, 1, 528, 2, 2, 6, 2}, // (subrame number 4,9)
|
||||
{0xb1, -1, 1, 0, 512, 2, 2, 6, 2}, // (subrame number 9)
|
||||
{0xb1, -1, 1, 0, 512, 8, 1, 3, 2}, // (subrame number 9)
|
||||
{0xb1, -1, 1, 0, 512, 2, 1, 6, 2}, // (subrame number 9)
|
||||
{0xb1, -1, 1, 0, 768, 2, 2, 6, 2}, // (subrame number 8,9)
|
||||
{0xb1, -1, 1, 0, 528, 2, 1, 6, 2}, // (subrame number 4,9)
|
||||
{0xb1, -1, 1, 0, 640, 8, 1, 3, 2}, // (subrame number 7,9)
|
||||
{0xb1, -1, 1, 0, 682, 2, 1, 6, 2}, // (subrame number 1,3,5,7,9)
|
||||
{0xb4, -1, 16, 1, 512, 0, 2, 1, 12}, // (subrame number 9)
|
||||
{0xb4, -1, 8, 1, 512, 0, 2, 1, 12}, // (subrame number 9)
|
||||
{0xb4, -1, 4, 1, 512, 2, 1, 1, 12}, // (subrame number 9)
|
||||
{0xb4, -1, 2, 1, 512, 0, 1, 1, 12}, // (subrame number 9)
|
||||
{0xb4, -1, 2, 1, 512, 2, 1, 1, 12}, // (subrame number 9)
|
||||
{0xb4, -1, 2, 1, 640, 2, 1, 1, 12}, // (subrame number 7,9)
|
||||
{0xb4, -1, 2, 1, 528, 2, 1, 1, 12}, // (subrame number 4,9)
|
||||
{0xb4, -1, 2, 1, 528, 0, 2, 1, 12}, // (subrame number 4,9)
|
||||
{0xb4, -1, 2, 1, 768, 0, 2, 1, 12}, // (subrame number 8,9)
|
||||
{0xb4, -1, 2, 1, 924, 0, 1, 1, 12}, // (subrame number 2,3,4,7,8,9)
|
||||
{0xb4, -1, 1, 0, 2, 0, 1, 1, 12}, // (subrame number 1)
|
||||
{0xb4, -1, 1, 0, 4, 0, 1, 1, 12}, // (subrame number 2)
|
||||
{0xb4, -1, 1, 0, 16, 0, 1, 1, 12}, // (subrame number 4)
|
||||
{0xb4, -1, 1, 0, 128, 0, 1, 1, 12}, // (subrame number 7)
|
||||
{0xb4, -1, 1, 0, 512, 0, 1, 1, 12}, // (subrame number 9)
|
||||
{0xb4, -1, 1, 0, 512, 2, 1, 1, 12}, // (subrame number 9)
|
||||
{0xb4, -1, 1, 0, 512, 0, 2, 1, 12}, // (subrame number 9)
|
||||
{0xb4, -1, 1, 0, 528, 2, 1, 1, 12}, // (subrame number 4,9)
|
||||
{0xb4, -1, 1, 0, 640, 2, 1, 1, 12}, // (subrame number 7,9)
|
||||
{0xb4, -1, 1, 0, 768, 0, 2, 1, 12}, // (subrame number 8,9)
|
||||
{0xb4, -1, 1, 0, 792, 2, 1, 1, 12}, // (subrame number 3,4,8,9)
|
||||
{0xb4, -1, 1, 0, 682, 2, 1, 1, 12}, // (subrame number 1,3,5,7,9)
|
||||
{0xb4, -1, 1, 0, 1023, 0, 2, 1, 12}, // (subrame number 0,1,2,3,4,5,6,7,8,9)
|
||||
{0xb4, -1, 1, 0, 1023, 2, 1, 1, 12}, // (subrame number 0,1,2,3,4,5,6,7,8,9)
|
||||
{0xc0, -1, 16, 1, 512, 2, 2, 6, 2}, // (subrame number 9)
|
||||
{0xc0, -1, 8, 1, 512, 2, 2, 6, 2}, // (subrame number 9)
|
||||
{0xc0, -1, 4, 1, 512, 2, 1, 6, 2}, // (subrame number 9)
|
||||
{0xc0, -1, 2, 1, 512, 2, 1, 6, 2}, // (subrame number 9)
|
||||
{0xc0, -1, 2, 1, 768, 2, 2, 6, 2}, // (subrame number 8,9)
|
||||
{0xc0, -1, 2, 1, 640, 2, 1, 6, 2}, // (subrame number 7,9)
|
||||
{0xc0, -1, 2, 1, 640, 8, 1, 3, 2}, // (subrame number 7,9)
|
||||
{0xc0, -1, 2, 1, 528, 8, 1, 3, 2}, // (subrame number 4,9)
|
||||
{0xc0, -1, 2, 1, 528, 2, 2, 6, 2}, // (subrame number 4,9)
|
||||
{0xc0, -1, 2, 1, 924, 2, 1, 6, 2}, // (subrame number 2,3,4,7,8,9)
|
||||
{0xc0, -1, 1, 0, 512, 2, 2, 6, 2}, // (subrame number 9)
|
||||
{0xc0, -1, 1, 0, 512, 8, 1, 3, 2}, // (subrame number 9)
|
||||
{0xc0, -1, 1, 0, 512, 2, 1, 6, 2}, // (subrame number 9)
|
||||
{0xc0, -1, 1, 0, 768, 2, 2, 6, 2}, // (subrame number 8,9)
|
||||
{0xc0, -1, 1, 0, 528, 2, 1, 6, 2}, // (subrame number 4,9)
|
||||
{0xc0, -1, 1, 0, 640, 8, 1, 3, 2}, // (subrame number 7,9)
|
||||
{0xc0, -1, 1, 0, 792, 2, 1, 6, 2}, // (subrame number 3,4,8,9)
|
||||
{0xc0, -1, 1, 0, 792, 2, 2, 6, 2}, // (subrame number 3,4,8,9)
|
||||
{0xc0, -1, 1, 0, 682, 2, 1, 6, 2}, // (subrame number 1,3,5,7,9)
|
||||
{0xc0, -1, 1, 0, 1023, 8, 1, 3, 2}, // (subrame number 0,1,2,3,4,5,6,7,8,9)
|
||||
{0xc2, -1, 16, 1, 512, 2, 2, 2, 6}, // (subrame number 9)
|
||||
{0xc2, -1, 8, 1, 512, 2, 2, 2, 6}, // (subrame number 9)
|
||||
{0xc2, -1, 4, 1, 512, 2, 1, 2, 6}, // (subrame number 9)
|
||||
{0xc2, -1, 2, 1, 512, 2, 1, 2, 6}, // (subrame number 9)
|
||||
{0xc2, -1, 2, 1, 768, 2, 2, 2, 6}, // (subrame number 8,9)
|
||||
{0xc2, -1, 2, 1, 640, 2, 1, 2, 6}, // (subrame number 7,9)
|
||||
{0xc2, -1, 2, 1, 640, 8, 1, 1, 6}, // (subrame number 7,9)
|
||||
{0xc2, -1, 2, 1, 528, 8, 1, 1, 6}, // (subrame number 4,9)
|
||||
{0xc2, -1, 2, 1, 528, 2, 2, 2, 6}, // (subrame number 4,9)
|
||||
{0xc2, -1, 2, 1, 924, 2, 1, 2, 6}, // (subrame number 2,3,4,7,8,9)
|
||||
{0xc2, -1, 8, 1, 512, 8, 2, 1, 6}, // (subrame number 9)
|
||||
{0xc2, -1, 4, 1, 512, 8, 1, 1, 6}, // (subrame number 9)
|
||||
{0xc2, -1, 1, 0, 512, 2, 2, 2, 6}, // (subrame number 9)
|
||||
{0xc2, -1, 1, 0, 512, 8, 1, 1, 6}, // (subrame number 9)
|
||||
{0xc2, -1, 1, 0, 512, 2, 1, 2, 6}, // (subrame number 9)
|
||||
{0xc2, -1, 1, 0, 768, 2, 2, 2, 6}, // (subrame number 8,9)
|
||||
{0xc2, -1, 1, 0, 528, 2, 1, 2, 6}, // (subrame number 4,9)
|
||||
{0xc2, -1, 1, 0, 640, 8, 1, 1, 6}, // (subrame number 7,9)
|
||||
{0xc2, -1, 1, 0, 792, 2, 1, 2, 6}, // (subrame number 3,4,8,9)
|
||||
{0xc2, -1, 1, 0, 792, 2, 2, 2, 6}, // (subrame number 3,4,8,9)
|
||||
{0xc2, -1, 1, 0, 682, 2, 1, 2, 6}, // (subrame number 1,3,5,7,9)
|
||||
{0xc2, -1, 1, 0, 1023, 8, 1, 1, 6}, // (subrame number 0,1,2,3,4,5,6,7,8,9)
|
||||
{0xa1, 0xb1, 2, 1, 512, 2, 1, 6, 2}, // (subrame number 9)
|
||||
{0xa1, 0xb1, 2, 1, 528, 8, 1, 3, 2}, // (subrame number 4,9)
|
||||
{0xa1, 0xb1, 2, 1, 640, 8, 1, 3, 2}, // (subrame number 7,9)
|
||||
{0xa1, 0xb1, 2, 1, 640, 2, 1, 6, 2}, // (subrame number 7,9)
|
||||
{0xa1, 0xb1, 2, 1, 528, 2, 2, 6, 2}, // (subrame number 4,9)
|
||||
{0xa1, 0xb1, 2, 1, 768, 2, 2, 6, 2}, // (subrame number 8,9)
|
||||
{0xa1, 0xb1, 1, 0, 512, 2, 2, 6, 2}, // (subrame number 9)
|
||||
{0xa1, 0xb1, 1, 0, 512, 8, 1, 3, 2}, // (subrame number 9)
|
||||
{0xa1, 0xb1, 1, 0, 512, 2, 1, 6, 2}, // (subrame number 9)
|
||||
{0xa1, 0xb1, 1, 0, 768, 2, 2, 6, 2}, // (subrame number 8,9)
|
||||
{0xa1, 0xb1, 1, 0, 528, 2, 1, 6, 2}, // (subrame number 4,9)
|
||||
{0xa1, 0xb1, 1, 0, 640, 8, 1, 3, 2}, // (subrame number 7,9)
|
||||
{0xa1, 0xb1, 1, 0, 792, 2, 2, 6, 2}, // (subrame number 3,4,8,9)
|
||||
{0xa1, 0xb1, 1, 0, 682, 2, 1, 6, 2}, // (subrame number 1,3,5,7,9)
|
||||
{0xa1, 0xb1, 1, 0, 1023, 8, 1, 3, 2}, // (subrame number 0,1,2,3,4,5,6,7,8,9)
|
||||
{0xa2, 0xb2, 2, 1, 512, 0, 1, 3, 4}, // (subrame number 9)
|
||||
{0xa2, 0xb2, 2, 1, 528, 6, 1, 2, 4}, // (subrame number 4,9)
|
||||
{0xa2, 0xb2, 2, 1, 640, 6, 1, 2, 4}, // (subrame number 7,9)
|
||||
{0xa2, 0xb2, 2, 1, 528, 0, 2, 3, 4}, // (subrame number 4,9)
|
||||
{0xa2, 0xb2, 2, 1, 768, 0, 2, 3, 4}, // (subrame number 8,9)
|
||||
{0xa2, 0xb2, 1, 0, 512, 0, 2, 3, 4}, // (subrame number 9)
|
||||
{0xa2, 0xb2, 1, 0, 512, 6, 1, 2, 4}, // (subrame number 9)
|
||||
{0xa2, 0xb2, 1, 0, 512, 0, 1, 3, 4}, // (subrame number 9)
|
||||
{0xa2, 0xb2, 1, 0, 768, 0, 2, 3, 4}, // (subrame number 8,9)
|
||||
{0xa2, 0xb2, 1, 0, 528, 0, 1, 3, 4}, // (subrame number 4,9)
|
||||
{0xa2, 0xb2, 1, 0, 640, 6, 1, 2, 4}, // (subrame number 7,9)
|
||||
{0xa2, 0xb2, 1, 0, 792, 0, 1, 3, 4}, // (subrame number 3,4,8,9)
|
||||
{0xa2, 0xb2, 1, 0, 792, 0, 2, 3, 4}, // (subrame number 3,4,8,9)
|
||||
{0xa2, 0xb2, 1, 0, 682, 0, 1, 3, 4}, // (subrame number 1,3,5,7,9)
|
||||
{0xa2, 0xb2, 1, 0, 1023, 6, 1, 2, 4}, // (subrame number 0,1,2,3,4,5,6,7,8,9)
|
||||
{0xa3, 0xb3, 2, 1, 512, 0, 1, 2, 6}, // (subrame number 9)
|
||||
{0xa3, 0xb3, 2, 1, 528, 2, 1, 2, 6}, // (subrame number 4,9)
|
||||
{0xa3, 0xb3, 2, 1, 640, 0, 1, 2, 6}, // (subrame number 7,9)
|
||||
{0xa3, 0xb3, 2, 1, 640, 2, 1, 2, 6}, // (subrame number 7,9)
|
||||
{0xa3, 0xb3, 2, 1, 528, 0, 2, 2, 6}, // (subrame number 4,9)
|
||||
{0xa3, 0xb3, 2, 1, 768, 0, 2, 2, 6}, // (subrame number 8,9)
|
||||
{0xa3, 0xb3, 1, 0, 512, 0, 2, 2, 6}, // (subrame number 9)
|
||||
{0xa3, 0xb3, 1, 0, 512, 2, 1, 2, 6}, // (subrame number 9)
|
||||
{0xa3, 0xb3, 1, 0, 512, 0, 1, 2, 6}, // (subrame number 9)
|
||||
{0xa3, 0xb3, 1, 0, 768, 0, 2, 2, 6}, // (subrame number 8,9)
|
||||
{0xa3, 0xb3, 1, 0, 528, 0, 1, 2, 6}, // (subrame number 4,9)
|
||||
{0xa3, 0xb3, 1, 0, 640, 2, 1, 2, 6}, // (subrame number 7,9)
|
||||
{0xa3, 0xb3, 1, 0, 792, 0, 2, 2, 6}, // (subrame number 3,4,8,9)
|
||||
{0xa3, 0xb3, 1, 0, 682, 0, 1, 2, 6}, // (subrame number 1,3,5,7,9)
|
||||
{0xa3, 0xb3, 1, 0, 1023, 2, 1, 2, 6} // (subrame number 0,1,2,3,4,5,6,7,8,9)
|
||||
};
|
||||
// Table 6.3.3.2-4: Random access configurations for FR2 and unpaired spectrum
|
||||
int64_t table_6_3_3_2_4_prachConfig_Index [256][10] = {
|
||||
//format, format, x, y, y, SFN_nbr, star_symb, slots_sfn, occ_slot, duration
|
||||
{0xa1, -1, 16, 1, -1, 567489872400, 0, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, -1, 16, 1, -1, 586406201480, 0, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa1, -1, 8, 1, 2, 550293209600, 0, 2, 6, 2}, // (subframe number :9,19,29,39)
|
||||
{0xa1, -1, 8, 1, -1, 567489872400, 0, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, -1, 8, 1, -1, 586406201480, 0, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa1, -1, 4, 1, -1, 567489872400, 0, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, -1, 4, 1, -1, 567489872400, 0, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, -1, 4, 1, -1, 586406201480, 0, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa1, -1, 2, 1, -1, 551911719040, 0, 2, 6, 2}, // (subframe number :7,15,23,31,39)
|
||||
{0xa1, -1, 2, 1, -1, 567489872400, 0, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, -1, 2, 1, -1, 567489872400, 0, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, -1, 2, 1, -1, 586406201480, 0, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa1, -1, 1, 0, -1, 549756338176, 7, 1, 3, 2}, // (subframe number :19,39)
|
||||
{0xa1, -1, 1, 0, -1, 168, 0, 1, 6, 2}, // (subframe number :3,5,7)
|
||||
{0xa1, -1, 1, 0, -1, 567489331200, 7, 1, 3, 2}, // (subframe number :24,29,34,39)
|
||||
{0xa1, -1, 1, 0, -1, 550293209600, 7, 2, 3, 2}, // (subframe number :9,19,29,39)
|
||||
{0xa1, -1, 1, 0, -1, 687195422720, 0, 1, 6, 2}, // (subframe number :17,19,37,39)
|
||||
{0xa1, -1, 1, 0, -1, 550293209600, 0, 2, 6, 2}, // (subframe number :9,19,29,39)
|
||||
{0xa1, -1, 1, 0, -1, 567489872400, 0, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, -1, 1, 0, -1, 567489872400, 7, 1, 3, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, -1, 1, 0, -1, 10920, 7, 1, 3, 2}, // (subframe number :3,5,7,9,11,13)
|
||||
{0xa1, -1, 1, 0, -1, 586405642240, 7, 1, 3, 2}, // (subframe number :23,27,31,35,39)
|
||||
{0xa1, -1, 1, 0, -1, 551911719040, 0, 1, 6, 2}, // (subframe number :7,15,23,31,39)
|
||||
{0xa1, -1, 1, 0, -1, 586405642240, 0, 1, 6, 2}, // (subframe number :23,27,31,35,39)
|
||||
{0xa1, -1, 1, 0, -1, 965830828032, 7, 2, 3, 2}, // (subframe number :13,14,15, 29,30,31,37,38,39)
|
||||
{0xa1, -1, 1, 0, -1, 586406201480, 7, 1, 3, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa1, -1, 1, 0, -1, 586406201480, 0, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa1, -1, 1, 0, -1, 733007751850, 0, 1, 6, 2}, // (subframe number :1,3,5,7,…,37,39)
|
||||
{0xa1, -1, 1, 0, -1, 1099511627775, 7, 1, 3, 2}, // (subframe number :0,1,2,…,39)
|
||||
{0xa2, -1, 16, 1, -1, 567489872400, 0, 2, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, -1, 16, 1, -1, 586406201480, 0, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa2, -1, 8, 1, -1, 567489872400, 0, 2, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, -1, 8, 1, -1, 586406201480, 0, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa2, -1, 8, 1, 2, 550293209600, 0, 2, 3, 4}, // (subframe number :9,19,29,39)
|
||||
{0xa2, -1, 4, 1, -1, 567489872400, 0, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, -1, 4, 1, -1, 567489872400, 0, 2, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, -1, 4, 1, -1, 586406201480, 0, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa2, -1, 2, 1, -1, 551911719040, 0, 2, 3, 4}, // (subframe number :7,15,23,31,39)
|
||||
{0xa2, -1, 2, 1, -1, 567489872400, 0, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, -1, 2, 1, -1, 567489872400, 0, 2, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, -1, 2, 1, -1, 586406201480, 0, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa2, -1, 1, 0, -1, 549756338176, 5, 1, 2, 4}, // (subframe number :19,39)
|
||||
{0xa2, -1, 1, 0, -1, 168, 0, 1, 3, 4}, // (subframe number :3,5,7)
|
||||
{0xa2, -1, 1, 0, -1, 567489331200, 5, 1, 2, 4}, // (subframe number :24,29,34,39)
|
||||
{0xa2, -1, 1, 0, -1, 550293209600, 5, 2, 2, 4}, // (subframe number :9,19,29,39)
|
||||
{0xa2, -1, 1, 0, -1, 687195422720, 0, 1, 3, 4}, // (subframe number :17,19,37,39)
|
||||
{0xa2, -1, 1, 0, -1, 550293209600, 0, 2, 3, 4}, // (subframe number :9, 19, 29, 39)
|
||||
{0xa2, -1, 1, 0, -1, 551911719040, 0, 1, 3, 4}, // (subframe number :7,15,23,31,39)
|
||||
{0xa2, -1, 1, 0, -1, 586405642240, 5, 1, 2, 4}, // (subframe number :23,27,31,35,39)
|
||||
{0xa2, -1, 1, 0, -1, 586405642240, 0, 1, 3, 4}, // (subframe number :23,27,31,35,39)
|
||||
{0xa2, -1, 1, 0, -1, 10920, 5, 1, 2, 4}, // (subframe number :3,5,7,9,11,13)
|
||||
{0xa2, -1, 1, 0, -1, 10920, 0, 1, 3, 4}, // (subframe number :3,5,7,9,11,13)
|
||||
{0xa2, -1, 1, 0, -1, 567489872400, 5, 1, 2, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, -1, 1, 0, -1, 567489872400, 0, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, -1, 1, 0, -1, 965830828032, 5, 2, 2, 4}, // (subframe number :13,14,15, 29,30,31,37,38,39)
|
||||
{0xa2, -1, 1, 0, -1, 586406201480, 5, 1, 2, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa2, -1, 1, 0, -1, 586406201480, 0, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa2, -1, 1, 0, -1, 733007751850, 0, 1, 3, 4}, // (subframe number :1,3,5,7,…,37,39)
|
||||
{0xa2, -1, 1, 0, -1, 1099511627775, 5, 1, 2, 4}, // (subframe number :0,1,2,…,39)
|
||||
{0xa3, -1, 16, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, -1, 16, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa3, -1, 8, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, -1, 8, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa3, -1, 8, 1, 2, 550293209600, 0, 2, 2, 6}, // (subframe number :9,19,29,39)
|
||||
{0xa3, -1, 4, 1, -1, 567489872400, 0, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, -1, 4, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, -1, 4, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa3, -1, 2, 1, -1, 567489872400, 0, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, -1, 2, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, -1, 2, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa3, -1, 1, 0, -1, 549756338176, 7, 1, 1, 6}, // (subframe number :19,39)
|
||||
{0xa3, -1, 1, 0, -1, 168, 0, 1, 2, 6}, // (subframe number :3,5,7)
|
||||
{0xa3, -1, 1, 0, -1, 10752, 2, 1, 2, 6}, // (subframe number :9,11,13)
|
||||
{0xa3, -1, 1, 0, -1, 567489331200, 7, 1, 1, 6}, // (subframe number :24,29,34,39)
|
||||
{0xa3, -1, 1, 0, -1, 550293209600, 7, 2, 1, 6}, // (subframe number :9,19,29,39)
|
||||
{0xa3, -1, 1, 0, -1, 687195422720, 0, 1, 2, 6}, // (subframe number :17,19,37,39)
|
||||
{0xa3, -1, 1, 0, -1, 550293209600, 0, 2, 2, 6}, // (subframe number :9,19,29,39)
|
||||
{0xa3, -1, 1, 0, -1, 551911719040, 0, 1, 2, 6}, // (subframe number :7,15,23,31,39)
|
||||
{0xa3, -1, 1, 0, -1, 586405642240, 7, 1, 1, 6}, // (subframe number :23,27,31,35,39)
|
||||
{0xa3, -1, 1, 0, -1, 586405642240, 0, 1, 2, 6}, // (subframe number :23,27,31,35,39)
|
||||
{0xa3, -1, 1, 0, -1, 10920, 0, 1, 2, 6}, // (subframe number :3,5,7,9,11,13)
|
||||
{0xa3, -1, 1, 0, -1, 10920, 7, 1, 1, 6}, // (subframe number :3,5,7,9,11,13)
|
||||
{0xa3, -1, 1, 0, -1, 567489872400, 0, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, -1, 1, 0, -1, 567489872400, 7, 1, 1, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, -1, 1, 0, -1, 965830828032, 7, 2, 1, 6}, // (subframe number :13,14,15, 29,30,31,37,38,39)
|
||||
{0xa3, -1, 1, 0, -1, 586406201480, 7, 1, 1, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa3, -1, 1, 0, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa3, -1, 1, 0, -1, 733007751850, 0, 1, 2, 6}, // (subframe number :1,3,5,7,…,37,39)
|
||||
{0xa3, -1, 1, 0, -1, 1099511627775, 7, 1, 1, 6}, // (subframe number :0,1,2,…,39)
|
||||
{0xb1, -1, 16, 1, -1, 567489872400, 2, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb1, -1, 8, 1, -1, 567489872400, 2, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb1, -1, 8, 1, 2, 550293209600, 2, 2, 6, 2}, // (subframe number :9,19,29,39)
|
||||
{0xb1, -1, 4, 1, -1, 567489872400, 2, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb1, -1, 2, 1, -1, 567489872400, 2, 2, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb1, -1, 2, 1, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xb1, -1, 1, 0, -1, 549756338176, 8, 1, 3, 2}, // (subframe number :19,39)
|
||||
{0xb1, -1, 1, 0, -1, 168, 2, 1, 6, 2}, // (subframe number :3,5,7)
|
||||
{0xb1, -1, 1, 0, -1, 567489331200, 8, 1, 3, 2}, // (subframe number :24,29,34,39)
|
||||
{0xb1, -1, 1, 0, -1, 550293209600, 8, 2, 3, 2}, // (subframe number :9,19,29,39)
|
||||
{0xb1, -1, 1, 0, -1, 687195422720, 2, 1, 6, 2}, // (subframe number :17,19,37,39)
|
||||
{0xb1, -1, 1, 0, -1, 550293209600, 2, 2, 6, 2}, // (subframe number :9,19,29,39)
|
||||
{0xb1, -1, 1, 0, -1, 551911719040, 2, 1, 6, 2}, // (subframe number :7,15,23,31,39)
|
||||
{0xb1, -1, 1, 0, -1, 586405642240, 8, 1, 3, 2}, // (subframe number :23,27,31,35,39)
|
||||
{0xb1, -1, 1, 0, -1, 586405642240, 2, 1, 6, 2}, // (subframe number :23,27,31,35,39)
|
||||
{0xb1, -1, 1, 0, -1, 10920, 8, 1, 3, 2}, // (subframe number :3,5,7,9,11,13)
|
||||
{0xb1, -1, 1, 0, -1, 567489872400, 8, 1, 3, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb1, -1, 1, 0, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb1, -1, 1, 0, -1, 586406201480, 8, 1, 3, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xb1, -1, 1, 0, -1, 965830828032, 8, 2, 3, 2}, // (subframe number :13,14,15, 29,30,31,37,38,39)
|
||||
{0xb1, -1, 1, 0, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xb1, -1, 1, 0, -1, 733007751850, 2, 1, 6, 2}, // (subframe number :1,3,5,7,…,37,39)
|
||||
{0xb1, -1, 1, 0, -1, 1099511627775, 8, 1, 3, 2}, // (subframe number :0,1,2,…,39)
|
||||
{0xb4, -1, 16, 1, 2, 567489872400, 0, 2, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb4, -1, 16, 1, 2, 586406201480, 0, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xb4, -1, 8, 1, 2, 567489872400, 0, 2, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb4, -1, 8, 1, 2, 586406201480, 0, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xb4, -1, 8, 1, 2, 550293209600, 0, 2, 1, 12}, // (subframe number :9,19,29,39)
|
||||
{0xb4, -1, 4, 1, -1, 567489872400, 0, 1, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb4, -1, 4, 1, -1, 567489872400, 0, 2, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb4, -1, 4, 1, 2, 586406201480, 0, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xb4, -1, 2, 1, -1, 551911719040, 2, 2, 1, 12}, // (subframe number :7,15,23,31,39)
|
||||
{0xb4, -1, 2, 1, -1, 567489872400, 0, 1, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb4, -1, 2, 1, -1, 567489872400, 0, 2, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb4, -1, 2, 1, -1, 586406201480, 0, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xb4, -1, 1, 0, -1, 549756338176, 2, 2, 1, 12}, // (subframe number :19, 39)
|
||||
{0xb4, -1, 1, 0, -1, 687195422720, 0, 1, 1, 12}, // (subframe number :17, 19, 37, 39)
|
||||
{0xb4, -1, 1, 0, -1, 567489331200, 2, 1, 1, 12}, // (subframe number :24,29,34,39)
|
||||
{0xb4, -1, 1, 0, -1, 550293209600, 2, 2, 1, 12}, // (subframe number :9,19,29,39)
|
||||
{0xb4, -1, 1, 0, -1, 550293209600, 0, 2, 1, 12}, // (subframe number :9,19,29,39)
|
||||
{0xb4, -1, 1, 0, -1, 551911719040, 0, 1, 1, 12}, // (subframe number :7,15,23,31,39)
|
||||
{0xb4, -1, 1, 0, -1, 551911719040, 0, 2, 1, 12}, // (subframe number :7,15,23,31,39)
|
||||
{0xb4, -1, 1, 0, -1, 586405642240, 0, 1, 1, 12}, // (subframe number :23,27,31,35,39)
|
||||
{0xb4, -1, 1, 0, -1, 586405642240, 2, 2, 1, 12}, // (subframe number :23,27,31,35,39)
|
||||
{0xb4, -1, 1, 0, -1, 698880, 0, 1, 1, 12}, // (subframe number :9,11,13,15,17,19)
|
||||
{0xb4, -1, 1, 0, -1, 10920, 2, 1, 1, 12}, // (subframe number :3,5,7,9,11,13)
|
||||
{0xb4, -1, 1, 0, -1, 567489872400, 0, 1, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb4, -1, 1, 0, -1, 567489872400, 2, 2, 1, 12}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xb4, -1, 1, 0, -1, 965830828032, 2, 2, 1, 12}, // (subframe number :13,14,15, 29,30,31,37,38,39)
|
||||
{0xb4, -1, 1, 0, -1, 586406201480, 0, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xb4, -1, 1, 0, -1, 586406201480, 2, 1, 1, 12}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xb4, -1, 1, 0, -1, 44739240, 2, 1, 1, 12}, // (subframe number :3, 5, 7, …, 23,25)
|
||||
{0xb4, -1, 1, 0, -1, 44739240, 0, 2, 1, 12}, // (subframe number :3, 5, 7, …, 23,25)
|
||||
{0xb4, -1, 1, 0, -1, 733007751850, 0, 1, 1, 12}, // (subframe number :1,3,5,7,…,37,39)
|
||||
{0xb4, -1, 1, 0, -1, 1099511627775, 2, 1, 1, 12}, // (subframe number :0, 1, 2,…, 39)
|
||||
{0xc0, -1, 16, 1, -1, 567489872400, 0, 2, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc0, -1, 16, 1, -1, 586406201480, 0, 1, 7, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc0, -1, 8, 1, -1, 567489872400, 0, 1, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc0, -1, 8, 1, -1, 586406201480, 0, 1, 7, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc0, -1, 8, 1, 2, 550293209600, 0, 2, 7, 2}, // (subframe number :9,19,29,39)
|
||||
{0xc0, -1, 4, 1, -1, 567489872400, 0, 1, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc0, -1, 4, 1, -1, 567489872400, 0, 2, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc0, -1, 4, 1, -1, 586406201480, 0, 1, 7, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc0, -1, 2, 1, -1, 551911719040, 0, 2, 7, 2}, // (subframe number :7,15,23,31,39)
|
||||
{0xc0, -1, 2, 1, -1, 567489872400, 0, 1, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc0, -1, 2, 1, -1, 567489872400, 0, 2, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc0, -1, 2, 1, -1, 586406201480, 0, 1, 7, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc0, -1, 1, 0, -1, 549756338176, 8, 1, 3, 2}, // (subframe number :19,39)
|
||||
{0xc0, -1, 1, 0, -1, 168, 0, 1, 7, 2}, // (subframe number :3,5,7)
|
||||
{0xc0, -1, 1, 0, -1, 567489331200, 8, 1, 3, 2}, // (subframe number :24,29,34,39)
|
||||
{0xc0, -1, 1, 0, -1, 550293209600, 8, 2, 3, 2}, // (subframe number :9,19,29,39)
|
||||
{0xc0, -1, 1, 0, -1, 687195422720, 0, 1, 7, 2}, // (subframe number :17,19,37,39)
|
||||
{0xc0, -1, 1, 0, -1, 550293209600, 0, 2, 7, 2}, // (subframe number :9,19,29,39)
|
||||
{0xc0, -1, 1, 0, -1, 586405642240, 8, 1, 3, 2}, // (subframe number :23,27,31,35,39)
|
||||
{0xc0, -1, 1, 0, -1, 551911719040, 0, 1, 7, 2}, // (subframe number :7,15,23,31,39)
|
||||
{0xc0, -1, 1, 0, -1, 586405642240, 0, 1, 7, 2}, // (subframe number :23,27,31,35,39)
|
||||
{0xc0, -1, 1, 0, -1, 10920, 8, 1, 3, 2}, // (subframe number :3,5,7,9,11,13)
|
||||
{0xc0, -1, 1, 0, -1, 567489872400, 8, 1, 3, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc0, -1, 1, 0, -1, 567489872400, 0, 1, 7, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc0, -1, 1, 0, -1, 965830828032, 8, 2, 3, 2}, // (subframe number :13,14,15, 29,30,31,37,38,39)
|
||||
{0xc0, -1, 1, 0, -1, 586406201480, 8, 1, 3, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc0, -1, 1, 0, -1, 586406201480, 0, 1, 7, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc0, -1, 1, 0, -1, 733007751850, 0, 1, 7, 2}, // (subframe number :1,3,5,7,…,37,39)
|
||||
{0xc0, -1, 1, 0, -1, 1099511627775, 8, 1, 3, 2}, // (subframe number :0,1,2,…,39)
|
||||
{0xc2, -1, 16, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc2, -1, 16, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc2, -1, 8, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc2, -1, 8, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc2, -1, 8, 1, 2, 550293209600, 0, 2, 2, 6}, // (subframe number :9,19,29,39)
|
||||
{0xc2, -1, 4, 1, -1, 567489872400, 0, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc2, -1, 4, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc2, -1, 4, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc2, -1, 2, 1, -1, 551911719040, 2, 2, 2, 6}, // (subframe number :7,15,23,31,39)
|
||||
{0xc2, -1, 2, 1, -1, 567489872400, 0, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc2, -1, 2, 1, -1, 567489872400, 0, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc2, -1, 2, 1, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc2, -1, 1, 0, -1, 549756338176, 2, 1, 2, 6}, // (subframe number :19,39)
|
||||
{0xc2, -1, 1, 0, -1, 168, 0, 1, 2, 6}, // (subframe number :3,5,7)
|
||||
{0xc2, -1, 1, 0, -1, 567489331200, 7, 1, 1, 6}, // (subframe number :24,29,34,39)
|
||||
{0xc2, -1, 1, 0, -1, 550293209600, 7, 2, 1, 6}, // (subframe number :9,19,29,39)
|
||||
{0xc2, -1, 1, 0, -1, 687195422720, 0, 1, 2, 6}, // (subframe number :17,19,37,39)
|
||||
{0xc2, -1, 1, 0, -1, 550293209600, 2, 2, 2, 6}, // (subframe number :9,19,29,39)
|
||||
{0xc2, -1, 1, 0, -1, 551911719040, 2, 1, 2, 6}, // (subframe number :7,15,23,31,39)
|
||||
{0xc2, -1, 1, 0, -1, 10920, 7, 1, 1, 6}, // (subframe number :3,5,7,9,11,13)
|
||||
{0xc2, -1, 1, 0, -1, 586405642240, 7, 2, 1, 6}, // (subframe number :23,27,31,35,39)
|
||||
{0xc2, -1, 1, 0, -1, 586405642240, 0, 1, 2, 6}, // (subframe number :23,27,31,35,39)
|
||||
{0xc2, -1, 1, 0, -1, 567489872400, 7, 2, 1, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc2, -1, 1, 0, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xc2, -1, 1, 0, -1, 965830828032, 7, 2, 1, 6}, // (subframe number :13,14,15, 29,30,31,37,38,39)
|
||||
{0xc2, -1, 1, 0, -1, 586406201480, 7, 1, 1, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc2, -1, 1, 0, -1, 586406201480, 0, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xc2, -1, 1, 0, -1, 733007751850, 0, 1, 2, 6}, // (subframe number :1,3,5,7,…,37,39)
|
||||
{0xc2, -1, 1, 0, -1, 1099511627775, 7, 1, 1, 6}, // (subframe number :0,1,2,…,39)
|
||||
{0xa1, 0xb1, 16, 1, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, 0xb1, 16, 1, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa1, 0xb1, 8, 1, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, 0xb1, 8, 1, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa1, 0xb1, 4, 1, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, 0xb1, 4, 1, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa1, 0xb1, 2, 1, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 549756338176, 8, 1, 3, 2}, // (subframe number :19,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 550293209600, 8, 1, 3, 2}, // (subframe number :9,19,29,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 687195422720, 2, 1, 6, 2}, // (subframe number :17,19,37,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 550293209600, 2, 2, 6, 2}, // (subframe number :9,19,29,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 586405642240, 8, 1, 3, 2}, // (subframe number :23,27,31,35,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 551911719040, 2, 1, 6, 2}, // (subframe number :7,15,23,31,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 586405642240, 2, 1, 6, 2}, // (subframe number :23,27,31,35,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 567489872400, 8, 1, 3, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 567489872400, 2, 1, 6, 2}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 586406201480, 2, 1, 6, 2}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa1, 0xb1, 1, 0, -1, 733007751850, 2, 1, 6, 2}, // (subframe number :1,3,5,7,…,37,39)
|
||||
{0xa2, 0xb2, 16, 1, -1, 567489872400, 2, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, 0xb2, 16, 1, -1, 586406201480, 2, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa2, 0xb2, 8, 1, -1, 567489872400, 2, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, 0xb2, 8, 1, -1, 586406201480, 2, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa2, 0xb2, 4, 1, -1, 567489872400, 2, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, 0xb2, 4, 1, -1, 586406201480, 2, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa2, 0xb2, 2, 1, -1, 567489872400, 2, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 549756338176, 6, 1, 2, 4}, // (subframe number :19,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 550293209600, 6, 1, 2, 4}, // (subframe number :9,19,29,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 687195422720, 2, 1, 3, 4}, // (subframe number :17,19,37,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 550293209600, 2, 2, 3, 4}, // (subframe number :9,19,29,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 586405642240, 6, 1, 2, 4}, // (subframe number :23,27,31,35,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 551911719040, 2, 1, 3, 4}, // (subframe number :7,15,23,31,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 586405642240, 2, 1, 3, 4}, // (subframe number :23,27,31,35,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 567489872400, 6, 1, 2, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 567489872400, 2, 1, 3, 4}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 586406201480, 2, 1, 3, 4}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa2, 0xb2, 1, 0, -1, 733007751850, 2, 1, 3, 4}, // (subframe number :1,3,5,7,…,37,39)
|
||||
{0xa3, 0xb3, 16, 1, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, 0xb3, 16, 1, -1, 586406201480, 2, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa3, 0xb3, 8, 1, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, 0xb3, 8, 1, -1, 586406201480, 2, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa3, 0xb3, 4, 1, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, 0xb3, 4, 1, -1, 586406201480, 2, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa3, 0xb3, 2, 1, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 549756338176, 2, 1, 2, 6}, // (subframe number :19,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 550293209600, 2, 1, 2, 6}, // (subframe number :9,19,29,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 687195422720, 2, 1, 2, 6}, // (subframe number :17,19,37,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 550293209600, 2, 2, 2, 6}, // (subframe number :9,19,29,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 551911719040, 2, 1, 2, 6}, // (subframe number :7,15,23,31,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 586405642240, 2, 1, 2, 6}, // (subframe number :23,27,31,35,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 586405642240, 2, 2, 2, 6}, // (subframe number :23,27,31,35,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 567489872400, 2, 1, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 567489872400, 2, 2, 2, 6}, // (subframe number :4,9,14,19,24,29,34,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 586406201480, 2, 1, 2, 6}, // (subframe number :3,7,11,15,19,23,27,31,35,39)
|
||||
{0xa3, 0xb3, 1, 0, -1, 733007751850, 2, 1, 2, 6} // (subframe number :1,3,5,7,…,37,39)
|
||||
};
|
||||
|
||||
@@ -34,15 +34,15 @@
|
||||
#include "PHY/impl_defs_nr.h"
|
||||
#include "PHY/defs_nr_UE.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_prach.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto_common.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h"
|
||||
#include "T.h"
|
||||
|
||||
void init_nr_prach_tables(int N_ZC);
|
||||
|
||||
void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
|
||||
|
||||
/*void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
|
||||
|
||||
FILE *fd;
|
||||
|
||||
@@ -76,23 +76,13 @@ void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
|
||||
fprintf(fd,"prach_config: n_ra_prboffset = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.msg1_frequencystart);
|
||||
fclose(fd);
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
// This function computes the du
|
||||
void nr_fill_du(uint8_t prach_fmt)
|
||||
void nr_fill_du(uint16_t N_ZC,uint16_t *prach_root_sequence_map)
|
||||
{
|
||||
|
||||
uint16_t iu,u,p;
|
||||
uint16_t N_ZC;
|
||||
uint16_t *prach_root_sequence_map;
|
||||
|
||||
if (prach_fmt<4) {
|
||||
N_ZC = 839;
|
||||
prach_root_sequence_map = prach_root_sequence_map_0_3;
|
||||
} else {
|
||||
N_ZC = 139;
|
||||
prach_root_sequence_map = prach_root_sequence_map_abc;
|
||||
}
|
||||
|
||||
for (iu=0; iu<(N_ZC-1); iu++) {
|
||||
|
||||
@@ -107,214 +97,49 @@ void nr_fill_du(uint8_t prach_fmt)
|
||||
|
||||
}
|
||||
|
||||
int is_nr_prach_subframe(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t subframe) {
|
||||
|
||||
uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
|
||||
/*
|
||||
// For FR1 paired
|
||||
if (((frame%table_6_3_3_2_2_prachConfig_Index[prach_ConfigIndex][2]) == table_6_3_3_2_2_prachConfig_Index[prach_ConfigIndex][3]) &&
|
||||
((table_6_3_3_2_2_prachConfig_Index[prach_ConfigIndex][4]&(1<<subframe)) == 1)) {
|
||||
// using table 6.3.3.2-2: Random access configurations for FR1 and paired spectrum/supplementary uplink
|
||||
return(1);
|
||||
} else {
|
||||
return(0);
|
||||
}
|
||||
*/
|
||||
// For FR1 unpaired
|
||||
if (((frame%table_6_3_3_2_3_prachConfig_Index[prach_ConfigIndex][2]) == table_6_3_3_2_3_prachConfig_Index[prach_ConfigIndex][3]) &&
|
||||
((table_6_3_3_2_3_prachConfig_Index[prach_ConfigIndex][4]&(1<<subframe)) == 1)) {
|
||||
// using table 6.3.3.2-2: Random access configurations for FR1 and unpaired
|
||||
return(1);
|
||||
} else {
|
||||
return(0);
|
||||
}
|
||||
/*
|
||||
// For FR2: FIXME
|
||||
if ((((frame%table_6_3_3_2_4_prachConfig_Index[prach_ConfigIndex][2]) == table_6_3_3_2_4_prachConfig_Index[prach_ConfigIndex][3]) ||
|
||||
((frame%table_6_3_3_2_4_prachConfig_Index[prach_ConfigIndex][2]) == table_6_3_3_2_4_prachConfig_Index[prach_ConfigIndex][4]))
|
||||
&&
|
||||
((table_6_3_3_2_4_prachConfig_Index[prach_ConfigIndex][5]&(1<<subframe)) == 1)) {
|
||||
// using table 6.3.3.2-2: Random access configurations for FR1 and unpaired
|
||||
return(1);
|
||||
} else {
|
||||
return(0);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
int do_prach_rx(NR_DL_FRAME_PARMS *fp,int frame,int slot) {
|
||||
|
||||
int subframe = slot / fp->slots_per_subframe;
|
||||
// when were in the last slot of the subframe and this is a PRACH subframe ,return 1
|
||||
if (((slot%fp->slots_per_subframe) == fp->slots_per_subframe-1)&&
|
||||
(is_nr_prach_subframe(fp,frame,subframe))) return (1);
|
||||
else return(0);
|
||||
}
|
||||
|
||||
uint16_t get_nr_prach_fmt(int prach_ConfigIndex,lte_frame_type_t frame_type, nr_frequency_range_e fr)
|
||||
{
|
||||
|
||||
if (frame_type==FDD) return (table_6_3_3_2_2_prachConfig_Index[prach_ConfigIndex][0]); // if using table 6.3.3.2-2: Random access configurations for FR1 and paired spectrum/supplementary uplink
|
||||
else if (fr==nr_FR1) return (table_6_3_3_2_3_prachConfig_Index[prach_ConfigIndex][0]); // if using table 6.3.3.2-3: Random access configurations for FR1 and unpaired spectrum
|
||||
else AssertFatal(1==0,"FR2 prach configuration not supported yet\n");
|
||||
// For FR2 not implemented. FIXME
|
||||
}
|
||||
|
||||
void compute_nr_prach_seq(uint16_t rootSequenceIndex,
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t zeroCorrelationZoneConfig,
|
||||
uint8_t highSpeedFlag,
|
||||
lte_frame_type_t frame_type,
|
||||
nr_frequency_range_e fr,
|
||||
uint32_t X_u[64][839])
|
||||
{
|
||||
void compute_nr_prach_seq(uint8_t short_sequence,
|
||||
uint8_t num_sequences,
|
||||
uint8_t rootSequenceIndex,
|
||||
uint32_t X_u[64][839]){
|
||||
|
||||
// Compute DFT of x_u => X_u[k] = x_u(inv(u)*k)^* X_u[k] = exp(j\pi u*inv(u)*k*(inv(u)*k+1)/N_ZC)
|
||||
unsigned int k,inv_u,i,NCS=0,num_preambles;
|
||||
unsigned int k,inv_u,i;
|
||||
int N_ZC;
|
||||
uint8_t prach_fmt = get_nr_prach_fmt(prach_ConfigIndex,frame_type,fr);
|
||||
|
||||
uint16_t *prach_root_sequence_map;
|
||||
uint16_t u, preamble_offset;
|
||||
uint16_t n_shift_ra,n_shift_ra_bar, d_start,numshift;
|
||||
uint8_t not_found;
|
||||
uint16_t u;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_IN);
|
||||
|
||||
#ifdef NR_PRACH_DEBUG
|
||||
LOG_I(PHY,"compute_prach_seq: NCS_config %d, prach_fmt %x\n",zeroCorrelationZoneConfig, prach_fmt);
|
||||
#endif
|
||||
LOG_D(PHY,"compute_prach_seq: prach short sequence %x, num_sequences %d, rootSequenceIndex %d\n", short_sequence, num_sequences, rootSequenceIndex);
|
||||
|
||||
|
||||
N_ZC = (prach_fmt < 4) ? 839 : 139;
|
||||
N_ZC = (short_sequence) ? 139 : 839;
|
||||
//init_prach_tables(N_ZC); //moved to phy_init_lte_ue/eNB, since it takes to long in real-time
|
||||
|
||||
init_nr_prach_tables(N_ZC);
|
||||
|
||||
if (prach_fmt < 4) {
|
||||
prach_root_sequence_map = prach_root_sequence_map_0_3;
|
||||
} else {
|
||||
if (short_sequence) {
|
||||
// FIXME cannot be reached
|
||||
prach_root_sequence_map = prach_root_sequence_map_abc;
|
||||
}
|
||||
|
||||
|
||||
#ifdef PRACH_DEBUG
|
||||
LOG_I( PHY, "compute_prach_seq: done init prach_tables\n" );
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
int restricted_Type = 0; //this is hardcoded ('0' for restricted_TypeA; and '1' for restricted_TypeB). FIXME
|
||||
|
||||
if (highSpeedFlag== 0) {
|
||||
|
||||
#ifdef PRACH_DEBUG
|
||||
LOG_I(PHY,"Low speed prach : NCS_config %d\n",zeroCorrelationZoneConfig);
|
||||
#endif
|
||||
|
||||
AssertFatal(zeroCorrelationZoneConfig<=15,
|
||||
"FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
|
||||
if (prach_fmt<3) NCS = NCS_unrestricted_delta_f_RA_125[zeroCorrelationZoneConfig];
|
||||
if (prach_fmt==3) NCS = NCS_unrestricted_delta_f_RA_5[zeroCorrelationZoneConfig];
|
||||
if (prach_fmt>3) NCS = NCS_unrestricted_delta_f_RA_15[zeroCorrelationZoneConfig];
|
||||
|
||||
num_preambles = (NCS==0) ? 64 : ((64*NCS)/N_ZC);
|
||||
|
||||
if (NCS>0) num_preambles++;
|
||||
|
||||
preamble_offset = 0;
|
||||
} else {
|
||||
|
||||
#ifdef PRACH_DEBUG
|
||||
LOG_I( PHY, "high speed prach : NCS_config %"PRIu8"\n", zeroCorrelationZoneConfig );
|
||||
#endif
|
||||
|
||||
AssertFatal(zeroCorrelationZoneConfig<=14,
|
||||
"FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
|
||||
if (prach_fmt<3){
|
||||
if (restricted_Type == 0) NCS = NCS_restricted_TypeA_delta_f_RA_125[zeroCorrelationZoneConfig]; // for TypeA, this is hardcoded. FIXME
|
||||
if (restricted_Type == 1) NCS = NCS_restricted_TypeB_delta_f_RA_125[zeroCorrelationZoneConfig]; // for TypeB, this is hardcoded. FIXME
|
||||
}
|
||||
if (prach_fmt==3){
|
||||
if (restricted_Type == 0) NCS = NCS_restricted_TypeA_delta_f_RA_5[zeroCorrelationZoneConfig]; // for TypeA, this is hardcoded. FIXME
|
||||
if (restricted_Type == 1) NCS = NCS_restricted_TypeB_delta_f_RA_5[zeroCorrelationZoneConfig]; // for TypeB, this is hardcoded. FIXME
|
||||
}
|
||||
if (prach_fmt>3){
|
||||
|
||||
}
|
||||
|
||||
nr_fill_du(prach_fmt);
|
||||
|
||||
num_preambles = 64; // compute ZC sequence for 64 possible roots
|
||||
// find first non-zero shift root (stored in preamble_offset)
|
||||
not_found = 1;
|
||||
preamble_offset = 0;
|
||||
|
||||
while (not_found == 1) {
|
||||
// current root depending on rootSequenceIndex
|
||||
int index = (rootSequenceIndex + preamble_offset) % N_ZC;
|
||||
|
||||
if (prach_fmt<4) {
|
||||
// prach_root_sequence_map points to prach_root_sequence_map0_3
|
||||
DevAssert( index < sizeof(prach_root_sequence_map_0_3) / sizeof(prach_root_sequence_map_0_3[0]) );
|
||||
} else {
|
||||
// prach_root_sequence_map points to prach_root_sequence_map4
|
||||
DevAssert( index < sizeof(prach_root_sequence_map_abc) / sizeof(prach_root_sequence_map_abc[0]) );
|
||||
}
|
||||
|
||||
u = prach_root_sequence_map[index];
|
||||
|
||||
uint16_t n_group_ra = 0;
|
||||
|
||||
if ( (nr_du[u]<(N_ZC/3)) && (nr_du[u]>=NCS) ) {
|
||||
n_shift_ra = nr_du[u]/NCS;
|
||||
d_start = (nr_du[u]<<1) + (n_shift_ra * NCS);
|
||||
n_group_ra = N_ZC/d_start;
|
||||
n_shift_ra_bar = max(0,(N_ZC-(nr_du[u]<<1)-(n_group_ra*d_start))/N_ZC);
|
||||
} else if ( (nr_du[u]>=(N_ZC/3)) && (nr_du[u]<=((N_ZC - NCS)>>1)) ) {
|
||||
n_shift_ra = (N_ZC - (nr_du[u]<<1))/NCS;
|
||||
d_start = N_ZC - (nr_du[u]<<1) + (n_shift_ra * NCS);
|
||||
n_group_ra = nr_du[u]/d_start;
|
||||
n_shift_ra_bar = min(n_shift_ra,max(0,(nr_du[u]- (n_group_ra*d_start))/NCS));
|
||||
} else {
|
||||
n_shift_ra = 0;
|
||||
n_shift_ra_bar = 0;
|
||||
}
|
||||
|
||||
// This is the number of cyclic shifts for the current root u
|
||||
numshift = (n_shift_ra*n_group_ra) + n_shift_ra_bar;
|
||||
|
||||
// skip to next root and recompute parameters if numshift==0
|
||||
if (numshift>0)
|
||||
not_found = 0;
|
||||
else
|
||||
preamble_offset++;
|
||||
}
|
||||
prach_root_sequence_map = prach_root_sequence_map_0_3;
|
||||
}
|
||||
|
||||
#ifdef PRACH_DEBUG
|
||||
LOG_D( PHY, "compute_prach_seq: done init prach_tables\n" );
|
||||
|
||||
if (NCS>0)
|
||||
LOG_I( PHY, "Initializing %u preambles for PRACH (NCS_config %"PRIu8", NCS %u, N_ZC/NCS %u)\n",
|
||||
num_preambles, zeroCorrelationZoneConfig, NCS, N_ZC/NCS );
|
||||
for (i=0; i<num_sequences; i++) {
|
||||
int index = (rootSequenceIndex+i) % (N_ZC-1);
|
||||
|
||||
#endif
|
||||
|
||||
for (i=0; i<num_preambles; i++) {
|
||||
int index = (rootSequenceIndex+i+preamble_offset) % N_ZC;
|
||||
|
||||
if (prach_fmt<4) {
|
||||
// prach_root_sequence_map points to prach_root_sequence_map0_3
|
||||
DevAssert( index < sizeof(prach_root_sequence_map_0_3) / sizeof(prach_root_sequence_map_0_3[0]) );
|
||||
} else {
|
||||
if (short_sequence) {
|
||||
// prach_root_sequence_map points to prach_root_sequence_map4
|
||||
DevAssert( index < sizeof(prach_root_sequence_map_abc) / sizeof(prach_root_sequence_map_abc[0]) );
|
||||
} else {
|
||||
// prach_root_sequence_map points to prach_root_sequence_map0_3
|
||||
DevAssert( index < sizeof(prach_root_sequence_map_0_3) / sizeof(prach_root_sequence_map_0_3[0]) );
|
||||
}
|
||||
|
||||
u = prach_root_sequence_map[index];
|
||||
|
||||
LOG_D(PHY,"prach index %d => u=%d\n",index,u);
|
||||
inv_u = nr_ZC_inv[u]; // multiplicative inverse of u
|
||||
|
||||
|
||||
@@ -322,8 +147,8 @@ void compute_nr_prach_seq(uint16_t rootSequenceIndex,
|
||||
// for the unrestricted case X_u[0] is the first root indicated by the rootSequenceIndex
|
||||
|
||||
for (k=0; k<N_ZC; k++) {
|
||||
// 420 is the multiplicative inverse of 2 (required since ru is exp[j 2\pi n])
|
||||
X_u[i][k] = ((uint32_t*)nr_ru)[(((k*(1+(inv_u*k)))%N_ZC)*420)%N_ZC];
|
||||
// multiply by inverse of 2 (required since ru is exp[j 2\pi n])
|
||||
X_u[i][k] = ((uint32_t*)nr_ru)[(((k*(1+(inv_u*k)))%N_ZC)*nr_ZC_inv[2])%N_ZC];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "PHY/NR_TRANSPORT/nr_transport.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
|
||||
//#define NR_PSS_DEBUG
|
||||
|
||||
|
||||
@@ -50,4 +50,4 @@ uint16_t get_dmrs_freq_idx(uint16_t n, uint8_t k_prime, uint8_t delta, uint8_t d
|
||||
|
||||
uint8_t get_l0(uint16_t dlDmrsSymbPos);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user