Merge branch NR_RRC_harq_hacks into NR_RRC_PDCP
This commit is contained in:
@@ -4,7 +4,7 @@ For more details of the license, refer to [LICENSE](LICENSE) file in the same di
|
||||
|
||||
However, the source code also contains third party software that is acknowledged here for reference.
|
||||
|
||||
## Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/liblfds6.1.1/ ##
|
||||
## Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/ ##
|
||||
|
||||
See on [liblfds website](https://liblfds.org/) the license section.
|
||||
|
||||
|
||||
@@ -5,3 +5,5 @@ iperf_*.*
|
||||
phones_list.txt
|
||||
modules_list.txt
|
||||
test_results*.html
|
||||
pMain*
|
||||
__pycache__
|
||||
|
||||
@@ -142,13 +142,39 @@ pipeline {
|
||||
stage ("Load Images") {
|
||||
steps {
|
||||
script {
|
||||
// Adding a tempo after booking leases
|
||||
sh "sleep 10"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rleases --check'"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'all-off'"
|
||||
sh "sleep 10"
|
||||
|
||||
echo '\u2705 \u001B[32mLoad Image for Python Executor\u001B[0m'
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labPythonExeIdx} > /dev/null 2>&1'"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labPythonExeIdx}'"
|
||||
try {
|
||||
//sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labPythonExeIdx} > /dev/null 2>&1'"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labPythonExeIdx}'"
|
||||
} catch (Exception e) {
|
||||
echo "Why is it wrong?"
|
||||
}
|
||||
try {
|
||||
//sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labPythonExeIdx}'"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait ${r2labPythonExeIdx}'"
|
||||
} catch (Exception e) {
|
||||
echo "Why is it wrong?"
|
||||
}
|
||||
|
||||
echo '\u2705 \u001B[32mLoad Image for two (2) eNBs\u001B[0m'
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labENB0Idx},${r2labENB1Idx} > /dev/null 2>&1'"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labENB0Idx},${r2labENB1Idx}'"
|
||||
try {
|
||||
//sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labENB0Idx},${r2labENB1Idx} > /dev/null 2>&1'"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labENB0Idx},${r2labENB1Idx}"
|
||||
} catch (Exception e) {
|
||||
echo "Why is it wrong?"
|
||||
}
|
||||
try {
|
||||
//sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labENB0Idx},${r2labENB1Idx}'"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait ${r2labENB0Idx},${r2labENB1Idx}'"
|
||||
} catch (Exception e) {
|
||||
echo "Why is it wrong?"
|
||||
}
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'uon ${r2labENB0Idx},${r2labENB1Idx}'"
|
||||
sh "sleep 5"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'uon ${r2labENB0Idx},${r2labENB1Idx}'"
|
||||
|
||||
@@ -62,6 +62,30 @@ then
|
||||
NB_FILES_TO_FORMAT=`astyle --dry-run --options=ci-scripts/astyle-options.txt --recursive *.c *.h | grep -c Formatted `
|
||||
echo "Nb Files that do NOT follow OAI rules: $NB_FILES_TO_FORMAT"
|
||||
echo $NB_FILES_TO_FORMAT > ./oai_rules_result.txt
|
||||
|
||||
# Testing Circular Dependencies protection
|
||||
awk '/#[ \t]*ifndef/ { gsub("^.*ifndef *",""); if (names[$1]!="") print "files with same {define ", FILENAME, names[$1]; names[$1]=FILENAME } /#[ \t]*define/ { gsub("^.*define *",""); if(names[$1]!=FILENAME) print "error in declaration", FILENAME, $1, names[$1]; nextfile }' `find openair* common targets executables -name *.h |grep -v LFDS` > header-files-w-incorrect-define.txt
|
||||
|
||||
# Testing if explicit GNU GPL license banner
|
||||
egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "General Public License" . > files-w-gnu-gpl-license-banner.txt
|
||||
|
||||
# Looking at exotic/suspect banner
|
||||
LIST_OF_FILES_W_BANNER=`egrep -irl --exclude-dir=.git --include=*.cpp --include=*.c --include=*.h "Copyright|copyleft" .`
|
||||
if [ -f ./files-w-suspect-banner.txt ]; then rm -f ./files-w-suspect-banner.txt; fi
|
||||
for FILE in $LIST_OF_FILES_W_BANNER
|
||||
do
|
||||
IS_NFAPI=`echo $FILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext"`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FILE`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FILE`
|
||||
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h"`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
then
|
||||
echo $FILE >> ./files-w-suspect-banner.txt
|
||||
fi
|
||||
fi
|
||||
done
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -131,8 +155,25 @@ if [ -f oai_rules_result_list.txt ]
|
||||
then
|
||||
rm -f oai_rules_result_list.txt
|
||||
fi
|
||||
if [ -f header-files-w-incorrect-define.txt ]
|
||||
then
|
||||
rm -f header-files-w-incorrect-define.txt
|
||||
fi
|
||||
if [ -f files-w-gnu-gpl-license-banner.txt ]
|
||||
then
|
||||
rm -f files-w-gnu-gpl-license-banner.txt
|
||||
fi
|
||||
if [ -f files-w-suspect-banner.txt ]
|
||||
then
|
||||
rm -f files-w-suspect-banner.txt
|
||||
fi
|
||||
awk '/#[ \t]*ifndef/ { gsub("^.*ifndef *",""); if (names[$1]!="") print "files with same {define ", FILENAME, names[$1]; names[$1]=FILENAME } /#[ \t]*define/ { gsub("^.*define *",""); if(names[$1]!=FILENAME) print "error in declaration", FILENAME, $1, names[$1]; nextfile }' `find openair* common targets executables -name *.h |grep -v LFDS` > header-files-w-incorrect-define-tmp.txt
|
||||
|
||||
for FULLFILE in $MODIFIED_FILES
|
||||
do
|
||||
# sometimes, we remove files
|
||||
if [ ! -f $FULLFILE ]; then continue; fi
|
||||
|
||||
filename=$(basename -- "$FULLFILE")
|
||||
EXT="${filename##*.}"
|
||||
if [ $EXT = "c" ] || [ $EXT = "h" ] || [ $EXT = "cpp" ] || [ $EXT = "hpp" ]
|
||||
@@ -144,8 +185,32 @@ do
|
||||
echo $FULLFILE
|
||||
echo $FULLFILE >> ./oai_rules_result_list.txt
|
||||
fi
|
||||
# Testing if explicit GNU GPL license banner
|
||||
egrep -i "General Public License" $FULLFILE >> files-w-gnu-gpl-license-banner.txt
|
||||
# Looking at exotic/suspect banner
|
||||
IS_BANNER=`egrep -i -c "Copyright|copyleft" $FULLFILE`
|
||||
if [ $IS_BANNER -ne 0 ]
|
||||
then
|
||||
IS_NFAPI=`echo $FULLFILE | egrep -c "nfapi/open-nFAPI|nfapi/oai_integration/vendor_ext"`
|
||||
IS_OAI_LICENCE_PRESENT=`egrep -c "OAI Public License" $FULLFILE`
|
||||
IS_BSD_LICENCE_PRESENT=`egrep -c "the terms of the BSD Licence" $FULLFILE`
|
||||
IS_EXCEPTION=`echo $FILE | egrep -c "common/utils/collection/tree.h|common/utils/collection/queue.h|common/utils/itti_analyzer/common/queue.h|openair3/UTILS/tree.h|openair3/UTILS/queue.h"`
|
||||
if [ $IS_OAI_LICENCE_PRESENT -eq 0 ] && [ $IS_BSD_LICENCE_PRESENT -eq 0 ]
|
||||
then
|
||||
if [ $IS_NFAPI -eq 0 ] && [ $IS_EXCEPTION -eq 0 ]
|
||||
then
|
||||
echo $FILE >> ./files-w-suspect-banner.txt
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
# Testing Circular Dependencies protection
|
||||
if [ $EXT = "h" ] || [ $EXT = "hpp" ]
|
||||
then
|
||||
grep $FULLFILE header-files-w-incorrect-define-tmp.txt >> header-files-w-incorrect-define.txt
|
||||
fi
|
||||
done
|
||||
rm -f header-files-w-incorrect-define-tmp.txt
|
||||
echo ""
|
||||
echo " ----------------------------------------------------------"
|
||||
echo "Nb Files that do NOT follow OAI rules: $NB_TO_FORMAT"
|
||||
|
||||
@@ -288,7 +288,7 @@ MCEs = (
|
||||
mnc_length = 2;
|
||||
}
|
||||
service_id=0;
|
||||
lcid=8; #this must be properly defined lcid:8+service:0 -> rab_id:8
|
||||
lcid=5; #this must be properly defined lcid:8+service:0 -> rab_id:5
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
#/*
|
||||
# * 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
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Version
|
||||
#-----------------------------------------------------------
|
||||
Version = '0.2'
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Constants
|
||||
#-----------------------------------------------------------
|
||||
ALL_PROCESSES_OK = 0
|
||||
ENB_PROCESS_FAILED = -1
|
||||
ENB_PROCESS_OK = +1
|
||||
ENB_PROCESS_SEG_FAULT = -11
|
||||
ENB_PROCESS_ASSERTION = -12
|
||||
ENB_PROCESS_REALTIME_ISSUE = -13
|
||||
ENB_PROCESS_NOLOGFILE_TO_ANALYZE = -14
|
||||
ENB_PROCESS_SLAVE_RRU_NOT_SYNCED = -15
|
||||
HSS_PROCESS_FAILED = -2
|
||||
HSS_PROCESS_OK = +2
|
||||
MME_PROCESS_FAILED = -3
|
||||
MME_PROCESS_OK = +3
|
||||
SPGW_PROCESS_FAILED = -4
|
||||
SPGW_PROCESS_OK = +4
|
||||
UE_IP_ADDRESS_ISSUE = -5
|
||||
OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE = -20
|
||||
OAI_UE_PROCESS_COULD_NOT_SYNC = -21
|
||||
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_OK = +6
|
||||
|
||||
UE_STATUS_DETACHED = 0
|
||||
UE_STATUS_DETACHING = 1
|
||||
UE_STATUS_ATTACHING = 2
|
||||
UE_STATUS_ATTACHED = 3
|
||||
|
||||
X2_HO_REQ_STATE__IDLE = 0
|
||||
X2_HO_REQ_STATE__TARGET_RECEIVES_REQ = 1
|
||||
X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE = 2
|
||||
X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ = 3
|
||||
X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK = 10
|
||||
@@ -76,6 +76,11 @@ nullPointer:common/utils/T/local_tracer.c:243
|
||||
// first iteration of the loop
|
||||
nullPointer:common/utils/T/tracer/multi.c:264
|
||||
nullPointer:common/utils/T/tracer/multi.c:265
|
||||
//-----------------------------------------------------------------------------
|
||||
// this file is used for testing the RLC V2 implementation, this error is
|
||||
// not a problem, the programmer has to know what she does when writing
|
||||
// the tests
|
||||
arrayIndexOutOfBounds:openair2/LAYER2/rlc_v2/tests/test.c:401
|
||||
//
|
||||
//*****************************************************************************
|
||||
//
|
||||
|
||||
@@ -0,0 +1,400 @@
|
||||
#/*
|
||||
# * 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
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
import sys # arg
|
||||
import re # reg
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import signal
|
||||
|
||||
from multiprocessing import Process, Lock, SimpleQueue
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# OAI Testing modules
|
||||
#-----------------------------------------------------------
|
||||
import sshconnection as SSH
|
||||
import helpreadme as HELP
|
||||
import constants as CONST
|
||||
import html
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Class Declaration
|
||||
#-----------------------------------------------------------
|
||||
class EPCManagement():
|
||||
|
||||
def __init__(self):
|
||||
|
||||
self.IPAddress = ''
|
||||
self.UserName = ''
|
||||
self.Password = ''
|
||||
self.SourceCodePath = ''
|
||||
self.Type = ''
|
||||
self.PcapFileName = ''
|
||||
self.htmlObj = None
|
||||
self.testCase_id = ''
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Setter and Getters on Public Members
|
||||
#-----------------------------------------------------------
|
||||
|
||||
def SetIPAddress(self, ipaddress):
|
||||
self.IPAddress = ipaddress
|
||||
def GetIPAddress(self):
|
||||
return self.IPAddress
|
||||
def SetUserName(self, username):
|
||||
self.UserName = username
|
||||
def GetUserName(self):
|
||||
return self.UserName
|
||||
def SetPassword(self, password):
|
||||
self.Password = password
|
||||
def GetPassword(self):
|
||||
return self.Password
|
||||
def SetSourceCodePath(self, sourcecodepath):
|
||||
self.SourceCodePath = sourcecodepath
|
||||
def GetSourceCodePath(self):
|
||||
return self.SourceCodePath
|
||||
def SetType(self, kind):
|
||||
self.Type = kind
|
||||
def GetType(self):
|
||||
return self.Type
|
||||
def SetHtmlObj(self, obj):
|
||||
self.htmlObj = obj
|
||||
def SetTestCase_id(self, idx):
|
||||
self.testCase_id = idx
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# EPC management functions
|
||||
#-----------------------------------------------------------
|
||||
|
||||
def InitializeHSS(self):
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
|
||||
sys.exit('Insufficient EPC Parameters')
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 Cassandra-based HSS')
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
logging.debug('\u001B[1m Launching tshark on all interfaces \u001B[0m')
|
||||
self.PcapFileName = 'epc_' + self.testCase_id + '.pcap'
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f ' + self.PcapFileName, '\$', 5)
|
||||
mySSH.command('echo $USER; nohup sudo tshark -f "tcp port not 22 and port not 53" -i any -w ' + self.SourceCodePath + '/scripts/' + self.PcapFileName + ' > /tmp/tshark.log 2>&1 &', self.UserName, 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S mkdir -p logs', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f hss_' + self.testCase_id + '.log logs/hss*.*', '\$', 5)
|
||||
mySSH.command('echo "oai_hss -j /usr/local/etc/oai/hss_rel14.json" > ./my-hss.sh', '\$', 5)
|
||||
mySSH.command('chmod 755 ./my-hss.sh', '\$', 5)
|
||||
mySSH.command('sudo daemon --unsafe --name=hss_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/hss_' + self.testCase_id + '.log ./my-hss.sh', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC HSS')
|
||||
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
|
||||
mySSH.command('source oaienv', '\$', 5)
|
||||
mySSH.command('cd scripts', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./run_hss 2>&1 | stdbuf -o0 awk \'{ print strftime("[%Y/%m/%d %H:%M:%S] ",systime()) $0 }\' | stdbuf -o0 tee -a hss_' + self.testCase_id + '.log &', 'Core state: 2 -> 3', 35)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the ltebox simulated HSS')
|
||||
mySSH.command('if [ -d ' + self.SourceCodePath + '/scripts ]; then echo ' + self.Password + ' | sudo -S rm -Rf ' + self.SourceCodePath + '/scripts ; fi', '\$', 5)
|
||||
mySSH.command('mkdir -p ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('cd /opt/hss_sim0609', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f hss.log', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S echo "Starting sudo session" && sudo su -c "screen -dm -S simulated_hss ./starthss"', '\$', 5)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def InitializeMME(self):
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
|
||||
sys.exit('Insufficient EPC Parameters')
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 MME')
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f mme_' + self.testCase_id + '.log', '\$', 5)
|
||||
mySSH.command('echo "./run_mme --config-file /usr/local/etc/oai/mme.conf --set-virt-if" > ./my-mme.sh', '\$', 5)
|
||||
mySSH.command('chmod 755 ./my-mme.sh', '\$', 5)
|
||||
mySSH.command('sudo daemon --unsafe --name=mme_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/mme_' + self.testCase_id + '.log ./my-mme.sh', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
|
||||
mySSH.command('source oaienv', '\$', 5)
|
||||
mySSH.command('cd scripts', '\$', 5)
|
||||
mySSH.command('stdbuf -o0 hostname', '\$', 5)
|
||||
result = re.search('hostname\\\\r\\\\n(?P<host_name>[a-zA-Z0-9\-\_]+)\\\\r\\\\n', mySSH.getBefore())
|
||||
if result is None:
|
||||
logging.debug('\u001B[1;37;41m Hostname Not Found! \u001B[0m')
|
||||
sys.exit(1)
|
||||
host_name = result.group('host_name')
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./run_mme 2>&1 | stdbuf -o0 tee -a mme_' + self.testCase_id + '.log &', 'MME app initialization complete', 100)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./start_mme', '\$', 5)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def InitializeSPGW(self):
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
HELP.EPCSrvHelp(self.IPAddress, self.UserName, self.Password, self.SourceCodePath, self.Type)
|
||||
sys.exit('Insufficient EPC Parameters')
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 SPGW-CUPS')
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f spgwc_' + self.testCase_id + '.log spgwu_' + self.testCase_id + '.log', '\$', 5)
|
||||
mySSH.command('echo "spgwc -c /usr/local/etc/oai/spgw_c.conf" > ./my-spgwc.sh', '\$', 5)
|
||||
mySSH.command('chmod 755 ./my-spgwc.sh', '\$', 5)
|
||||
mySSH.command('sudo daemon --unsafe --name=spgwc_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/spgwc_' + self.testCase_id + '.log ./my-spgwc.sh', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('echo "spgwu -c /usr/local/etc/oai/spgw_u.conf" > ./my-spgwu.sh', '\$', 5)
|
||||
mySSH.command('chmod 755 ./my-spgwu.sh', '\$', 5)
|
||||
mySSH.command('sudo daemon --unsafe --name=spgwu_daemon --chdir=' + self.SourceCodePath + '/scripts -o ' + self.SourceCodePath + '/scripts/spgwu_' + self.testCase_id + '.log ./my-spgwu.sh', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
|
||||
mySSH.command('source oaienv', '\$', 5)
|
||||
mySSH.command('cd scripts', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./run_spgw 2>&1 | stdbuf -o0 tee -a spgw_' + self.testCase_id + '.log &', 'Initializing SPGW-APP task interface: DONE', 30)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./start_xGw', '\$', 5)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def CheckHSSProcess(self, status_queue):
|
||||
try:
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never hss | grep -v grep', '\$', 5)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
result = re.search('oai_hss -j', mySSH.getBefore())
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
result = re.search('hss_sim s6as diam_hss', mySSH.getBefore())
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
if result is None:
|
||||
logging.debug('\u001B[1;37;41m HSS Process Not Found! \u001B[0m')
|
||||
status_queue.put(CONST.HSS_PROCESS_FAILED)
|
||||
else:
|
||||
status_queue.put(CONST.HSS_PROCESS_OK)
|
||||
mySSH.close()
|
||||
except:
|
||||
os.kill(os.getppid(),signal.SIGUSR1)
|
||||
|
||||
def CheckMMEProcess(self, status_queue):
|
||||
try:
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never mme | grep -v grep', '\$', 5)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
result = re.search('mme -c', mySSH.getBefore())
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
result = re.search('mme', mySSH.getBefore())
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
if result is None:
|
||||
logging.debug('\u001B[1;37;41m MME Process Not Found! \u001B[0m')
|
||||
status_queue.put(CONST.MME_PROCESS_FAILED)
|
||||
else:
|
||||
status_queue.put(CONST.MME_PROCESS_OK)
|
||||
mySSH.close()
|
||||
except:
|
||||
os.kill(os.getppid(),signal.SIGUSR1)
|
||||
|
||||
def CheckSPGWProcess(self, status_queue):
|
||||
try:
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never spgw | grep -v grep', '\$', 5)
|
||||
result = re.search('spgwu -c ', mySSH.getBefore())
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never spgw | grep -v grep', '\$', 5)
|
||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never xGw | grep -v grep', '\$', 5)
|
||||
result = re.search('xGw', mySSH.getBefore())
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
if result is None:
|
||||
logging.debug('\u001B[1;37;41m SPGW Process Not Found! \u001B[0m')
|
||||
status_queue.put(CONST.SPGW_PROCESS_FAILED)
|
||||
else:
|
||||
status_queue.put(CONST.SPGW_PROCESS_OK)
|
||||
mySSH.close()
|
||||
except:
|
||||
os.kill(os.getppid(),signal.SIGUSR1)
|
||||
|
||||
def TerminateHSS(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT oai_hss || true', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep hss | grep -v grep', '\$', 5)
|
||||
result = re.search('oai_hss -j', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL oai_hss || true', '\$', 5)
|
||||
mySSH.command('rm -f ' + self.SourceCodePath + '/scripts/my-hss.sh', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_hss oai_hss || true', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep hss | grep -v grep', '\$', 5)
|
||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_hss oai_hss || true', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd ' + self.SourceCodePath, '\$', 5)
|
||||
mySSH.command('cd scripts', '\$', 5)
|
||||
time.sleep(1)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL hss_sim', '\$', 5)
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
mySSH.close()
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def TerminateMME(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_mme mme || true', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep mme | grep -v grep', '\$', 5)
|
||||
result = re.search('mme -c', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_mme mme || true', '\$', 5)
|
||||
mySSH.command('rm -f ' + self.SourceCodePath + '/scripts/my-mme.sh', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_mme', '\$', 5)
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
mySSH.close()
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def TerminateSPGW(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT spgwc spgwu || true', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep spgw | grep -v grep', '\$', 5)
|
||||
result = re.search('spgwc -c |spgwu -c ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL spgwc spgwu || true', '\$', 5)
|
||||
mySSH.command('rm -f ' + self.SourceCodePath + '/scripts/my-spgw*.sh', '\$', 5)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep tshark | grep -v grep', '\$', 5)
|
||||
result = re.search('-w ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT tshark || true', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S chmod 666 ' + self.SourceCodePath + '/scripts/*.pcap', '\$', 5)
|
||||
elif re.match('OAI', self.Type, re.IGNORECASE):
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGINT run_spgw spgw || true', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep spgw | grep -v grep', '\$', 5)
|
||||
result = re.search('\/bin\/bash .\/run_', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S killall --signal SIGKILL run_spgw spgw || true', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cd /opt/ltebox/tools', '\$', 5)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S ./stop_xGw', '\$', 5)
|
||||
else:
|
||||
logging.error('This should not happen!')
|
||||
mySSH.close()
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def LogCollectHSS(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('rm -f hss.log.zip', '\$', 5)
|
||||
if re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('zip hss.log.zip hss*.log', '\$', 60)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm hss*.log', '\$', 5)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('zip hss.log.zip logs/hss*.* *.pcap', '\$', 60)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm -f logs/hss*.* *.pcap', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cp /opt/hss_sim0609/hss.log .', '\$', 60)
|
||||
mySSH.command('zip hss.log.zip hss.log', '\$', 60)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
|
||||
def LogCollectMME(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('rm -f mme.log.zip', '\$', 5)
|
||||
if re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('zip mme.log.zip mme*.log', '\$', 60)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm mme*.log', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cp /opt/ltebox/var/log/*Log.0 .', '\$', 5)
|
||||
mySSH.command('zip mme.log.zip mmeLog.0 s1apcLog.0 s1apsLog.0 s11cLog.0 libLog.0 s1apCodecLog.0', '\$', 60)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
|
||||
def LogCollectSPGW(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('cd ' + self.SourceCodePath + '/scripts', '\$', 5)
|
||||
mySSH.command('rm -f spgw.log.zip', '\$', 5)
|
||||
if re.match('OAI', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
mySSH.command('zip spgw.log.zip spgw*.log', '\$', 60)
|
||||
mySSH.command('echo ' + self.Password + ' | sudo -S rm spgw*.log', '\$', 5)
|
||||
elif re.match('ltebox', self.Type, re.IGNORECASE):
|
||||
mySSH.command('cp /opt/ltebox/var/log/xGwLog.0 .', '\$', 5)
|
||||
mySSH.command('zip spgw.log.zip xGwLog.0', '\$', 60)
|
||||
else:
|
||||
logging.error('This option should not occur!')
|
||||
mySSH.close()
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
#/*
|
||||
# * 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
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Functions Declaration
|
||||
#-----------------------------------------------------------
|
||||
|
||||
def GenericHelp(vers):
|
||||
print('----------------------------------------------------------------------------------------------------------------------')
|
||||
print('main.py Ver: ' + vers)
|
||||
print('----------------------------------------------------------------------------------------------------------------------')
|
||||
print('python main.py [options]')
|
||||
print(' --help Show this help.')
|
||||
print(' --mode=[Mode]')
|
||||
print(' TesteNB')
|
||||
print(' InitiateHtml, FinalizeHtml')
|
||||
print(' TerminateeNB, TerminateUE, TerminateHSS, TerminateMME, TerminateSPGW')
|
||||
print(' LogCollectBuild, LogCollecteNB, LogCollectHSS, LogCollectMME, LogCollectSPGW, LogCollectPing, LogCollectIperf')
|
||||
|
||||
def GitSrvHelp(repository,branch,commit,mergeallow,targetbranch):
|
||||
print(' --ranRepository=[OAI RAN Repository URL] -- ' + repository)
|
||||
print(' --ranBranch=[OAI RAN Repository Branch] -- ' + branch)
|
||||
print(' --ranCommitID=[OAI RAN Repository Commit SHA-1] -- ' + commit)
|
||||
print(' --ranAllowMerge=[Allow Merge Request (with target branch) (true or false)] -- ' + mergeallow)
|
||||
print(' --ranTargetBranch=[Target Branch in case of a Merge Request] -- ' + targetbranch)
|
||||
|
||||
def eNBSrvHelp(ipaddr, username, password, sourcepath):
|
||||
print(' --eNBIPAddress=[eNB\'s IP Address] -- ' + ipaddr)
|
||||
print(' --eNBUserName=[eNB\'s Login User Name] -- ' + username)
|
||||
print(' --eNBPassword=[eNB\'s Login Password] -- ' + password)
|
||||
print(' --eNBSourceCodePath=[eNB\'s Source Code Path] -- ' + sourcepath)
|
||||
|
||||
def OAIUESrvHelp(ipaddr, username, password, sourcepath):
|
||||
print(' --UEIPAddress=[UE\'s IP Address] -- ' + ipaddr)
|
||||
print(' --UEUserName=[UE\'s Login User Name] -- ' + username)
|
||||
print(' --UEPassword=[UE\'s Login Password] -- ' + password)
|
||||
print(' --UESourceCodePath=[UE\'s Source Code Path] -- ' + sourcepath)
|
||||
|
||||
def EPCSrvHelp(ipaddr, username, password, sourcepath, epctype):
|
||||
print(' --EPCIPAddress=[EPC\'s IP Address] -- ' + ipaddr)
|
||||
print(' --EPCUserName=[EPC\'s Login User Name] -- ' + username)
|
||||
print(' --EPCPassword=[EPC\'s Login Password] -- ' + password)
|
||||
print(' --EPCSourceCodePath=[EPC\'s Source Code Path] -- ' + sourcepath)
|
||||
print(' --EPCType=[EPC\'s Type: OAI or ltebox or OAI-Rel14-CUPS] -- ' + epctype)
|
||||
|
||||
def ADBSrvHelp(ipaddr, username, password):
|
||||
print(' --ADBIPAddress=[ADB\'s IP Address] -- ' + ipaddr)
|
||||
print(' --ADBUserName=[ADB\'s Login User Name] -- ' + username)
|
||||
print(' --ADBPassword=[ADB\'s Login Password] -- ' + password)
|
||||
|
||||
def XmlHelp(filename):
|
||||
print(' --XMLTestFile=[XML Test File to be run] -- ' + filename)
|
||||
print(' Note: multiple xml files can be specified (--XMLFile=File1 ... --XMLTestFile=FileN) when HTML headers are created ("InitiateHtml" mode)')
|
||||
|
||||
@@ -0,0 +1,479 @@
|
||||
#/*
|
||||
# * 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
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
import sys # arg
|
||||
import re # reg
|
||||
import logging
|
||||
import os
|
||||
import time
|
||||
import subprocess
|
||||
from multiprocessing import Process, Lock, SimpleQueue
|
||||
|
||||
import constants as CONST
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Class Declaration
|
||||
#-----------------------------------------------------------
|
||||
class HTMLManagement():
|
||||
|
||||
def __init__(self):
|
||||
|
||||
self.htmlFile = ''
|
||||
self.htmlHeaderCreated = False
|
||||
self.htmlFooterCreated = False
|
||||
|
||||
self.ranRepository = ''
|
||||
self.ranBranch = ''
|
||||
self.ranCommitID = ''
|
||||
self.ranAllowMerge = False
|
||||
self.ranTargetBranch = ''
|
||||
|
||||
self.nbTestXMLfiles = 0
|
||||
self.htmlTabRefs = []
|
||||
self.htmlTabNames = []
|
||||
self.htmlTabIcons = []
|
||||
self.testXMLfiles = []
|
||||
|
||||
self.htmleNBFailureMsg = ''
|
||||
self.htmlUEFailureMsg = ''
|
||||
|
||||
self.startTime = int(round(time.time() * 1000))
|
||||
self.testCase_id = ''
|
||||
self.desc = ''
|
||||
|
||||
self.OsVersion = ['', '']
|
||||
self.KernelVersion = ['', '']
|
||||
self.UhdVersion = ['', '']
|
||||
self.UsrpBoard = ['', '']
|
||||
self.CpuNb = ['', '']
|
||||
self.CpuModel = ['', '']
|
||||
self.CpuMHz = ['', '']
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Setters and Getters
|
||||
#-----------------------------------------------------------
|
||||
def SethtmlUEFailureMsg(self,huefa):
|
||||
self.htmlUEFailureMsg = huefa
|
||||
def GethtmlUEFailureMsg(self):
|
||||
return self.htmlUEFailureMsg
|
||||
def SetHmleNBFailureMsg(self, msg):
|
||||
self.htmleNBFailureMsg = msg
|
||||
|
||||
def Setdesc(self, dsc):
|
||||
self.desc = dsc
|
||||
|
||||
def SetstartTime(self, sttime):
|
||||
self.startTime = sttime
|
||||
|
||||
def SettestCase_id(self, tcid):
|
||||
self.testCase_id = tcid
|
||||
def GettestCase_id(self):
|
||||
return self.testCase_id
|
||||
|
||||
def SetranRepository(self, repository):
|
||||
self.ranRepository = repository
|
||||
def SetranAllowMerge(self, merge):
|
||||
self.ranAllowMerge = merge
|
||||
def SetranBranch(self, branch):
|
||||
self.ranBranch = branch
|
||||
def SetranCommitID(self, commitid):
|
||||
self.ranCommitID = commitid
|
||||
def SetranTargetBranch(self, tbranch):
|
||||
self.ranTargetBranch = tbranch
|
||||
|
||||
def SethtmlUEConnected(self, nbUEs):
|
||||
if nbUEs > 0:
|
||||
self.htmlUEConnected = nbUEs
|
||||
else:
|
||||
self.htmlUEConnected = 1
|
||||
def SethtmlNb_Smartphones(self, nbUEs):
|
||||
self.htmlNb_Smartphones = nbUEs
|
||||
def SethtmlNb_CATM_Modules(self, nbUEs):
|
||||
self.htmlNb_CATM_Modules = nbUEs
|
||||
|
||||
def SetnbTestXMLfiles(self, nb):
|
||||
self.nbTestXMLfiles = nb
|
||||
def GetnbTestXMLfiles(self):
|
||||
return self.nbTestXMLfiles
|
||||
|
||||
def SettestXMLfiles(self, xmlFile):
|
||||
self.testXMLfiles.append(xmlFile)
|
||||
def SethtmlTabRefs(self, tabRef):
|
||||
self.htmlTabRefs.append(tabRef)
|
||||
def SethtmlTabNames(self, tabName):
|
||||
self.htmlTabNames.append(tabName)
|
||||
def SethtmlTabIcons(self, tabIcon):
|
||||
self.htmlTabIcons.append(tabIcon)
|
||||
|
||||
def SetOsVersion(self, version, idx):
|
||||
self.OsVersion[idx] = version
|
||||
def SetKernelVersion(self, version, idx):
|
||||
self.KernelVersion[idx] = version
|
||||
def SetUhdVersion(self, version, idx):
|
||||
self.UhdVersion[idx] = version
|
||||
def SetUsrpBoard(self, version, idx):
|
||||
self.UsrpBoard[idx] = version
|
||||
def SetCpuNb(self, nb, idx):
|
||||
self.CpuNb[idx] = nb
|
||||
def SetCpuModel(self, model, idx):
|
||||
self.CpuModel[idx] = model
|
||||
def SetCpuMHz(self, freq, idx):
|
||||
self.CpuMHz[idx] = freq
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# HTML structure creation functions
|
||||
#-----------------------------------------------------------
|
||||
|
||||
|
||||
def CreateHtmlHeader(self, ADBIPAddress):
|
||||
if (not self.htmlHeaderCreated):
|
||||
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
|
||||
logging.debug('\u001B[1m Creating HTML header \u001B[0m')
|
||||
logging.debug('\u001B[1m----------------------------------------\u001B[0m')
|
||||
self.htmlFile = open('test_results.html', 'w')
|
||||
self.htmlFile.write('<!DOCTYPE html>\n')
|
||||
self.htmlFile.write('<html class="no-js" lang="en-US">\n')
|
||||
self.htmlFile.write('<head>\n')
|
||||
self.htmlFile.write(' <meta name="viewport" content="width=device-width, initial-scale=1">\n')
|
||||
self.htmlFile.write(' <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">\n')
|
||||
self.htmlFile.write(' <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>\n')
|
||||
self.htmlFile.write(' <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>\n')
|
||||
self.htmlFile.write(' <title>Test Results for TEMPLATE_JOB_NAME job build #TEMPLATE_BUILD_ID</title>\n')
|
||||
self.htmlFile.write('</head>\n')
|
||||
self.htmlFile.write('<body><div class="container">\n')
|
||||
self.htmlFile.write(' <br>\n')
|
||||
self.htmlFile.write(' <table style="border-collapse: collapse; border: none;">\n')
|
||||
self.htmlFile.write(' <tr style="border-collapse: collapse; border: none;">\n')
|
||||
self.htmlFile.write(' <td style="border-collapse: collapse; border: none;">\n')
|
||||
self.htmlFile.write(' <a href="http://www.openairinterface.org/">\n')
|
||||
self.htmlFile.write(' <img src="http://www.openairinterface.org/wp-content/uploads/2016/03/cropped-oai_final_logo2.png" alt="" border="none" height=50 width=150>\n')
|
||||
self.htmlFile.write(' </img>\n')
|
||||
self.htmlFile.write(' </a>\n')
|
||||
self.htmlFile.write(' </td>\n')
|
||||
self.htmlFile.write(' <td style="border-collapse: collapse; border: none; vertical-align: center;">\n')
|
||||
self.htmlFile.write(' <b><font size = "6">Job Summary -- Job: TEMPLATE_JOB_NAME -- Build-ID: TEMPLATE_BUILD_ID</font></b>\n')
|
||||
self.htmlFile.write(' </td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
self.htmlFile.write(' <br>\n')
|
||||
self.htmlFile.write(' <div class="alert alert-info"><strong> <span class="glyphicon glyphicon-dashboard"></span> TEMPLATE_STAGE_NAME</strong></div>\n')
|
||||
self.htmlFile.write(' <table border = "1">\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-time"></span> Build Start Time (UTC) </td>\n')
|
||||
self.htmlFile.write(' <td>TEMPLATE_BUILD_TIME</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-cloud-upload"></span> GIT Repository </td>\n')
|
||||
self.htmlFile.write(' <td><a href="' + self.ranRepository + '">' + self.ranRepository + '</a></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-wrench"></span> Job Trigger </td>\n')
|
||||
if (self.ranAllowMerge):
|
||||
self.htmlFile.write(' <td>Merge-Request</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td>Push to Branch</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
if (self.ranAllowMerge):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-log-out"></span> Source Branch </td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tree-deciduous"></span> Branch</td>\n')
|
||||
self.htmlFile.write(' <td>' + self.ranBranch + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
if (self.ranAllowMerge):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Source Commit ID </td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-tag"></span> Commit ID </td>\n')
|
||||
self.htmlFile.write(' <td>' + self.ranCommitID + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
if self.ranAllowMerge != '':
|
||||
commit_message = subprocess.check_output("git log -n1 --pretty=format:\"%s\" " + self.ranCommitID, shell=True, universal_newlines=True)
|
||||
commit_message = commit_message.strip()
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
if (self.ranAllowMerge):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-comment"></span> Source Commit Message </td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-comment"></span> Commit Message </td>\n')
|
||||
self.htmlFile.write(' <td>' + commit_message + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
if (self.ranAllowMerge):
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" > <span class="glyphicon glyphicon-log-in"></span> Target Branch </td>\n')
|
||||
if (self.ranTargetBranch == ''):
|
||||
self.htmlFile.write(' <td>develop</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td>' + self.ranTargetBranch + '</td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
|
||||
if (ADBIPAddress != 'none'):
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(self.htmlNb_Smartphones) + ' UE(s) is(are) connected to ADB bench server</h2>\n')
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> ' + str(self.htmlNb_CATM_Modules) + ' CAT-M UE(s) is(are) connected to bench server</h2>\n')
|
||||
else:
|
||||
self.htmlUEConnected = 1
|
||||
self.htmlFile.write(' <h2><span class="glyphicon glyphicon-phone"></span> <span class="glyphicon glyphicon-menu-right"></span> 1 OAI UE(s) is(are) connected to CI bench</h2>\n')
|
||||
self.htmlFile.write(' <br>\n')
|
||||
self.htmlFile.write(' <ul class="nav nav-pills">\n')
|
||||
count = 0
|
||||
while (count < self.nbTestXMLfiles):
|
||||
pillMsg = ' <li><a data-toggle="pill" href="#'
|
||||
pillMsg += self.htmlTabRefs[count]
|
||||
pillMsg += '">'
|
||||
pillMsg += '__STATE_' + self.htmlTabNames[count] + '__'
|
||||
pillMsg += self.htmlTabNames[count]
|
||||
pillMsg += ' <span class="glyphicon glyphicon-'
|
||||
pillMsg += self.htmlTabIcons[count]
|
||||
pillMsg += '"></span></a></li>\n'
|
||||
self.htmlFile.write(pillMsg)
|
||||
count += 1
|
||||
self.htmlFile.write(' </ul>\n')
|
||||
self.htmlFile.write(' <div class="tab-content">\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
def CreateHtmlTabHeader(self):
|
||||
if (not self.htmlHeaderCreated):
|
||||
if (not os.path.isfile('test_results.html')):
|
||||
self.CreateHtmlHeader('none')
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
if (self.nbTestXMLfiles == 1):
|
||||
self.htmlFile.write(' <div id="' + self.htmlTabRefs[0] + '" class="tab-pane fade">\n')
|
||||
self.htmlFile.write(' <h3>Test Summary for <span class="glyphicon glyphicon-file"></span> ' + self.testXMLfiles[0] + '</h3>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <div id="build-tab" class="tab-pane fade">\n')
|
||||
self.htmlFile.write(' <table class="table" border = "1">\n')
|
||||
self.htmlFile.write(' <tr bgcolor = "#33CCFF" >\n')
|
||||
self.htmlFile.write(' <th>Relative Time (ms)</th>\n')
|
||||
self.htmlFile.write(' <th>Test Id</th>\n')
|
||||
self.htmlFile.write(' <th>Test Desc</th>\n')
|
||||
self.htmlFile.write(' <th>Test Options</th>\n')
|
||||
self.htmlFile.write(' <th>Test Status</th>\n')
|
||||
|
||||
i = 0
|
||||
while (i < self.htmlUEConnected):
|
||||
self.htmlFile.write(' <th>UE' + str(i) + ' Status</th>\n')
|
||||
i += 1
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
self.htmlHeaderCreated = True
|
||||
|
||||
def CreateHtmlTabFooter(self, passStatus):
|
||||
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <th bgcolor = "#33CCFF" colspan=3>Final Tab Status</th>\n')
|
||||
if passStatus:
|
||||
self.htmlFile.write(' <th bgcolor = "green" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">PASS <span class="glyphicon glyphicon-ok"></span> </font></th>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <th bgcolor = "red" colspan=' + str(2 + self.htmlUEConnected) + '><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
self.htmlFile.write(' </div>\n')
|
||||
self.htmlFile.close()
|
||||
time.sleep(1)
|
||||
if passStatus:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__//' test_results.html"
|
||||
subprocess.run(cmd, shell=True)
|
||||
else:
|
||||
cmd = "sed -i -e 's/__STATE_" + self.htmlTabNames[0] + "__/<span class=\"glyphicon glyphicon-remove\"><\/span>/' test_results.html"
|
||||
subprocess.run(cmd, shell=True)
|
||||
self.htmlFooterCreated = False
|
||||
|
||||
def CreateHtmlFooter(self, passStatus):
|
||||
if (os.path.isfile('test_results.html')):
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
self.htmlFile.write('</div>\n')
|
||||
self.htmlFile.write(' <p></p>\n')
|
||||
self.htmlFile.write(' <table class="table table-condensed">\n')
|
||||
|
||||
machines = [ 'eNB', 'UE' ]
|
||||
for machine in machines:
|
||||
if machine == 'eNB':
|
||||
idx = 0
|
||||
else:
|
||||
idx = 1
|
||||
if self.OsVersion[idx] == '':
|
||||
continue
|
||||
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <th colspan=8>' + str('eNB') + ' Server Characteristics</th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td>OS Version</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.OsVersion[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>Kernel Version</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.KernelVersion[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>UHD Version</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.UhdVersion[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>USRP Board</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.UsrpBoard[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td>Nb CPUs</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuNb[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>CPU Model Name</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuModel[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td>CPU Frequency</td>\n')
|
||||
self.htmlFile.write(' <td><span class="label label-default">' + self.CpuMHz[idx] + '</span></td>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' <td></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <th colspan=5 bgcolor = "#33CCFF">Final Status</th>\n')
|
||||
if passStatus:
|
||||
self.htmlFile.write(' <th colspan=3 bgcolor="green"><font color="white">PASS <span class="glyphicon glyphicon-ok"></span></font></th>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <th colspan=3 bgcolor="red"><font color="white">FAIL <span class="glyphicon glyphicon-remove"></span> </font></th>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.write(' </table>\n')
|
||||
self.htmlFile.write(' <p></p>\n')
|
||||
self.htmlFile.write(' <div class="well well-lg">End of Test Report -- Copyright <span class="glyphicon glyphicon-copyright-mark"></span> 2018 <a href="http://www.openairinterface.org/">OpenAirInterface</a>. All Rights Reserved.</div>\n')
|
||||
self.htmlFile.write('</div></body>\n')
|
||||
self.htmlFile.write('</html>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
def CreateHtmlRetrySeparator(self, cntnumfails):
|
||||
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
self.htmlFile.write(' <tr bgcolor = "#F0F0F0" >\n')
|
||||
self.htmlFile.write(' <td colspan=' + str(5+self.htmlUEConnected) + '><b> ---- Try Run #' + str(cntnumfails) + ' ---- </b></td>\n')
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
def CreateHtmlTestRow(self, options, status, processesStatus, machine='eNB'):
|
||||
if (self.htmlFooterCreated or (not self.htmlHeaderCreated)):
|
||||
return
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
currentTime = int(round(time.time() * 1000)) - self.startTime
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + format(currentTime / 1000, '.1f') + '</td>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + self.testCase_id + '</td>\n')
|
||||
self.htmlFile.write(' <td>' + self.desc + '</td>\n')
|
||||
self.htmlFile.write(' <td>' + str(options) + '</td>\n')
|
||||
if (str(status) == 'OK'):
|
||||
self.htmlFile.write(' <td bgcolor = "lightgreen" >' + str(status) + '</td>\n')
|
||||
elif (str(status) == 'KO'):
|
||||
if (processesStatus == 0):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >' + str(status) + '</td>\n')
|
||||
elif (processesStatus == CONST.ENB_PROCESS_FAILED):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - eNB process not found</td>\n')
|
||||
elif (processesStatus == CONST.OAI_UE_PROCESS_FAILED):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - OAI UE process not found</td>\n')
|
||||
elif (processesStatus == CONST.ENB_PROCESS_SEG_FAULT) or (processesStatus == CONST.OAI_UE_PROCESS_SEG_FAULT):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process ended in Segmentation Fault</td>\n')
|
||||
elif (processesStatus == CONST.ENB_PROCESS_ASSERTION) or (processesStatus == CONST.OAI_UE_PROCESS_ASSERTION):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process ended in Assertion</td>\n')
|
||||
elif (processesStatus == CONST.ENB_PROCESS_REALTIME_ISSUE):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' process faced Real Time issue(s)</td>\n')
|
||||
elif (processesStatus == CONST.ENB_PROCESS_NOLOGFILE_TO_ANALYZE) or (processesStatus == CONST.OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE):
|
||||
self.htmlFile.write(' <td bgcolor = "orange" >OK?</td>\n')
|
||||
elif (processesStatus == CONST.ENB_PROCESS_SLAVE_RRU_NOT_SYNCED):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - ' + machine + ' Slave RRU could not synch</td>\n')
|
||||
elif (processesStatus == CONST.OAI_UE_PROCESS_COULD_NOT_SYNC):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - UE could not sync</td>\n')
|
||||
elif (processesStatus == CONST.HSS_PROCESS_FAILED):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - HSS process not found</td>\n')
|
||||
elif (processesStatus == CONST.MME_PROCESS_FAILED):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - MME process not found</td>\n')
|
||||
elif (processesStatus == CONST.SPGW_PROCESS_FAILED):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - SPGW process not found</td>\n')
|
||||
elif (processesStatus == CONST.UE_IP_ADDRESS_ISSUE):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >KO - Could not retrieve UE IP address</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >' + str(status) + '</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td bgcolor = "orange" >' + str(status) + '</td>\n')
|
||||
if (len(str(self.htmleNBFailureMsg)) > 2):
|
||||
cellBgColor = 'white'
|
||||
result = re.search('ended with|faced real time issues', self.htmleNBFailureMsg)
|
||||
if result is not None:
|
||||
cellBgColor = 'red'
|
||||
else:
|
||||
result = re.search('showed|Reestablishment|Could not copy eNB logfile', self.htmleNBFailureMsg)
|
||||
if result is not None:
|
||||
cellBgColor = 'orange'
|
||||
self.htmlFile.write(' <td bgcolor = "' + cellBgColor + '" colspan=' + str(self.htmlUEConnected) + '><pre style="background-color:' + cellBgColor + '">' + self.htmleNBFailureMsg + '</pre></td>\n')
|
||||
self.htmleNBFailureMsg = ''
|
||||
elif (len(str(self.htmlUEFailureMsg)) > 2):
|
||||
cellBgColor = 'white'
|
||||
result = re.search('ended with|faced real time issues', self.htmlUEFailureMsg)
|
||||
if result is not None:
|
||||
cellBgColor = 'red'
|
||||
else:
|
||||
result = re.search('showed|Could not copy UE logfile|oaitun_ue1 interface is either NOT mounted or NOT configured', self.htmlUEFailureMsg)
|
||||
if result is not None:
|
||||
cellBgColor = 'orange'
|
||||
self.htmlFile.write(' <td bgcolor = "' + cellBgColor + '" colspan=' + str(self.htmlUEConnected) + '><pre style="background-color:' + cellBgColor + '">' + self.htmlUEFailureMsg + '</pre></td>\n')
|
||||
self.htmlUEFailureMsg = ''
|
||||
else:
|
||||
i = 0
|
||||
while (i < self.htmlUEConnected):
|
||||
self.htmlFile.write(' <td>-</td>\n')
|
||||
i += 1
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
def CreateHtmlTestRowQueue(self, options, status, ue_status, ue_queue):
|
||||
if ((not self.htmlFooterCreated) and (self.htmlHeaderCreated)):
|
||||
self.htmlFile = open('test_results.html', 'a')
|
||||
currentTime = int(round(time.time() * 1000)) - self.startTime
|
||||
addOrangeBK = False
|
||||
self.htmlFile.write(' <tr>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + format(currentTime / 1000, '.1f') + '</td>\n')
|
||||
self.htmlFile.write(' <td bgcolor = "lightcyan" >' + self.testCase_id + '</td>\n')
|
||||
self.htmlFile.write(' <td>' + self.desc + '</td>\n')
|
||||
self.htmlFile.write(' <td>' + str(options) + '</td>\n')
|
||||
if (str(status) == 'OK'):
|
||||
self.htmlFile.write(' <td bgcolor = "lightgreen" >' + str(status) + '</td>\n')
|
||||
elif (str(status) == 'KO'):
|
||||
self.htmlFile.write(' <td bgcolor = "lightcoral" >' + str(status) + '</td>\n')
|
||||
else:
|
||||
addOrangeBK = True
|
||||
self.htmlFile.write(' <td bgcolor = "orange" >' + str(status) + '</td>\n')
|
||||
i = 0
|
||||
while (i < self.htmlUEConnected):
|
||||
if (i < ue_status):
|
||||
if (not ue_queue.empty()):
|
||||
if (addOrangeBK):
|
||||
self.htmlFile.write(' <td bgcolor = "orange" >' + str(ue_queue.get()).replace('white', 'orange') + '</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td>' + str(ue_queue.get()) + '</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td>-</td>\n')
|
||||
else:
|
||||
self.htmlFile.write(' <td>-</td>\n')
|
||||
i += 1
|
||||
self.htmlFile.write(' </tr>\n')
|
||||
self.htmlFile.close()
|
||||
|
||||
+1046
-2625
File diff suppressed because it is too large
Load Diff
+1051
File diff suppressed because it is too large
Load Diff
@@ -492,6 +492,77 @@ function report_build {
|
||||
awk '{print " <tr><td>"$1"</td></tr>"}' ./oai_rules_result_list.txt >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
echo " <br>" >> ./build_results.html
|
||||
fi
|
||||
if [ -f ./header-files-w-incorrect-define.txt ]
|
||||
then
|
||||
NB_FILES_IN_ERROR=`wc -l ./header-files-w-incorrect-define.txt | sed -e "s@ .*@@"`
|
||||
if [ $NB_FILES_IN_ERROR -eq 0 ]
|
||||
then
|
||||
echo " <div class=\"alert alert-success\">" >> ./build_results.html
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <strong>No Issue for CIRCULAR DEPENDENCY PROTECTION in modified files</strong>" >> ./build_results.html; fi
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <strong>No Issue for CIRCULAR DEPENDENCY PROTECTION in the whole repository</strong>" >> ./build_results.html; fi
|
||||
echo " </div>" >> ./build_results.html
|
||||
else
|
||||
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} modified files MAY NOT HAVE CIRCULAR DEPENDENCY PROTECTION</strong>" >> ./build_results.html; fi
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} files in repository MAY NOT HAVE CIRCULAR DEPENDENCY PROTECTION in the whole repository</strong>" >> ./build_results.html; fi
|
||||
echo " </div>" >> ./build_results.html
|
||||
echo " <button data-toggle=\"collapse\" data-target=\"#oai-circular-details\">More details on circular dependency protection check</button>" >> ./build_results.html
|
||||
echo " <div id=\"oai-circular-details\" class=\"collapse\">" >> ./build_results.html
|
||||
echo " <table border = 1>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <th bgcolor = \"lightcyan\" >Potential Issue</th>" >> ./build_results.html
|
||||
echo " <th bgcolor = \"lightcyan\" >Impacted File</th>" >> ./build_results.html
|
||||
echo " <th bgcolor = \"lightcyan\" >Incorrect Macro</th>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
awk '{if($0 ~/error in/){print " <tr><td>error in declaration</td><td>"$4"</td><td>"$5"</td></tr>"};if($0 ~/files with same/){print " <tr><td>files with same #define</td><td>"$5"</td><td>"$6"</td></tr>"}}' ./header-files-w-incorrect-define.txt >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
echo " <br>" >> ./build_results.html
|
||||
fi
|
||||
fi
|
||||
if [ -f ./files-w-gnu-gpl-license-banner.txt ]
|
||||
then
|
||||
NB_FILES_IN_ERROR=`wc -l ./files-w-gnu-gpl-license-banner.txt | sed -e "s@ .*@@"`
|
||||
if [ $NB_FILES_IN_ERROR -ne 0 ]
|
||||
then
|
||||
echo " <div class=\"alert alert-danger\">" >> ./build_results.html
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} modified files HAVE a GNU GPL license banner</strong>" >> ./build_results.html; fi
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} files in repository HAVE a GNU GPL license banner</strong>" >> ./build_results.html; fi
|
||||
echo " </div>" >> ./build_results.html
|
||||
echo " <button data-toggle=\"collapse\" data-target=\"#oai-license-gpl\">More details on GNU GPL license banner issue</button>" >> ./build_results.html
|
||||
echo " <div id=\"oai-license-gpl\" class=\"collapse\">" >> ./build_results.html
|
||||
echo " <table border = 1>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <th bgcolor = \"lightcyan\" >Filename</th>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
awk '{print " <tr><td>"$1"</td></tr>"}' ./files-w-gnu-gpl-license-banner.txt >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
echo " <br>" >> ./build_results.html
|
||||
fi
|
||||
fi
|
||||
if [ -f ./files-w-suspect-banner.txt ]
|
||||
then
|
||||
NB_FILES_IN_ERROR=`wc -l ./files-w-suspect-banner.txt | sed -e "s@ .*@@"`
|
||||
if [ $NB_FILES_IN_ERROR -ne 0 ]
|
||||
then
|
||||
echo " <div class=\"alert alert-warning\">" >> ./build_results.html
|
||||
if [ $MR_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} modified files HAVE a suspect license banner</strong>" >> ./build_results.html; fi
|
||||
if [ $PU_TRIG -eq 1 ]; then echo " <strong>${NB_FILES_IN_ERROR} files in repository HAVE a suspect license banner</strong>" >> ./build_results.html; fi
|
||||
echo " </div>" >> ./build_results.html
|
||||
echo " <button data-toggle=\"collapse\" data-target=\"#oai-license-suspect\">More details on suspect banner files</button>" >> ./build_results.html
|
||||
echo " <div id=\"oai-license-suspect\" class=\"collapse\">" >> ./build_results.html
|
||||
echo " <table border = 1>" >> ./build_results.html
|
||||
echo " <tr>" >> ./build_results.html
|
||||
echo " <th bgcolor = \"lightcyan\" >Filename</th>" >> ./build_results.html
|
||||
echo " </tr>" >> ./build_results.html
|
||||
awk '{print " <tr><td>"$1"</td></tr>"}' ././files-w-suspect-banner.txt >> ./build_results.html
|
||||
echo " </table>" >> ./build_results.html
|
||||
echo " </div>" >> ./build_results.html
|
||||
echo " <br>" >> ./build_results.html
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
+93
-83
@@ -342,34 +342,8 @@ function check_iperf {
|
||||
local FILE_COMPLETE=`egrep -c "Server Report" ${LOC_BASE_LOG}_client.txt`
|
||||
if [ $FILE_COMPLETE -eq 0 ]
|
||||
then
|
||||
# This part will become obsolete once we have UL
|
||||
if [[ $LOC_IS_RF_SIM -eq 1 ]] && [[ $LOC_IS_NR -eq 1 ]]
|
||||
then
|
||||
echo "no UL integration right now --> normal to have no server report"
|
||||
if [ -f ${LOC_BASE_LOG}_server.txt ]
|
||||
then
|
||||
local EFFECTIVE_BANDWIDTH=`tail -n1 ${LOC_BASE_LOG}_server.txt | sed -e "s#^.*MBytes *##" -e "s#^.*KBytes *##" -e "s#sec.*#sec#"`
|
||||
if [[ $2 =~ .*K.* ]]
|
||||
then
|
||||
local BW_PREFIX="K"
|
||||
else
|
||||
local BW_PREFIX="M"
|
||||
fi
|
||||
if [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW}.*${BW_PREFIX}bits.* ]] || [[ $EFFECTIVE_BANDWIDTH =~ .*${LOC_REQ_BW_MINUS_ONE}.*${BW_PREFIX}bits.* ]]
|
||||
then
|
||||
echo "got requested DL bandwidth: $EFFECTIVE_BANDWIDTH"
|
||||
else
|
||||
echo "got LESS than requested DL bandwidth: $EFFECTIVE_BANDWIDTH"
|
||||
IPERF_STATUS=-1
|
||||
fi
|
||||
else
|
||||
IPERF_STATUS=-1
|
||||
echo "Server File Report not found"
|
||||
fi
|
||||
else
|
||||
IPERF_STATUS=-1
|
||||
echo "File Report not found"
|
||||
fi
|
||||
IPERF_STATUS=-1
|
||||
echo "File Report not found"
|
||||
else
|
||||
if [ `egrep -c "Mbits/sec" ${LOC_BASE_LOG}_client.txt` -ne 0 ]
|
||||
then
|
||||
@@ -2044,81 +2018,117 @@ function run_test_on_vm {
|
||||
|
||||
if [[ "$RUN_OPTIONS" == "complex" ]] && [[ $VM_NAME =~ .*-rf-sim.* ]]
|
||||
then
|
||||
NR_STATUS=0
|
||||
PING_STATUS=0
|
||||
IPERF_STATUS=0
|
||||
|
||||
CN_CONFIG="noS1"
|
||||
CONF_FILE=gnb.band78.tm1.106PRB.usrpn300.conf
|
||||
S1_NOS1_CFG=0
|
||||
PRB=106
|
||||
FREQUENCY=3510
|
||||
|
||||
local try_cnt="0"
|
||||
NR_STATUS=0
|
||||
|
||||
######### start of loop
|
||||
while [ $try_cnt -lt 5 ]
|
||||
do
|
||||
SYNC_STATUS=0
|
||||
PING_STATUS=0
|
||||
IPERF_STATUS=0
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the gNB"
|
||||
echo "############################################################"
|
||||
CURRENT_GNB_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_gnb.log
|
||||
start_rf_sim_gnb $GNB_VM_CMDS "$GNB_VM_IP_ADDR" $CURRENT_GNB_LOG_FILE $PRB $CONF_FILE $S1_NOS1_CFG
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the gNB"
|
||||
echo "############################################################"
|
||||
CURRENT_GNB_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_gnb.log
|
||||
start_rf_sim_gnb $GNB_VM_CMDS "$GNB_VM_IP_ADDR" $CURRENT_GNB_LOG_FILE $PRB $CONF_FILE $S1_NOS1_CFG
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the NR-UE"
|
||||
echo "############################################################"
|
||||
CURRENT_NR_UE_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ue.log
|
||||
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG
|
||||
if [ $NR_UE_SYNC -eq 0 ]
|
||||
then
|
||||
echo "Problem w/ gNB and NR-UE not syncing"
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Starting the NR-UE"
|
||||
echo "############################################################"
|
||||
CURRENT_NR_UE_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ue.log
|
||||
start_rf_sim_nr_ue $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $GNB_VM_IP_ADDR $CURRENT_NR_UE_LOG_FILE $PRB $FREQUENCY $S1_NOS1_CFG
|
||||
if [ $NR_UE_SYNC -eq 0 ]
|
||||
then
|
||||
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
|
||||
SYNC_STATUS=-1
|
||||
try_cnt=$[$try_cnt+1]
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Pinging the gNB from NR-UE"
|
||||
echo "############################################################"
|
||||
get_enb_noS1_ip_addr $GNB_VM_CMDS $GNB_VM_IP_ADDR
|
||||
PING_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ping_gnb_from_nrue.log
|
||||
ping_epc_ip_addr $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $ENB_IP_ADDR $PING_LOG_FILE 1 0
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
|
||||
check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Pinging the NR-UE from gNB"
|
||||
echo "############################################################"
|
||||
get_ue_ip_addr $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 1
|
||||
PING_LOG_FILE=tdd_${PRB}prb_${CN_CONFIG}_ping_from_gnb_nrue.log
|
||||
ping_enb_ip_addr $GNB_VM_CMDS $GNB_VM_IP_ADDR $UE_IP_ADDR $PING_LOG_FILE 0
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/$PING_LOG_FILE $ARCHIVES_LOC
|
||||
check_ping_result $ARCHIVES_LOC/$PING_LOG_FILE 20
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : iperf DL -- NR-UE is server and gNB is client"
|
||||
echo "############################################################"
|
||||
THROUGHPUT="30K"
|
||||
CURR_IPERF_LOG_BASE=tdd_${PRB}prb_${CN_CONFIG}_iperf_dl
|
||||
get_enb_noS1_ip_addr $GNB_VM_CMDS $GNB_VM_IP_ADDR
|
||||
get_ue_ip_addr $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 1
|
||||
generic_iperf $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $UE_IP_ADDR $GNB_VM_CMDS $GNB_VM_IP_ADDR $ENB_IP_ADDR $THROUGHPUT $CURR_IPERF_LOG_BASE 1 0
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
||||
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE $THROUGHPUT
|
||||
if [ $IPERF_STATUS -ne 0 ]
|
||||
then
|
||||
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
|
||||
try_cnt=$[$try_cnt+1]
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : iperf UL -- gNB is server and NR-UE is client"
|
||||
echo "############################################################"
|
||||
THROUGHPUT="30K"
|
||||
CURR_IPERF_LOG_BASE=tdd_${PRB}prb_${CN_CONFIG}_iperf_ul
|
||||
get_enb_noS1_ip_addr $GNB_VM_CMDS $GNB_VM_IP_ADDR
|
||||
get_ue_ip_addr $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 1
|
||||
generic_iperf $GNB_VM_CMDS $GNB_VM_IP_ADDR $ENB_IP_ADDR $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $UE_IP_ADDR $THROUGHPUT $CURR_IPERF_LOG_BASE 1 0
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
||||
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE $THROUGHPUT
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Terminate gNB/NR-UE simulators"
|
||||
echo "############################################################"
|
||||
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
|
||||
echo "5G-NR RFSIM seems to FAIL"
|
||||
echo "5G-NR: TEST_KO" >> $ARCHIVES_LOC/test_final_status.log
|
||||
STATUS=-1
|
||||
return
|
||||
fi
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : iperf DL -- NR-UE is server and gNB is client"
|
||||
echo "############################################################"
|
||||
THROUGHPUT="30K"
|
||||
CURR_IPERF_LOG_BASE=tdd_${PRB}prb_${CN_CONFIG}_iperf_dl
|
||||
get_enb_noS1_ip_addr $GNB_VM_CMDS $GNB_VM_IP_ADDR
|
||||
get_ue_ip_addr $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 1
|
||||
generic_iperf $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $UE_IP_ADDR $GNB_VM_CMDS $GNB_VM_IP_ADDR $ENB_IP_ADDR $THROUGHPUT $CURR_IPERF_LOG_BASE 1 0
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
||||
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE $THROUGHPUT
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : iperf UL -- gNB is server and NR-UE is client"
|
||||
echo "############################################################"
|
||||
THROUGHPUT="30K"
|
||||
CURR_IPERF_LOG_BASE=tdd_${PRB}prb_${CN_CONFIG}_iperf_ul
|
||||
get_enb_noS1_ip_addr $GNB_VM_CMDS $GNB_VM_IP_ADDR
|
||||
get_ue_ip_addr $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR 1
|
||||
generic_iperf $GNB_VM_CMDS $GNB_VM_IP_ADDR $ENB_IP_ADDR $NR_UE_VM_CMDS $NR_UE_VM_IP_ADDR $UE_IP_ADDR $THROUGHPUT $CURR_IPERF_LOG_BASE 1 0
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$GNB_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_server.txt $ARCHIVES_LOC
|
||||
scp -o StrictHostKeyChecking=no ubuntu@$NR_UE_VM_IP_ADDR:/home/ubuntu/${CURR_IPERF_LOG_BASE}_client.txt $ARCHIVES_LOC
|
||||
check_iperf $ARCHIVES_LOC/$CURR_IPERF_LOG_BASE $THROUGHPUT
|
||||
|
||||
echo "############################################################"
|
||||
echo "${CN_CONFIG} : Terminate gNB/NR-UE simulators"
|
||||
echo "############################################################"
|
||||
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
|
||||
|
||||
if [ $IPERF_STATUS -ne 0 ]
|
||||
then
|
||||
echo "UL test not OK"
|
||||
try_cnt=$[$try_cnt+1]
|
||||
else
|
||||
try_cnt=$[$try_cnt+10]
|
||||
fi
|
||||
done
|
||||
######### end of loop
|
||||
full_l2_sim_destroy
|
||||
|
||||
|
||||
echo "############################################################"
|
||||
echo "Checking run status"
|
||||
echo "############################################################"
|
||||
|
||||
if [ $SYNC_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $PING_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $IPERF_STATUS -ne 0 ]; then NR_STATUS=-1; fi
|
||||
if [ $NR_STATUS -eq 0 ]
|
||||
|
||||
@@ -0,0 +1,217 @@
|
||||
#/*
|
||||
# * 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
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
# Python for CI of OAI-eNB + COTS-UE
|
||||
#
|
||||
# Required Python Version
|
||||
# Python 3.x
|
||||
#
|
||||
# Required Python Package
|
||||
# pexpect
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Import
|
||||
#-----------------------------------------------------------
|
||||
import pexpect # pexpect
|
||||
import logging
|
||||
import time # sleep
|
||||
import re
|
||||
import sys
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Class Declaration
|
||||
#-----------------------------------------------------------
|
||||
class SSHConnection():
|
||||
def __init__(self):
|
||||
self.ssh = ''
|
||||
self.picocom_closure = False
|
||||
|
||||
def disablePicocomClosure(self):
|
||||
self.picocom_closure = False
|
||||
|
||||
def enablePicocomClosure(self):
|
||||
self.picocom_closure = True
|
||||
|
||||
def open(self, ipaddress, username, password):
|
||||
count = 0
|
||||
connect_status = False
|
||||
while count < 4:
|
||||
self.ssh = pexpect.spawn('ssh', [username + '@' + ipaddress], timeout = 5)
|
||||
self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT])
|
||||
if self.sshresponse == 0:
|
||||
self.ssh.sendline('yes')
|
||||
self.ssh.expect('password:')
|
||||
self.ssh.sendline(password)
|
||||
self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
|
||||
if self.sshresponse == 0:
|
||||
count = 10
|
||||
connect_status = True
|
||||
else:
|
||||
logging.debug('self.sshresponse = ' + str(self.sshresponse))
|
||||
elif self.sshresponse == 1:
|
||||
self.ssh.sendline(password)
|
||||
self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
|
||||
if self.sshresponse == 0:
|
||||
count = 10
|
||||
connect_status = True
|
||||
else:
|
||||
logging.debug('self.sshresponse = ' + str(self.sshresponse))
|
||||
elif self.sshresponse == 2:
|
||||
# Checking if we are really on the remote client defined by its IP address
|
||||
self.command('stdbuf -o0 ifconfig | egrep --color=never "inet addr:|inet "', '\$', 5)
|
||||
result = re.search(str(ipaddress), str(self.ssh.before))
|
||||
if result is None:
|
||||
self.close()
|
||||
else:
|
||||
count = 10
|
||||
connect_status = True
|
||||
else:
|
||||
# debug output
|
||||
logging.debug(str(self.ssh.before))
|
||||
logging.debug('self.sshresponse = ' + str(self.sshresponse))
|
||||
# adding a tempo when failure
|
||||
if not connect_status:
|
||||
time.sleep(1)
|
||||
count += 1
|
||||
if connect_status:
|
||||
pass
|
||||
else:
|
||||
sys.exit('SSH Connection Failed')
|
||||
|
||||
def command(self, commandline, expectedline, timeout):
|
||||
logging.debug(commandline)
|
||||
self.ssh.timeout = timeout
|
||||
self.ssh.sendline(commandline)
|
||||
self.sshresponse = self.ssh.expect([expectedline, pexpect.EOF, pexpect.TIMEOUT])
|
||||
if self.sshresponse == 0:
|
||||
return 0
|
||||
elif self.sshresponse == 1:
|
||||
logging.debug('\u001B[1;37;41m Unexpected EOF \u001B[0m')
|
||||
logging.debug('Expected Line : ' + expectedline)
|
||||
logging.debug(str(self.ssh.before))
|
||||
sys.exit(self.sshresponse)
|
||||
elif self.sshresponse == 2:
|
||||
logging.debug('\u001B[1;37;41m Unexpected TIMEOUT \u001B[0m')
|
||||
logging.debug('Expected Line : ' + expectedline)
|
||||
result = re.search('ping |iperf |picocom', str(commandline))
|
||||
if result is None:
|
||||
logging.debug(str(self.ssh.before))
|
||||
sys.exit(self.sshresponse)
|
||||
else:
|
||||
return -1
|
||||
else:
|
||||
logging.debug('\u001B[1;37;41m Unexpected Others \u001B[0m')
|
||||
logging.debug('Expected Line : ' + expectedline)
|
||||
sys.exit(self.sshresponse)
|
||||
|
||||
def close(self):
|
||||
self.ssh.timeout = 5
|
||||
self.ssh.sendline('exit')
|
||||
self.sshresponse = self.ssh.expect([pexpect.EOF, pexpect.TIMEOUT])
|
||||
if self.sshresponse == 0:
|
||||
pass
|
||||
elif self.sshresponse == 1:
|
||||
if not self.picocom_closure:
|
||||
logging.debug('\u001B[1;37;41m Unexpected TIMEOUT during closing\u001B[0m')
|
||||
else:
|
||||
logging.debug('\u001B[1;37;41m Unexpected Others during closing\u001B[0m')
|
||||
|
||||
def copyin(self, ipaddress, username, password, source, destination):
|
||||
count = 0
|
||||
copy_status = False
|
||||
logging.debug('scp '+ username + '@' + ipaddress + ':' + source + ' ' + destination)
|
||||
while count < 10:
|
||||
scp_spawn = pexpect.spawn('scp '+ username + '@' + ipaddress + ':' + source + ' ' + destination, timeout = 100)
|
||||
scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT])
|
||||
if scp_response == 0:
|
||||
scp_spawn.sendline('yes')
|
||||
scp_spawn.expect('password:')
|
||||
scp_spawn.sendline(password)
|
||||
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
|
||||
if scp_response == 0:
|
||||
count = 10
|
||||
copy_status = True
|
||||
else:
|
||||
logging.debug('1 - scp_response = ' + str(scp_response))
|
||||
elif scp_response == 1:
|
||||
scp_spawn.sendline(password)
|
||||
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
|
||||
if scp_response == 0 or scp_response == 3:
|
||||
count = 10
|
||||
copy_status = True
|
||||
else:
|
||||
logging.debug('2 - scp_response = ' + str(scp_response))
|
||||
elif scp_response == 2:
|
||||
count = 10
|
||||
copy_status = True
|
||||
else:
|
||||
logging.debug('3 - scp_response = ' + str(scp_response))
|
||||
# adding a tempo when failure
|
||||
if not copy_status:
|
||||
time.sleep(1)
|
||||
count += 1
|
||||
if copy_status:
|
||||
return 0
|
||||
else:
|
||||
return -1
|
||||
|
||||
def copyout(self, ipaddress, username, password, source, destination):
|
||||
count = 0
|
||||
copy_status = False
|
||||
logging.debug('scp ' + source + ' ' + username + '@' + ipaddress + ':' + destination)
|
||||
while count < 4:
|
||||
scp_spawn = pexpect.spawn('scp ' + source + ' ' + username + '@' + ipaddress + ':' + destination, timeout = 100)
|
||||
scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT])
|
||||
if scp_response == 0:
|
||||
scp_spawn.sendline('yes')
|
||||
scp_spawn.expect('password:')
|
||||
scp_spawn.sendline(password)
|
||||
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
|
||||
if scp_response == 0:
|
||||
count = 10
|
||||
copy_status = True
|
||||
else:
|
||||
logging.debug('1 - scp_response = ' + str(scp_response))
|
||||
elif scp_response == 1:
|
||||
scp_spawn.sendline(password)
|
||||
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
|
||||
if scp_response == 0 or scp_response == 3:
|
||||
count = 10
|
||||
copy_status = True
|
||||
else:
|
||||
logging.debug('2 - scp_response = ' + str(scp_response))
|
||||
elif scp_response == 2:
|
||||
count = 10
|
||||
copy_status = True
|
||||
else:
|
||||
logging.debug('3 - scp_response = ' + str(scp_response))
|
||||
# adding a tempo when failure
|
||||
if not copy_status:
|
||||
time.sleep(1)
|
||||
count += 1
|
||||
if copy_status:
|
||||
pass
|
||||
else:
|
||||
sys.exit('SCP failed')
|
||||
|
||||
def getBefore(self):
|
||||
return str(self.ssh.before)
|
||||
@@ -24,7 +24,7 @@
|
||||
<htmlTabRef>test-lte-m-10-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-LTE-M-10MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<repeatCount>1</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040102
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<htmlTabRef>test-05-tm2</htmlTabRef>
|
||||
<htmlTabName>Test-05MHz-TM2</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>3</repeatCount>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
+110
-26
@@ -727,7 +727,6 @@ Message("CPU_Affinity flag is ${CPU_AFFINITY}")
|
||||
##############################################################
|
||||
|
||||
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
|
||||
add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the default bearer")
|
||||
|
||||
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
|
||||
add_boolean_option(DEADLINE_SCHEDULER True "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
|
||||
@@ -828,7 +827,7 @@ add_boolean_option(TRACE_RLC_UM_TX_STATUS False "TRACE for RLC UM, TO BE CHANGE
|
||||
##########################
|
||||
# RRC LAYER OPTIONS
|
||||
##########################
|
||||
add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "Otherwise it is UM, configure params are actually set in rrc_eNB.c:rrc_eNB_generate_defaultRRCConnectionReconfiguration(...)")
|
||||
add_boolean_option(RRC_DEFAULT_RAB_IS_AM True "set the RLC mode to AM for the default bearer, otherwise it is UM.")
|
||||
|
||||
|
||||
##########################
|
||||
@@ -884,6 +883,7 @@ include_directories("${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0")
|
||||
include_directories("${OPENAIR2_DIR}/RRC/LTE/MESSAGES")
|
||||
include_directories("${OPENAIR2_DIR}/RRC/LTE")
|
||||
include_directories("${OPENAIR_DIR}/common/utils")
|
||||
include_directories("${OPENAIR_DIR}/common/utils/collection")
|
||||
include_directories("${OPENAIR_DIR}/common/utils/ocp_itti")
|
||||
include_directories("${OPENAIR3_DIR}/NAS/COMMON")
|
||||
include_directories("${OPENAIR3_DIR}/NAS/COMMON/API/NETWORK")
|
||||
@@ -1330,6 +1330,9 @@ add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
|
||||
|
||||
add_library(coding MODULE ${PHY_TURBOSRC} )
|
||||
|
||||
add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c )
|
||||
|
||||
|
||||
set(PHY_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools_common.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
|
||||
@@ -1370,7 +1373,7 @@ set(PHY_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_parms.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/cadd_vv.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/dfts_load.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/cmult_sv.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/cmult_vv.c
|
||||
@@ -1495,6 +1498,7 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_dmrs_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/scrambling_luts.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/dmrs_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_REFSIG/ptrs_nr.c
|
||||
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/filt16a_32.c
|
||||
@@ -1587,7 +1591,9 @@ endif ()
|
||||
|
||||
add_library(PHY_COMMON ${PHY_SRC_COMMON})
|
||||
add_dependencies(PHY_COMMON rrc_flag)
|
||||
add_dependencies(PHY_COMMON dfts)
|
||||
add_library(PHY ${PHY_SRC})
|
||||
|
||||
add_dependencies(PHY rrc_flag)
|
||||
add_library(PHY_UE ${PHY_SRC_UE})
|
||||
add_dependencies(PHY_UE rrc_flag)
|
||||
@@ -1638,7 +1644,7 @@ set(NR_RRC_DIR ${OPENAIR2_DIR}/RRC/NR)
|
||||
set(NR_UE_RRC_DIR ${OPENAIR2_DIR}/RRC/NR_UE)
|
||||
set(PDCP_DIR ${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0)
|
||||
|
||||
set(LTE_RLC_SRC
|
||||
set(RLC_V1
|
||||
${RLC_AM_DIR}/rlc_am.c
|
||||
${RLC_AM_DIR}/rlc_am_init.c
|
||||
${RLC_AM_DIR}/rlc_am_timer_poll_retransmit.c
|
||||
@@ -1668,14 +1674,15 @@ set(LTE_RLC_SRC
|
||||
${RLC_DIR}/rlc_mpls.c
|
||||
)
|
||||
|
||||
set(LTE_PDCP_SRC
|
||||
${PDCP_DIR}/pdcp.c
|
||||
${PDCP_DIR}/pdcp_fifo.c
|
||||
${PDCP_DIR}/pdcp_sequence_manager.c
|
||||
${PDCP_DIR}/pdcp_primitives.c
|
||||
${PDCP_DIR}/pdcp_util.c
|
||||
${PDCP_DIR}/pdcp_security.c
|
||||
${PDCP_DIR}/pdcp_netlink.c
|
||||
set(RLC_V2
|
||||
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_oai_api.c
|
||||
${OPENAIR2_DIR}/LAYER2/rlc_v2/asn1_utils.c
|
||||
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_ue_manager.c
|
||||
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_entity.c
|
||||
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_entity_am.c
|
||||
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_entity_um.c
|
||||
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_pdu.c
|
||||
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_sdu.c
|
||||
)
|
||||
|
||||
set(NR_RLC_SRC
|
||||
@@ -1698,6 +1705,13 @@ set(NR_PDCP_SRC
|
||||
)
|
||||
|
||||
set(L2_SRC
|
||||
${PDCP_DIR}/pdcp.c
|
||||
${PDCP_DIR}/pdcp_fifo.c
|
||||
${PDCP_DIR}/pdcp_sequence_manager.c
|
||||
${PDCP_DIR}/pdcp_primitives.c
|
||||
${PDCP_DIR}/pdcp_util.c
|
||||
${PDCP_DIR}/pdcp_security.c
|
||||
${PDCP_DIR}/pdcp_netlink.c
|
||||
${OPENAIR2_DIR}/LAYER2/openair2_proc.c
|
||||
# ${RRC_DIR}/rrc_UE.c
|
||||
${RRC_DIR}/rrc_eNB.c
|
||||
@@ -1710,10 +1724,23 @@ set(L2_SRC
|
||||
${RRC_DIR}/L2_interface_common.c
|
||||
${RRC_DIR}/L2_interface_ue.c
|
||||
)
|
||||
|
||||
set(L2_RRC_SRC
|
||||
${OPENAIR2_DIR}/LAYER2/openair2_proc.c
|
||||
# ${RRC_DIR}/rrc_UE.c
|
||||
${RRC_DIR}/rrc_eNB.c
|
||||
${RRC_DIR}/rrc_eNB_endc.c
|
||||
${RRC_DIR}/rrc_eNB_S1AP.c
|
||||
${RRC_DIR}/rrc_eNB_M2AP.c
|
||||
${RRC_DIR}/rrc_eNB_UE_context.c
|
||||
${RRC_DIR}/rrc_common.c
|
||||
${RRC_DIR}/L2_interface.c
|
||||
${RRC_DIR}/L2_interface_common.c
|
||||
${RRC_DIR}/L2_interface_ue.c
|
||||
)
|
||||
|
||||
set(L2_LTE_SRC
|
||||
${LTE_RLC_SRC}
|
||||
${LTE_PDCP_SRC}
|
||||
${RLC_V2}
|
||||
)
|
||||
|
||||
set(L2_NR_SRC
|
||||
@@ -1730,13 +1757,6 @@ set(L2_NR_SRC
|
||||
)
|
||||
|
||||
set(L2_SRC_UE
|
||||
${RRC_DIR}/rrc_UE.c
|
||||
${RRC_DIR}/rrc_common.c
|
||||
${RRC_DIR}/L2_interface_common.c
|
||||
${RRC_DIR}/L2_interface_ue.c
|
||||
)
|
||||
|
||||
set(LTE_NR_L2_SRC_UE
|
||||
${PDCP_DIR}/pdcp.c
|
||||
${PDCP_DIR}/pdcp_fifo.c
|
||||
${PDCP_DIR}/pdcp_sequence_manager.c
|
||||
@@ -1744,10 +1764,19 @@ set(LTE_NR_L2_SRC_UE
|
||||
${PDCP_DIR}/pdcp_util.c
|
||||
${PDCP_DIR}/pdcp_security.c
|
||||
${PDCP_DIR}/pdcp_netlink.c
|
||||
${LTE_RLC_SRC}
|
||||
${LTE_PDCP_SRC}
|
||||
${RRC_DIR}/rrc_UE.c
|
||||
${RRC_DIR}/rrc_common.c
|
||||
${RRC_DIR}/L2_interface_common.c
|
||||
${RRC_DIR}/L2_interface_ue.c
|
||||
)
|
||||
|
||||
|
||||
set(L2_RRC_SRC_UE
|
||||
${RRC_DIR}/rrc_UE.c
|
||||
${RRC_DIR}/rrc_common.c
|
||||
${RRC_DIR}/L2_interface_common.c
|
||||
${RRC_DIR}/L2_interface_ue.c
|
||||
)
|
||||
|
||||
set(NR_L2_SRC_UE
|
||||
${NR_RLC_SRC}
|
||||
${NR_PDCP_SRC}
|
||||
@@ -1859,6 +1888,14 @@ add_library(L2_NR
|
||||
${MAC_NR_SRC}
|
||||
${GNB_APP_SRC}
|
||||
)
|
||||
|
||||
add_library(L2_LTE_NR
|
||||
${L2_RRC_SRC}
|
||||
${MAC_SRC}
|
||||
${ENB_APP_SRC}
|
||||
${MCE_APP_SRC}
|
||||
)
|
||||
|
||||
add_dependencies(L2_NR rrc_flag nr_rrc_flag s1ap_flag x2_flag)
|
||||
|
||||
add_library(L2_UE
|
||||
@@ -1866,6 +1903,11 @@ add_library(L2_UE
|
||||
${MAC_SRC_UE}
|
||||
)
|
||||
|
||||
add_library(L2_UE_LTE_NR
|
||||
${L2_RRC_SRC_UE}
|
||||
${MAC_SRC_UE}
|
||||
)
|
||||
|
||||
if (NOT ${NOS1})
|
||||
target_compile_definitions(L2_UE PUBLIC -DPDCP_USE_NETLINK)
|
||||
endif()
|
||||
@@ -2502,6 +2544,7 @@ add_executable(lte-softmodem
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
|
||||
${OPENAIR_TARGETS}/RT/USER/ru_control.c
|
||||
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
@@ -2537,6 +2580,43 @@ target_link_libraries (lte-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_L
|
||||
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
|
||||
target_link_libraries (lte-softmodem ${T_LIB})
|
||||
|
||||
|
||||
add_executable(ocp-enb
|
||||
${OPENAIR_DIR}/executables/main-ocp.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_DIR}/executables/main-fs6.c
|
||||
${OPENAIR_DIR}/executables/transport_split.c
|
||||
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR_TARGETS}/COMMON/create_tasks.c
|
||||
${OPENAIR_TARGETS}/COMMON/create_tasks_mbms.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
|
||||
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
|
||||
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
|
||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||
${OPENAIR_DIR}/common/utils/utils.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${GTPU_need_ITTI}
|
||||
${XFORMSINTERFACE_SOURCE}
|
||||
${T_SOURCE}
|
||||
${CONFIG_SOURCES}
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
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
|
||||
${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})
|
||||
|
||||
add_executable(cu_test
|
||||
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/cu_test.c
|
||||
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
|
||||
@@ -2644,7 +2724,7 @@ 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 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
|
||||
S1AP_LIB S1AP_ENB L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
X2AP_LIB X2AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB ${PROTO_AGENT_LIB} ${FSPT_MSG_LIB}
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
@@ -2686,7 +2766,7 @@ 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
|
||||
PHY_COMMON PHY_NR_COMMON PHY_UE PHY_NR_UE PHY_RU LFDS NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
|
||||
NFAPI_USER_LIB S1AP_LIB S1AP_ENB
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${ATLAS_LIBRARIES}
|
||||
-Wl,--end-group z dl)
|
||||
@@ -2785,6 +2865,7 @@ target_link_libraries(ldpctest
|
||||
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}
|
||||
@@ -2797,6 +2878,7 @@ target_link_libraries(nr_dlschsim
|
||||
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}
|
||||
@@ -2850,6 +2932,7 @@ target_link_libraries(nr_prachsim
|
||||
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}
|
||||
@@ -2878,6 +2961,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
|
||||
|
||||
add_executable(${myExe}
|
||||
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
|
||||
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
|
||||
${OPENAIR_DIR}/common/utils/backtrace.c
|
||||
${OPENAIR_DIR}/common/utils/system.c
|
||||
${XFORMS_SOURCE}
|
||||
|
||||
@@ -1087,8 +1087,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 +1107,12 @@
|
||||
-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>
|
||||
@@ -1177,17 +1184,37 @@
|
||||
<testCase id="015109">
|
||||
<class>execution</class>
|
||||
<desc>nr_pucchsim Test cases. (Test1: Format 0 1-bit ACK miss 106 PRB),
|
||||
(Test2: Format 0 2-bit ACK miss 106 PRB)</desc>
|
||||
(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>
|
||||
<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_pucchsim.Rel15</main_exec>
|
||||
<main_exec_args>-R 106 -i 1 -P 0 -b 1 -s-7 -n1000
|
||||
-R 106 -i 1 -P 0 -b 2 -s-7 -n1000
|
||||
<main_exec_args>-R 106 -i 1 -P 0 -b 1 -s-2 -n1000
|
||||
-R 106 -i 1 -P 0 -b 2 -s-2 -n1000
|
||||
-R 106 -i 1 -P 0 -b 2 -s-2 -c -n1000
|
||||
-R 106 -i 1 -P 2 -b 3 -s0 -n1000
|
||||
-R 106 -i 1 -P 2 -b 4 -s0 -n1000
|
||||
-R 106 -i 1 -P 2 -b 5 -s1 -n1000
|
||||
-R 106 -i 1 -P 2 -b 6 -s2 -n1000
|
||||
-R 106 -i 1 -P 2 -b 7 -s3 -n1000
|
||||
-R 106 -i 1 -P 2 -b 8 -s4 -n1000
|
||||
-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 </tags>
|
||||
<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>
|
||||
<search_expr_true>PUCCH test OK</search_expr_true>
|
||||
<search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false>
|
||||
<nruns>3</nruns>
|
||||
|
||||
@@ -14,6 +14,7 @@ set(CMAKE_C_FLAGS
|
||||
|
||||
set(OPENAIR_DIR $ENV{OPENAIR_DIR})
|
||||
set(OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3)
|
||||
include_directories (${OPENAIR_DIR}/openair2/COMMON)
|
||||
|
||||
set(CONF2UEDATA_LIB_SRC
|
||||
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.c
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
set(PACKAGE_NAME "unitary_tests_simulators")
|
||||
set(PHYSIM True)
|
||||
set(RF_BOARD None)
|
||||
set(XFORMS True)
|
||||
set(ENABLE_ITTI True)
|
||||
set(DEBUG_PHY False)
|
||||
set(MU_RECIEVER False)
|
||||
set(NAS_UE False)
|
||||
set(MESSAGE_CHART_GENERATOR False)
|
||||
set(RRC_ASN1_VERSION "Rel15")
|
||||
set(T_TRACER True)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
|
||||
set ( CMAKE_BUILD_TYPE )
|
||||
set ( CFLAGS_PROCESSOR_USER "" )
|
||||
set ( UE_EXPANSION False )
|
||||
set ( PRE_SCD_THREAD False )
|
||||
set ( UESIM_EXPANSION False )
|
||||
set ( ENABLE_VCD_FIFO False )
|
||||
set ( RF_BOARD "OAI_USRP")
|
||||
set ( TRANSP_PRO "None")
|
||||
set ( PACKAGE_NAME "")
|
||||
set ( DEADLINE_SCHEDULER "False" )
|
||||
set ( CPU_AFFINITY "False" )
|
||||
set ( T_TRACER True )
|
||||
set ( UE_AUTOTEST_TRACE False )
|
||||
set ( UE_DEBUG_TRACE False )
|
||||
set ( UE_TIMING_TRACE False )
|
||||
set ( USRP_REC_PLAY False )
|
||||
set ( SKIP_SHARED_LIB_FLAG False )
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
|
||||
|
||||
@@ -217,7 +217,7 @@ install_protobuf_from_source(){
|
||||
#tar -xzvf protobuf-2.6.1.tar.gz --owner $USER --group $USER --no-same-owner
|
||||
#cd protobuf-2.6.1/
|
||||
rm -rf /tmp/protobuf-cpp-3.3.0.tar.gz* /tmp/protobuf-3.3.0
|
||||
wget https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
|
||||
wget --tries=3 --retry-connrefused https://github.com/google/protobuf/releases/download/v3.3.0/protobuf-cpp-3.3.0.tar.gz
|
||||
tar -xzvf protobuf-cpp-3.3.0.tar.gz --owner $USER --group $(groups | cut -d" " -f1) --no-same-owner
|
||||
cd protobuf-3.3.0/
|
||||
./configure
|
||||
@@ -353,8 +353,8 @@ install_bladerf_driver_from_source(){
|
||||
$SUDO ldconfig
|
||||
echo "Downloading FPGA and firmware images"
|
||||
cd /tmp/bladeRF
|
||||
wget https://www.nuand.com/fx3/bladeRF_fw_latest.img
|
||||
wget https://www.nuand.com/fpga/hostedx40-latest.rbf
|
||||
wget --tries=3 --retry-connrefused https://www.nuand.com/fx3/bladeRF_fw_latest.img
|
||||
wget --tries=3 --retry-connrefused https://www.nuand.com/fpga/hostedx40-latest.rbf
|
||||
sudo mkdir -p /usr/share/Nuand/bladeRF
|
||||
sudo mv bladeRF_fw_latest.img /usr/share/Nuand/bladeRF/bladeRF_fw.img
|
||||
sudo mv hostedx40-latest.rbf /usr/share/Nuand/bladeRF/hostedx40.rbf
|
||||
@@ -567,7 +567,7 @@ check_install_additional_tools (){
|
||||
echo_info "Installing Netinterfaces package. The logfile for installation is in $log_netiface"
|
||||
(
|
||||
$SUDO rm -fr /tmp/netifaces-0.10.4.tar.gz /tmp/netifaces
|
||||
wget -P /tmp https://pypi.python.org/packages/18/fa/dd13d4910aea339c0bb87d2b3838d8fd923c11869b1f6e741dbd0ff3bc00/netifaces-0.10.4.tar.gz
|
||||
wget --tries=3 --retry-connrefused -P /tmp https://pypi.python.org/packages/18/fa/dd13d4910aea339c0bb87d2b3838d8fd923c11869b1f6e741dbd0ff3bc00/netifaces-0.10.4.tar.gz
|
||||
tar -xzvf /tmp/netifaces-0.10.4.tar.gz -C /tmp
|
||||
cd /tmp/netifaces-0.10.4
|
||||
$SUDO python setup.py install
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# use UP and DOWN arrow keys to scroll the view displayed by timeplot
|
||||
|
||||
while read -n 1 key
|
||||
do
|
||||
case "$key" in
|
||||
'B' )
|
||||
kill -SIGUSR1 `ps aux|grep timeplot|grep -v grep|grep -v sh|tr -s ' ' :|cut -f 2 -d :`
|
||||
;;
|
||||
'A' )
|
||||
kill -SIGUSR2 `ps aux|grep timeplot|grep -v grep|grep -v sh|tr -s ' ' :|cut -f 2 -d :`
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@@ -13,7 +13,8 @@ void usage(void)
|
||||
"options:\n"
|
||||
" -d <database file> this option is mandatory\n"
|
||||
" -ip <host> connect to given IP address (default %s)\n"
|
||||
" -p <port> connect to given port (default %d)\n",
|
||||
" -p <port> connect to given port (default %d)\n"
|
||||
" -e <event> event to trace (default VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER)\n",
|
||||
DEFAULT_REMOTE_IP,
|
||||
DEFAULT_REMOTE_PORT
|
||||
);
|
||||
@@ -47,6 +48,7 @@ int main(int n, char **v)
|
||||
int ev_fun;
|
||||
int start_valid = 0;
|
||||
struct timespec start_time, stop_time, delta_time;
|
||||
char *name = "VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER";
|
||||
|
||||
for (i = 1; i < n; i++) {
|
||||
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
||||
@@ -55,6 +57,7 @@ int main(int n, char **v)
|
||||
if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
|
||||
if (!strcmp(v[i], "-p"))
|
||||
{ if (i > n-2) usage(); port = atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-e")) { if (i > n-2) usage(); name = v[++i]; continue; }
|
||||
usage();
|
||||
}
|
||||
|
||||
@@ -71,10 +74,9 @@ int main(int n, char **v)
|
||||
is_on = calloc(number_of_events, sizeof(int));
|
||||
if (is_on == NULL) abort();
|
||||
|
||||
on_off(database, "VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER", is_on, 1);
|
||||
on_off(database, name, is_on, 1);
|
||||
|
||||
ev_fun = event_id_from_name(database,
|
||||
"VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER");
|
||||
ev_fun = event_id_from_name(database, name);
|
||||
|
||||
socket = connect_to(ip, port);
|
||||
|
||||
|
||||
@@ -28,6 +28,7 @@ int bins[50];
|
||||
|
||||
#define N 1000
|
||||
int data[N];
|
||||
long start = 100;
|
||||
|
||||
void plot(void)
|
||||
{
|
||||
@@ -45,7 +46,8 @@ void plot(void)
|
||||
if (data[i] < vmin) vmin = data[i];
|
||||
if (data[i] > vmax) vmax = data[i];
|
||||
vavg += data[i];
|
||||
int ms2 = data[i]/binsize_ns;
|
||||
int ms2 = (data[i] - start * 1000)/binsize_ns;
|
||||
if (ms2 < 0) ms2 = 0;
|
||||
if (ms2 > 49) ms2 = 49;
|
||||
bins[ms2]++;
|
||||
if (bins[ms2] > max) max = bins[ms2];
|
||||
@@ -55,7 +57,7 @@ void plot(void)
|
||||
|
||||
GOTO(1,1);
|
||||
for (i = 0; i < 50; i++) {
|
||||
double binend = (i+1) * binsize_ns / 1000.;
|
||||
double binend = (i+1) * binsize_ns / 1000. + start;
|
||||
int k;
|
||||
int width = bins[i] * 70 / max;
|
||||
/* force at least width of 1 if some point is there */
|
||||
@@ -68,11 +70,23 @@ void plot(void)
|
||||
printf("min %d ns max %d ns avg %ld ns\n", vmin, vmax, vavg);
|
||||
}
|
||||
|
||||
void up(int x)
|
||||
{
|
||||
start += 5;
|
||||
}
|
||||
|
||||
void down(int x)
|
||||
{
|
||||
start -= 5;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int i;
|
||||
int pos = 0;
|
||||
signal(SIGINT, sig);
|
||||
signal(SIGUSR1, up);
|
||||
signal(SIGUSR2, down);
|
||||
RESET();
|
||||
HIDE_CURSOR();
|
||||
while (!feof(stdin)) {
|
||||
|
||||
@@ -1,12 +1,32 @@
|
||||
/*
|
||||
Author: Laurent THOMAS, Open Cells
|
||||
copyleft: OpenAirInterface Software Alliance and it's licence
|
||||
* 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
|
||||
*
|
||||
* Author and copyright: Laurent Thomas, open-cells.com
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <sys/eventfd.h>
|
||||
|
||||
|
||||
extern "C" {
|
||||
#include <intertask_interface.h>
|
||||
#include <common/utils/system.h>
|
||||
|
||||
@@ -35,7 +55,6 @@ typedef struct task_list_s {
|
||||
int timer_expired(int fd);
|
||||
task_list_t tasks[TASK_MAX];
|
||||
|
||||
extern "C" {
|
||||
void *pool_buffer_init (void) {
|
||||
return 0;
|
||||
}
|
||||
@@ -86,6 +105,9 @@ extern "C" {
|
||||
temp->ittiMsgHeader.messageId = message_id;
|
||||
temp->ittiMsgHeader.originTaskId = origin_task_id;
|
||||
temp->ittiMsgHeader.ittiMsgSize = size;
|
||||
temp->ittiMsgHeader.destinationTaskId=TASK_UNKNOWN;
|
||||
temp->ittiMsgHeader.instance=0;
|
||||
temp->ittiMsgHeader.lte_time={0};
|
||||
return temp;
|
||||
//return itti_alloc_new_message_sized(origin_task_id, message_id, messages_info[message_id].size);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
/*
|
||||
Author: Laurent THOMAS, Open Cells
|
||||
Copyleft: OpenAirInterface software alliance and it's license
|
||||
* 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
|
||||
*
|
||||
* Author and copyright: Laurent Thomas, open-cells.com
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef INTERTASK_INTERFACE_H_
|
||||
#define INTERTASK_INTERFACE_H_
|
||||
#include <stdint.h>
|
||||
@@ -276,7 +295,7 @@ typedef struct {
|
||||
//TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL)
|
||||
//TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)
|
||||
//TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)
|
||||
|
||||
void * rrc_enb_process_msg(void*);
|
||||
#define FOREACH_TASK(TASK_DEF) \
|
||||
TASK_DEF(TASK_UNKNOWN, TASK_PRIORITY_MED, 50, NULL, NULL) \
|
||||
TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10, NULL, NULL) \
|
||||
|
||||
@@ -243,6 +243,8 @@ void configure_linux(void) {
|
||||
|
||||
// Set CPU frequency to it's maximum
|
||||
if ( 0 != system("for d in /sys/devices/system/cpu/cpu[0-9]*; do cat $d/cpufreq/cpuinfo_max_freq > $d/cpufreq/scaling_min_freq; done"))
|
||||
LOG_W(HW,"Can't set cpu frequency\n");
|
||||
|
||||
LOG_E(HW,"Can't set cpu frequency\n");
|
||||
|
||||
mlockall(MCL_CURRENT | MCL_FUTURE);
|
||||
|
||||
}
|
||||
|
||||
@@ -110,13 +110,13 @@ void measurcmd_display_pdcpcpu(telnet_printfunc_t prnt) {
|
||||
|
||||
|
||||
void measurcmd_display_macstats_ue(telnet_printfunc_t prnt) {
|
||||
UE_list_t *UE_list = &(RC.mac[eNB_id]->UE_list);
|
||||
UE_info_t *UE_info = &(RC.mac[eNB_id]->UE_info);
|
||||
|
||||
for (int UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) {
|
||||
for (int i=0; i<UE_list->numactiveCCs[UE_id]; i++) {
|
||||
int CC_id = UE_list->ordered_CCids[i][UE_id];
|
||||
for (int UE_id=UE_info->list.head; UE_id>=0; UE_id=UE_info->list.next[UE_id]) {
|
||||
for (int i=0; i<UE_info->numactiveCCs[UE_id]; i++) {
|
||||
int CC_id = UE_info->ordered_CCids[i][UE_id];
|
||||
prnt("%s UE %i Id %i CCid %i %s\n",HDR,i,UE_id,CC_id,HDR);
|
||||
eNB_UE_STATS *macuestatptr = &(UE_list->eNB_UE_stats[CC_id][UE_id]);
|
||||
eNB_UE_STATS *macuestatptr = &(UE_info->eNB_UE_stats[CC_id][UE_id]);
|
||||
telnet_ltemeasurdef_t statsptr[]=LTEMAC_UEMEASURE;
|
||||
measurcmd_display_measures(prnt, statsptr, sizeof(statsptr)/sizeof(telnet_ltemeasurdef_t));
|
||||
}
|
||||
@@ -155,7 +155,7 @@ void measurcmd_display_one_rlcstat(telnet_printfunc_t prnt, int UE_id, telnet_lt
|
||||
|
||||
void measurcmd_display_rlcstats(telnet_printfunc_t prnt) {
|
||||
protocol_ctxt_t ctxt;
|
||||
UE_list_t *UE_list = &(RC.mac[eNB_id]->UE_list);
|
||||
UE_info_t *UE_info = &(RC.mac[eNB_id]->UE_info);
|
||||
telnet_ltemeasurdef_t statsptr[]=LTE_RLCMEASURE;
|
||||
int num_rlcmeasure = sizeof(statsptr)/sizeof(telnet_ltemeasurdef_t );
|
||||
unsigned int *rlcstats = malloc(num_rlcmeasure*sizeof(unsigned int));
|
||||
@@ -165,9 +165,9 @@ void measurcmd_display_rlcstats(telnet_printfunc_t prnt) {
|
||||
statsptr[i].vptr = rlcstats + i;
|
||||
}
|
||||
|
||||
for (int UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) {
|
||||
for (int UE_id=UE_info->list.head; UE_id>=0; UE_id=UE_info->list.next[UE_id]) {
|
||||
#define NB_eNB_INST 1
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt,eNB_id, ENB_FLAG_YES,UE_list->eNB_UE_stats[0][UE_id].crnti,
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt,eNB_id, ENB_FLAG_YES,UE_info->eNB_UE_stats[0][UE_id].crnti,
|
||||
eNB->frame,eNB->subframe,eNB_id);
|
||||
measurcmd_display_one_rlcstat(prnt, UE_id, statsptr, num_rlcmeasure, rlcstats, "DCCH", &ctxt, SRB_FLAG_YES, DCCH);
|
||||
measurcmd_display_one_rlcstat(prnt, UE_id, statsptr, num_rlcmeasure, rlcstats, "DTCH", &ctxt, SRB_FLAG_NO, DTCH-2);
|
||||
|
||||
@@ -1,7 +1,26 @@
|
||||
/*
|
||||
Author: Laurent THOMAS, Open Cells
|
||||
copyleft: OpenAirInterface Software Alliance and it's licence
|
||||
* 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
|
||||
*
|
||||
* Author and copyright: Laurent Thomas, open-cells.com
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#include <common/utils/simple_executable.h>
|
||||
|
||||
#include "thread-pool.h"
|
||||
|
||||
@@ -1,8 +1,27 @@
|
||||
/*
|
||||
Author: Laurent THOMAS, Open Cells
|
||||
copyleft: OpenAirInterface Software Alliance and it's licence
|
||||
* 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
|
||||
*
|
||||
* Author and copyright: Laurent Thomas, open-cells.com
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <sched.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -1,8 +1,27 @@
|
||||
/*
|
||||
Author: Laurent THOMAS, Open Cells
|
||||
copyleft: OpenAirInterface Software Alliance and it's licence
|
||||
* 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
|
||||
*
|
||||
* Author and copyright: Laurent Thomas, open-cells.com
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
#ifndef THREAD_POOL_H
|
||||
#define THREAD_POOL_H
|
||||
#include <stdbool.h>
|
||||
@@ -217,11 +236,11 @@ static inline void pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg) {
|
||||
|
||||
static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
|
||||
notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
|
||||
|
||||
AssertFatal(t->traceFd, "Thread pool used while not initialized");
|
||||
if (t->measurePerf)
|
||||
msg->returnTime=rdtsc();
|
||||
|
||||
if (t->traceFd >= 0)
|
||||
if (t->traceFd > 0)
|
||||
if(write(t->traceFd, msg, sizeof(*msg)));
|
||||
|
||||
return msg;
|
||||
@@ -229,7 +248,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_
|
||||
|
||||
static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
|
||||
notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo);
|
||||
|
||||
AssertFatal(t->traceFd, "Thread pool used while not initialized");
|
||||
if (msg == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
+12
-7
@@ -14,19 +14,24 @@
|
||||
|
||||
This simulator allows to test L2 and above Layers using the nFAPI interface.
|
||||
|
||||
The UE executable is able to "simulate" multiple UEs in order to stimulate the scheduler in the eNB.
|
||||
|
||||
**This simulator is available starting the `v1.0.0` release on the `master` branch.**
|
||||
|
||||
Currently the only validated deployment by CI and developers is *with S1 interface and eNB / UEs are on the same machine*.
|
||||
|
||||
Others deployments will be supported later after bug fixes and validation in the CI process.
|
||||
|
||||
1. [With S1 -- eNB and UE on same machine](L2NFAPI_S1.md)
|
||||
|
||||
|
||||
Currently the Continuous Integration process is validating this simulator the following way:
|
||||
|
||||
* the LTE modem executable is run on one host (in our CI deployment it is a **Xenial Virtual Machine**)
|
||||
* the UE(s) modem executable is run on another host (in our CI deployment it is also a **Xenial Virtual Machine**)
|
||||
* We are testing:
|
||||
* in S1 mode (ie we are connected to a 3rd-party EPC)
|
||||
* in noS1 mode (no need for an EPC)
|
||||
|
||||
Normally it should be fine to run both executables on the same host using the `loopback` interface to communicate. **But we are not guaranting it**
|
||||
|
||||
1. [With S1 -- eNB and UE on 2 hosts](L2NFAPI_S1.md)
|
||||
2. [No S1 -- eNB and UE on 2 hosts](L2NFAPI_NOS1.md)
|
||||
|
||||
----
|
||||
|
||||
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
|
||||
|
||||
@@ -0,0 +1,349 @@
|
||||
<table style="border-collapse: collapse; border: none;">
|
||||
<tr style="border-collapse: collapse; border: none;">
|
||||
<td style="border-collapse: collapse; border: none;">
|
||||
<a href="http://www.openairinterface.org/">
|
||||
<img src="./images/oai_final_logo.png" alt="" border=3 height=50 width=150>
|
||||
</img>
|
||||
</a>
|
||||
</td>
|
||||
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||
<b><font size = "5">L2 nFAPI Simulator (no S1 Mode / 2-host deployment)</font></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Table of Contents ##
|
||||
|
||||
1. [Environment](#1-environment)
|
||||
2. [Retrieve the OAI eNB-UE source code](#2-retrieve-the-oai-enb-ue-source-code)
|
||||
3. [Setup of the USIM information in UE folder](#3-setup-of-the-usim-information-in-ue-folder)
|
||||
4. [Setup of the Configuration files](#4-setup-of-the-configuration-files)
|
||||
1. [The eNB Configuration file](#41-the-enb-configuration-file)
|
||||
2. [The UE Configuration file](#42-the-ue-configuration-file)
|
||||
5. [Build OAI UE and eNodeB](#5-build-oai-ue-and-enodeb)
|
||||
6. [Start the eNB](#6-start-the-enb)
|
||||
7. [Start the UE](#7-start-the-ue)
|
||||
8. [Test with ping](#8-test-with-ping)
|
||||
9. [Limitations](#9-limitations)
|
||||
|
||||
# 1. Environment #
|
||||
|
||||
You may not have access to an EPC or you don't want to hassle to deploy one.
|
||||
|
||||
2 servers are used in this deployment. You can use Virtual Machines instead of each server; like it is done in the CI process.
|
||||
|
||||
* Machine B contains the OAI eNB executable (`lte-softmodem`)
|
||||
* Machine C contains the OAI UE(s) executable (`lte-uesoftmodem`)
|
||||
|
||||
Example of L2 nFAPI Simulator testing environment:
|
||||
|
||||
<img src="./images/L2-sim-noS1-2-host-deployment.png" alt="" border=3>
|
||||
|
||||
Note that the IP addresses are indicative and need to be adapted to your environment.
|
||||
|
||||
# 2. Retrieve the OAI eNB-UE source code #
|
||||
|
||||
At the time of writing, the tag used in the `develop` branch to do this documentation was `2020.w16`.
|
||||
|
||||
The tutorial should be valid for the `master` branch tags such as `v1.2.0` or `v1.2.1`. But you may face issues that could be fixed in newer `develop` tags.
|
||||
|
||||
Please try to use the same commit ID on both eNB/UE hosts.
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git enb_folder
|
||||
cd enb_folder
|
||||
git checkout develop
|
||||
```
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineC
|
||||
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ue_folder
|
||||
cd ue_folder
|
||||
git checkout develop
|
||||
```
|
||||
|
||||
# 3. Setup of the USIM information in UE folder #
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineC
|
||||
cd ue_folder
|
||||
# Edit openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf with your preferred editor
|
||||
```
|
||||
|
||||
Edit the USIM information within this file in order to match the HSS database. They **HAVE TO** match:
|
||||
|
||||
* PLMN+MSIN and IMSI of users table of HSS database **SHALL** be the same.
|
||||
* OPC of this file and OPC of users table of HSS database **SHALL** be the same.
|
||||
* USIM_API_K of this file and the key of users table of HSS database **SHALL** be the same.
|
||||
|
||||
When testing multiple UEs, it is necessary to add other UEs information like described below for 2 Users. Only UE0 (first UE) information is written in the original file.
|
||||
|
||||
```
|
||||
UE0:
|
||||
{
|
||||
USER: {
|
||||
IMEI="356113022094149";
|
||||
MANUFACTURER="EURECOM";
|
||||
MODEL="LTE Android PC";
|
||||
PIN="0000";
|
||||
};
|
||||
|
||||
SIM: {
|
||||
MSIN="0000000001"; // <-- Modify here
|
||||
USIM_API_K="8baf473f2f8fd09487cccbd7097c6862";
|
||||
OPC="e734f8734007d6c5ce7a0508809e7e9c";
|
||||
MSISDN="33611123456";
|
||||
};
|
||||
...
|
||||
};
|
||||
// Copy the UE0 and edit
|
||||
UE1: // <- Edit here
|
||||
{
|
||||
USER: {
|
||||
IMEI="356113022094149";
|
||||
MANUFACTURER="EURECOM";
|
||||
MODEL="LTE Android PC";
|
||||
PIN="0000";
|
||||
};
|
||||
|
||||
SIM: {
|
||||
MSIN="0000000002"; // <-- Modify here
|
||||
USIM_API_K="8baf473f2f8fd09487cccbd7097c6862";
|
||||
OPC="e734f8734007d6c5ce7a0508809e7e9c";
|
||||
MSISDN="33611123456";
|
||||
};
|
||||
...
|
||||
};
|
||||
```
|
||||
|
||||
You can repeat the operation for as many users you want to test with.
|
||||
|
||||
# 4. Setup of the Configuration files #
|
||||
|
||||
**CAUTION: both proposed configuration files resides in the ci-scripts realm. You can copy them but you CANNOT push any modification on these 2 files as part of an MR without informing the CI team.**
|
||||
|
||||
## 4.1. The eNB Configuration file ##
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
cd enb_folder
|
||||
# Edit ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf with your preferred editor
|
||||
```
|
||||
|
||||
First verify the nFAPI interface setup on the physical ethernet interface of machineB and put the proper IP addresses for both hosts.
|
||||
|
||||
```
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
local_s_if_name = "ens3"; // <-- HERE
|
||||
remote_s_address = "192.168.122.169"; // <-- HERE
|
||||
local_s_address = "192.168.122.31"; // <-- HERE
|
||||
local_s_portc = 50001;
|
||||
remote_s_portc = 50000;
|
||||
local_s_portd = 50011;
|
||||
remote_s_portd = 50010;
|
||||
tr_s_preference = "nfapi";
|
||||
tr_n_preference = "local_RRC";
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
If you are testing more than 16 UEs, a proper setting on the RUs is necessary. **Note that this part is NOT present in the original configuration file**.
|
||||
|
||||
```
|
||||
RUs = (
|
||||
{
|
||||
local_rf = "yes"
|
||||
nb_tx = 1
|
||||
nb_rx = 1
|
||||
att_tx = 20
|
||||
att_rx = 0;
|
||||
bands = [38];
|
||||
max_pdschReferenceSignalPower = -23;
|
||||
max_rxgain = 116;
|
||||
eNB_instances = [0];
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
Last, the S1 interface shall be properly set.
|
||||
|
||||
```
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; // replace with 192.168.122.195
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
}
|
||||
);
|
||||
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "ens3"; // replace with the proper interface name
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "ens3"; // replace with the proper interface name
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
|
||||
};
|
||||
```
|
||||
|
||||
## 4.2. The UE Configuration file ##
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
cd ue_folder
|
||||
# Edit ci-scripts/conf_files/ue.nfapi.conf with your preferred editor
|
||||
```
|
||||
|
||||
Verify the nFAPI interface setup on the loopback interface.
|
||||
|
||||
```
|
||||
L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "nfapi";
|
||||
local_n_if_name = "ens3"; // <- HERE
|
||||
remote_n_address = "192.168.122.31"; // <- HERE
|
||||
local_n_address = "192.168.122.169"; // <- HERE
|
||||
local_n_portc = 50000;
|
||||
remote_n_portc = 50001;
|
||||
local_n_portd = 50010;
|
||||
remote_n_portd = 50011;
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
# 5. Build OAI UE and eNodeB #
|
||||
|
||||
See [Build documentation](./BUILD.md).
|
||||
|
||||
# 6. Start the eNB #
|
||||
|
||||
In the first terminal (the one you used to build the eNB):
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
cd enb_folder/cmake_targets
|
||||
sudo -E ./ran_build/build/lte-softmodem -O ../ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf --noS1 > enb.log 2>&1
|
||||
sleep 10
|
||||
ifconfig
|
||||
ens3 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
|
||||
inet addr:192.168.122.31 Bcast:192.168.122.255 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_enb1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:10.0.1.1 P-t-P:192.172.0.2 Mask:255.255.255.0
|
||||
....
|
||||
```
|
||||
|
||||
If you don't use redirection, you can test but many logs are printed on the console and this may affect performance of the L2-nFAPI simulator.
|
||||
|
||||
We do recommend the redirection in steady mode once your setup is correct.
|
||||
|
||||
# 7. Start the UE #
|
||||
|
||||
In the second terminal (the one you used to build the UE):
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineC
|
||||
cd ue_folder/cmake_targets
|
||||
# Test 64 UEs, 1 thread in FDD mode
|
||||
sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --noS1 --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 > ue.log 2>&1
|
||||
# Test 64 UEs, 1 thread in TDD mode
|
||||
sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --noS1 --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 -T 1 > ue.log 2>&1
|
||||
# The "-T 1" option means TDD config
|
||||
```
|
||||
|
||||
- The number of UEs can set by using `--num-ues` option and the maximum UE number is 255 (with the `--mu*` options, otherwise 16).
|
||||
- The number of threads can set with the `--nums-ue-thread`. This number **SHALL NOT** be greater than the number of UEs.
|
||||
* At the time of writing, it seems to be enough to run on a single thread.
|
||||
- The `--nokrnmod 1` option makes use of the preferred and supported tunnel interface.
|
||||
- How many UE that can be tested depends on hardware (server , PC, etc) performance in your environment.
|
||||
|
||||
For example, running with 4 UEs:
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineC
|
||||
cd ue_folder/cmake_targets
|
||||
sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --noS1 --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 > ue.log 2>&1
|
||||
sleep 10
|
||||
ifconfig
|
||||
ens3 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
|
||||
inet addr:192.168.122.169 Bcast:192.168.122.255 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_ue1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:10.0.1.2 P-t-P:192.172.0.2 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_ue2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:10.0.1.3 P-t-P:192.172.0.3 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_ue3 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:10.0.1.4 P-t-P:192.172.0.4 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_ue4 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:10.0.1.5 P-t-P:192.172.0.5 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_uem1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:10.0.2.2 P-t-P:10.0.2.2 Mask:255.255.255.0
|
||||
....
|
||||
....
|
||||
```
|
||||
|
||||
Having the 4 oaitun_ue tunnel interfaces up and with an allocated address means the connection with EPC went alright.
|
||||
|
||||
# 8. Test with ping #
|
||||
|
||||
In a third terminal, after around 10 seconds, the UE(s) shall be connected to the eNB: Check with ifconfig
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
# Ping UE1 IP address based on the EPC pool used: in this example:
|
||||
ping -I oaitun_enb1 -c 20 10.0.1.2
|
||||
# Ping UE4 IP address based on the EPC pool used: in this example:
|
||||
ping -I oaitun_enb1 -c 20 10.0.1.5
|
||||
```
|
||||
|
||||
Ping from the UE side:
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineC
|
||||
ping -I oaitun_ue1 -c 20 10.0.1.1
|
||||
ping -I oaitun_ue3 -c 20 10.0.1.1
|
||||
```
|
||||
|
||||
iperf operations can also be performed.
|
||||
|
||||
DL traffic:
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineC
|
||||
iperf -B 10.0.1.2 -u -s -i 1 -fm -p 5002
|
||||
$ ssh sudousername@machineB
|
||||
iperf -c 10.0.1.2 -u -t 30 -b 3M -i 1 -fm -B 10.0.1.1 -p 5002
|
||||
```
|
||||
|
||||
UL traffic:
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
iperf -B 10.0.1.1 -u -s -i 1 -fm -p 5002
|
||||
$ ssh sudousername@machineC
|
||||
iperf -c 10.0.1.1 -u -t 30 -b 2M -i 1 -fm -B 10.0.1.2 -p 5002
|
||||
```
|
||||
|
||||
# 9. Limitations #
|
||||
|
||||
|
||||
----
|
||||
|
||||
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
|
||||
[oai softmodem features](FEATURE_SET.md)
|
||||
|
||||
[oai softmodem build procedure](BUILD.md)
|
||||
|
||||
[L2 nfapi simulator](L2NFAPI.md)
|
||||
+97
-70
@@ -7,7 +7,7 @@
|
||||
</a>
|
||||
</td>
|
||||
<td style="border-collapse: collapse; border: none; vertical-align: center;">
|
||||
<b><font size = "5">L2 nFAPI Simulator (with S1 / same machine deployment)</font></b>
|
||||
<b><font size = "5">L2 nFAPI Simulator (with S1 / 2-host deployment)</font></b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -21,25 +21,24 @@
|
||||
5. [Setup of the Configuration files](#5-setup-of-the-configuration-files)
|
||||
1. [The eNB Configuration file](#51-the-enb-configuration-file)
|
||||
2. [The UE Configuration file](#52-the-ue-configuration-file)
|
||||
6. [Bring Up a second loopback interface](#6-bring-up-a-second-loopback-interface)
|
||||
7. [Build the eNB](#7-build-the-enb)
|
||||
8. [Build the UE](#8-build-the-ue)
|
||||
9. [Initialize the NAS UE Layer](#9-initialize-the-nas-ue-layer)
|
||||
10. [Start the eNB](#10-start-the-enb)
|
||||
11. [Start the UE](#11-start-the-ue)
|
||||
12. [Test with ping](#12-test-with-ping)
|
||||
13. [Limitations](#13-limitations)
|
||||
6. [Build OAI UE and eNodeB](#6-build-oai-ue-and-enodeb)
|
||||
7. [Start EPC](#7-start-epc)
|
||||
8. [Start the eNB](#8-start-the-enb)
|
||||
9. [Start the UE](#9-start-the-ue)
|
||||
10. [Test with ping](#10-test-with-ping)
|
||||
11. [Limitations](#11-limitations)
|
||||
|
||||
# 1. Environment #
|
||||
|
||||
2 servers are used in this deployment. You can use Virtual Machines instead of each server; like it is done in the CI process.
|
||||
3 servers are used in this deployment. You can use Virtual Machines instead of each server; like it is done in the CI process.
|
||||
|
||||
* Machine A contains the EPC.
|
||||
* Machine B contains the OAI eNB and the OAI UE(s)
|
||||
* Machine B contains the OAI eNB executable (`lte-softmodem`)
|
||||
* Machine C contains the OAI UE(s) executable (`lte-uesoftmodem`)
|
||||
|
||||
Example of L2 nFAPI Simulator testing environment:
|
||||
|
||||
<img src="../l2-nfapi-simulator/L2-sim-single-server-deployment.png" alt="" border=3>
|
||||
<img src="./images/L2-sim-S1-3-host-deployment.png" alt="" border=3>
|
||||
|
||||
Note that the IP addresses are indicative and need to be adapted to your environment.
|
||||
|
||||
@@ -47,26 +46,35 @@ Note that the IP addresses are indicative and need to be adapted to your environ
|
||||
|
||||
Create the environment for the EPC and register all **USIM** information into the **HSS** database.
|
||||
|
||||
If you are using OAI-EPC ([see on GitHub](https://github.com/OPENAIRINTERFACE/openair-cn)), build **HSS/MME/SPGW** and create config files.
|
||||
If you are using OAI-EPC ([see on GitHub](https://github.com/OPENAIRINTERFACE/openair-epc-fed)), build **HSS/MME/SPGW** and create config files.
|
||||
|
||||
# 3. Retrieve the OAI eNB-UE source code #
|
||||
|
||||
The eNB and the UE executables will compiled into 2 separate folders on the same machine `B`.
|
||||
At the time of writing, the tag used in the `develop` branch to do this documentation was `2020.w16`.
|
||||
|
||||
The tutorial should be valid for the `master` branch tags such as `v1.2.0` or `v1.2.1`. But you may face issues that could be fixed in newer `develop` tags.
|
||||
|
||||
Please try to use the same commit ID on both eNB/UE hosts.
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
$ git clone https://gitlab.eurecom.fr/oai/openairinterface5g/ enb_folder
|
||||
$ cd enb_folder
|
||||
$ git checkout -f v1.0.0
|
||||
$ cd ..
|
||||
$ cp -Rf enb_folder ue_folder
|
||||
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git enb_folder
|
||||
cd enb_folder
|
||||
git checkout develop
|
||||
```
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineC
|
||||
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git ue_folder
|
||||
cd ue_folder
|
||||
git checkout develop
|
||||
```
|
||||
|
||||
# 4. Setup of the USIM information in UE folder #
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
$ cd ue_folder
|
||||
$ ssh sudousername@machineC
|
||||
cd ue_folder
|
||||
# Edit openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf with your preferred editor
|
||||
```
|
||||
|
||||
@@ -126,19 +134,19 @@ You can repeat the operation for as many users you want to test with.
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
$ cd enb_folder
|
||||
cd enb_folder
|
||||
# Edit ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf with your preferred editor
|
||||
```
|
||||
|
||||
First verify the nFAPI interface setup on the 2nd loopback interface.
|
||||
First verify the nFAPI interface setup on the physical ethernet interface of machineB and put the proper IP addresses for both hosts.
|
||||
|
||||
```
|
||||
MACRLCs = (
|
||||
{
|
||||
num_cc = 1;
|
||||
local_s_if_name = "lo:"; // <-- HERE
|
||||
remote_s_address = "127.0.0.1"; // <-- HERE
|
||||
local_s_address = "127.0.0.2"; // <-- HERE
|
||||
local_s_if_name = "ens3"; // <-- HERE
|
||||
remote_s_address = "192.168.122.169"; // <-- HERE
|
||||
local_s_address = "192.168.122.31"; // <-- HERE
|
||||
local_s_portc = 50001;
|
||||
remote_s_portc = 50000;
|
||||
local_s_portd = 50011;
|
||||
@@ -171,7 +179,7 @@ Last, the S1 interface shall be properly set.
|
||||
|
||||
```
|
||||
////////// MME parameters:
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; // replace with 192.168.10.20
|
||||
mme_ip_address = ( { ipv4 = "CI_MME_IP_ADDR"; // replace with 192.168.122.195
|
||||
ipv6 = "192:168:30::17";
|
||||
active = "yes";
|
||||
preference = "ipv4";
|
||||
@@ -181,11 +189,11 @@ Last, the S1 interface shall be properly set.
|
||||
NETWORK_INTERFACES :
|
||||
{
|
||||
ENB_INTERFACE_NAME_FOR_S1_MME = "ens3"; // replace with the proper interface name
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; // replace with 192.168.10.10
|
||||
ENB_IPV4_ADDRESS_FOR_S1_MME = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31
|
||||
ENB_INTERFACE_NAME_FOR_S1U = "ens3"; // replace with the proper interface name
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; // replace with 192.168.10.10
|
||||
ENB_IPV4_ADDRESS_FOR_S1U = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31
|
||||
ENB_PORT_FOR_S1U = 2152; # Spec 2152
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; // replace with 192.168.10.10
|
||||
ENB_IPV4_ADDRESS_FOR_X2C = "CI_ENB_IP_ADDR"; // replace with 192.168.122.31
|
||||
ENB_PORT_FOR_X2C = 36422; # Spec 36422
|
||||
|
||||
};
|
||||
@@ -195,7 +203,7 @@ Last, the S1 interface shall be properly set.
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
$ cd ue_folder
|
||||
cd ue_folder
|
||||
# Edit ci-scripts/conf_files/ue.nfapi.conf with your preferred editor
|
||||
```
|
||||
|
||||
@@ -206,9 +214,9 @@ L1s = (
|
||||
{
|
||||
num_cc = 1;
|
||||
tr_n_preference = "nfapi";
|
||||
local_n_if_name = "lo"; // <- HERE
|
||||
remote_n_address = "127.0.0.2"; // <- HERE
|
||||
local_n_address = "127.0.0.1"; // <- HERE
|
||||
local_n_if_name = "ens3"; // <- HERE
|
||||
remote_n_address = "192.168.122.31"; // <- HERE
|
||||
local_n_address = "192.168.122.169"; // <- HERE
|
||||
local_n_portc = 50000;
|
||||
remote_n_portc = 50001;
|
||||
local_n_portd = 50010;
|
||||
@@ -217,20 +225,11 @@ L1s = (
|
||||
);
|
||||
```
|
||||
|
||||
# 6. Bring Up a second loopback interface #
|
||||
# 6. Build OAI UE and eNodeB #
|
||||
|
||||
A second loopback interface is used to connect the eNB and the UEs.
|
||||
See [Build documentation](./BUILD.md).
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
$ sudo ifconfig lo: 127.0.0.2 netmask 255.0.0.0 up
|
||||
```
|
||||
|
||||
# 7. [Build OAI UE and eNodeB](BUILD.md) #
|
||||
|
||||
|
||||
|
||||
# 8. Initialize the NAS UE Layer #
|
||||
# 7. Start EPC #
|
||||
|
||||
Start the EPC on machine `A`.
|
||||
|
||||
@@ -239,61 +238,89 @@ $ ssh sudousername@machineA
|
||||
# Start the EPC
|
||||
```
|
||||
|
||||
# 9. Start the eNB #
|
||||
# 8. Start the eNB #
|
||||
|
||||
In the first terminal (the one you used to build the eNB):
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
$ cd enb_folder/cmake_targets
|
||||
$ sudo -E ./ran_build/build/lte-softmodem -O ../ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf > enb.log 2>&1
|
||||
cd enb_folder/cmake_targets
|
||||
sudo -E ./ran_build/build/lte-softmodem -O ../ci-scripts/conf_files/rcc.band7.tm1.nfapi.conf > enb.log 2>&1
|
||||
```
|
||||
|
||||
If you don't use redirection, you can test but many logs are printed on the console and this may affect performance of the L2-nFAPI simulator.
|
||||
|
||||
We do recommend the redirection in steady mode once your setup is correct.
|
||||
|
||||
# 10. Start the UE #
|
||||
# 9. Start the UE #
|
||||
|
||||
In the second terminal (the one you used to build the UE):
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineB
|
||||
$ cd ue_folder/cmake_targets
|
||||
# Test 64 UEs, 64 threads in FDD mode
|
||||
$ sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums-ue-thread 64 > ue.log 2>&1
|
||||
# Test 64 UEs, 64 threads in TDD mode
|
||||
$ sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums-ue-thread 64 -T 1 > ue.log 2>&1
|
||||
$ ssh sudousername@machineC
|
||||
cd ue_folder/cmake_targets
|
||||
# Test 64 UEs, 1 thread in FDD mode
|
||||
sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 > ue.log 2>&1
|
||||
# Test 64 UEs, 1 thread in TDD mode
|
||||
sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 -T 1 > ue.log 2>&1
|
||||
# The "-T 1" option means TDD config
|
||||
```
|
||||
|
||||
- The number of UEs can set by using `--num-ues` option and the maximum UE number is 255 (with the `--mu*` options, otherwise 16).
|
||||
- The umber of threads can set with the `--nums-ue-thread`. This number **SHALL NOT** be greater than the number of UEs.
|
||||
- The number of threads can set with the `--nums-ue-thread`. This number **SHALL NOT** be greater than the number of UEs.
|
||||
* At the time of writing, it seems to be enough to run on a single thread.
|
||||
- The `--nokrnmod 1` option makes use of the preferred and supported tunnel interface.
|
||||
- How many UE that can be tested depends on hardware (server , PC, etc) performance in your environment.
|
||||
|
||||
# 11. Test with ping #
|
||||
For example, running with 4 UEs:
|
||||
|
||||
In a third terminal, after around 10 seconds, the UE(s) shall be connected to the eNB:
|
||||
```bash
|
||||
$ ssh sudousername@machineC
|
||||
cd ue_folder/cmake_targets
|
||||
sudo -E ./ran_build/build/lte-uesoftmodem -O ../ci-scripts/conf_files/ue.nfapi.conf --L2-emul 3 --num-ues 64 --nums_ue_thread 1 --nokrnmod 1 > ue.log 2>&1
|
||||
sleep 10
|
||||
ifconfig
|
||||
ens3 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX
|
||||
inet addr:192.168.122.169 Bcast:192.168.122.255 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_ue1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:192.172.0.2 P-t-P:192.172.0.2 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_ue2 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:192.172.0.3 P-t-P:192.172.0.3 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_ue3 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:192.172.0.4 P-t-P:192.172.0.4 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_ue4 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:192.172.0.5 P-t-P:192.172.0.5 Mask:255.255.255.0
|
||||
....
|
||||
oaitun_uem1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
|
||||
inet addr:10.0.2.2 P-t-P:10.0.2.2 Mask:255.255.255.0
|
||||
....
|
||||
....
|
||||
```
|
||||
|
||||
Having the 4 oaitun_ue tunnel interfaces up and with an allocated address means the connection with EPC went alright.
|
||||
|
||||
# 10. Test with ping #
|
||||
|
||||
In a third terminal, after around 10 seconds, the UE(s) shall be connected to the eNB: Check with ifconfig
|
||||
|
||||
```bash
|
||||
$ ssh sudousername@machineA
|
||||
# Ping UE0 IP address based on the EPC pool used: in this example:
|
||||
$ ping -c 20 192.168.200.2
|
||||
# Ping UE1 IP address based on the EPC pool used: in this example:
|
||||
$ ping -c 20 192.168.200.4
|
||||
$ ping -c 20 192.172.0.2
|
||||
# Ping UE4 IP address based on the EPC pool used: in this example:
|
||||
$ ping -c 20 192.172.0.5
|
||||
```
|
||||
|
||||
# 12. Limitations #
|
||||
|
||||
Testing on the CI process is currently limited at time of writing. Improvements will be made soon.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
iperf operations can also be performed.
|
||||
|
||||
# 11. Limitations #
|
||||
|
||||
|
||||
----
|
||||
|
||||
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
|
||||
|
||||
|
||||
@@ -0,0 +1,336 @@
|
||||
# OpenAirInterface for SystemX
|
||||
|
||||
# Terminology
|
||||
|
||||
****This document use the 5G terminology****
|
||||
|
||||
**Central Unit (CU):** It is a logical node that includes the gNB
|
||||
functions like Transfer of user data, Mobility control, Radio access
|
||||
network sharing, Positioning, Session Management etc., except those
|
||||
functions allocated exclusively to the DU. CU controls the operation of
|
||||
DUs over front-haul (Fs) interface. A central unit (CU) may also be
|
||||
known as BBU/REC/RCC/C-RAN/V-RAN/VNF
|
||||
|
||||
**Distributed Unit (DU):** This logical node includes a subset of the
|
||||
gNB functions, depending on the functional split option. Its operation
|
||||
is controlled by the CU. Distributed Unit (DU) also known with other
|
||||
names like RRH/RRU/RE/RU/PNF.
|
||||
|
||||
In OpenAir code, the terminology is often RU and BBU.
|
||||
|
||||
# OpenAirUsage
|
||||
|
||||
## EPC and general environment
|
||||
|
||||
### OAI EPC
|
||||
|
||||
Use the stable OAI EPC, that can run in one machine (VM or standalone)
|
||||
|
||||
Draft description:
|
||||
<https://open-cells.com/index.php/2017/08/22/all-in-one-openairinterface-august-22nd/>
|
||||
|
||||
## Standalone 4G
|
||||
|
||||
EPC+eNB on one machine, the UE can be commercial or OAI UE.
|
||||
|
||||
### USRP B210
|
||||
|
||||
Main current issue: traffic is good only on coaxial link between UE and
|
||||
eNB (probably power management issue).
|
||||
|
||||
### Simulated RF
|
||||
|
||||
Running eNB+UE both OAI can be done over a virtual RF link.
|
||||
|
||||
The UE current status is that threads synchronization is implicit in
|
||||
some cases. As the RF simulator is very quick, a “sleep()” is required
|
||||
in the UE main loop
|
||||
|
||||
(line 1744, targets/RT/USER/lte-ue.c).
|
||||
|
||||
Running also the UE in the same machine is possible with simulated RF.
|
||||
|
||||
Running in same machine is simpler, offers about infinite speed for
|
||||
virtual RF samples transmission.
|
||||
|
||||
A specific configuration is required because the EPC Sgi interface has
|
||||
the same IP tunnel end point as the UE.
|
||||
|
||||
So, we have to create a network namespace for the UE and to route data
|
||||
in/out of the namespace.
|
||||
|
||||
```bash
|
||||
ip netns delete aNameSpace 2> /dev/null
|
||||
|
||||
ip link delete v-eth1 2> /dev/null
|
||||
|
||||
ip netns add aNameSpace
|
||||
|
||||
ip link add v-eth1 type veth peer name v-peer1
|
||||
|
||||
ip link set v-peer1 netns aNameSpace
|
||||
|
||||
ip addr add 10.200.1.1/24 dev v-eth1
|
||||
|
||||
ip link set v-eth1 up
|
||||
|
||||
iptables -t nat -A POSTROUTING -s 10.200.1.0/255.255.255.0 -o enp0s31f6 \
|
||||
-j MASQUERADE
|
||||
|
||||
iptables -A FORWARD -i enp0s31f6 -o v-eth1 -j ACCEPT
|
||||
|
||||
iptables -A FORWARD -o enp0s31f6 -i v-eth1 -j ACCEPT
|
||||
|
||||
ip netns exec aNameSpace ip link set dev lo up
|
||||
|
||||
ip netns exec aNameSpace ip addr add 10.200.1.2/24 dev v-peer1
|
||||
|
||||
ip netns exec aNameSpace ip link set v-peer1 up
|
||||
|
||||
ip netns exec aNameSpace bash
|
||||
```
|
||||
|
||||
After the last command, the Linux shell is in the new namespace, ready
|
||||
to run the UE.
|
||||
|
||||
To make user plan traffic, the traffic generator has to run in the same
|
||||
namespace
|
||||
|
||||
```bash
|
||||
ip netns exec aNameSpace bash
|
||||
```
|
||||
|
||||
The traffic genenrator has to specify the interface:
|
||||
|
||||
```bash
|
||||
route add default oaitun_ue1
|
||||
```
|
||||
|
||||
or specify the outgoing route in the traffic generator (like option “-I”
|
||||
in ping command).
|
||||
|
||||
## Split 6 DL 4G
|
||||
|
||||
The contract describes to reuse the uplink existing if4p5 and to develop
|
||||
is this work the downlink “functional split 6”.
|
||||
|
||||
The customer required after signature to develop also the uplink
|
||||
functional split 6. This is accepted, as long as the whole work is
|
||||
research with no delivery completeness warranty.
|
||||
|
||||
### Simulation
|
||||
|
||||
To be able to verify the new features and to help in all future
|
||||
developments, Open Cells added and improved the Rf board simulator
|
||||
during this contract.
|
||||
|
||||
We added the channel modeling simulation, that offer to simulate various
|
||||
3GPP defined channels.
|
||||
|
||||
### Main loop
|
||||
|
||||
The main log is in RF simulator is in
|
||||
|
||||
`targets/RT/USER/lte-ru.c and targets/RT/USER/lte-enb.c`
|
||||
|
||||
As this piece of SW is very complex and doesn’t meet our goals
|
||||
(functional split 6), a cleaned version replaces these 2 files in
|
||||
executables/ocp-main.c (openair1/SCHED/prach\_procedures.c is also
|
||||
replaced by this new file as it only launching the RACH actual work in a
|
||||
way not compatible with our FS6).
|
||||
|
||||
The main loop cadences the I/Q samples reception, signal processing and
|
||||
I/Q samples sending.
|
||||
|
||||
The main loop uses extensively function pointers to call the right
|
||||
processing function depending on the split case.
|
||||
|
||||
A lot of OAI reduntant global variables contains the same semantic data: time,frame, subframe.
|
||||
The reworked main loop take care of a uniq variable that comes directly from harware: RF board sampling number.
|
||||
|
||||
To use OAI, we need to set all OAI variables that derivates from this timestamp value. The function setAllfromTS() implements this.
|
||||
|
||||
### Splitted main level
|
||||
|
||||
When FS6 is actived, a main loop for DU (du_fs6()) a main loop for CU case replaces the uniq eNB main loop.
|
||||
|
||||
Each of these main loops calls initialization of OAI LTE data and the FS6 transport layer initialization.
|
||||
|
||||
Then, it runs a infinite loop on: set time, call UL and DL. The time comes from the RF board, so the DU sends the time to the CU.
|
||||
|
||||
This is enough for RF board dialog, but the FS6 is higher in SW layers,
|
||||
we need to cut higher functions inside downlink and uplink procedures.
|
||||
|
||||
As much as possible, the FS6 code is in the directory OPENAIR_DIR/executables. When a given OAI piece of code is small or need complex changes, it is reworked in the file fs6-main.c. The functions naming keeps the OAI function name, adding suffix _fromsplit() or _tosplit().
|
||||
|
||||
When this organization would lead to large code copy, it is better to insert modifications in OAI code. This is done in two files:
|
||||
|
||||
- openair1/SCHED/phy_procedures_lte_eNb.c: to send signaling channels computation results
|
||||
- the function sendFs6Ulharq() centralizes all signaling channels forwarding to CU
|
||||
- openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c: to deal with FS6 user plane split
|
||||
- sendFs6Ul() is used once to forward user plane to CU
|
||||
|
||||
|
||||
### DownLink
|
||||
|
||||
The main procedure is phy\_procedures\_eNB\_TX()
|
||||
|
||||
This is building the common channels (beacon, multi-UE signaling).
|
||||
|
||||
The FS6 split breaks this function into pieces:
|
||||
|
||||
* The multi-UE signals, built by common\_signal\_procedures(),
|
||||
subframe2harq\_pid(), generate\_dci\_top(), subframe2harq\_pid()
|
||||
* These functions run in the DU, nevertheless all context has to be sent
|
||||
(it is also needed partially for UL spitting)
|
||||
* Run in the DU also to meet the requirement of pushing
|
||||
in DU the data encoded with large redundancy (>3 redundancy)
|
||||
|
||||
* the per UE data: pdsch\_procedures() needs further splitting:
|
||||
|
||||
* dlsch\_encoding\_all() that makes the encoding: turbo code
|
||||
and lte\_rate\_matching\_turbo() that will be in the DU (some
|
||||
unlikely cases can reach redundancy up to x3, when MCS is very
|
||||
low (negative SINR cases)).
|
||||
|
||||
* dlsch\_encoding() output needs to be transmitted between the
|
||||
DU and the CU for functional split 6.
|
||||
* dlsch\_scrambling() that will go in the DU
|
||||
* dlsch\_modulation() that will go in the DU
|
||||
|
||||
The du user plane data is made of expanded bit in OAI at FS6 split level. 1 pair of functions compact back these bits into 8bits/byte before sending data and expand it again in the DU data reception (functions: fs6Dl(un)pack()).
|
||||
|
||||
### Uplink
|
||||
|
||||
The uplink require configuration that is part of the DL transmission.
|
||||
|
||||
It interprets the signalling to extract the RACH and the per UE data
|
||||
channels.
|
||||
|
||||
Ocp-main.c:rxtx() calls directly the entry procedure
|
||||
phy\_procedures\_eNB\_uespec\_RX() calls:
|
||||
|
||||
* rx\_ulsch() that demodulate and extract soft bits per UE.
|
||||
|
||||
* This function runs in the DU
|
||||
* the output data will be processes in the DU, so it needs to be
|
||||
transmitted to the DU
|
||||
* ulsch\_decoding() that do lte\_rate\_matching\_turbo\_rx()
|
||||
sub\_block\_deinterleaving\_turbo()
|
||||
then turbo decode that is in the CU
|
||||
* fill\_ulsch\_cqi\_indication() fill\_crc\_indication() , fill\_rx\_indication()
|
||||
* DU performs the signal processing of each channel data, prepare and sent to the CU the computed result
|
||||
|
||||
* Random access channel detection runs in the DU
|
||||
* the DU reports to the CU only the detected temprary identifier for RACH response
|
||||
|
||||
|
||||
### signaling data in each direction (UL and DL)
|
||||
|
||||
|
||||
* each LTE channel needs to be propagated between CU and DU
|
||||
* the simplest are the almost static data such as PSS/SSS, that need only static eNB parameters and primary information (frame numbering)
|
||||
* all the other channels require data transmission CU to DU and DU to CU
|
||||
* the general design push all the low level processing for these channels in the DU
|
||||
* the CU interface transports only signal processing results (UL) or configuration to create the RF signal (DL case)
|
||||
* HARQ is detected in the DU, then only the ACK or NACK is reported to CU
|
||||
|
||||
* the CU have to control the power and MCS (modulation and coding scheme)
|
||||
* the DU performs the signal processing and report only the decoded data like the CQI
|
||||
* as the DU performas the modulation, scrambling and puncturing, each data packet is associated with the LTE parameters required for these features
|
||||
* in DL, the CU associates the control parameters and the user plane data
|
||||
* in UL, the CU sends upfront the scheduled UL data to the DU. So, the DU have the required knowledge to decode the next subframes in time.
|
||||
|
||||
### UDP transport layer
|
||||
|
||||
A general UDP transport layer is in executables/transport\_split.c
|
||||
|
||||
Linux offers a UDP socket builtin timeout, that we use.
|
||||
|
||||
In and out buffers are memory zones that contains compacted
|
||||
(concatenated) UDP chunks.
|
||||
|
||||
For output, sendSubFrame() sends each UDP chunk
|
||||
|
||||
For input, receiveSubFrame() collects all UDP chunks for a group (a
|
||||
subframe in OAI LTE case). It returns in the following cases:
|
||||
|
||||
- all chunks are received
|
||||
- a timeout expired
|
||||
- a chunk from the next subframe already arrived
|
||||
|
||||
### Functional split 6 usage
|
||||
|
||||
The ocp cleaned main hale to be used: run ocp-softmodem instead of
|
||||
lte-softmodem.
|
||||
|
||||
The functionality and parameters is the same, enhanced with FS6 mode.
|
||||
|
||||
The end line option “--split73” enables the fs6 (also called split 7.3) mode and decided to be cu or du.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
./ocp-softmodem -O $OPENAIR_DIR/enb.fs6.example.conf --rfsim --log_config.phy_log_level debug --split73 cu:127.0.0.1
|
||||
```
|
||||
|
||||
Run the CU init of the split 6 eNB, that will call du on 127.0.0.1 address
|
||||
|
||||
```bash
|
||||
./ocp-softmodem -O $OPENAIR_DIR/enb.fs6.example.conf --rfsim --log_config.phy_log_level debug --split73 du:127.0.0.1
|
||||
```
|
||||
|
||||
will run the du, calling the cu on 127.0.0.1
|
||||
|
||||
If the CU and the DU are not on the same machine, the remote address of each side need to be specified as per this example
|
||||
|
||||
```bash
|
||||
./ocp-softmodem -O $OPENAIR_DIR/enb.fs6.example.conf --rfsim --log_config.phy_log_level debug --split73 du:192.168.1.55
|
||||
```
|
||||
|
||||
runs the functional split 6 DU
|
||||
|
||||
```bash
|
||||
./lte-uesoftmodem -C 2685000000 -r 50 --rfsim --rfsimulator.serveraddr 192.168.1.1 -d
|
||||
```
|
||||
|
||||
Runs the UE (to have the UE signal scope, compile it with make uescope)
|
||||
|
||||
CU+DU+UE can run with option `--noS1` to avoid to use a EPC and/or with `--rfsim` to simulate RF board
|
||||
|
||||
|
||||
## 5G and F1
|
||||
|
||||
Today 5G achievement is limited to physical layer.
|
||||
|
||||
The available modulation is 40MHz, that require one X310 or N300 for the
|
||||
gNB and a X310 or N300 for the nrUE.
|
||||
|
||||
### Usage with X310
|
||||
|
||||
Linux configuration:
|
||||
<https://files.ettus.com/manual/page_usrp_x3x0_config.html>
|
||||
|
||||
We included most of this configuration included in OAI source code.
|
||||
|
||||
Remain to set the NIC (network interface card) MTU to 9000 (jumbo
|
||||
frames).
|
||||
|
||||
### Running 5G
|
||||
|
||||
Usage with RFsimulator:
|
||||
|
||||
**gNB**
|
||||
|
||||
```bash
|
||||
sudo RFSIMULATOR=server ./nr-softmodem -O \
|
||||
../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/gnb.band78.tm1.106PRB.usrpn300.conf \
|
||||
--parallel-config PARALLEL\_SINGLE\_THREAD
|
||||
```
|
||||
|
||||
**nrUE**
|
||||
|
||||
```bash
|
||||
sudo RFSIMULATOR=127.0.0.1 ./nr-uesoftmodem --numerology 1 -r 106 -C \
|
||||
3510000000 -d
|
||||
```
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 87 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+35
-38
@@ -61,10 +61,7 @@
|
||||
|
||||
#include "PHY/phy_extern.h"
|
||||
|
||||
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "LAYER2/NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface.h"
|
||||
#include "common/utils/LOG/log_extern.h"
|
||||
@@ -187,8 +184,8 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
|
||||
wakeup_prach_gNB(gNB,NULL,proc->frame_rx,proc->slot_rx);
|
||||
}
|
||||
*/
|
||||
|
||||
// Call the scheduler
|
||||
|
||||
pthread_mutex_lock(&gNB->UL_INFO_mutex);
|
||||
gNB->UL_INFO.frame = frame_rx;
|
||||
gNB->UL_INFO.slot = slot_rx;
|
||||
@@ -333,7 +330,7 @@ static void *gNB_L1_thread( void *param ) {
|
||||
gNB_L1_rxtx_proc_t *L1_proc = &gNB_proc->L1_proc;
|
||||
//PHY_VARS_gNB *gNB = RC.gNB[0][proc->CC_id];
|
||||
char thread_name[100];
|
||||
|
||||
// set default return value
|
||||
// set default return value
|
||||
gNB_thread_rxtx_status = 0;
|
||||
|
||||
@@ -430,7 +427,7 @@ int wakeup_txfh(PHY_VARS_gNB *gNB,gNB_L1_rxtx_proc_t *proc,int frame_tx,int slot
|
||||
|
||||
int waitret = 0, ret = 0, time_ns = 1000*1000;
|
||||
struct timespec now, abstime;
|
||||
|
||||
// note this should depend on the numerology used by the TX L1 thread, set here for 500us slot time
|
||||
// note this should depend on the numerology used by the TX L1 thread, set here for 500us slot time
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL,1);
|
||||
time_ns = time_ns/gNB->frame_parms.slots_per_subframe;
|
||||
@@ -452,27 +449,27 @@ int wakeup_txfh(PHY_VARS_gNB *gNB,gNB_L1_rxtx_proc_t *proc,int frame_tx,int slot
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL,0);
|
||||
|
||||
if (waitret == ETIMEDOUT) {
|
||||
LOG_W(PHY,"Dropping TX slot (%d.%d) because FH is blocked more than 1 slot times (500us)\n",frame_tx,slot_tx);
|
||||
LOG_W(PHY,"Dropping TX slot (%d.%d) because FH is blocked more than 1 slot times (500us)\n",frame_tx,slot_tx);
|
||||
|
||||
AssertFatal((ret=pthread_mutex_lock(&gNB->proc.mutex_RU_tx))==0,"mutex_lock returns %d\n",ret);
|
||||
gNB->proc.RU_mask_tx = 0;
|
||||
AssertFatal((ret=pthread_mutex_unlock(&gNB->proc.mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
|
||||
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RUs_tx))==0,"mutex_lock returns %d\n",ret);
|
||||
proc->instance_cnt_RUs = 0;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE,proc->instance_cnt_RUs);
|
||||
AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_RUs_tx))==0,"mutex_unlock returns %d\n",ret);
|
||||
AssertFatal((ret=pthread_mutex_lock(&gNB->proc.mutex_RU_tx))==0,"mutex_lock returns %d\n",ret);
|
||||
gNB->proc.RU_mask_tx = 0;
|
||||
AssertFatal((ret=pthread_mutex_unlock(&gNB->proc.mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
|
||||
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RUs_tx))==0,"mutex_lock returns %d\n",ret);
|
||||
proc->instance_cnt_RUs = 0;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE,proc->instance_cnt_RUs);
|
||||
AssertFatal((ret=pthread_mutex_unlock(&proc->mutex_RUs_tx))==0,"mutex_unlock returns %d\n",ret);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE,1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE,0);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE,1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_UE,0);
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
return(-1);
|
||||
}
|
||||
|
||||
for(int i=0; i<gNB->num_RU; i++)
|
||||
{
|
||||
ru = gNB->RU_list[i];
|
||||
ru_proc = &ru->proc;
|
||||
|
||||
|
||||
|
||||
if (ru_proc->instance_cnt_gNBs == 0) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST_UE, 1);
|
||||
@@ -493,10 +490,10 @@ int wakeup_txfh(PHY_VARS_gNB *gNB,gNB_L1_rxtx_proc_t *proc,int frame_tx,int slot
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX1_UE, ru_proc->instance_cnt_gNBs);
|
||||
|
||||
LOG_D(PHY,"Signaling tx_thread_fh for %d.%d\n",frame_tx,slot_tx);
|
||||
LOG_D(PHY,"Signaling tx_thread_fh for %d.%d\n",frame_tx,slot_tx);
|
||||
// the thread can now be woken up
|
||||
AssertFatal(pthread_cond_signal(&ru_proc->cond_gNBs) == 0,
|
||||
"[gNB] ERROR pthread_cond_signal for gNB TXnp4 thread\n");
|
||||
"[gNB] ERROR pthread_cond_signal for gNB TXnp4 thread\n");
|
||||
AssertFatal((ret=pthread_mutex_unlock(&ru_proc->mutex_gNBs))==0,"mutex_unlock returned %d\n",ret);
|
||||
|
||||
}
|
||||
@@ -514,7 +511,7 @@ int wakeup_tx(PHY_VARS_gNB *gNB,int frame_rx,int slot_rx,int frame_tx,int slot_t
|
||||
AssertFatal((ret = pthread_mutex_lock(&L1_proc_tx->mutex))==0,"mutex_lock returns %d\n",ret);
|
||||
|
||||
|
||||
while(L1_proc_tx->instance_cnt == 0){
|
||||
while(L1_proc_tx->instance_cnt == 0) {
|
||||
pthread_cond_wait(&L1_proc_tx->cond,&L1_proc_tx->mutex);
|
||||
}
|
||||
|
||||
@@ -530,7 +527,7 @@ int wakeup_tx(PHY_VARS_gNB *gNB,int frame_rx,int slot_rx,int frame_tx,int slot_t
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_UE,1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_UE,0);
|
||||
|
||||
// the thread can now be woken up
|
||||
// the thread can now be woken up
|
||||
AssertFatal(pthread_cond_signal(&L1_proc_tx->cond) == 0, "ERROR pthread_cond_signal for gNB L1 thread\n");
|
||||
|
||||
@@ -550,11 +547,11 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
|
||||
int time_ns = 50000;
|
||||
|
||||
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RU))==0,"mutex_lock returns %d\n",ret);
|
||||
for (i=0;i<gNB->num_RU;i++) {
|
||||
for (i=0; i<gNB->num_RU; i++) {
|
||||
if (ru == gNB->RU_list[i]) {
|
||||
if ((proc->RU_mask&(1<<i)) > 0)
|
||||
LOG_E(PHY,"gNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n",
|
||||
gNB->Mod_id,proc->frame_rx,proc->slot_rx,ru->idx,gNB->num_RU,proc->RU_mask);
|
||||
LOG_E(PHY,"gNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n",
|
||||
gNB->Mod_id,proc->frame_rx,proc->slot_rx,ru->idx,gNB->num_RU,proc->RU_mask);
|
||||
proc->RU_mask |= (1<<i);
|
||||
}
|
||||
}
|
||||
@@ -581,16 +578,16 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
|
||||
AssertFatal((ret=pthread_mutex_timedlock(&L1_proc->mutex, &abstime)) == 0,"mutex_lock returns %d\n", ret);
|
||||
|
||||
if (L1_proc->instance_cnt == 0) { // L1_thread is busy so abort the subframe
|
||||
AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"muex_unlock return %d\n",ret);
|
||||
LOG_W(PHY,"L1_thread isn't ready in %d.%d, aborting RX processing\n",ru_proc->frame_rx,ru_proc->tti_rx);
|
||||
return(-1);
|
||||
AssertFatal((ret=pthread_mutex_unlock( &L1_proc->mutex))==0,"muex_unlock return %d\n",ret);
|
||||
LOG_W(PHY,"L1_thread isn't ready in %d.%d, aborting RX processing\n",ru_proc->frame_rx,ru_proc->tti_rx);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
++L1_proc->instance_cnt;
|
||||
|
||||
// We have just received and processed the common part of a subframe, say n.
|
||||
// TS_rx is the last received timestamp (start of 1st slot), TS_tx is the desired
|
||||
// We have just received and processed the common part of a subframe, say n.
|
||||
// TS_rx is the last received timestamp (start of 1st slot), TS_tx is the desired
|
||||
// transmitted timestamp of the next TX slot (first).
|
||||
|
||||
// The last (TS_rx mod samples_per_frame) was n*samples_per_tti,
|
||||
// we want to generate subframe (n+sf_ahead), so TS_tx = TX_rx+sf_ahead*samples_per_tti,
|
||||
// and proc->slot_tx = proc->slot_rx+sf_ahead
|
||||
@@ -610,7 +607,7 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
return(0);
|
||||
}
|
||||
/*
|
||||
@@ -714,9 +711,9 @@ static void* gNB_thread_prach( void* param ) {
|
||||
extern void init_td_thread(PHY_VARS_gNB *);
|
||||
extern void init_te_thread(PHY_VARS_gNB *);
|
||||
|
||||
static void* process_stats_thread(void* param) {
|
||||
static void *process_stats_thread(void *param) {
|
||||
|
||||
PHY_VARS_gNB *gNB = (PHY_VARS_gNB*)param;
|
||||
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
|
||||
|
||||
reset_meas(&gNB->dlsch_encoding_stats);
|
||||
reset_meas(&gNB->dlsch_scrambling_stats);
|
||||
|
||||
+54
-54
@@ -1,41 +1,24 @@
|
||||
/*******************************************************************************
|
||||
OpenAirInterface
|
||||
Copyright(c) 1999 - 2014 Eurecom
|
||||
|
||||
OpenAirInterface is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
OpenAirInterface is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OpenAirInterface.The full GNU General Public License is
|
||||
included in this distribution in the file called "COPYING". If not,
|
||||
see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Contact Information
|
||||
OpenAirInterface Admin: openair_admin@eurecom.fr
|
||||
OpenAirInterface Tech : openair_tech@eurecom.fr
|
||||
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
|
||||
|
||||
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
|
||||
|
||||
*******************************************************************************/
|
||||
|
||||
/*! \file lte-enb.c
|
||||
* \brief Top-level threads for eNodeB
|
||||
* \author R. Knopp, F. Kaltenberger, Navid Nikaein
|
||||
* \date 2012
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -73,9 +56,8 @@
|
||||
#include "SCHED/sched_eNB.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "NR_MAC_COMMON/nr_mac_extern.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface.h"
|
||||
|
||||
@@ -94,7 +76,7 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
static int DEFBANDS[] = {7};
|
||||
static int DEFENBS[] = {0};
|
||||
static int DEFBFW[] = {0x00007fff};
|
||||
|
||||
|
||||
//static int DEFNRBANDS[] = {7};
|
||||
//static int DEFGNBS[] = {0};
|
||||
|
||||
@@ -714,7 +696,7 @@ void rx_rf(RU_t *ru,int *frame,int *slot) {
|
||||
}
|
||||
|
||||
|
||||
void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
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->config;
|
||||
@@ -885,7 +867,7 @@ void *ru_thread_prach( void *param ) {
|
||||
0,0
|
||||
);
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0 );*/
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0 );*/
|
||||
if (release_thread(&proc->mutex_prach,&proc->instance_cnt_prach,"ru_prach_thread") < 0) break;
|
||||
}
|
||||
|
||||
@@ -1112,16 +1094,16 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
}
|
||||
} else if(N_RB == 106) {
|
||||
if (fp->threequarter_fs) {
|
||||
cfg->sample_rate=46.08e6;
|
||||
cfg->samples_per_frame = 460800;
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
cfg->sample_rate=46.08e6;
|
||||
cfg->samples_per_frame = 460800;
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
}
|
||||
else {
|
||||
cfg->sample_rate=61.44e6;
|
||||
cfg->samples_per_frame = 614400;
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
cfg->sample_rate=61.44e6;
|
||||
cfg->samples_per_frame = 614400;
|
||||
cfg->tx_bw = 40e6;
|
||||
cfg->rx_bw = 40e6;
|
||||
}
|
||||
} else {
|
||||
AssertFatal(0==1,"N_RB %d not yet supported for numerology %d\n",N_RB,mu);
|
||||
@@ -1285,7 +1267,7 @@ void *ru_stats_thread(void *param) {
|
||||
|
||||
if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx",NULL,NULL);
|
||||
|
||||
if (ru->feptx_ofdm){
|
||||
if (ru->feptx_ofdm) {
|
||||
print_meas(&ru->precoding_stats,"feptx_prec",NULL,NULL);
|
||||
print_meas(&ru->txdataF_copy_stats,"txdataF_copy",NULL,NULL);
|
||||
print_meas(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL);
|
||||
@@ -1294,7 +1276,7 @@ void *ru_stats_thread(void *param) {
|
||||
|
||||
if (ru->fh_north_asynch_in) print_meas(&ru->rx_fhaul,"rx_fhaul",NULL,NULL);
|
||||
|
||||
print_meas(&ru->tx_fhaul,"tx_fhaul",NULL,NULL);
|
||||
print_meas(&ru->tx_fhaul,"tx_fhaul",NULL,NULL);
|
||||
if (ru->fh_north_out) {
|
||||
print_meas(&ru->compression,"compression",NULL,NULL);
|
||||
print_meas(&ru->transport,"transport",NULL,NULL);
|
||||
@@ -1425,7 +1407,7 @@ void *ru_thread_tx( void *param ) {
|
||||
L1_proc->instance_cnt_RUs = 0;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_UE,L1_proc->instance_cnt_RUs);
|
||||
AssertFatal(pthread_cond_signal(&L1_proc->cond_RUs) == 0,
|
||||
"ERROR pthread_cond_signal for gNB_L1_thread\n");
|
||||
"ERROR pthread_cond_signal for gNB_L1_thread\n");
|
||||
} //else AssertFatal(1==0,"gNB TX thread is not ready\n");
|
||||
ret = pthread_mutex_unlock(&L1_proc->mutex_RUs_tx);
|
||||
AssertFatal(ret == 0,"mutex_unlock returns %d\n",ret);
|
||||
@@ -2350,9 +2332,27 @@ void RCconfig_RU(void)
|
||||
}
|
||||
}
|
||||
else {
|
||||
RC.ru[j]->openair0_cfg.clock_source = unset;
|
||||
RC.ru[j]->openair0_cfg.clock_source = unset;
|
||||
}
|
||||
|
||||
if (config_isparamset(RUParamList.paramarray[j], RU_SDR_TME_SRC)) {
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "internal") == 0) {
|
||||
RC.ru[j]->openair0_cfg.time_source = internal;
|
||||
LOG_D(PHY, "RU time source set as internal\n");
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "external") == 0) {
|
||||
RC.ru[j]->openair0_cfg.time_source = external;
|
||||
LOG_D(PHY, "RU time source set as external\n");
|
||||
} else if (strcmp(*(RUParamList.paramarray[j][RU_SDR_TME_SRC].strptr), "gpsdo") == 0) {
|
||||
RC.ru[j]->openair0_cfg.time_source = gpsdo;
|
||||
LOG_D(PHY, "RU time source set as gpsdo\n");
|
||||
} else {
|
||||
LOG_E(PHY, "Erroneous RU time source in the provided configuration file: '%s'\n", *(RUParamList.paramarray[j][RU_SDR_CLK_SRC].strptr));
|
||||
}
|
||||
}
|
||||
else {
|
||||
RC.ru[j]->openair0_cfg.time_source = unset;
|
||||
}
|
||||
|
||||
if (strcmp(*(RUParamList.paramarray[j][RU_LOCAL_RF_IDX].strptr), "yes") == 0) {
|
||||
if ( !(config_isparamset(RUParamList.paramarray[j],RU_LOCAL_IF_NAME_IDX)) ) {
|
||||
RC.ru[j]->if_south = LOCAL_RF;
|
||||
|
||||
+40
-42
@@ -49,8 +49,6 @@
|
||||
#include "PHY/phy_vars.h"
|
||||
#include "SCHED/sched_common_vars.h"
|
||||
#include "LAYER2/MAC/mac_vars.h"
|
||||
#include "LAYER2/MAC/mac.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "RRC/LTE/rrc_vars.h"
|
||||
#include "PHY_INTERFACE/phy_interface_vars.h"
|
||||
#include "gnb_config.h"
|
||||
@@ -108,7 +106,7 @@ static int wait_for_sync = 0;
|
||||
unsigned int mmapped_dma=0;
|
||||
int single_thread_flag=1;
|
||||
|
||||
static int8_t threequarter_fs=0;
|
||||
int8_t threequarter_fs=0;
|
||||
|
||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
@@ -171,6 +169,10 @@ uint32_t target_ul_mcs = 20;
|
||||
uint32_t timing_advance = 0;
|
||||
uint64_t num_missed_slots=0; // counter for the number of missed slots
|
||||
|
||||
int split73=0;
|
||||
void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) {
|
||||
AssertFatal(false, "Must not be called in this context\n");
|
||||
}
|
||||
|
||||
extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
@@ -725,13 +727,9 @@ int restart_L1L2(module_id_t gnb_id) {
|
||||
memcpy(&ru->nr_frame_parms, &RC.gNB[gnb_id]->frame_parms, sizeof(NR_DL_FRAME_PARMS));
|
||||
set_function_spec_param(RC.ru[gnb_id]);
|
||||
LOG_I(GNB_APP, "attempting to create ITTI tasks\n");
|
||||
|
||||
if (itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL) < 0) {
|
||||
LOG_E(RRC, "Create task for RRC eNB failed\n");
|
||||
return -1;
|
||||
} else {
|
||||
LOG_I(RRC, "Re-created task for RRC gNB successfully\n");
|
||||
}
|
||||
// No more rrc thread, as many race conditions are hidden behind
|
||||
rrc_enb_init();
|
||||
itti_mark_task_ready(TASK_RRC_ENB);
|
||||
|
||||
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
|
||||
LOG_E(PDCP, "Create task for L2L1 failed\n");
|
||||
@@ -774,23 +772,23 @@ static void wait_nfapi_init(char *thread_name) {
|
||||
|
||||
void init_pdcp(void) {
|
||||
//if (!NODE_IS_DU(RC.rrc[0]->node_type)) {
|
||||
pdcp_layer_init();
|
||||
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
pdcp_layer_init();
|
||||
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
|
||||
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
|
||||
|
||||
if (IS_SOFTMODEM_NOS1){
|
||||
printf("IS_SOFTMODEM_NOS1 option enabled \n");
|
||||
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
|
||||
}
|
||||
if (IS_SOFTMODEM_NOS1) {
|
||||
printf("IS_SOFTMODEM_NOS1 option enabled \n");
|
||||
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
|
||||
}
|
||||
|
||||
pdcp_module_init(pdcp_initmask);
|
||||
pdcp_module_init(pdcp_initmask);
|
||||
|
||||
/*if (NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
|
||||
} else {*/
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
|
||||
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
|
||||
//}
|
||||
/*if (NODE_IS_CU(RC.rrc[0]->node_type)) {
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t)proto_agent_send_rlc_data_req);
|
||||
} else {*/
|
||||
pdcp_set_rlc_data_req_func((send_rlc_data_req_func_t) rlc_data_req);
|
||||
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) pdcp_data_ind);
|
||||
//}
|
||||
/*} else {
|
||||
pdcp_set_pdcp_data_ind_func((pdcp_data_ind_func_t) proto_agent_send_pdcp_data_ind);
|
||||
}*/
|
||||
@@ -848,7 +846,7 @@ int main( int argc, char **argv )
|
||||
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
||||
|
||||
|
||||
init_opt();
|
||||
init_opt();
|
||||
|
||||
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
@@ -865,7 +863,7 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
LOG_I(HW, "Version: %s\n", PACKAGE_VERSION);
|
||||
|
||||
if(IS_SOFTMODEM_NOS1)
|
||||
init_pdcp();
|
||||
init_pdcp();
|
||||
|
||||
if (RC.nb_nr_inst > 0) {
|
||||
// don't create if node doesn't connect to RRC/S1/GTP
|
||||
@@ -995,27 +993,27 @@ if(!IS_SOFTMODEM_NOS1)
|
||||
printf("oai_exit=%d\n",oai_exit);
|
||||
|
||||
// stop threads
|
||||
/*#ifdef XFORMS
|
||||
/*#ifdef XFORMS
|
||||
|
||||
printf("waiting for XFORMS thread\n");
|
||||
printf("waiting for XFORMS thread\n");
|
||||
|
||||
if (do_forms==1) {
|
||||
pthread_join(forms_thread,&status);
|
||||
fl_hide_form(form_stats->stats_form);
|
||||
fl_free_form(form_stats->stats_form);
|
||||
if (do_forms==1) {
|
||||
pthread_join(forms_thread,&status);
|
||||
fl_hide_form(form_stats->stats_form);
|
||||
fl_free_form(form_stats->stats_form);
|
||||
|
||||
fl_hide_form(form_stats_l2->stats_form);
|
||||
fl_free_form(form_stats_l2->stats_form);
|
||||
fl_hide_form(form_stats_l2->stats_form);
|
||||
fl_free_form(form_stats_l2->stats_form);
|
||||
|
||||
for(UE_id=0; UE_id<scope_enb_num_ue; UE_id++) {
|
||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
fl_hide_form(form_enb[CC_id][UE_id]->phy_scope_gNB);
|
||||
fl_free_form(form_enb[CC_id][UE_id]->phy_scope_gNB);
|
||||
}
|
||||
}
|
||||
}
|
||||
for(UE_id=0; UE_id<scope_enb_num_ue; UE_id++) {
|
||||
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
fl_hide_form(form_enb[CC_id][UE_id]->phy_scope_gNB);
|
||||
fl_free_form(form_enb[CC_id][UE_id]->phy_scope_gNB);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif*/
|
||||
#endif*/
|
||||
printf("stopping MODEM threads\n");
|
||||
// cleanup
|
||||
stop_gNB(NB_gNB_INST);
|
||||
|
||||
+22
-5
@@ -481,6 +481,23 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
pdcp_run(&ctxt);
|
||||
}
|
||||
}
|
||||
|
||||
// no UL for now
|
||||
// no UL for now
|
||||
/*
|
||||
if (UE->mac_enabled==1) {
|
||||
// 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) {
|
||||
UE->ul_indication.module_id = 0;
|
||||
UE->ul_indication.gNB_index = 0;
|
||||
UE->ul_indication.cc_id = 0;
|
||||
UE->ul_indication.frame = proc->frame_rx;
|
||||
UE->ul_indication.slot = proc->nr_tti_rx;
|
||||
UE->if_inst->ul_indication(&UE->ul_indication);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -519,9 +536,9 @@ void UE_processing(void *arg) {
|
||||
// then timing advance is processed and set to be applied in the next UL transmission */
|
||||
if (UE->mac_enabled == 1) {
|
||||
|
||||
if (frame_tx == ul_time_alignment->ta_frame && slot_tx == ul_time_alignment->ta_slot){
|
||||
if (frame_tx == ul_time_alignment->ta_frame && slot_tx == ul_time_alignment->ta_slot) {
|
||||
LOG_D(PHY,"Applying timing advance -- frame %d -- slot %d\n", frame_tx, slot_tx);
|
||||
|
||||
//if (nfapi_mode!=3){
|
||||
//if (nfapi_mode!=3){
|
||||
nr_process_timing_advance(UE->Mod_id, UE->CC_id, ul_time_alignment->ta_command, numerology, bwp_ul_NB_RB);
|
||||
ul_time_alignment->ta_frame = -1;
|
||||
@@ -603,8 +620,8 @@ void readFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp, bool toTrash)
|
||||
|
||||
void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
|
||||
|
||||
LOG_I(PHY,"Resynchronizing RX by %d samples (mode = %d)\n",UE->rx_offset,UE->mode);
|
||||
void *dummy_tx[UE->frame_parms.nb_antennas_tx];
|
||||
LOG_I(PHY,"Resynchronizing RX by %d samples (mode = %d)\n",UE->rx_offset,UE->mode);
|
||||
void *dummy_tx[UE->frame_parms.nb_antennas_tx];
|
||||
|
||||
*timestamp += UE->frame_parms.get_samples_per_slot(1,&UE->frame_parms);
|
||||
for ( int size=UE->rx_offset ; size > 0 ; size -= UE->frame_parms.samples_per_subframe ) {
|
||||
@@ -761,7 +778,7 @@ void *UE_thread(void *arg) {
|
||||
#ifdef OAI_ADRV9371_ZC706
|
||||
/*uint32_t total_gain_dB_prev = 0;
|
||||
if (total_gain_dB_prev != UE->rx_total_gain_dB) {
|
||||
total_gain_dB_prev = UE->rx_total_gain_dB;
|
||||
total_gain_dB_prev = UE->rx_total_gain_dB;
|
||||
openair0_cfg[0].rx_gain[0] = UE->rx_total_gain_dB;
|
||||
UE->rfdevice.trx_set_gains_func(&UE->rfdevice,&openair0_cfg[0]);
|
||||
}*/
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
#include "PHY/NR_REFSIG/nr_mod_table.h"
|
||||
|
||||
#include "LAYER2/MAC/mac_vars.h"
|
||||
#include "LAYER2/MAC/mac_proto.h"
|
||||
#include "RRC/LTE/rrc_vars.h"
|
||||
#include "PHY_INTERFACE/phy_interface_vars.h"
|
||||
#include "openair1/SIMULATION/TOOLS/sim.h"
|
||||
@@ -127,7 +126,6 @@ volatile int start_eNB = 0;
|
||||
volatile int start_UE = 0;
|
||||
volatile int oai_exit = 0;
|
||||
|
||||
static clock_source_t clock_source = unset;
|
||||
int single_thread_flag=1;
|
||||
static double snr_dB=20;
|
||||
|
||||
@@ -215,7 +213,7 @@ int emulate_rf = 0;
|
||||
|
||||
tpool_t *Tpool;
|
||||
#ifdef UE_DLSCH_PARALLELISATION
|
||||
tpool_t *Tpool_dl;
|
||||
tpool_t *Tpool_dl;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -311,8 +309,8 @@ static void *scope_thread(void *arg) {
|
||||
|
||||
while (!oai_exit) {
|
||||
phy_scope_nrUE(form_nrue[0],
|
||||
PHY_vars_UE_g[0][0],
|
||||
0,0,1);
|
||||
PHY_vars_UE_g[0][0],
|
||||
0,0,1);
|
||||
usleep(100*1000);
|
||||
}
|
||||
|
||||
@@ -383,9 +381,9 @@ static void get_options(void) {
|
||||
int tddflag=0, nonbiotflag, vcdflag=0;
|
||||
char *loopfile=NULL;
|
||||
int dumpframe=0;
|
||||
|
||||
//uint32_t noS1;
|
||||
//uint32_t nokrnmod;
|
||||
//uint32_t nokrnmod;
|
||||
paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC_UE ;
|
||||
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
||||
|
||||
@@ -529,12 +527,12 @@ void init_openair0(void) {
|
||||
else {
|
||||
openair0_cfg[card].sample_rate=122.88e6;
|
||||
openair0_cfg[card].samples_per_frame = 1228800;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG_E(PHY,"Unsupported numerology!\n");
|
||||
exit(-1);
|
||||
}
|
||||
}else if(frame_parms[0]->N_RB_DL == 273) {
|
||||
} else if(frame_parms[0]->N_RB_DL == 273) {
|
||||
if (numerology==1) {
|
||||
if (frame_parms[0]->threequarter_fs) {
|
||||
AssertFatal(0 == 1,"three quarter sampling not supported for N_RB 273\n");
|
||||
@@ -542,12 +540,12 @@ void init_openair0(void) {
|
||||
else {
|
||||
openair0_cfg[card].sample_rate=122.88e6;
|
||||
openair0_cfg[card].samples_per_frame = 1228800;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG_E(PHY,"Unsupported numerology!\n");
|
||||
exit(-1);
|
||||
}
|
||||
}else if(frame_parms[0]->N_RB_DL == 106) {
|
||||
} else if(frame_parms[0]->N_RB_DL == 106) {
|
||||
if (numerology==0) {
|
||||
if (frame_parms[0]->threequarter_fs) {
|
||||
openair0_cfg[card].sample_rate=23.04e6;
|
||||
@@ -556,15 +554,15 @@ void init_openair0(void) {
|
||||
openair0_cfg[card].sample_rate=30.72e6;
|
||||
openair0_cfg[card].samples_per_frame = 307200;
|
||||
}
|
||||
} else if (numerology==1) {
|
||||
} else if (numerology==1) {
|
||||
if (frame_parms[0]->threequarter_fs) {
|
||||
openair0_cfg[card].sample_rate=46.08e6;
|
||||
openair0_cfg[card].samples_per_frame = 460800;
|
||||
openair0_cfg[card].sample_rate=46.08e6;
|
||||
openair0_cfg[card].samples_per_frame = 460800;
|
||||
}
|
||||
else {
|
||||
openair0_cfg[card].sample_rate=61.44e6;
|
||||
openair0_cfg[card].samples_per_frame = 614400;
|
||||
}
|
||||
openair0_cfg[card].sample_rate=61.44e6;
|
||||
openair0_cfg[card].samples_per_frame = 614400;
|
||||
}
|
||||
} else if (numerology==2) {
|
||||
openair0_cfg[card].sample_rate=122.88e6;
|
||||
openair0_cfg[card].samples_per_frame = 1228800;
|
||||
@@ -597,7 +595,8 @@ void init_openair0(void) {
|
||||
PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx);
|
||||
openair0_cfg[card].Mod_id = 0;
|
||||
openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
|
||||
openair0_cfg[card].clock_source = clock_source;
|
||||
openair0_cfg[card].clock_source = get_softmodem_params()->clock_source;
|
||||
openair0_cfg[card].time_source = get_softmodem_params()->timing_source;
|
||||
openair0_cfg[card].tx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx);
|
||||
openair0_cfg[card].rx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx);
|
||||
|
||||
@@ -639,7 +638,7 @@ void init_pdcp(void) {
|
||||
pdcp_initmask = pdcp_initmask | UE_NAS_USE_TUN_BIT;
|
||||
|
||||
/*if (rlc_module_init() != 0) {
|
||||
LOG_I(RLC, "Problem at RLC initiation \n");
|
||||
LOG_I(RLC, "Problem at RLC initiation \n");
|
||||
}
|
||||
pdcp_layer_init();
|
||||
nr_DRB_preconfiguration();*/
|
||||
@@ -649,6 +648,11 @@ void init_pdcp(void) {
|
||||
LOG_I(PDCP, "Before getting out from init_pdcp() \n");
|
||||
}
|
||||
|
||||
// Stupid function addition because UE itti messages queues definition is common with eNB
|
||||
void *rrc_enb_process_msg(void *notUsed) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char **argv ) {
|
||||
//uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
|
||||
@@ -676,12 +680,12 @@ int main( int argc, char **argv ) {
|
||||
set_taus_seed (0);
|
||||
tpool_t pool;
|
||||
Tpool = &pool;
|
||||
char params[]="-1,-1";
|
||||
char params[]="-1,-1";
|
||||
initTpool(params, Tpool, false);
|
||||
#ifdef UE_DLSCH_PARALLELISATION
|
||||
tpool_t pool_dl;
|
||||
Tpool_dl = &pool_dl;
|
||||
char params_dl[]="-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1";
|
||||
char params_dl[]="-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1";
|
||||
initTpool(params_dl, Tpool_dl, false);
|
||||
#endif
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define CMDLINE_PARAMS_DESC_UE { \
|
||||
{"clock-source", CONFIG_HLP_EXCCLK, 0, iptr:&clock_source, defintval:0, TYPE_INT, 0}, \
|
||||
{"single-thread-disable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&single_thread_flag, defintval:1, TYPE_INT, 0}, \
|
||||
{"nr-dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&nr_dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
|
||||
{"A" , CONFIG_HLP_TADV, 0, uptr:&timing_advance, defintval:0, TYPE_UINT, 0}, \
|
||||
|
||||
@@ -81,8 +81,8 @@ char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr) {
|
||||
}
|
||||
|
||||
void get_common_options(uint32_t execmask) {
|
||||
uint32_t online_log_messages;
|
||||
uint32_t glog_level ;
|
||||
uint32_t online_log_messages=0;
|
||||
uint32_t glog_level=0 ;
|
||||
uint32_t start_telnetsrv = 0;
|
||||
uint32_t noS1 = 0, nokrnmod = 0, nonbiot = 0;
|
||||
uint32_t rfsim = 0, basicsim = 0, do_forms = 0;
|
||||
@@ -145,27 +145,27 @@ void get_common_options(uint32_t execmask) {
|
||||
if(worker_config != NULL) set_worker_conf(worker_config);
|
||||
}
|
||||
void softmodem_printresources(int sig, telnet_printfunc_t pf) {
|
||||
struct rusage usage;
|
||||
struct timespec stop;
|
||||
struct rusage usage;
|
||||
struct timespec stop;
|
||||
|
||||
clock_gettime(CLOCK_BOOTTIME, &stop);
|
||||
clock_gettime(CLOCK_BOOTTIME, &stop);
|
||||
|
||||
uint64_t elapse = (stop.tv_sec - start.tv_sec) ; // in seconds
|
||||
uint64_t elapse = (stop.tv_sec - start.tv_sec) ; // in seconds
|
||||
|
||||
|
||||
int st = getrusage(RUSAGE_SELF,&usage);
|
||||
if (!st) {
|
||||
pf("\nRun time: %lluh %llus\n",(unsigned long long)elapse/3600,(unsigned long long)(elapse - (elapse/3600)));
|
||||
pf("\tTime executing user inst.: %lds %ldus\n",(long)usage.ru_utime.tv_sec,(long)usage.ru_utime.tv_usec);
|
||||
pf("\tTime executing system inst.: %lds %ldus\n",(long)usage.ru_stime.tv_sec,(long)usage.ru_stime.tv_usec);
|
||||
pf("\tMax. Phy. memory usage: %ldkB\n",(long)usage.ru_maxrss);
|
||||
pf("\tPage fault number (no io): %ld\n",(long)usage.ru_minflt);
|
||||
pf("\tPage fault number (requiring io): %ld\n",(long)usage.ru_majflt);
|
||||
pf("\tNumber of file system read: %ld\n",(long)usage.ru_inblock);
|
||||
pf("\tNumber of filesystem write: %ld\n",(long)usage.ru_oublock);
|
||||
pf("\tNumber of context switch (process origin, io...): %ld\n",(long)usage.ru_nvcsw);
|
||||
pf("\tNumber of context switch (os origin, priority...): %ld\n",(long)usage.ru_nivcsw);
|
||||
}
|
||||
int st = getrusage(RUSAGE_SELF,&usage);
|
||||
if (!st) {
|
||||
pf("\nRun time: %lluh %llus\n",(unsigned long long)elapse/3600,(unsigned long long)(elapse - (elapse/3600)));
|
||||
pf("\tTime executing user inst.: %lds %ldus\n",(long)usage.ru_utime.tv_sec,(long)usage.ru_utime.tv_usec);
|
||||
pf("\tTime executing system inst.: %lds %ldus\n",(long)usage.ru_stime.tv_sec,(long)usage.ru_stime.tv_usec);
|
||||
pf("\tMax. Phy. memory usage: %ldkB\n",(long)usage.ru_maxrss);
|
||||
pf("\tPage fault number (no io): %ld\n",(long)usage.ru_minflt);
|
||||
pf("\tPage fault number (requiring io): %ld\n",(long)usage.ru_majflt);
|
||||
pf("\tNumber of file system read: %ld\n",(long)usage.ru_inblock);
|
||||
pf("\tNumber of filesystem write: %ld\n",(long)usage.ru_oublock);
|
||||
pf("\tNumber of context switch (process origin, io...): %ld\n",(long)usage.ru_nvcsw);
|
||||
pf("\tNumber of context switch (os origin, priority...): %ld\n",(long)usage.ru_nivcsw);
|
||||
}
|
||||
}
|
||||
|
||||
void signal_handler(int sig) {
|
||||
@@ -180,9 +180,9 @@ void signal_handler(int sig) {
|
||||
backtrace_symbols_fd(array, size, 2);
|
||||
exit(-1);
|
||||
} else {
|
||||
if(sig==SIGINT ||sig==SOFTMODEM_RTSIGNAL)
|
||||
softmodem_printresources(sig,(telnet_printfunc_t)printf);
|
||||
if (sig != SOFTMODEM_RTSIGNAL) {
|
||||
if(sig==SIGINT ||sig==SOFTMODEM_RTSIGNAL)
|
||||
softmodem_printresources(sig,(telnet_printfunc_t)printf);
|
||||
if (sig != SOFTMODEM_RTSIGNAL) {
|
||||
printf("Linux signal %s...\n",strsignal(sig));
|
||||
exit_function(__FILE__, __FUNCTION__, __LINE__,"softmodem starting exit procedure\n");
|
||||
}
|
||||
@@ -192,7 +192,7 @@ void signal_handler(int sig) {
|
||||
|
||||
|
||||
void set_softmodem_sighandler(void) {
|
||||
struct sigaction act,oldact;
|
||||
struct sigaction act,oldact;
|
||||
clock_gettime(CLOCK_BOOTTIME, &start);
|
||||
memset(&act,0,sizeof(act));
|
||||
act.sa_handler=signal_handler;
|
||||
@@ -201,6 +201,6 @@ void set_softmodem_sighandler(void) {
|
||||
signal(SIGSEGV, signal_handler);
|
||||
signal(SIGINT, signal_handler);
|
||||
signal(SIGTERM, signal_handler);
|
||||
signal(SIGABRT, signal_handler);
|
||||
signal(SIGABRT, signal_handler);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,11 @@ extern "C"
|
||||
#endif
|
||||
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
|
||||
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
|
||||
#define CONFIG_HLP_SPLIT73 "Split 7.3 (below rate matching) option: <cu|du>:<remote ip address>:<remote port>"
|
||||
#define CONFIG_HLP_TPOOL "Thread pool configuration: \n\
|
||||
default no pool (runs in calling thread),\n\
|
||||
list of cores, comma separated (negative value is no core affinity)\n\
|
||||
example: -1,3 launches two working threads one floating, the second set on core 3"
|
||||
#define CONFIG_HLP_ULMAXE "set the eNodeB max ULSCH erros\n"
|
||||
#define CONFIG_HLP_CALUER "set UE RX calibration\n"
|
||||
#define CONFIG_HLP_CALUERM ""
|
||||
@@ -54,6 +59,7 @@ extern "C"
|
||||
#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"
|
||||
#define CONFIG_HLP_TME "tells hardware to use a time reference (0:internal, 1:external, 2:gpsdo)\n"
|
||||
#define CONFIG_HLP_USIM "use XOR autentication algo in case of test usim mode\n"
|
||||
#define CONFIG_HLP_NOSNGLT "Disables single-thread mode in lte-softmodem\n"
|
||||
#define CONFIG_HLP_DLF "Set the downlink frequency for all component carriers\n"
|
||||
@@ -89,6 +95,8 @@ extern "C"
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define RF_CONFIG_FILE softmodem_params.rf_config_file
|
||||
#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
|
||||
@@ -105,10 +113,13 @@ extern "C"
|
||||
|
||||
#define CMDLINE_PARAMS_DESC { \
|
||||
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, sizeof(RF_CONFIG_FILE)},\
|
||||
{"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", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 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}, \
|
||||
{"wait-for-sync", NULL, PARAMFLAG_BOOL, iptr:&WAIT_FOR_SYNC, defintval:0, TYPE_INT, 0}, \
|
||||
{"single-thread-enable", CONFIG_HLP_NOSNGLT, PARAMFLAG_BOOL, iptr:&SINGLE_THREAD_FLAG, defintval:0, TYPE_INT, 0}, \
|
||||
{"C" , CONFIG_HLP_DLF, 0, u64ptr:&(downlink_frequency[0][0]), defuintval:0, TYPE_UINT64, 0}, \
|
||||
@@ -194,6 +205,8 @@ typedef struct {
|
||||
uint64_t optmask;
|
||||
//THREAD_STRUCT thread_struct;
|
||||
char rf_config_file[1024];
|
||||
char split73[1024];
|
||||
char threadPoolConfig[1024];
|
||||
int phy_test;
|
||||
int do_ra;
|
||||
uint8_t usim_test;
|
||||
|
||||
@@ -0,0 +1,329 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
* Author and copyright: Laurent Thomas, open-cells.com
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __SPLIT_HEADERS_H
|
||||
#define __SPLIT_HEADERS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <openair1/PHY/defs_eNB.h>
|
||||
|
||||
#define CU_PORT "7878"
|
||||
#define DU_PORT "8787"
|
||||
#define SPLIT73_CU 1
|
||||
#define SPLIT73_DU 2
|
||||
extern int split73;
|
||||
|
||||
#define MTU 65536
|
||||
#define UDP_TIMEOUT 900000L // in micro second (struct timeval, NOT struct timespec)
|
||||
// linux may timeout for a much longer time (up to 10ms)
|
||||
#define blockAlign 32 //bytes to align memory for SIMD copy (256 bits vectors)
|
||||
|
||||
// FS6 transport configuration and handler
|
||||
typedef struct {
|
||||
char *sourceIP;
|
||||
char *sourcePort;
|
||||
char *destIP;
|
||||
char *destPort;
|
||||
struct addrinfo *destAddr;
|
||||
int sockHandler;
|
||||
} UDPsock_t;
|
||||
|
||||
#define CTsentCUv0 0xA500
|
||||
#define CTsentDUv0 0x5A00
|
||||
|
||||
// Main FS6 transport layer header
|
||||
// All packets starts with this header
|
||||
typedef struct commonUDP_s {
|
||||
uint64_t timestamp; // id of the group (subframe for LTE)
|
||||
uint16_t nbBlocks; // total number of blocks for this timestamp
|
||||
uint16_t blockID; // id: 0..nbBocks-1
|
||||
uint16_t contentType; // defines the content format
|
||||
uint16_t contentBytes; // will be sent in a UDP packet, so must be < 2^16 bytes
|
||||
uint64_t senderClock;
|
||||
} commonUDP_t;
|
||||
|
||||
// FS6 UL common header (DU to CU)
|
||||
// gives the RACH detection data and is always sent to inform the CU that a subframe arrived
|
||||
typedef struct {
|
||||
uint16_t max_preamble[4];
|
||||
uint16_t max_preamble_energy[4];
|
||||
uint16_t max_preamble_delay[4];
|
||||
uint16_t avg_preamble_energy[4];
|
||||
} fs6_ul_t;
|
||||
|
||||
// FS6 DL common header (CU to DU)
|
||||
// gives the DCI configuration from each subframe
|
||||
typedef struct {
|
||||
uint8_t pbch_pdu[4];
|
||||
int num_pdcch_symbols;
|
||||
int num_dci;
|
||||
DCI_ALLOC_t dci_alloc[8];
|
||||
int num_mdci;
|
||||
int amp;
|
||||
LTE_eNB_PHICH phich_vars;
|
||||
uint64_t DuClock;
|
||||
uint64_t CuSpentMicroSec;
|
||||
} fs6_dl_t;
|
||||
|
||||
// a value to type all sub packets,
|
||||
// to detect errors, and to be able to extend to other versions
|
||||
// the first byte of each sub structure should match one of these values
|
||||
enum pckType {
|
||||
fs6UlConfig=25,
|
||||
fs6DlConfig=26,
|
||||
fs6ULConfigCCH=27,
|
||||
fs6ULsch=28,
|
||||
fs6ULcch=29,
|
||||
fs6ULindicationHarq=40,
|
||||
fs6ULindicationSr=41,
|
||||
};
|
||||
|
||||
// CU to DU definition of a future UL subframe decode
|
||||
// defines a UE future data plane
|
||||
typedef struct {
|
||||
enum pckType type:8;
|
||||
uint16_t UE_id;
|
||||
int8_t harq_pid;
|
||||
UE_type_t ue_type;
|
||||
|
||||
uint8_t dci_alloc;
|
||||
uint8_t rar_alloc;
|
||||
SCH_status_t status;
|
||||
uint8_t Msg3_flag;
|
||||
uint8_t subframe;
|
||||
uint32_t frame;
|
||||
uint8_t handled;
|
||||
uint8_t phich_active;
|
||||
uint8_t phich_ACK;
|
||||
uint16_t previous_first_rb;
|
||||
uint32_t B;
|
||||
uint32_t G;
|
||||
UCI_format_t uci_format;
|
||||
uint8_t Or2;
|
||||
uint8_t o_RI[2];
|
||||
uint8_t o_ACK[4];
|
||||
uint8_t O_ACK;
|
||||
uint8_t o_RCC;
|
||||
int16_t q_ACK[MAX_ACK_PAYLOAD];
|
||||
int16_t q_RI[MAX_RI_PAYLOAD];
|
||||
uint32_t RTC[MAX_NUM_ULSCH_SEGMENTS];
|
||||
uint8_t ndi;
|
||||
uint8_t round;
|
||||
uint8_t rvidx;
|
||||
uint8_t Nl;
|
||||
uint8_t n_DMRS;
|
||||
uint8_t previous_n_DMRS;
|
||||
uint8_t n_DMRS2;
|
||||
int32_t delta_TF;
|
||||
uint32_t repetition_number ;
|
||||
uint32_t total_number_of_repetitions;
|
||||
|
||||
uint16_t harq_mask;
|
||||
uint16_t nb_rb;
|
||||
uint8_t Qm;
|
||||
uint16_t first_rb;
|
||||
uint8_t O_RI;
|
||||
uint8_t Or1;
|
||||
uint16_t Msc_initial;
|
||||
uint8_t Nsymb_initial;
|
||||
uint8_t V_UL_DAI;
|
||||
uint8_t srs_active;
|
||||
uint32_t TBS;
|
||||
uint8_t Nsymb_pusch;
|
||||
uint8_t Mlimit;
|
||||
uint8_t max_turbo_iterations;
|
||||
uint8_t bundling;
|
||||
uint16_t beta_offset_cqi_times8;
|
||||
uint16_t beta_offset_ri_times8;
|
||||
uint16_t beta_offset_harqack_times8;
|
||||
uint8_t Msg3_active;
|
||||
uint16_t rnti;
|
||||
uint8_t cyclicShift;
|
||||
uint8_t cooperation_flag;
|
||||
uint8_t num_active_cba_groups;
|
||||
uint16_t cba_rnti[4];//NUM_MAX_CBA_GROUP];
|
||||
} fs6_dl_ulsched_t;
|
||||
|
||||
// CU to DU defintion of a DL packet for a given UE
|
||||
// The data itself is padded at the end of this structure
|
||||
typedef struct {
|
||||
enum pckType type:8;
|
||||
int UE_id;
|
||||
int8_t harq_pid;
|
||||
uint16_t rnti;
|
||||
int16_t sqrt_rho_a;
|
||||
int16_t sqrt_rho_b;
|
||||
CEmode_t CEmode:8;
|
||||
uint16_t nb_rb;
|
||||
uint8_t Qm;
|
||||
int8_t Nl;
|
||||
uint8_t pdsch_start;
|
||||
uint8_t sib1_br_flag;
|
||||
uint16_t i0;
|
||||
uint32_t rb_alloc[4];
|
||||
int dataLen;
|
||||
} fs6_dl_uespec_t;
|
||||
|
||||
// CU to DU definition of CCH channel
|
||||
typedef struct {
|
||||
int16_t UE_id;
|
||||
LTE_eNB_UCI cch_vars;
|
||||
} fs6_dl_uespec_ulcch_element_t;
|
||||
|
||||
// header to group all UE CCH channels definitions in one UDP packet
|
||||
typedef struct {
|
||||
enum pckType type:8;
|
||||
int16_t nb_active_ue;
|
||||
} fs6_dl_uespec_ulcch_t;
|
||||
|
||||
// code internal, not transmitted as this
|
||||
typedef struct {
|
||||
int ta;
|
||||
} ul_propagation_t;
|
||||
|
||||
// One UE UL data, data plane, UE data appended after the header
|
||||
typedef struct {
|
||||
enum pckType type:8;
|
||||
short UE_id;
|
||||
uint8_t harq_id;
|
||||
uint8_t segment;
|
||||
int segLen;
|
||||
int r_offset;
|
||||
int G;
|
||||
int ulsch_power[2];
|
||||
uint8_t o_ACK[4];
|
||||
uint8_t O_ACK;
|
||||
int ta;
|
||||
uint8_t o[MAX_CQI_BYTES];
|
||||
uint8_t cqi_crc_status;
|
||||
} fs6_ul_uespec_t;
|
||||
|
||||
// UL UCI (control plane), per UE
|
||||
typedef struct {
|
||||
enum pckType type:8;
|
||||
int UEid;
|
||||
int frame;
|
||||
int subframe;
|
||||
LTE_eNB_UCI uci;
|
||||
uint8_t harq_ack[4];
|
||||
uint8_t tdd_mapping_mode;
|
||||
uint16_t tdd_multiplexing_mask;
|
||||
unsigned short n0_subband_power_dB;
|
||||
uint16_t rnti;
|
||||
int32_t stat;
|
||||
} fs6_ul_uespec_uci_element_t;
|
||||
|
||||
// all segments UCI grouped in one UDP packet
|
||||
typedef struct {
|
||||
enum pckType type:8;
|
||||
int16_t nb_active_ue;
|
||||
} fs6_ul_uespec_uci_t;
|
||||
|
||||
|
||||
bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPort, UDPsock_t *result);
|
||||
int receiveSubFrame(UDPsock_t *sock, void *bufferZone, int bufferSize, uint16_t contentType);
|
||||
int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, uint16_t contentType);
|
||||
|
||||
#define initBufferZone(xBuf) \
|
||||
uint8_t xBuf[FS6_BUF_SIZE]; \
|
||||
((commonUDP_t *)xBuf)->nbBlocks=0;
|
||||
|
||||
#define hUDP(xBuf) ((commonUDP_t *)xBuf)
|
||||
#define hDL(xBuf) ((fs6_dl_t*)(((commonUDP_t *)xBuf)+1))
|
||||
#define hUL(xBuf) ((fs6_ul_t*)(((commonUDP_t *)xBuf)+1))
|
||||
#define hDLUE(xBuf) ((fs6_dl_uespec_t*) (((fs6_dl_t*)(((commonUDP_t *)xBuf)+1))+1))
|
||||
#define hTxULUE(xBuf) ((fs6_dl_ulsched_t*) (((fs6_dl_t*)(((commonUDP_t *)xBuf)+1))+1))
|
||||
#define hTxULcch(xBuf) ((fs6_dl_uespec_ulcch_t*) (((fs6_dl_t*)(((commonUDP_t *)xBuf)+1))+1))
|
||||
#define hULUE(xBuf) ((fs6_ul_uespec_t*) (((fs6_ul_t*)(((commonUDP_t *)xBuf)+1))+1))
|
||||
#define hULUEuci(xBuf) ((fs6_ul_uespec_uci_t*) (((fs6_ul_t*)(((commonUDP_t *)xBuf)+1))+1))
|
||||
|
||||
static inline size_t alignedSize(uint8_t *ptr) {
|
||||
commonUDP_t *header=(commonUDP_t *) ptr;
|
||||
return ((header->contentBytes+sizeof(commonUDP_t)+blockAlign-1)/blockAlign)*blockAlign;
|
||||
}
|
||||
|
||||
static inline void *commonUDPdata(uint8_t *ptr) {
|
||||
return (void *) (((commonUDP_t *)ptr)+1);
|
||||
}
|
||||
|
||||
void setAllfromTS(uint64_t TS, L1_rxtx_proc_t *proc);
|
||||
void sendFs6Ulharq(enum pckType type, int UEid, PHY_VARS_eNB *eNB,LTE_eNB_UCI *uci, int frame, int subframe, uint8_t *harq_ack, uint8_t tdd_mapping_mode, uint16_t tdd_multiplexing_mask,
|
||||
uint16_t rnti, int32_t stat);
|
||||
void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset);
|
||||
void *cu_fs6(void *arg);
|
||||
void *du_fs6(void *arg);
|
||||
void fill_rf_config(RU_t *ru, char *rf_config_file);
|
||||
int init_rf(RU_t *ru);
|
||||
void rx_rf(RU_t *ru, L1_rxtx_proc_t *proc);
|
||||
void tx_rf(RU_t *ru, L1_rxtx_proc_t *proc);
|
||||
void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe);
|
||||
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc);
|
||||
bool dlsch_procedures(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
int harq_pid,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
LTE_eNB_UE_stats *ue_stats) ;
|
||||
void postDecode(L1_rxtx_proc_t *proc, notifiedFIFO_elt_t *req);
|
||||
void pdsch_procedures(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
int harq_pid,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
LTE_eNB_DLSCH_t *dlsch1);
|
||||
void srs_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc);
|
||||
void uci_procedures(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc);
|
||||
void ocp_rx_prach(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
RU_t *ru,
|
||||
uint16_t *max_preamble,
|
||||
uint16_t *max_preamble_energy,
|
||||
uint16_t *max_preamble_delay,
|
||||
uint16_t *avg_preamble_energy,
|
||||
uint16_t Nf,
|
||||
uint8_t tdd_mapindex,
|
||||
uint8_t br_flag);
|
||||
void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
RU_t *ru,
|
||||
int frame_prach,
|
||||
int subframe,
|
||||
uint16_t *max_preamble,
|
||||
uint16_t *max_preamble_energy,
|
||||
uint16_t *max_preamble_delay,
|
||||
uint16_t *avg_preamble_energy,
|
||||
uint16_t Nf,
|
||||
uint8_t tdd_mapindex,
|
||||
uint8_t br_flag,
|
||||
uint8_t ce_level
|
||||
);
|
||||
void ocp_tx_rf(RU_t *ru, L1_rxtx_proc_t *proc);
|
||||
|
||||
// mistakes in main OAI
|
||||
void phy_init_RU(RU_t *);
|
||||
void fep_full(RU_t *ru, int subframe);
|
||||
void feptx_prec(RU_t *ru,int frame,int subframe);
|
||||
void feptx_ofdm(RU_t *ru, int frame, int subframe);
|
||||
void oai_subframe_ind(uint16_t sfn, uint16_t sf);
|
||||
extern uint16_t sf_ahead;
|
||||
#endif
|
||||
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
* Author and copyright: Laurent Thomas, open-cells.com
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*-------------------------------------------------------------------------------
|
||||
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <executables/split_headers.h>
|
||||
#include <sys/types.h> /* See NOTES */
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/udp.h>
|
||||
#include <netdb.h>
|
||||
#include <targets/RT/USER/lte-softmodem.h>
|
||||
|
||||
bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPort, UDPsock_t *result) {
|
||||
struct addrinfo hints= {0}, *servinfo, *p;
|
||||
hints.ai_family = AF_UNSPEC;
|
||||
hints.ai_socktype = SOCK_DGRAM;
|
||||
hints.ai_flags = AI_PASSIVE;
|
||||
int status;
|
||||
|
||||
if ((status = getaddrinfo(sourceIP, sourcePort, &hints, &servinfo)) != 0) {
|
||||
LOG_E(GTPU,"getaddrinfo error: %s\n", gai_strerror(status));
|
||||
return false;
|
||||
}
|
||||
|
||||
// loop through all the results and bind to the first we can
|
||||
for(p = servinfo; p != NULL; p = p->ai_next) {
|
||||
if ((result->sockHandler = socket(p->ai_family, p->ai_socktype,
|
||||
p->ai_protocol)) == -1) {
|
||||
LOG_W(GTPU,"socket: %s\n", strerror(errno));
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bind(result->sockHandler, p->ai_addr, p->ai_addrlen) == -1) {
|
||||
close(result->sockHandler);
|
||||
LOG_W(GTPU,"bind: %s\n", strerror(errno));
|
||||
continue;
|
||||
}
|
||||
|
||||
break; // if we get here, we must have connected successfully
|
||||
}
|
||||
|
||||
if (p == NULL) {
|
||||
// looped off the end of the list with no successful bind
|
||||
LOG_E(GTPU,"failed to bind socket: %s %s \n",sourceIP,sourcePort);
|
||||
return false;
|
||||
}
|
||||
|
||||
freeaddrinfo(servinfo); // all done with this structure
|
||||
|
||||
if ((status = getaddrinfo(destIP, destPort, &hints, &servinfo)) != 0) {
|
||||
LOG_E(GTPU,"getaddrinfo error: %s\n", gai_strerror(status));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (servinfo) {
|
||||
result->destAddr=servinfo;
|
||||
} else {
|
||||
LOG_E(PHY,"No valid UDP addr: %s:%s\n",destIP, destPort);
|
||||
return false;
|
||||
}
|
||||
|
||||
int enable=1;
|
||||
AssertFatal(setsockopt(result->sockHandler, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable))==0,"");
|
||||
struct timeval tv= {0,UDP_TIMEOUT};
|
||||
|
||||
if (IS_SOFTMODEM_RFSIM)
|
||||
tv.tv_sec=2; //debug: wait 2 seconds for human understanding
|
||||
|
||||
AssertFatal(setsockopt(result->sockHandler, SOL_SOCKET, SO_RCVTIMEO,&tv,sizeof(tv)) ==0,"");
|
||||
// Make a send/recv buffer larger than a a couple of subframe
|
||||
// so the kernel will store for us in and out paquets
|
||||
int buff=1000*1000*10;
|
||||
AssertFatal ( setsockopt(result->sockHandler, SOL_SOCKET, SO_SNDBUF, &buff, sizeof(buff)) == 0, "");
|
||||
AssertFatal ( setsockopt(result->sockHandler, SOL_SOCKET, SO_RCVBUF, &buff, sizeof(buff)) == 0, "");
|
||||
return true;
|
||||
}
|
||||
|
||||
// sock: udp socket
|
||||
// bufferZone: a reception area of bufferSize
|
||||
int receiveSubFrame(UDPsock_t *sock, void *bufferZone, int bufferSize, uint16_t contentType) {
|
||||
int rcved=0;
|
||||
commonUDP_t *bufOrigin=(commonUDP_t *)bufferZone;
|
||||
static uint8_t crossData[65536];
|
||||
static int crossDataSize=0;
|
||||
|
||||
if (crossDataSize) {
|
||||
LOG_D(HW,"copy a block received in previous subframe\n");
|
||||
memcpy(bufferZone, crossData, crossDataSize);
|
||||
rcved=1;
|
||||
bufferZone+=crossDataSize;
|
||||
crossDataSize=0;
|
||||
}
|
||||
|
||||
do {
|
||||
//read all subframe data from the control unit
|
||||
int ret=recv(sock->sockHandler, bufferZone, bufferSize, 0);
|
||||
|
||||
if ( ret==-1) {
|
||||
if ( errno == EWOULDBLOCK || errno== EINTR ) {
|
||||
LOG_I(HW,"Received: Timeout, subframe incomplete\n");
|
||||
return rcved;
|
||||
} else {
|
||||
LOG_E(HW,"Critical issue in socket: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
if (hUDP(bufferZone)->contentType != contentType)
|
||||
abort();
|
||||
|
||||
if (rcved && bufOrigin->timestamp != hUDP(bufferZone)->timestamp ) {
|
||||
if ( hUDP(bufferZone)->timestamp > bufOrigin->timestamp ) {
|
||||
LOG_W(HW,"Received data for TS: %lu before end of TS : %lu completion\n",
|
||||
hUDP(bufferZone)->timestamp,
|
||||
bufOrigin->timestamp);
|
||||
memcpy(crossData, bufferZone, ret );
|
||||
crossDataSize=ret;
|
||||
return rcved;
|
||||
} else {
|
||||
LOG_W(HW,"Dropping late packet\n");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
rcved++;
|
||||
bufferZone+=ret;
|
||||
}
|
||||
|
||||
LOG_D(HW,"Received: blocks: %d/%d, size %d, TS: %lu\n",
|
||||
rcved, bufOrigin->nbBlocks, ret, bufOrigin->timestamp);
|
||||
} while ( rcved == 0 || rcved < bufOrigin->nbBlocks );
|
||||
|
||||
return rcved;
|
||||
}
|
||||
|
||||
int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, uint16_t contentType) {
|
||||
commonUDP_t *UDPheader=(commonUDP_t *)bufferZone ;
|
||||
UDPheader->contentType=contentType;
|
||||
UDPheader->senderClock=rdtsc();
|
||||
int nbBlocks=UDPheader->nbBlocks;
|
||||
int blockId=0;
|
||||
|
||||
if (nbBlocks <= 0 ) {
|
||||
LOG_E(PHY,"FS6: can't send blocks: %d\n", nbBlocks);
|
||||
return 0;
|
||||
}
|
||||
|
||||
do {
|
||||
if (blockId > 0 ) {
|
||||
commonUDP_t *currentHeader=(commonUDP_t *)bufferZone;
|
||||
currentHeader->timestamp=UDPheader->timestamp;
|
||||
currentHeader->nbBlocks=UDPheader->nbBlocks;
|
||||
currentHeader->blockID=blockId;
|
||||
currentHeader->contentType=UDPheader->contentType;
|
||||
memcpy(commonUDPdata((void *)currentHeader), commonUDPdata(bufferZone), secondHeaderSize);
|
||||
}
|
||||
|
||||
blockId++;
|
||||
int sz=alignedSize(bufferZone);
|
||||
// Let's use the first address returned by getaddrinfo()
|
||||
int ret=sendto(sock->sockHandler, bufferZone, sz, 0,
|
||||
sock->destAddr->ai_addr, sock->destAddr->ai_addrlen);
|
||||
|
||||
if ( ret != sz )
|
||||
LOG_W(HW,"Wrote socket doesn't return size %d (val: %d, errno:%d, %s)\n",
|
||||
sz, ret, errno, strerror(errno));
|
||||
|
||||
LOG_D(HW,"Sent: TS: %lu, blocks %d/%d, block size : %d \n",
|
||||
UDPheader->timestamp, UDPheader->nbBlocks-nbBlocks, UDPheader->nbBlocks, sz);
|
||||
bufferZone+=sz;
|
||||
nbBlocks--;
|
||||
} while (nbBlocks);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -29,7 +29,7 @@ typedef struct {
|
||||
nfapi_mode_t nfapi_mode;
|
||||
} nfapi_params_t;
|
||||
|
||||
static nfapi_params_t nfapi_params;
|
||||
static nfapi_params_t nfapi_params = {0};
|
||||
|
||||
void set_thread_priority(int priority) {
|
||||
//printf("%s(priority:%d)\n", __FUNCTION__, priority);
|
||||
|
||||
@@ -49,7 +49,6 @@ extern RAN_CONTEXT_t RC;
|
||||
#include "fapi_stub.h"
|
||||
//#include "fapi_l1.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "openair2/LAYER2/MAC/mac_proto.h"
|
||||
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_proto.h"
|
||||
@@ -692,13 +691,14 @@ void pnf_phy_deallocate_p7_vendor_ext(nfapi_p7_message_header_t *header) {
|
||||
free(header);
|
||||
}
|
||||
|
||||
int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *req) {
|
||||
int pnf_phy_hi_dci0_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *req) {
|
||||
if (req->hi_dci0_request_body.number_of_dci == 0 && req->hi_dci0_request_body.number_of_hi == 0)
|
||||
LOG_D(PHY,"[PNF] HI_DCI0_REQUEST SFN/SF:%05d dci:%d hi:%d\n", NFAPI_SFNSF2DEC(req->sfn_sf), req->hi_dci0_request_body.number_of_dci, req->hi_dci0_request_body.number_of_hi);
|
||||
|
||||
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
|
||||
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc;
|
||||
if (proc ==NULL)
|
||||
proc = &eNB->proc.L1_proc;
|
||||
|
||||
for (int i=0; i<req->hi_dci0_request_body.number_of_dci + req->hi_dci0_request_body.number_of_hi; i++) {
|
||||
//LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d]\n", NFAPI_SFNSF2DEC(req->sfn_sf), i);
|
||||
@@ -719,7 +719,7 @@ int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request_t *req) {
|
||||
int pnf_phy_dl_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request_t *req) {
|
||||
if (RC.ru == 0) {
|
||||
return -1;
|
||||
}
|
||||
@@ -740,7 +740,8 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request
|
||||
int sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
|
||||
int sf = NFAPI_SFNSF2SF(req->sfn_sf);
|
||||
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc;
|
||||
if (proc==NULL)
|
||||
proc = &eNB->proc.L1_proc;
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu_list = req->dl_config_request_body.dl_config_pdu_list;
|
||||
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[sf&1];
|
||||
pdcch_vars->num_pdcch_symbols = req->dl_config_request_body.number_pdcch_ofdm_symbols;
|
||||
@@ -797,7 +798,7 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request
|
||||
uint8_t *dlsch_sdu = tx_pdus[UE_id][harq_pid];
|
||||
memcpy(dlsch_sdu, tx_pdu->segments[0].segment_data, tx_pdu->segments[0].segment_length);
|
||||
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:pdu_index:%d handle_nfapi_dlsch_pdu(eNB, proc_rxtx, dlsch_pdu, transport_blocks:%d sdu:%p) eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols:%d\n", __FUNCTION__, rel8_pdu->pdu_index, rel8_pdu->transport_blocks, dlsch_sdu, eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols);
|
||||
handle_nfapi_dlsch_pdu( eNB, sfn,sf, &eNB->proc.L1_proc, &dl_config_pdu_list[i], rel8_pdu->transport_blocks-1, dlsch_sdu);
|
||||
handle_nfapi_dlsch_pdu( eNB, sfn,sf, proc, &dl_config_pdu_list[i], rel8_pdu->transport_blocks-1, dlsch_sdu);
|
||||
} else {
|
||||
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() DLSCH NULL TX PDU SFN/SF:%d PDU_INDEX:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), rel8_pdu->pdu_index);
|
||||
}
|
||||
@@ -837,7 +838,7 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_tx_request_t *req) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request_t *req) {
|
||||
int pnf_phy_ul_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request_t *req) {
|
||||
if (0)LOG_D(PHY,"[PNF] UL_CONFIG_REQ %s() sfn_sf:%d pdu:%d rach_prach_frequency_resources:%d srs_present:%u\n",
|
||||
__FUNCTION__,
|
||||
NFAPI_SFNSF2DEC(req->sfn_sf),
|
||||
@@ -866,7 +867,8 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request
|
||||
uint16_t curr_sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
|
||||
uint16_t curr_sf = NFAPI_SFNSF2SF(req->sfn_sf);
|
||||
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
|
||||
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc;
|
||||
if (proc==NULL)
|
||||
proc = &eNB->proc.L1_proc;
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu_list = req->ul_config_request_body.ul_config_pdu_list;
|
||||
|
||||
for (int i=0; i<req->ul_config_request_body.number_of_pdus; i++) {
|
||||
|
||||
@@ -23,5 +23,5 @@
|
||||
#define NFAPI_PNF_H__
|
||||
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
|
||||
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
|
||||
|
||||
void oai_subframe_ind(uint16_t sfn, uint16_t sf);
|
||||
#endif
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define _NFAPI_NR_INTERFACE_H_
|
||||
|
||||
#include "nfapi_interface.h"
|
||||
#include <nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h>
|
||||
|
||||
#define NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS 5
|
||||
#define NFAPI_NR_MAX_NB_TCI_STATES_PDCCH 64
|
||||
|
||||
@@ -24,6 +24,7 @@ extern "C" {
|
||||
|
||||
#include "nfapi_interface.h"
|
||||
#include "debug.h"
|
||||
#include <openair2/PHY_INTERFACE/IF_Module.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
@@ -619,21 +620,21 @@ typedef struct nfapi_pnf_p7_config
|
||||
* \param req A pointer to the dl config request message structure
|
||||
* \return not currently used
|
||||
*/
|
||||
int (*dl_config_req)(nfapi_pnf_p7_config_t* config, nfapi_dl_config_request_t* req);
|
||||
int (*dl_config_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_dl_config_request_t* req);
|
||||
|
||||
/*! A callback for the UL_CONFIG.request
|
||||
* \param config A poiner to the PNF P7 config
|
||||
* \param req A pointer to the ul config request message structure
|
||||
* \return not currently used
|
||||
*/
|
||||
int (*ul_config_req)(nfapi_pnf_p7_config_t* config, nfapi_ul_config_request_t* req);
|
||||
int (*ul_config_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_ul_config_request_t* req);
|
||||
|
||||
/*! A callback for the HI_DCI0.request
|
||||
* \param config A poiner to the PNF P7 config
|
||||
* \param req A pointer to the hi dci0 request message structure
|
||||
* \return not currently used
|
||||
*/
|
||||
int (*hi_dci0_req)(nfapi_pnf_p7_config_t* config, nfapi_hi_dci0_request_t* req);
|
||||
int (*hi_dci0_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_hi_dci0_request_t* req);
|
||||
|
||||
/*! A callback for the TX_REQ.request
|
||||
* \param config A poiner to the PNF P7 config
|
||||
|
||||
@@ -39,7 +39,7 @@ nfapi_pnf_config_t* nfapi_pnf_config_create()
|
||||
_this->_public.codec_config.allocate = &malloc;
|
||||
_this->_public.codec_config.deallocate = &free;
|
||||
|
||||
return &(_this->_public);
|
||||
return (nfapi_pnf_config_t* )_this;
|
||||
}
|
||||
|
||||
void nfapi_pnf_config_destory(nfapi_pnf_config_t* config)
|
||||
|
||||
@@ -576,20 +576,20 @@ void send_dummy_subframe(pnf_p7_t* pnf_p7, uint16_t sfn_sf)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.dl_config_req->sfn_sf = sfn_sf;
|
||||
//NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy dl_config_req - enter\n");
|
||||
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
|
||||
(pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
|
||||
//NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy dl_config_req - exit\n");
|
||||
}
|
||||
if(pnf_p7->_public.ul_config_req && pnf_p7->_public.dummy_subframe.ul_config_req)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.ul_config_req->sfn_sf = sfn_sf;
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy ul_config_req - enter\n");
|
||||
(pnf_p7->_public.ul_config_req)(&pnf_p7->_public, pnf_p7->_public.dummy_subframe.ul_config_req);
|
||||
(pnf_p7->_public.ul_config_req)(NULL, &pnf_p7->_public, pnf_p7->_public.dummy_subframe.ul_config_req);
|
||||
}
|
||||
if(pnf_p7->_public.hi_dci0_req && pnf_p7->_public.dummy_subframe.hi_dci0_req)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.hi_dci0_req->sfn_sf = sfn_sf;
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy hi_dci0 - enter\n");
|
||||
(pnf_p7->_public.hi_dci0_req)(&pnf_p7->_public, pnf_p7->_public.dummy_subframe.hi_dci0_req);
|
||||
(pnf_p7->_public.hi_dci0_req)(NULL, &pnf_p7->_public, pnf_p7->_public.dummy_subframe.hi_dci0_req);
|
||||
}
|
||||
if(pnf_p7->_public.lbt_dl_config_req && pnf_p7->_public.dummy_subframe.lbt_dl_config_req)
|
||||
{
|
||||
@@ -699,7 +699,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
|
||||
if(tx_subframe_buffer->dl_config_req != 0)
|
||||
{
|
||||
if(pnf_p7->_public.dl_config_req)
|
||||
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), tx_subframe_buffer->dl_config_req);
|
||||
(pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), tx_subframe_buffer->dl_config_req);
|
||||
|
||||
//deallocate_nfapi_dl_config_request(subframe_buffer->dl_config_req, pnf_p7);
|
||||
}
|
||||
@@ -709,14 +709,14 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
|
||||
if(pnf_p7->_public.dl_config_req && pnf_p7->_public.dummy_subframe.dl_config_req)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.dl_config_req->sfn_sf = sfn_sf_tx;
|
||||
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
|
||||
(pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
|
||||
}
|
||||
}
|
||||
|
||||
if(tx_subframe_buffer->hi_dci0_req != 0)
|
||||
{
|
||||
if(pnf_p7->_public.hi_dci0_req)
|
||||
(pnf_p7->_public.hi_dci0_req)(&(pnf_p7->_public), tx_subframe_buffer->hi_dci0_req);
|
||||
(pnf_p7->_public.hi_dci0_req)(NULL, &(pnf_p7->_public), tx_subframe_buffer->hi_dci0_req);
|
||||
|
||||
//deallocate_nfapi_hi_dci0_request(subframe_buffer->hi_dci0_req, pnf_p7);
|
||||
}
|
||||
@@ -726,7 +726,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
|
||||
if(pnf_p7->_public.hi_dci0_req && pnf_p7->_public.dummy_subframe.hi_dci0_req)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.hi_dci0_req->sfn_sf = sfn_sf_tx;
|
||||
(pnf_p7->_public.hi_dci0_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.hi_dci0_req);
|
||||
(pnf_p7->_public.hi_dci0_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.hi_dci0_req);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -777,7 +777,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
|
||||
if(subframe_buffer->ul_config_req != 0)
|
||||
{
|
||||
if(pnf_p7->_public.ul_config_req)
|
||||
(pnf_p7->_public.ul_config_req)(&(pnf_p7->_public), subframe_buffer->ul_config_req);
|
||||
(pnf_p7->_public.ul_config_req)(NULL, &(pnf_p7->_public), subframe_buffer->ul_config_req);
|
||||
|
||||
//deallocate_nfapi_ul_config_request(subframe_buffer->ul_config_req, pnf_p7);
|
||||
}
|
||||
@@ -787,7 +787,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
|
||||
if(pnf_p7->_public.ul_config_req && pnf_p7->_public.dummy_subframe.ul_config_req)
|
||||
{
|
||||
pnf_p7->_public.dummy_subframe.ul_config_req->sfn_sf = sfn_sf;
|
||||
(pnf_p7->_public.ul_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.ul_config_req);
|
||||
(pnf_p7->_public.ul_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.ul_config_req);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ nfapi_vnf_config_t* nfapi_vnf_config_create()
|
||||
_this->_public.codec_config.deallocate = &free;
|
||||
|
||||
|
||||
return &(_this->_public);
|
||||
return (nfapi_vnf_config_t* )_this;
|
||||
}
|
||||
|
||||
void nfapi_vnf_config_destory(nfapi_vnf_config_t* config)
|
||||
|
||||
@@ -47,7 +47,7 @@ nfapi_vnf_p7_config_t* nfapi_vnf_p7_config_create()
|
||||
_this->_public.codec_config.deallocate = &free;
|
||||
|
||||
|
||||
return &(_this->_public);
|
||||
return (nfapi_vnf_p7_config_t*)_this;
|
||||
}
|
||||
|
||||
void nfapi_vnf_p7_config_destory(nfapi_vnf_p7_config_t* config)
|
||||
|
||||
@@ -529,7 +529,7 @@ int main(int argc, char *argv[])
|
||||
time_stats_t time_optim[10], time_decoder[10];
|
||||
n_iter_stats_t dec_iter[3];
|
||||
|
||||
short BG=0,Zc,Kb;
|
||||
short BG=0,Zc,Kb=0;
|
||||
|
||||
while ((c = getopt (argc, argv, "q:r:s:S:l:n:d:i:t:u:h")) != -1)
|
||||
switch (c)
|
||||
|
||||
@@ -135,25 +135,25 @@ static inline void nrLDPC_llr2llrProcBuf(t_nrLDPC_lut* p_lut, int8_t* llr, t_nrL
|
||||
*/
|
||||
static inline void nrLDPC_llr2CnProcBuf_BG1(t_nrLDPC_lut* p_lut, int8_t* llr, t_nrLDPC_procBuf* p_procBuf, uint16_t Z)
|
||||
{
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG1_R13[0]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG1_R13[1]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG1_R13[2]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG1_R13[3]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG7) [lut_numCnInCnGroups_BG1_R13[4]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG1_R13[5]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[5]]) p_lut->circShift[5];
|
||||
const uint16_t (*lut_circShift_CNG9) [lut_numCnInCnGroups_BG1_R13[6]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[6]]) p_lut->circShift[6];
|
||||
const uint16_t (*lut_circShift_CNG10)[lut_numCnInCnGroups_BG1_R13[7]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[7]]) p_lut->circShift[7];
|
||||
const uint16_t (*lut_circShift_CNG19)[lut_numCnInCnGroups_BG1_R13[8]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[8]]) p_lut->circShift[8];
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG1_R13[0]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG1_R13[1]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG1_R13[2]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG1_R13[3]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG7) [lut_numCnInCnGroups_BG1_R13[4]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG1_R13[5]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[5]]) p_lut->circShift[5];
|
||||
const uint16_t (*lut_circShift_CNG9) [lut_numCnInCnGroups_BG1_R13[6]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[6]]) p_lut->circShift[6];
|
||||
const uint16_t (*lut_circShift_CNG10)[lut_numCnInCnGroups_BG1_R13[7]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[7]]) p_lut->circShift[7];
|
||||
const uint16_t (*lut_circShift_CNG19)[lut_numCnInCnGroups_BG1_R13[8]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[8]]) p_lut->circShift[8];
|
||||
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG3) [lut_numCnInCnGroups_BG1_R13[0]] = (uint8_t(*)[lut_numCnInCnGroups_BG1_R13[0]]) p_lut->posBnInCnProcBuf[0];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG4) [lut_numCnInCnGroups_BG1_R13[1]] = (uint8_t(*)[lut_numCnInCnGroups_BG1_R13[1]]) p_lut->posBnInCnProcBuf[1];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG5) [lut_numCnInCnGroups_BG1_R13[2]] = (uint8_t(*)[lut_numCnInCnGroups_BG1_R13[2]]) p_lut->posBnInCnProcBuf[2];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG6) [lut_numCnInCnGroups_BG1_R13[3]] = (uint8_t(*)[lut_numCnInCnGroups_BG1_R13[3]]) p_lut->posBnInCnProcBuf[3];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG7) [lut_numCnInCnGroups_BG1_R13[4]] = (uint8_t(*)[lut_numCnInCnGroups_BG1_R13[4]]) p_lut->posBnInCnProcBuf[4];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG8) [lut_numCnInCnGroups_BG1_R13[5]] = (uint8_t(*)[lut_numCnInCnGroups_BG1_R13[5]]) p_lut->posBnInCnProcBuf[5];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG9) [lut_numCnInCnGroups_BG1_R13[6]] = (uint8_t(*)[lut_numCnInCnGroups_BG1_R13[6]]) p_lut->posBnInCnProcBuf[6];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG10)[lut_numCnInCnGroups_BG1_R13[7]] = (uint8_t(*)[lut_numCnInCnGroups_BG1_R13[7]]) p_lut->posBnInCnProcBuf[7];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG19)[lut_numCnInCnGroups_BG1_R13[8]] = (uint8_t(*)[lut_numCnInCnGroups_BG1_R13[8]]) p_lut->posBnInCnProcBuf[8];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG3) [lut_numCnInCnGroups_BG1_R13[0]] = (const uint8_t(*)[lut_numCnInCnGroups_BG1_R13[0]]) p_lut->posBnInCnProcBuf[0];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG4) [lut_numCnInCnGroups_BG1_R13[1]] = (const uint8_t(*)[lut_numCnInCnGroups_BG1_R13[1]]) p_lut->posBnInCnProcBuf[1];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG5) [lut_numCnInCnGroups_BG1_R13[2]] = (const uint8_t(*)[lut_numCnInCnGroups_BG1_R13[2]]) p_lut->posBnInCnProcBuf[2];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG6) [lut_numCnInCnGroups_BG1_R13[3]] = (const uint8_t(*)[lut_numCnInCnGroups_BG1_R13[3]]) p_lut->posBnInCnProcBuf[3];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG7) [lut_numCnInCnGroups_BG1_R13[4]] = (const uint8_t(*)[lut_numCnInCnGroups_BG1_R13[4]]) p_lut->posBnInCnProcBuf[4];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG8) [lut_numCnInCnGroups_BG1_R13[5]] = (const uint8_t(*)[lut_numCnInCnGroups_BG1_R13[5]]) p_lut->posBnInCnProcBuf[5];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG9) [lut_numCnInCnGroups_BG1_R13[6]] = (const uint8_t(*)[lut_numCnInCnGroups_BG1_R13[6]]) p_lut->posBnInCnProcBuf[6];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG10)[lut_numCnInCnGroups_BG1_R13[7]] = (const uint8_t(*)[lut_numCnInCnGroups_BG1_R13[7]]) p_lut->posBnInCnProcBuf[7];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG19)[lut_numCnInCnGroups_BG1_R13[8]] = (const uint8_t(*)[lut_numCnInCnGroups_BG1_R13[8]]) p_lut->posBnInCnProcBuf[8];
|
||||
|
||||
const uint8_t* lut_numCnInCnGroups = p_lut->numCnInCnGroups;
|
||||
const uint32_t* lut_startAddrCnGroups = p_lut->startAddrCnGroups;
|
||||
@@ -344,19 +344,19 @@ static inline void nrLDPC_llr2CnProcBuf_BG1(t_nrLDPC_lut* p_lut, int8_t* llr, t_
|
||||
*/
|
||||
static inline void nrLDPC_llr2CnProcBuf_BG2(t_nrLDPC_lut* p_lut, int8_t* llr, t_nrLDPC_procBuf* p_procBuf, uint16_t Z)
|
||||
{
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG2_R15[0]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG2_R15[1]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG2_R15[2]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG2_R15[3]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG2_R15[4]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG10) [lut_numCnInCnGroups_BG2_R15[5]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[5]]) p_lut->circShift[5];
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG2_R15[0]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG2_R15[1]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG2_R15[2]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG2_R15[3]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG2_R15[4]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG10) [lut_numCnInCnGroups_BG2_R15[5]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[5]]) p_lut->circShift[5];
|
||||
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG3) [lut_numCnInCnGroups_BG2_R15[0]] = (uint8_t(*)[lut_numCnInCnGroups_BG2_R15[0]]) p_lut->posBnInCnProcBuf[0];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG4) [lut_numCnInCnGroups_BG2_R15[1]] = (uint8_t(*)[lut_numCnInCnGroups_BG2_R15[1]]) p_lut->posBnInCnProcBuf[1];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG5) [lut_numCnInCnGroups_BG2_R15[2]] = (uint8_t(*)[lut_numCnInCnGroups_BG2_R15[2]]) p_lut->posBnInCnProcBuf[2];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG6) [lut_numCnInCnGroups_BG2_R15[3]] = (uint8_t(*)[lut_numCnInCnGroups_BG2_R15[3]]) p_lut->posBnInCnProcBuf[3];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG8) [lut_numCnInCnGroups_BG2_R15[4]] = (uint8_t(*)[lut_numCnInCnGroups_BG2_R15[4]]) p_lut->posBnInCnProcBuf[4];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG10) [lut_numCnInCnGroups_BG2_R15[5]] = (uint8_t(*)[lut_numCnInCnGroups_BG2_R15[5]]) p_lut->posBnInCnProcBuf[5];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG3) [lut_numCnInCnGroups_BG2_R15[0]] = (const uint8_t(*)[lut_numCnInCnGroups_BG2_R15[0]]) p_lut->posBnInCnProcBuf[0];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG4) [lut_numCnInCnGroups_BG2_R15[1]] = (const uint8_t(*)[lut_numCnInCnGroups_BG2_R15[1]]) p_lut->posBnInCnProcBuf[1];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG5) [lut_numCnInCnGroups_BG2_R15[2]] = (const uint8_t(*)[lut_numCnInCnGroups_BG2_R15[2]]) p_lut->posBnInCnProcBuf[2];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG6) [lut_numCnInCnGroups_BG2_R15[3]] = (const uint8_t(*)[lut_numCnInCnGroups_BG2_R15[3]]) p_lut->posBnInCnProcBuf[3];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG8) [lut_numCnInCnGroups_BG2_R15[4]] = (const uint8_t(*)[lut_numCnInCnGroups_BG2_R15[4]]) p_lut->posBnInCnProcBuf[4];
|
||||
const uint8_t (*lut_posBnInCnProcBuf_CNG10) [lut_numCnInCnGroups_BG2_R15[5]] = (const uint8_t(*)[lut_numCnInCnGroups_BG2_R15[5]]) p_lut->posBnInCnProcBuf[5];
|
||||
|
||||
const uint8_t* lut_numCnInCnGroups = p_lut->numCnInCnGroups;
|
||||
const uint32_t* lut_startAddrCnGroups = p_lut->startAddrCnGroups;
|
||||
@@ -483,26 +483,26 @@ static inline void nrLDPC_cn2bnProcBuf_BG2(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
|
||||
const uint8_t* lut_numCnInCnGroups = p_lut->numCnInCnGroups;
|
||||
const uint32_t* lut_startAddrCnGroups = p_lut->startAddrCnGroups;
|
||||
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG2_R15[0]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG2_R15[1]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG2_R15[2]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG2_R15[3]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG2_R15[4]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG10) [lut_numCnInCnGroups_BG2_R15[5]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[5]]) p_lut->circShift[5];
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG2_R15[0]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG2_R15[1]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG2_R15[2]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG2_R15[3]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG2_R15[4]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG10) [lut_numCnInCnGroups_BG2_R15[5]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[5]]) p_lut->circShift[5];
|
||||
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (uint32_t(*)[lut_numCnInCnGroups[0]]) p_lut->startAddrBnProcBuf[0];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (uint32_t(*)[lut_numCnInCnGroups[1]]) p_lut->startAddrBnProcBuf[1];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (uint32_t(*)[lut_numCnInCnGroups[2]]) p_lut->startAddrBnProcBuf[2];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (uint32_t(*)[lut_numCnInCnGroups[3]]) p_lut->startAddrBnProcBuf[3];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG8) [lut_numCnInCnGroups[4]] = (uint32_t(*)[lut_numCnInCnGroups[4]]) p_lut->startAddrBnProcBuf[4];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG10) [lut_numCnInCnGroups[5]] = (uint32_t(*)[lut_numCnInCnGroups[5]]) p_lut->startAddrBnProcBuf[5];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (const uint32_t(*)[lut_numCnInCnGroups[0]]) p_lut->startAddrBnProcBuf[0];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (const uint32_t(*)[lut_numCnInCnGroups[1]]) p_lut->startAddrBnProcBuf[1];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (const uint32_t(*)[lut_numCnInCnGroups[2]]) p_lut->startAddrBnProcBuf[2];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (const uint32_t(*)[lut_numCnInCnGroups[3]]) p_lut->startAddrBnProcBuf[3];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG8) [lut_numCnInCnGroups[4]] = (const uint32_t(*)[lut_numCnInCnGroups[4]]) p_lut->startAddrBnProcBuf[4];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG10) [lut_numCnInCnGroups[5]] = (const uint32_t(*)[lut_numCnInCnGroups[5]]) p_lut->startAddrBnProcBuf[5];
|
||||
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (uint8_t(*)[lut_numCnInCnGroups[0]]) p_lut->bnPosBnProcBuf[0];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (uint8_t(*)[lut_numCnInCnGroups[1]]) p_lut->bnPosBnProcBuf[1];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (uint8_t(*)[lut_numCnInCnGroups[2]]) p_lut->bnPosBnProcBuf[2];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (uint8_t(*)[lut_numCnInCnGroups[3]]) p_lut->bnPosBnProcBuf[3];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG8) [lut_numCnInCnGroups[4]] = (uint8_t(*)[lut_numCnInCnGroups[4]]) p_lut->bnPosBnProcBuf[4];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG10) [lut_numCnInCnGroups[5]] = (uint8_t(*)[lut_numCnInCnGroups[5]]) p_lut->bnPosBnProcBuf[5];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (const uint8_t(*)[lut_numCnInCnGroups[0]]) p_lut->bnPosBnProcBuf[0];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (const uint8_t(*)[lut_numCnInCnGroups[1]]) p_lut->bnPosBnProcBuf[1];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (const uint8_t(*)[lut_numCnInCnGroups[2]]) p_lut->bnPosBnProcBuf[2];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (const uint8_t(*)[lut_numCnInCnGroups[3]]) p_lut->bnPosBnProcBuf[3];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG8) [lut_numCnInCnGroups[4]] = (const uint8_t(*)[lut_numCnInCnGroups[4]]) p_lut->bnPosBnProcBuf[4];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG10) [lut_numCnInCnGroups[5]] = (const uint8_t(*)[lut_numCnInCnGroups[5]]) p_lut->bnPosBnProcBuf[5];
|
||||
|
||||
int8_t* cnProcBufRes = p_procBuf->cnProcBufRes;
|
||||
int8_t* bnProcBuf = p_procBuf->bnProcBuf;
|
||||
@@ -626,34 +626,34 @@ static inline void nrLDPC_cn2bnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
|
||||
const uint8_t* lut_numCnInCnGroups = p_lut->numCnInCnGroups;
|
||||
const uint32_t* lut_startAddrCnGroups = p_lut->startAddrCnGroups;
|
||||
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG1_R13[0]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG1_R13[1]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG1_R13[2]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG1_R13[3]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG7) [lut_numCnInCnGroups_BG1_R13[4]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG1_R13[5]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[5]]) p_lut->circShift[5];
|
||||
const uint16_t (*lut_circShift_CNG9) [lut_numCnInCnGroups_BG1_R13[6]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[6]]) p_lut->circShift[6];
|
||||
const uint16_t (*lut_circShift_CNG10)[lut_numCnInCnGroups_BG1_R13[7]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[7]]) p_lut->circShift[7];
|
||||
const uint16_t (*lut_circShift_CNG19)[lut_numCnInCnGroups_BG1_R13[8]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[8]]) p_lut->circShift[8];
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG1_R13[0]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG1_R13[1]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG1_R13[2]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG1_R13[3]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG7) [lut_numCnInCnGroups_BG1_R13[4]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG1_R13[5]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[5]]) p_lut->circShift[5];
|
||||
const uint16_t (*lut_circShift_CNG9) [lut_numCnInCnGroups_BG1_R13[6]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[6]]) p_lut->circShift[6];
|
||||
const uint16_t (*lut_circShift_CNG10)[lut_numCnInCnGroups_BG1_R13[7]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[7]]) p_lut->circShift[7];
|
||||
const uint16_t (*lut_circShift_CNG19)[lut_numCnInCnGroups_BG1_R13[8]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[8]]) p_lut->circShift[8];
|
||||
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (uint32_t(*)[lut_numCnInCnGroups[0]]) p_lut->startAddrBnProcBuf[0];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (uint32_t(*)[lut_numCnInCnGroups[1]]) p_lut->startAddrBnProcBuf[1];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (uint32_t(*)[lut_numCnInCnGroups[2]]) p_lut->startAddrBnProcBuf[2];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (uint32_t(*)[lut_numCnInCnGroups[3]]) p_lut->startAddrBnProcBuf[3];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG7) [lut_numCnInCnGroups[4]] = (uint32_t(*)[lut_numCnInCnGroups[4]]) p_lut->startAddrBnProcBuf[4];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG8) [lut_numCnInCnGroups[5]] = (uint32_t(*)[lut_numCnInCnGroups[5]]) p_lut->startAddrBnProcBuf[5];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG9) [lut_numCnInCnGroups[6]] = (uint32_t(*)[lut_numCnInCnGroups[6]]) p_lut->startAddrBnProcBuf[6];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG10)[lut_numCnInCnGroups[7]] = (uint32_t(*)[lut_numCnInCnGroups[7]]) p_lut->startAddrBnProcBuf[7];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG19)[lut_numCnInCnGroups[8]] = (uint32_t(*)[lut_numCnInCnGroups[8]]) p_lut->startAddrBnProcBuf[8];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (const uint32_t(*)[lut_numCnInCnGroups[0]]) p_lut->startAddrBnProcBuf[0];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (const uint32_t(*)[lut_numCnInCnGroups[1]]) p_lut->startAddrBnProcBuf[1];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (const uint32_t(*)[lut_numCnInCnGroups[2]]) p_lut->startAddrBnProcBuf[2];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (const uint32_t(*)[lut_numCnInCnGroups[3]]) p_lut->startAddrBnProcBuf[3];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG7) [lut_numCnInCnGroups[4]] = (const uint32_t(*)[lut_numCnInCnGroups[4]]) p_lut->startAddrBnProcBuf[4];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG8) [lut_numCnInCnGroups[5]] = (const uint32_t(*)[lut_numCnInCnGroups[5]]) p_lut->startAddrBnProcBuf[5];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG9) [lut_numCnInCnGroups[6]] = (const uint32_t(*)[lut_numCnInCnGroups[6]]) p_lut->startAddrBnProcBuf[6];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG10)[lut_numCnInCnGroups[7]] = (const uint32_t(*)[lut_numCnInCnGroups[7]]) p_lut->startAddrBnProcBuf[7];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG19)[lut_numCnInCnGroups[8]] = (const uint32_t(*)[lut_numCnInCnGroups[8]]) p_lut->startAddrBnProcBuf[8];
|
||||
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (uint8_t(*)[lut_numCnInCnGroups[1]]) p_lut->bnPosBnProcBuf[1];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (uint8_t(*)[lut_numCnInCnGroups[2]]) p_lut->bnPosBnProcBuf[2];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (uint8_t(*)[lut_numCnInCnGroups[3]]) p_lut->bnPosBnProcBuf[3];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG7) [lut_numCnInCnGroups[4]] = (uint8_t(*)[lut_numCnInCnGroups[4]]) p_lut->bnPosBnProcBuf[4];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG8) [lut_numCnInCnGroups[5]] = (uint8_t(*)[lut_numCnInCnGroups[5]]) p_lut->bnPosBnProcBuf[5];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG9) [lut_numCnInCnGroups[6]] = (uint8_t(*)[lut_numCnInCnGroups[6]]) p_lut->bnPosBnProcBuf[6];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG10)[lut_numCnInCnGroups[7]] = (uint8_t(*)[lut_numCnInCnGroups[7]]) p_lut->bnPosBnProcBuf[7];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG19)[lut_numCnInCnGroups[8]] = (uint8_t(*)[lut_numCnInCnGroups[8]]) p_lut->bnPosBnProcBuf[8];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (const uint8_t(*)[lut_numCnInCnGroups[1]]) p_lut->bnPosBnProcBuf[1];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (const uint8_t(*)[lut_numCnInCnGroups[2]]) p_lut->bnPosBnProcBuf[2];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (const uint8_t(*)[lut_numCnInCnGroups[3]]) p_lut->bnPosBnProcBuf[3];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG7) [lut_numCnInCnGroups[4]] = (const uint8_t(*)[lut_numCnInCnGroups[4]]) p_lut->bnPosBnProcBuf[4];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG8) [lut_numCnInCnGroups[5]] = (const uint8_t(*)[lut_numCnInCnGroups[5]]) p_lut->bnPosBnProcBuf[5];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG9) [lut_numCnInCnGroups[6]] = (const uint8_t(*)[lut_numCnInCnGroups[6]]) p_lut->bnPosBnProcBuf[6];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG10)[lut_numCnInCnGroups[7]] = (const uint8_t(*)[lut_numCnInCnGroups[7]]) p_lut->bnPosBnProcBuf[7];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG19)[lut_numCnInCnGroups[8]] = (const uint8_t(*)[lut_numCnInCnGroups[8]]) p_lut->bnPosBnProcBuf[8];
|
||||
|
||||
int8_t* cnProcBufRes = p_procBuf->cnProcBufRes;
|
||||
int8_t* bnProcBuf = p_procBuf->bnProcBuf;
|
||||
@@ -824,26 +824,26 @@ static inline void nrLDPC_bn2cnProcBuf_BG2(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
|
||||
const uint8_t* lut_numCnInCnGroups = p_lut->numCnInCnGroups;
|
||||
const uint32_t* lut_startAddrCnGroups = p_lut->startAddrCnGroups;
|
||||
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG2_R15[0]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG2_R15[1]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG2_R15[2]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG2_R15[3]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG2_R15[4]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG10) [lut_numCnInCnGroups_BG2_R15[5]] = (uint16_t(*)[lut_numCnInCnGroups_BG2_R15[5]]) p_lut->circShift[5];
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG2_R15[0]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG2_R15[1]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG2_R15[2]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG2_R15[3]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG2_R15[4]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG10) [lut_numCnInCnGroups_BG2_R15[5]] = (const uint16_t(*)[lut_numCnInCnGroups_BG2_R15[5]]) p_lut->circShift[5];
|
||||
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (uint32_t(*)[lut_numCnInCnGroups[0]]) p_lut->startAddrBnProcBuf[0];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (uint32_t(*)[lut_numCnInCnGroups[1]]) p_lut->startAddrBnProcBuf[1];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (uint32_t(*)[lut_numCnInCnGroups[2]]) p_lut->startAddrBnProcBuf[2];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (uint32_t(*)[lut_numCnInCnGroups[3]]) p_lut->startAddrBnProcBuf[3];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG8) [lut_numCnInCnGroups[4]] = (uint32_t(*)[lut_numCnInCnGroups[4]]) p_lut->startAddrBnProcBuf[4];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG10) [lut_numCnInCnGroups[5]] = (uint32_t(*)[lut_numCnInCnGroups[5]]) p_lut->startAddrBnProcBuf[5];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (const uint32_t(*)[lut_numCnInCnGroups[0]]) p_lut->startAddrBnProcBuf[0];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (const uint32_t(*)[lut_numCnInCnGroups[1]]) p_lut->startAddrBnProcBuf[1];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (const uint32_t(*)[lut_numCnInCnGroups[2]]) p_lut->startAddrBnProcBuf[2];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (const uint32_t(*)[lut_numCnInCnGroups[3]]) p_lut->startAddrBnProcBuf[3];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG8) [lut_numCnInCnGroups[4]] = (const uint32_t(*)[lut_numCnInCnGroups[4]]) p_lut->startAddrBnProcBuf[4];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG10) [lut_numCnInCnGroups[5]] = (const uint32_t(*)[lut_numCnInCnGroups[5]]) p_lut->startAddrBnProcBuf[5];
|
||||
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (uint8_t(*)[lut_numCnInCnGroups[0]]) p_lut->bnPosBnProcBuf[0];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (uint8_t(*)[lut_numCnInCnGroups[1]]) p_lut->bnPosBnProcBuf[1];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (uint8_t(*)[lut_numCnInCnGroups[2]]) p_lut->bnPosBnProcBuf[2];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (uint8_t(*)[lut_numCnInCnGroups[3]]) p_lut->bnPosBnProcBuf[3];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG8) [lut_numCnInCnGroups[4]] = (uint8_t(*)[lut_numCnInCnGroups[4]]) p_lut->bnPosBnProcBuf[4];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG10) [lut_numCnInCnGroups[5]] = (uint8_t(*)[lut_numCnInCnGroups[5]]) p_lut->bnPosBnProcBuf[5];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (const uint8_t(*)[lut_numCnInCnGroups[0]]) p_lut->bnPosBnProcBuf[0];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (const uint8_t(*)[lut_numCnInCnGroups[1]]) p_lut->bnPosBnProcBuf[1];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (const uint8_t(*)[lut_numCnInCnGroups[2]]) p_lut->bnPosBnProcBuf[2];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (const uint8_t(*)[lut_numCnInCnGroups[3]]) p_lut->bnPosBnProcBuf[3];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG8) [lut_numCnInCnGroups[4]] = (const uint8_t(*)[lut_numCnInCnGroups[4]]) p_lut->bnPosBnProcBuf[4];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG10) [lut_numCnInCnGroups[5]] = (const uint8_t(*)[lut_numCnInCnGroups[5]]) p_lut->bnPosBnProcBuf[5];
|
||||
|
||||
int8_t* cnProcBuf = p_procBuf->cnProcBuf;
|
||||
int8_t* bnProcBufRes = p_procBuf->bnProcBufRes;
|
||||
@@ -966,34 +966,34 @@ static inline void nrLDPC_bn2cnProcBuf_BG1(t_nrLDPC_lut* p_lut, t_nrLDPC_procBuf
|
||||
const uint8_t* lut_numCnInCnGroups = p_lut->numCnInCnGroups;
|
||||
const uint32_t* lut_startAddrCnGroups = p_lut->startAddrCnGroups;
|
||||
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG1_R13[0]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG1_R13[1]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG1_R13[2]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG1_R13[3]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG7) [lut_numCnInCnGroups_BG1_R13[4]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG1_R13[5]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[5]]) p_lut->circShift[5];
|
||||
const uint16_t (*lut_circShift_CNG9) [lut_numCnInCnGroups_BG1_R13[6]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[6]]) p_lut->circShift[6];
|
||||
const uint16_t (*lut_circShift_CNG10)[lut_numCnInCnGroups_BG1_R13[7]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[7]]) p_lut->circShift[7];
|
||||
const uint16_t (*lut_circShift_CNG19)[lut_numCnInCnGroups_BG1_R13[8]] = (uint16_t(*)[lut_numCnInCnGroups_BG1_R13[8]]) p_lut->circShift[8];
|
||||
const uint16_t (*lut_circShift_CNG3) [lut_numCnInCnGroups_BG1_R13[0]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[0]]) p_lut->circShift[0];
|
||||
const uint16_t (*lut_circShift_CNG4) [lut_numCnInCnGroups_BG1_R13[1]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[1]]) p_lut->circShift[1];
|
||||
const uint16_t (*lut_circShift_CNG5) [lut_numCnInCnGroups_BG1_R13[2]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[2]]) p_lut->circShift[2];
|
||||
const uint16_t (*lut_circShift_CNG6) [lut_numCnInCnGroups_BG1_R13[3]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[3]]) p_lut->circShift[3];
|
||||
const uint16_t (*lut_circShift_CNG7) [lut_numCnInCnGroups_BG1_R13[4]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[4]]) p_lut->circShift[4];
|
||||
const uint16_t (*lut_circShift_CNG8) [lut_numCnInCnGroups_BG1_R13[5]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[5]]) p_lut->circShift[5];
|
||||
const uint16_t (*lut_circShift_CNG9) [lut_numCnInCnGroups_BG1_R13[6]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[6]]) p_lut->circShift[6];
|
||||
const uint16_t (*lut_circShift_CNG10)[lut_numCnInCnGroups_BG1_R13[7]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[7]]) p_lut->circShift[7];
|
||||
const uint16_t (*lut_circShift_CNG19)[lut_numCnInCnGroups_BG1_R13[8]] = (const uint16_t(*)[lut_numCnInCnGroups_BG1_R13[8]]) p_lut->circShift[8];
|
||||
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (uint32_t(*)[lut_numCnInCnGroups[0]]) p_lut->startAddrBnProcBuf[0];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (uint32_t(*)[lut_numCnInCnGroups[1]]) p_lut->startAddrBnProcBuf[1];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (uint32_t(*)[lut_numCnInCnGroups[2]]) p_lut->startAddrBnProcBuf[2];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (uint32_t(*)[lut_numCnInCnGroups[3]]) p_lut->startAddrBnProcBuf[3];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG7) [lut_numCnInCnGroups[4]] = (uint32_t(*)[lut_numCnInCnGroups[4]]) p_lut->startAddrBnProcBuf[4];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG8) [lut_numCnInCnGroups[5]] = (uint32_t(*)[lut_numCnInCnGroups[5]]) p_lut->startAddrBnProcBuf[5];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG9) [lut_numCnInCnGroups[6]] = (uint32_t(*)[lut_numCnInCnGroups[6]]) p_lut->startAddrBnProcBuf[6];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG10)[lut_numCnInCnGroups[7]] = (uint32_t(*)[lut_numCnInCnGroups[7]]) p_lut->startAddrBnProcBuf[7];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG19)[lut_numCnInCnGroups[8]] = (uint32_t(*)[lut_numCnInCnGroups[8]]) p_lut->startAddrBnProcBuf[8];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG3) [lut_numCnInCnGroups[0]] = (const uint32_t(*)[lut_numCnInCnGroups[0]]) p_lut->startAddrBnProcBuf[0];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (const uint32_t(*)[lut_numCnInCnGroups[1]]) p_lut->startAddrBnProcBuf[1];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (const uint32_t(*)[lut_numCnInCnGroups[2]]) p_lut->startAddrBnProcBuf[2];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (const uint32_t(*)[lut_numCnInCnGroups[3]]) p_lut->startAddrBnProcBuf[3];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG7) [lut_numCnInCnGroups[4]] = (const uint32_t(*)[lut_numCnInCnGroups[4]]) p_lut->startAddrBnProcBuf[4];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG8) [lut_numCnInCnGroups[5]] = (const uint32_t(*)[lut_numCnInCnGroups[5]]) p_lut->startAddrBnProcBuf[5];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG9) [lut_numCnInCnGroups[6]] = (const uint32_t(*)[lut_numCnInCnGroups[6]]) p_lut->startAddrBnProcBuf[6];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG10)[lut_numCnInCnGroups[7]] = (const uint32_t(*)[lut_numCnInCnGroups[7]]) p_lut->startAddrBnProcBuf[7];
|
||||
const uint32_t (*lut_startAddrBnProcBuf_CNG19)[lut_numCnInCnGroups[8]] = (const uint32_t(*)[lut_numCnInCnGroups[8]]) p_lut->startAddrBnProcBuf[8];
|
||||
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (uint8_t(*)[lut_numCnInCnGroups[1]]) p_lut->bnPosBnProcBuf[1];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (uint8_t(*)[lut_numCnInCnGroups[2]]) p_lut->bnPosBnProcBuf[2];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (uint8_t(*)[lut_numCnInCnGroups[3]]) p_lut->bnPosBnProcBuf[3];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG7) [lut_numCnInCnGroups[4]] = (uint8_t(*)[lut_numCnInCnGroups[4]]) p_lut->bnPosBnProcBuf[4];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG8) [lut_numCnInCnGroups[5]] = (uint8_t(*)[lut_numCnInCnGroups[5]]) p_lut->bnPosBnProcBuf[5];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG9) [lut_numCnInCnGroups[6]] = (uint8_t(*)[lut_numCnInCnGroups[6]]) p_lut->bnPosBnProcBuf[6];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG10)[lut_numCnInCnGroups[7]] = (uint8_t(*)[lut_numCnInCnGroups[7]]) p_lut->bnPosBnProcBuf[7];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG19)[lut_numCnInCnGroups[8]] = (uint8_t(*)[lut_numCnInCnGroups[8]]) p_lut->bnPosBnProcBuf[8];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG4) [lut_numCnInCnGroups[1]] = (const uint8_t(*)[lut_numCnInCnGroups[1]]) p_lut->bnPosBnProcBuf[1];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG5) [lut_numCnInCnGroups[2]] = (const uint8_t(*)[lut_numCnInCnGroups[2]]) p_lut->bnPosBnProcBuf[2];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG6) [lut_numCnInCnGroups[3]] = (const uint8_t(*)[lut_numCnInCnGroups[3]]) p_lut->bnPosBnProcBuf[3];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG7) [lut_numCnInCnGroups[4]] = (const uint8_t(*)[lut_numCnInCnGroups[4]]) p_lut->bnPosBnProcBuf[4];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG8) [lut_numCnInCnGroups[5]] = (const uint8_t(*)[lut_numCnInCnGroups[5]]) p_lut->bnPosBnProcBuf[5];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG9) [lut_numCnInCnGroups[6]] = (const uint8_t(*)[lut_numCnInCnGroups[6]]) p_lut->bnPosBnProcBuf[6];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG10)[lut_numCnInCnGroups[7]] = (const uint8_t(*)[lut_numCnInCnGroups[7]]) p_lut->bnPosBnProcBuf[7];
|
||||
const uint8_t (*lut_bnPosBnProcBuf_CNG19)[lut_numCnInCnGroups[8]] = (const uint8_t(*)[lut_numCnInCnGroups[8]]) p_lut->bnPosBnProcBuf[8];
|
||||
|
||||
int8_t* cnProcBuf = p_procBuf->cnProcBuf;
|
||||
int8_t* bnProcBufRes = p_procBuf->bnProcBufRes;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ int phy_init_RU(RU_t *ru) {
|
||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
int i,j,p,re;
|
||||
init_dfts();
|
||||
//load_dftslib();
|
||||
LOG_I(PHY,"Initializing RU signal buffers (if_south %s) nb_tx %d\n",ru_if_types[ru->if_south],ru->nb_tx);
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
@@ -76,7 +76,7 @@ int phy_init_RU(RU_t *ru) {
|
||||
}
|
||||
|
||||
if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
|
||||
init_dfts();
|
||||
load_dftslib();
|
||||
init_7_5KHz();
|
||||
LOG_I(PHY,"nb_tx %d\n",ru->nb_tx);
|
||||
ru->common.rxdata_7_5kHz = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) );
|
||||
|
||||
@@ -625,7 +625,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
|
||||
int th_id;
|
||||
LOG_D(PHY,"Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx);
|
||||
crcTableInit();
|
||||
init_dfts();
|
||||
load_dftslib();
|
||||
init_frame_parms(&ue->frame_parms,1);
|
||||
lte_sync_time_init(&ue->frame_parms);
|
||||
init_lte_top(&ue->frame_parms);
|
||||
|
||||
@@ -97,7 +97,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
|
||||
while(gNB->configured == 0) usleep(10000);
|
||||
|
||||
init_dfts();
|
||||
load_dftslib();
|
||||
/*
|
||||
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,
|
||||
@@ -113,7 +113,8 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
|
||||
);*/
|
||||
LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_gNB][MOD %02"PRIu8"][]\n", gNB->Mod_id);
|
||||
crcTableInit();
|
||||
init_dfts();
|
||||
init_scrambling_luts();
|
||||
init_pucch2_luts();
|
||||
load_nrLDPClib();
|
||||
// PBCH DMRS gold sequences generation
|
||||
nr_init_pbch_dmrs(gNB);
|
||||
|
||||
@@ -113,8 +113,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++) {
|
||||
// for preamble format 1 and 2, more memory should be allocated
|
||||
ru->prach_rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*(1<<mu)*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]);
|
||||
}
|
||||
|
||||
|
||||
@@ -990,7 +990,7 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue,
|
||||
void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
crcTableInit();
|
||||
init_dfts();
|
||||
load_dftslib();
|
||||
init_context_synchro_nr(frame_parms);
|
||||
generate_ul_reference_signal_sequences(SHRT_MAX);
|
||||
// Polar encoder init for PBCH
|
||||
|
||||
@@ -56,22 +56,22 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
// do ifft of channel estimate
|
||||
switch(frame_parms->N_RB_DL) {
|
||||
case 6:
|
||||
dft128((int16_t*) <e_eNB_srs->srs_ch_estimates[aa][0],
|
||||
dft(DFT_128,(int16_t*) <e_eNB_srs->srs_ch_estimates[aa][0],
|
||||
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
case 25:
|
||||
dft512((int16_t*) <e_eNB_srs->srs_ch_estimates[aa][0],
|
||||
dft(DFT_512,(int16_t*) <e_eNB_srs->srs_ch_estimates[aa][0],
|
||||
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
case 50:
|
||||
dft1024((int16_t*) <e_eNB_srs->srs_ch_estimates[aa][0],
|
||||
dft(DFT_1024,(int16_t*) <e_eNB_srs->srs_ch_estimates[aa][0],
|
||||
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
case 100:
|
||||
dft2048((int16_t*) <e_eNB_srs->srs_ch_estimates[aa][0],
|
||||
dft(DFT_2048,(int16_t*) <e_eNB_srs->srs_ch_estimates[aa][0],
|
||||
(int16_t*) lte_eNB_srs->srs_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "PHY/defs_UE.h"
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
#include "PHY/impl_defs_top.h"
|
||||
#include "openair2/LAYER2/MAC/mac_proto.h"
|
||||
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
||||
uint8_t pilot0,pilot1,pilot2,pilot3;
|
||||
|
||||
short ch[2], *pil, *rxF, *dl_bf_ch, *dl_bf_ch_prev;
|
||||
short *fl, *fm, *fr, *fl_dc, *fm_dc, *fr_dc, *f1, *f2l, *f2r;
|
||||
short *fl=NULL, *fm=NULL, *fr=NULL, *fl_dc=NULL, *fm_dc=NULL, *fr_dc=NULL, *f1, *f2l=NULL, *f2r=NULL;
|
||||
|
||||
unsigned int *rballoc;
|
||||
int **rxdataF;
|
||||
@@ -58,10 +58,10 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
||||
dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
|
||||
|
||||
if (((frame_parms->Ncp == NORMAL) && (symbol>=7)) ||
|
||||
((frame_parms->Ncp == EXTENDED) && (symbol>=6)))
|
||||
rballoc = dlsch0_harq->rb_alloc_odd;
|
||||
((frame_parms->Ncp == EXTENDED) && (symbol>=6)))
|
||||
rballoc = dlsch0_harq->rb_alloc_odd;
|
||||
else
|
||||
rballoc = dlsch0_harq->rb_alloc_even;
|
||||
rballoc = dlsch0_harq->rb_alloc_even;
|
||||
|
||||
rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[Ns>>1]].rxdataF;
|
||||
|
||||
@@ -69,56 +69,56 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
|
||||
beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
|
||||
|
||||
if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage
|
||||
ch_offset = frame_parms->ofdm_symbol_size;
|
||||
ch_offset = frame_parms->ofdm_symbol_size;
|
||||
else
|
||||
ch_offset = frame_parms->ofdm_symbol_size*symbol;
|
||||
ch_offset = frame_parms->ofdm_symbol_size*symbol;
|
||||
|
||||
|
||||
|
||||
uespec_nushift = frame_parms->Nid_cell%3;
|
||||
subframe = Ns>>1;
|
||||
|
||||
|
||||
//generate ue specific pilots
|
||||
lprime = symbol/3-1;
|
||||
lte_dl_ue_spec_rx(phy_vars_ue,uespec_pilot,Ns,5,lprime,0,dlsch0_harq->nb_rb);
|
||||
//LOG_M("uespec_pilot_rx.m","uespec_pilot",uespec_pilot,300,1,1);
|
||||
|
||||
if (frame_parms->Ncp==0){
|
||||
if (symbol==3 || symbol==6 || symbol==9 || symbol==12)
|
||||
uespec_pilots = 1;
|
||||
} else{
|
||||
if (symbol==4 || symbol==7 || symbol==10)
|
||||
uespec_pilots = 1;
|
||||
}
|
||||
|
||||
if ((frame_parms->Ncp==0 && (symbol==6 ||symbol ==12)) || (frame_parms->Ncp==1 && symbol==7))
|
||||
uespec_poffset = 2;
|
||||
//generate ue specific pilots
|
||||
lprime = symbol/3-1;
|
||||
lte_dl_ue_spec_rx(phy_vars_ue,uespec_pilot,Ns,5,lprime,0,dlsch0_harq->nb_rb);
|
||||
//LOG_M("uespec_pilot_rx.m","uespec_pilot",uespec_pilot,300,1,1);
|
||||
|
||||
if (phy_vars_ue->frame_parms.Ncp == 0) { // normal prefix
|
||||
pilot0 = 3;
|
||||
pilot1 = 6;
|
||||
pilot2 = 9;
|
||||
pilot3 = 12;
|
||||
} else { // extended prefix
|
||||
pilot0 = 4;
|
||||
pilot1 = 7;
|
||||
pilot2 = 10;
|
||||
}
|
||||
if (frame_parms->Ncp==0){
|
||||
if (symbol==3 || symbol==6 || symbol==9 || symbol==12)
|
||||
uespec_pilots = 1;
|
||||
} else{
|
||||
if (symbol==4 || symbol==7 || symbol==10)
|
||||
uespec_pilots = 1;
|
||||
}
|
||||
|
||||
//define the filter
|
||||
pil_offset = (uespec_nushift+uespec_poffset)%3;
|
||||
// printf("symbol=%d,pil_offset=%d\n",symbol,pil_offset);
|
||||
switch (pil_offset) {
|
||||
case 0:
|
||||
fl = filt16_l0;
|
||||
fm = filt16_m0;
|
||||
fr = filt16_r0;
|
||||
fl_dc = filt16_l0;
|
||||
fm_dc = filt16_m0;
|
||||
fr_dc = filt16_r0;
|
||||
f1 = filt16_1;
|
||||
f2l = filt16_2l0;
|
||||
f2r = filt16_2r0;
|
||||
if ((frame_parms->Ncp==0 && (symbol==6 ||symbol ==12)) || (frame_parms->Ncp==1 && symbol==7))
|
||||
uespec_poffset = 2;
|
||||
|
||||
if (phy_vars_ue->frame_parms.Ncp == 0) { // normal prefix
|
||||
pilot0 = 3;
|
||||
pilot1 = 6;
|
||||
pilot2 = 9;
|
||||
pilot3 = 12;
|
||||
} else { // extended prefix
|
||||
pilot0 = 4;
|
||||
pilot1 = 7;
|
||||
pilot2 = 10;
|
||||
}
|
||||
|
||||
//define the filter
|
||||
pil_offset = (uespec_nushift+uespec_poffset)%3;
|
||||
// printf("symbol=%d,pil_offset=%d\n",symbol,pil_offset);
|
||||
switch (pil_offset) {
|
||||
case 0:
|
||||
fl = filt16_l0;
|
||||
fm = filt16_m0;
|
||||
fr = filt16_r0;
|
||||
fl_dc = filt16_l0;
|
||||
fm_dc = filt16_m0;
|
||||
fr_dc = filt16_r0;
|
||||
f1 = filt16_1;
|
||||
f2l = filt16_2l0;
|
||||
f2r = filt16_2r0;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
|
||||
@@ -657,35 +657,35 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
|
||||
}
|
||||
}
|
||||
|
||||
void (*idft)(int16_t *,int16_t *, int);
|
||||
idft_size_idx_t idftsizeidx;
|
||||
|
||||
switch (ue->frame_parms.ofdm_symbol_size) {
|
||||
case 128:
|
||||
idft = idft128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
idft = idft256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
idft = idft512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
idft = idft1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
idft = idft1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
idft = idft2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
idft = idft512;
|
||||
idftsizeidx = IDFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
idftsizeidx = IDFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
idftsizeidx = IDFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
idftsizeidx = IDFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
idftsizeidx = IDFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
idftsizeidx = IDFT_2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
idftsizeidx = IDFT_512;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -695,7 +695,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
|
||||
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
|
||||
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx]) {
|
||||
//LOG_I(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns>>1], l);
|
||||
idft((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
|
||||
idft(idftsizeidx,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -724,31 +724,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa]) {
|
||||
switch (ue->frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
idft128((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
idft(IDFT_128,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
idft512((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
idft(IDFT_512,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 50:
|
||||
idft1024((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
idft(IDFT_1024,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 75:
|
||||
idft1536((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
idft(IDFT_1536,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 100:
|
||||
idft2048((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
idft(IDFT_2048,(int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
@@ -141,28 +141,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
|
||||
|
||||
switch (frame_parms->N_RB_DL) {
|
||||
case 6:
|
||||
idft128((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_128,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 25:
|
||||
idft512((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_512,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 50:
|
||||
idft1024((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_1024,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
|
||||
case 75:
|
||||
idft1536((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_1536,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp,
|
||||
1); /// complex output
|
||||
break;
|
||||
case 100:
|
||||
idft2048((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_2048,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
@@ -189,28 +189,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
|
||||
|
||||
switch (frame_parms->N_RB_DL) {
|
||||
case 6:
|
||||
idft128((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_128,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 25:
|
||||
idft512((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_512,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 50:
|
||||
idft1024((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_1024,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
|
||||
case 75:
|
||||
idft1536((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_1536,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 100:
|
||||
idft2048((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_2048,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
@@ -237,28 +237,28 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
|
||||
|
||||
switch (frame_parms->N_RB_DL) {
|
||||
case 6:
|
||||
idft128((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_128,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 25:
|
||||
idft512((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_512,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 50:
|
||||
idft1024((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_1024,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
|
||||
case 75:
|
||||
idft1536((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_1536,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 100:
|
||||
idft2048((short*)syncF_tmp, /// complex input
|
||||
idft(IDFT_2048,(short*)syncF_tmp, /// complex input
|
||||
(short*)sync_tmp, /// complex output
|
||||
1);
|
||||
break;
|
||||
@@ -492,28 +492,28 @@ int ru_sync_time_init(RU_t *ru) // LTE_UE_COMMON *common_vars
|
||||
|
||||
switch (ru->frame_parms->N_RB_DL) {
|
||||
case 6:
|
||||
idft128((int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||
idft(IDFT_128,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||
ru->dmrssync, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 25:
|
||||
idft512((int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||
idft(IDFT_512,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||
ru->dmrssync, /// complex output
|
||||
1);
|
||||
break;
|
||||
case 50:
|
||||
idft1024((int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||
idft(IDFT_1024,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||
ru->dmrssync, /// complex output
|
||||
1);
|
||||
break;
|
||||
|
||||
case 75:
|
||||
idft1536((int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||
idft(IDFT_1536,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||
ru->dmrssync,
|
||||
1); /// complex output
|
||||
break;
|
||||
case 100:
|
||||
idft2048((int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||
idft(IDFT_2048,(int16_t*)(&dmrsp[0][3*ru->frame_parms->ofdm_symbol_size]),
|
||||
ru->dmrssync, /// complex output
|
||||
1);
|
||||
break;
|
||||
|
||||
@@ -80,7 +80,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
while (1) {
|
||||
|
||||
//compute frequency-domain representation of 6144-sample chunk
|
||||
dft6144((int16_t *)rxp,
|
||||
dft(DFT_6144,(int16_t *)rxp,
|
||||
sp,1);
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
}
|
||||
|
||||
// ifft, accumulate energy over two half-frames
|
||||
idft256((int16_t*)autocorr0,(int16_t*)tmp_t,1);
|
||||
idft(IDFT_256,(int16_t*)autocorr0,(int16_t*)tmp_t,1);
|
||||
/*
|
||||
if (i==12288) {
|
||||
sprintf(fname,"corr256F_%d.m",abs(f));
|
||||
@@ -285,12 +285,12 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
|
||||
for (re=0; re<(256/4); re++)
|
||||
autocorr0_t[re] = _mm_add_epi32(autocorr0_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re]));
|
||||
|
||||
idft256((int16_t*)autocorr1,(int16_t*)tmp_t,1);
|
||||
idft(IDFT_256,(int16_t*)autocorr1,(int16_t*)tmp_t,1);
|
||||
|
||||
for (re=0; re<(256/4); re++)
|
||||
autocorr1_t[re] = _mm_add_epi32(autocorr1_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re]));
|
||||
|
||||
idft256((int16_t*)autocorr2,(int16_t*)tmp_t,1);
|
||||
idft(IDFT_256,(int16_t*)autocorr2,(int16_t*)tmp_t,1);
|
||||
|
||||
for (re=0; re<(256/4); re++)
|
||||
autocorr2_t[re] = _mm_add_epi32(autocorr2_t[re],_mm_madd_epi16(tmp_t[re],tmp_t[re]));
|
||||
|
||||
@@ -1029,7 +1029,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
|
||||
int N_RB_DL = frame_parms->N_RB_DL;
|
||||
|
||||
|
||||
int rank_tm3_tm4;
|
||||
int rank_tm3_tm4=-1;
|
||||
|
||||
|
||||
ue->measurements.nb_antennas_rx = frame_parms->nb_antennas_rx;
|
||||
|
||||
@@ -50,8 +50,11 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
int32_t **ul_ch_estimates_time = (eNB!=NULL) ? pusch_vars->drs_ch_estimates_time : calibration->drs_ch_estimates_time;
|
||||
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 = (eNB!=NULL) ? proc->subframe_rx : ru->proc.tti_rx;
|
||||
uint8_t harq_pid;
|
||||
|
||||
int subframe = proc->subframe_rx;
|
||||
|
||||
uint8_t harq_pid;
|
||||
|
||||
int16_t delta_phase = 0;
|
||||
int16_t *ru1 = ru_90;
|
||||
int16_t *ru2 = ru_90;
|
||||
@@ -246,25 +249,25 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
|
||||
switch(frame_parms->N_RB_DL) {
|
||||
case 6:
|
||||
idft128((int16_t *) temp_in_ifft_0,
|
||||
idft(IDFT_128,(int16_t *) temp_in_ifft_0,
|
||||
(int16_t *) ul_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
idft512((int16_t *) temp_in_ifft_0,
|
||||
idft(IDFT_512,(int16_t *) temp_in_ifft_0,
|
||||
(int16_t *) ul_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 50:
|
||||
idft1024((int16_t *) temp_in_ifft_0,
|
||||
idft(IDFT_1024,(int16_t *) temp_in_ifft_0,
|
||||
(int16_t *) ul_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 100:
|
||||
idft2048((int16_t *) temp_in_ifft_0,
|
||||
idft(IDFT_2048,(int16_t *) temp_in_ifft_0,
|
||||
(int16_t *) ul_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
@@ -575,25 +578,25 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
switch(frame_parms->N_RB_DL) {
|
||||
case 6:
|
||||
idft128((int16_t *) temp_in_ifft_0,
|
||||
idft(IDFT_128,(int16_t *) temp_in_ifft_0,
|
||||
(int16_t *) ul_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
idft512((int16_t *) temp_in_ifft_0,
|
||||
idft(IDFT_512,(int16_t *) temp_in_ifft_0,
|
||||
(int16_t *) ul_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 50:
|
||||
idft1024((int16_t *) temp_in_ifft_0,
|
||||
idft(IDFT_1024,(int16_t *) temp_in_ifft_0,
|
||||
(int16_t *) ul_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 100:
|
||||
idft2048((int16_t *) temp_in_ifft_0,
|
||||
idft(IDFT_2048,(int16_t *) temp_in_ifft_0,
|
||||
(int16_t *) ul_ch_estimates_time[aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
@@ -20,15 +20,15 @@
|
||||
*/
|
||||
|
||||
/*! \file PHY/LTE_TRANSPORT/dlsch_coding.c
|
||||
* \brief Top-level routines for implementing Turbo-coded (DLSCH) transport channels from 36-212, V8.6 2009-03
|
||||
* \author R. Knopp
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
* \brief Top-level routines for implementing Turbo-coded (DLSCH) transport channels from 36-212, V8.6 2009-03
|
||||
* \author R. Knopp
|
||||
* \date 2011
|
||||
* \version 0.1
|
||||
* \company Eurecom
|
||||
* \email: knopp@eurecom.fr
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
@@ -42,22 +42,23 @@
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "targets/RT/USER/lte-softmodem.h"
|
||||
#include <syscall.h>
|
||||
#include "executables/thread-common.h"
|
||||
#include "targets/RT/USER/rt_wrapper.h"
|
||||
#include <common/utils/threadPool/thread-pool.h>
|
||||
|
||||
//#define DEBUG_DLSCH_CODING
|
||||
//#define DEBUG_DLSCH_FREE 1
|
||||
|
||||
/*
|
||||
#define is_not_pilot(pilots,first_pilot,re) (pilots==0) || \
|
||||
#define is_not_pilot(pilots,first_pilot,re) (pilots==0) || \
|
||||
((pilots==1)&&(first_pilot==1)&&(((re>2)&&(re<6))||((re>8)&&(re<12)))) || \
|
||||
((pilots==1)&&(first_pilot==0)&&(((re<3))||((re>5)&&(re<9)))) \
|
||||
*/
|
||||
#define is_not_pilot(pilots,first_pilot,re) (1)
|
||||
/*extern void thread_top_init(char *thread_name,
|
||||
int affinity,
|
||||
uint64_t runtime,
|
||||
uint64_t deadline,
|
||||
uint64_t period);*/
|
||||
int affinity,
|
||||
uint64_t runtime,
|
||||
uint64_t deadline,
|
||||
uint64_t period);*/
|
||||
|
||||
extern volatile int oai_exit;
|
||||
|
||||
@@ -83,11 +84,6 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) {
|
||||
free16(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768);
|
||||
dlsch->harq_processes[i]->c[r] = NULL;
|
||||
}
|
||||
|
||||
if (dlsch->harq_processes[i]->d[r]) {
|
||||
free16(dlsch->harq_processes[i]->d[r],(96+12+3+(3*6144)));
|
||||
dlsch->harq_processes[i]->d[r] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
free16(dlsch->harq_processes[i],sizeof(LTE_DL_eNB_HARQ_t));
|
||||
@@ -108,26 +104,26 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,
|
||||
LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
LTE_eNB_DLSCH_t *dlsch;
|
||||
unsigned char exit_flag = 0,i,j,r,aa,layer;
|
||||
unsigned char exit_flag = 0,i,r,aa,layer;
|
||||
int re;
|
||||
unsigned char bw_scaling =1;
|
||||
|
||||
switch (N_RB_DL) {
|
||||
case 6:
|
||||
bw_scaling =16;
|
||||
break;
|
||||
case 6:
|
||||
bw_scaling =16;
|
||||
break;
|
||||
|
||||
case 25:
|
||||
bw_scaling =4;
|
||||
break;
|
||||
case 25:
|
||||
bw_scaling =4;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
bw_scaling =2;
|
||||
break;
|
||||
case 50:
|
||||
bw_scaling =2;
|
||||
break;
|
||||
|
||||
default:
|
||||
bw_scaling =1;
|
||||
break;
|
||||
default:
|
||||
bw_scaling =1;
|
||||
break;
|
||||
}
|
||||
|
||||
dlsch = (LTE_eNB_DLSCH_t *)malloc16(sizeof(LTE_eNB_DLSCH_t));
|
||||
@@ -153,11 +149,11 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,
|
||||
|
||||
// NOTE: THIS HAS TO BE REVISED FOR RU, commenting to remove memory leak !!!!!
|
||||
/*
|
||||
dlsch->calib_dl_ch_estimates = (int32_t**)malloc16(frame_parms->nb_antennas_tx*sizeof(int32_t*));
|
||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||
dlsch->calib_dl_ch_estimates[aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
|
||||
dlsch->calib_dl_ch_estimates = (int32_t**)malloc16(frame_parms->nb_antennas_tx*sizeof(int32_t*));
|
||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||
dlsch->calib_dl_ch_estimates[aa] = (int32_t *)malloc16(OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES*sizeof(int32_t));
|
||||
|
||||
}*/
|
||||
}*/
|
||||
|
||||
for (i=0; i<20; i++)
|
||||
dlsch->harq_ids[i/10][i%10] = Mdlharq;
|
||||
@@ -183,7 +179,6 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,
|
||||
for (r=0; r<MAX_NUM_DLSCH_SEGMENTS/bw_scaling; r++) {
|
||||
// account for filler in first segment and CRCs for multiple segment case
|
||||
dlsch->harq_processes[i]->c[r] = (uint8_t *)malloc16(((r==0)?8:0) + 3+ 768);
|
||||
dlsch->harq_processes[i]->d[r] = (uint8_t *)malloc16((96+12+3+(3*6144)));
|
||||
|
||||
if (dlsch->harq_processes[i]->c[r]) {
|
||||
bzero(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+ 768);
|
||||
@@ -191,13 +186,6 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,
|
||||
printf("Can't get c\n");
|
||||
exit_flag=2;
|
||||
}
|
||||
|
||||
if (dlsch->harq_processes[i]->d[r]) {
|
||||
bzero(dlsch->harq_processes[i]->d[r],(96+12+3+(3*6144)));
|
||||
} else {
|
||||
printf("Can't get d\n");
|
||||
exit_flag=2;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -209,13 +197,6 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,
|
||||
if (exit_flag==0) {
|
||||
for (i=0; i<Mdlharq; i++) {
|
||||
dlsch->harq_processes[i]->round=0;
|
||||
|
||||
for (j=0; j<96; j++)
|
||||
for (r=0; r<MAX_NUM_DLSCH_SEGMENTS/bw_scaling; r++) {
|
||||
// printf("dlsch->harq_processes[%d]->d[%d] %p\n",i,r,dlsch->harq_processes[i]->d[r]);
|
||||
if (dlsch->harq_processes[i]->d[r])
|
||||
dlsch->harq_processes[i]->d[r][j] = LTE_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return(dlsch);
|
||||
@@ -231,7 +212,7 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,
|
||||
|
||||
void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch) {
|
||||
unsigned char Mdlharq;
|
||||
unsigned char i,j,r;
|
||||
unsigned char i;
|
||||
|
||||
if (dlsch) {
|
||||
Mdlharq = dlsch->Mdlharq;
|
||||
@@ -255,307 +236,17 @@ void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch) {
|
||||
dlsch->harq_processes[i]->status = 0;
|
||||
dlsch->harq_processes[i]->round = 0;
|
||||
|
||||
for (j=0; j<96; j++)
|
||||
for (r=0; r<MAX_NUM_DLSCH_SEGMENTS; r++)
|
||||
if (dlsch->harq_processes[i]->d[r])
|
||||
dlsch->harq_processes[i]->d[r][j] = LTE_NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int dlsch_encoding_2threads0(te_params *tep) {
|
||||
LTE_eNB_DLSCH_t *dlsch = tep->dlsch;
|
||||
unsigned int G = tep->G;
|
||||
unsigned char harq_pid = tep->harq_pid;
|
||||
unsigned int total_worker = tep->total_worker;
|
||||
unsigned int current_worker = tep->current_worker;
|
||||
unsigned short nb_rb = dlsch->harq_processes[harq_pid]->nb_rb;
|
||||
unsigned int Kr=0,Kr_bytes,r,r_offset=0;
|
||||
// unsigned short m=dlsch->harq_processes[harq_pid]->mcs;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING_W, VCD_FUNCTION_IN);
|
||||
|
||||
if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet
|
||||
for (r=(dlsch->harq_processes[harq_pid]->C/(total_worker+1))*current_worker; r<(dlsch->harq_processes[harq_pid]->C/(total_worker+1))*(current_worker+1); r++) {
|
||||
if (r<dlsch->harq_processes[harq_pid]->Cminus)
|
||||
Kr = dlsch->harq_processes[harq_pid]->Kminus;
|
||||
else
|
||||
Kr = dlsch->harq_processes[harq_pid]->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
encoder(dlsch->harq_processes[harq_pid]->c[r],
|
||||
Kr>>3,
|
||||
&dlsch->harq_processes[harq_pid]->d[r][96],
|
||||
(r==0) ? dlsch->harq_processes[harq_pid]->F : 0
|
||||
);
|
||||
dlsch->harq_processes[harq_pid]->RTC[r] =
|
||||
sub_block_interleaving_turbo(4+(Kr_bytes*8),
|
||||
&dlsch->harq_processes[harq_pid]->d[r][96],
|
||||
dlsch->harq_processes[harq_pid]->w[r]);
|
||||
}
|
||||
}
|
||||
|
||||
// Fill in the "e"-sequence from 36-212, V8.6 2009-03, p. 16-17 (for each "e") and concatenate the
|
||||
// outputs for each code segment, see Section 5.1.5 p.20
|
||||
|
||||
for (r=0,r_offset=0; r<(dlsch->harq_processes[harq_pid]->C/(total_worker+1))*(current_worker+1); r++) {
|
||||
if(r<(dlsch->harq_processes[harq_pid]->C/(total_worker+1))*(current_worker)) {
|
||||
int Nl=dlsch->harq_processes[harq_pid]->Nl;
|
||||
int Qm=dlsch->harq_processes[harq_pid]->Qm;
|
||||
int C = dlsch->harq_processes[harq_pid]->C;
|
||||
int Gp = G/Nl/Qm;
|
||||
int GpmodC = Gp%C;
|
||||
|
||||
if (r < (C-(GpmodC)))
|
||||
r_offset += Nl*Qm * (Gp/C);
|
||||
else
|
||||
r_offset += Nl*Qm * ((GpmodC==0?0:1) + (Gp/C));
|
||||
} else {
|
||||
r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r],
|
||||
G, //G
|
||||
dlsch->harq_processes[harq_pid]->w[r],
|
||||
dlsch->harq_processes[harq_pid]->e+r_offset,
|
||||
dlsch->harq_processes[harq_pid]->C, // C
|
||||
dlsch->Nsoft, // Nsoft,
|
||||
dlsch->Mdlharq,
|
||||
dlsch->Kmimo,
|
||||
dlsch->harq_processes[harq_pid]->rvidx,
|
||||
dlsch->harq_processes[harq_pid]->Qm,
|
||||
dlsch->harq_processes[harq_pid]->Nl,
|
||||
r,
|
||||
nb_rb);
|
||||
// m); // r
|
||||
}
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING_W, VCD_FUNCTION_OUT);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
void *te_thread(void *param) {
|
||||
te_params *tep = (te_params *)param;
|
||||
|
||||
//wait_sync("te_thread");
|
||||
|
||||
while (!oai_exit) {
|
||||
if (wait_on_condition(&tep->mutex_te,&tep->cond_te,&tep->instance_cnt_te,"te thread")<0) break;
|
||||
|
||||
if(oai_exit) break;
|
||||
|
||||
dlsch_encoding_2threads0(tep);
|
||||
|
||||
if (release_thread(&tep->mutex_te,&tep->instance_cnt_te,"te thread")<0) break;
|
||||
|
||||
if (pthread_cond_signal(&tep->cond_te) != 0) {
|
||||
printf("[eNB] ERROR pthread_cond_signal for te thread exit\n");
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/*if(opp_enabled == 1 && te_wakeup_stats0->p_time>50*3000){
|
||||
print_meas_now(te_wakeup_stats0,"coding_wakeup",stderr);
|
||||
printf("te_thread0 delay for waking up in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
|
||||
}*/
|
||||
}
|
||||
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
|
||||
int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
|
||||
unsigned char *a,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
time_stats_t *rm_stats,
|
||||
time_stats_t *te_stats,
|
||||
time_stats_t *te_wait_stats,
|
||||
time_stats_t *te_main_stats,
|
||||
time_stats_t *te_wakeup_stats0,
|
||||
time_stats_t *te_wakeup_stats1,
|
||||
time_stats_t *i_stats,
|
||||
int worker_num) {
|
||||
//start_meas(&eNB->dlsch_turbo_encoding_preperation_stats);
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
unsigned int G;
|
||||
unsigned int crc=1;
|
||||
unsigned char harq_pid = dlsch->harq_ids[frame%2][subframe];
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch->Mdlharq)) {
|
||||
LOG_E(PHY,"dlsch_encoding_2threads illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
unsigned short nb_rb = dlsch->harq_processes[harq_pid]->nb_rb;
|
||||
unsigned int A;
|
||||
unsigned char mod_order;
|
||||
unsigned int Kr=0,Kr_bytes,r,r_offset=0;
|
||||
// unsigned short m=dlsch->harq_processes[harq_pid]->mcs;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||
A = dlsch->harq_processes[harq_pid]->TBS; //6228
|
||||
mod_order = dlsch->harq_processes[harq_pid]->Qm;
|
||||
G = get_G(frame_parms,nb_rb,dlsch->harq_processes[harq_pid]->rb_alloc,mod_order,dlsch->harq_processes[harq_pid]->Nl,num_pdcch_symbols,frame,subframe,
|
||||
dlsch->harq_processes[harq_pid]->mimo_mode==TM7?7:0);
|
||||
|
||||
if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet
|
||||
start_meas(&eNB->dlsch_turbo_encoding_preperation_stats);
|
||||
// Add 24-bit crc (polynomial A) to payload
|
||||
crc = crc24a(a,
|
||||
A)>>8;
|
||||
stop_meas(&eNB->dlsch_turbo_encoding_preperation_stats);
|
||||
a[A>>3] = ((uint8_t *)&crc)[2];
|
||||
a[1+(A>>3)] = ((uint8_t *)&crc)[1];
|
||||
a[2+(A>>3)] = ((uint8_t *)&crc)[0];
|
||||
dlsch->harq_processes[harq_pid]->B = A+24;
|
||||
memcpy(dlsch->harq_processes[harq_pid]->b,a,(A/8)+4);
|
||||
//stop_meas(&eNB->dlsch_turbo_encoding_preperation_stats);
|
||||
start_meas(&eNB->dlsch_turbo_encoding_segmentation_stats);
|
||||
|
||||
if (lte_segmentation(dlsch->harq_processes[harq_pid]->b,
|
||||
dlsch->harq_processes[harq_pid]->c,
|
||||
dlsch->harq_processes[harq_pid]->B,
|
||||
&dlsch->harq_processes[harq_pid]->C,
|
||||
&dlsch->harq_processes[harq_pid]->Cplus,
|
||||
&dlsch->harq_processes[harq_pid]->Cminus,
|
||||
&dlsch->harq_processes[harq_pid]->Kplus,
|
||||
&dlsch->harq_processes[harq_pid]->Kminus,
|
||||
&dlsch->harq_processes[harq_pid]->F)<0)
|
||||
return(-1);
|
||||
|
||||
stop_meas(&eNB->dlsch_turbo_encoding_segmentation_stats);
|
||||
start_meas(&eNB->dlsch_turbo_encoding_signal_stats);
|
||||
|
||||
for(int i=0; i<worker_num; i++) {
|
||||
proc->tep[i].eNB = eNB;
|
||||
proc->tep[i].dlsch = dlsch;
|
||||
proc->tep[i].G = G;
|
||||
proc->tep[i].harq_pid = harq_pid;
|
||||
proc->tep[i].total_worker = worker_num;
|
||||
proc->tep[i].current_worker = i;
|
||||
pthread_mutex_lock( &proc->tep[i].mutex_te );
|
||||
|
||||
if (proc->tep[i].instance_cnt_te==0) {
|
||||
printf("[eNB] TE thread busy\n");
|
||||
exit_fun("TE thread busy");
|
||||
pthread_mutex_unlock( &proc->tep[i].mutex_te );
|
||||
return(-1);
|
||||
}
|
||||
|
||||
++proc->tep[i].instance_cnt_te;
|
||||
|
||||
// wakeup worker to do segments
|
||||
if (pthread_cond_signal(&proc->tep[i].cond_te) != 0) {
|
||||
printf("[eNB] ERROR pthread_cond_signal for te thread %d exit\n",i);
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
return (-1);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock( &proc->tep[i].mutex_te );
|
||||
}
|
||||
|
||||
stop_meas(&eNB->dlsch_turbo_encoding_signal_stats);
|
||||
start_meas(te_main_stats);
|
||||
|
||||
for (r=(dlsch->harq_processes[harq_pid]->C/(worker_num+1))*worker_num; r<dlsch->harq_processes[harq_pid]->C; r++) {
|
||||
if (r<dlsch->harq_processes[harq_pid]->Cminus)
|
||||
Kr = dlsch->harq_processes[harq_pid]->Kminus;
|
||||
else
|
||||
Kr = dlsch->harq_processes[harq_pid]->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
start_meas(te_stats);
|
||||
encoder(dlsch->harq_processes[harq_pid]->c[r],
|
||||
Kr>>3,
|
||||
&dlsch->harq_processes[harq_pid]->d[r][96],
|
||||
(r==0) ? dlsch->harq_processes[harq_pid]->F : 0
|
||||
);
|
||||
stop_meas(te_stats);
|
||||
start_meas(i_stats);
|
||||
dlsch->harq_processes[harq_pid]->RTC[r] =
|
||||
sub_block_interleaving_turbo(4+(Kr_bytes*8),
|
||||
&dlsch->harq_processes[harq_pid]->d[r][96],
|
||||
dlsch->harq_processes[harq_pid]->w[r]);
|
||||
stop_meas(i_stats);
|
||||
}
|
||||
} else {
|
||||
for(int i=0; i<worker_num; i++) {
|
||||
proc->tep[i].eNB = eNB;
|
||||
proc->tep[i].dlsch = dlsch;
|
||||
proc->tep[i].G = G;
|
||||
proc->tep[i].total_worker = worker_num;
|
||||
proc->tep[i].current_worker = i;
|
||||
|
||||
if (pthread_cond_signal(&proc->tep[i].cond_te) != 0) {
|
||||
printf("[eNB] ERROR pthread_cond_signal for te thread exit\n");
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
return (-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Fill in the "e"-sequence from 36-212, V8.6 2009-03, p. 16-17 (for each "e") and concatenate the
|
||||
// outputs for each code segment, see Section 5.1.5 p.20
|
||||
for (r=0,r_offset=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
|
||||
// get information for E for the segments that are handled by the worker thread
|
||||
if (r<(dlsch->harq_processes[harq_pid]->C/(worker_num+1))*worker_num) {
|
||||
int Nl=dlsch->harq_processes[harq_pid]->Nl;
|
||||
int Qm=dlsch->harq_processes[harq_pid]->Qm;
|
||||
int C = dlsch->harq_processes[harq_pid]->C;
|
||||
int Gp = G/Nl/Qm;
|
||||
int GpmodC = Gp%C;
|
||||
|
||||
if (r < (C-(GpmodC)))
|
||||
r_offset += Nl*Qm * (Gp/C);
|
||||
else
|
||||
r_offset += Nl*Qm * ((GpmodC==0?0:1) + (Gp/C));
|
||||
} else {
|
||||
start_meas(rm_stats);
|
||||
r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r],
|
||||
G, //G
|
||||
dlsch->harq_processes[harq_pid]->w[r],
|
||||
dlsch->harq_processes[harq_pid]->e+r_offset,
|
||||
dlsch->harq_processes[harq_pid]->C, // C
|
||||
dlsch->Nsoft, // Nsoft,
|
||||
dlsch->Mdlharq,
|
||||
dlsch->Kmimo,
|
||||
dlsch->harq_processes[harq_pid]->rvidx,
|
||||
dlsch->harq_processes[harq_pid]->Qm,
|
||||
dlsch->harq_processes[harq_pid]->Nl,
|
||||
r,
|
||||
nb_rb);
|
||||
// m); // r
|
||||
stop_meas(rm_stats);
|
||||
}
|
||||
}
|
||||
|
||||
stop_meas(te_main_stats);
|
||||
start_meas(te_wait_stats);
|
||||
|
||||
if(worker_num == 1) {
|
||||
wait_on_busy_condition(&proc->tep[0].mutex_te,&proc->tep[0].cond_te,&proc->tep[0].instance_cnt_te,"te thread 0");
|
||||
} else if(worker_num == 2) {
|
||||
wait_on_busy_condition(&proc->tep[0].mutex_te,&proc->tep[0].cond_te,&proc->tep[0].instance_cnt_te,"te thread 0");
|
||||
wait_on_busy_condition(&proc->tep[1].mutex_te,&proc->tep[1].cond_te,&proc->tep[1].instance_cnt_te,"te thread 1");
|
||||
} else {
|
||||
wait_on_busy_condition(&proc->tep[0].mutex_te,&proc->tep[0].cond_te,&proc->tep[0].instance_cnt_te,"te thread 0");
|
||||
wait_on_busy_condition(&proc->tep[1].mutex_te,&proc->tep[1].cond_te,&proc->tep[1].instance_cnt_te,"te thread 1");
|
||||
wait_on_busy_condition(&proc->tep[2].mutex_te,&proc->tep[2].cond_te,&proc->tep[2].instance_cnt_te,"te thread 2");
|
||||
}
|
||||
|
||||
stop_meas(te_wait_stats);
|
||||
/*if(opp_enabled == 1 && te_wait_stats->p_time>100*3000){
|
||||
print_meas_now(te_wait_stats,"coding_wait",stderr);
|
||||
printf("coding delay in wait on codition in frame_rx: %d \n",proc->frame_rx);
|
||||
}*/
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
int dlsch_encoding_all(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
unsigned char *a,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
@@ -568,108 +259,72 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
|
||||
time_stats_t *te_wakeup_stats0,
|
||||
time_stats_t *te_wakeup_stats1,
|
||||
time_stats_t *i_stats) {
|
||||
int encoding_return = 0;
|
||||
unsigned int L,C,B;
|
||||
uint8_t harq_pid = dlsch->harq_ids[frame%2][subframe];
|
||||
if(harq_pid >= dlsch->Mdlharq) {
|
||||
LOG_E(PHY,"dlsch_encoding_all illegal harq_pid %d\n", harq_pid);
|
||||
return(-1);
|
||||
}
|
||||
B = dlsch->harq_processes[harq_pid]->B;
|
||||
|
||||
LOG_D(PHY,"B %d, harq_pid %d\n",
|
||||
dlsch->harq_processes[harq_pid]->B,
|
||||
dlsch->harq_ids[frame%2][subframe]);
|
||||
|
||||
LOG_D(PHY,"B %d, harq_pid %d\n",B,dlsch->harq_ids[frame%2][subframe]);
|
||||
return dlsch_encoding(eNB,
|
||||
proc,
|
||||
a,
|
||||
num_pdcch_symbols,
|
||||
dlsch,
|
||||
frame,
|
||||
subframe,
|
||||
rm_stats,
|
||||
te_stats,
|
||||
i_stats);
|
||||
|
||||
if(B<=6144) {
|
||||
L=0;
|
||||
C=1;
|
||||
} else {
|
||||
L=24;
|
||||
C = B/(6144-L);
|
||||
|
||||
if((6144-L)*C < B) {
|
||||
C = C+1;
|
||||
}
|
||||
}
|
||||
|
||||
if(get_thread_worker_conf() == WORKER_ENABLE) {
|
||||
if(C >= 8) { //one main three worker
|
||||
encoding_return =
|
||||
dlsch_encoding_2threads(eNB,
|
||||
a,
|
||||
num_pdcch_symbols,
|
||||
dlsch,
|
||||
frame,
|
||||
subframe,
|
||||
rm_stats,
|
||||
te_stats,
|
||||
te_wait_stats,
|
||||
te_main_stats,
|
||||
te_wakeup_stats0,
|
||||
te_wakeup_stats1,
|
||||
i_stats,
|
||||
3);
|
||||
} else if(C >= 6) { //one main two worker
|
||||
encoding_return =
|
||||
dlsch_encoding_2threads(eNB,
|
||||
a,
|
||||
num_pdcch_symbols,
|
||||
dlsch,
|
||||
frame,
|
||||
subframe,
|
||||
rm_stats,
|
||||
te_stats,
|
||||
te_wait_stats,
|
||||
te_main_stats,
|
||||
te_wakeup_stats0,
|
||||
te_wakeup_stats1,
|
||||
i_stats,
|
||||
2);
|
||||
} else if(C >= 4) { //one main one worker
|
||||
encoding_return =
|
||||
dlsch_encoding_2threads(eNB,
|
||||
a,
|
||||
num_pdcch_symbols,
|
||||
dlsch,
|
||||
frame,
|
||||
subframe,
|
||||
rm_stats,
|
||||
te_stats,
|
||||
te_wait_stats,
|
||||
te_main_stats,
|
||||
te_wakeup_stats0,
|
||||
te_wakeup_stats1,
|
||||
i_stats,
|
||||
1);
|
||||
} else {
|
||||
encoding_return =
|
||||
dlsch_encoding(eNB,
|
||||
a,
|
||||
num_pdcch_symbols,
|
||||
dlsch,
|
||||
frame,
|
||||
subframe,
|
||||
rm_stats,
|
||||
te_stats,
|
||||
i_stats);
|
||||
}
|
||||
} else {
|
||||
encoding_return =
|
||||
dlsch_encoding(eNB,
|
||||
a,
|
||||
num_pdcch_symbols,
|
||||
dlsch,
|
||||
frame,
|
||||
subframe,
|
||||
rm_stats,
|
||||
te_stats,
|
||||
i_stats);
|
||||
}
|
||||
|
||||
return encoding_return;
|
||||
}
|
||||
|
||||
static void TPencode(void * arg) {
|
||||
turboEncode_t * rdata=(turboEncode_t *) arg;
|
||||
unsigned char harq_pid = rdata->harq_pid;
|
||||
LTE_DL_eNB_HARQ_t *hadlsch=rdata->dlsch->harq_processes[harq_pid];
|
||||
|
||||
if ( rdata-> round == 0) {
|
||||
uint8_t tmp[96+12+3+3*6144];
|
||||
memset(tmp,LTE_NULL, TURBO_SIMD_SOFTBITS);
|
||||
start_meas(rdata->te_stats);
|
||||
encoder(rdata->input,
|
||||
rdata->Kr_bytes,
|
||||
tmp+96,//&dlsch->harq_processes[harq_pid]->d[r][96],
|
||||
rdata->filler);
|
||||
stop_meas(rdata->te_stats);
|
||||
start_meas(rdata->i_stats);
|
||||
hadlsch->RTC[rdata->r] =
|
||||
sub_block_interleaving_turbo(4+(rdata->Kr_bytes*8),
|
||||
tmp+96,
|
||||
hadlsch->w[rdata->r]);
|
||||
stop_meas(rdata->i_stats);
|
||||
}
|
||||
|
||||
// Fill in the "e"-sequence from 36-212, V8.6 2009-03, p. 16-17 (for each "e") and concatenate the
|
||||
// outputs for each code segment, see Section 5.1.5 p.20
|
||||
start_meas(rdata->rm_stats);
|
||||
lte_rate_matching_turbo(hadlsch->RTC[rdata->r],
|
||||
rdata->G, //G
|
||||
hadlsch->w[rdata->r],
|
||||
hadlsch->eDL+rdata->r_offset,
|
||||
hadlsch->C, // C
|
||||
rdata->dlsch->Nsoft, // Nsoft,
|
||||
rdata->dlsch->Mdlharq,
|
||||
rdata->dlsch->Kmimo,
|
||||
hadlsch->rvidx,
|
||||
hadlsch->Qm,
|
||||
hadlsch->Nl,
|
||||
rdata->r,
|
||||
hadlsch->nb_rb);
|
||||
stop_meas(rdata->rm_stats);
|
||||
}
|
||||
|
||||
int dlsch_encoding(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
unsigned char *a,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
@@ -678,8 +333,6 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
|
||||
time_stats_t *rm_stats,
|
||||
time_stats_t *te_stats,
|
||||
time_stats_t *i_stats) {
|
||||
unsigned int G;
|
||||
unsigned int crc=1;
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
|
||||
unsigned char harq_pid = dlsch->harq_ids[frame%2][subframe];
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch->Mdlharq)) {
|
||||
@@ -687,135 +340,88 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
|
||||
return(-1);
|
||||
}
|
||||
|
||||
unsigned short nb_rb = dlsch->harq_processes[harq_pid]->nb_rb;
|
||||
unsigned int A;
|
||||
unsigned char mod_order;
|
||||
unsigned int Kr=0,Kr_bytes,r,r_offset=0;
|
||||
// unsigned short m=dlsch->harq_processes[harq_pid]->mcs;
|
||||
LTE_DL_eNB_HARQ_t *hadlsch=dlsch->harq_processes[harq_pid];
|
||||
uint8_t beamforming_mode=0;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||
A = dlsch->harq_processes[harq_pid]->TBS; //6228
|
||||
// printf("Encoder: A: %d\n",A);
|
||||
mod_order = dlsch->harq_processes[harq_pid]->Qm;
|
||||
|
||||
if(dlsch->harq_processes[harq_pid]->mimo_mode == TM7)
|
||||
if(hadlsch->mimo_mode == TM7)
|
||||
beamforming_mode = 7;
|
||||
else if(dlsch->harq_processes[harq_pid]->mimo_mode == TM8)
|
||||
else if(hadlsch->mimo_mode == TM8)
|
||||
beamforming_mode = 8;
|
||||
else if(dlsch->harq_processes[harq_pid]->mimo_mode == TM9_10)
|
||||
else if(hadlsch->mimo_mode == TM9_10)
|
||||
beamforming_mode = 9;
|
||||
|
||||
G = get_G(frame_parms,nb_rb,dlsch->harq_processes[harq_pid]->rb_alloc,mod_order,dlsch->harq_processes[harq_pid]->Nl,num_pdcch_symbols,frame,subframe,beamforming_mode);
|
||||
unsigned int G = get_G(frame_parms,hadlsch->nb_rb,
|
||||
hadlsch->rb_alloc,
|
||||
hadlsch->Qm, // mod order
|
||||
hadlsch->Nl,
|
||||
num_pdcch_symbols,
|
||||
frame,subframe,beamforming_mode);
|
||||
|
||||
// if (dlsch->harq_processes[harq_pid]->Ndi == 1) { // this is a new packet
|
||||
if (dlsch->harq_processes[harq_pid]->round == 0) { // this is a new packet
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
printf("encoding thinks this is a new packet for harq_pid %d (%p), A %u \n",harq_pid,dlsch,A);
|
||||
#endif
|
||||
/*
|
||||
int i;
|
||||
printf("dlsch (tx): \n");
|
||||
for (i=0;i<(A>>3);i++)
|
||||
printf("%02x.",a[i]);
|
||||
printf("\n");
|
||||
*/
|
||||
proc->nbEncode=0;
|
||||
|
||||
// if (hadlsch->Ndi == 1) { // this is a new packet
|
||||
if (hadlsch->round == 0) { // this is a new packet
|
||||
// Add 24-bit crc (polynomial A) to payload
|
||||
crc = crc24a(a,
|
||||
unsigned int A=hadlsch->TBS; //6228;
|
||||
unsigned int crc = crc24a(a,
|
||||
A)>>8;
|
||||
a[A>>3] = ((uint8_t *)&crc)[2];
|
||||
a[1+(A>>3)] = ((uint8_t *)&crc)[1];
|
||||
a[2+(A>>3)] = ((uint8_t *)&crc)[0];
|
||||
// printf("CRC %x (A %d)\n",crc,A);
|
||||
dlsch->harq_processes[harq_pid]->B = A+24;
|
||||
// dlsch->harq_processes[harq_pid]->b = a;
|
||||
memcpy(dlsch->harq_processes[harq_pid]->b,a,(A/8)+4);
|
||||
|
||||
if (lte_segmentation(dlsch->harq_processes[harq_pid]->b,
|
||||
dlsch->harq_processes[harq_pid]->c,
|
||||
dlsch->harq_processes[harq_pid]->B,
|
||||
&dlsch->harq_processes[harq_pid]->C,
|
||||
&dlsch->harq_processes[harq_pid]->Cplus,
|
||||
&dlsch->harq_processes[harq_pid]->Cminus,
|
||||
&dlsch->harq_processes[harq_pid]->Kplus,
|
||||
&dlsch->harq_processes[harq_pid]->Kminus,
|
||||
&dlsch->harq_processes[harq_pid]->F)<0)
|
||||
hadlsch->B = A+24;
|
||||
// hadlsch->b = a;
|
||||
memcpy(hadlsch->b,a,(A/8)+4);
|
||||
|
||||
if (lte_segmentation(hadlsch->b,
|
||||
hadlsch->c,
|
||||
hadlsch->B,
|
||||
&hadlsch->C,
|
||||
&hadlsch->Cplus,
|
||||
&hadlsch->Cminus,
|
||||
&hadlsch->Kplus,
|
||||
&hadlsch->Kminus,
|
||||
&hadlsch->F)<0)
|
||||
return(-1);
|
||||
|
||||
for (r=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
|
||||
if (r<dlsch->harq_processes[harq_pid]->Cminus)
|
||||
Kr = dlsch->harq_processes[harq_pid]->Kminus;
|
||||
else
|
||||
Kr = dlsch->harq_processes[harq_pid]->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
printf("Generating Code Segment %u (%u bits)\n",r,Kr);
|
||||
// generate codewords
|
||||
printf("bits_per_codeword (Kr)= %u, A %u\n",Kr,A);
|
||||
printf("N_RB = %d\n",nb_rb);
|
||||
printf("Ncp %d\n",frame_parms->Ncp);
|
||||
printf("mod_order %d\n",mod_order);
|
||||
#endif
|
||||
start_meas(te_stats);
|
||||
encoder(dlsch->harq_processes[harq_pid]->c[r],
|
||||
Kr>>3,
|
||||
&dlsch->harq_processes[harq_pid]->d[r][96],
|
||||
(r==0) ? dlsch->harq_processes[harq_pid]->F : 0
|
||||
);
|
||||
stop_meas(te_stats);
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
|
||||
if (r==0)
|
||||
LOG_M("enc_output0.m","enc0",&dlsch->harq_processes[harq_pid]->d[r][96],(3*8*Kr_bytes)+12,1,4);
|
||||
|
||||
#endif
|
||||
start_meas(i_stats);
|
||||
dlsch->harq_processes[harq_pid]->RTC[r] =
|
||||
sub_block_interleaving_turbo(4+(Kr_bytes*8),
|
||||
&dlsch->harq_processes[harq_pid]->d[r][96],
|
||||
dlsch->harq_processes[harq_pid]->w[r]);
|
||||
stop_meas(i_stats);
|
||||
}
|
||||
|
||||
for (int r=0, r_offset=0; r<hadlsch->C; r++) {
|
||||
|
||||
union turboReqUnion id= {.s={dlsch->rnti,frame,subframe,r,0}};
|
||||
notifiedFIFO_elt_t *req=newNotifiedFIFO_elt(sizeof(turboEncode_t), id.p, proc->respEncode, TPencode);
|
||||
turboEncode_t * rdata=(turboEncode_t *) NotifiedFifoData(req);
|
||||
rdata->input=hadlsch->c[r];
|
||||
rdata->Kr_bytes= ( r<hadlsch->Cminus ? hadlsch->Kminus : hadlsch->Kplus) >>3;
|
||||
rdata->filler=(r==0) ? hadlsch->F : 0;
|
||||
rdata->r=r;
|
||||
rdata->harq_pid=harq_pid;
|
||||
rdata->dlsch=dlsch;
|
||||
rdata->rm_stats=rm_stats;
|
||||
rdata->te_stats=te_stats;
|
||||
rdata->i_stats=i_stats;
|
||||
rdata->round=hadlsch->round;
|
||||
rdata->r_offset=r_offset;
|
||||
rdata->G=G;
|
||||
|
||||
if ( proc->threadPool->activated ) {
|
||||
pushTpool(proc->threadPool,req);
|
||||
proc->nbEncode++;
|
||||
} else {
|
||||
TPencode(rdata);
|
||||
delNotifiedFIFO_elt(req);
|
||||
}
|
||||
|
||||
int Qm=hadlsch->Qm;
|
||||
int C=hadlsch->C;
|
||||
int Nl=hadlsch->Nl;
|
||||
int Gp = G/Nl/Qm;
|
||||
int GpmodC = Gp%C;
|
||||
if (r < (C-(GpmodC)))
|
||||
r_offset += Nl*Qm * (Gp/C);
|
||||
else
|
||||
r_offset += Nl*Qm * ((GpmodC==0?0:1) + (Gp/C));
|
||||
}
|
||||
|
||||
// Fill in the "e"-sequence from 36-212, V8.6 2009-03, p. 16-17 (for each "e") and concatenate the
|
||||
// outputs for each code segment, see Section 5.1.5 p.20
|
||||
|
||||
for (r=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
printf("Rate Matching, Code segment %u (coded bits (G) %u,unpunctured/repeated bits per code segment %u,mod_order %d, nb_rb %d)...\n",
|
||||
r,
|
||||
G,
|
||||
Kr*3,
|
||||
mod_order,nb_rb);
|
||||
#endif
|
||||
start_meas(rm_stats);
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
printf("rvidx in encoding = %d\n", dlsch->harq_processes[harq_pid]->rvidx);
|
||||
#endif
|
||||
r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r],
|
||||
G, //G
|
||||
dlsch->harq_processes[harq_pid]->w[r],
|
||||
dlsch->harq_processes[harq_pid]->e+r_offset,
|
||||
dlsch->harq_processes[harq_pid]->C, // C
|
||||
dlsch->Nsoft, // Nsoft,
|
||||
dlsch->Mdlharq,
|
||||
dlsch->Kmimo,
|
||||
dlsch->harq_processes[harq_pid]->rvidx,
|
||||
dlsch->harq_processes[harq_pid]->Qm,
|
||||
dlsch->harq_processes[harq_pid]->Nl,
|
||||
r,
|
||||
nb_rb);
|
||||
// m); // r
|
||||
stop_meas(rm_stats);
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
|
||||
if (r==dlsch->harq_processes[harq_pid]->C-1)
|
||||
LOG_M("enc_output.m","enc",dlsch->harq_processes[harq_pid]->e,r_offset,1,4);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_OUT);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
{
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms;
|
||||
uint8_t *x0 = dlsch0_harq->e;
|
||||
uint8_t *x0 = dlsch0_harq->eDL;
|
||||
uint32_t qpsk_table_offset_re = 0;
|
||||
uint32_t qpsk_table_offset_im = 0;
|
||||
|
||||
@@ -248,7 +248,7 @@ int allocate_REs_in_RB_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_eNB->frame_parms;
|
||||
|
||||
uint8_t *x0 = dlsch0_harq->e;
|
||||
uint8_t *x0 = dlsch0_harq->eDL;
|
||||
uint32_t qpsk_table_offset_re = 0;
|
||||
uint32_t qpsk_table_offset_im = 0;
|
||||
|
||||
@@ -343,7 +343,7 @@ int allocate_REs_in_RB_no_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
{
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms;
|
||||
uint8_t *x0 = dlsch0_harq->e;
|
||||
uint8_t *x0 = dlsch0_harq->eDL;
|
||||
uint32_t qam16_table_offset_re = 0;
|
||||
uint32_t qam16_table_offset_im = 0;
|
||||
|
||||
@@ -439,7 +439,7 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_eNB->frame_parms;
|
||||
|
||||
uint8_t *x0 = dlsch0_harq->e;
|
||||
uint8_t *x0 = dlsch0_harq->eDL;
|
||||
uint32_t qam16_table_offset_re = 0;
|
||||
uint32_t qam16_table_offset_im = 0;
|
||||
|
||||
@@ -542,7 +542,7 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms;
|
||||
|
||||
uint8_t *x0 = dlsch0_harq->e;
|
||||
uint8_t *x0 = dlsch0_harq->eDL;
|
||||
uint32_t qam64_table_offset_re = 0;
|
||||
uint32_t qam64_table_offset_im = 0;
|
||||
|
||||
@@ -699,7 +699,7 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_eNB->frame_parms;
|
||||
|
||||
uint8_t *x0 = dlsch0_harq->e;
|
||||
uint8_t *x0 = dlsch0_harq->eDL;
|
||||
uint32_t qam64_table_offset_re = 0;
|
||||
uint32_t qam64_table_offset_im = 0;
|
||||
|
||||
@@ -866,12 +866,12 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
||||
|
||||
if ((dlsch0_harq != NULL) && (dlsch1_harq != NULL)) { //this is for TM3, TM4
|
||||
|
||||
x0 = dlsch0_harq->e;
|
||||
x0 = dlsch0_harq->eDL;
|
||||
mimo_mode = dlsch0_harq->mimo_mode;
|
||||
first_layer0 = dlsch0_harq->first_layer;
|
||||
Nlayers0 = dlsch0_harq->Nlayers;
|
||||
mod_order0 = dlsch0_harq->Qm;
|
||||
x1 = dlsch1_harq->e;
|
||||
x1 = dlsch1_harq->eDL;
|
||||
// Fill these in later for TM8-10
|
||||
// Nlayers1 = dlsch1_harq->Nlayers;
|
||||
// first_layer1 = dlsch1_harq->first_layer;
|
||||
@@ -879,7 +879,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
||||
|
||||
} else if ((dlsch0_harq != NULL) && (dlsch1_harq == NULL)){ //This is for SIS0 TM1, TM6, etc
|
||||
|
||||
x0 = dlsch0_harq->e;
|
||||
x0 = dlsch0_harq->eDL;
|
||||
mimo_mode = dlsch0_harq->mimo_mode;
|
||||
first_layer0 = dlsch0_harq->first_layer;
|
||||
Nlayers0 = dlsch0_harq->Nlayers;
|
||||
@@ -887,7 +887,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
||||
|
||||
} else if ((dlsch0_harq == NULL) && (dlsch1_harq != NULL)){ // This is for TM4 retransmission
|
||||
|
||||
x0 = dlsch1_harq->e;
|
||||
x0 = dlsch1_harq->eDL;
|
||||
mimo_mode = dlsch1_harq->mimo_mode;
|
||||
first_layer0 = dlsch1_harq->first_layer;
|
||||
Nlayers0 = dlsch1_harq->Nlayers;
|
||||
@@ -2692,7 +2692,7 @@ int dlsch_modulation_SIC(int32_t **sic_buffer,
|
||||
LTE_DL_eNB_HARQ_t *dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
||||
uint32_t i,jj,re_allocated=0;
|
||||
uint8_t mod_order0 = dlsch0_harq->Qm;
|
||||
uint8_t *x0 = dlsch0_harq->e;
|
||||
uint8_t *x0 = dlsch0_harq->eDL;
|
||||
uint8_t qam64_table_offset_re = 0;
|
||||
uint8_t qam64_table_offset_im = 0;
|
||||
uint8_t qam16_table_offset_re = 0;
|
||||
@@ -2883,7 +2883,7 @@ int mch_modulation(int32_t **txdataF,
|
||||
&jj,
|
||||
re_offset,
|
||||
symbol_offset,
|
||||
dlsch->harq_processes[0]->e,
|
||||
dlsch->harq_processes[0]->eDL,
|
||||
l,
|
||||
mod_order,
|
||||
amp,
|
||||
|
||||
@@ -52,7 +52,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int n;
|
||||
// uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e;
|
||||
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->eDL;
|
||||
uint8_t *e=dlsch_e;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
|
||||
// Rule for accumulation of subframes for BL/CE UEs
|
||||
|
||||
@@ -61,7 +61,8 @@ typedef struct IF5_mobipass_header IF5_mobipass_header_t;
|
||||
|
||||
void send_IF5(RU_t *, openair0_timestamp, int, uint8_t*, uint16_t);
|
||||
|
||||
void recv_IF5(RU_t *, openair0_timestamp*, int, uint16_t);
|
||||
void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int subframe, uint16_t packet_type);
|
||||
|
||||
|
||||
void malloc_IF5_buffer(RU_t *ru);
|
||||
|
||||
|
||||
@@ -94,6 +94,35 @@ unsigned char I_TBS2I_MCS(unsigned char I_TBS) {
|
||||
return I_MCS;
|
||||
}
|
||||
|
||||
uint16_t find_nb_rb_DL(uint8_t mcs, uint32_t bytes, uint16_t nb_rb_max, uint16_t rb_gran) {
|
||||
if (bytes == 0 || mcs > 28 || nb_rb_max == 0)
|
||||
return 0;
|
||||
const uint32_t bits = bytes << 3;
|
||||
const unsigned char I_TBS = get_I_TBS(mcs);
|
||||
|
||||
uint32_t TBS = TBStable[I_TBS][nb_rb_max - 1];
|
||||
if (bits >= TBS) // is nb_rb_max too small?
|
||||
return nb_rb_max;
|
||||
|
||||
TBS = TBStable[I_TBS][rb_gran - 1];
|
||||
if (bits <= TBS) // is rb_gran RB enough?
|
||||
return rb_gran;
|
||||
|
||||
nb_rb_max += nb_rb_max % rb_gran; // round up to full RBG
|
||||
uint16_t hi = nb_rb_max/rb_gran - 1;
|
||||
uint16_t lo = 0;
|
||||
uint16_t p = (hi + lo) / 2;
|
||||
for (; lo + 1 != hi; p = (hi + lo) / 2) {
|
||||
const uint16_t rbi = (p + 1) * rb_gran - 1; // convert "RBG" -> RB
|
||||
TBS = TBStable[I_TBS][rbi];
|
||||
if (bits <= TBS) // need less RBs
|
||||
hi = p;
|
||||
else // need more RBs
|
||||
lo = p;
|
||||
}
|
||||
return (hi + 1) * rb_gran;
|
||||
}
|
||||
|
||||
uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb) {
|
||||
uint32_t TBS;
|
||||
|
||||
|
||||
@@ -714,7 +714,7 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
|
||||
int32_t **txdataF = eNB->common_vars.txdataF;
|
||||
uint8_t Ngroup_PHICH,ngroup_PHICH,nseq_PHICH;
|
||||
uint8_t NSF_PHICH = 4;
|
||||
uint8_t pusch_subframe;
|
||||
uint8_t pusch_subframe=-1;
|
||||
uint8_t i;
|
||||
int subframe = proc->subframe_tx;
|
||||
phich_config_t *phich;
|
||||
|
||||
@@ -105,6 +105,7 @@ void generate_mch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,uint8_t *a)
|
||||
AssertFatal(eNB->dlsch_MCH->harq_processes[0]->pdu != NULL, "attempt to encode a NULL harq PDU\n");
|
||||
|
||||
AssertFatal(dlsch_encoding(eNB,
|
||||
proc,
|
||||
// a,
|
||||
eNB->dlsch_MCH->harq_processes[0]->pdu,
|
||||
1,
|
||||
|
||||
@@ -38,9 +38,13 @@
|
||||
#include "SCHED/sched_eNB.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "prach_extern.h"
|
||||
#include <openair1/PHY/LTE_TRANSPORT/transport_proto.h>
|
||||
#include <executables/split_headers.h>
|
||||
|
||||
void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
RU_t *ru,
|
||||
int frame_prach,
|
||||
int subframe,
|
||||
uint16_t *max_preamble,
|
||||
uint16_t *max_preamble_energy,
|
||||
uint16_t *max_preamble_delay,
|
||||
@@ -51,17 +55,14 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
uint8_t ce_level
|
||||
) {
|
||||
int i;
|
||||
LTE_DL_FRAME_PARMS *fp=NULL;
|
||||
lte_frame_type_t frame_type;
|
||||
uint16_t rootSequenceIndex;
|
||||
uint8_t prach_ConfigIndex;
|
||||
uint8_t Ncs_config;
|
||||
uint8_t restricted_set;
|
||||
uint8_t n_ra_prb;
|
||||
int subframe;
|
||||
int16_t *prachF=NULL;
|
||||
int16_t **rxsigF=NULL;
|
||||
int nb_rx=0;
|
||||
int16_t *prach2;
|
||||
uint8_t preamble_index;
|
||||
uint16_t NCS,NCS2;
|
||||
@@ -89,6 +90,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
int32_t **prach_ifftp=(int32_t **)NULL;
|
||||
int prach_ifft_cnt=0;
|
||||
|
||||
LTE_DL_FRAME_PARMS *fp;
|
||||
int nb_rx;
|
||||
if(eNB) {
|
||||
fp = &(eNB->frame_parms);
|
||||
nb_rx = fp->nb_antennas_rx;
|
||||
@@ -96,7 +99,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
fp = (ru->frame_parms);
|
||||
nb_rx = ru->nb_rx;
|
||||
}
|
||||
|
||||
|
||||
AssertFatal(fp!=NULL,"rx_prach called without valid RU or eNB descriptor\n");
|
||||
frame_type = fp->frame_type;
|
||||
|
||||
@@ -133,14 +136,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
if (eNB) {
|
||||
if (br_flag == 1) {
|
||||
prach_ifftp = eNB->prach_vars_br.prach_ifft[ce_level];
|
||||
subframe = eNB->proc.subframe_prach_br;
|
||||
prachF = eNB->prach_vars_br.prachF;
|
||||
rxsigF = eNB->prach_vars_br.rxsigF[ce_level];
|
||||
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,
|
||||
if (((frame_prach)&1023) < 20) LOG_I(PHY,
|
||||
"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
|
||||
br_flag,ce_level,eNB->proc.frame_prach,subframe,
|
||||
br_flag,ce_level,frame_prach,subframe,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
|
||||
prach_ConfigIndex,rootSequenceIndex,
|
||||
eNB->prach_vars_br.repetition_number[ce_level],
|
||||
@@ -148,30 +150,27 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
} else {
|
||||
prach_ifftp = eNB->prach_vars.prach_ifft[0];
|
||||
subframe = eNB->proc.subframe_prach;
|
||||
prachF = eNB->prach_vars.prachF;
|
||||
rxsigF = eNB->prach_vars.rxsigF[0];
|
||||
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,
|
||||
if (((frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (br_flag == 1) {
|
||||
subframe = ru->proc.subframe_prach_br;
|
||||
rxsigF = ru->prach_rxsigF_br[ce_level];
|
||||
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
|
||||
br_flag,ce_level,ru->proc.frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex);
|
||||
if (((frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
|
||||
br_flag,ce_level,frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex);
|
||||
}
|
||||
} else {
|
||||
subframe = ru->proc.subframe_prach;
|
||||
rxsigF = ru->prach_rxsigF;
|
||||
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
|
||||
if (((frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
|
||||
subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex);
|
||||
}
|
||||
}
|
||||
@@ -202,7 +201,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
if (prach[0]!= NULL) LOG_M("prach_rx","prach_rx",prach[0],fp->samples_per_tti,1,1);
|
||||
|
||||
LOG_I(PHY,"RU %d, br_flag %d ce_level %d frame %d subframe %d per_tti:%d prach:%p (energy %d) TA:%d %s rxdata:%p index:%d\n",
|
||||
ru->idx,br_flag,ce_level,ru->proc.frame_prach,subframe,fp->samples_per_tti,
|
||||
ru->idx,br_flag,ce_level,frame_prach,subframe,fp->samples_per_tti,
|
||||
prach[aa],dbEn0,ru->N_TA_offset,buffer,ru->common.rxdata[aa],
|
||||
(subframe*fp->samples_per_tti)-ru->N_TA_offset);
|
||||
}
|
||||
@@ -298,24 +297,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
switch (fp->N_RB_UL) {
|
||||
case 6:
|
||||
if (prach_fmt == 4) {
|
||||
dft256(prach2,rxsigF[aa],1);
|
||||
dft(DFT_256,prach2,rxsigF[aa],1);
|
||||
} else {
|
||||
dft1536(prach2,rxsigF[aa],1);
|
||||
dft(DFT_1536,prach2,rxsigF[aa],1);
|
||||
|
||||
if (prach_fmt>1)
|
||||
dft1536(prach2+3072,rxsigF[aa]+3072,1);
|
||||
dft(DFT_1536,prach2+3072,rxsigF[aa]+3072,1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (prach_fmt == 4) {
|
||||
dft256(prach2,rxsigF[aa],1);
|
||||
dft(DFT_256,prach2,rxsigF[aa],1);
|
||||
} else {
|
||||
dft3072(prach2,rxsigF[aa],1);
|
||||
dft(DFT_3072,prach2,rxsigF[aa],1);
|
||||
|
||||
if (prach_fmt>1)
|
||||
dft3072(prach2+6144,rxsigF[aa]+6144,1);
|
||||
dft(DFT_3072,prach2+6144,rxsigF[aa]+6144,1);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -323,13 +322,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
case 25:
|
||||
default:
|
||||
if (prach_fmt == 4) {
|
||||
dft1024(prach2,rxsigF[aa],1);
|
||||
dft(DFT_1024,prach2,rxsigF[aa],1);
|
||||
fft_size = 1024;
|
||||
} else {
|
||||
dft6144(prach2,rxsigF[aa],1);
|
||||
dft(DFT_6144,prach2,rxsigF[aa],1);
|
||||
|
||||
if (prach_fmt>1)
|
||||
dft6144(prach2+12288,rxsigF[aa]+12288,1);
|
||||
dft(DFT_6144,prach2+12288,rxsigF[aa]+12288,1);
|
||||
|
||||
fft_size = 6144;
|
||||
}
|
||||
@@ -338,24 +337,24 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
|
||||
case 50:
|
||||
if (prach_fmt == 4) {
|
||||
dft2048(prach2,rxsigF[aa],1);
|
||||
dft(DFT_2048,prach2,rxsigF[aa],1);
|
||||
} else {
|
||||
dft12288(prach2,rxsigF[aa],1);
|
||||
dft(DFT_12288,prach2,rxsigF[aa],1);
|
||||
|
||||
if (prach_fmt>1)
|
||||
dft12288(prach2+24576,rxsigF[aa]+24576,1);
|
||||
dft(DFT_12288,prach2+24576,rxsigF[aa]+24576,1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 75:
|
||||
if (prach_fmt == 4) {
|
||||
dft3072(prach2,rxsigF[aa],1);
|
||||
dft(DFT_3072,prach2,rxsigF[aa],1);
|
||||
} else {
|
||||
dft18432(prach2,rxsigF[aa],1);
|
||||
dft(DFT_18432,prach2,rxsigF[aa],1);
|
||||
|
||||
if (prach_fmt>1)
|
||||
dft18432(prach2+36864,rxsigF[aa]+36864,1);
|
||||
dft(DFT_18432,prach2+36864,rxsigF[aa]+36864,1);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -363,21 +362,21 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
case 100:
|
||||
if (fp->threequarter_fs==0) {
|
||||
if (prach_fmt == 4) {
|
||||
dft4096(prach2,rxsigF[aa],1);
|
||||
dft(DFT_4096,prach2,rxsigF[aa],1);
|
||||
} else {
|
||||
dft24576(prach2,rxsigF[aa],1);
|
||||
dft(DFT_24576,prach2,rxsigF[aa],1);
|
||||
|
||||
if (prach_fmt>1)
|
||||
dft24576(prach2+49152,rxsigF[aa]+49152,1);
|
||||
dft(DFT_24576,prach2+49152,rxsigF[aa]+49152,1);
|
||||
}
|
||||
} else {
|
||||
if (prach_fmt == 4) {
|
||||
dft3072(prach2,rxsigF[aa],1);
|
||||
dft(DFT_3072,prach2,rxsigF[aa],1);
|
||||
} else {
|
||||
dft18432(prach2,rxsigF[aa],1);
|
||||
dft(DFT_18432,prach2,rxsigF[aa],1);
|
||||
|
||||
if (prach_fmt>1)
|
||||
dft18432(prach2+36864,rxsigF[aa]+36864,1);
|
||||
dft(DFT_18432,prach2+36864,rxsigF[aa]+36864,1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -407,16 +406,16 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
if ((eNB==NULL) && ru->function == NGFI_RRU_IF4p5) {
|
||||
/// **** send_IF4 of rxsigF to RAU **** ///
|
||||
if (br_flag == 1)
|
||||
send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level);
|
||||
send_IF4p5(ru, frame_prach, subframe, IF4p5_PRACH+1+ce_level);
|
||||
else
|
||||
send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH);
|
||||
send_IF4p5(ru, frame_prach, subframe, IF4p5_PRACH);
|
||||
|
||||
return;
|
||||
} else if (eNB!=NULL) {
|
||||
if ( LOG_DEBUGFLAG(PRACH)) {
|
||||
int en = dB_fixed(signal_energy((int32_t *)&rxsigF[0][0],840));
|
||||
|
||||
if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
|
||||
if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,frame_prach,subframe,en);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,7 +456,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
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 : Trying preamble %d (br_flag %d)\n",ru->proc.frame_prach,subframe,preamble_index,br_flag);
|
||||
if (en>60) LOG_I(PHY,"frame %d, subframe %d : Trying preamble %d (br_flag %d)\n",frame_prach,subframe,preamble_index,br_flag);
|
||||
}
|
||||
|
||||
if (restricted_set == 0) {
|
||||
@@ -543,7 +542,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
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: offset %d, preamble shift %d (br_flag %d, en %d)\n",
|
||||
ru->proc.frame_prach,subframe,preamble_index,preamble_offset,preamble_shift,br_flag,en);
|
||||
frame_prach,subframe,preamble_index,preamble_offset,preamble_shift,br_flag,en);
|
||||
}
|
||||
|
||||
log2_ifft_size = 10;
|
||||
@@ -589,13 +588,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
// Now do IFFT of size 1024 (N_ZC=839) or 256 (N_ZC=139)
|
||||
if (N_ZC == 839) {
|
||||
log2_ifft_size = 10;
|
||||
idft1024(prachF,prach_ifft_tmp,1);
|
||||
idft(IDFT_1024,prachF,prach_ifft_tmp,1);
|
||||
|
||||
// compute energy and accumulate over receive antennas and repetitions for BR
|
||||
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)])>>9;
|
||||
} else {
|
||||
idft256(prachF,prach_ifft_tmp,1);
|
||||
idft(IDFT_256,prachF,prach_ifft_tmp,1);
|
||||
log2_ifft_size = 8;
|
||||
|
||||
// compute energy and accumulate over receive antennas and repetitions for BR
|
||||
@@ -618,7 +617,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
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: Checking for peak in time-domain (br_flag %d, en %d)\n",ru->proc.frame_prach,subframe,br_flag,en);
|
||||
if (en>60) LOG_I(PHY,"frame %d, subframe %d: Checking for peak in time-domain (br_flag %d, en %d)\n",frame_prach,subframe,br_flag,en);
|
||||
}
|
||||
|
||||
preamble_shift2 = ((preamble_shift==0) ? 0 : ((preamble_shift<<log2_ifft_size)/N_ZC));
|
||||
@@ -638,7 +637,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
|
||||
if ((en>60) && (br_flag==1))
|
||||
LOG_D(PHY,"frame %d, subframe %d : max_preamble_energy %d, max_preamble_delay %d, max_preamble %d (br_flag %d,ce_level %d, levdB %d, lev %d)\n",
|
||||
ru->proc.frame_prach,subframe,
|
||||
frame_prach,subframe,
|
||||
*max_preamble_energy,*max_preamble_delay,
|
||||
*max_preamble,br_flag,ce_level,levdB,lev);
|
||||
}
|
||||
@@ -694,8 +693,16 @@ void rx_prach(PHY_VARS_eNB *eNB,
|
||||
int i;
|
||||
int prach_mask=0;
|
||||
|
||||
int subframe;
|
||||
if (eNB)
|
||||
subframe= br_flag?eNB->proc.subframe_prach_br:eNB->proc.subframe_prach;
|
||||
else
|
||||
subframe= br_flag?ru->proc.subframe_prach_br:ru->proc.subframe_prach;
|
||||
|
||||
int frame_prach=eNB?eNB->proc.frame_prach: ru->proc.frame_prach;
|
||||
|
||||
if (br_flag == 0) {
|
||||
rx_prach0(eNB,ru,max_preamble,max_preamble_energy,max_preamble_delay,avg_preamble_energy,Nf,tdd_mapindex,0,0);
|
||||
rx_prach0(eNB,ru,frame_prach,subframe,max_preamble,max_preamble_energy,max_preamble_delay,avg_preamble_energy,Nf,tdd_mapindex,0,0);
|
||||
} else { // This is procedure for eMTC, basically handling the repetitions
|
||||
prach_mask = is_prach_subframe(&eNB->frame_parms,eNB->proc.frame_prach_br,eNB->proc.subframe_prach_br);
|
||||
|
||||
@@ -709,7 +716,7 @@ void rx_prach(PHY_VARS_eNB *eNB,
|
||||
// increment repetition number
|
||||
eNB->prach_vars_br.repetition_number[i]++;
|
||||
// do basic PRACH reception
|
||||
rx_prach0(eNB,ru,max_preamble,max_preamble_energy,max_preamble_delay,avg_preamble_energy,Nf,tdd_mapindex,1,i);
|
||||
rx_prach0(eNB,ru,frame_prach,subframe,max_preamble,max_preamble_energy,max_preamble_delay,avg_preamble_energy,Nf,tdd_mapindex,1,i);
|
||||
|
||||
// if last repetition, clear counter
|
||||
if (eNB->prach_vars_br.repetition_number[i] == eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[i]) {
|
||||
|
||||
@@ -180,7 +180,7 @@ uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[NB_ANTENNAS_RX
|
||||
uint16_t n3_pucch_array[NUMBER_OF_UE_MAX],
|
||||
uint8_t ncs_cell[20][7] ) {
|
||||
uint32_t aa, symNo, k, slotNo, sym, i, j;
|
||||
int16_t np, np_n, ip_ind;
|
||||
int16_t np, np_n, ip_ind=-1;
|
||||
//int16_t npucch_sf;
|
||||
int16_t calctmp[2];
|
||||
int16_t BsCshData[NB_ANTENNAS_RX][D_NSYM1SF][D_NSC1RB][2];
|
||||
|
||||
@@ -60,6 +60,8 @@ unsigned char get_I_TBS_UL(unsigned char I_MCS);
|
||||
@return Transport block size */
|
||||
uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb);
|
||||
|
||||
uint16_t find_nb_rb_DL(uint8_t mcs, uint32_t bytes, uint16_t nb_rb_max, uint16_t rb_gran);
|
||||
|
||||
/** \brief Compute Q (modulation order) based on uplink I_MCS. Implements table 7.1.7.1-1 from 36.213.
|
||||
@param I_MCS
|
||||
@param nb_rb
|
||||
|
||||
@@ -100,7 +100,7 @@ typedef struct {
|
||||
/// start symbold of pdsch
|
||||
uint8_t pdsch_start;
|
||||
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
|
||||
uint8_t e[MAX_NUM_CHANNEL_BITS] __attribute__((aligned(32)));
|
||||
uint8_t eDL[MAX_NUM_CHANNEL_BITS] __attribute__((aligned(32)));
|
||||
/// Turbo-code outputs (36-212 V8.6 2009-03, p.12
|
||||
uint8_t *d[MAX_NUM_DLSCH_SEGMENTS];//[(96+3+(3*6144))];
|
||||
/// Sub-block interleaver outputs (36-212 V8.6 2009-03, p.16-17)
|
||||
@@ -261,12 +261,13 @@ typedef struct {
|
||||
/// coded RI bits
|
||||
int16_t q_RI[MAX_RI_PAYLOAD];
|
||||
/// Concatenated "e"-sequences (for definition see 36-212 V8.6 2009-03, p.17-18)
|
||||
int16_t e[MAX_NUM_CHANNEL_BITS] __attribute__((aligned(32)));
|
||||
int16_t eUL[MAX_NUM_CHANNEL_BITS] __attribute__((aligned(32)));
|
||||
/// Temporary h sequence to flag PUSCH_x/PUSCH_y symbols which are not scrambled
|
||||
uint8_t h[MAX_NUM_CHANNEL_BITS];
|
||||
/// Pointer to the payload
|
||||
uint8_t *b;
|
||||
uint8_t *decodedBytes;
|
||||
/// Pointers to transport block segments
|
||||
//TBD
|
||||
uint8_t *c[MAX_NUM_ULSCH_SEGMENTS];
|
||||
/// RTC values for each segment (for definition see 36-212 V8.6 2009-03, p.15)
|
||||
uint32_t RTC[MAX_NUM_ULSCH_SEGMENTS];
|
||||
@@ -282,8 +283,12 @@ typedef struct {
|
||||
uint8_t rvidx;
|
||||
/// soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
|
||||
int16_t w[MAX_NUM_ULSCH_SEGMENTS][3*(6144+64)];
|
||||
int16_t pusch_rep_buffer[MAX_NUM_ULSCH_SEGMENTS][3*(6144+64)];
|
||||
/// soft bits for each received segment ("d"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
|
||||
//TBD
|
||||
int16_t *d[MAX_NUM_ULSCH_SEGMENTS];
|
||||
uint32_t processedSegments;
|
||||
uint32_t processedBadSegment;
|
||||
/// Number of code segments (for definition see 36-212 V8.6 2009-03, p.9)
|
||||
uint32_t C;
|
||||
/// Number of "small" code segments (for definition see 36-212 V8.6 2009-03, p.10)
|
||||
|
||||
@@ -73,18 +73,19 @@ void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch);
|
||||
LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uint8_t abstraction_flag);
|
||||
|
||||
int dlsch_encoding_all(PHY_VARS_eNB *eNB,
|
||||
unsigned char *a,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
time_stats_t *rm_stats,
|
||||
time_stats_t *te_stats,
|
||||
time_stats_t *te_wait_stats,
|
||||
time_stats_t *te_main_stats,
|
||||
time_stats_t *te_wakeup_stats0,
|
||||
time_stats_t *te_wakeup_stats1,
|
||||
time_stats_t *i_stats);
|
||||
L1_rxtx_proc_t *proc,
|
||||
unsigned char *a,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
time_stats_t *rm_stats,
|
||||
time_stats_t *te_stats,
|
||||
time_stats_t *te_wait_stats,
|
||||
time_stats_t *te_main_stats,
|
||||
time_stats_t *te_wakeup_stats0,
|
||||
time_stats_t *te_wakeup_stats1,
|
||||
time_stats_t *i_stats);
|
||||
|
||||
/** \fn dlsch_encoding(PHY_VARS_eNB *eNB,
|
||||
uint8_t *input_buffer,
|
||||
@@ -112,6 +113,7 @@ int dlsch_encoding_all(PHY_VARS_eNB *eNB,
|
||||
@returns status
|
||||
*/
|
||||
int32_t dlsch_encoding(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
uint8_t *a,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
@@ -467,9 +469,12 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
|
||||
|
||||
int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,
|
||||
int UE_id,
|
||||
int harq_pid,
|
||||
int llr8_flag);
|
||||
|
||||
L1_rxtx_proc_t *proc,
|
||||
int UE_id,
|
||||
int harq_pid,
|
||||
int llr8_flag);
|
||||
|
||||
|
||||
/*!
|
||||
\brief Decoding of PUSCH/ACK/RI/ACK from 36-212.
|
||||
@@ -511,6 +516,7 @@ int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,
|
||||
@returns 0 on success
|
||||
*/
|
||||
int ulsch_decoding_data(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
int UE_id,
|
||||
int harq_pid,
|
||||
int llr8_flag);
|
||||
|
||||
@@ -41,22 +41,22 @@
|
||||
#include "RRC/LTE/rrc_extern.h"
|
||||
#include "PHY_INTERFACE/phy_interface.h"
|
||||
#include "transport_proto.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include <executables/split_headers.h>
|
||||
|
||||
extern WORKER_CONF_t get_thread_worker_conf(void);
|
||||
extern volatile int oai_exit;
|
||||
|
||||
|
||||
|
||||
void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) {
|
||||
int i,r;
|
||||
|
||||
if (ulsch) {
|
||||
for (i=0; i<8; i++) {
|
||||
if (ulsch->harq_processes[i]) {
|
||||
if (ulsch->harq_processes[i]->b) {
|
||||
free16(ulsch->harq_processes[i]->b,MAX_ULSCH_PAYLOAD_BYTES);
|
||||
ulsch->harq_processes[i]->b = NULL;
|
||||
if (ulsch->harq_processes[i]->decodedBytes) {
|
||||
free16(ulsch->harq_processes[i]->decodedBytes,MAX_ULSCH_PAYLOAD_BYTES);
|
||||
ulsch->harq_processes[i]->decodedBytes = NULL;
|
||||
}
|
||||
|
||||
for (r=0; r<MAX_NUM_ULSCH_SEGMENTS; r++) {
|
||||
@@ -115,10 +115,10 @@ LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uin
|
||||
|
||||
if (ulsch->harq_processes[i]) {
|
||||
memset(ulsch->harq_processes[i],0,sizeof(LTE_UL_eNB_HARQ_t));
|
||||
ulsch->harq_processes[i]->b = (uint8_t *)malloc16(MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
|
||||
ulsch->harq_processes[i]->decodedBytes = (uint8_t *)malloc16(MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
|
||||
|
||||
if (ulsch->harq_processes[i]->b)
|
||||
memset(ulsch->harq_processes[i]->b,0,MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
|
||||
if (ulsch->harq_processes[i]->decodedBytes)
|
||||
memset(ulsch->harq_processes[i]->decodedBytes,0,MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
|
||||
else
|
||||
exit_flag=3;
|
||||
|
||||
@@ -210,388 +210,26 @@ uint8_t extract_cqi_crc(uint8_t *cqi,uint8_t CQI_LENGTH) {
|
||||
return(crc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int ulsch_decoding_data_2thread0(td_params *tdp) {
|
||||
PHY_VARS_eNB *eNB = tdp->eNB;
|
||||
int UE_id = tdp->UE_id;
|
||||
int harq_pid = tdp->harq_pid;
|
||||
int llr8_flag = tdp->llr8_flag;
|
||||
unsigned int r,r_offset=0,Kr,Kr_bytes;
|
||||
uint8_t crc_type;
|
||||
int offset = 0;
|
||||
int ret = 1;
|
||||
int16_t dummy_w[MAX_NUM_ULSCH_SEGMENTS][3*(6144+64)];
|
||||
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
||||
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
int Q_m = ulsch_harq->Qm;
|
||||
int G = ulsch_harq->G;
|
||||
uint32_t E=0;
|
||||
uint32_t Gp,GpmodC,Nl=1;
|
||||
uint32_t C = ulsch_harq->C;
|
||||
decoder_if_t *tc;
|
||||
|
||||
if (llr8_flag == 0)
|
||||
tc = decoder16;
|
||||
else
|
||||
tc = decoder8;
|
||||
|
||||
// go through first half of segments to get r_offset
|
||||
for (r=0; r<(ulsch_harq->C/2); r++) {
|
||||
// Get Turbo interleaver parameters
|
||||
if (r<ulsch_harq->Cminus)
|
||||
Kr = ulsch_harq->Kminus;
|
||||
else
|
||||
Kr = ulsch_harq->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
// This is stolen from rate-matching algorithm to get the value of E
|
||||
Gp = G/Nl/Q_m;
|
||||
GpmodC = Gp%C;
|
||||
|
||||
if (r < (C-(GpmodC)))
|
||||
E = Nl*Q_m * (Gp/C);
|
||||
else
|
||||
E = Nl*Q_m * ((GpmodC==0?0:1) + (Gp/C));
|
||||
|
||||
r_offset += E;
|
||||
|
||||
if (r==0) {
|
||||
offset = Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0);
|
||||
} else {
|
||||
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
|
||||
}
|
||||
}
|
||||
|
||||
// go through second half of segments
|
||||
for (; r<(ulsch_harq->C); r++) {
|
||||
// printf("before subblock deinterleaving c[%d] = %p\n",r,ulsch_harq->c[r]);
|
||||
// Get Turbo interleaver parameters
|
||||
if (r<ulsch_harq->Cminus)
|
||||
Kr = ulsch_harq->Kminus;
|
||||
else
|
||||
Kr = ulsch_harq->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
|
||||
ulsch_harq->RTC[r] = generate_dummy_w(4+(Kr_bytes*8),
|
||||
(uint8_t *)&dummy_w[r][0],
|
||||
void processULSegment(void * arg) {
|
||||
turboDecode_t* rdata=(turboDecode_t*) arg;
|
||||
PHY_VARS_eNB *eNB=rdata->eNB;
|
||||
LTE_UL_eNB_HARQ_t *ulsch_harq=rdata->ulsch_harq;
|
||||
int r=rdata->segment_r;
|
||||
int G=ulsch_harq->G;
|
||||
int Kr_bytes=rdata->Kr>>3;
|
||||
int16_t dummy_w[3*(6144+64)];
|
||||
|
||||
memset(&dummy_w[0],0,3*(6144+64)*sizeof(short));
|
||||
ulsch_harq->RTC[r] = generate_dummy_w(4+(Kr_bytes*8),
|
||||
(uint8_t *)&dummy_w[0],
|
||||
(r==0) ? ulsch_harq->F : 0);
|
||||
#ifdef DEBUG_ULSCH_DECODING
|
||||
printf("Rate Matching Segment %u (coded bits (G) %d,unpunctured/repeated bits %u, Q_m %d, nb_rb %d, Nl %d)...\n",
|
||||
r, G,
|
||||
Kr*3,
|
||||
Q_m,
|
||||
nb_rb,
|
||||
ulsch_harq->Nl);
|
||||
#endif
|
||||
|
||||
if (lte_rate_matching_turbo_rx(ulsch_harq->RTC[r],
|
||||
G,
|
||||
ulsch_harq->w[r],
|
||||
(uint8_t *) &dummy_w[r][0],
|
||||
ulsch_harq->e+r_offset,
|
||||
ulsch_harq->C,
|
||||
NSOFT,
|
||||
0, //Uplink
|
||||
1,
|
||||
ulsch_harq->rvidx,
|
||||
(ulsch_harq->round==0)?1:0, // clear
|
||||
ulsch_harq->Qm,
|
||||
1,
|
||||
r,
|
||||
&E)==-1) {
|
||||
LOG_E(PHY,"ulsch_decoding.c: Problem in rate matching\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
r_offset += E;
|
||||
sub_block_deinterleaving_turbo(4+Kr,
|
||||
&ulsch_harq->d[r][96],
|
||||
ulsch_harq->w[r]);
|
||||
|
||||
if (ulsch_harq->C == 1)
|
||||
crc_type = CRC24_A;
|
||||
else
|
||||
crc_type = CRC24_B;
|
||||
|
||||
ret = tc(&ulsch_harq->d[r][96],
|
||||
NULL,
|
||||
ulsch_harq->c[r],
|
||||
NULL,
|
||||
Kr,
|
||||
ulsch->max_turbo_iterations,//MAX_TURBO_ITERATIONS,
|
||||
crc_type,
|
||||
(r==0) ? ulsch_harq->F : 0,
|
||||
&eNB->ulsch_tc_init_stats,
|
||||
&eNB->ulsch_tc_alpha_stats,
|
||||
&eNB->ulsch_tc_beta_stats,
|
||||
&eNB->ulsch_tc_gamma_stats,
|
||||
&eNB->ulsch_tc_ext_stats,
|
||||
&eNB->ulsch_tc_intl1_stats,
|
||||
&eNB->ulsch_tc_intl2_stats);
|
||||
|
||||
// Reassembly of Transport block here
|
||||
|
||||
if (ret != (1+ulsch->max_turbo_iterations)) {
|
||||
if (r<ulsch_harq->Cminus)
|
||||
Kr = ulsch_harq->Kminus;
|
||||
else
|
||||
Kr = ulsch_harq->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
memcpy(ulsch_harq->b+offset,
|
||||
ulsch_harq->c[r],
|
||||
Kr_bytes - ((ulsch_harq->C>1)?3:0));
|
||||
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return(ret);
|
||||
}
|
||||
|
||||
|
||||
void *td_thread(void *param) {
|
||||
PHY_VARS_eNB *eNB = ((td_params *)param)->eNB;
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
pthread_setname_np( pthread_self(),"td processing");
|
||||
LOG_I(PHY,"thread td created id=%ld\n", syscall(__NR_gettid));
|
||||
//wait_sync("td_thread");
|
||||
|
||||
while (!oai_exit) {
|
||||
if (wait_on_condition(&proc->mutex_td,&proc->cond_td,&proc->instance_cnt_td,"td thread")<0) break;
|
||||
|
||||
if(oai_exit) break;
|
||||
|
||||
((td_params *)param)->ret = ulsch_decoding_data_2thread0((td_params *)param);
|
||||
|
||||
if (release_thread(&proc->mutex_td,&proc->instance_cnt_td,"td thread")<0) break;
|
||||
|
||||
if (pthread_cond_signal(&proc->cond_td) != 0) {
|
||||
printf("[eNB] ERROR pthread_cond_signal for td thread exit\n");
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
int ulsch_decoding_data_2thread(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) {
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
unsigned int r,r_offset=0,Kr,Kr_bytes;
|
||||
uint8_t crc_type;
|
||||
int offset = 0;
|
||||
int ret = 1;
|
||||
int16_t dummy_w[MAX_NUM_ULSCH_SEGMENTS][3*(6144+64)];
|
||||
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
||||
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
int G = ulsch_harq->G;
|
||||
start_meas(&eNB->ulsch_deinterleaving_stats);
|
||||
unsigned int E;
|
||||
int Cby2;
|
||||
decoder_if_t *tc;
|
||||
struct timespec wait;
|
||||
wait.tv_sec=0;
|
||||
wait.tv_nsec=5000000L;
|
||||
|
||||
if (llr8_flag == 0)
|
||||
tc = decoder16;
|
||||
else
|
||||
tc = decoder8;
|
||||
|
||||
if (ulsch_harq->C>1) { // wakeup worker if more than 1 segment
|
||||
if (pthread_mutex_timedlock(&proc->mutex_td,&wait) != 0) {
|
||||
printf("[eNB] ERROR pthread_mutex_lock for TD thread (IC %d)\n", proc->instance_cnt_td);
|
||||
exit_fun( "error locking mutex_fep" );
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (proc->instance_cnt_td==0) {
|
||||
printf("[eNB] TD thread busy\n");
|
||||
exit_fun("TD thread busy");
|
||||
pthread_mutex_unlock( &proc->mutex_td );
|
||||
return -1;
|
||||
}
|
||||
|
||||
++proc->instance_cnt_td;
|
||||
proc->tdp.eNB = eNB;
|
||||
proc->tdp.UE_id = UE_id;
|
||||
proc->tdp.harq_pid = harq_pid;
|
||||
proc->tdp.llr8_flag = llr8_flag;
|
||||
|
||||
// wakeup worker to do second half segments
|
||||
if (pthread_cond_signal(&proc->cond_td) != 0) {
|
||||
printf("[eNB] ERROR pthread_cond_signal for td thread exit\n");
|
||||
exit_fun( "ERROR pthread_cond_signal" );
|
||||
return (1+ulsch->max_turbo_iterations);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock( &proc->mutex_td );
|
||||
Cby2 = ulsch_harq->C/2;
|
||||
} else {
|
||||
Cby2 = 1;
|
||||
}
|
||||
|
||||
// go through first half of segments in main thread
|
||||
for (r=0; r<Cby2; r++) {
|
||||
// printf("before subblock deinterleaving c[%d] = %p\n",r,ulsch_harq->c[r]);
|
||||
// Get Turbo interleaver parameters
|
||||
if (r<ulsch_harq->Cminus)
|
||||
Kr = ulsch_harq->Kminus;
|
||||
else
|
||||
Kr = ulsch_harq->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
|
||||
ulsch_harq->RTC[r] = generate_dummy_w(4+(Kr_bytes*8),
|
||||
(uint8_t *)&dummy_w[r][0],
|
||||
(r==0) ? ulsch_harq->F : 0);
|
||||
#ifdef DEBUG_ULSCH_DECODING
|
||||
printf("Rate Matching Segment %u (coded bits (G) %d,unpunctured/repeated bits %u, Q_m %d, nb_rb %d, Nl %d)...\n",
|
||||
r, G,
|
||||
Kr*3,
|
||||
Q_m,
|
||||
nb_rb,
|
||||
ulsch_harq->Nl);
|
||||
#endif
|
||||
start_meas(&eNB->ulsch_rate_unmatching_stats);
|
||||
|
||||
if (lte_rate_matching_turbo_rx(ulsch_harq->RTC[r],
|
||||
if (lte_rate_matching_turbo_rx(ulsch_harq->RTC[r],
|
||||
G,
|
||||
ulsch_harq->w[r],
|
||||
(uint8_t *) &dummy_w[r][0],
|
||||
ulsch_harq->e+r_offset,
|
||||
ulsch_harq->C,
|
||||
NSOFT,
|
||||
0, //Uplink
|
||||
1,
|
||||
ulsch_harq->rvidx,
|
||||
(ulsch_harq->round==0)?1:0, // clear
|
||||
ulsch_harq->Qm,
|
||||
1,
|
||||
r,
|
||||
&E)==-1) {
|
||||
LOG_E(PHY,"ulsch_decoding.c: Problem in rate matching\n");
|
||||
return(-1);
|
||||
}
|
||||
|
||||
stop_meas(&eNB->ulsch_rate_unmatching_stats);
|
||||
r_offset += E;
|
||||
start_meas(&eNB->ulsch_deinterleaving_stats);
|
||||
sub_block_deinterleaving_turbo(4+Kr,
|
||||
&ulsch_harq->d[r][96],
|
||||
ulsch_harq->w[r]);
|
||||
stop_meas(&eNB->ulsch_deinterleaving_stats);
|
||||
|
||||
if (ulsch_harq->C == 1)
|
||||
crc_type = CRC24_A;
|
||||
else
|
||||
crc_type = CRC24_B;
|
||||
|
||||
start_meas(&eNB->ulsch_turbo_decoding_stats);
|
||||
ret = tc(&ulsch_harq->d[r][96],
|
||||
NULL,
|
||||
ulsch_harq->c[r],
|
||||
NULL,
|
||||
Kr,
|
||||
ulsch->max_turbo_iterations,//MAX_TURBO_ITERATIONS,
|
||||
crc_type,
|
||||
(r==0) ? ulsch_harq->F : 0,
|
||||
&eNB->ulsch_tc_init_stats,
|
||||
&eNB->ulsch_tc_alpha_stats,
|
||||
&eNB->ulsch_tc_beta_stats,
|
||||
&eNB->ulsch_tc_gamma_stats,
|
||||
&eNB->ulsch_tc_ext_stats,
|
||||
&eNB->ulsch_tc_intl1_stats,
|
||||
&eNB->ulsch_tc_intl2_stats);
|
||||
|
||||
// Reassembly of Transport block here
|
||||
|
||||
if (ret != (1+ulsch->max_turbo_iterations)) {
|
||||
if (r<ulsch_harq->Cminus)
|
||||
Kr = ulsch_harq->Kminus;
|
||||
else
|
||||
Kr = ulsch_harq->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
|
||||
if (r==0) {
|
||||
memcpy(ulsch_harq->b,
|
||||
&ulsch_harq->c[0][(ulsch_harq->F>>3)],
|
||||
Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0));
|
||||
offset = Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0);
|
||||
} else {
|
||||
memcpy(ulsch_harq->b+offset,
|
||||
ulsch_harq->c[r],
|
||||
Kr_bytes - ((ulsch_harq->C>1)?3:0));
|
||||
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
stop_meas(&eNB->ulsch_turbo_decoding_stats);
|
||||
//printf("/////////////////////////////////////////**************************loop for %d time in ulsch_decoding main\n",r);
|
||||
}
|
||||
|
||||
// wait for worker to finish
|
||||
wait_on_busy_condition(&proc->mutex_td,&proc->cond_td,&proc->instance_cnt_td,"td thread");
|
||||
return( (ret>proc->tdp.ret) ? ret : proc->tdp.ret );
|
||||
}
|
||||
|
||||
int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) {
|
||||
unsigned int r,r_offset=0,Kr,Kr_bytes;
|
||||
uint8_t crc_type;
|
||||
int offset = 0;
|
||||
int ret = 1;
|
||||
int16_t dummy_w[MAX_NUM_ULSCH_SEGMENTS][3*(6144+64)];
|
||||
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
||||
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
int G = ulsch_harq->G;
|
||||
unsigned int E;
|
||||
decoder_if_t *tc;
|
||||
static int32_t pusch_rep_buffer[3*(6144+64)];
|
||||
int max_Ncb;
|
||||
|
||||
if (llr8_flag == 0)
|
||||
tc = *decoder16;
|
||||
else
|
||||
tc = *decoder8;
|
||||
|
||||
if(ulsch_harq->repetition_number == 1) {
|
||||
memset(pusch_rep_buffer,0,(sizeof(int32_t)*3*(6144+64))) ; // reset the buffer every new repetitions
|
||||
}
|
||||
|
||||
for (r=0; r<ulsch_harq->C; r++) {
|
||||
// printf("before subblock deinterleaving c[%d] = %p\n",r,ulsch_harq->c[r]);
|
||||
// Get Turbo interleaver parameters
|
||||
if (r<ulsch_harq->Cminus)
|
||||
Kr = ulsch_harq->Kminus;
|
||||
else
|
||||
Kr = ulsch_harq->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
|
||||
ulsch_harq->RTC[r] = generate_dummy_w(4+(Kr_bytes*8),
|
||||
(uint8_t *)&dummy_w[r][0],
|
||||
(r==0) ? ulsch_harq->F : 0);
|
||||
#ifdef DEBUG_ULSCH_DECODING
|
||||
printf("Rate Matching Segment %u (coded bits (G) %d,unpunctured/repeated bits %u, Q_m %d, Nl %d)...\n",
|
||||
r, G,
|
||||
Kr*3,
|
||||
ulsch_harq->Qm,
|
||||
ulsch_harq->Nl);
|
||||
#endif
|
||||
start_meas(&eNB->ulsch_rate_unmatching_stats);
|
||||
|
||||
if (lte_rate_matching_turbo_rx(ulsch_harq->RTC[r],
|
||||
G,
|
||||
ulsch_harq->w[r],
|
||||
(uint8_t *) &dummy_w[r][0],
|
||||
ulsch_harq->e+r_offset,
|
||||
(uint8_t *) &dummy_w[0],
|
||||
ulsch_harq->eUL+rdata->r_offset,
|
||||
ulsch_harq->C,
|
||||
NSOFT,
|
||||
0, //Uplink
|
||||
@@ -603,97 +241,132 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
|
||||
r,
|
||||
&E)==-1) {
|
||||
LOG_E(PHY,"ulsch_decoding.c: Problem in rate matching\n");
|
||||
return(-1);
|
||||
return;
|
||||
}
|
||||
stop_meas(&eNB->ulsch_rate_unmatching_stats);
|
||||
int max_Ncb = 3*ulsch_harq->RTC[r]*32 ;
|
||||
|
||||
if(ulsch_harq->repetition_number == 1) {
|
||||
memset(ulsch_harq->pusch_rep_buffer[r],0,(sizeof(int32_t)*3*(6144+64))) ; // reset the buffer every new repetitions
|
||||
}
|
||||
if(ulsch_harq->total_number_of_repetitions > 1) {
|
||||
if (ulsch_harq->rvidx==1) {
|
||||
LOG_E(PHY,"Adding HARQ data for segment: %d\n", r);
|
||||
// Store the result of HARQ combining in the last emtc repetitions of sequence 0,2,3,1
|
||||
for (int nn=0; nn<max_Ncb; nn++)
|
||||
ulsch_harq->pusch_rep_buffer[r][nn] += ulsch_harq->w[r][nn] ;
|
||||
}
|
||||
|
||||
stop_meas(&eNB->ulsch_rate_unmatching_stats);
|
||||
max_Ncb = 3*ulsch_harq->RTC[r]*32 ;
|
||||
|
||||
if(ulsch_harq->total_number_of_repetitions > 1) {
|
||||
if (ulsch_harq->rvidx==1) {
|
||||
// Store the result of HARQ combining in the last emtc repetitions of sequence 0,2,3,1
|
||||
for (int nn=0; nn<max_Ncb; nn++) {
|
||||
pusch_rep_buffer[nn] += ulsch_harq->w[r][nn] ;
|
||||
}
|
||||
}
|
||||
|
||||
if (ulsch_harq->repetition_number == ulsch_harq->total_number_of_repetitions) {
|
||||
for (int nn=0; nn<max_Ncb; nn++) {
|
||||
ulsch_harq->w[r][nn] = pusch_rep_buffer[nn] ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
r_offset += E;
|
||||
start_meas(&eNB->ulsch_deinterleaving_stats);
|
||||
sub_block_deinterleaving_turbo(4+Kr,
|
||||
&ulsch_harq->d[r][96],
|
||||
ulsch_harq->w[r]);
|
||||
stop_meas(&eNB->ulsch_deinterleaving_stats);
|
||||
|
||||
if (ulsch_harq->C == 1)
|
||||
crc_type = CRC24_A;
|
||||
else
|
||||
crc_type = CRC24_B;
|
||||
|
||||
start_meas(&eNB->ulsch_turbo_decoding_stats);
|
||||
ret = tc(&ulsch_harq->d[r][96],
|
||||
NULL,
|
||||
ulsch_harq->c[r],
|
||||
NULL,
|
||||
Kr,
|
||||
ulsch->max_turbo_iterations,//MAX_TURBO_ITERATIONS,
|
||||
crc_type,
|
||||
(r==0) ? ulsch_harq->F : 0,
|
||||
&eNB->ulsch_tc_init_stats,
|
||||
&eNB->ulsch_tc_alpha_stats,
|
||||
&eNB->ulsch_tc_beta_stats,
|
||||
&eNB->ulsch_tc_gamma_stats,
|
||||
&eNB->ulsch_tc_ext_stats,
|
||||
&eNB->ulsch_tc_intl1_stats,
|
||||
&eNB->ulsch_tc_intl2_stats);
|
||||
stop_meas(&eNB->ulsch_turbo_decoding_stats);
|
||||
|
||||
// Reassembly of Transport block here
|
||||
|
||||
if (ret != (1+ulsch->max_turbo_iterations)) {
|
||||
if (r<ulsch_harq->Cminus)
|
||||
Kr = ulsch_harq->Kminus;
|
||||
else
|
||||
Kr = ulsch_harq->Kplus;
|
||||
|
||||
Kr_bytes = Kr>>3;
|
||||
|
||||
if (r==0) {
|
||||
memcpy(ulsch_harq->b,
|
||||
&ulsch_harq->c[0][(ulsch_harq->F>>3)],
|
||||
Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0));
|
||||
offset = Kr_bytes - (ulsch_harq->F>>3) - ((ulsch_harq->C>1)?3:0);
|
||||
} else {
|
||||
memcpy(ulsch_harq->b+offset,
|
||||
ulsch_harq->c[r],
|
||||
Kr_bytes - ((ulsch_harq->C>1)?3:0));
|
||||
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
if (ulsch_harq->repetition_number == ulsch_harq->total_number_of_repetitions) {
|
||||
LOG_E(PHY,"Will use HARQ data sum up for segment: %d\n", r);
|
||||
for (int nn=0; nn<max_Ncb; nn++)
|
||||
ulsch_harq->w[r][nn] = ulsch_harq->pusch_rep_buffer[r][nn] ;
|
||||
}
|
||||
}
|
||||
int16_t soft_bits[3*8*6144+12+96] __attribute__((aligned(32)));
|
||||
sub_block_deinterleaving_turbo(4+rdata->Kr,
|
||||
soft_bits+96,
|
||||
ulsch_harq->w[r]);
|
||||
stop_meas(&eNB->ulsch_deinterleaving_stats);
|
||||
rdata->decodeIterations = rdata->function( soft_bits+96,
|
||||
NULL,
|
||||
rdata->decoded_bytes,
|
||||
NULL,
|
||||
rdata->Kr,
|
||||
rdata->maxIterations,
|
||||
rdata->nbSegments == 1 ? CRC24_A: CRC24_B,
|
||||
rdata->Fbits,
|
||||
&eNB->ulsch_tc_init_stats,
|
||||
&eNB->ulsch_tc_alpha_stats,
|
||||
&eNB->ulsch_tc_beta_stats,
|
||||
&eNB->ulsch_tc_gamma_stats,
|
||||
&eNB->ulsch_tc_ext_stats,
|
||||
&eNB->ulsch_tc_intl1_stats,
|
||||
&eNB->ulsch_tc_intl2_stats);
|
||||
stop_meas(&eNB->ulsch_turbo_decoding_stats);
|
||||
|
||||
}
|
||||
|
||||
void *td_thread(void *param) {
|
||||
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
int ulsch_decoding_data(PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc,
|
||||
int UE_id,int harq_pid,int llr8_flag) {
|
||||
unsigned int r_offset=0;
|
||||
int offset = 0;
|
||||
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
||||
LTE_UL_eNB_HARQ_t *ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
int G = ulsch_harq->G;
|
||||
unsigned int E;
|
||||
int ret=0;
|
||||
|
||||
decoder_if_t * td=llr8_flag == 0 ?
|
||||
*decoder16 : *decoder8;
|
||||
ulsch_harq->processedSegments=0;
|
||||
|
||||
for (int r=0; r<ulsch_harq->C; r++) {
|
||||
// printf("before subblock deinterleaving c[%d] = %p\n",r,ulsch_harq->c[r]);
|
||||
// Get Turbo interleaver parameters
|
||||
unsigned int Kr= r<ulsch_harq->Cminus ?
|
||||
ulsch_harq->Kminus :ulsch_harq->Kplus;
|
||||
unsigned int Kr_bytes = Kr>>3;
|
||||
|
||||
#ifdef DEBUG_ULSCH_DECODING
|
||||
printf("Rate Matching Segment %d (coded bits (G) %d,unpunctured/repeated bits %u, Q_m %d, Nl %d, r_offset %u)...\n",
|
||||
r, G,
|
||||
Kr*3,
|
||||
ulsch_harq->Qm,
|
||||
ulsch_harq->Nl, r_offset);
|
||||
#endif
|
||||
int Gp=G/ulsch_harq->Qm;
|
||||
int GpmodC = Gp%ulsch_harq->C;
|
||||
|
||||
if (r < (ulsch_harq->C-(GpmodC)))
|
||||
E = ulsch_harq->Qm * (Gp/ulsch_harq->C);
|
||||
else
|
||||
E = ulsch_harq->Qm * ((GpmodC==0?0:1) + (Gp/ulsch_harq->C));
|
||||
|
||||
if ( split73 == SPLIT73_DU ) {
|
||||
sendFs6Ul(eNB, UE_id, harq_pid, r, ulsch_harq->eUL+r_offset, E*sizeof(int16_t), r_offset);
|
||||
r_offset += E;
|
||||
continue;
|
||||
}
|
||||
|
||||
union turboReqUnion id= {.s={ulsch->rnti,proc->frame_rx,proc->subframe_rx,0,0}};
|
||||
notifiedFIFO_elt_t *req=newNotifiedFIFO_elt(sizeof(turboDecode_t), id.p, proc->respDecode, processULSegment);
|
||||
turboDecode_t * rdata=(turboDecode_t *) NotifiedFifoData(req);
|
||||
|
||||
rdata->eNB=eNB;
|
||||
rdata->frame=proc->frame_rx;
|
||||
rdata->subframe=proc->subframe_rx;
|
||||
rdata->UEid=UE_id;
|
||||
rdata->harq_pid=harq_pid;
|
||||
rdata->Kr=Kr;
|
||||
rdata->maxIterations=eNB->ulsch[UE_id]->max_turbo_iterations;
|
||||
rdata->ulsch_harq=ulsch_harq;
|
||||
rdata->eNB=eNB;
|
||||
rdata->nbSegments=ulsch_harq->C;
|
||||
rdata->segment_r=r;
|
||||
rdata->Fbits=(r==0) ? ulsch_harq->F : 0;
|
||||
rdata->r_offset=r_offset;
|
||||
rdata->offset=offset;
|
||||
rdata->function=td;
|
||||
int Fbytes=(r==0) ? rdata->Fbits>>3 : 0;
|
||||
int sz=Kr_bytes - Fbytes - ((ulsch_harq->C>1)?3:0);
|
||||
pushTpool(proc->threadPool,req);
|
||||
proc->nbDecode++;
|
||||
LOG_D(PHY,"Added a block to decode, in pipe: %d\n",proc->nbDecode);
|
||||
r_offset+=E;
|
||||
offset+=sz;
|
||||
}
|
||||
return(ret);
|
||||
}
|
||||
|
||||
int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag) {
|
||||
int ret = 0;
|
||||
/*if(get_thread_worker_conf() == WORKER_ENABLE)
|
||||
{
|
||||
ret = ulsch_decoding_data_2thread(eNB,UE_id,harq_pid,llr8_flag);
|
||||
}
|
||||
else*/
|
||||
{
|
||||
ret = ulsch_decoding_data(eNB,UE_id,harq_pid,llr8_flag);
|
||||
}
|
||||
return ret;
|
||||
int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
int UE_id,int harq_pid,int llr8_flag) {
|
||||
return ulsch_decoding_data(eNB,proc,UE_id,harq_pid,llr8_flag);
|
||||
}
|
||||
|
||||
static inline unsigned int lte_gold_unscram(unsigned int *x1, unsigned int *x2, unsigned char reset) __attribute__((always_inline));
|
||||
@@ -767,7 +440,6 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
else
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1);
|
||||
// x1 is set in lte_gold_generic
|
||||
x2 = ((uint32_t)ulsch->rnti<<14) + ((uint32_t)subframe<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1
|
||||
ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
@@ -779,8 +451,9 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
A = ulsch_harq->TBS;
|
||||
Q_m = ulsch_harq->Qm;
|
||||
G = nb_rb * (12 * Q_m) * ulsch_harq->Nsymb_pusch;
|
||||
LOG_D(PHY, "PUSCH nb_rb %d Q_m %d ulsch_harq->Nsymb_pusch %d\n",nb_rb, Q_m, ulsch_harq->Nsymb_pusch);
|
||||
//#ifdef DEBUG_ULSCH_DECODING
|
||||
LOG_D(PHY,"[PUSCH %d] Frame %d, Subframe %d: ulsch_decoding (Nid_cell %d, rnti %x, x2 %x): A %d, round %d, RV %d, O_r1 %d, O_RI %d, O_ACK %d, G %d, Q_m %d Nsymb_pusch %d nb_rb %d\n",
|
||||
LOG_D(PHY,"[PUSCH harq %d] Frame %d, Subframe %d: ulsch_decoding (Nid_cell %d, rnti %x, x2 %x): TBS %d, round %d, RV %d, O_r1 %d, O_RI %d, O_ACK %d, G %d, Q_m %d Nsymb_pusch %d nb_rb %d\n",
|
||||
harq_pid,
|
||||
proc->frame_rx,subframe,
|
||||
frame_parms->Nid_cell,ulsch->rnti,x2,
|
||||
@@ -833,6 +506,12 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
subframe);
|
||||
// Compute Q_ri
|
||||
Qprime = ulsch_harq->O_RI*ulsch_harq->Msc_initial*ulsch_harq->Nsymb_initial * ulsch->beta_offset_ri_times8;
|
||||
LOG_D(PHY, "Qprime %d, O_RI %d, Msc %d, Nym %d beta %d\n",
|
||||
Qprime,
|
||||
ulsch_harq->O_RI,
|
||||
ulsch_harq->Msc_initial,
|
||||
ulsch_harq->Nsymb_initial,
|
||||
ulsch->beta_offset_ri_times8);
|
||||
|
||||
if (Qprime > 0 ) {
|
||||
if ((Qprime % (8*sumKr)) > 0)
|
||||
@@ -893,7 +572,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
G = G - Q_RI - Q_CQI;
|
||||
ulsch_harq->G = G;
|
||||
AssertFatal((int)G > 0,
|
||||
"FATAL: ulsch_decoding.c G < 0 (%d) : Q_RI %d, Q_CQI %d\n",G,Q_RI,Q_CQI);
|
||||
"FATAL: ulsch_decoding.c G < 0 (%u) : Q_RI %u, Q_CQI %u\n",G,Q_RI,Q_CQI);
|
||||
H = G + Q_CQI;
|
||||
Hprime = H/Q_m;
|
||||
// Demultiplexing/Deinterleaving of PUSCH/ACK/RI/CQI
|
||||
@@ -1209,8 +888,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
j2+=2;
|
||||
}
|
||||
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1222,10 +901,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
j2+=4;
|
||||
}
|
||||
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1237,12 +916,12 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
j2+=6;
|
||||
}
|
||||
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->e[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
ulsch_harq->eUL[iprime++] = y[j2++];
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -1280,7 +959,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
*/
|
||||
int16_t *yp,*ep;
|
||||
|
||||
for (iprime=0,yp=&y[j2],ep=&ulsch_harq->e[0];
|
||||
for (iprime=0,yp=&y[j2],ep=&ulsch_harq->eUL[0];
|
||||
iprime<G;
|
||||
iprime+=8,j2+=8,ep+=8,yp+=8) {
|
||||
ep[0] = yp[0];
|
||||
@@ -1404,7 +1083,6 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
|
||||
LOG_D(PHY,"frame %d subframe %d O_ACK:%d o_ACK[]=%d:%d:%d:%d\n",frame,subframe,ulsch_harq->O_ACK,ulsch_harq->o_ACK[0],ulsch_harq->o_ACK[1],ulsch_harq->o_ACK[2],ulsch_harq->o_ACK[3]);
|
||||
// Do ULSCH Decoding for data portion
|
||||
ret = ulsch_decoding_data_all(eNB,UE_id,harq_pid,llr8_flag);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,0);
|
||||
ret = ulsch_decoding_data_all(eNB,proc, UE_id,harq_pid,llr8_flag);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
@@ -154,9 +154,9 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) {
|
||||
|
||||
switch (Msc_PUSCH) {
|
||||
case 12:
|
||||
dft12((int16_t *)idft_in0,(int16_t *)idft_out0);
|
||||
dft12((int16_t *)idft_in1,(int16_t *)idft_out1);
|
||||
dft12((int16_t *)idft_in2,(int16_t *)idft_out2);
|
||||
dft(DFT_12,(int16_t *)idft_in0,(int16_t *)idft_out0,0);
|
||||
dft(DFT_12,(int16_t *)idft_in1,(int16_t *)idft_out1,0);
|
||||
dft(DFT_12,(int16_t *)idft_in2,(int16_t *)idft_out2,0);
|
||||
#if defined(__x86_64__)||defined(__i386__)
|
||||
norm128 = _mm_set1_epi16(9459);
|
||||
#elif defined(__arm__)
|
||||
@@ -178,201 +178,201 @@ void lte_idft(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *z, uint16_t Msc_PUSCH) {
|
||||
break;
|
||||
|
||||
case 24:
|
||||
dft24(idft_in0,idft_out0,1);
|
||||
dft24(idft_in1,idft_out1,1);
|
||||
dft24(idft_in2,idft_out2,1);
|
||||
dft(DFT_24,idft_in0,idft_out0,1);
|
||||
dft(DFT_24,idft_in1,idft_out1,1);
|
||||
dft(DFT_24,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 36:
|
||||
dft36(idft_in0,idft_out0,1);
|
||||
dft36(idft_in1,idft_out1,1);
|
||||
dft36(idft_in2,idft_out2,1);
|
||||
dft(DFT_36,idft_in0,idft_out0,1);
|
||||
dft(DFT_36,idft_in1,idft_out1,1);
|
||||
dft(DFT_36,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 48:
|
||||
dft48(idft_in0,idft_out0,1);
|
||||
dft48(idft_in1,idft_out1,1);
|
||||
dft48(idft_in2,idft_out2,1);
|
||||
dft(DFT_48,idft_in0,idft_out0,1);
|
||||
dft(DFT_48,idft_in1,idft_out1,1);
|
||||
dft(DFT_48,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 60:
|
||||
dft60(idft_in0,idft_out0,1);
|
||||
dft60(idft_in1,idft_out1,1);
|
||||
dft60(idft_in2,idft_out2,1);
|
||||
dft(DFT_60,idft_in0,idft_out0,1);
|
||||
dft(DFT_60,idft_in1,idft_out1,1);
|
||||
dft(DFT_60,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 72:
|
||||
dft72(idft_in0,idft_out0,1);
|
||||
dft72(idft_in1,idft_out1,1);
|
||||
dft72(idft_in2,idft_out2,1);
|
||||
dft(DFT_72,idft_in0,idft_out0,1);
|
||||
dft(DFT_72,idft_in1,idft_out1,1);
|
||||
dft(DFT_72,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 96:
|
||||
dft96(idft_in0,idft_out0,1);
|
||||
dft96(idft_in1,idft_out1,1);
|
||||
dft96(idft_in2,idft_out2,1);
|
||||
dft(DFT_96,idft_in0,idft_out0,1);
|
||||
dft(DFT_96,idft_in1,idft_out1,1);
|
||||
dft(DFT_96,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 108:
|
||||
dft108(idft_in0,idft_out0,1);
|
||||
dft108(idft_in1,idft_out1,1);
|
||||
dft108(idft_in2,idft_out2,1);
|
||||
dft(DFT_108,idft_in0,idft_out0,1);
|
||||
dft(DFT_108,idft_in1,idft_out1,1);
|
||||
dft(DFT_108,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 120:
|
||||
dft120(idft_in0,idft_out0,1);
|
||||
dft120(idft_in1,idft_out1,1);
|
||||
dft120(idft_in2,idft_out2,1);
|
||||
dft(DFT_120,idft_in0,idft_out0,1);
|
||||
dft(DFT_120,idft_in1,idft_out1,1);
|
||||
dft(DFT_120,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 144:
|
||||
dft144(idft_in0,idft_out0,1);
|
||||
dft144(idft_in1,idft_out1,1);
|
||||
dft144(idft_in2,idft_out2,1);
|
||||
dft(DFT_144,idft_in0,idft_out0,1);
|
||||
dft(DFT_144,idft_in1,idft_out1,1);
|
||||
dft(DFT_144,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 180:
|
||||
dft180(idft_in0,idft_out0,1);
|
||||
dft180(idft_in1,idft_out1,1);
|
||||
dft180(idft_in2,idft_out2,1);
|
||||
dft(DFT_180,idft_in0,idft_out0,1);
|
||||
dft(DFT_180,idft_in1,idft_out1,1);
|
||||
dft(DFT_180,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 192:
|
||||
dft192(idft_in0,idft_out0,1);
|
||||
dft192(idft_in1,idft_out1,1);
|
||||
dft192(idft_in2,idft_out2,1);
|
||||
dft(DFT_192,idft_in0,idft_out0,1);
|
||||
dft(DFT_192,idft_in1,idft_out1,1);
|
||||
dft(DFT_192,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 216:
|
||||
dft216(idft_in0,idft_out0,1);
|
||||
dft216(idft_in1,idft_out1,1);
|
||||
dft216(idft_in2,idft_out2,1);
|
||||
dft(DFT_216,idft_in0,idft_out0,1);
|
||||
dft(DFT_216,idft_in1,idft_out1,1);
|
||||
dft(DFT_216,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 240:
|
||||
dft240(idft_in0,idft_out0,1);
|
||||
dft240(idft_in1,idft_out1,1);
|
||||
dft240(idft_in2,idft_out2,1);
|
||||
dft(DFT_240,idft_in0,idft_out0,1);
|
||||
dft(DFT_240,idft_in1,idft_out1,1);
|
||||
dft(DFT_240,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 288:
|
||||
dft288(idft_in0,idft_out0,1);
|
||||
dft288(idft_in1,idft_out1,1);
|
||||
dft288(idft_in2,idft_out2,1);
|
||||
dft(DFT_288,idft_in0,idft_out0,1);
|
||||
dft(DFT_288,idft_in1,idft_out1,1);
|
||||
dft(DFT_288,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 300:
|
||||
dft300(idft_in0,idft_out0,1);
|
||||
dft300(idft_in1,idft_out1,1);
|
||||
dft300(idft_in2,idft_out2,1);
|
||||
dft(DFT_300,idft_in0,idft_out0,1);
|
||||
dft(DFT_300,idft_in1,idft_out1,1);
|
||||
dft(DFT_300,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
case 324:
|
||||
dft324((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft324((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft324((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_324,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_324,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_324,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 360:
|
||||
dft360((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft360((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft360((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_360,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_360,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_360,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 384:
|
||||
dft384((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft384((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft384((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_384,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_384,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_384,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 432:
|
||||
dft432((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft432((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft432((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_432,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_432,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_432,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 480:
|
||||
dft480((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft480((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft480((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_480,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_480,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_480,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 540:
|
||||
dft540((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft540((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft540((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_540,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_540,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_540,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 576:
|
||||
dft576((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft576((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft576((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_576,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_576,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_576,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 600:
|
||||
dft600((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft600((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft600((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_600,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_600,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_600,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 648:
|
||||
dft648((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft648((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft648((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_648,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_648,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_648,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 720:
|
||||
dft720((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft720((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft720((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_720,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_720,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_720,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 768:
|
||||
dft768((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft768((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft768((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_768,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_768,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_768,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 864:
|
||||
dft864((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft864((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft864((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_864,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_864,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_864,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 900:
|
||||
dft900((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft900((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft900((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_900,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_900,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_900,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 960:
|
||||
dft960((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft960((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft960((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_960,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_960,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_960,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 972:
|
||||
dft972((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft972((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft972((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_972,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_972,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_972,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 1080:
|
||||
dft1080((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft1080((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft1080((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_1080,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_1080,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_1080,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 1152:
|
||||
dft1152((int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft1152((int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft1152((int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
dft(DFT_1152,(int16_t *)idft_in0,(int16_t *)idft_out0,1);
|
||||
dft(DFT_1152,(int16_t *)idft_in1,(int16_t *)idft_out1,1);
|
||||
dft(DFT_1152,(int16_t *)idft_in2,(int16_t *)idft_out2,1);
|
||||
break;
|
||||
|
||||
case 1200:
|
||||
dft1200(idft_in0,idft_out0,1);
|
||||
dft1200(idft_in1,idft_out1,1);
|
||||
dft1200(idft_in2,idft_out2,1);
|
||||
dft(DFT_1200,idft_in0,idft_out0,1);
|
||||
dft(DFT_1200,idft_in1,idft_out1,1);
|
||||
dft(DFT_1200,idft_in2,idft_out2,1);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -780,7 +780,6 @@ void ulsch_channel_compensation(int32_t **rxdataF_ext,
|
||||
#endif
|
||||
|
||||
for (rb=0; rb<nb_rb; rb++) {
|
||||
LOG_D(PHY,"comp: symbol %d rb %d\n",symbol,rb);
|
||||
// just compute channel magnitude without scaling, this is done after equalization for SC-FDMA
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
mmtmpU0 = _mm_madd_epi16(ul_ch128[0],ul_ch128[0]);
|
||||
|
||||
@@ -793,7 +793,7 @@ int dlsch_encoding_SIC(PHY_VARS_UE *ue,
|
||||
r_offset += lte_rate_matching_turbo(dlsch->harq_processes[harq_pid]->RTC[r],
|
||||
G, //G
|
||||
dlsch->harq_processes[harq_pid]->w[r],
|
||||
dlsch->harq_processes[harq_pid]->e+r_offset,
|
||||
dlsch->harq_processes[harq_pid]->eDL+r_offset,
|
||||
dlsch->harq_processes[harq_pid]->C, // C
|
||||
dlsch->Nsoft, // Nsoft,
|
||||
dlsch->Mdlharq,
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
#include "PHY/MODULATION/modulation_UE.h"
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
#include "PHY/LTE_REFSIG/lte_refsig.h"
|
||||
#include "openair2/LAYER2/MAC/mac_proto.h"
|
||||
#include "common_lib.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
uint16_t *prach_root_sequence_map;
|
||||
uint16_t preamble_offset,preamble_shift;
|
||||
uint16_t preamble_index0,n_shift_ra,n_shift_ra_bar;
|
||||
uint16_t d_start,numshift;
|
||||
uint16_t d_start=-1,numshift;
|
||||
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
|
||||
//uint8_t Nsp=2;
|
||||
//uint8_t f_ra,t1_ra;
|
||||
@@ -338,11 +338,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
switch (ue->frame_parms.N_RB_UL) {
|
||||
case 6:
|
||||
if (prach_fmt == 4) {
|
||||
idft256(prachF,prach2,1);
|
||||
idft(IDFT_256,prachF,prach2,1);
|
||||
memmove( prach, prach+512, Ncp<<2 );
|
||||
prach_len = 256+Ncp;
|
||||
} else {
|
||||
idft1536(prachF,prach2,1);
|
||||
idft(IDFT_1536,prachF,prach2,1);
|
||||
memmove( prach, prach+3072, Ncp<<2 );
|
||||
prach_len = 1536+Ncp;
|
||||
|
||||
@@ -356,12 +356,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
|
||||
case 15:
|
||||
if (prach_fmt == 4) {
|
||||
idft512(prachF,prach2,1);
|
||||
idft(IDFT_512,prachF,prach2,1);
|
||||
//TODO: account for repeated format in dft output
|
||||
memmove( prach, prach+1024, Ncp<<2 );
|
||||
prach_len = 512+Ncp;
|
||||
} else {
|
||||
idft3072(prachF,prach2,1);
|
||||
idft(IDFT_3072,prachF,prach2,1);
|
||||
memmove( prach, prach+6144, Ncp<<2 );
|
||||
prach_len = 3072+Ncp;
|
||||
|
||||
@@ -376,11 +376,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
case 25:
|
||||
default:
|
||||
if (prach_fmt == 4) {
|
||||
idft1024(prachF,prach2,1);
|
||||
idft(IDFT_1024,prachF,prach2,1);
|
||||
memmove( prach, prach+2048, Ncp<<2 );
|
||||
prach_len = 1024+Ncp;
|
||||
} else {
|
||||
idft6144(prachF,prach2,1);
|
||||
idft(IDFT_6144,prachF,prach2,1);
|
||||
/*for (i=0;i<6144*2;i++)
|
||||
prach2[i]<<=1;*/
|
||||
memmove( prach, prach+12288, Ncp<<2 );
|
||||
@@ -396,11 +396,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
|
||||
case 50:
|
||||
if (prach_fmt == 4) {
|
||||
idft2048(prachF,prach2,1);
|
||||
idft(IDFT_2048,prachF,prach2,1);
|
||||
memmove( prach, prach+4096, Ncp<<2 );
|
||||
prach_len = 2048+Ncp;
|
||||
} else {
|
||||
idft12288(prachF,prach2,1);
|
||||
idft(IDFT_12288,prachF,prach2,1);
|
||||
memmove( prach, prach+24576, Ncp<<2 );
|
||||
prach_len = 12288+Ncp;
|
||||
|
||||
@@ -414,12 +414,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
|
||||
case 75:
|
||||
if (prach_fmt == 4) {
|
||||
idft3072(prachF,prach2,1);
|
||||
idft(IDFT_3072,prachF,prach2,1);
|
||||
//TODO: account for repeated format in dft output
|
||||
memmove( prach, prach+6144, Ncp<<2 );
|
||||
prach_len = 3072+Ncp;
|
||||
} else {
|
||||
idft18432(prachF,prach2,1);
|
||||
idft(IDFT_18432,prachF,prach2,1);
|
||||
memmove( prach, prach+36864, Ncp<<2 );
|
||||
prach_len = 18432+Ncp;
|
||||
|
||||
@@ -434,11 +434,11 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
case 100:
|
||||
if (ue->frame_parms.threequarter_fs == 0) {
|
||||
if (prach_fmt == 4) {
|
||||
idft4096(prachF,prach2,1);
|
||||
idft(IDFT_4096,prachF,prach2,1);
|
||||
memmove( prach, prach+8192, Ncp<<2 );
|
||||
prach_len = 4096+Ncp;
|
||||
} else {
|
||||
idft24576(prachF,prach2,1);
|
||||
idft(IDFT_24576,prachF,prach2,1);
|
||||
memmove( prach, prach+49152, Ncp<<2 );
|
||||
prach_len = 24576+Ncp;
|
||||
|
||||
@@ -449,12 +449,12 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
||||
}
|
||||
} else {
|
||||
if (prach_fmt == 4) {
|
||||
idft3072(prachF,prach2,1);
|
||||
idft(IDFT_3072,prachF,prach2,1);
|
||||
//TODO: account for repeated format in dft output
|
||||
memmove( prach, prach+6144, Ncp<<2 );
|
||||
prach_len = 3072+Ncp;
|
||||
} else {
|
||||
idft18432(prachF,prach2,1);
|
||||
idft(IDFT_18432,prachF,prach2,1);
|
||||
memmove( prach, prach+36864, Ncp<<2 );
|
||||
prach_len = 18432+Ncp;
|
||||
printf("Generated prach for 100 PRB, 3/4 sampling\n");
|
||||
|
||||
@@ -446,6 +446,13 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
Qprime = (ulsch->O + L) * ulsch->harq_processes[harq_pid]->Msc_initial*ulsch->harq_processes[harq_pid]->Nsymb_initial * ulsch->beta_offset_cqi_times8;
|
||||
else
|
||||
Qprime = 0;
|
||||
LOG_D(PHY,"Qprime %d, O_RI %d + %d, Msc %d, Nym %d beta %d\n",
|
||||
Qprime,
|
||||
ulsch->O, L,
|
||||
ulsch->harq_processes[harq_pid]->Msc_initial,
|
||||
ulsch->harq_processes[harq_pid]->Nsymb_initial,
|
||||
ulsch->beta_offset_cqi_times8);
|
||||
|
||||
|
||||
if (Qprime > 0) {
|
||||
if ((Qprime % (8*sumKr)) > 0)
|
||||
@@ -455,7 +462,7 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
}
|
||||
|
||||
G = ulsch->harq_processes[harq_pid]->nb_rb * (12 * Q_m) * (ulsch->Nsymb_pusch);
|
||||
|
||||
LOG_D(PHY,"G: rb %d * ( 12 * Qm %d ) * nsymb %d, Qprime %d, O_RI %d\n", ulsch->harq_processes[harq_pid]->nb_rb, Q_m, ulsch->Nsymb_pusch, Qprime, ulsch->O_RI);
|
||||
if (Qprime > (G - ulsch->O_RI))
|
||||
Qprime = G - ulsch->O_RI;
|
||||
|
||||
@@ -465,6 +472,7 @@ uint32_t ulsch_encoding(uint8_t *a,
|
||||
|
||||
|
||||
G = G - Q_RI - Q_CQI;
|
||||
LOG_D(PHY,"new G: %d, Q_RI %d Q_CQI %d\n", G , Q_RI , Q_CQI);
|
||||
ulsch->harq_processes[harq_pid]->G = G;
|
||||
|
||||
/*
|
||||
|
||||
@@ -104,9 +104,9 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
|
||||
|
||||
switch (Msc_PUSCH) {
|
||||
case 12:
|
||||
dft12((int16_t *)dft_in0,(int16_t *)dft_out0);
|
||||
dft12((int16_t *)dft_in1,(int16_t *)dft_out1);
|
||||
dft12((int16_t *)dft_in2,(int16_t *)dft_out2);
|
||||
dft(DFT_12,(int16_t *)dft_in0,(int16_t *)dft_out0,0);
|
||||
dft(DFT_12,(int16_t *)dft_in1,(int16_t *)dft_out1,0);
|
||||
dft(DFT_12,(int16_t *)dft_in2,(int16_t *)dft_out2,0);
|
||||
|
||||
/*
|
||||
dft12f(&((__m128i *)dft_in0)[0],&((__m128i *)dft_in0)[1],&((__m128i *)dft_in0)[2],&((__m128i *)dft_in0)[3],&((__m128i *)dft_in0)[4],&((__m128i *)dft_in0)[5],&((__m128i *)dft_in0)[6],&((__m128i *)dft_in0)[7],&((__m128i *)dft_in0)[8],&((__m128i *)dft_in0)[9],&((__m128i *)dft_in0)[10],&((__m128i *)dft_in0)[11],
|
||||
@@ -138,201 +138,201 @@ void dft_lte(int32_t *z,int32_t *d, int32_t Msc_PUSCH, uint8_t Nsymb)
|
||||
break;
|
||||
|
||||
case 24:
|
||||
dft24((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft24((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft24((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_24,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_24,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_24,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 36:
|
||||
dft36((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft36((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft36((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_36,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_36,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_36,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 48:
|
||||
dft48((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft48((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft48((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_48,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_48,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_48,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 60:
|
||||
dft60((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft60((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft60((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_60,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_60,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_60,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 72:
|
||||
dft72((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft72((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft72((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_72,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_72,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_72,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 96:
|
||||
dft96((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft96((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft96((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_96,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_96,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_96,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 108:
|
||||
dft108((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft108((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft108((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_108,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_108,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_108,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 120:
|
||||
dft120((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft120((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft120((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_120,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_120,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_120,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 144:
|
||||
dft144((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft144((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft144((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_144,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_144,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_144,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 180:
|
||||
dft180((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft180((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft180((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_180,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_180,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_180,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 192:
|
||||
dft192((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft192((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft192((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_192,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_192,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_192,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 216:
|
||||
dft216((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft216((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft216((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_216,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_216,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_216,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 240:
|
||||
dft240((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft240((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft240((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_240,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_240,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_240,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 288:
|
||||
dft288((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft288((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft288((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_288,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_288,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_288,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 300:
|
||||
dft300((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft300((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft300((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_300,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_300,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_300,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 324:
|
||||
dft324((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft324((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft324((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_324,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_324,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_324,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 360:
|
||||
dft360((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft360((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft360((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_360,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_360,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_360,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 384:
|
||||
dft384((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft384((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft384((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_384,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_384,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_384,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 432:
|
||||
dft432((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft432((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft432((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_432,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_432,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_432,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 480:
|
||||
dft480((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft480((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft480((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_480,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_480,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_480,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 540:
|
||||
dft540((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft540((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft540((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_540,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_540,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_540,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 576:
|
||||
dft576((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft576((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft576((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_576,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_576,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_576,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 600:
|
||||
dft600((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft600((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft600((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_600,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_600,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_600,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 648:
|
||||
dft648((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft648((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft648((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_648,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_648,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_648,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 720:
|
||||
dft720((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft720((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft720((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_720,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_720,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_720,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 768:
|
||||
dft768((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft768((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft768((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_768,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_768,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_768,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 864:
|
||||
dft864((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft864((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft864((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_864,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_864,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_864,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 900:
|
||||
dft900((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft900((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft900((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_900,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_900,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_900,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 960:
|
||||
dft960((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft960((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft960((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_960,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_960,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_960,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 972:
|
||||
dft972((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft972((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft972((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_972,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_972,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_972,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 1080:
|
||||
dft1080((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft1080((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft1080((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_1080,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_1080,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_1080,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 1152:
|
||||
dft1152((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft1152((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft1152((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_1152,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_1152,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_1152,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
|
||||
case 1200:
|
||||
dft1200((int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft1200((int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft1200((int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
dft(DFT_1200,(int16_t*)dft_in0,(int16_t*)dft_out0,1);
|
||||
dft(DFT_1200,(int16_t*)dft_in1,(int16_t*)dft_out1,1);
|
||||
dft(DFT_1200,(int16_t*)dft_in2,(int16_t*)dft_out2,1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@ void nr_dft(int32_t *z, int32_t *d, uint32_t Msc_PUSCH)
|
||||
|
||||
switch (Msc_PUSCH) {
|
||||
case 12:
|
||||
dft12((int16_t *)dft_in0, (int16_t *)dft_out0);
|
||||
dft(DFT_12,(int16_t *)dft_in0, (int16_t *)dft_out0,0);
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
norm128 = _mm_set1_epi16(9459);
|
||||
@@ -260,135 +260,135 @@ void nr_dft(int32_t *z, int32_t *d, uint32_t Msc_PUSCH)
|
||||
break;
|
||||
|
||||
case 24:
|
||||
dft24((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_24,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 36:
|
||||
dft36((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_36,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 48:
|
||||
dft48((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_48,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 60:
|
||||
dft60((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_60,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 72:
|
||||
dft72((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_72,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 96:
|
||||
dft96((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_96,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 108:
|
||||
dft108((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_108,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 120:
|
||||
dft120((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_120,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 144:
|
||||
dft144((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_144,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 180:
|
||||
dft180((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_180,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 192:
|
||||
dft192((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_192,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 216:
|
||||
dft216((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_216,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 240:
|
||||
dft240((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_240,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 288:
|
||||
dft288((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_288,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 300:
|
||||
dft300((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_300,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 324:
|
||||
dft324((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_324,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 360:
|
||||
dft360((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_360,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 384:
|
||||
dft384((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_384,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 432:
|
||||
dft432((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_432,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 480:
|
||||
dft480((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_480,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 540:
|
||||
dft540((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_540,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 576:
|
||||
dft576((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_576,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 600:
|
||||
dft600((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_600,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 648:
|
||||
dft648((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_648,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 720:
|
||||
dft720((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_720,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 768:
|
||||
dft768((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_768,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 864:
|
||||
dft864((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_864,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 900:
|
||||
dft900((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_900,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 960:
|
||||
dft960((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_960,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 972:
|
||||
dft972((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_960,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 1080:
|
||||
dft1080((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_1080,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 1152:
|
||||
dft1152((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_1152,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
|
||||
case 1200:
|
||||
dft1200((int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
dft(DFT_1200,(int16_t*)dft_in0, (int16_t*)dft_out0, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,41 +95,41 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
|
||||
volatile int *output_ptr=(int*)0;
|
||||
|
||||
int *temp_ptr=(int*)0;
|
||||
void (*idft)(int16_t *,int16_t *, int);
|
||||
idft_size_idx_t idftsize;
|
||||
|
||||
switch (fftsize) {
|
||||
case 128:
|
||||
idft = idft128;
|
||||
idftsize = IDFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
idft = idft256;
|
||||
idftsize = IDFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
idft = idft512;
|
||||
idftsize = IDFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
idft = idft1024;
|
||||
idftsize = IDFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
idft = idft1536;
|
||||
idftsize = IDFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
idft = idft2048;
|
||||
idftsize = IDFT_2048;
|
||||
break;
|
||||
|
||||
case 3072:
|
||||
idft = idft3072;
|
||||
idftsize = IDFT_3072;
|
||||
break;
|
||||
case 4096:
|
||||
idft = idft4096;
|
||||
idftsize = IDFT_4096;
|
||||
break;
|
||||
default:
|
||||
idft = idft512;
|
||||
idftsize = IDFT_512;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -148,12 +148,12 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
|
||||
|
||||
#ifndef __AVX2__
|
||||
// handle 128-bit alignment for 128-bit SIMD (SSE4,NEON,AltiVEC)
|
||||
idft((int16_t *)&input[i*fftsize],
|
||||
idft(idftsize,(int16_t *)&input[i*fftsize],
|
||||
(fftsize==128) ? (int16_t *)temp : (int16_t *)&output[(i*fftsize) + ((1+i)*nb_prefix_samples)],
|
||||
1);
|
||||
#else
|
||||
// on AVX2 need 256-bit alignment
|
||||
idft((int16_t *)&input[i*fftsize],
|
||||
idft(idftsize,(int16_t *)&input[i*fftsize],
|
||||
(int16_t *)temp,
|
||||
1);
|
||||
|
||||
|
||||
@@ -49,36 +49,36 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
|
||||
int uespec_pilot[9][1200];*/
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsizeidx;
|
||||
int tmp_dft_in[2048] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
dftsizeidx = DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dftsizeidx = DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dftsizeidx = DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dftsizeidx = DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dftsizeidx = DFT_2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dft = dft512;
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -118,13 +118,13 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *)&common_vars->rxdata[aa][rx_offset % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
dft(dftsizeidx,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
@@ -153,10 +153,10 @@ int slot_fep(PHY_VARS_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
dft(dftsizeidx,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
}
|
||||
|
||||
@@ -247,36 +247,36 @@ int front_end_fft(PHY_VARS_UE *ue,
|
||||
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
|
||||
LTE_DL_UE_HARQ_t *dlsch0_harq = dlsch_ue[0]->harq_processes[harq_pid];
|
||||
int uespec_pilot[9][1200];*/
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsizeidx;
|
||||
int tmp_dft_in[2048] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dft = dft512;
|
||||
dftsizeidx = DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dftsizeidx = DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dftsizeidx = DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dftsizeidx = DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dftsizeidx = DFT_2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -319,11 +319,11 @@ int front_end_fft(PHY_VARS_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *)&common_vars->rxdata[aa][rx_offset % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
dft(dftsizeidx,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
}
|
||||
@@ -349,10 +349,10 @@ int front_end_fft(PHY_VARS_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
dft(dftsizeidx,(int16_t *)tmp_dft_in,
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
} else { // use dft input from RX buffer directly
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,35 +42,35 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
unsigned int subframe_offset;
|
||||
// int i;
|
||||
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsizeidx;
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dft = dft512;
|
||||
dftsizeidx = DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dftsizeidx = DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dftsizeidx = DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dftsizeidx = DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dftsizeidx = DFT_2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dftsizeidx = DFT_512;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
nb_prefix_samples0 +
|
||||
subframe_offset -
|
||||
SOFFSET) % frame_length_samples],
|
||||
@@ -131,7 +131,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
(frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
|
||||
(frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1) +
|
||||
subframe_offset-
|
||||
@@ -208,43 +208,43 @@ int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
|
||||
int ofdm_symbol_size;
|
||||
unsigned int subframe_offset;
|
||||
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsizeidx;
|
||||
AssertFatal(frame_parms->frame_type == FDD, "Frame is TDD!\n");
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft1536;
|
||||
dftsizeidx = DFT_1536;
|
||||
ofdm_symbol_size=1536;
|
||||
nb_prefix_samples=384;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
AssertFatal(1==0,"FeMBMS dft3072 not implemented\n");
|
||||
dft = dft3072;
|
||||
dftsizeidx = DFT_3072;
|
||||
ofdm_symbol_size=3072;
|
||||
nb_prefix_samples=768;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft6144;
|
||||
dftsizeidx = DFT_6144;
|
||||
nb_prefix_samples=1536;
|
||||
ofdm_symbol_size=6144;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft12288;
|
||||
dftsizeidx = DFT_12288;
|
||||
nb_prefix_samples=3072;
|
||||
ofdm_symbol_size=12288;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft18432;
|
||||
dftsizeidx = DFT_18432;
|
||||
nb_prefix_samples=4608;
|
||||
ofdm_symbol_size=18432;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft24576;
|
||||
dftsizeidx = DFT_24576;
|
||||
nb_prefix_samples=6144;
|
||||
ofdm_symbol_size=24576;
|
||||
break;
|
||||
@@ -265,7 +265,7 @@ int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
dft(dftsizeidx,(int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
nb_prefix_samples +
|
||||
subframe_offset -
|
||||
SOFFSET) % frame_length_samples],
|
||||
|
||||
@@ -62,44 +62,44 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
unsigned int rx_offset;
|
||||
|
||||
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsize;
|
||||
int tmp_dft_in[8192] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
dftsize = DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
dftsize = DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
dftsize = DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
dftsize = DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
dftsize = DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
dftsize = DFT_2048;
|
||||
break;
|
||||
|
||||
case 3072:
|
||||
dft = dft3072;
|
||||
dftsize = DFT_3072;
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
dft = dft4096;
|
||||
dftsize = DFT_4096;
|
||||
break;
|
||||
|
||||
case 8192:
|
||||
dft = dft8192;
|
||||
dftsize = DFT_8192;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -155,14 +155,14 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *) &common_vars->rxdata[aa][rx_offset % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
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
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
|
||||
dft((int16_t *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsize,(int16_t *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(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);
|
||||
@@ -183,11 +183,11 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
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((int16_t *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
dft(dftsize,(int16_t *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(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
|
||||
@@ -237,44 +237,44 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
unsigned int rx_offset;
|
||||
|
||||
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsize;
|
||||
int tmp_dft_in[8192] __attribute__ ((aligned (32))); // This is for misalignment issues for 6 and 15 PRBs
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
dftsize = DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
dftsize = DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
dftsize = DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
dftsize = DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
dftsize = DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
dftsize = DFT_2048;
|
||||
break;
|
||||
|
||||
case 3072:
|
||||
dft = dft3072;
|
||||
dftsize = DFT_3072;
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
dft = dft4096;
|
||||
dftsize = DFT_4096;
|
||||
break;
|
||||
|
||||
case 8192:
|
||||
dft = dft8192;
|
||||
dftsize = DFT_8192;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -330,14 +330,15 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *) &common_vars->rxdata[aa][rx_offset],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
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
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
|
||||
dft((int16_t *) &common_vars->rxdata[aa][rx_offset],
|
||||
|
||||
dft(dftsize,(int16_t *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(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);
|
||||
@@ -358,11 +359,10 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue,
|
||||
memcpy((void *)tmp_dft_in,
|
||||
(void *) &common_vars->rxdata[aa][rx_offset],
|
||||
frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
dft((int16_t *)tmp_dft_in,
|
||||
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((int16_t *) &common_vars->rxdata[aa][rx_offset],
|
||||
dft(dftsize,(int16_t *) &common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
|
||||
(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
|
||||
@@ -401,43 +401,43 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
int tmp_dft_in[8192] __attribute__ ((aligned (32)));
|
||||
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
dft_size_idx_t dftsize;
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
dftsize = DFT_128;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
dftsize = DFT_256;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
dftsize = DFT_512;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
dftsize = DFT_1024;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
dftsize = DFT_1536;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
dftsize = DFT_2048;
|
||||
break;
|
||||
|
||||
case 4096:
|
||||
dft = dft4096;
|
||||
dftsize = DFT_4096;
|
||||
break;
|
||||
|
||||
case 8192:
|
||||
dft = dft8192;
|
||||
dftsize = DFT_8192;
|
||||
break;
|
||||
|
||||
default:
|
||||
dft = dft512;
|
||||
dftsize = DFT_512;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -457,12 +457,12 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms,
|
||||
(void *) &rxdata[0],
|
||||
(frame_parms->ofdm_symbol_size-sample_offset+rxdata_offset)*sizeof(int));
|
||||
|
||||
dft((int16_t *)&tmp_dft_in,
|
||||
dft(dftsize,(int16_t *)&tmp_dft_in,
|
||||
(int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
|
||||
}
|
||||
else
|
||||
dft((int16_t *)&rxdata[rxdata_offset-sample_offset],
|
||||
(int16_t *)&rxdataF[symbol * frame_parms->ofdm_symbol_size], 1);
|
||||
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;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user