Commit 8f1532d2 authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge remote-tracking branch 'origin/ldpc-decoder-improvements' into...

Merge remote-tracking branch 'origin/ldpc-decoder-improvements' into 442-integrate-pusch-into-nr-ue-softmodem
parents 4b9d4451 43593545
...@@ -362,7 +362,7 @@ pipeline { ...@@ -362,7 +362,7 @@ pipeline {
stage ("Test physical simulators") { stage ("Test physical simulators") {
steps { steps {
script { script {
timeout (time: 20, unit: 'MINUTES') { timeout (time: 45, unit: 'MINUTES') {
try { try {
gitlabCommitStatus(name: "Test phy-sim") { gitlabCommitStatus(name: "Test phy-sim") {
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}" sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
......
...@@ -51,14 +51,10 @@ def eNB_Repository ...@@ -51,14 +51,10 @@ def eNB_Repository
def eNB_Branch def eNB_Branch
def eNB_CommitID def eNB_CommitID
def eNB_AllowMergeRequestProcess = false def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch def eNB_TargetBranch = "develop-nr"
def PROJECT_NAME = "test-boris" def GIT_COMMIT_AUTHOR
def GIT_COMMIT_AUTHORi
def GIT_COMMIT_EMAIL def GIT_COMMIT_EMAIL
def testStageName def testStageName
// Reversing list because pop() will take the last (right-most) element
//def modeList = ['TesteNB', 'TestUE', 'TesteNB'].reverse()
// Global Parameters not to break the main.py command line and code. // Global Parameters not to break the main.py command line and code.
def ADB_IPAddress = "none" def ADB_IPAddress = "none"
def ADB_Username = "none" def ADB_Username = "none"
...@@ -201,12 +197,12 @@ pipeline { ...@@ -201,12 +197,12 @@ pipeline {
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
]) { ]) {
sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --ADBIPAddress=${ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} ${mainPythonAllXmlFiles}" sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) { for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) { if (fileExists(xmlFile)) {
try { try {
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --UEIPAddress=${params.eNB_IPAddress} --UEUserName=${eNB_Username} --UEPassword=${eNB_Password} --eNBBranch=${eNB_Branch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UESourceCodePath=${params.eNB_SourceCodePath} --eNBRepository=${eNB_Repository} --eNBCommitID=${eNB_CommitID} --ADBIPAddress=${ADB_IPAddress} --EPCIPAddress=${EPC_IPAddress} --XMLTestFile=${xmlFile}" sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UEIPAddress=${params.eNB_IPAddress} --UEUserName=${eNB_Username} --UEPassword=${eNB_Password} --UESourceCodePath=${params.eNB_SourceCodePath} --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --eNBTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --EPCIPAddress=${EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=/tmp/${EPC_Username} --EPCType=ltebox --XMLTestFile=${xmlFile}"
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
buildStageStatus = false buildStageStatus = false
......
...@@ -56,6 +56,7 @@ OAI_UE_PROCESS_COULD_NOT_SYNC = -21 ...@@ -56,6 +56,7 @@ OAI_UE_PROCESS_COULD_NOT_SYNC = -21
OAI_UE_PROCESS_ASSERTION = -22 OAI_UE_PROCESS_ASSERTION = -22
OAI_UE_PROCESS_FAILED = -23 OAI_UE_PROCESS_FAILED = -23
OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = -24 OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = -24
OAI_UE_PROCESS_SEG_FAULT = -25
OAI_UE_PROCESS_OK = +6 OAI_UE_PROCESS_OK = +6
UE_STATUS_DETACHED = 0 UE_STATUS_DETACHED = 0
...@@ -175,7 +176,6 @@ class SSHConnection(): ...@@ -175,7 +176,6 @@ class SSHConnection():
self.UELogFile = '' self.UELogFile = ''
self.Build_OAI_UE_args = '' self.Build_OAI_UE_args = ''
self.Initialize_OAI_UE_args = '' self.Initialize_OAI_UE_args = ''
self.Initialize_OAI_eNB_args = ''
self.clean_repository = True self.clean_repository = True
self.flexranCtrlInstalled = False self.flexranCtrlInstalled = False
self.flexranCtrlStarted = False self.flexranCtrlStarted = False
...@@ -762,13 +762,18 @@ class SSHConnection(): ...@@ -762,13 +762,18 @@ class SSHConnection():
self.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) self.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)
self.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) self.command('chmod 775 ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
self.command('echo ' + lPassWord + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5) self.command('echo ' + lPassWord + ' | sudo -S rm -Rf enb_' + self.testCase_id + '.log', '\$', 5)
self.command('echo ' + lPassWord + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(self.eNB_instance) + '_daemon --chdir=' + lSourcePath + '/cmake_targets -o ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '.log ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5) self.command('hostnamectl','\$', 5)
result = re.search('CentOS Linux 7', str(self.ssh.before))
if result is not None:
self.command('echo $USER; nohup sudo ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh > ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '.log 2>&1 &', lUserName, 10)
else:
self.command('echo ' + lPassWord + ' | sudo -S -E daemon --inherit --unsafe --name=enb' + str(self.eNB_instance) + '_daemon --chdir=' + lSourcePath + '/cmake_targets -o ' + lSourcePath + '/cmake_targets/enb_' + self.testCase_id + '.log ./my-lte-softmodem-run' + str(self.eNB_instance) + '.sh', '\$', 5)
self.eNBLogFiles[int(self.eNB_instance)] = 'enb_' + self.testCase_id + '.log' self.eNBLogFiles[int(self.eNB_instance)] = 'enb_' + self.testCase_id + '.log'
if extra_options != '': if extra_options != '':
self.eNBOptions[int(self.eNB_instance)] = extra_options self.eNBOptions[int(self.eNB_instance)] = extra_options
time.sleep(6) time.sleep(6)
doLoop = True doLoop = True
loopCounter = 10 loopCounter = 20
while (doLoop): while (doLoop):
loopCounter = loopCounter - 1 loopCounter = loopCounter - 1
if (loopCounter == 0): if (loopCounter == 0):
...@@ -983,14 +988,20 @@ class SSHConnection(): ...@@ -983,14 +988,20 @@ class SSHConnection():
tunnelInterfaceStatus = False tunnelInterfaceStatus = False
else: else:
tunnelInterfaceStatus = True tunnelInterfaceStatus = True
else:
tunnelInterfaceStatus = True
self.close() self.close()
if fullSyncStatus and gotSyncStatus and tunnelInterfaceStatus: if fullSyncStatus and gotSyncStatus and tunnelInterfaceStatus:
self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'OK', ALL_PROCESSES_OK, 'OAI UE') self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'OK', ALL_PROCESSES_OK, 'OAI UE')
logging.debug('\u001B[1m Initialize OAI UE Completed\u001B[0m') logging.debug('\u001B[1m Initialize OAI UE Completed\u001B[0m')
else: else:
self.htmlUEFailureMsg = 'oaitun_ue1 interface is either NOT mounted or NOT configured' if self.air_interface == 'lte':
self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', OAI_UE_PROCESS_NO_TUNNEL_INTERFACE, 'OAI UE') self.htmlUEFailureMsg = 'oaitun_ue1 interface is either NOT mounted or NOT configured'
self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', OAI_UE_PROCESS_NO_TUNNEL_INTERFACE, 'OAI UE')
else:
self.htmlUEFailureMsg = 'nr-uesoftmodem did NOT synced'
self.CreateHtmlTestRow(self.Initialize_OAI_UE_args, 'KO', OAI_UE_PROCESS_COULD_NOT_SYNC, 'OAI UE')
logging.error('\033[91mInitialize OAI UE Failed! \033[0m') logging.error('\033[91mInitialize OAI UE Failed! \033[0m')
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
...@@ -2557,7 +2568,8 @@ class SSHConnection(): ...@@ -2557,7 +2568,8 @@ class SSHConnection():
multi_jobs = [] multi_jobs = []
status_queue = SimpleQueue() status_queue = SimpleQueue()
# in noS1 config, no need to check status from EPC # in noS1 config, no need to check status from EPC
result = re.search('noS1', str(self.Initialize_eNB_args)) # in gNB also currently no need to check
result = re.search('noS1|band78', str(self.Initialize_eNB_args))
if result is None: if result is None:
p = Process(target = SSH.CheckHSSProcess, args = (status_queue,)) p = Process(target = SSH.CheckHSSProcess, args = (status_queue,))
p.daemon = True p.daemon = True
...@@ -3129,6 +3141,10 @@ class SSHConnection(): ...@@ -3129,6 +3141,10 @@ class SSHConnection():
statMsg = 'UE showed ' + str(nrCRCOK) + ' PDSCH decoding message(s)' statMsg = 'UE showed ' + str(nrCRCOK) + ' PDSCH decoding message(s)'
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
self.htmlUEFailureMsg += statMsg + '\n' self.htmlUEFailureMsg += statMsg + '\n'
if not frequency_found:
statMsg = 'NR-UE could NOT synch!'
logging.error('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
self.htmlUEFailureMsg += statMsg + '\n'
if uciStatMsgCount > 0: if uciStatMsgCount > 0:
statMsg = 'UE showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)' statMsg = 'UE showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)'
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m') logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
...@@ -3143,20 +3159,32 @@ class SSHConnection(): ...@@ -3143,20 +3159,32 @@ class SSHConnection():
self.htmlUEFailureMsg += statMsg + '\n' self.htmlUEFailureMsg += statMsg + '\n'
if foundSegFault: if foundSegFault:
logging.debug('\u001B[1;37;41m UE ended with a Segmentation Fault! \u001B[0m') logging.debug('\u001B[1;37;41m UE ended with a Segmentation Fault! \u001B[0m')
return ENB_PROCESS_SEG_FAULT if not nrUEFlag:
return OAI_UE_PROCESS_SEG_FAULT
else:
if not frequency_found:
return OAI_UE_PROCESS_SEG_FAULT
if foundAssertion: if foundAssertion:
logging.debug('\u001B[1;30;43m UE showed an assertion! \u001B[0m') logging.debug('\u001B[1;30;43m UE showed an assertion! \u001B[0m')
self.htmlUEFailureMsg += 'UE showed an assertion!\n' self.htmlUEFailureMsg += 'UE showed an assertion!\n'
if not mib_found or not frequency_found: if not nrUEFlag:
return OAI_UE_PROCESS_ASSERTION if not mib_found or not frequency_found:
return OAI_UE_PROCESS_ASSERTION
else:
if not frequency_found:
return OAI_UE_PROCESS_ASSERTION
if foundRealTimeIssue: if foundRealTimeIssue:
logging.debug('\u001B[1;37;41m UE faced real time issues! \u001B[0m') logging.debug('\u001B[1;37;41m UE faced real time issues! \u001B[0m')
self.htmlUEFailureMsg += 'UE faced real time issues!\n' self.htmlUEFailureMsg += 'UE faced real time issues!\n'
#return ENB_PROCESS_REALTIME_ISSUE #return ENB_PROCESS_REALTIME_ISSUE
if no_cell_sync_found and not mib_found: if nrUEFlag:
logging.debug('\u001B[1;37;41m UE could not synchronize ! \u001B[0m') if not frequency_found:
self.htmlUEFailureMsg += 'UE could not synchronize!\n' return OAI_UE_PROCESS_COULD_NOT_SYNC
return 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')
self.htmlUEFailureMsg += 'UE could not synchronize!\n'
return OAI_UE_PROCESS_COULD_NOT_SYNC
return 0 return 0
def TerminateeNB(self): def TerminateeNB(self):
...@@ -3379,13 +3407,16 @@ class SSHConnection(): ...@@ -3379,13 +3407,16 @@ class SSHConnection():
logging.debug('\u001B[1m' + ueAction + ' Failed \u001B[0m') logging.debug('\u001B[1m' + ueAction + ' Failed \u001B[0m')
self.htmlUEFailureMsg = '<b>' + ueAction + ' Failed</b>\n' + self.htmlUEFailureMsg self.htmlUEFailureMsg = '<b>' + ueAction + ' Failed</b>\n' + self.htmlUEFailureMsg
self.CreateHtmlTestRow('N/A', 'KO', logStatus, 'UE') self.CreateHtmlTestRow('N/A', 'KO', logStatus, 'UE')
# for NR-UE at the moment keep running
if self.air_interface == 'lte': if self.air_interface == 'lte':
# In case of sniffing on commercial eNBs we have random results # In case of sniffing on commercial eNBs we have random results
# Not an error then # Not an error then
if (logStatus != OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'): if (logStatus != OAI_UE_PROCESS_COULD_NOT_SYNC) or (ueAction != 'Sniffing'):
self.Initialize_OAI_UE_args = '' self.Initialize_OAI_UE_args = ''
self.AutoTerminateUEandeNB() self.AutoTerminateUEandeNB()
else:
if (logStatus == OAI_UE_PROCESS_COULD_NOT_SYNC):
self.Initialize_OAI_UE_args = ''
self.AutoTerminateUEandeNB()
else: else:
logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m') logging.debug('\u001B[1m' + ueAction + ' Completed \u001B[0m')
self.htmlUEFailureMsg = '<b>' + ueAction + ' Completed</b>\n' + self.htmlUEFailureMsg self.htmlUEFailureMsg = '<b>' + ueAction + ' Completed</b>\n' + self.htmlUEFailureMsg
...@@ -3938,7 +3969,7 @@ class SSHConnection(): ...@@ -3938,7 +3969,7 @@ class SSHConnection():
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - eNB process not found</td>\n') self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - eNB process not found</td>\n')
elif (processesStatus == OAI_UE_PROCESS_FAILED): elif (processesStatus == OAI_UE_PROCESS_FAILED):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - OAI UE process not found</td>\n') self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - OAI UE process not found</td>\n')
elif (processesStatus == ENB_PROCESS_SEG_FAULT): elif (processesStatus == ENB_PROCESS_SEG_FAULT) or (processesStatus == OAI_UE_PROCESS_SEG_FAULT):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process ended in Segmentation Fault</td>\n') self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process ended in Segmentation Fault</td>\n')
elif (processesStatus == ENB_PROCESS_ASSERTION) or (processesStatus == OAI_UE_PROCESS_ASSERTION): elif (processesStatus == ENB_PROCESS_ASSERTION) or (processesStatus == OAI_UE_PROCESS_ASSERTION):
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process ended in Assertion</td>\n') self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process ended in Assertion</td>\n')
......
...@@ -24,15 +24,16 @@ ...@@ -24,15 +24,16 @@
<htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef> <htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef>
<htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName> <htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
090101 000001 090102 000002 090108 090109 090101 000001 090102 000002 090108 090109
</TestCaseRequestedList> </TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList> <TestCaseExclusionList></TestCaseExclusionList>
<testCase id="090101"> <testCase id="090101">
<class>Initialize_OAI_eNB</class> <class>Initialize_eNB</class>
<desc>Initialize gNB USRP</desc> <desc>Initialize gNB USRP</desc>
<Initialize_OAI_eNB_args>-O ../../../ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf</Initialize_OAI_eNB_args> <Initialize_eNB_args>-O ci-scripts/conf_files/gnb.band78.tm1.106PRB.usrpn300.conf</Initialize_eNB_args>
<air_interface>NR</air_interface> <air_interface>NR</air_interface>
</testCase> </testCase>
......
<!--
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The OpenAirInterface Software Alliance licenses this file to You under
the OAI Public License, Version 1.1 (the "License"); you may not use this file
except in compliance with the License.
You may obtain a copy of the License at
http://www.openairinterface.org/?page_id=698
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For more information about the OpenAirInterface (OAI) Software Alliance:
contact@openairinterface.org
-->
<testCaseList>
<htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef>
<htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList>
090108 090109
</TestCaseRequestedList>
<TestCaseExclusionList></TestCaseExclusionList>
<testCase id="090108">
<class>Terminate_OAI_UE</class>
<desc>Terminate NR UE</desc>
<air_interface>NR</air_interface>
</testCase>
<testCase id="090109">
<class>Terminate_eNB</class>
<desc>Terminate gNB</desc>
<air_interface>NR</air_interface>
</testCase>
</testCaseList>
...@@ -2655,42 +2655,51 @@ add_executable(nr_dlschsim ...@@ -2655,42 +2655,51 @@ add_executable(nr_dlschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c
${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/backtrace.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${UTIL_SRC}
${T_SOURCE}) ${T_SOURCE})
target_link_libraries(nr_dlschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl) target_link_libraries(nr_dlschsim -Wl,--start-group UTIL SIMU PHY_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 add_executable(nr_pbchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/backtrace.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${UTIL_SRC}
${T_SOURCE}) ${T_SOURCE})
target_link_libraries(nr_pbchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl) target_link_libraries(nr_pbchsim -Wl,--start-group UTIL SIMU PHY_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)
#PUCCH ---> Prashanth #PUCCH ---> Prashanth
add_executable(nr_pucchsim add_executable(nr_pucchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c
${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/backtrace.c
${OPENAIR_DIR}/common/utils/system.c
${UTIL_SRC}
${T_SOURCE}) ${T_SOURCE})
target_link_libraries(nr_pucchsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl) target_link_libraries(nr_pucchsim -Wl,--start-group UTIL SIMU PHY_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)
#PUCCH ---> Prashanth #PUCCH ---> Prashanth
add_executable(nr_dlsim add_executable(nr_dlsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c
${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/backtrace.c
${OPENAIR_DIR}/common/utils/system.c ${OPENAIR_DIR}/common/utils/system.c
${UTIL_SRC}
${T_SOURCE}) ${T_SOURCE})
target_link_libraries(nr_dlsim -Wl,--start-group UTIL SIMU PHY_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} dl) target_link_libraries(nr_dlsim -Wl,--start-group UTIL SIMU PHY_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)
add_executable(nr_ulschsim add_executable(nr_ulschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c ${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/backtrace.c
${OPENAIR_DIR}/common/utils/system.c
${UTIL_SRC}
${T_SOURCE}) ${T_SOURCE})
target_link_libraries(nr_ulschsim -Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} dl) target_link_libraries(nr_ulschsim -Wl,--start-group UTIL SIMU PHY_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_ulsim add_executable(nr_ulsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c ${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c
${OPENAIR_DIR}/common/utils/backtrace.c ${OPENAIR_DIR}/common/utils/backtrace.c
${OPENAIR_DIR}/common/utils/system.c
${UTIL_SRC}
${T_SOURCE}) ${T_SOURCE})
target_link_libraries(nr_ulsim -Wl,--start-group UTIL SIMU PHY_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} dl) target_link_libraries(nr_ulsim -Wl,--start-group UTIL SIMU PHY_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)
foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim) foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim)
......
...@@ -367,6 +367,11 @@ const char* eurecomFunctionsNames[] = { ...@@ -367,6 +367,11 @@ const char* eurecomFunctionsNames[] = {
"dlsch_decoding5", "dlsch_decoding5",
"dlsch_decoding6", "dlsch_decoding6",
"dlsch_decoding7", "dlsch_decoding7",
"dlsch_segmentation",
"dlsch_deinterleaving",
"dlsch_rate_matching",
"dlsch_ldpc",
"dlsch_compine_seg",
"dlsch_pmch_decoding", "dlsch_pmch_decoding",
"rx_pdcch", "rx_pdcch",
"dci_decoding", "dci_decoding",
......
...@@ -348,6 +348,11 @@ typedef enum { ...@@ -348,6 +348,11 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING5, VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING5,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING6, VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING6,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING7, VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DECODING7,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_RATE_MATCHING,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG,
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_DECODING, VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_PMCH_DECODING,
VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH,
VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING,
......
...@@ -73,7 +73,7 @@ typedef struct { ...@@ -73,7 +73,7 @@ typedef struct {
} T_cache_t; } T_cache_t;
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */ /* number of VCD functions (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_FUNCTIONS (232) #define VCD_NUM_FUNCTIONS (237)//(232)
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */ /* number of VCD variables (to be kept up to date! see in T_messages.txt) */
#define VCD_NUM_VARIABLES (185) #define VCD_NUM_VARIABLES (185)
......
...@@ -2613,6 +2613,31 @@ ID = VCD_FUNCTION_DLSCH_DECODING7 ...@@ -2613,6 +2613,31 @@ ID = VCD_FUNCTION_DLSCH_DECODING7
GROUP = ALL:VCD:ENB:VCD_FUNCTION GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value FORMAT = int,value
VCD_NAME = dlsch_decoding7 VCD_NAME = dlsch_decoding7
ID = VCD_FUNCTION_DLSCH_SEGMENTATION
DESC = VCD function DLSCH_SEGMENTATION
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = dlsch_segmentation
ID = VCD_FUNCTION_DLSCH_DEINTERLEAVING
DESC = VCD function DLSCH_DEINTERLEAVING
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = dlsch_deinterleaving
ID = VCD_FUNCTION_DLSCH_RATE_MATCHING
DESC = VCD function DLSCH_RATE_MATCHING
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = dlsch_rate_matching
ID = VCD_FUNCTION_DLSCH_LDPC
DESC = VCD function DLSCH_LDPC
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = dlsch_ldpc
ID = VCD_FUNCTION_DLSCH_COMBINE_SEG
DESC = VCD function DLSCH_COMBINE_SEG
GROUP = ALL:VCD:ENB:VCD_FUNCTION
FORMAT = int,value
VCD_NAME = dlsch_compine_seg
ID = VCD_FUNCTION_DLSCH_PMCH_DECODING ID = VCD_FUNCTION_DLSCH_PMCH_DECODING
DESC = VCD function DLSCH_PMCH_DECODING DESC = VCD function DLSCH_PMCH_DECODING
GROUP = ALL:VCD:ENB:VCD_FUNCTION GROUP = ALL:VCD:ENB:VCD_FUNCTION
......
...@@ -684,6 +684,27 @@ static void* gNB_thread_prach( void* param ) { ...@@ -684,6 +684,27 @@ static void* gNB_thread_prach( void* param ) {
extern void init_td_thread(PHY_VARS_gNB *); extern void init_td_thread(PHY_VARS_gNB *);
extern void init_te_thread(PHY_VARS_gNB *); extern void init_te_thread(PHY_VARS_gNB *);
static void* process_stats_thread(void* param) {
PHY_VARS_gNB *gNB = (PHY_VARS_gNB*)param;
reset_meas(&gNB->dlsch_encoding_stats);
reset_meas(&gNB->dlsch_scrambling_stats);
reset_meas(&gNB->dlsch_modulation_stats);
wait_sync("process_stats_thread");
while(!oai_exit)
{
sleep(1);
print_meas(&gNB->dlsch_encoding_stats, "pdsch_encoding", NULL, NULL);
print_meas(&gNB->dlsch_scrambling_stats, "pdsch_scrambling", NULL, NULL);
print_meas(&gNB->dlsch_modulation_stats, "pdsch_modulation", NULL, NULL);
}
return(NULL);
}
void init_gNB_proc(int inst) { void init_gNB_proc(int inst) {
int i=0; int i=0;
int CC_id; int CC_id;
...@@ -731,6 +752,7 @@ void init_gNB_proc(int inst) { ...@@ -731,6 +752,7 @@ void init_gNB_proc(int inst) {
threadCreate( &L1_proc_tx->pthread, gNB_L1_thread_tx, gNB,"L1_proc_tx", -1, OAI_PRIORITY_RT); threadCreate( &L1_proc_tx->pthread, gNB_L1_thread_tx, gNB,"L1_proc_tx", -1, OAI_PRIORITY_RT);
} }
if(opp_enabled == 1) threadCreate(&proc->L1_stats_thread, process_stats_thread,(void *)gNB, "time_meas", -1, OAI_PRIORITY_RT_LOW);
//pthread_create( &proc->pthread_prach, attr_prach, gNB_thread_prach, gNB ); //pthread_create( &proc->pthread_prach, attr_prach, gNB_thread_prach, gNB );
char name[16]; char name[16];
......
...@@ -1075,30 +1075,39 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) { ...@@ -1075,30 +1075,39 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
cfg->rx_bw = 1.5e6; cfg->rx_bw = 1.5e6;
} else AssertFatal(1==0,"Unknown N_RB %d\n",N_RB); } else AssertFatal(1==0,"Unknown N_RB %d\n",N_RB);
} else if (mu == NR_MU_1) { } else if (mu == NR_MU_1) {
if(N_RB == 217) { if(N_RB == 273) {
if (fp->threequarter_fs) {
AssertFatal(0 == 1,"three quarter sampling not supported for N_RB 273\n");
} else {
cfg->sample_rate=122.88e6;
cfg->samples_per_frame = 1228800;
cfg->tx_bw = 100e6;
cfg->rx_bw = 100e6;
}
} else if(N_RB == 217) {
if (fp->threequarter_fs) { if (fp->threequarter_fs) {
cfg->sample_rate=92.16e6; cfg->sample_rate=92.16e6;
cfg->samples_per_frame = 921600; cfg->samples_per_frame = 921600;
cfg->tx_bw = 40e6; cfg->tx_bw = 80e6;
cfg->rx_bw = 40e6; cfg->rx_bw = 80e6;
} else { } else {
cfg->sample_rate=122.88e6; cfg->sample_rate=122.88e6;
cfg->samples_per_frame = 1228800; cfg->samples_per_frame = 1228800;
cfg->tx_bw = 40e6; cfg->tx_bw = 80e6;
cfg->rx_bw = 40e6; cfg->rx_bw = 80e6;
} }
} else if(N_RB == 106) { } else if(N_RB == 106) {
if (fp->threequarter_fs) { if (fp->threequarter_fs) {
cfg->sample_rate=46.08e6; cfg->sample_rate=46.08e6;
cfg->samples_per_frame = 460800; cfg->samples_per_frame = 460800;
cfg->tx_bw = 20e6; cfg->tx_bw = 40e6;
cfg->rx_bw = 20e6; cfg->rx_bw = 40e6;
} }
else { else {
cfg->sample_rate=61.44e6; cfg->sample_rate=61.44e6;
cfg->samples_per_frame = 614400; cfg->samples_per_frame = 614400;
cfg->tx_bw = 20e6; cfg->tx_bw = 40e6;
cfg->rx_bw = 20e6; cfg->rx_bw = 40e6;
} }
} else { } else {
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu); AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu);
...@@ -1693,7 +1702,7 @@ void init_RU_proc(RU_t *ru) { ...@@ -1693,7 +1702,7 @@ void init_RU_proc(RU_t *ru) {
threadCreate( &proc->pthread_prach, ru_thread_prach, (void *)ru,"RACH", -1, OAI_PRIORITY_RT ); threadCreate( &proc->pthread_prach, ru_thread_prach, (void *)ru,"RACH", -1, OAI_PRIORITY_RT );
} }
if (get_nprocs()>=2) { if (get_thread_worker_conf() == WORKER_ENABLE) {
if (ru->feprx) nr_init_feprx_thread(ru); if (ru->feprx) nr_init_feprx_thread(ru);
if (ru->feptx_ofdm) nr_init_feptx_thread(ru); if (ru->feptx_ofdm) nr_init_feptx_thread(ru);
...@@ -1987,8 +1996,8 @@ void set_function_spec_param(RU_t *ru) { ...@@ -1987,8 +1996,8 @@ void set_function_spec_param(RU_t *ru) {
ru->fh_north_out = fh_if4p5_north_out; // send_IF4p5 on reception ru->fh_north_out = fh_if4p5_north_out; // send_IF4p5 on reception
ru->fh_south_out = tx_rf; // send output to RF ru->fh_south_out = tx_rf; // send output to RF
ru->fh_north_asynch_in = fh_if4p5_north_asynch_in; // TX packets come asynchronously ru->fh_north_asynch_in = fh_if4p5_north_asynch_in; // TX packets come asynchronously
ru->feprx = (get_nprocs()<=2) ? nr_fep_full : nr_fep_full_2thread; // RX DFTs ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full; // RX DFTs
ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU) ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // this is fep with idft only (no precoding in RRU)
ru->feptx_prec = NULL; ru->feptx_prec = NULL;
ru->nr_start_if = nr_start_if; // need to start the if interface for if4p5 ru->nr_start_if = nr_start_if; // need to start the if interface for if4p5
ru->ifdevice.host_type = RRU_HOST; ru->ifdevice.host_type = RRU_HOST;
...@@ -2009,8 +2018,8 @@ void set_function_spec_param(RU_t *ru) { ...@@ -2009,8 +2018,8 @@ void set_function_spec_param(RU_t *ru) {
malloc_IF4p5_buffer(ru); malloc_IF4p5_buffer(ru);
} else if (ru->function == gNodeB_3GPP) { } else if (ru->function == gNodeB_3GPP) {
ru->do_prach = 0; // no prach processing in RU ru->do_prach = 0; // no prach processing in RU
ru->feprx = (get_nprocs()<=2) ? nr_fep_full : nr_fep_full_2thread; // RX DFTs ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full; // RX DFTs
ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // this is fep with idft and precoding ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // this is fep with idft and precoding
ru->feptx_prec = NULL; // this is fep with idft and precoding ru->feptx_prec = NULL; // this is fep with idft and precoding
ru->fh_north_in = NULL; // no incoming fronthaul from north ru->fh_north_in = NULL; // no incoming fronthaul from north
ru->fh_north_out = NULL; // no outgoing fronthaul to north ru->fh_north_out = NULL; // no outgoing fronthaul to north
...@@ -2039,13 +2048,13 @@ void set_function_spec_param(RU_t *ru) { ...@@ -2039,13 +2048,13 @@ void set_function_spec_param(RU_t *ru) {
case REMOTE_IF5: // the remote unit is IF5 RRU case REMOTE_IF5: // the remote unit is IF5 RRU
ru->do_prach = 0; ru->do_prach = 0;
ru->feprx = (get_nprocs()<=2) ? nr_fep_full : nr_fep_full_2thread; // this is frequency-shift + DFTs ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full; // this is frequency-shift + DFTs
ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs
ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // need to do transmit Precoding + IDFTs
ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception
ru->fh_south_out = fh_if5_south_out; // synchronous IF5 transmission ru->fh_south_out = fh_if5_south_out; // synchronous IF5 transmission
ru->fh_south_asynch_in = NULL; // no asynchronous UL ru->fh_south_asynch_in = NULL; // no asynchronous UL
ru->start_rf = NULL; // no local RF ru->start_rf = NULL; // no local RF
ru->stop_rf = NULL; ru->stop_rf = NULL;
ru->nr_start_if = nr_start_if; // need to start if interface for IF5 ru->nr_start_if = nr_start_if; // need to start if interface for IF5
ru->ifdevice.host_type = RAU_HOST; ru->ifdevice.host_type = RAU_HOST;
......
...@@ -574,44 +574,44 @@ typedef struct { ...@@ -574,44 +574,44 @@ typedef struct {
} nfapi_nr_dl_config_bch_pdu; } nfapi_nr_dl_config_bch_pdu;
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
uint8_t pdu_index; uint8_t pdu_index;
uint16_t rnti; uint16_t rnti;
uint16_t nb_mod_symbols; uint16_t nb_mod_symbols;
uint8_t time_allocation_type; uint8_t time_allocation_type;
uint8_t freq_allocation_type; uint8_t freq_allocation_type;
uint8_t start_prb; uint16_t start_prb;
uint8_t n_prb; uint16_t n_prb;
uint8_t start_symbol; uint8_t start_symbol;
uint8_t nb_symbols; uint8_t nb_symbols;
uint8_t mcs_idx; uint8_t mcs_idx;
uint8_t ndi; uint8_t ndi;
uint8_t nb_codewords; uint8_t nb_codewords;
uint8_t nb_layers; uint8_t nb_layers;
uint16_t coding_rate; uint16_t coding_rate;
uint8_t modulation; uint8_t modulation;
uint8_t modulation_order; uint8_t modulation_order;
uint16_t transport_block_size; uint16_t transport_block_size;
uint8_t nb_re_dmrs; uint8_t nb_re_dmrs;
uint8_t time_alloc_list_flag; uint8_t time_alloc_list_flag;
uint8_t time_alloc_list; uint8_t time_alloc_list;
uint8_t rbg_list; uint8_t rbg_list;
uint8_t virtual_resource_block_assignment_flag; uint8_t virtual_resource_block_assignment_flag;
uint32_t resource_block_coding; uint32_t resource_block_coding;
uint8_t redundancy_version; uint8_t redundancy_version;
uint8_t transport_blocks; uint8_t transport_blocks;
uint8_t transmission_scheme; uint8_t transmission_scheme;
uint8_t number_of_subbands; uint8_t number_of_subbands;
uint8_t codebook_index[NFAPI_MAX_NUM_SUBBANDS]; uint8_t codebook_index[NFAPI_MAX_NUM_SUBBANDS];
uint8_t ue_category_capacity; uint8_t ue_category_capacity;
uint8_t pa; uint8_t pa;
uint8_t delta_power_offset_index; uint8_t delta_power_offset_index;
uint8_t ngap; uint8_t ngap;
uint8_t transmission_mode; uint8_t transmission_mode;
uint8_t num_bf_prb_per_subband; uint8_t num_bf_prb_per_subband;
uint8_t num_bf_vector; uint8_t num_bf_vector;
nfapi_bf_vector_t bf_vector[NFAPI_MAX_BF_VECTORS]; nfapi_bf_vector_t bf_vector[NFAPI_MAX_BF_VECTORS];
}nfapi_nr_dl_config_dlsch_pdu_rel15_t; }nfapi_nr_dl_config_dlsch_pdu_rel15_t;
#define NFAPI_NR_DL_CONFIG_REQUEST_DLSCH_PDU_REL15_TAG #define NFAPI_NR_DL_CONFIG_REQUEST_DLSCH_PDU_REL15_TAG
......
...@@ -376,9 +376,11 @@ int send_mac_subframe_indications(vnf_p7_t* vnf_p7) ...@@ -376,9 +376,11 @@ int send_mac_subframe_indications(vnf_p7_t* vnf_p7)
if(curr->in_sync == 1) if(curr->in_sync == 1)
{ {
// ask for subframes in the future // ask for subframes in the future
uint16_t sfn_sf_adv = increment_sfn_sf_by(curr->sfn_sf, 2); //uint16_t sfn_sf_adv = increment_sfn_sf_by(curr->sfn_sf, 2);
vnf_p7->_public.subframe_indication(&(vnf_p7->_public), curr->phy_id, sfn_sf_adv); //vnf_p7->_public.subframe_indication(&(vnf_p7->_public), curr->phy_id, sfn_sf_adv);
// suggestion fix by Haruki NAOI
vnf_p7->_public.subframe_indication(&(vnf_p7->_public), curr->phy_id, curr->sfn_sf);
} }
curr = curr->next; curr = curr->next;
......
...@@ -170,6 +170,7 @@ int test_ldpc(short No_iteration, ...@@ -170,6 +170,7 @@ int test_ldpc(short No_iteration,
*errors_bit_uncoded=0; *errors_bit_uncoded=0;
*crc_misses=0; *crc_misses=0;
// generate input block // generate input block
for(j=0;j<MAX_NUM_DLSCH_SEGMENTS;j++) { for(j=0;j<MAX_NUM_DLSCH_SEGMENTS;j++) {
test_input[j]=(unsigned char *)malloc16(sizeof(unsigned char) * block_length/8); test_input[j]=(unsigned char *)malloc16(sizeof(unsigned char) * block_length/8);
...@@ -663,6 +664,8 @@ int main(int argc, char *argv[]) ...@@ -663,6 +664,8 @@ int main(int argc, char *argv[])
fprintf(fd,"SNR BLER BER UNCODED_BER ENCODER_MEAN ENCODER_STD ENCODER_MAX DECODER_TIME_MEAN DECODER_TIME_STD DECODER_TIME_MAX DECODER_ITER_MEAN DECODER_ITER_STD DECODER_ITER_MAX\n"); fprintf(fd,"SNR BLER BER UNCODED_BER ENCODER_MEAN ENCODER_STD ENCODER_MAX DECODER_TIME_MEAN DECODER_TIME_STD DECODER_TIME_MAX DECODER_ITER_MEAN DECODER_ITER_STD DECODER_ITER_MAX\n");
nrLDPC_prep();
for (SNR=SNR0;SNR<SNR0+20.0;SNR+=SNR_step) for (SNR=SNR0;SNR<SNR0+20.0;SNR+=SNR_step)
{ {
//reset_meas(&time_optim); //reset_meas(&time_optim);
......
...@@ -87,23 +87,29 @@ static inline void nrLDPC_cnProc_BG2(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf* p_pr ...@@ -87,23 +87,29 @@ static inline void nrLDPC_cnProc_BG2(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf* p_pr
// Set of results pointer to correct BN address // Set of results pointer to correct BN address
p_cnProcBufResBit = p_cnProcBufRes + (j*bitOffsetInGroup); p_cnProcBufResBit = p_cnProcBufRes + (j*bitOffsetInGroup);
__m256i *pj0 = &p_cnProcBuf[lut_idxCnProcG3[j][0]];
__m256i *pj1 = &p_cnProcBuf[lut_idxCnProcG3[j][1]];
// Loop over CNs // Loop over CNs
for (i=0; i<M; i++) for (i=0; i<M; i++)
{ {
// Abs and sign of 32 CNs (first BN) // Abs and sign of 32 CNs (first BN)
ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i]; // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][0] + i];
ymm0 = pj0[i];
sgn = _mm256_sign_epi8(*p_ones, ymm0); sgn = _mm256_sign_epi8(*p_ones, ymm0);
min = _mm256_abs_epi8(ymm0); min = _mm256_abs_epi8(ymm0);
// 32 CNs of second BN // 32 CNs of second BN
ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][1] + i]; // ymm0 = p_cnProcBuf[lut_idxCnProcG3[j][1] + i];
ymm0 = pj1[i];
min = _mm256_min_epu8(min, _mm256_abs_epi8(ymm0)); min = _mm256_min_epu8(min, _mm256_abs_epi8(ymm0));
sgn = _mm256_sign_epi8(sgn, ymm0); sgn = _mm256_sign_epi8(sgn, ymm0);
// Store result // Store result
min = _mm256_min_epu8(min, *p_maxLLR); // 128 in epi8 is -127 min = _mm256_min_epu8(min, *p_maxLLR); // 128 in epi8 is -127
*p_cnProcBufResBit = _mm256_sign_epi8(min, sgn); //*p_cnProcBufResBit = _mm256_sign_epi8(min, sgn);
p_cnProcBufResBit++; //p_cnProcBufResBit++;
p_cnProcBufResBit[i]=_mm256_sign_epi8(min, sgn);
} }
} }
} }
......
...@@ -39,12 +39,196 @@ ...@@ -39,12 +39,196 @@
#include "nrLDPC_bnProc.h" #include "nrLDPC_bnProc.h"
#define NR_LDPC_ENABLE_PARITY_CHECK #define NR_LDPC_ENABLE_PARITY_CHECK
//#define NR_LDPC_PROFILER_DETAIL #define NR_LDPC_PROFILER_DETAIL
#ifdef NR_LDPC_DEBUG_MODE #ifdef NR_LDPC_DEBUG_MODE
#include "nrLDPC_tools/nrLDPC_debug.h" #include "nrLDPC_tools/nrLDPC_debug.h"
#endif #endif
void memcpy_finder(uint32_t* p_lut_cn2bn,uint32_t **p_lut2,uint32_t *size_lut2,int dest0,int M) {
int dest=0,src=p_lut_cn2bn[0],len=1;
int size32;
for (int i=1;i<M;i++) {
if (p_lut_cn2bn[i]!= (1+p_lut_cn2bn[i-1])) {
*size_lut2=*size_lut2+(3*sizeof(uint32_t));
*p_lut2=realloc((void*)*p_lut2,*size_lut2);
size32=*size_lut2/4;
(*p_lut2)[size32-3] = dest0+dest;
(*p_lut2)[size32-2] = src;
(*p_lut2)[size32-1] = len;
len=1;
dest=i;
src=p_lut_cn2bn[i];
}
else len++;
if (i==(M-1)) {
*size_lut2=*size_lut2+(3*sizeof(uint32_t));
*p_lut2=realloc((void*)*p_lut2,*size_lut2);
size32=*size_lut2/4;
(*p_lut2)[size32-3] = dest0+dest;
(*p_lut2)[size32-2] = src;
(*p_lut2)[size32-1] = len;
}
}
}
void nrLDPC_prep_bn2cnProcBuf(const uint32_t* lut_cn2bnProcBuf,
uint32_t** lut_cn2bnProcBuf2,
uint32_t *lut2_size,
const uint8_t* lut_numCnInCnGroups,
const uint32_t* lut_startAddrCnGroups,
uint16_t Z)
{
uint32_t* p_lut_cn2bn;
uint32_t bitOffsetInGroup;
uint32_t j;
uint32_t M;
*lut2_size=0;
// For CN groups 3 to 19 no need to send the last BN back since it's single edge
// and BN processing does not change the value already in the CN proc buf
// =====================================================================
// CN group with 3 BNs
p_lut_cn2bn = (uint32_t*)&lut_cn2bnProcBuf[0];
M = lut_numCnInCnGroups[0]*Z;
bitOffsetInGroup = lut_numCnInCnGroups_BG1_R13[0]*NR_LDPC_ZMAX;
for (j=0;j<3; j++)
{
memcpy_finder(p_lut_cn2bn+(j*M),lut_cn2bnProcBuf2,
lut2_size,lut_startAddrCnGroups[0] + j*bitOffsetInGroup,M);
}
// =====================================================================
// CN group with 4 BNs
p_lut_cn2bn += (M*3); // Number of elements of previous group
M = lut_numCnInCnGroups[1]*Z;
bitOffsetInGroup = lut_numCnInCnGroups_BG1_R13[1]*NR_LDPC_ZMAX;
for (j=0; j<4; j++)
{
memcpy_finder(p_lut_cn2bn+(j*M),lut_cn2bnProcBuf2,lut2_size,lut_startAddrCnGroups[1] + j*bitOffsetInGroup,M);
}
// =====================================================================
// CN group with 5 BNs
p_lut_cn2bn += (M*4); // Number of elements of previous group
M = lut_numCnInCnGroups[2]*Z;
bitOffsetInGroup = lut_numCnInCnGroups_BG1_R13[2]*NR_LDPC_ZMAX;
for (j=0; j<5; j++)
{
memcpy_finder(p_lut_cn2bn+(j*M),lut_cn2bnProcBuf2,lut2_size,lut_startAddrCnGroups[2] + j*bitOffsetInGroup,M);
}
// =====================================================================
// CN group with 6 BNs
p_lut_cn2bn += (M*5); // Number of elements of previous group
M = lut_numCnInCnGroups[3]*Z;
bitOffsetInGroup = lut_numCnInCnGroups_BG1_R13[3]*NR_LDPC_ZMAX;
for (j=0; j<6; j++)
{
memcpy_finder(p_lut_cn2bn+(j*M),lut_cn2bnProcBuf2,lut2_size,lut_startAddrCnGroups[3] + j*bitOffsetInGroup,M);
}
// =====================================================================
// CN group with 7 BNs
p_lut_cn2bn += (M*6); // Number of elements of previous group
M = lut_numCnInCnGroups[4]*Z;
bitOffsetInGroup = lut_numCnInCnGroups_BG1_R13[4]*NR_LDPC_ZMAX;
for (j=0; j<7; j++)
{
memcpy_finder(p_lut_cn2bn+(j*M),lut_cn2bnProcBuf2,lut2_size,lut_startAddrCnGroups[4] + j*bitOffsetInGroup,M);
}
// =====================================================================
// CN group with 8 BNs
p_lut_cn2bn += (M*7); // Number of elements of previous group
M = lut_numCnInCnGroups[5]*Z;
bitOffsetInGroup = lut_numCnInCnGroups_BG1_R13[5]*NR_LDPC_ZMAX;
for (j=0; j<8; j++)
{
memcpy_finder(p_lut_cn2bn+(j*M),lut_cn2bnProcBuf2,lut2_size,lut_startAddrCnGroups[5] + j*bitOffsetInGroup,M);
}
// =====================================================================
// CN group with 9 BNs
p_lut_cn2bn += (M*8); // Number of elements of previous group
M = lut_numCnInCnGroups[6]*Z;
bitOffsetInGroup = lut_numCnInCnGroups_BG1_R13[6]*NR_LDPC_ZMAX;
for (j=0; j<9; j++)
{
memcpy_finder(p_lut_cn2bn+(j*M),lut_cn2bnProcBuf2,lut2_size,lut_startAddrCnGroups[6] + j*bitOffsetInGroup,M);
}
// =====================================================================
// CN group with 10 BNs
p_lut_cn2bn += (M*9); // Number of elements of previous group
M = lut_numCnInCnGroups[7]*Z;
bitOffsetInGroup = lut_numCnInCnGroups_BG1_R13[7]*NR_LDPC_ZMAX;
for (j=0; j<10; j++)
{
memcpy_finder(p_lut_cn2bn+(j*M),lut_cn2bnProcBuf2,lut2_size,lut_startAddrCnGroups[7] + j*bitOffsetInGroup,M);
}
// =====================================================================
// CN group with 19 BNs
p_lut_cn2bn += (M*10); // Number of elements of previous group
M = lut_numCnInCnGroups[8]*Z;
bitOffsetInGroup = lut_numCnInCnGroups_BG1_R13[8]*NR_LDPC_ZMAX;
for (j=0; j<19; j++)
{
memcpy_finder(p_lut_cn2bn+(j*M),lut_cn2bnProcBuf2,lut2_size,lut_startAddrCnGroups[8] + j*bitOffsetInGroup,M);
}
}
void nrLDPC_prep(void) {
nrLDPC_prep_bn2cnProcBuf(lut_cn2bnProcBuf_BG1_Z320_R13,
&lut_cn2bnProcBuf2_BG1_Z320_R13,
&lut_cn2bnProcBuf2_BG1_Z320_R13_size,
lut_numCnInCnGroups_BG1_R13,
lut_startAddrCnGroups_BG1,
320);
nrLDPC_prep_bn2cnProcBuf(lut_cn2bnProcBuf_BG1_Z352_R13,
&lut_cn2bnProcBuf2_BG1_Z352_R13,
&lut_cn2bnProcBuf2_BG1_Z352_R13_size,
lut_numCnInCnGroups_BG1_R13,
lut_startAddrCnGroups_BG1,
352);
nrLDPC_prep_bn2cnProcBuf(lut_cn2bnProcBuf_BG1_Z384_R13,
&lut_cn2bnProcBuf2_BG1_Z384_R13,
&lut_cn2bnProcBuf2_BG1_Z384_R13_size,
lut_numCnInCnGroups_BG1_R13,
lut_startAddrCnGroups_BG1,
384);
}
static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDPC_procBuf* p_procBuf, uint32_t numLLR, t_nrLDPC_lut* p_lut, t_nrLDPC_dec_params* p_decParams, t_nrLDPC_time_stats* p_profiler); static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDPC_procBuf* p_procBuf, uint32_t numLLR, t_nrLDPC_lut* p_lut, t_nrLDPC_dec_params* p_decParams, t_nrLDPC_time_stats* p_profiler);
int32_t nrLDPC_decoder(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, t_nrLDPC_procBuf* p_procBuf, t_nrLDPC_time_stats* p_profiler) int32_t nrLDPC_decoder(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_out, t_nrLDPC_procBuf* p_procBuf, t_nrLDPC_time_stats* p_profiler)
...@@ -54,7 +238,6 @@ int32_t nrLDPC_decoder(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* ...@@ -54,7 +238,6 @@ int32_t nrLDPC_decoder(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t*
t_nrLDPC_lut lut; t_nrLDPC_lut lut;
t_nrLDPC_lut* p_lut = &lut; t_nrLDPC_lut* p_lut = &lut;
//printf("p_procBuf->cnProcBuf = %p\n", p_procBuf->cnProcBuf);
// Initialize decoder core(s) with correct LUTs // Initialize decoder core(s) with correct LUTs
numLLR = nrLDPC_init(p_decParams, p_lut); numLLR = nrLDPC_init(p_decParams, p_lut);
...@@ -152,9 +335,10 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP ...@@ -152,9 +335,10 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#ifdef NR_LDPC_PROFILER_DETAIL #ifdef NR_LDPC_PROFILER_DETAIL
start_meas(&p_profiler->cn2bnProcBuf); start_meas(&p_profiler->cn2bnProcBuf);
#endif #endif
if (BG == 1) if (BG == 1)
{ {
nrLDPC_cn2bnProcBuf_BG1(p_lut, p_procBuf, Z); if (p_lut->cn2bnProcBuf2 == NULL) nrLDPC_cn2bnProcBuf_BG1(p_lut, p_procBuf, Z);
else nrLDPC_cn2bnProcBuf2_BG1(p_lut,p_procBuf, Z);
} }
else else
{ {
...@@ -202,7 +386,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP ...@@ -202,7 +386,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#endif #endif
if (BG == 1) if (BG == 1)
{ {
nrLDPC_bn2cnProcBuf_BG1(p_lut, p_procBuf, Z); if (p_lut->cn2bnProcBuf2 == NULL) nrLDPC_bn2cnProcBuf_BG1(p_lut, p_procBuf, Z);
else nrLDPC_bn2cnProcBuf2_BG1(p_lut,p_procBuf, Z);
} }
else else
{ {
...@@ -253,7 +438,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP ...@@ -253,7 +438,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#endif #endif
if (BG == 1) if (BG == 1)
{ {
nrLDPC_cn2bnProcBuf_BG1(p_lut, p_procBuf, Z); if (p_lut->cn2bnProcBuf2 == NULL) nrLDPC_cn2bnProcBuf_BG1(p_lut, p_procBuf, Z);
else nrLDPC_cn2bnProcBuf2_BG1(p_lut,p_procBuf, Z);
} }
else else
{ {
...@@ -298,7 +484,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP ...@@ -298,7 +484,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#endif #endif
if (BG == 1) if (BG == 1)
{ {
nrLDPC_bn2cnProcBuf_BG1(p_lut, p_procBuf, Z); if (p_lut->cn2bnProcBuf2 == NULL) nrLDPC_bn2cnProcBuf_BG1(p_lut, p_procBuf, Z);
else nrLDPC_bn2cnProcBuf2_BG1(p_lut,p_procBuf, Z);
} }
else else
{ {
...@@ -364,7 +551,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP ...@@ -364,7 +551,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#endif #endif
if (BG == 1) if (BG == 1)
{ {
nrLDPC_cn2bnProcBuf_BG1(p_lut, p_procBuf, Z); if (p_lut->cn2bnProcBuf2 == NULL) nrLDPC_cn2bnProcBuf_BG1(p_lut, p_procBuf, Z);
else nrLDPC_cn2bnProcBuf2_BG1(p_lut,p_procBuf, Z);
} }
else else
{ {
...@@ -412,7 +600,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP ...@@ -412,7 +600,8 @@ static inline uint32_t nrLDPC_decoder_core(int8_t* p_llr, int8_t* p_out, t_nrLDP
#endif #endif
if (BG == 1) if (BG == 1)
{ {
nrLDPC_bn2cnProcBuf_BG1(p_lut, p_procBuf, Z); if (p_lut->cn2bnProcBuf2 == NULL) nrLDPC_bn2cnProcBuf_BG1(p_lut, p_procBuf, Z);
else nrLDPC_bn2cnProcBuf2_BG1(p_lut,p_procBuf, Z);
} }
else else
{ {
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include "nrLDPC_types.h" #include "nrLDPC_types.h"
#include "nrLDPC_init_mem.h" #include "nrLDPC_init_mem.h"
void nrLDPC_prep(void);
/** /**
\brief LDPC decoder \brief LDPC decoder
\param p_decParams LDPC decoder parameters \param p_decParams LDPC decoder parameters
...@@ -41,6 +43,8 @@ ...@@ -41,6 +43,8 @@
\param p_llrOut Output vector \param p_llrOut Output vector
\param p_profiler LDPC profiler statistics \param p_profiler LDPC profiler statistics
*/ */
int32_t nrLDPC_decoder(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_llrOut, t_nrLDPC_procBuf* p_procBuf, t_nrLDPC_time_stats* p_profiler); int32_t nrLDPC_decoder(t_nrLDPC_dec_params* p_decParams, int8_t* p_llr, int8_t* p_llrOut, t_nrLDPC_procBuf* p_procBuf, t_nrLDPC_time_stats* p_profiler);
#endif #endif
static const uint32_t lut_cn2bnProcBuf_BG1_Z2_R13[632] = {111361, 111360, 100224, 100225, 0, 1, 105985, 105984, 107904, 107905, 120193, 120192, 120577, 120576, 109441, 109440, 40704, 40705, 74498, 74499, 43011, 43010, 47233, 47232, 43009, 43008, 41858, 41859, 19200, 19201, 61447, 61446, 23425, 23424, 92547, 92546, 46, 47, 66, 67, 72, 73, 76, 77, 82, 83, 116736, 116737, 105216, 105217, 105601, 105600, 117505, 117504, 117888, 117889, 106368, 106369, 118272, 118273, 106753, 106752, 118657, 118656, 107136, 107137, 119041, 119040, 107521, 107520, 119425, 119424, 119809, 119808, 108289, 108288, 108673, 108672, 109057, 109056, 120961, 120960, 87940, 87941, 30337, 30336, 39552, 39553, 31873, 31872, 46849, 46848, 58370, 58371, 89475, 89474, 87937, 87936, 89476, 89477, 33409, 33408, 89473, 89472, 41857, 41856, 61443, 61442, 30339, 30338, 73345, 73344, 74497, 74496, 61445, 61444, 92545, 92544, 72194, 72195, 87938, 87939, 86400, 86401, 46465, 46464, 31879, 31878, 97536, 97537, 73346, 73347, 89478, 89479, 59907, 59906, 61441, 61440, 31876, 31877, 91013, 91012, 33413, 33412, 91011, 91010, 91009, 91008, 31875, 31874, 98689, 98688, 33411, 33410, 58374, 58375, 97152, 97153, 56834, 56835, 30341, 30340, 73349, 73348, 21890, 21891, 21889, 21888, 22659, 22658, 22657, 22656, 74501, 74500, 59911, 59910, 91015, 91014, 97920, 97921, 92549, 92548, 33414, 33415, 98305, 98304, 23427, 23426, 92551, 92550, 36, 37, 38, 39, 42, 43, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 68, 69, 70, 71, 74, 75, 78, 79, 80, 81, 114433, 114432, 103680, 103681, 115585, 115584, 104064, 104065, 115968, 115969, 116353, 116352, 104833, 104832, 117120, 117121, 68736, 68737, 69889, 69888, 55298, 55299, 86405, 86404, 104449, 104448, 71040, 71041, 17281, 17280, 72192, 72193, 83329, 83328, 56833, 56832, 58373, 58372, 71042, 71043, 84864, 84865, 28803, 28802, 59909, 59908, 46080, 46081, 40709, 40708, 41861, 41860, 56839, 56838, 96769, 96768, 40707, 40706, 58369, 58368, 43013, 43012, 59904, 59905, 18816, 18817, 84870, 84871, 71044, 71045, 30343, 30342, 86402, 86403, 86406, 86407, 72197, 72196, 87942, 87943, 18, 19, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 40, 41, 112512, 112513, 102144, 102145, 114048, 114049, 114816, 114817, 115200, 115201, 100992, 100993, 28801, 28800, 102912, 102913, 84869, 84868, 103296, 103297, 45313, 45312, 45697, 45696, 83331, 83330, 28804, 28805, 84867, 84866, 80257, 80256, 81792, 81793, 55296, 55297, 56837, 56836, 69891, 69890, 38403, 38402, 39555, 39554, 68738, 68739, 55302, 55303, 96385, 96384, 52226, 52227, 53762, 53763, 96001, 96000, 69893, 69892, 21123, 21122, 6, 7, 12, 13, 16, 17, 20, 21, 22, 23, 111745, 111744, 113665, 113664, 100608, 100609, 102529, 102528, 66432, 66433, 83333, 83332, 80261, 80260, 55300, 55301, 52228, 52229, 68740, 68741, 66437, 66436, 83334, 83335, 80263, 80262, 18432, 18433, 2, 3, 14, 15, 112129, 112128, 113281, 113280, 38400, 38401, 101760, 101761, 80258, 80259, 81795, 81794, 52225, 52224, 53761, 53760, 66434, 66435, 67586, 67587, 52231, 52230, 53766, 53767, 95233, 95232, 95617, 95616, 38405, 38404, 39556, 39557, 4, 5, 10, 11, 112896, 112897, 101376, 101377, 67585, 67584, 81797, 81796, 53764, 53765, 28806, 28807, 67589, 67588, 81799, 81798, 21120, 21121, 8, 9, 109824, 109825, 110208, 110209, 110592, 110593, 110977, 110976, 99073, 99072, 25729, 25728, 99457, 99456, 99841, 99840, 24192, 24193, 64129, 64128, 27265, 27264, 65280, 65281, 62977, 62976, 44160, 44161, 44545, 44544, 44928, 44929, 16128, 16129, 16513, 16512, 16897, 16896, 37248, 37249, 34944, 34945, 75648, 75649, 36097, 36096, 78721, 78720, 24195, 24194, 34946, 34947, 77185, 77184, 37251, 37250, 75651, 75650, 25731, 25730, 36099, 36098, 78722, 78723, 47616, 47617, 49152, 49153, 27267, 27266, 50688, 50689, 75653, 75652, 77188, 77189, 77187, 77186, 78724, 78725, 62979, 62978, 47619, 47618, 64130, 64131, 65283, 65282, 24197, 24196, 25732, 25733, 49155, 49154, 50691, 50690, 47621, 47620, 49156, 49157, 27269, 27268, 50692, 50693, 94080, 94081, 47623, 47622, 49159, 49158, 50694, 50695, 24199, 24198, 25735, 25734, 94465, 94464, 94848, 94849, 34949, 34948, 64132, 64133, 27271, 27270, 37252, 37253, 62981, 62980, 77190, 77191, 36101, 36100, 65284, 65285, 75655, 75654, 18048, 18049, 20352, 20353, 78727, 78726, 17664, 17665, 19584, 19585, 19586, 19587, 20354, 20355}; uint32_t *lut_cn2bnProcBuf2_BG1_Z2_R13=NULL;
\ No newline at end of file uint32_t lut_cn2bnProcBuf2_BG1_Z2_R13_size=0;
static const uint32_t lut_cn2bnProcBuf_BG1_Z2_R13[632] = {111361, 111360, 100224, 100225, 0, 1, 105985, 105984, 107904, 107905, 120193, 120192, 120577, 120576, 109441, 109440, 40704, 40705, 74498, 74499, 43011, 43010, 47233, 47232, 43009, 43008, 41858, 41859, 19200, 19201, 61447, 61446, 23425, 23424, 92547, 92546, 46, 47, 66, 67, 72, 73, 76, 77, 82, 83, 116736, 116737, 105216, 105217, 105601, 105600, 117505, 117504, 117888, 117889, 106368, 106369, 118272, 118273, 106753, 106752, 118657, 118656, 107136, 107137, 119041, 119040, 107521, 107520, 119425, 119424, 119809, 119808, 108289, 108288, 108673, 108672, 109057, 109056, 120961, 120960, 87940, 87941, 30337, 30336, 39552, 39553, 31873, 31872, 46849, 46848, 58370, 58371, 89475, 89474, 87937, 87936, 89476, 89477, 33409, 33408, 89473, 89472, 41857, 41856, 61443, 61442, 30339, 30338, 73345, 73344, 74497, 74496, 61445, 61444, 92545, 92544, 72194, 72195, 87938, 87939, 86400, 86401, 46465, 46464, 31879, 31878, 97536, 97537, 73346, 73347, 89478, 89479, 59907, 59906, 61441, 61440, 31876, 31877, 91013, 91012, 33413, 33412, 91011, 91010, 91009, 91008, 31875, 31874, 98689, 98688, 33411, 33410, 58374, 58375, 97152, 97153, 56834, 56835, 30341, 30340, 73349, 73348, 21890, 21891, 21889, 21888, 22659, 22658, 22657, 22656, 74501, 74500, 59911, 59910, 91015, 91014, 97920, 97921, 92549, 92548, 33414, 33415, 98305, 98304, 23427, 23426, 92551, 92550, 36, 37, 38, 39, 42, 43, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 68, 69, 70, 71, 74, 75, 78, 79, 80, 81, 114433, 114432, 103680, 103681, 115585, 115584, 104064, 104065, 115968, 115969, 116353, 116352, 104833, 104832, 117120, 117121, 68736, 68737, 69889, 69888, 55298, 55299, 86405, 86404, 104449, 104448, 71040, 71041, 17281, 17280, 72192, 72193, 83329, 83328, 56833, 56832, 58373, 58372, 71042, 71043, 84864, 84865, 28803, 28802, 59909, 59908, 46080, 46081, 40709, 40708, 41861, 41860, 56839, 56838, 96769, 96768, 40707, 40706, 58369, 58368, 43013, 43012, 59904, 59905, 18816, 18817, 84870, 84871, 71044, 71045, 30343, 30342, 86402, 86403, 86406, 86407, 72197, 72196, 87942, 87943, 18, 19, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 40, 41, 112512, 112513, 102144, 102145, 114048, 114049, 114816, 114817, 115200, 115201, 100992, 100993, 28801, 28800, 102912, 102913, 84869, 84868, 103296, 103297, 45313, 45312, 45697, 45696, 83331, 83330, 28804, 28805, 84867, 84866, 80257, 80256, 81792, 81793, 55296, 55297, 56837, 56836, 69891, 69890, 38403, 38402, 39555, 39554, 68738, 68739, 55302, 55303, 96385, 96384, 52226, 52227, 53762, 53763, 96001, 96000, 69893, 69892, 21123, 21122, 6, 7, 12, 13, 16, 17, 20, 21, 22, 23, 111745, 111744, 113665, 113664, 100608, 100609, 102529, 102528, 66432, 66433, 83333, 83332, 80261, 80260, 55300, 55301, 52228, 52229, 68740, 68741, 66437, 66436, 83334, 83335, 80263, 80262, 18432, 18433, 2, 3, 14, 15, 112129, 112128, 113281, 113280, 38400, 38401, 101760, 101761, 80258, 80259, 81795, 81794, 52225, 52224, 53761, 53760, 66434, 66435, 67586, 67587, 52231, 52230, 53766, 53767, 95233, 95232, 95617, 95616, 38405, 38404, 39556, 39557, 4, 5, 10, 11, 112896, 112897, 101376, 101377, 67585, 67584, 81797, 81796, 53764, 53765, 28806, 28807, 67589, 67588, 81799, 81798, 21120, 21121, 8, 9, 109824, 109825, 110208, 110209, 110592, 110593, 110977, 110976, 99073, 99072, 25729, 25728, 99457, 99456, 99841, 99840, 24192, 24193, 64129, 64128, 27265, 27264, 65280, 65281, 62977, 62976, 44160, 44161, 44545, 44544, 44928, 44929, 16128, 16129, 16513, 16512, 16897, 16896, 37248, 37249, 34944, 34945, 75648, 75649, 36097, 36096, 78721, 78720, 24195, 24194, 34946, 34947, 77185, 77184, 37251, 37250, 75651, 75650, 25731, 25730, 36099, 36098, 78722, 78723, 47616, 47617, 49152, 49153, 27267, 27266, 50688, 50689, 75653, 75652, 77188, 77189, 77187, 77186, 78724, 78725, 62979, 62978, 47619, 47618, 64130, 64131, 65283, 65282, 24197, 24196, 25732, 25733, 49155, 49154, 50691, 50690, 47621, 47620, 49156, 49157, 27269, 27268, 50692, 50693, 94080, 94081, 47623, 47622, 49159, 49158, 50694, 50695, 24199, 24198, 25735, 25734, 94465, 94464, 94848, 94849, 34949, 34948, 64132, 64133, 27271, 27270, 37252, 37253, 62981, 62980, 77190, 77191, 36101, 36100, 65284, 65285, 75655, 75654, 18048, 18049, 20352, 20353, 78727, 78726, 17664, 17665, 19584, 19585, 19586, 19587, 20354, 20355};
...@@ -99,6 +99,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB, ...@@ -99,6 +99,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
while(gNB->configured == 0) usleep(10000); while(gNB->configured == 0) usleep(10000);
init_dfts(); init_dfts();
nrLDPC_prep();
/* /*
LOG_I(PHY,"[gNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n", LOG_I(PHY,"[gNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n",
gNB->Mod_id, gNB->Mod_id,
......
...@@ -1014,6 +1014,7 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue) ...@@ -1014,6 +1014,7 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue)
crcTableInit(); crcTableInit();
init_dfts(); init_dfts();
nrLDPC_prep();
init_context_synchro_nr(frame_parms); init_context_synchro_nr(frame_parms);
......
This diff is collapsed.
...@@ -74,7 +74,11 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch, ...@@ -74,7 +74,11 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
int frame, int frame,
uint8_t slot, uint8_t slot,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
nfapi_nr_config_request_t *config); nfapi_nr_config_request_t *config,
time_stats_t *dlsch_encoding_stats,
time_stats_t *dlsch_scrambling_stats,
time_stats_t *dlsch_modulation_stats);
void free_gNB_dlsch(NR_gNB_DLSCH_t *dlsch); void free_gNB_dlsch(NR_gNB_DLSCH_t *dlsch);
......
This diff is collapsed.
...@@ -491,6 +491,8 @@ typedef struct gNB_L1_proc_t_s { ...@@ -491,6 +491,8 @@ typedef struct gNB_L1_proc_t_s {
pthread_t pthread_single; pthread_t pthread_single;
/// pthread structure for asychronous RX/TX processing thread /// pthread structure for asychronous RX/TX processing thread
pthread_t pthread_asynch_rxtx; pthread_t pthread_asynch_rxtx;
/// pthread structure for printing time meas
pthread_t L1_stats_thread;
/// flag to indicate first RX acquisition /// flag to indicate first RX acquisition
int first_rx; int first_rx;
/// flag to indicate first TX transmission /// flag to indicate first TX transmission
......
...@@ -200,7 +200,10 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB, ...@@ -200,7 +200,10 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
&gNB->pdcch_vars.dci_alloc[i], &gNB->pdcch_vars.dci_alloc[i],
gNB->nr_gold_pdsch_dmrs[slot], gNB->nr_gold_pdsch_dmrs[slot],
gNB->common_vars.txdataF, gNB->common_vars.txdataF,
AMP, frame, slot, fp, cfg); AMP, frame, slot, fp, cfg,
&gNB->dlsch_encoding_stats,
&gNB->dlsch_scrambling_stats,
&gNB->dlsch_modulation_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_GENERATE_DLSCH,0);
} }
......
This diff is collapsed.
...@@ -610,6 +610,8 @@ int main(int argc, char **argv) ...@@ -610,6 +610,8 @@ int main(int argc, char **argv)
dl_config->dl_config_list[0].dci_config_pdu.dci_config_rel15.coreset.cce_reg_interleaved_shift_index = cell_id; dl_config->dl_config_list[0].dci_config_pdu.dci_config_rel15.coreset.cce_reg_interleaved_shift_index = cell_id;
dl_config->dl_config_list[0].dci_config_pdu.dci_config_rel15.coreset.precoder_granularity = PRECODER_GRANULARITY_SAME_AS_REG_BUNDLE; dl_config->dl_config_list[0].dci_config_pdu.dci_config_rel15.coreset.precoder_granularity = PRECODER_GRANULARITY_SAME_AS_REG_BUNDLE;
dl_config->dl_config_list[0].dci_config_pdu.dci_config_rel15.coreset.pdcch_dmrs_scrambling_id = cell_id; dl_config->dl_config_list[0].dci_config_pdu.dci_config_rel15.coreset.pdcch_dmrs_scrambling_id = cell_id;
uint8_t gnb_start_symbol = Sched_INFO.DL_req->dl_config_request_body.dl_config_pdu_list[1].dlsch_pdu.dlsch_pdu_rel15.start_symbol;
dl_config->dl_config_list[0].dlsch_config_pdu.dlsch_config_rel15.start_symbol = gnb_start_symbol;
uint32_t number_of_search_space_per_slot=1; uint32_t number_of_search_space_per_slot=1;
uint32_t first_symbol_index=0; uint32_t first_symbol_index=0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment