Merge branch 'develop' into NR_RRC_harq_hacks
This commit is contained in:
@@ -62,6 +62,7 @@ def r2labUE0IpAddr = r2labBaseIpAddr + r2labUE0Idx
|
||||
def r2labENB1Idx = '16'
|
||||
def r2labENB1 = 'fit' + r2labENB1Idx
|
||||
def r2labENB1IpAddr = r2labBaseIpAddr + r2labENB1Idx
|
||||
def r2labDoAllOff = true
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
@@ -136,22 +137,28 @@ pipeline {
|
||||
sh "python3 /home/eurecom/inria-scripts/booking-lease.py --book-lease --from ${BOOK_TIMESTAMP}T${r2labStartTime} --duration ${r2labDuration} --slice inria_oaici ${r2labuser} ${r2labpassword}"
|
||||
sh "python3 /home/eurecom/inria-scripts/booking-lease.py --get-leases ${r2labuser} ${r2labpassword} | grep -v nightly"
|
||||
}
|
||||
|
||||
// Adding a tempo after booking leases
|
||||
sh "sleep 10"
|
||||
LEASE_STATUS = sh returnStdout: true, script: "ssh -t inria_oaici@faraday.inria.fr 'rleases --check'"
|
||||
LEASE_STATUS = LEASE_STATUS.trim()
|
||||
if (LEASE_STATUS ==~ /.*Access currently denied to inria_oaici.*/) {
|
||||
r2labDoAllOff = false
|
||||
currentBuild.result = 'ABORTED'
|
||||
error('Stopping early because R2LAB not available')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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'
|
||||
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}'"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labPythonExeIdx} > /dev/null 2>&1'"
|
||||
} catch (Exception e) {
|
||||
echo "Why is it wrong?"
|
||||
}
|
||||
@@ -164,14 +171,12 @@ pipeline {
|
||||
|
||||
echo '\u2705 \u001B[32mLoad Image for two (2) eNBs\u001B[0m'
|
||||
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}"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labENB0Idx},${r2labENB1Idx} > /dev/null 2>&1'"
|
||||
} 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}'"
|
||||
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labENB0Idx},${r2labENB1Idx}'"
|
||||
} catch (Exception e) {
|
||||
echo "Why is it wrong?"
|
||||
}
|
||||
@@ -441,9 +446,11 @@ pipeline {
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
echo '\u2705 \u001B[32mShutdown every node\u001B[0m'
|
||||
sh 'ssh -t inria_oaici@faraday.inria.fr "all-off"'
|
||||
sh 'ssh -t inria_oaici@faraday.inria.fr "all-off"'
|
||||
if (r2labDoAllOff) {
|
||||
echo '\u2705 \u001B[32mShutdown every node\u001B[0m'
|
||||
sh 'ssh -t inria_oaici@faraday.inria.fr "all-off"'
|
||||
sh 'ssh -t inria_oaici@faraday.inria.fr "all-off"'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ MODIFIED_FILES=`git log $TARGET_INIT_COMMIT..$MERGE_COMMMIT --oneline --name-sta
|
||||
NB_WARNINGS_FILES=0
|
||||
|
||||
# Retrieve list of warnings
|
||||
LIST_WARNING_FILES=`egrep "error:|warning:" archives/*/*.Rel15.txt archives/*/basic_simulator_*txt | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
|
||||
LIST_WARNING_FILES=`egrep "error:|warning:" archives/*/*.Rel15.txt | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | sed -e "s#^.*/home/ubuntu/tmp/##" -e "s#^.*/tmp/CI-eNB/##" -e "s#common/utils/.*/itti#common/utils/itti#" | awk -F ":" '{print $1}' | sort | uniq`
|
||||
|
||||
echo ""
|
||||
echo "List of files that have been modified by the Merge Request AND"
|
||||
|
||||
+113
-14
@@ -63,6 +63,8 @@ class EPCManagement():
|
||||
self.PcapFileName = ''
|
||||
self.htmlObj = None
|
||||
self.testCase_id = ''
|
||||
self.MmeIPAddress = ''
|
||||
self.containerPrefix = 'prod'
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# Setter and Getters on Public Members
|
||||
@@ -92,6 +94,10 @@ class EPCManagement():
|
||||
self.htmlObj = obj
|
||||
def SetTestCase_id(self, idx):
|
||||
self.testCase_id = idx
|
||||
def GetMmeIPAddress(self):
|
||||
return self.MmeIPAddress
|
||||
def SetContainerPrefix(self, prefix):
|
||||
self.containerPrefix = prefix
|
||||
|
||||
#-----------------------------------------------------------
|
||||
# EPC management functions
|
||||
@@ -104,7 +110,14 @@ class EPCManagement():
|
||||
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):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 Cassandra-based HSS in Docker')
|
||||
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('docker exec -d ' + self.containerPrefix + '-oai-hss /bin/bash -c "nohup tshark -i eth0 -i eth1 -w /tmp/hss_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-hss /bin/bash -c "nohup ./bin/oai_hss -j ./etc/hss_rel14.json --reloadkey true > hss_check_run.log 2>&1"', '\$', 5)
|
||||
elif 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')
|
||||
@@ -142,7 +155,12 @@ class EPCManagement():
|
||||
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):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 MME in Docker')
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup tshark -i eth0 -i lo:s10 -w /tmp/mme_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-mme /bin/bash -c "nohup ./bin/oai_mme -c ./etc/mme.conf > mme_check_run.log 2>&1"', '\$', 5)
|
||||
elif 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)
|
||||
@@ -169,6 +187,25 @@ class EPCManagement():
|
||||
if self.htmlObj is not None:
|
||||
self.htmlObj.CreateHtmlTestRow(self.Type, 'OK', CONST.ALL_PROCESSES_OK)
|
||||
|
||||
def SetMmeIPAddress(self):
|
||||
# Not an error if we don't need an EPC
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
return
|
||||
if self.IPAddress == 'none':
|
||||
return
|
||||
# Only in case of Docker containers, MME IP address is not the EPC HOST IP address
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
mySSH.command('docker inspect --format="MME_IP_ADDR = {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}" ' + self.containerPrefix + '-oai-mme', '\$', 5)
|
||||
result = re.search('MME_IP_ADDR = (?P<mme_ip_addr>[0-9\.]+)', mySSH.getBefore())
|
||||
if result is not None:
|
||||
self.MmeIPAddress = result.group('mme_ip_addr')
|
||||
logging.debug('MME IP Address is ' + self.MmeIPAddress)
|
||||
mySSH.close()
|
||||
else:
|
||||
self.MmeIPAddress = self.IPAddress
|
||||
|
||||
def InitializeSPGW(self):
|
||||
if self.IPAddress == '' or self.UserName == '' or self.Password == '' or self.SourceCodePath == '' or self.Type == '':
|
||||
HELP.GenericHelp(CONST.Version)
|
||||
@@ -176,7 +213,15 @@ class EPCManagement():
|
||||
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):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
logging.debug('Using the OAI EPC Release 14 SPGW-CUPS in Docker')
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "nohup tshark -i eth0 -i lo:p5c -i lo:s5c -w /tmp/spgwc_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "nohup tshark -i eth0 -w /tmp/spgwu_check_run.pcap 2>&1 > /dev/null"', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "nohup ./bin/oai_spgwc -o -c ./etc/spgw_c.conf > spgwc_check_run.log 2>&1"', '\$', 5)
|
||||
time.sleep(5)
|
||||
mySSH.command('docker exec -d ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "nohup ./bin/oai_spgwu -o -c ./etc/spgw_u.conf > spgwu_check_run.log 2>&1"', '\$', 5)
|
||||
elif 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)
|
||||
@@ -205,8 +250,11 @@ class EPCManagement():
|
||||
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):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "ps aux | grep oai_hss"', '\$', 5)
|
||||
else:
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never hss | grep -v grep', '\$', 5)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE) or re.match('OAI-Rel14-Docker', 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())
|
||||
@@ -227,8 +275,13 @@ class EPCManagement():
|
||||
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):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "ps aux | grep oai_mme"', '\$', 5)
|
||||
else:
|
||||
mySSH.command('stdbuf -o0 ps -aux | grep --color=never mme | grep -v grep', '\$', 5)
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
result = re.search('oai_mme -c ', mySSH.getBefore())
|
||||
elif 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())
|
||||
@@ -249,7 +302,13 @@ class EPCManagement():
|
||||
try:
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "ps aux | grep oai_spgwc"', '\$', 5)
|
||||
result = re.search('oai_spgwc -o -c ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "ps aux | grep oai_spgwu"', '\$', 5)
|
||||
result = re.search('oai_spgwu -o -c ', mySSH.getBefore())
|
||||
elif 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):
|
||||
@@ -272,7 +331,14 @@ class EPCManagement():
|
||||
def TerminateHSS(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "killall --signal SIGINT oai_hss tshark"', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "ps aux | grep oai_hss"', '\$', 5)
|
||||
result = re.search('oai_hss -j ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-hss /bin/bash -c "killall --signal SIGKILL oai_hss"', '\$', 5)
|
||||
elif 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)
|
||||
@@ -301,7 +367,14 @@ class EPCManagement():
|
||||
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):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "killall --signal SIGINT oai_mme tshark"', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "ps aux | grep oai_mme"', '\$', 5)
|
||||
result = re.search('oai_mme -c ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-mme /bin/bash -c "killall --signal SIGKILL oai_mme"', '\$', 5)
|
||||
elif 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)
|
||||
@@ -321,7 +394,19 @@ class EPCManagement():
|
||||
def TerminateSPGW(self):
|
||||
mySSH = SSH.SSHConnection()
|
||||
mySSH.open(self.IPAddress, self.UserName, self.Password)
|
||||
if re.match('OAI-Rel14-CUPS', self.Type, re.IGNORECASE):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "killall --signal SIGINT oai_spgwc tshark"', '\$', 5)
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "killall --signal SIGINT oai_spgwu tshark"', '\$', 5)
|
||||
time.sleep(2)
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "ps aux | grep oai_spgwc"', '\$', 5)
|
||||
result = re.search('oai_spgwc -o -c ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwc /bin/bash -c "killall --signal SIGKILL oai_spgwc"', '\$', 5)
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "ps aux | grep oai_spgwu"', '\$', 5)
|
||||
result = re.search('oai_spgwu -o -c ', mySSH.getBefore())
|
||||
if result is not None:
|
||||
mySSH.command('docker exec -it ' + self.containerPrefix + '-oai-spgwu-tiny /bin/bash -c "killall --signal SIGKILL oai_spgwu"', '\$', 5)
|
||||
elif 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)
|
||||
@@ -355,7 +440,11 @@ class EPCManagement():
|
||||
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):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/openair-hss/hss_check_run.log .', '\$', 60)
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-hss:/tmp/hss_check_run.pcap .', '\$', 60)
|
||||
mySSH.command('zip hss.log.zip hss_check_run.*', '\$', 60)
|
||||
elif 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):
|
||||
@@ -373,7 +462,11 @@ class EPCManagement():
|
||||
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):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/openair-mme/mme_check_run.log .', '\$', 60)
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-mme:/tmp/mme_check_run.pcap .', '\$', 60)
|
||||
mySSH.command('zip mme.log.zip mme_check_run.*', '\$', 60)
|
||||
elif 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):
|
||||
@@ -388,7 +481,13 @@ class EPCManagement():
|
||||
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):
|
||||
if re.match('OAI-Rel14-Docker', self.Type, re.IGNORECASE):
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/openair-spgwc/spgwc_check_run.log .', '\$', 60)
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/openair-spgwu-tiny/spgwu_check_run.log .', '\$', 60)
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwc:/tmp/spgwc_check_run.pcap .', '\$', 60)
|
||||
mySSH.command('docker cp ' + self.containerPrefix + '-oai-spgwu-tiny:/tmp/spgwu_check_run.pcap .', '\$', 60)
|
||||
mySSH.command('zip spgw.log.zip spgw*_check_run.*', '\$', 60)
|
||||
elif 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):
|
||||
|
||||
+56
-16
@@ -176,7 +176,7 @@ class OaiCiTest():
|
||||
SSH.command('mkdir -p log', '\$', 5)
|
||||
SSH.command('chmod 777 log', '\$', 5)
|
||||
# no need to remove in log (git clean did the trick)
|
||||
SSH.command('stdbuf -o0 ./build_oai ' + self.Build_OAI_UE_args + ' 2>&1 | stdbuf -o0 tee compile_oai_ue.log', 'Bypassing the Tests|build have failed', 600)
|
||||
SSH.command('stdbuf -o0 ./build_oai ' + self.Build_OAI_UE_args + ' 2>&1 | stdbuf -o0 tee compile_oai_ue.log', 'Bypassing the Tests|build have failed', 900)
|
||||
SSH.command('ls ran_build/build', '\$', 3)
|
||||
SSH.command('ls ran_build/build', '\$', 3)
|
||||
buildStatus = True
|
||||
@@ -403,23 +403,50 @@ class OaiCiTest():
|
||||
if (outterLoopCounter == 0):
|
||||
doOutterLoop = False
|
||||
continue
|
||||
# We are now checking if sync w/ eNB DOES NOT OCCUR
|
||||
# Usually during the cell synchronization stage, the UE returns with No cell synchronization message
|
||||
# That is the case for LTE
|
||||
# In NR case, it's a positive message that will show if synchronization occurs
|
||||
doLoop = True
|
||||
if RAN.Getair_interface() == 'nr':
|
||||
fullSyncStatus = True
|
||||
doOutterLoop = False
|
||||
loopCounter = 10
|
||||
else:
|
||||
# We are now checking if sync w/ eNB DOES NOT OCCUR
|
||||
# Usually during the cell synchronization stage, the UE returns with No cell synchronization message
|
||||
doLoop = True
|
||||
loopCounter = 10
|
||||
while (doLoop):
|
||||
loopCounter = loopCounter - 1
|
||||
if (loopCounter == 0):
|
||||
while (doLoop):
|
||||
loopCounter = loopCounter - 1
|
||||
if (loopCounter == 0):
|
||||
if RAN.Getair_interface() == 'nr':
|
||||
# Here we do have great chances that UE did NOT cell-sync w/ gNB
|
||||
doLoop = False
|
||||
fullSyncStatus = False
|
||||
logging.debug('Never seen the NR-Sync message (Measured Carrier Frequency) --> try again')
|
||||
time.sleep(6)
|
||||
# Stopping the NR-UE
|
||||
SSH.command('ps -aux | grep --text --color=never softmodem | grep -v grep', '\$', 4)
|
||||
result = re.search('nr-uesoftmodem', SSH.getBefore())
|
||||
if result is not None:
|
||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S killall --signal=SIGINT nr-uesoftmodem', '\$', 4)
|
||||
time.sleep(6)
|
||||
else:
|
||||
# Here we do have a great chance that the UE did cell-sync w/ eNB
|
||||
doLoop = False
|
||||
doOutterLoop = False
|
||||
fullSyncStatus = True
|
||||
continue
|
||||
SSH.command('stdbuf -o0 cat ue_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync"', '\$', 4)
|
||||
SSH.command('stdbuf -o0 cat ue_' + self.testCase_id + '.log | egrep --text --color=never -i "wait|sync|Frequency"', '\$', 4)
|
||||
if RAN.Getair_interface() == 'nr':
|
||||
# Positive messaging -->
|
||||
result = re.search('Measured Carrier Frequency', SSH.getBefore())
|
||||
if result is not None:
|
||||
doLoop = False
|
||||
doOutterLoop = False
|
||||
fullSyncStatus = True
|
||||
else:
|
||||
time.sleep(6)
|
||||
else:
|
||||
# Negative messaging -->
|
||||
result = re.search('No cell synchronization found', SSH.getBefore())
|
||||
if result is None:
|
||||
time.sleep(6)
|
||||
@@ -432,13 +459,22 @@ class OaiCiTest():
|
||||
result = re.search('lte-uesoftmodem', SSH.getBefore())
|
||||
if result is not None:
|
||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S killall --signal=SIGINT lte-uesoftmodem', '\$', 4)
|
||||
outterLoopCounter = outterLoopCounter - 1
|
||||
if (outterLoopCounter == 0):
|
||||
doOutterLoop = False
|
||||
outterLoopCounter = outterLoopCounter - 1
|
||||
if (outterLoopCounter == 0):
|
||||
doOutterLoop = False
|
||||
|
||||
if fullSyncStatus and gotSyncStatus and RAN.Getair_interface() == 'lte':
|
||||
result = re.search('--no-L2-connect', str(self.Initialize_OAI_UE_args))
|
||||
if result is None:
|
||||
if fullSyncStatus and gotSyncStatus:
|
||||
doInterfaceCheck = False
|
||||
if RAN.Getair_interface() == 'lte':
|
||||
result = re.search('--no-L2-connect', str(self.Initialize_OAI_UE_args))
|
||||
if result is None:
|
||||
doInterfaceCheck = True
|
||||
# For the moment, only in explicit noS1 without kernel module (ie w/ tunnel interface)
|
||||
if RAN.Getair_interface() == 'nr':
|
||||
result = re.search('--noS1 --nokrnmod 1', str(self.Initialize_OAI_UE_args))
|
||||
if result is not None:
|
||||
doInterfaceCheck = True
|
||||
if doInterfaceCheck:
|
||||
SSH.command('ifconfig oaitun_ue1', '\$', 4)
|
||||
SSH.command('ifconfig oaitun_ue1', '\$', 4)
|
||||
# ifconfig output is different between ubuntu 16 and ubuntu 18
|
||||
@@ -3316,10 +3352,13 @@ while len(argvs) > 1:
|
||||
EPC.SetSourceCodePath(matchReg.group(1))
|
||||
elif re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCType=(.+)$', myArgv, re.IGNORECASE)
|
||||
if re.match('OAI', matchReg.group(1), re.IGNORECASE) or re.match('ltebox', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-CUPS', matchReg.group(1), re.IGNORECASE):
|
||||
if re.match('OAI', matchReg.group(1), re.IGNORECASE) or re.match('ltebox', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-CUPS', matchReg.group(1), re.IGNORECASE) or re.match('OAI-Rel14-Docker', matchReg.group(1), re.IGNORECASE):
|
||||
EPC.SetType(matchReg.group(1))
|
||||
else:
|
||||
sys.exit('Invalid EPC Type: ' + matchReg.group(1) + ' -- (should be OAI or ltebox or OAI-Rel14-CUPS)')
|
||||
sys.exit('Invalid EPC Type: ' + matchReg.group(1) + ' -- (should be OAI or ltebox or OAI-Rel14-CUPS or OAI-Rel14-Docker)')
|
||||
elif re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-EPCContainerPrefix=(.+)$', myArgv, re.IGNORECASE)
|
||||
EPC.SetContainerPrefix(matchReg.group(1))
|
||||
elif re.match('^\-\-ADBIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||
matchReg = re.match('^\-\-ADBIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||
CiTestObj.ADBIPAddress = matchReg.group(1)
|
||||
@@ -3542,6 +3581,7 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
|
||||
sys.exit(1)
|
||||
if (EPC.GetIPAddress() != '') and (EPC.GetIPAddress() != 'none'):
|
||||
CiTestObj.CheckFlexranCtrlInstallation()
|
||||
EPC.SetMmeIPAddress()
|
||||
|
||||
#get the list of tests to be done
|
||||
todo_tests=[]
|
||||
|
||||
+11
-3
@@ -522,8 +522,8 @@ class RANManagement():
|
||||
# Make a copy and adapt to EPC / eNB IP addresses
|
||||
mySSH.command('cp ' + full_config_file + ' ' + ci_full_config_file, '\$', 5)
|
||||
if self.epcObj is not None:
|
||||
localEpcIpAddr = self.epcObj.GetIPAddress()
|
||||
mySSH.command('sed -i -e \'s/CI_MME_IP_ADDR/' + localEpcIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
localMmeIpAddr = self.epcObj.GetMmeIPAddress()
|
||||
mySSH.command('sed -i -e \'s/CI_MME_IP_ADDR/' + localMmeIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
mySSH.command('sed -i -e \'s/CI_ENB_IP_ADDR/' + lIpAddr + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
mySSH.command('sed -i -e \'s/CI_RCC_IP_ADDR/' + self.eNBIPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
mySSH.command('sed -i -e \'s/CI_RRU1_IP_ADDR/' + self.eNB1IPAddress + '/\' ' + ci_full_config_file, '\$', 2);
|
||||
@@ -801,6 +801,7 @@ class RANManagement():
|
||||
pdcpFailure = 0
|
||||
ulschFailure = 0
|
||||
ulschReceiveOK = 0
|
||||
gnbRxTxWakeUpFailure = 0
|
||||
cdrxActivationMessageCount = 0
|
||||
dropNotEnoughRBs = 0
|
||||
mbmsRequestMsg = 0
|
||||
@@ -910,7 +911,10 @@ class RANManagement():
|
||||
result = re.search('PDCP.*Out of Resources.*reason', str(line))
|
||||
if result is not None:
|
||||
pdcpFailure += 1
|
||||
result = re.search('ULSCH in error in round', str(line))
|
||||
result = re.search('could not wakeup gNB rxtx process', str(line))
|
||||
if result is not None:
|
||||
gnbRxTxWakeUpFailure += 1
|
||||
result = re.search('ULSCH in error in round|ULSCH 0 in error', str(line))
|
||||
if result is not None:
|
||||
ulschFailure += 1
|
||||
result = re.search('ULSCH received ok', str(line))
|
||||
@@ -940,6 +944,10 @@ class RANManagement():
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(ulschReceiveOK) + ' "ULSCH received ok" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
htmleNBFailureMsg += statMsg + '\n'
|
||||
if gnbRxTxWakeUpFailure > 0:
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(gnbRxTxWakeUpFailure) + ' "could not wakeup gNB rxtx process" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
htmleNBFailureMsg += statMsg + '\n'
|
||||
if uciStatMsgCount > 0:
|
||||
statMsg = nodeB_prefix + 'NB showed ' + str(uciStatMsgCount) + ' "uci->stat" message(s)'
|
||||
logging.debug('\u001B[1;30;43m ' + statMsg + ' \u001B[0m')
|
||||
|
||||
@@ -53,7 +53,7 @@ function details_table {
|
||||
echo " <th>Message</th>" >> $3
|
||||
echo " </tr>" >> $3
|
||||
|
||||
LIST_MESSAGES=`egrep "error:|warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto"`
|
||||
LIST_MESSAGES=`egrep "error:|warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto|disabling jobserver mode"`
|
||||
COMPLETE_MESSAGE="start"
|
||||
for MESSAGE in $LIST_MESSAGES
|
||||
do
|
||||
@@ -146,7 +146,7 @@ function summary_table_row {
|
||||
else
|
||||
echo " <td bgcolor = \"red\" >$NB_ERRORS</th>" >> ./build_results.html
|
||||
fi
|
||||
NB_WARNINGS=`egrep "warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto" | egrep -c "warning:"`
|
||||
NB_WARNINGS=`egrep "warning:" $2 | egrep -v "jobserver unavailable|Clock skew detected.|flexran.proto|disabling jobserver mode" | egrep -c "warning:"`
|
||||
if [ $NB_WARNINGS -eq 0 ]
|
||||
then
|
||||
echo " <td bgcolor = \"green\" >$NB_WARNINGS</th>" >> ./build_results.html
|
||||
|
||||
@@ -52,15 +52,19 @@ class SSHConnection():
|
||||
self.picocom_closure = True
|
||||
|
||||
def open(self, ipaddress, username, password):
|
||||
extraSshOptions = ''
|
||||
count = 0
|
||||
connect_status = False
|
||||
if ipaddress == '192.168.18.197':
|
||||
extraSshOptions = ' -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
|
||||
while count < 4:
|
||||
self.ssh = pexpect.spawn('ssh', [username + '@' + ipaddress], timeout = 5)
|
||||
self.ssh = pexpect.spawn('ssh', [username + '@' + ipaddress + extraSshOptions], 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(['password:', username + '@'])
|
||||
if self.sshresponse == 0:
|
||||
self.ssh.sendline(password)
|
||||
self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
|
||||
if self.sshresponse == 0:
|
||||
count = 10
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Waiting for 35 seconds</desc>
|
||||
<idle_sleep_time_in_sec>35</idle_sleep_time_in_sec>
|
||||
<desc>Waiting for 55 seconds</desc>
|
||||
<idle_sleep_time_in_sec>55</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
<testCase id="000001">
|
||||
<class>IdleSleep</class>
|
||||
<desc>Waiting for 45 seconds</desc>
|
||||
<idle_sleep_time_in_sec>45</idle_sleep_time_in_sec>
|
||||
<desc>Waiting for 55 seconds</desc>
|
||||
<idle_sleep_time_in_sec>55</idle_sleep_time_in_sec>
|
||||
</testCase>
|
||||
|
||||
<testCase id="000002">
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<testCase id="030102">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<testCase id="030101">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --noS1 --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --noS1 --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<testCase id="030103">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95</Initialize_eNB_args>
|
||||
</testCase>
|
||||
|
||||
<testCase id="030201">
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<testCase id="030104">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB #0 (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT --eNBs.[0].enable_measurement_reports yes --eNBs.[0].enable_x2 yes --eNBs.[0].nr_cellid 123456</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --eNBs.[0].enable_measurement_reports yes --eNBs.[0].enable_x2 yes --eNBs.[0].nr_cellid 123456</Initialize_eNB_args>
|
||||
<eNB_instance>0</eNB_instance>
|
||||
<eNB_serverId>0</eNB_serverId>
|
||||
</testCase>
|
||||
@@ -72,7 +72,7 @@
|
||||
<testCase id="030105">
|
||||
<class>Initialize_eNB</class>
|
||||
<desc>Initialize eNB #1 (FDD/Band7/5MHz)</desc>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.slave.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT --eNBs.[0].enable_measurement_reports yes --eNBs.[0].enable_x2 yes --eNBs.[0].nr_cellid 98765</Initialize_eNB_args>
|
||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.slave.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --eNBs.[0].enable_measurement_reports yes --eNBs.[0].enable_x2 yes --eNBs.[0].nr_cellid 98765</Initialize_eNB_args>
|
||||
<eNB_instance>1</eNB_instance>
|
||||
<eNB_serverId>1</eNB_serverId>
|
||||
</testCase>
|
||||
|
||||
@@ -167,7 +167,7 @@ endif()
|
||||
|
||||
#
|
||||
set(CMAKE_C_FLAGS
|
||||
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC")
|
||||
"${CMAKE_C_FLAGS} ${C_FLAGS_PROCESSOR} -pipe -std=gnu99 -Wall -Wstrict-prototypes -fno-strict-aliasing -rdynamic -funroll-loops -Wno-packed-bitfield-compat -fPIC")
|
||||
# add autotools definitions that were maybe used!
|
||||
set(MKVER "'MAKE_VERSION(a,b,c)=((a)*256+(b)*16+c)'")
|
||||
set(CMAKE_C_FLAGS
|
||||
@@ -2255,26 +2255,28 @@ add_library(LFDS7
|
||||
${lfds7_queue} ${lfds7_ring} ${lfds7_qbss} ${lfds7_stack} ${lfds7_freelist} ${lfds7_btree} ${lfds7_hash} ${lfds7_ordered_list} ${lfds7_unordered_list} ${lfds7_misc}
|
||||
)
|
||||
|
||||
# Simulation library
|
||||
##########################
|
||||
set (SIMUSRC
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/random_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/rangen_double.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/abstraction.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/channel_sim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/rf.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/dac.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/adc.c
|
||||
${OPENAIR_DIR}/targets/ARCH/rfsimulator/apply_channelmod.c
|
||||
#${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
)
|
||||
add_library(SIMU_COMMON
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/random_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/rangen_double.c
|
||||
)
|
||||
|
||||
# Simulation library
|
||||
##########################
|
||||
add_library( SIMU SHARED ${SIMUSRC} )
|
||||
set (SIMUSRC
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/abstraction.c
|
||||
${OPENAIR1_DIR}/SIMULATION/TOOLS/channel_sim.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/rf.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/dac.c
|
||||
${OPENAIR1_DIR}/SIMULATION/RF/adc.c
|
||||
#${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
)
|
||||
|
||||
# Simulation library
|
||||
##########################
|
||||
add_library(SIMU SHARED ${SIMUSRC} )
|
||||
|
||||
add_library(SIMU_ETH
|
||||
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
|
||||
@@ -2432,9 +2434,11 @@ target_link_libraries(gnbscope ${XFORMS_LIBRARIES})
|
||||
|
||||
|
||||
add_library(rfsimulator MODULE
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/simulator.c
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/simulator.c
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/apply_channelmod.c
|
||||
${OPENAIR_TARGETS}/ARCH/rfsimulator/new_channel_sim.c
|
||||
)
|
||||
target_link_libraries(rfsimulator SIMU ${ATLAS_LIBRARIES})
|
||||
target_link_libraries(rfsimulator SIMU_COMMON ${ATLAS_LIBRARIES})
|
||||
|
||||
add_library(oai_iqplayer MODULE
|
||||
${OPENAIR_TARGETS}/ARCH/iqplayer/iqplayer_lib.c
|
||||
@@ -2456,9 +2460,9 @@ endif (${T_TRACER})
|
||||
#This rule and the following deal with it.
|
||||
add_custom_command (
|
||||
OUTPUT ${OPENAIR_DIR}/common/utils/T/T_IDs.h
|
||||
COMMAND $(MAKE) clean
|
||||
COMMAND $(MAKE)
|
||||
COMMAND $(MAKE) check_vcd
|
||||
COMMAND make clean
|
||||
COMMAND make -j2
|
||||
COMMAND make check_vcd
|
||||
WORKING_DIRECTORY ${OPENAIR_DIR}/common/utils/T
|
||||
DEPENDS ${OPENAIR_DIR}/common/utils/T/T_messages.txt
|
||||
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c
|
||||
@@ -2580,7 +2584,7 @@ add_dependencies(ocp-enb rrc_flag s1ap_flag x2_flag oai_iqplayer)
|
||||
target_link_libraries (ocp-enb
|
||||
-Wl,--start-group
|
||||
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
|
||||
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7
|
||||
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7 SIMU_COMMON
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
|
||||
-Wl,--end-group z dl)
|
||||
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
|
||||
@@ -2650,7 +2654,7 @@ target_link_libraries (lte-uesoftmodem
|
||||
-Wl,--start-group
|
||||
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB X2AP_ENB M2AP_LIB M2AP_ENB M3AP_LIB M3AP_ENB F1AP F1AP_LIB
|
||||
GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
|
||||
PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
PHY_UE PHY_RU LFDS L2_UE L2_LTE LFDS7 SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
|
||||
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${ATLAS_LIBRARIES}
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
@@ -2746,29 +2750,6 @@ target_link_libraries (nr-uesoftmodem ${T_LIB})
|
||||
|
||||
add_dependencies( nr-uesoftmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||
|
||||
# USIM process
|
||||
#################
|
||||
#add_executable(usim
|
||||
# ${OPENAIR3_DIR}/NAS/TOOLS/usim_data.c
|
||||
# ${OPENAIR3_DIR}/NAS/USER/API/USIM/usim_api.c
|
||||
# ${OPENAIR3_DIR}/NAS/USER/API/USIM/aka_functions.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/memory.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/nas_log.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/OctetString.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/TLVEncoder.c
|
||||
# )
|
||||
#target_link_libraries (usim ${NAS_LIB} UTIL ${ITTI_LIB} LFDS pthread rt nettle crypto m)
|
||||
|
||||
# ???
|
||||
#####################
|
||||
#add_executable(nvram
|
||||
# ${OPENAIR3_DIR}/NAS/TOOLS/ue_data.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/memory.c
|
||||
# ${OPENAIR3_DIR}/NAS/COMMON/UTIL/nas_log.c
|
||||
# )
|
||||
#target_link_libraries (nvram LIB_NAS_UE UTIL ${ITTI_LIB} LFDS pthread rt nettle crypto m)
|
||||
|
||||
|
||||
###################################"
|
||||
# Addexecutables for tests
|
||||
####################################
|
||||
@@ -2785,7 +2766,7 @@ add_executable(dlsim_tm4
|
||||
${T_SOURCE}
|
||||
)
|
||||
target_link_libraries (dlsim_tm4
|
||||
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group
|
||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group
|
||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${T_LIB}
|
||||
)
|
||||
|
||||
@@ -2798,7 +2779,7 @@ add_executable(polartest
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(polartest
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} dl
|
||||
)
|
||||
|
||||
@@ -2813,7 +2794,7 @@ add_executable(smallblocktest
|
||||
|
||||
|
||||
target_link_libraries(smallblocktest
|
||||
-Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} dl
|
||||
)
|
||||
|
||||
@@ -2826,7 +2807,7 @@ add_executable(ldpctest
|
||||
add_dependencies( ldpctest ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
|
||||
|
||||
target_link_libraries(ldpctest
|
||||
-Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} dl
|
||||
)
|
||||
|
||||
@@ -2839,7 +2820,7 @@ add_executable(nr_dlschsim
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_dlschsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
|
||||
@@ -2852,7 +2833,7 @@ add_executable(nr_pbchsim
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_pbchsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
|
||||
@@ -2867,7 +2848,7 @@ add_executable(nr_pucchsim
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_pucchsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
|
||||
@@ -2881,7 +2862,7 @@ add_executable(nr_dlsim
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_dlsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
target_compile_definitions(nr_dlsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||
@@ -2894,8 +2875,8 @@ add_executable(nr_prachsim
|
||||
${UTIL_SRC}
|
||||
${T_SOURCE}
|
||||
${SHLIB_LOADER_SOURCES})
|
||||
target_link_libraries(nr_prachsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB MAC_UE_NR SCHED_NR_UE_LIB RRC_LIB NR_RRC_LIB L2_NR CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl)
|
||||
target_link_libraries(nr_prachsim
|
||||
-Wl,--start-group UTIL SIMU SIMU_COMMON PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB MAC_UE_NR SCHED_NR_UE_LIB RRC_LIB NR_RRC_LIB L2_NR CONFIG_LIB -Wl,--end-group m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl)
|
||||
|
||||
add_executable(nr_ulschsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
|
||||
@@ -2906,7 +2887,7 @@ add_executable(nr_ulschsim
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_ulschsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
|
||||
@@ -2920,7 +2901,7 @@ add_executable(nr_ulsim
|
||||
${SHLIB_LOADER_SOURCES}
|
||||
)
|
||||
target_link_libraries(nr_ulsim
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group
|
||||
-Wl,--start-group UTIL SIMU_COMMON SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON RRC_LIB NR_RRC_LIB CONFIG_LIB L2_NR -Wl,--end-group
|
||||
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ${ITTI_LIB} dl
|
||||
)
|
||||
target_compile_definitions(nr_ulsim PUBLIC -DPHYSICAL_SIMULATOR)
|
||||
@@ -2939,7 +2920,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
)
|
||||
target_link_libraries (${myExe}
|
||||
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group
|
||||
-Wl,--start-group SIMU_COMMON SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group
|
||||
pthread m rt ${CONFIG_LIB} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
|
||||
)
|
||||
|
||||
@@ -3019,8 +3000,8 @@ if (${T_TRACER})
|
||||
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
||||
PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU PHY_MEX
|
||||
L2 L2_LTE L2_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_NR MAC_UE_NR
|
||||
CN_UTILS GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU SIMU_ETH OPENAIR0_LIB
|
||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc)
|
||||
CN_UTILS GTPV1U SCTP_CLIENT MME_APP UDP LIB_NAS_UE NB_IoT LFDS LFDS7 SIMU_COMMON SIMU SIMU_ETH OPENAIR0_LIB
|
||||
ldpc_orig ldpc_optim ldpc_optim8seg ldpc PROTO_AGENT dfts)
|
||||
if (TARGET ${i})
|
||||
add_dependencies(${i} generate_T)
|
||||
endif()
|
||||
@@ -3063,7 +3044,7 @@ function(make_driver name dir)
|
||||
endforeach()
|
||||
CONFIGURE_FILE(${OPENAIR_CMAKE}/tools/Kbuild.cmake ${OPENAIR_BIN_DIR}/${name}/Kbuild)
|
||||
add_custom_command(OUTPUT ${name}.ko
|
||||
COMMAND $(MAKE) -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name}
|
||||
COMMAND make -j2 -C ${module_build_path} M=${OPENAIR_BIN_DIR}/${name}
|
||||
WORKING_DIRECTORY ${OPENAIR_BIN_DIR}/${name}
|
||||
COMMENT "building ${module}.ko"
|
||||
VERBATIM
|
||||
|
||||
@@ -406,8 +406,12 @@ function main() {
|
||||
shift 1;;
|
||||
-k | --skip-shared-libraries)
|
||||
SKIP_SHARED_LIB_FLAG="True"
|
||||
echo_info "Skipping build of shared libraries, rfsimulator, basicsimulator and transport protocol libraries"
|
||||
echo_info "Skipping build of shared libraries, rfsimulator and transport protocol libraries"
|
||||
shift;;
|
||||
--ninja)
|
||||
CMAKE_CMD="$CMAKE_CMD -GNinja"
|
||||
MAKE_CMD=ninja
|
||||
shift;;
|
||||
-h | --help)
|
||||
print_help
|
||||
exit 1;;
|
||||
@@ -892,7 +896,7 @@ function main() {
|
||||
$build_dir rfsimulator \
|
||||
librfsimulator.so $dbin/librfsimulator.so.$REL
|
||||
|
||||
echo_info "Compiling basicsimulator"
|
||||
echo_info "Compiling tcp_bridge_oai"
|
||||
compilations \
|
||||
$build_dir tcp_bridge_oai \
|
||||
libtcp_bridge_oai.so $dbin/libtcp_bridge_oai.so.$REL
|
||||
|
||||
@@ -150,7 +150,9 @@ clean_all_files() {
|
||||
set_openair_env
|
||||
dir=$OPENAIR_DIR/cmake_targets
|
||||
rm -rf $dir/log $OPENAIR_DIR/targets/bin/*
|
||||
rm -rf $dir/ran_build $dir/lte-simulators/build
|
||||
rm -rf $dir/ran_build $dir/ran_build_noLOG
|
||||
rm -rf $dir/lte-simulators/build
|
||||
rm -rf $dir/phy_simulators/build $dir/nas_sim_tools/build
|
||||
rm -rf $dir/oaisim_build_oai/build $dir/oaisim_build_oai/CMakeLists.txt
|
||||
rm -rf $dir/autotests/bin $dir/autotests/log $dir/autotests/*/build
|
||||
}
|
||||
@@ -167,7 +169,7 @@ check_warnings() {
|
||||
#we look for 'warning:' in the compilation log file
|
||||
#this is how gcc starts a warning
|
||||
#this is not perfect, we may get false positive
|
||||
warning_count=`grep "warning:" "$1"|wc -l`
|
||||
warning_count=`grep "warning:" "$1" | egrep -v "jobserver unavailable|disabling jobserver mode" | wc -l`
|
||||
if [ $warning_count -gt 0 ]; then
|
||||
echo_error "WARNING: $warning_count warnings. See $1"
|
||||
fi
|
||||
@@ -177,17 +179,20 @@ compilations() {
|
||||
cd $OPENAIR_DIR/cmake_targets/$1/build
|
||||
set +e
|
||||
{
|
||||
rm -f $3
|
||||
if [ "$BUILD_COVERITY_SCAN" == "1" ]; then
|
||||
COV_SCAN_PREFIX="cov-build --dir cov-int"
|
||||
else
|
||||
COV_SCAN_PREFIX=""
|
||||
fi
|
||||
if [ "$MAKE_CMD" != "" ]; then
|
||||
$MAKE_CMD $2
|
||||
else
|
||||
if [ "$VERBOSE_COMPILE" == "1" ]; then
|
||||
$COV_SCAN_PREFIX make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE
|
||||
else
|
||||
$COV_SCAN_PREFIX make -j`nproc` $2
|
||||
fi
|
||||
fi
|
||||
|
||||
} > $dlog/$2.$REL.txt 2>&1
|
||||
set -e
|
||||
@@ -619,6 +624,7 @@ check_install_oai_software() {
|
||||
build-essential \
|
||||
cmake \
|
||||
cmake-curses-gui \
|
||||
ninja-build \
|
||||
doxygen \
|
||||
doxygen-gui \
|
||||
texlive-latex-base \
|
||||
|
||||
@@ -248,7 +248,8 @@ const char* eurecomVariablesNames[] = {
|
||||
"slot_number_TX1_gNB",
|
||||
"slot_number_RX0_gNB",
|
||||
"slot_number_RX1_gNB",
|
||||
"ru_tx_ofdm_mask"
|
||||
"ru_tx_ofdm_mask",
|
||||
"usrp_send_return"
|
||||
};
|
||||
|
||||
const char* eurecomFunctionsNames[] = {
|
||||
@@ -282,6 +283,8 @@ const char* eurecomFunctionsNames[] = {
|
||||
"lock_mutex_ru",
|
||||
"lock_mutex_ru1",
|
||||
"lock_mutex_ru2",
|
||||
/* uhd signals */
|
||||
"trx_write_thread",
|
||||
/* simulation signals */
|
||||
"do_DL_sig",
|
||||
"do_UL_sig",
|
||||
|
||||
@@ -226,6 +226,7 @@ typedef enum {
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX0_GNB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_SLOT_NUMBER_RX1_GNB,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_RU_TX_OFDM_MASK,
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_USRP_SEND_RETURN,
|
||||
|
||||
|
||||
VCD_SIGNAL_DUMPER_VARIABLES_END
|
||||
@@ -262,6 +263,8 @@ typedef enum {
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU1,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU2,
|
||||
/* uhd signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE_THREAD,
|
||||
/* SIMULATION signals */
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_DL_SIGNAL,
|
||||
VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL,
|
||||
|
||||
@@ -73,10 +73,10 @@ typedef struct {
|
||||
} T_cache_t;
|
||||
|
||||
/* number of VCD functions (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_NUM_FUNCTIONS (248)
|
||||
#define VCD_NUM_FUNCTIONS (249)
|
||||
|
||||
/* number of VCD variables (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_NUM_VARIABLES (186)
|
||||
#define VCD_NUM_VARIABLES (187)
|
||||
|
||||
/* first VCD function (to be kept up to date! see in T_messages.txt) */
|
||||
#define VCD_FIRST_FUNCTION ((uintptr_t)T_VCD_FUNCTION_RT_SLEEP)
|
||||
|
||||
@@ -2138,6 +2138,11 @@ ID = VCD_VARIABLE_RU_TX_OFDM_MASK
|
||||
GROUP = ALL:VCD:ENB:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
VCD_NAME = ru_tx_ofdm_mask
|
||||
ID = VCD_VARIABLE_USRP_SEND_RETURN
|
||||
DESC = VCD variable USRP_SEND_RETURN
|
||||
GROUP = ALL:VCD:ENB:VCD_VARIABLE
|
||||
FORMAT = ulong,value
|
||||
VCD_NAME = usrp_send_return
|
||||
|
||||
#functions
|
||||
|
||||
@@ -2286,6 +2291,11 @@ ID = VCD_FUNCTION_LOCK_MUTEX_RU2
|
||||
GROUP = ALL:VCD:UE:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = lock_mutex_ru2
|
||||
ID = VCD_FUNCTION_TRX_WRITE_THREAD
|
||||
DESC = VCD function TRX_WRITE_THREAD
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
FORMAT = int,value
|
||||
VCD_NAME = trx_write_thread
|
||||
ID = VCD_FUNCTION_SIM_DO_DL_SIGNAL
|
||||
DESC = VCD function SIM_DO_DL_SIGNAL
|
||||
GROUP = ALL:VCD:ENB:VCD_FUNCTION
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef _CONFIG_H_
|
||||
#define _CONFIG_H_
|
||||
#ifndef __COMMON_UTILS_T_TRACER_CONFIG__H__
|
||||
#define __COMMON_UTILS_T_TRACER_CONFIG__H__
|
||||
|
||||
void clear_remote_config(void);
|
||||
void append_received_config_chunk(char *buf, int length);
|
||||
@@ -7,4 +7,4 @@ void load_config_file(char *filename);
|
||||
void verify_config(void);
|
||||
void get_local_config(char **txt, int *len);
|
||||
|
||||
#endif /* _CONFIG_H_ */
|
||||
#endif /* __COMMON_UTILS_T_TRACER_CONFIG__H__ */
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
* SUCH DAMAGE
|
||||
*/
|
||||
|
||||
#ifndef __COMMON_UTILS_T_TRACER_PACKET_MAC_LTE__H__
|
||||
#define __COMMON_UTILS_T_TRACER_PACKET_MAC_LTE__H__
|
||||
|
||||
//#include "ws_symbol_export.h"
|
||||
|
||||
/* radioType */
|
||||
@@ -139,3 +142,4 @@
|
||||
continues until the end of the frame) */
|
||||
#define MAC_LTE_PAYLOAD_TAG 0x01
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __COMMON_UTILS_ASSERTIONS__H__
|
||||
#define __COMMON_UTILS_ASSERTIONS__H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
@@ -30,9 +33,6 @@
|
||||
# include "backtrace.h"
|
||||
#endif
|
||||
|
||||
#ifndef ASSERTIONS_H_
|
||||
#define ASSERTIONS_H_
|
||||
|
||||
void output_log_mem(void);
|
||||
#define _Assert_Exit_ \
|
||||
fprintf(stderr, "\nExiting execution\n"); \
|
||||
@@ -83,4 +83,4 @@ do { \
|
||||
} \
|
||||
} while(0)
|
||||
|
||||
#endif /* ASSERTIONS_H_ */
|
||||
#endif /* __COMMON_UTILS_ASSERTIONS__H__ */
|
||||
|
||||
@@ -1,592 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)queue.h 8.5 (Berkeley) 8/20/94
|
||||
*/
|
||||
|
||||
#ifndef _SYS_QUEUE_H_
|
||||
#define _SYS_QUEUE_H_
|
||||
|
||||
/*
|
||||
* This file defines five types of data structures: singly-linked lists,
|
||||
* lists, simple queues, tail queues, and circular queues.
|
||||
*
|
||||
* A singly-linked list is headed by a single forward pointer. The
|
||||
* elements are singly linked for minimum space and pointer manipulation
|
||||
* overhead at the expense of O(n) removal for arbitrary elements. New
|
||||
* elements can be added to the list after an existing element or at the
|
||||
* head of the list. Elements being removed from the head of the list
|
||||
* should use the explicit macro for this purpose for optimum
|
||||
* efficiency. A singly-linked list may only be traversed in the forward
|
||||
* direction. Singly-linked lists are ideal for applications with large
|
||||
* datasets and few or no removals or for implementing a LIFO queue.
|
||||
*
|
||||
* A list is headed by a single forward pointer (or an array of forward
|
||||
* pointers for a hash table header). The elements are doubly linked
|
||||
* so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before
|
||||
* or after an existing element or at the head of the list. A list
|
||||
* may only be traversed in the forward direction.
|
||||
*
|
||||
* A simple queue is headed by a pair of pointers, one the head of the
|
||||
* list and the other to the tail of the list. The elements are singly
|
||||
* linked to save space, so elements can only be removed from the
|
||||
* head of the list. New elements can be added to the list after
|
||||
* an existing element, at the head of the list, or at the end of the
|
||||
* list. A simple queue may only be traversed in the forward direction.
|
||||
*
|
||||
* A tail queue is headed by a pair of pointers, one to the head of the
|
||||
* list and the other to the tail of the list. The elements are doubly
|
||||
* linked so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before or
|
||||
* after an existing element, at the head of the list, or at the end of
|
||||
* the list. A tail queue may be traversed in either direction.
|
||||
*
|
||||
* A circle queue is headed by a pair of pointers, one to the head of the
|
||||
* list and the other to the tail of the list. The elements are doubly
|
||||
* linked so that an arbitrary element can be removed without a need to
|
||||
* traverse the list. New elements can be added to the list before or after
|
||||
* an existing element, at the head of the list, or at the end of the list.
|
||||
* A circle queue may be traversed in either direction, but has a more
|
||||
* complex end of list detection.
|
||||
*
|
||||
* For details on the use of these macros, see the queue(3) manual page.
|
||||
* SLIST LIST STAILQ TAILQ CIRCLEQ
|
||||
* _HEAD + + + + +
|
||||
* _HEAD_INITIALIZER + + + + +
|
||||
* _ENTRY + + + + +
|
||||
* _INIT + + + + +
|
||||
* _EMPTY + + + + +
|
||||
* _FIRST + + + + +
|
||||
* _NEXT + + + + +
|
||||
* _PREV - - - + +
|
||||
* _LAST - - + + +
|
||||
* _FOREACH + + + + +
|
||||
* _FOREACH_REVERSE - - - + +
|
||||
* _INSERT_HEAD + + + + +
|
||||
* _INSERT_BEFORE - + - + +
|
||||
* _INSERT_AFTER + + + + +
|
||||
* _INSERT_TAIL - - + + +
|
||||
* _REMOVE_HEAD + - + - -
|
||||
* _REMOVE + + + + +
|
||||
*/
|
||||
|
||||
/*
|
||||
* List definitions.
|
||||
*/
|
||||
#define LIST_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *lh_first; /* first element */ \
|
||||
}
|
||||
|
||||
#define LIST_HEAD_INITIALIZER(head) \
|
||||
{ NULL }
|
||||
|
||||
#define LIST_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *le_next; /* next element */ \
|
||||
struct type **le_prev; /* address of previous next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* List functions.
|
||||
*/
|
||||
#define LIST_INIT(head) do { \
|
||||
(head)->lh_first = NULL; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_INSERT_AFTER(listelm, elm, field) do { \
|
||||
if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
|
||||
(listelm)->field.le_next->field.le_prev = \
|
||||
&(elm)->field.le_next; \
|
||||
(listelm)->field.le_next = (elm); \
|
||||
(elm)->field.le_prev = &(listelm)->field.le_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
(elm)->field.le_prev = (listelm)->field.le_prev; \
|
||||
(elm)->field.le_next = (listelm); \
|
||||
*(listelm)->field.le_prev = (elm); \
|
||||
(listelm)->field.le_prev = &(elm)->field.le_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.le_next = (head)->lh_first) != NULL) \
|
||||
(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
|
||||
(head)->lh_first = (elm); \
|
||||
(elm)->field.le_prev = &(head)->lh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_REMOVE(elm, field) do { \
|
||||
if ((elm)->field.le_next != NULL) \
|
||||
(elm)->field.le_next->field.le_prev = \
|
||||
(elm)->field.le_prev; \
|
||||
*(elm)->field.le_prev = (elm)->field.le_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->lh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.le_next))
|
||||
|
||||
/*
|
||||
* List access methods.
|
||||
*/
|
||||
#define LIST_EMPTY(head) ((head)->lh_first == NULL)
|
||||
#define LIST_FIRST(head) ((head)->lh_first)
|
||||
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
|
||||
|
||||
|
||||
/*
|
||||
* Singly-linked List definitions.
|
||||
*/
|
||||
#define SLIST_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *slh_first; /* first element */ \
|
||||
}
|
||||
|
||||
#define SLIST_HEAD_INITIALIZER(head) \
|
||||
{ NULL }
|
||||
|
||||
#define SLIST_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sle_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Singly-linked List functions.
|
||||
*/
|
||||
#define SLIST_INIT(head) do { \
|
||||
(head)->slh_first = NULL; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
|
||||
(elm)->field.sle_next = (slistelm)->field.sle_next; \
|
||||
(slistelm)->field.sle_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_INSERT_HEAD(head, elm, field) do { \
|
||||
(elm)->field.sle_next = (head)->slh_first; \
|
||||
(head)->slh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_REMOVE_HEAD(head, field) do { \
|
||||
(head)->slh_first = (head)->slh_first->field.sle_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->slh_first == (elm)) { \
|
||||
SLIST_REMOVE_HEAD((head), field); \
|
||||
} \
|
||||
else { \
|
||||
struct type *curelm = (head)->slh_first; \
|
||||
while(curelm->field.sle_next != (elm)) \
|
||||
curelm = curelm->field.sle_next; \
|
||||
curelm->field.sle_next = \
|
||||
curelm->field.sle_next->field.sle_next; \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_FOREACH(var, head, field) \
|
||||
for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
|
||||
|
||||
/*
|
||||
* Singly-linked List access methods.
|
||||
*/
|
||||
#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
|
||||
#define SLIST_FIRST(head) ((head)->slh_first)
|
||||
#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
|
||||
|
||||
|
||||
/*
|
||||
* Singly-linked Tail queue declarations.
|
||||
*/
|
||||
#define STAILQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *stqh_first; /* first element */ \
|
||||
struct type **stqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define STAILQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).stqh_first }
|
||||
|
||||
#define STAILQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *stqe_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Singly-linked Tail queue functions.
|
||||
*/
|
||||
#define STAILQ_INIT(head) do { \
|
||||
(head)->stqh_first = NULL; \
|
||||
(head)->stqh_last = &(head)->stqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
|
||||
(head)->stqh_last = &(elm)->field.stqe_next; \
|
||||
(head)->stqh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.stqe_next = NULL; \
|
||||
*(head)->stqh_last = (elm); \
|
||||
(head)->stqh_last = &(elm)->field.stqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\
|
||||
(head)->stqh_last = &(elm)->field.stqe_next; \
|
||||
(listelm)->field.stqe_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_REMOVE_HEAD(head, field) do { \
|
||||
if (((head)->stqh_first = (head)->stqh_first->field.stqe_next) == NULL) \
|
||||
(head)->stqh_last = &(head)->stqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->stqh_first == (elm)) { \
|
||||
STAILQ_REMOVE_HEAD((head), field); \
|
||||
} else { \
|
||||
struct type *curelm = (head)->stqh_first; \
|
||||
while (curelm->field.stqe_next != (elm)) \
|
||||
curelm = curelm->field.stqe_next; \
|
||||
if ((curelm->field.stqe_next = \
|
||||
curelm->field.stqe_next->field.stqe_next) == NULL) \
|
||||
(head)->stqh_last = &(curelm)->field.stqe_next; \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define STAILQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->stqh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.stqe_next))
|
||||
|
||||
#define STAILQ_CONCAT(head1, head2) do { \
|
||||
if (!STAILQ_EMPTY((head2))) { \
|
||||
*(head1)->stqh_last = (head2)->stqh_first; \
|
||||
(head1)->stqh_last = (head2)->stqh_last; \
|
||||
STAILQ_INIT((head2)); \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
/*
|
||||
* Singly-linked Tail queue access methods.
|
||||
*/
|
||||
#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
|
||||
#define STAILQ_FIRST(head) ((head)->stqh_first)
|
||||
#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
|
||||
|
||||
|
||||
/*
|
||||
* Simple queue definitions.
|
||||
*/
|
||||
#define SIMPLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *sqh_first; /* first element */ \
|
||||
struct type **sqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define SIMPLEQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).sqh_first }
|
||||
|
||||
#define SIMPLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sqe_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Simple queue functions.
|
||||
*/
|
||||
#define SIMPLEQ_INIT(head) do { \
|
||||
(head)->sqh_first = NULL; \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(head)->sqh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.sqe_next = NULL; \
|
||||
*(head)->sqh_last = (elm); \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(listelm)->field.sqe_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
|
||||
if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->sqh_first == (elm)) { \
|
||||
SIMPLEQ_REMOVE_HEAD((head), field); \
|
||||
} else { \
|
||||
struct type *curelm = (head)->sqh_first; \
|
||||
while (curelm->field.sqe_next != (elm)) \
|
||||
curelm = curelm->field.sqe_next; \
|
||||
if ((curelm->field.sqe_next = \
|
||||
curelm->field.sqe_next->field.sqe_next) == NULL) \
|
||||
(head)->sqh_last = &(curelm)->field.sqe_next; \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->sqh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.sqe_next))
|
||||
|
||||
/*
|
||||
* Simple queue access methods.
|
||||
*/
|
||||
#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL)
|
||||
#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
|
||||
#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
|
||||
|
||||
|
||||
/*
|
||||
* Tail queue definitions.
|
||||
*/
|
||||
#define _TAILQ_HEAD(name, type, qual) \
|
||||
struct name { \
|
||||
qual type *tqh_first; /* first element */ \
|
||||
qual type *qual *tqh_last; /* addr of last next element */ \
|
||||
}
|
||||
#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
|
||||
|
||||
#define TAILQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).tqh_first }
|
||||
|
||||
#define _TAILQ_ENTRY(type, qual) \
|
||||
struct { \
|
||||
qual type *tqe_next; /* next element */ \
|
||||
qual type *qual *tqe_prev; /* address of previous next element */\
|
||||
}
|
||||
#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
|
||||
|
||||
/*
|
||||
* Tail queue functions.
|
||||
*/
|
||||
#define TAILQ_INIT(head) do { \
|
||||
(head)->tqh_first = NULL; \
|
||||
(head)->tqh_last = &(head)->tqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
|
||||
(head)->tqh_first->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(head)->tqh_first = (elm); \
|
||||
(elm)->field.tqe_prev = &(head)->tqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.tqe_next = NULL; \
|
||||
(elm)->field.tqe_prev = (head)->tqh_last; \
|
||||
*(head)->tqh_last = (elm); \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(listelm)->field.tqe_next = (elm); \
|
||||
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
|
||||
(elm)->field.tqe_next = (listelm); \
|
||||
*(listelm)->field.tqe_prev = (elm); \
|
||||
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_REMOVE(head, elm, field) do { \
|
||||
if (((elm)->field.tqe_next) != NULL) \
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
(elm)->field.tqe_prev; \
|
||||
else \
|
||||
(head)->tqh_last = (elm)->field.tqe_prev; \
|
||||
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->tqh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.tqe_next))
|
||||
|
||||
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
|
||||
for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
|
||||
(var); \
|
||||
(var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
|
||||
|
||||
#define TAILQ_CONCAT(head1, head2, field) do { \
|
||||
if (!TAILQ_EMPTY(head2)) { \
|
||||
*(head1)->tqh_last = (head2)->tqh_first; \
|
||||
(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
|
||||
(head1)->tqh_last = (head2)->tqh_last; \
|
||||
TAILQ_INIT((head2)); \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
/*
|
||||
* Tail queue access methods.
|
||||
*/
|
||||
#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
|
||||
#define TAILQ_FIRST(head) ((head)->tqh_first)
|
||||
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
|
||||
|
||||
#define TAILQ_LAST(head, headname) \
|
||||
(*(((struct headname *)((head)->tqh_last))->tqh_last))
|
||||
#define TAILQ_PREV(elm, headname, field) \
|
||||
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
|
||||
|
||||
|
||||
/*
|
||||
* Circular queue definitions.
|
||||
*/
|
||||
#define CIRCLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *cqh_first; /* first element */ \
|
||||
struct type *cqh_last; /* last element */ \
|
||||
}
|
||||
|
||||
#define CIRCLEQ_HEAD_INITIALIZER(head) \
|
||||
{ (void *)&head, (void *)&head }
|
||||
|
||||
#define CIRCLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *cqe_next; /* next element */ \
|
||||
struct type *cqe_prev; /* previous element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Circular queue functions.
|
||||
*/
|
||||
#define CIRCLEQ_INIT(head) do { \
|
||||
(head)->cqh_first = (void *)(head); \
|
||||
(head)->cqh_last = (void *)(head); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
(elm)->field.cqe_next = (listelm)->field.cqe_next; \
|
||||
(elm)->field.cqe_prev = (listelm); \
|
||||
if ((listelm)->field.cqe_next == (void *)(head)) \
|
||||
(head)->cqh_last = (elm); \
|
||||
else \
|
||||
(listelm)->field.cqe_next->field.cqe_prev = (elm); \
|
||||
(listelm)->field.cqe_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field) do { \
|
||||
(elm)->field.cqe_next = (listelm); \
|
||||
(elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
|
||||
if ((listelm)->field.cqe_prev == (void *)(head)) \
|
||||
(head)->cqh_first = (elm); \
|
||||
else \
|
||||
(listelm)->field.cqe_prev->field.cqe_next = (elm); \
|
||||
(listelm)->field.cqe_prev = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
(elm)->field.cqe_next = (head)->cqh_first; \
|
||||
(elm)->field.cqe_prev = (void *)(head); \
|
||||
if ((head)->cqh_last == (void *)(head)) \
|
||||
(head)->cqh_last = (elm); \
|
||||
else \
|
||||
(head)->cqh_first->field.cqe_prev = (elm); \
|
||||
(head)->cqh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.cqe_next = (void *)(head); \
|
||||
(elm)->field.cqe_prev = (head)->cqh_last; \
|
||||
if ((head)->cqh_first == (void *)(head)) \
|
||||
(head)->cqh_first = (elm); \
|
||||
else \
|
||||
(head)->cqh_last->field.cqe_next = (elm); \
|
||||
(head)->cqh_last = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_REMOVE(head, elm, field) do { \
|
||||
if ((elm)->field.cqe_next == (void *)(head)) \
|
||||
(head)->cqh_last = (elm)->field.cqe_prev; \
|
||||
else \
|
||||
(elm)->field.cqe_next->field.cqe_prev = \
|
||||
(elm)->field.cqe_prev; \
|
||||
if ((elm)->field.cqe_prev == (void *)(head)) \
|
||||
(head)->cqh_first = (elm)->field.cqe_next; \
|
||||
else \
|
||||
(elm)->field.cqe_prev->field.cqe_next = \
|
||||
(elm)->field.cqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->cqh_first); \
|
||||
(var) != (const void *)(head); \
|
||||
(var) = ((var)->field.cqe_next))
|
||||
|
||||
#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
|
||||
for ((var) = ((head)->cqh_last); \
|
||||
(var) != (const void *)(head); \
|
||||
(var) = ((var)->field.cqe_prev))
|
||||
|
||||
/*
|
||||
* Circular queue access methods.
|
||||
*/
|
||||
#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
|
||||
#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
|
||||
#define CIRCLEQ_LAST(head) ((head)->cqh_last)
|
||||
#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
|
||||
#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
|
||||
|
||||
#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
|
||||
(((elm)->field.cqe_next == (void *)(head)) \
|
||||
? ((head)->cqh_first) \
|
||||
: (elm->field.cqe_next))
|
||||
#define CIRCLEQ_LOOP_PREV(head, elm, field) \
|
||||
(((elm)->field.cqe_prev == (void *)(head)) \
|
||||
? ((head)->cqh_last) \
|
||||
: (elm->field.cqe_prev))
|
||||
|
||||
#endif /* sys/queue.h */
|
||||
@@ -30,6 +30,9 @@
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __COMMON_UTILS_NR_NR_COMMON__H__
|
||||
#define __COMMON_UTILS_NR_NR_COMMON__H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include "assertions.h"
|
||||
|
||||
@@ -63,3 +66,5 @@ void SLIV2SL(int SLIV,int *S,int *L);
|
||||
#define max(a,b) cmax(a,b)
|
||||
#define min(a,b) cmin(a,b)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __TELNETSRV_CPUMEASUR_DEF__H__
|
||||
#define __TELNETSRV_CPUMEASUR_DEF__H__
|
||||
|
||||
#define CPU_PHYENB_MEASURE \
|
||||
{ \
|
||||
@@ -97,3 +99,5 @@
|
||||
{"pdcp_ip", &(pdcpvars->pdcp_ip),0},\
|
||||
{"ip_pdcp", &(pdcpvars->ip_pdcp),0},\
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __TELNETSRV_LTEMEASUR_DEF__H__
|
||||
#define __TELNETSRV_LTEMEASUR_DEF__H__
|
||||
|
||||
#define LTEMAC_MEASURE \
|
||||
{ \
|
||||
@@ -125,3 +127,5 @@
|
||||
{"timer_poll_retrans_tout", NULL, TELNET_VARTYPE_UINT, 0},\
|
||||
{"timer_status_prohibit_tout", NULL, TELNET_VARTYPE_UINT, 0},\
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __TELNETSRV_MEASUREMENTS__H__
|
||||
#define __TELNETSRV_MEASUREMENTS__H__
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include "telnetsrv.h"
|
||||
#include "openair1/PHY/defs_eNB.h"
|
||||
@@ -97,3 +101,4 @@ extern uint64_t measurcmd_getstatvalue(telnet_ltemeasurdef_t *measur,telnet_prin
|
||||
extern void measurcmd_display_measures(telnet_printfunc_t prnt, telnet_ltemeasurdef_t *statsptr, int stats_size);
|
||||
|
||||
#endif /* TELNETSRV_MEASURCMD_MAIN */
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __TELNETSRV_PHYCMD__H__
|
||||
#define __TELNETSRV_PHYCMD__H__
|
||||
|
||||
#ifdef TELNETSRV_PHYCMD_MAIN
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
@@ -61,3 +64,4 @@ extern void add_phy_cmds(void);
|
||||
|
||||
/*-------------------------------------------------------------------------------------*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,10 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __TELNETSRV_PROCCMD__H__
|
||||
#define __TELNETSRV_PROCCMD__H__
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include "telnetsrv.h"
|
||||
|
||||
@@ -79,3 +83,4 @@ telnetshell_cmddef_t proc_cmdarray[] = {
|
||||
extern void add_proccmd_cmds(void);
|
||||
#endif /* TELNETSRV_PROCCMD_MAIN */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1194,6 +1194,8 @@ void phy_procedures_eNB_TX_tosplit(uint8_t *bufferZone, PHY_VARS_eNB *eNB, L1_rx
|
||||
for (int i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
int harq_pid;
|
||||
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[i];
|
||||
if (ulsch == NULL)
|
||||
continue;
|
||||
|
||||
if (ulsch->ue_type > NOCE)
|
||||
harq_pid = 0;
|
||||
@@ -1209,9 +1211,10 @@ void phy_procedures_eNB_TX_tosplit(uint8_t *bufferZone, PHY_VARS_eNB *eNB, L1_rx
|
||||
|
||||
for (int k=0; k<8; k++) {
|
||||
ulsch_harq = ulsch->harq_processes[k];
|
||||
if (ulsch_harq == NULL)
|
||||
continue;
|
||||
|
||||
if (ulsch &&
|
||||
(ulsch->rnti>0) &&
|
||||
if ((ulsch->rnti>0) &&
|
||||
(ulsch_harq->status == ACTIVE) &&
|
||||
(ulsch_harq->frame == frame) &&
|
||||
(ulsch_harq->subframe == subframe) &&
|
||||
@@ -1510,6 +1513,7 @@ void *cu_fs6(void *arg) {
|
||||
char remoteIP[1024];
|
||||
strncpy(remoteIP,get_softmodem_params()->split73+3, 1023); //three first char should be cu: or du:
|
||||
char port_def[256]=DU_PORT;
|
||||
|
||||
for (int i=0; i <1000; i++)
|
||||
if (remoteIP[i]==':') {
|
||||
strncpy(port_def,remoteIP+i+1,255);
|
||||
@@ -1558,12 +1562,14 @@ void *du_fs6(void *arg) {
|
||||
char remoteIP[1024];
|
||||
strncpy(remoteIP,get_softmodem_params()->split73+3,1023); //three first char should be cu: or du:
|
||||
char port_def[256]=CU_PORT;
|
||||
|
||||
for (int i=0; i <1000; i++)
|
||||
if (remoteIP[i]==':') {
|
||||
strncpy(port_def,remoteIP+i+1,255);
|
||||
remoteIP[i]=0;
|
||||
break;
|
||||
}
|
||||
|
||||
AssertFatal(createUDPsock(NULL, DU_PORT, remoteIP, port_def, &sockFS6), "");
|
||||
|
||||
if (ru->rfdevice.trx_start_func(&ru->rfdevice) != 0)
|
||||
|
||||
@@ -740,9 +740,7 @@ void init_gNB_proc(int inst) {
|
||||
gNB_L1_rxtx_proc_t *L1_proc,*L1_proc_tx;
|
||||
// LOG_I(PHY,"%s(inst:%d) RC.nb_nr_CC[inst]:%d \n",__FUNCTION__,inst,RC.nb_nr_CC[inst]);
|
||||
gNB = RC.gNB[inst];
|
||||
#ifndef OCP_FRAMEWORK
|
||||
LOG_I(PHY,"Initializing gNB processes instance:%d CC_id %d \n",inst,CC_id);
|
||||
#endif
|
||||
|
||||
proc = &gNB->proc;
|
||||
L1_proc = &proc->L1_proc;
|
||||
@@ -956,9 +954,7 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
|
||||
NR_POLAR_PBCH_PAYLOAD_BITS,
|
||||
NR_POLAR_PBCH_AGGREGATION_LEVEL);*/
|
||||
LOG_I(PHY,"Initializing gNB %d single_thread_flag:%d\n",inst,gNB->single_thread_flag);
|
||||
#ifndef OCP_FRAMEWORK
|
||||
LOG_I(PHY,"Initializing gNB %d\n",inst);
|
||||
#endif
|
||||
|
||||
LOG_I(PHY,"Registering with MAC interface module (before %p)\n",gNB->if_inst);
|
||||
AssertFatal((gNB->if_inst = NR_IF_Module_init(inst))!=NULL,"Cannot register interface");
|
||||
|
||||
+17
-3
@@ -775,7 +775,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
LOG_D(PHY,"[TXPATH] RU %d tx_rf, writing to TS %llu, frame %d, unwrapped_frame %d, slot %d\n",ru->idx,
|
||||
(long long unsigned int)timestamp,frame,proc->frame_tx_unwrap,slot);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
AssertFatal(txs == siglen+sf_extension,"TX : Timeout (sent %u/%d)\n", txs, siglen);
|
||||
//AssertFatal(txs == 0,"trx write function error %d\n", txs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1509,6 +1509,16 @@ void *ru_thread( void *param ) {
|
||||
|
||||
// if this is a slave RRU, try to synchronize on the DL frequency
|
||||
if ((ru->is_slave) && (ru->if_south == LOCAL_RF)) do_ru_synch(ru);
|
||||
|
||||
// start trx write thread
|
||||
if (ru->start_write_thread){
|
||||
if(ru->start_write_thread(ru) != 0){
|
||||
LOG_E(HW,"Could not start tx write thread\n");
|
||||
}
|
||||
else{
|
||||
LOG_I(PHY,"tx write thread ready\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&proc->mutex_FH1);
|
||||
@@ -1729,14 +1739,15 @@ int stop_rf(RU_t *ru) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int start_write_thread(RU_t *ru) {
|
||||
return(ru->rfdevice.trx_write_init(&ru->rfdevice));
|
||||
}
|
||||
|
||||
void init_RU_proc(RU_t *ru) {
|
||||
int i=0;
|
||||
RU_proc_t *proc;
|
||||
char name[100];
|
||||
#ifndef OCP_FRAMEWORK
|
||||
LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
|
||||
#endif
|
||||
proc = &ru->proc;
|
||||
memset((void *)proc,0,sizeof(RU_proc_t));
|
||||
proc->ru = ru;
|
||||
@@ -2124,6 +2135,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->fh_south_out = tx_rf; // local synchronous RF TX
|
||||
ru->start_rf = start_rf; // need to start the local RF interface
|
||||
ru->stop_rf = stop_rf;
|
||||
ru->start_write_thread = start_write_thread; // starting RF TX in different thread
|
||||
printf("configuring ru_id %u (start_rf %p)\n", ru->idx, start_rf);
|
||||
/*
|
||||
if (ru->function == gNodeB_3GPP) { // configure RF parameters only for 3GPP eNodeB, we need to get them from RAU otherwise
|
||||
@@ -2149,6 +2161,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->fh_south_asynch_in = NULL; // no asynchronous UL
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->stop_rf = NULL;
|
||||
ru->start_write_thread = NULL;
|
||||
ru->nr_start_if = nr_start_if; // need to start if interface for IF5
|
||||
ru->ifdevice.host_type = RAU_HOST;
|
||||
ru->ifdevice.eth_params = &ru->eth_params;
|
||||
@@ -2175,6 +2188,7 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->fh_north_asynch_in = NULL;
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->stop_rf = NULL;
|
||||
ru->start_write_thread = NULL;
|
||||
ru->nr_start_if = nr_start_if; // need to start if interface for IF4p5
|
||||
ru->ifdevice.host_type = RAU_HOST;
|
||||
ru->ifdevice.eth_params = &ru->eth_params;
|
||||
|
||||
+58
-29
@@ -157,6 +157,7 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
|
||||
|
||||
// initialize all signal buffers
|
||||
init_nr_ue_signal(ue, nb_connected_gNB, abstraction_flag);
|
||||
|
||||
// intialize transport
|
||||
init_nr_ue_transport(ue, abstraction_flag);
|
||||
}
|
||||
@@ -365,13 +366,14 @@ static void UE_synch(void *arg) {
|
||||
}
|
||||
|
||||
void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
uint32_t nb_rb, start_rb;
|
||||
uint8_t nb_symb_sch, start_symbol, mcs, precod_nbr_layers, harq_pid, rvidx;
|
||||
uint16_t n_rnti;
|
||||
module_id_t mod_id;
|
||||
|
||||
uint32_t rb_size, rb_start;
|
||||
uint16_t rnti, l_prime_mask, n_rb0, n_rb1, pdu_bit_map;
|
||||
uint8_t nr_of_symbols, start_symbol_index, mcs_index, mcs_table, nrOfLayers, harq_process_id, rv_index, dmrs_config_type;
|
||||
uint8_t ptrs_mcs1, ptrs_mcs2, ptrs_mcs3, ptrs_time_density, ptrs_freq_density;
|
||||
nr_dcireq_t dcireq;
|
||||
nr_scheduled_response_t scheduled_response;
|
||||
module_id_t mod_id;
|
||||
|
||||
// program PUSCH. this should actually be done by the MAC upon reception of an UL DCI
|
||||
if (proc->nr_tti_tx == 8 || proc->nr_tti_tx == 7 || UE->frame_parms.frame_type == FDD){
|
||||
@@ -392,30 +394,53 @@ void processSlotTX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
scheduled_response.frame = proc->frame_rx;
|
||||
scheduled_response.slot = proc->nr_tti_rx;
|
||||
//--------------------------Temporary configuration-----------------------------//
|
||||
n_rnti = 0x1234;
|
||||
nb_rb = 50;
|
||||
start_rb = 0;
|
||||
nb_symb_sch = 12;
|
||||
start_symbol = 2;
|
||||
precod_nbr_layers = 1;
|
||||
mcs = 9;
|
||||
harq_pid = 0;
|
||||
rvidx = 0;
|
||||
rnti = 0x1234;
|
||||
rb_size = 50;
|
||||
rb_start = 0;
|
||||
nr_of_symbols = 12;
|
||||
start_symbol_index = 2;
|
||||
nrOfLayers = 1;
|
||||
mcs_index = 9;
|
||||
mcs_table = 0;
|
||||
harq_process_id = 0;
|
||||
rv_index = 0;
|
||||
l_prime_mask = get_l_prime(nr_of_symbols, typeB, pusch_dmrs_pos0, pusch_len1);
|
||||
dmrs_config_type = 0;
|
||||
ptrs_mcs1 = 2;
|
||||
ptrs_mcs2 = 4;
|
||||
ptrs_mcs3 = 10;
|
||||
n_rb0 = 25;
|
||||
n_rb1 = 75;
|
||||
pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA;
|
||||
ptrs_time_density = get_L_ptrs(ptrs_mcs1, ptrs_mcs2, ptrs_mcs3, mcs_index, mcs_table);
|
||||
ptrs_freq_density = get_K_ptrs(n_rb0, n_rb1, rb_size);
|
||||
//------------------------------------------------------------------------------//
|
||||
|
||||
scheduled_response.ul_config->slot = 8;
|
||||
scheduled_response.ul_config->number_pdus = 1;
|
||||
scheduled_response.ul_config->ul_config_list[0].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
|
||||
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.rnti = n_rnti;
|
||||
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_rbs = nb_rb;
|
||||
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_rb = start_rb;
|
||||
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_symbols = nb_symb_sch;
|
||||
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_symbol = start_symbol;
|
||||
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.mcs = mcs;
|
||||
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.ndi = 0;
|
||||
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.rv = rvidx;
|
||||
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.n_layers = precod_nbr_layers;
|
||||
scheduled_response.ul_config->ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.harq_process_nbr = harq_pid;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rnti = rnti;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rb_size = rb_size;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.rb_start = rb_start;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.nr_of_symbols = nr_of_symbols;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.start_symbol_index = start_symbol_index;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.ul_dmrs_symb_pos = l_prime_mask << start_symbol_index;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.dmrs_config_type = dmrs_config_type;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.mcs_index = mcs_index;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.mcs_table = mcs_table;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.new_data_indicator = 0;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.rv_index = rv_index;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.nrOfLayers = nrOfLayers;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_data.harq_process_id = harq_process_id;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pdu_bit_map = pdu_bit_map;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_time_density = ptrs_time_density;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_freq_density = ptrs_freq_density;
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_ports_list = (nfapi_nr_ue_ptrs_ports_t *) malloc(2*sizeof(nfapi_nr_ue_ptrs_ports_t));
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset = 0;
|
||||
|
||||
if (1 << ptrs_time_density >= nr_of_symbols) {
|
||||
scheduled_response.ul_config->ul_config_list[0].pusch_config_pdu.pdu_bit_map &= ~PUSCH_PDU_BITMAP_PUSCH_PTRS; // disable PUSCH PTRS
|
||||
}
|
||||
|
||||
nr_ue_scheduled_response(&scheduled_response);
|
||||
|
||||
@@ -482,7 +507,6 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
|
||||
}
|
||||
}
|
||||
|
||||
// no UL for now
|
||||
// no UL for now
|
||||
/*
|
||||
if (UE->mac_enabled==1) {
|
||||
@@ -538,7 +562,7 @@ void UE_processing(void *arg) {
|
||||
|
||||
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;
|
||||
@@ -620,8 +644,7 @@ 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);
|
||||
|
||||
*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 ) {
|
||||
@@ -642,6 +665,12 @@ void syncInFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
|
||||
|
||||
int computeSamplesShift(PHY_VARS_NR_UE *UE) {
|
||||
|
||||
if (IS_SOFTMODEM_RFSIM) {
|
||||
LOG_D(PHY,"SET rx_offset %d \n",UE->rx_offset);
|
||||
//UE->rx_offset_diff=0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// compute TO compensation that should be applied for this frame
|
||||
if ( UE->rx_offset < UE->frame_parms.samples_per_frame/2 &&
|
||||
UE->rx_offset > 0 ) {
|
||||
@@ -778,7 +807,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]);
|
||||
}*/
|
||||
@@ -863,7 +892,7 @@ void *UE_thread(void *arg) {
|
||||
if ( (decoded_frame_rx != curMsg->proc.frame_rx) &&
|
||||
(((decoded_frame_rx+1) % MAX_FRAME_NUMBER) != curMsg->proc.frame_rx) &&
|
||||
(((decoded_frame_rx+2) % MAX_FRAME_NUMBER) != curMsg->proc.frame_rx))
|
||||
LOG_D(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
|
||||
LOG_E(PHY,"Decoded frame index (%d) is not compatible with current context (%d), UE should go back to synch mode\n",
|
||||
decoded_frame_rx, curMsg->proc.frame_rx );
|
||||
|
||||
nbSlotProcessing++;
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include "fapi_nr_ue_constants.h"
|
||||
#include "PHY/impl_defs_nr.h"
|
||||
|
||||
#define NFAPI_UE_MAX_NUM_CB 8
|
||||
|
||||
/*
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned short uint16_t;
|
||||
@@ -263,40 +265,124 @@ typedef struct {
|
||||
|
||||
} fapi_nr_ul_config_pucch_pdu;
|
||||
|
||||
typedef enum {pusch_freq_hopping_disabled = 0 , pusch_freq_hopping_enabled = 1}pusch_freq_hopping_t;
|
||||
typedef struct{
|
||||
uint8_t aperiodicSRS_ResourceTrigger;
|
||||
} fapi_nr_ul_srs_config_t;
|
||||
typedef struct {
|
||||
uint8_t bandwidth_part_ind;
|
||||
uint16_t number_rbs;
|
||||
uint16_t start_rb;
|
||||
uint8_t frame_offset;
|
||||
uint16_t number_symbols;
|
||||
uint16_t start_symbol;
|
||||
pusch_freq_hopping_t pusch_freq_hopping;
|
||||
uint8_t mcs;
|
||||
uint8_t ndi;
|
||||
uint8_t rv;
|
||||
uint8_t harq_process_nbr;
|
||||
int8_t accumulated_delta_PUSCH;
|
||||
int8_t absolute_delta_PUSCH;
|
||||
uint8_t n_layers;
|
||||
uint8_t tpmi;
|
||||
uint8_t n_dmrs_cdm_groups;
|
||||
uint8_t dmrs_ports[4];
|
||||
uint8_t n_front_load_symb;
|
||||
fapi_nr_ul_srs_config_t srs_config;
|
||||
uint8_t csi_reportTriggerSize;
|
||||
uint8_t maxCodeBlockGroupsPerTransportBlock;
|
||||
uint8_t ptrs_dmrs_association_port;
|
||||
uint8_t beta_offset_ind;
|
||||
} fapi_nr_ul_config_pusch_pdu_rel15_t;
|
||||
typedef struct
|
||||
{
|
||||
uint8_t rv_index;
|
||||
uint8_t harq_process_id;
|
||||
uint8_t new_data_indicator;
|
||||
uint32_t tb_size;
|
||||
uint16_t num_cb;
|
||||
uint8_t cb_present_and_position[(NFAPI_UE_MAX_NUM_CB+7) / 8];
|
||||
|
||||
typedef struct {
|
||||
} nfapi_nr_ue_pusch_data_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t harq_ack_bit_length;
|
||||
uint16_t csi_part1_bit_length;
|
||||
uint16_t csi_part2_bit_length;
|
||||
uint8_t alpha_scaling;
|
||||
uint8_t beta_offset_harq_ack;
|
||||
uint8_t beta_offset_csi1;
|
||||
uint8_t beta_offset_csi2;
|
||||
|
||||
} nfapi_nr_ue_pusch_uci_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t ptrs_port_index;//PT-RS antenna ports [TS38.214, sec6.2.3.1 and 38.212, section 7.3.1.1.2] Bitmap occupying the 12 LSBs with: bit 0: antenna port 0 bit 11: antenna port 11 and for each bit 0: PTRS port not used 1: PTRS port used
|
||||
uint8_t ptrs_dmrs_port;//DMRS port corresponding to PTRS.
|
||||
uint8_t ptrs_re_offset;//PT-RS resource element offset value taken from 0~11
|
||||
} nfapi_nr_ue_ptrs_ports_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t num_ptrs_ports;
|
||||
nfapi_nr_ue_ptrs_ports_t* ptrs_ports_list;
|
||||
uint8_t ptrs_time_density;
|
||||
uint8_t ptrs_freq_density;
|
||||
uint8_t ul_ptrs_power;
|
||||
|
||||
}nfapi_nr_ue_pusch_ptrs_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t low_papr_group_number;//Group number for Low PAPR sequence generation.
|
||||
uint16_t low_papr_sequence_number;//[TS38.211, sec 5.2.2] For DFT-S-OFDM.
|
||||
uint8_t ul_ptrs_sample_density;//Number of PTRS groups [But I suppose this sentence is misplaced, so as the next one. --Chenyu]
|
||||
uint8_t ul_ptrs_time_density_transform_precoding;//Number of samples per PTRS group
|
||||
|
||||
} nfapi_nr_ue_dfts_ofdm_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t beam_idx;//Index of the digital beam weight vector pre-stored at cell configuration. The vector maps this input port to output TXRUs. Value: 0->65535
|
||||
|
||||
}nfapi_nr_ue_dig_bf_interface_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
nfapi_nr_ue_dig_bf_interface_t* dig_bf_interface_list;
|
||||
|
||||
} nfapi_nr_ue_ul_beamforming_number_of_prgs_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t num_prgs;
|
||||
uint16_t prg_size;
|
||||
//watchout: dig_bf_interface here, in table 3-43 it's dig_bf_interfaces
|
||||
uint8_t dig_bf_interface;
|
||||
nfapi_nr_ue_ul_beamforming_number_of_prgs_t* prgs_list;//
|
||||
|
||||
} nfapi_nr_ue_ul_beamforming_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint16_t pdu_bit_map;//Bitmap indicating presence of optional PDUs (see above)
|
||||
uint16_t rnti;
|
||||
fapi_nr_ul_config_pusch_pdu_rel15_t ulsch_pdu_rel15;
|
||||
} fapi_nr_ul_config_pusch_pdu;
|
||||
uint32_t handle;//An opaque handling returned in the RxData.indication and/or UCI.indication message
|
||||
//BWP
|
||||
uint16_t bwp_size;
|
||||
uint16_t bwp_start;
|
||||
uint8_t subcarrier_spacing;
|
||||
uint8_t cyclic_prefix;
|
||||
//pusch information always include
|
||||
uint16_t target_code_rate;
|
||||
uint8_t qam_mod_order;
|
||||
uint8_t mcs_index;
|
||||
uint8_t mcs_table;
|
||||
uint8_t transform_precoding;
|
||||
uint16_t data_scrambling_id;
|
||||
uint8_t nrOfLayers;
|
||||
//DMRS
|
||||
uint16_t ul_dmrs_symb_pos;
|
||||
uint8_t dmrs_config_type;
|
||||
uint16_t ul_dmrs_scrambling_id;
|
||||
uint8_t scid;
|
||||
uint8_t num_dmrs_cdm_grps_no_data;
|
||||
uint16_t dmrs_ports;//DMRS ports. [TS38.212 7.3.1.1.2] provides description between DCI 0-1 content and DMRS ports. Bitmap occupying the 11 LSBs with: bit 0: antenna port 1000 bit 11: antenna port 1011 and for each bit 0: DMRS port not used 1: DMRS port used
|
||||
//Pusch Allocation in frequency domain [TS38.214, sec 6.1.2.2]
|
||||
uint8_t resource_alloc;
|
||||
uint8_t rb_bitmap[36];//
|
||||
uint16_t rb_start;
|
||||
uint16_t rb_size;
|
||||
uint8_t vrb_to_prb_mapping;
|
||||
uint8_t frequency_hopping;
|
||||
uint16_t tx_direct_current_location;//The uplink Tx Direct Current location for the carrier. Only values in the value range of this field between 0 and 3299, which indicate the subcarrier index within the carrier corresponding 1o the numerology of the corresponding uplink BWP and value 3300, which indicates "Outside the carrier" and value 3301, which indicates "Undetermined position within the carrier" are used. [TS38.331, UplinkTxDirectCurrentBWP IE]
|
||||
uint8_t uplink_frequency_shift_7p5khz;
|
||||
//Resource Allocation in time domain
|
||||
uint8_t start_symbol_index;
|
||||
uint8_t nr_of_symbols;
|
||||
//Optional Data only included if indicated in pduBitmap
|
||||
nfapi_nr_ue_pusch_data_t pusch_data;
|
||||
nfapi_nr_ue_pusch_uci_t pusch_uci;
|
||||
nfapi_nr_ue_pusch_ptrs_t pusch_ptrs;
|
||||
nfapi_nr_ue_dfts_ofdm_t dfts_ofdm;
|
||||
//beamforming
|
||||
nfapi_nr_ue_ul_beamforming_t beamforming;
|
||||
//OAI specific
|
||||
int8_t absolute_delta_PUSCH;
|
||||
} nfapi_nr_ue_pusch_pdu_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -307,7 +393,7 @@ typedef struct {
|
||||
union {
|
||||
fapi_nr_ul_config_prach_pdu prach_config_pdu;
|
||||
fapi_nr_ul_config_pucch_pdu pucch_config_pdu;
|
||||
fapi_nr_ul_config_pusch_pdu ulsch_config_pdu;
|
||||
nfapi_nr_ue_pusch_pdu_t pusch_config_pdu;
|
||||
fapi_nr_ul_config_srs_pdu srs_config_pdu;
|
||||
};
|
||||
} fapi_nr_ul_config_request_pdu_t;
|
||||
@@ -348,7 +434,6 @@ typedef struct {
|
||||
uint8_t SubcarrierSpacing;
|
||||
uint16_t number_rbs;
|
||||
uint16_t start_rb;
|
||||
uint8_t frame_offset;
|
||||
uint16_t number_symbols;
|
||||
uint16_t start_symbol;
|
||||
uint16_t dlDmrsSymbPos;
|
||||
|
||||
@@ -657,8 +657,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
abstraction_flag = 0;
|
||||
fp->nb_antennas_tx = 1;
|
||||
fp->nb_antennas_rx=1;
|
||||
dmrs_UplinkConfig_t *dmrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig;
|
||||
ptrs_UplinkConfig_t *ptrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
|
||||
// dmrs_UplinkConfig_t *dmrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig;
|
||||
// ptrs_UplinkConfig_t *ptrs_Uplink_Config = &ue->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
|
||||
printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx);
|
||||
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
|
||||
phy_init_nr_top(ue);
|
||||
@@ -710,9 +710,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
|
||||
//------------- config DMRS parameters--------------//
|
||||
dmrs_Uplink_Config->pusch_dmrs_type = pusch_dmrs_type1;
|
||||
dmrs_Uplink_Config->pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0;
|
||||
dmrs_Uplink_Config->pusch_maxLength = pusch_len1;
|
||||
// dmrs_Uplink_Config->pusch_dmrs_type = pusch_dmrs_type1;
|
||||
// dmrs_Uplink_Config->pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0;
|
||||
// dmrs_Uplink_Config->pusch_maxLength = pusch_len1;
|
||||
//-------------------------------------------------//
|
||||
ue->dmrs_DownlinkConfig.pdsch_dmrs_type = pdsch_dmrs_type1;
|
||||
ue->dmrs_DownlinkConfig.pdsch_dmrs_AdditionalPosition = pdsch_dmrs_pos0;
|
||||
@@ -745,15 +745,13 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
/////////////////////////PUSCH PTRS init/////////////////////////
|
||||
///////////
|
||||
|
||||
ue->ptrs_configured = 0; // flag to be toggled by RCC
|
||||
|
||||
//------------- config PTRS parameters--------------//
|
||||
ptrs_Uplink_Config->timeDensity.ptrs_mcs1 = 0; // setting MCS values to 0 indicate abscence of time_density field in the configuration
|
||||
ptrs_Uplink_Config->timeDensity.ptrs_mcs2 = 0;
|
||||
ptrs_Uplink_Config->timeDensity.ptrs_mcs3 = 0;
|
||||
ptrs_Uplink_Config->frequencyDensity.n_rb0 = 0; // setting N_RB values to 0 indicate abscence of frequency_density field in the configuration
|
||||
ptrs_Uplink_Config->frequencyDensity.n_rb1 = 0;
|
||||
ptrs_Uplink_Config->resourceElementOffset = 0;
|
||||
// ptrs_Uplink_Config->timeDensity.ptrs_mcs1 = 2; // setting MCS values to 0 indicate abscence of time_density field in the configuration
|
||||
// ptrs_Uplink_Config->timeDensity.ptrs_mcs2 = 4;
|
||||
// ptrs_Uplink_Config->timeDensity.ptrs_mcs3 = 10;
|
||||
// ptrs_Uplink_Config->frequencyDensity.n_rb0 = 25; // setting N_RB values to 0 indicate abscence of frequency_density field in the configuration
|
||||
// ptrs_Uplink_Config->frequencyDensity.n_rb1 = 75;
|
||||
// ptrs_Uplink_Config->resourceElementOffset = 0;
|
||||
//-------------------------------------------------//
|
||||
|
||||
///////////
|
||||
|
||||
@@ -112,18 +112,12 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
|
||||
int lte_est_timing_advance_pusch(PHY_VARS_eNB *eNB,
|
||||
module_id_t UE_id)
|
||||
int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **ul_ch_estimates_time)
|
||||
{
|
||||
int temp, i, aa, max_pos=0, max_val=0;
|
||||
short Re,Im;
|
||||
|
||||
RU_t *ru;
|
||||
ru = RC.ru[UE_id];
|
||||
LTE_DL_FRAME_PARMS *frame_parms = (eNB==NULL) ? ru->frame_parms : &eNB->frame_parms;
|
||||
LTE_eNB_PUSCH *eNB_pusch_vars = (eNB!=NULL) ? eNB->pusch_vars[UE_id] : (LTE_eNB_PUSCH*)NULL;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
int32_t **ul_ch_estimates_time = (eNB==NULL) ? calibration->drs_ch_estimates_time : eNB_pusch_vars->drs_ch_estimates_time;
|
||||
uint8_t cyclic_shift = 0;
|
||||
int sync_pos = (frame_parms->ofdm_symbol_size-cyclic_shift*frame_parms->ofdm_symbol_size/12)%(frame_parms->ofdm_symbol_size);
|
||||
|
||||
@@ -149,7 +143,7 @@ int lte_est_timing_advance_pusch(PHY_VARS_eNB *eNB,
|
||||
max_pos = max_pos-frame_parms->ofdm_symbol_size;
|
||||
|
||||
//#ifdef DEBUG_PHY
|
||||
LOG_D(PHY,"frame %d: max_pos = %d, sync_pos=%d\n",eNB->proc.frame_rx,max_pos,sync_pos);
|
||||
LOG_D(PHY,"max_pos = %d, sync_pos=%d\n",max_pos,sync_pos);
|
||||
//#endif //DEBUG_PHY
|
||||
|
||||
return max_pos - sync_pos;
|
||||
|
||||
@@ -220,8 +220,12 @@ void phy_adjust_gain (PHY_VARS_UE *phy_vars_ue,
|
||||
uint32_t rx_power_fil_dB,
|
||||
unsigned char eNB_id);
|
||||
|
||||
int lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
|
||||
int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
L1_rxtx_proc_t *proc,
|
||||
LTE_eNB_ULSCH_t * ulsch,
|
||||
int32_t **ul_ch_estimates,
|
||||
int32_t **ul_ch_estimates_time,
|
||||
int32_t **rxdataF_ext,
|
||||
module_id_t UE_id,
|
||||
uint8_t l,
|
||||
uint8_t Ns);
|
||||
@@ -258,7 +262,8 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char number_of_cards,
|
||||
short coef);
|
||||
|
||||
int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,module_id_t UE_id);
|
||||
int lte_est_timing_advance_pusch(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **ul_ch_estimates_time);
|
||||
|
||||
void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
|
||||
int subframe,
|
||||
|
||||
@@ -34,23 +34,17 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
|
||||
|
||||
#define SCALE 0x3FFF
|
||||
|
||||
int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
L1_rxtx_proc_t *proc,
|
||||
LTE_eNB_ULSCH_t * ulsch,
|
||||
int32_t **ul_ch_estimates,
|
||||
int32_t **ul_ch_estimates_time,
|
||||
int32_t **rxdataF_ext,
|
||||
module_id_t UE_id,
|
||||
unsigned char l,
|
||||
unsigned char Ns) {
|
||||
RU_t *ru;
|
||||
ru = RC.ru[UE_id];
|
||||
LTE_DL_FRAME_PARMS *frame_parms = (eNB!=NULL) ? &eNB->frame_parms : ru->frame_parms;
|
||||
LTE_eNB_PUSCH *pusch_vars = (eNB!=NULL) ? eNB->pusch_vars[UE_id] : NULL;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
int32_t **ul_ch_estimates = (eNB!=NULL) ? pusch_vars->drs_ch_estimates : calibration->drs_ch_estimates;
|
||||
AssertFatal(ul_ch_estimates != NULL, "ul_ch_estimates is null (eNB %p, pusch %p, pusch->drs_ch_estimates %p, pusch->drs_ch_estimates[0] %p ul_ch_estimates %p UE_id %d)\n",eNB,pusch_vars,
|
||||
pusch_vars->drs_ch_estimates,pusch_vars->drs_ch_estimates[0],ul_ch_estimates,UE_id);
|
||||
int32_t **ul_ch_estimates_time = (eNB!=NULL) ? pusch_vars->drs_ch_estimates_time : calibration->drs_ch_estimates_time;
|
||||
AssertFatal(ul_ch_estimates != NULL, "ul_ch_estimates is null ");
|
||||
AssertFatal(ul_ch_estimates_time != NULL, "ul_ch_estimates_time is null\n");
|
||||
int32_t **rxdataF_ext = (eNB!=NULL) ? pusch_vars->rxdataF_ext : calibration->rxdataF_ext;
|
||||
|
||||
int subframe = proc->subframe_rx;
|
||||
|
||||
uint8_t harq_pid;
|
||||
@@ -83,16 +77,16 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
#endif
|
||||
int32_t temp_in_ifft_0[2048*2] __attribute__((aligned(32)));
|
||||
|
||||
if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0;
|
||||
if (ulsch->ue_type > 0) harq_pid = 0;
|
||||
else {
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
}
|
||||
|
||||
uint16_t N_rb_alloc = eNB->ulsch[UE_id]->harq_processes[harq_pid]->nb_rb;
|
||||
uint16_t N_rb_alloc = ulsch->harq_processes[harq_pid]->nb_rb;
|
||||
int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
|
||||
Msc_RS = N_rb_alloc*12;
|
||||
cyclic_shift = (frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
|
||||
eNB->ulsch[UE_id]->harq_processes[harq_pid]->n_DMRS2 +
|
||||
ulsch->harq_processes[harq_pid]->n_DMRS2 +
|
||||
frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[(subframe<<1)+Ns]) % 12;
|
||||
Msc_idx_ptr = (uint16_t *) bsearch(&Msc_RS, dftsizes, 34, sizeof(uint16_t), compareints);
|
||||
|
||||
@@ -276,7 +270,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
|
||||
#if T_TRACER
|
||||
|
||||
if (aa == 0)
|
||||
T(T_ENB_PHY_UL_CHANNEL_ESTIMATE, T_INT(0), T_INT(eNB->ulsch[UE_id]->rnti),
|
||||
T(T_ENB_PHY_UL_CHANNEL_ESTIMATE, T_INT(0), T_INT(ulsch->rnti),
|
||||
T_INT(proc->frame_rx), T_INT(subframe),
|
||||
T_INT(0), T_BUFFER(ul_ch_estimates_time[0], 512 * 4));
|
||||
|
||||
|
||||
@@ -19,9 +19,14 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __PHY_LTE_REFSIG_MOD_TABLE__H__
|
||||
#define __PHY_LTE_REFSIG_MOD_TABLE__H__
|
||||
|
||||
#define MOD_TABLE_SIZE_SHORT 304
|
||||
#define MOD_TABLE_QPSK_OFFSET 1
|
||||
#define MOD_TABLE_16QAM_OFFSET 5
|
||||
#define MOD_TABLE_64QAM_OFFSET 21
|
||||
#define MOD_TABLE_PSS_OFFSET 85
|
||||
short mod_table[MOD_TABLE_SIZE_SHORT] = {0,0,768,768,768,-768,-768,768,-768,-768,343,343,343,1030,1030,343,1030,1030,343,-343,343,-1030,1030,-343,1030,-1030,-343,343,-343,1030,-1030,343,-1030,1030,-343,-343,-343,-1030,-1030,-343,-1030,-1030,503,503,503,168,168,503,168,168,503,838,503,1173,168,838,168,1173,838,503,838,168,1173,503,1173,168,838,838,838,1173,1173,838,1173,1173,503,-503,503,-168,168,-503,168,-168,503,-838,503,-1173,168,-838,168,-1173,838,-503,838,-168,1173,-503,1173,-168,838,-838,838,-1173,1173,-838,1173,-1173,-503,503,-503,168,-168,503,-168,168,-503,838,-503,1173,-168,838,-168,1173,-838,503,-838,168,-1173,503,-1173,168,-838,838,-838,1173,-1173,838,-1173,1173,-503,-503,-503,-168,-168,-503,-168,-168,-503,-838,-503,-1173,-168,-838,-168,-1173,-838,-503,-838,-168,-1173,-503,-1173,-168,-838,-838,-838,-1173,-1173,-838,-1173,-1173,1086,0,1081,-108,1065,-215,1038,-320,1001,-422,954,-519,897,-612,832,-698,758,-777,677,-849,589,-912,495,-966,397,-1011,294,-1046,189,-1070,81,-1083,-27,-1086,-135,-1078,-242,-1059,-346,-1030,-447,-990,-543,-941,-634,-882,-719,-814,-796,-739,-866,-656,-927,-566,-979,-471,-1021,-371,-1053,-268,-1074,-162,-1085,-54,-1085,54,-1074,162,-1053,268,-1021,371,-979,471,-927,566,-866,656,-796,739,-719,814,-634,882,-543,941,-447,990,-346,1030,-242,1059,-135,1078,-27,1086,81,1083,189,1070,294,1045,397,1011,495,966,589,912,677,849,758,777,832,698,897,612,954,519,1001,422,1038,320,1065,215,1081,108,16384,0,8192,0,4096,0,2048,0};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __DLSCH_TBS_FULL__H__
|
||||
#define __DLSCH_TBS_FULL__H__
|
||||
|
||||
#define TBStable_rowCnt 27
|
||||
|
||||
/** \brief "Transport block size table"
|
||||
@@ -54,3 +57,4 @@ unsigned int TBStable[TBStable_rowCnt][110] = {{16,32,56,88,120,152,176,208,224,
|
||||
};
|
||||
|
||||
unsigned int TBStable1C[32] = {40, 56, 72, 120, 136, 144, 176, 208, 224, 256, 280, 296, 328, 336, 392, 488, 552, 600, 632, 696, 776, 840, 904, 1000, 1064, 1128, 1224, 1288, 1384, 1480, 1608, 1736};
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __PHY_LTE_TRANSPORT_PRACH_EXTERN__H__
|
||||
#define __PHY_LTE_TRANSPORT_PRACH_EXTERN__H__
|
||||
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "PHY/defs_eNB.h"
|
||||
#include "PHY/phy_extern.h"
|
||||
@@ -91,3 +95,4 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
|
||||
lte_frame_type_t frame_type,
|
||||
uint32_t X_u[64][839]);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,9 @@
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __PHY_LTE_TRANSPORT_PUCCH_EXTERN__H__
|
||||
#define __PHY_LTE_TRANSPORT_PUCCH_EXTERN__H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/* PUCCH format3 >> */
|
||||
@@ -76,3 +79,5 @@ extern uint8_t Np4_TBL[4];
|
||||
// alpha_TBL
|
||||
extern int16_t alphaTBL_re[12];
|
||||
extern int16_t alphaTBL_im[12];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
extern unsigned int dlsch_tbs25[27][25],TBStable[27][110],TBStable1C[32];
|
||||
extern unsigned short lte_cqi_eff1024[16];
|
||||
extern char lte_cqi_snr_dB[15];
|
||||
extern short conjugate[8],conjugate2[8];
|
||||
extern const short conjugate[8],conjugate2[8];
|
||||
extern short minus_one[8];
|
||||
extern short minus_one[8];
|
||||
extern short *ul_ref_sigs[30][2][34];
|
||||
|
||||
@@ -495,7 +495,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
AssertFatal(sumKr>0,
|
||||
"[eNB] ulsch_decoding.c: FATAL sumKr is 0! (Nid_cell %d, rnti %x, x2 %x): harq_pid %d round %d, RV %d, O_RI %d, O_ACK %d, G %d, subframe %d\n",
|
||||
"[eNB] ulsch_decoding.c: FATAL sumKr is 0! (Nid_cell %d, rnti %x, x2 %x): harq_pid %d round %d, RV %d, O_RI %d, O_ACK %d, G %u, subframe %d\n",
|
||||
frame_parms->Nid_cell,ulsch->rnti,x2,
|
||||
harq_pid,
|
||||
ulsch_harq->round,
|
||||
|
||||
@@ -1047,7 +1047,11 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
l%(frame_parms->symbols_per_tti/2),
|
||||
l/(frame_parms->symbols_per_tti/2),
|
||||
frame_parms);
|
||||
lte_ul_channel_estimation(eNB,proc,
|
||||
lte_ul_channel_estimation(&eNB->frame_parms,proc,
|
||||
eNB->ulsch[UE_id],
|
||||
eNB->pusch_vars[UE_id]->drs_ch_estimates,
|
||||
eNB->pusch_vars[UE_id]->drs_ch_estimates_time,
|
||||
eNB->pusch_vars[UE_id]->rxdataF_ext,
|
||||
UE_id,
|
||||
l%(frame_parms->symbols_per_tti/2),
|
||||
l/(frame_parms->symbols_per_tti/2));
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#ifndef __LTE_TRANSPORT_SLSS__C__
|
||||
#define __LTE_TRANSPORT_SLSS__C__
|
||||
#include "PHY/defs_UE.h"
|
||||
|
||||
extern int multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
|
||||
@@ -63,4 +61,3 @@ void generate_sldch(PHY_VARS_UE *ue,SLDCH_t *sldch,int frame_tx,int subframe_tx)
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#ifndef __LTE_TRANSPORT_SLSS__C__
|
||||
#define __LTE_TRANSPORT_SLSS__C__
|
||||
#include "PHY/defs_UE.h"
|
||||
|
||||
extern int
|
||||
@@ -66,5 +64,3 @@ void generate_slsch(PHY_VARS_UE *ue,SLSCH_t *slsch,int frame_tx,int subframe_tx)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
#ifndef __LTE_TRANSPORT_SLSS__C__
|
||||
#define __LTE_TRANSPORT_SLSS__C__
|
||||
#include "PHY/defs_UE.h"
|
||||
|
||||
|
||||
@@ -39,5 +37,3 @@ void generate_slss(PHY_VARS_UE *ue,SLSS_t *slss,int frame_tx,int subframe_tx) {
|
||||
AssertFatal(1==0,"Should get here yet for UE %d\n",ue->Mod_id);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "nr_modulation.h"
|
||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
||||
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
||||
#include <common/utils/LOG/log.h>
|
||||
|
||||
//#define DEBUG_FEP
|
||||
|
||||
|
||||
@@ -33,149 +33,6 @@
|
||||
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
|
||||
/***********************************************************************/
|
||||
|
||||
// TS 38.211 Table 6.4.1.1.3-3: PUSCH DMRS positions l' within a slot for single-symbol DMRS and intra-slot frequency hopping disabled.
|
||||
// The first 4 colomns are PUSCH mapping type A and the last 4 colomns are PUSCH mapping type B.
|
||||
// When l' = l0, it is represented by 1
|
||||
// E.g. when symbol duration is 12 in colomn 7, value 1057 ('10000100001') which means l' = l0, 5, 10.
|
||||
|
||||
int32_t table_6_4_1_1_3_3_pusch_dmrs_positions_l [12][8] = { // Duration in symbols
|
||||
{-1, -1, -1, -1, 1, 1, 1, 1}, //<4 // (DMRS l' position)
|
||||
{1, 1, 1, 1, 1, 1, 1, 1}, //4 // (DMRS l' position)
|
||||
{1, 1, 1, 1, 1, 5, 5, 5}, //5 // (DMRS l' position)
|
||||
{1, 1, 1, 1, 1, 5, 5, 5}, //6 // (DMRS l' position)
|
||||
{1, 1, 1, 1, 1, 5, 5, 5}, //7 // (DMRS l' position)
|
||||
{1, 129, 129, 129, 1, 65, 73, 73}, //8 // (DMRS l' position)
|
||||
{1, 129, 129, 129, 1, 65, 73, 73}, //9 // (DMRS l' position)
|
||||
{1, 513, 577, 577, 1, 257, 273, 585}, //10 // (DMRS l' position)
|
||||
{1, 513, 577, 577, 1, 257, 273, 585}, //11 // (DMRS l' position)
|
||||
{1, 513, 577, 2337, 1, 1025, 1057, 585}, //12 // (DMRS l' position)
|
||||
{1, 2049, 2177, 2337, 1, 1025, 1057, 585}, //13 // (DMRS l' position)
|
||||
{1, 2049, 2177, 2337, 1, 1025, 1057, 585}, //14 // (DMRS l' position)
|
||||
};
|
||||
|
||||
|
||||
// TS 38.211 Table 6.4.1.1.3-4: PUSCH DMRS positions l' within a slot for double-symbol DMRS and intra-slot frequency hopping disabled.
|
||||
// The first 4 colomns are PUSCH mapping type A and the last 4 colomns are PUSCH mapping type B.
|
||||
// When l' = l0, it is represented by 1
|
||||
|
||||
int32_t table_6_4_1_1_3_4_pusch_dmrs_positions_l [12][8] = { // Duration in symbols
|
||||
{-1, -1, -1, -1, -1, -1, -1, -1}, //<4 // (DMRS l' position)
|
||||
{1, 1, -1, -1, -1, -1, -1, -1}, //4 // (DMRS l' position)
|
||||
{1, 1, -1, -1, 1, 1, -1, -1}, //5 // (DMRS l' position)
|
||||
{1, 1, -1, -1, 1, 1, -1, -1}, //6 // (DMRS l' position)
|
||||
{1, 1, -1, -1, 1, 1, -1, -1}, //7 // (DMRS l' position)
|
||||
{1, 1, -1, -1, 1, 33, -1, -1}, //8 // (DMRS l' position)
|
||||
{1, 1, -1, -1, 1, 33, -1, -1}, //9 // (DMRS l' position)
|
||||
{1, 257, -1, -1, 1, 129, -1, -1}, //10 // (DMRS l' position)
|
||||
{1, 257, -1, -1, 1, 129, -1, -1}, //11 // (DMRS l' position)
|
||||
{1, 257, -1, -1, 1, 513, -1, -1}, //12 // (DMRS l' position)
|
||||
{1, 1025, -1, -1, 1, 513, -1, -1}, //13 // (DMRS l' position)
|
||||
{1, 1025, -1, -1, 1, 513, -1, -1}, //14 // (DMRS l' position)
|
||||
};
|
||||
|
||||
int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmrs_AdditionalPosition_t additional_pos, pusch_maxLength_t pusch_maxLength) {
|
||||
|
||||
uint8_t row, colomn;
|
||||
int32_t l_prime;
|
||||
|
||||
colomn = additional_pos;
|
||||
|
||||
if (mapping_type == typeB)
|
||||
colomn += 4;
|
||||
|
||||
if (duration_in_symbols < 4)
|
||||
row = 0;
|
||||
else
|
||||
row = duration_in_symbols - 3;
|
||||
|
||||
if (pusch_maxLength == pusch_len1)
|
||||
l_prime = table_6_4_1_1_3_3_pusch_dmrs_positions_l[row][colomn];
|
||||
else
|
||||
l_prime = table_6_4_1_1_3_4_pusch_dmrs_positions_l[row][colomn];
|
||||
|
||||
AssertFatal(l_prime>0,"invalid l_prime < 0\n");
|
||||
|
||||
return l_prime;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : is_dmrs_symbol
|
||||
*
|
||||
* PARAMETERS : l ofdm symbol index within slot
|
||||
* k subcarrier index
|
||||
* start_sc first subcarrier index
|
||||
* k_prime index alternating 0 and 1
|
||||
* n index starting 0,1,...
|
||||
* delta see Table 6.4.1.1.3
|
||||
* duration_in_symbols number of scheduled PUSCH ofdm symbols
|
||||
* start_symbol first symbol index in PUSCH allocation
|
||||
* dmrs_UplinkConfig DMRS uplink configuration
|
||||
* mapping_type PUSCH mapping type (A or B)
|
||||
* ofdm_symbol_size IFFT size
|
||||
*
|
||||
* RETURN : 0 if symbol(k,l) is data, or 1 if symbol(k,l) is dmrs
|
||||
*
|
||||
* DESCRIPTION : 3GPP TS 38.211 6.4.1.1 Demodulation reference signal for PUSCH
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t is_dmrs_symbol(uint8_t l,
|
||||
uint16_t k,
|
||||
uint16_t start_sc,
|
||||
uint8_t k_prime,
|
||||
uint16_t n,
|
||||
uint8_t delta,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t dmrs_type,
|
||||
uint16_t ofdm_symbol_size) {
|
||||
|
||||
uint8_t is_dmrs_freq, is_dmrs_time, l0;
|
||||
int32_t l_prime_mask;
|
||||
pusch_dmrs_AdditionalPosition_t additional_pos = pusch_dmrs_pos0;
|
||||
pusch_maxLength_t pusch_maxLength = pusch_len1;
|
||||
uint8_t mapping_type = typeB;
|
||||
|
||||
is_dmrs_freq = 0;
|
||||
is_dmrs_time = 0;
|
||||
|
||||
AssertFatal(l >= 0,"Check DMRS configuration (start_symbol) !\n");
|
||||
|
||||
|
||||
l0 = get_l0_ul(mapping_type, 2);
|
||||
l_prime_mask = get_l_prime(duration_in_symbols, mapping_type, additional_pos, pusch_maxLength);
|
||||
|
||||
if (k == ((start_sc+get_dmrs_freq_idx_ul(n, k_prime, delta, dmrs_type))%ofdm_symbol_size))
|
||||
is_dmrs_freq = 1;
|
||||
|
||||
|
||||
if (l_prime_mask == 1){
|
||||
|
||||
if (l == l0)
|
||||
is_dmrs_time = 1;
|
||||
|
||||
} else if ( (l==l0) || (((l_prime_mask>>l)&1) == 1 && l!=0) )
|
||||
is_dmrs_time = 1;
|
||||
|
||||
if (pusch_maxLength == pusch_len2){
|
||||
|
||||
if (((l_prime_mask>>(l-1))&1) == 1 && l!=0 && l!=1)
|
||||
is_dmrs_time = 1;
|
||||
|
||||
if (l-1 == l0)
|
||||
is_dmrs_time = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (is_dmrs_time && is_dmrs_freq)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
@@ -368,25 +225,6 @@ void lte_gold_new(LTE_DL_FRAME_PARMS *frame_parms, uint32_t lte_gold_table[20][2
|
||||
#endif
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_l0_ul
|
||||
*
|
||||
* PARAMETERS : mapping_type : PUSCH mapping type
|
||||
* dmrs_typeA_position : higher layer parameter
|
||||
*
|
||||
* RETURN : demodulation reference signal for PUSCH
|
||||
*
|
||||
* DESCRIPTION : see TS 38.211 V15.4.0 Demodulation reference signals for PUSCH
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t get_l0_ul(uint8_t mapping_type, uint8_t dmrs_typeA_position) {
|
||||
|
||||
return ((mapping_type==typeA)?dmrs_typeA_position:0);
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_dmrs_freq_idx_ul
|
||||
|
||||
@@ -54,21 +54,8 @@
|
||||
int pseudo_random_sequence(int M_PN, uint32_t *c, uint32_t cinit);
|
||||
void lte_gold_new(LTE_DL_FRAME_PARMS *frame_parms, uint32_t lte_gold_table[20][2][14], uint16_t Nid_cell);
|
||||
void generate_dmrs_pbch(uint32_t dmrs_pbch_bitmap[DMRS_PBCH_I_SSB][DMRS_PBCH_N_HF][DMRS_BITMAP_SIZE], uint16_t Nid_cell);
|
||||
uint8_t get_l0_ul(uint8_t mapping_type, uint8_t dmrs_typeA_position);
|
||||
uint16_t get_dmrs_freq_idx_ul(uint16_t n, uint8_t k_prime, uint8_t delta, uint8_t dmrs_type);
|
||||
|
||||
int32_t get_l_prime(uint8_t duration_in_symbols, uint8_t mapping_type, pusch_dmrs_AdditionalPosition_t additional_pos, pusch_maxLength_t pusch_maxLength);
|
||||
|
||||
uint8_t is_dmrs_symbol(uint8_t l,
|
||||
uint16_t k,
|
||||
uint16_t start_sc,
|
||||
uint8_t k_prime,
|
||||
uint16_t n,
|
||||
uint8_t delta,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t dmrs_type,
|
||||
uint16_t ofdm_symbol_size);
|
||||
|
||||
#undef EXTERN
|
||||
|
||||
#endif /* DMRS_NR_H */
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
|
||||
#ifndef __PHY_NR_REFSIG_NR_MOD_TABLE__H__
|
||||
#define __PHY_NR_REFSIG_NR_MOD_TABLE__H__
|
||||
|
||||
#define NR_MOD_TABLE_SIZE_SHORT 686
|
||||
#define NR_MOD_TABLE_BPSK_OFFSET 1
|
||||
#define NR_MOD_TABLE_QPSK_OFFSET 3
|
||||
@@ -5,3 +29,5 @@
|
||||
#define NR_MOD_TABLE_QAM64_OFFSET 23
|
||||
#define NR_MOD_TABLE_QAM256_OFFSET 87
|
||||
short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT] = {0,0,16384,16384,-16384,-16384,16384,16384,16384,-16384,-16384,16384,-16384,-16384,7327,7327,7327,21981,21981,7327,21981,21981,7327,-7327,7327,-21981,21981,-7327,21981,-21981,-7327,7327,-7327,21981,-21981,7327,-21981,21981,-7327,-7327,-7327,-21981,-21981,-7327,-21981,-21981,10726,10726,10726,3576,3576,10726,3576,3576,10726,17876,10726,25027,3576,17876,3576,25027,17876,10726,17876,3576,25027,10726,25027,3576,17876,17876,17876,25027,25027,17876,25027,25027,10726,-10726,10726,-3576,3576,-10726,3576,-3576,10726,-17876,10726,-25027,3576,-17876,3576,-25027,17876,-10726,17876,-3576,25027,-10726,25027,-3576,17876,-17876,17876,-25027,25027,-17876,25027,-25027,-10726,10726,-10726,3576,-3576,10726,-3576,3576,-10726,17876,-10726,25027,-3576,17876,-3576,25027,-17876,10726,-17876,3576,-25027,10726,-25027,3576,-17876,17876,-17876,25027,-25027,17876,-25027,25027,-10726,-10726,-10726,-3576,-3576,-10726,-3576,-3576,-10726,-17876,-10726,-25027,-3576,-17876,-3576,-25027,-17876,-10726,-17876,-3576,-25027,-10726,-25027,-3576,-17876,-17876,-17876,-25027,-25027,-17876,-25027,-25027,8886,8886,8886,12439,12439,8886,12439,12439,8886,5332,8886,1778,12439,5332,12439,1778,5332,8886,5332,12439,1778,8886,1778,12439,5332,5332,5332,1778,1778,5332,1778,1778,8886,19547,8886,15993,12439,19547,12439,15993,8886,23101,8886,26655,12439,23101,12439,26655,5332,19547,5332,15993,1778,19547,1778,15993,5332,23101,5332,26655,1778,23101,1778,26655,19547,8886,19547,12439,15993,8886,15993,12439,19547,5332,19547,1778,15993,5332,15993,1778,23101,8886,23101,12439,26655,8886,26655,12439,23101,5332,23101,1778,26655,5332,26655,1778,19547,19547,19547,15993,15993,19547,15993,15993,19547,23101,19547,26655,15993,23101,15993,26655,23101,19547,23101,15993,26655,19547,26655,15993,23101,23101,23101,26655,26655,23101,26655,26655,8886,-8886,8886,-12439,12439,-8886,12439,-12439,8886,-5332,8886,-1778,12439,-5332,12439,-1778,5332,-8886,5332,-12439,1778,-8886,1778,-12439,5332,-5332,5332,-1778,1778,-5332,1778,-1778,8886,-19547,8886,-15993,12439,-19547,12439,-15993,8886,-23101,8886,-26655,12439,-23101,12439,-26655,5332,-19547,5332,-15993,1778,-19547,1778,-15993,5332,-23101,5332,-26655,1778,-23101,1778,-26655,19547,-8886,19547,-12439,15993,-8886,15993,-12439,19547,-5332,19547,-1778,15993,-5332,15993,-1778,23101,-8886,23101,-12439,26655,-8886,26655,-12439,23101,-5332,23101,-1778,26655,-5332,26655,-1778,19547,-19547,19547,-15993,15993,-19547,15993,-15993,19547,-23101,19547,-26655,15993,-23101,15993,-26655,23101,-19547,23101,-15993,26655,-19547,26655,-15993,23101,-23101,23101,-26655,26655,-23101,26655,-26655,-8886,8886,-8886,12439,-12439,8886,-12439,12439,-8886,5332,-8886,1778,-12439,5332,-12439,1778,-5332,8886,-5332,12439,-1778,8886,-1778,12439,-5332,5332,-5332,1778,-1778,5332,-1778,1778,-8886,19547,-8886,15993,-12439,19547,-12439,15993,-8886,23101,-8886,26655,-12439,23101,-12439,26655,-5332,19547,-5332,15993,-1778,19547,-1778,15993,-5332,23101,-5332,26655,-1778,23101,-1778,26655,-19547,8886,-19547,12439,-15993,8886,-15993,12439,-19547,5332,-19547,1778,-15993,5332,-15993,1778,-23101,8886,-23101,12439,-26655,8886,-26655,12439,-23101,5332,-23101,1778,-26655,5332,-26655,1778,-19547,19547,-19547,15993,-15993,19547,-15993,15993,-19547,23101,-19547,26655,-15993,23101,-15993,26655,-23101,19547,-23101,15993,-26655,19547,-26655,15993,-23101,23101,-23101,26655,-26655,23101,-26655,26655,-8886,-8886,-8886,-12439,-12439,-8886,-12439,-12439,-8886,-5332,-8886,-1778,-12439,-5332,-12439,-1778,-5332,-8886,-5332,-12439,-1778,-8886,-1778,-12439,-5332,-5332,-5332,-1778,-1778,-5332,-1778,-1778,-8886,-19547,-8886,-15993,-12439,-19547,-12439,-15993,-8886,-23101,-8886,-26655,-12439,-23101,-12439,-26655,-5332,-19547,-5332,-15993,-1778,-19547,-1778,-15993,-5332,-23101,-5332,-26655,-1778,-23101,-1778,-26655,-19547,-8886,-19547,-12439,-15993,-8886,-15993,-12439,-19547,-5332,-19547,-1778,-15993,-5332,-15993,-1778,-23101,-8886,-23101,-12439,-26655,-8886,-26655,-12439,-23101,-5332,-23101,-1778,-26655,-5332,-26655,-1778,-19547,-19547,-19547,-15993,-15993,-19547,-15993,-15993,-19547,-23101,-19547,-26655,-15993,-23101,-15993,-26655,-23101,-19547,-23101,-15993,-26655,-19547,-26655,-15993,-23101,-23101,-23101,-26655,-26655,-23101,-26655,-26655};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,18 +38,18 @@
|
||||
/***********************************************************************/
|
||||
|
||||
|
||||
//#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
//#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
// TS 38.211 Table 6.4.1.2.2.1-1: The parameter kRE_ref.
|
||||
// The first 4 colomns are DM-RS Configuration type 1 and the last 4 colomns are DM-RS Configuration type 2.
|
||||
|
||||
int16_t table_6_4_1_2_2_1_1_pusch_ptrs_kRE_ref [6][8] = {
|
||||
{ 0, 2, 6, 8, 0, 1, 6, 7},
|
||||
{ 2, 4, 8, 10, 1, 6, 7, 0},
|
||||
{ 1, 3, 7, 9, 2, 3, 8, 9},
|
||||
{ 3, 5, 9, 11, 3, 8, 9, 2},
|
||||
{-1, -1, -1, -1, 4, 5, 10, 11},
|
||||
{-1, -1, -1, -1, 5, 10, 11, 4},
|
||||
{ 0, 2, 6, 8, 0, 1, 6, 7},
|
||||
{ 2, 4, 8, 10, 1, 6, 7, 0},
|
||||
{ 1, 3, 7, 9, 2, 3, 8, 9},
|
||||
{ 3, 5, 9, 11, 3, 8, 9, 2},
|
||||
{-1, -1, -1, -1, 4, 5, 10, 11},
|
||||
{-1, -1, -1, -1, 5, 10, 11, 4},
|
||||
};
|
||||
|
||||
|
||||
@@ -68,55 +68,20 @@ int16_t table_6_4_1_2_2_1_1_pusch_ptrs_kRE_ref [6][8] = {
|
||||
*********************************************************************/
|
||||
|
||||
int16_t get_kRE_ref(uint8_t dmrs_antenna_port, uint8_t pusch_dmrs_type, uint8_t resourceElementOffset) {
|
||||
|
||||
uint8_t colomn;
|
||||
int16_t k_RE_ref;
|
||||
|
||||
colomn = resourceElementOffset;
|
||||
|
||||
if (pusch_dmrs_type == 2)
|
||||
colomn += 4;
|
||||
|
||||
k_RE_ref = table_6_4_1_2_2_1_1_pusch_ptrs_kRE_ref[dmrs_antenna_port][colomn];
|
||||
|
||||
AssertFatal(k_RE_ref>=0,"invalid k_RE_ref < 0. Check PTRS Configuration\n");
|
||||
|
||||
return k_RE_ref;
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_K_ptrs
|
||||
*
|
||||
* PARAMETERS : ptrs_UplinkConfig PTRS uplink configuration
|
||||
* N_RB number of RBs scheduled for PUSCH
|
||||
*
|
||||
* RETURN : the parameter K_ptrs
|
||||
*
|
||||
* DESCRIPTION : 3GPP TS 38.214 6.2.3 Table 6.2.3.1-2
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB){
|
||||
|
||||
uint16_t nrb0, nrb1;
|
||||
|
||||
nrb0 = ptrs_UplinkConfig->frequencyDensity.n_rb0;
|
||||
nrb1 = ptrs_UplinkConfig->frequencyDensity.n_rb1;
|
||||
|
||||
if (nrb0 == 0 || nrb0 == 0)
|
||||
return 2;
|
||||
|
||||
if (N_RB < nrb0){
|
||||
LOG_I(PHY,"PUSH PT-RS is not present.\n");
|
||||
return 0;
|
||||
}
|
||||
else if (N_RB >= nrb0 && N_RB < nrb1)
|
||||
return 2;
|
||||
else
|
||||
return 4;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
@@ -126,7 +91,7 @@ uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB){
|
||||
* duration_in_symbols number of scheduled PUSCH ofdm symbols
|
||||
* start_symbol first ofdm symbol of PUSCH within slot
|
||||
* L_ptrs the parameter L_ptrs
|
||||
* ofdm_symbol_size FFT size
|
||||
* ul_dmrs_symb_pos bitmap of the time domain positions of the DMRS symbols in the scheduled PUSCH
|
||||
*
|
||||
* RETURN : sets the bit map of PTRS ofdm symbol indicies
|
||||
*
|
||||
@@ -137,54 +102,31 @@ uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB){
|
||||
void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t start_symbol,
|
||||
uint8_t dmrs_type,
|
||||
uint8_t L_ptrs,
|
||||
uint8_t pusch_maxLength,
|
||||
uint16_t ofdm_symbol_size) {
|
||||
uint16_t ul_dmrs_symb_pos) {
|
||||
|
||||
uint8_t i, last_symbol, is_dmrs_symbol1, is_dmrs_symbol2;
|
||||
int16_t l_ref;
|
||||
|
||||
*ptrs_symbols = 0;
|
||||
i = 0;
|
||||
is_dmrs_symbol1 = 0;
|
||||
is_dmrs_symbol2 = 0;
|
||||
l_ref = start_symbol;
|
||||
last_symbol = start_symbol + duration_in_symbols - 1;
|
||||
uint8_t i = 0, last_symbol, is_dmrs_symbol, l_ref;
|
||||
int8_t l_counter;
|
||||
l_ref = start_symbol;
|
||||
last_symbol = start_symbol + duration_in_symbols - 1;
|
||||
|
||||
while ( (l_ref + i*L_ptrs) <= last_symbol) {
|
||||
|
||||
is_dmrs_symbol1 = is_dmrs_symbol(max((l_ref + (i-1)*L_ptrs + 1), l_ref),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
duration_in_symbols,
|
||||
dmrs_type,
|
||||
ofdm_symbol_size);
|
||||
is_dmrs_symbol = 0;
|
||||
|
||||
is_dmrs_symbol2 = is_dmrs_symbol(l_ref + i*L_ptrs,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
duration_in_symbols,
|
||||
dmrs_type,
|
||||
ofdm_symbol_size);
|
||||
for(l_counter = l_ref + i*L_ptrs; l_counter >= max(l_ref + (i-1)*L_ptrs + 1, l_ref); l_counter--) {
|
||||
|
||||
if ( is_dmrs_symbol1 + is_dmrs_symbol2 > 0 ) {
|
||||
if((ul_dmrs_symb_pos >> l_counter) & 0x01) {
|
||||
is_dmrs_symbol = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (pusch_maxLength == 2)
|
||||
l_ref = l_ref + i*L_ptrs + 1;
|
||||
else
|
||||
l_ref = l_ref + i*L_ptrs;
|
||||
|
||||
i = 1;
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if (is_dmrs_symbol) {
|
||||
l_ref = l_counter;
|
||||
i = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
*ptrs_symbols = *ptrs_symbols | (1<<(l_ref + i*L_ptrs));
|
||||
@@ -192,53 +134,19 @@ void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : get_L_ptrs
|
||||
*
|
||||
* PARAMETERS : ptrs_UplinkConfig PTRS uplink configuration
|
||||
* I_mcs MCS index used for PUSCH
|
||||
*
|
||||
* RETURN : the parameter L_ptrs
|
||||
*
|
||||
* DESCRIPTION : 3GPP TS 38.214 6.2.3 Table 6.2.3.1-1
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t get_L_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint8_t I_mcs) {
|
||||
|
||||
uint8_t mcs1, mcs2, mcs3;
|
||||
|
||||
mcs1 = ptrs_UplinkConfig->timeDensity.ptrs_mcs1;
|
||||
mcs2 = ptrs_UplinkConfig->timeDensity.ptrs_mcs2;
|
||||
mcs3 = ptrs_UplinkConfig->timeDensity.ptrs_mcs3;
|
||||
|
||||
if (mcs1 == 0 || mcs2 == 0 || mcs3 == 0)
|
||||
return 1;
|
||||
|
||||
if (I_mcs < mcs1){
|
||||
LOG_I(PHY,"PUSH PT-RS is not present.\n");
|
||||
return 0;
|
||||
}
|
||||
else if (I_mcs >= mcs1 && I_mcs < mcs2)
|
||||
return 4;
|
||||
else if (I_mcs >= mcs2 && I_mcs < mcs3)
|
||||
return 2;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : is_ptrs_subcarrier
|
||||
*
|
||||
* PARAMETERS : k subcarrier index
|
||||
* K_ptrs the parameter K_ptrs
|
||||
* n_rnti UE CRNTI
|
||||
* dmrs_antenna_port DMRS antenna port
|
||||
* K_ptrs the parameter K_ptrs
|
||||
* pusch_dmrs_type the DMRS configuration type used for PUSCH
|
||||
* N_RB number of RBs scheduled for PUSCH
|
||||
* k_RE_ref the parameter k_RE_ref
|
||||
* start_sc first subcarrier index
|
||||
* ofdm_symbol_size FFT size
|
||||
* ofdm_symbol_size number of samples in an OFDM symbol
|
||||
*
|
||||
* RETURN : 1 if subcarrier k is PTRS, or 0 otherwise
|
||||
*
|
||||
@@ -246,107 +154,48 @@ uint8_t get_L_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint8_t I_mcs) {
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t is_ptrs_subcarrier(uint16_t k, uint8_t K_ptrs, uint16_t n_rnti, uint16_t N_RB, int16_t k_RE_ref, uint16_t start_sc, uint16_t ofdm_symbol_size) {
|
||||
uint8_t is_ptrs_subcarrier(uint16_t k,
|
||||
uint16_t n_rnti,
|
||||
uint8_t dmrs_antenna_port,
|
||||
uint8_t pusch_dmrs_type,
|
||||
uint8_t K_ptrs,
|
||||
uint16_t N_RB,
|
||||
uint8_t k_RE_ref,
|
||||
uint16_t start_sc,
|
||||
uint16_t ofdm_symbol_size)
|
||||
{
|
||||
// int16_t k_RE_ref = get_kRE_ref(dmrs_antenna_port, pusch_dmrs_type, resourceElementOffset);
|
||||
uint16_t k_RB_ref;
|
||||
|
||||
uint16_t k_RB_ref, i, sc;
|
||||
|
||||
i = 0;
|
||||
sc = 0;
|
||||
k_RB_ref = 0;
|
||||
|
||||
if (N_RB % K_ptrs == 0)
|
||||
k_RB_ref = n_rnti % K_ptrs;
|
||||
else
|
||||
k_RB_ref = n_rnti % (N_RB % K_ptrs);
|
||||
|
||||
while (k > sc){
|
||||
|
||||
sc = (start_sc + k_RE_ref + (i*K_ptrs + k_RB_ref)*NR_NB_SC_PER_RB)%ofdm_symbol_size;
|
||||
i++;
|
||||
|
||||
}
|
||||
|
||||
if (k == sc)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : is_ptrs_symbol
|
||||
*
|
||||
* PARAMETERS : l ofdm symbol index within slot
|
||||
* k subcarrier index
|
||||
* n_rnti UE CRNTI
|
||||
* N_RB number of RBs scheduled for PUSCH
|
||||
* duration_in_symbols number of scheduled PUSCH ofdm symbols
|
||||
* dmrs_antenna_port DMRS antenna port
|
||||
* K_ptrs the parameter K_ptrs
|
||||
* ptrs_symbols bit mask of ptrs
|
||||
* start_sc first subcarrier index
|
||||
* ofdm_symbol_size FFT size
|
||||
* pusch_dmrs_type PUSCH DMRS type (1 or 2)
|
||||
* ptrs_UplinkConfig PTRS uplink configuration
|
||||
*
|
||||
* RETURN : 0 if symbol(k,l) is data, or 1 if symbol(k,l) is ptrs
|
||||
*
|
||||
* DESCRIPTION : 3GPP TS 38.211 6.4.1.2 Phase-tracking reference signal for PUSCH
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t is_ptrs_symbol(uint8_t l,
|
||||
uint16_t k,
|
||||
uint16_t n_rnti,
|
||||
uint16_t N_RB,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t dmrs_antenna_port,
|
||||
uint8_t K_ptrs,
|
||||
uint16_t ptrs_symbols,
|
||||
uint16_t start_sc,
|
||||
uint16_t ofdm_symbol_size,
|
||||
pusch_dmrs_type_t pusch_dmrs_type,
|
||||
uint8_t resourceElementOffset) {
|
||||
|
||||
uint8_t is_ptrs_freq, is_ptrs_time;
|
||||
int16_t k_RE_ref;
|
||||
|
||||
is_ptrs_freq = 0;
|
||||
is_ptrs_time = 0;
|
||||
|
||||
k_RE_ref = get_kRE_ref(dmrs_antenna_port, pusch_dmrs_type, resourceElementOffset);
|
||||
|
||||
is_ptrs_freq = is_ptrs_subcarrier(k, K_ptrs, n_rnti, N_RB, k_RE_ref, start_sc, ofdm_symbol_size);
|
||||
|
||||
if (is_ptrs_freq == 0)
|
||||
return 0;
|
||||
|
||||
if (((ptrs_symbols>>l)&1) == 1)
|
||||
is_ptrs_time = 1;
|
||||
|
||||
if (is_ptrs_time && is_ptrs_freq)
|
||||
return 1;
|
||||
if (N_RB % K_ptrs == 0)
|
||||
k_RB_ref = n_rnti % K_ptrs;
|
||||
else
|
||||
return 0;
|
||||
k_RB_ref = n_rnti % (N_RB % K_ptrs);
|
||||
|
||||
if (k < start_sc)
|
||||
k += ofdm_symbol_size;
|
||||
|
||||
if ((k - k_RE_ref - k_RB_ref*NR_NB_SC_PER_RB - start_sc) % (K_ptrs*NR_NB_SC_PER_RB) == 0)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
int main(int argc, char const *argv[])
|
||||
{
|
||||
|
||||
dmrs_UplinkConfig_t dmrs_Uplink_Config;
|
||||
ptrs_UplinkConfig_t ptrs_Uplink_Config;
|
||||
uint8_t resourceElementOffset;
|
||||
uint8_t dmrs_antenna_port;
|
||||
uint8_t L_ptrs, K_ptrs;
|
||||
int16_t k_RE_ref;
|
||||
uint16_t N_RB, ptrs_symbols, ofdm_symbol_size, k;
|
||||
uint8_t duration_in_symbols, I_mcs;
|
||||
uint8_t start_symbol, l;
|
||||
uint8_t ptrs_symbol_flag;
|
||||
uint16_t n_rnti;
|
||||
dmrs_UplinkConfig_t dmrs_Uplink_Config;
|
||||
ptrs_UplinkConfig_t ptrs_Uplink_Config;
|
||||
uint8_t resourceElementOffset;
|
||||
uint8_t dmrs_antenna_port;
|
||||
uint8_t L_ptrs, K_ptrs;
|
||||
int16_t k_RE_ref;
|
||||
uint16_t N_RB, ptrs_symbols, ofdm_symbol_size, k;
|
||||
uint8_t duration_in_symbols, I_mcs;
|
||||
uint8_t start_symbol, l;
|
||||
uint8_t ptrs_symbol_flag;
|
||||
uint16_t n_rnti;
|
||||
|
||||
dmrs_Uplink_Config.pusch_dmrs_type = pusch_dmrs_type1;
|
||||
dmrs_Uplink_Config.pusch_dmrs_AdditionalPosition = pusch_dmrs_pos1;
|
||||
@@ -362,13 +211,13 @@ int main(int argc, char const *argv[])
|
||||
n_rnti = 0x1234;
|
||||
resourceElementOffset = 0;
|
||||
ptrs_symbols = 0;
|
||||
dmrs_antenna_port = 0;
|
||||
N_RB = 50;
|
||||
duration_in_symbols = 14;
|
||||
ofdm_symbol_size = 2048;
|
||||
I_mcs = 9;
|
||||
start_symbol = 0;
|
||||
ptrs_symbol_flag = 0;
|
||||
dmrs_antenna_port = 0;
|
||||
N_RB = 50;
|
||||
duration_in_symbols = 14;
|
||||
ofdm_symbol_size = 2048;
|
||||
I_mcs = 9;
|
||||
start_symbol = 0;
|
||||
ptrs_symbol_flag = 0;
|
||||
|
||||
k_RE_ref = get_kRE_ref(dmrs_antenna_port, dmrs_Uplink_Config.pusch_dmrs_type, resourceElementOffset);
|
||||
|
||||
@@ -418,6 +267,6 @@ int main(int argc, char const *argv[])
|
||||
|
||||
printf("\n");
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -49,32 +49,36 @@
|
||||
|
||||
int16_t get_kRE_ref(uint8_t dmrs_antenna_port, uint8_t pusch_dmrs_type, uint8_t resourceElementOffset);
|
||||
|
||||
uint8_t get_K_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint16_t N_RB);
|
||||
|
||||
void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t start_symbol,
|
||||
uint8_t dmrs_type,
|
||||
uint8_t L_ptrs,
|
||||
uint8_t pusch_maxLength,
|
||||
uint16_t ofdm_symbol_size);
|
||||
uint16_t ul_dmrs_symb_pos);
|
||||
|
||||
uint8_t get_L_ptrs(ptrs_UplinkConfig_t *ptrs_UplinkConfig, uint8_t I_mcs);
|
||||
uint8_t is_ptrs_subcarrier(uint16_t k,
|
||||
uint16_t n_rnti,
|
||||
uint8_t dmrs_antenna_port,
|
||||
uint8_t pusch_dmrs_type,
|
||||
uint8_t K_ptrs,
|
||||
uint16_t N_RB,
|
||||
uint8_t k_RE_ref,
|
||||
uint16_t start_sc,
|
||||
uint16_t ofdm_symbol_size);
|
||||
|
||||
uint8_t is_ptrs_subcarrier(uint16_t k, uint8_t K_ptrs, uint16_t n_rnti, uint16_t N_RB, int16_t k_RE_ref, uint16_t start_sc, uint16_t ofdm_symbol_size);
|
||||
/*******************************************************************
|
||||
*
|
||||
* NAME : is_ptrs_symbol
|
||||
*
|
||||
* PARAMETERS : l ofdm symbol index within slot
|
||||
* ptrs_symbols bit mask of ptrs
|
||||
*
|
||||
* RETURN : 1 if symbol is ptrs, or 0 otherwise
|
||||
*
|
||||
* DESCRIPTION : 3GPP TS 38.211 6.4.1.2 Phase-tracking reference signal for PUSCH
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
uint8_t is_ptrs_symbol(uint8_t l,
|
||||
uint16_t k,
|
||||
uint16_t n_rnti,
|
||||
uint16_t N_RB,
|
||||
uint8_t duration_in_symbols,
|
||||
uint8_t dmrs_antenna_port,
|
||||
uint8_t K_ptrs,
|
||||
uint16_t ptrs_symbols,
|
||||
uint16_t start_sc,
|
||||
uint16_t ofdm_symbol_size,
|
||||
pusch_dmrs_type_t pusch_dmrs_type,
|
||||
uint8_t resourceElementOffset);
|
||||
static inline uint8_t is_ptrs_symbol(uint8_t l, uint16_t ptrs_symbols) { return ((ptrs_symbols >> l) & 1); }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
__m64 byte2m64_re[256];
|
||||
__m64 byte2m64_im[256];
|
||||
|
||||
void init_byte2m64() {
|
||||
void init_byte2m64(void) {
|
||||
|
||||
for (int s=0;s<256;s++) {
|
||||
byte2m64_re[s] = _mm_insert_pi16(byte2m64_re[s],(1-2*(s&1)),0);
|
||||
@@ -53,7 +53,7 @@ void init_byte2m64() {
|
||||
}
|
||||
}
|
||||
|
||||
void init_scrambling_luts() {
|
||||
void init_scrambling_luts(void) {
|
||||
|
||||
init_byte2m64();
|
||||
|
||||
|
||||
@@ -531,6 +531,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
uint16_t *max_preamble_delay
|
||||
)
|
||||
{
|
||||
AssertFatal(gNB!=NULL,"Can only be called from gNB\n");
|
||||
|
||||
int i;
|
||||
|
||||
@@ -574,6 +575,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
fp = &gNB->frame_parms;
|
||||
|
||||
nb_rx = gNB->gNB_config.carrier_config.num_rx_ant.value;
|
||||
|
||||
|
||||
rootSequenceIndex = cfg->num_prach_fd_occasions_list[0].prach_root_sequence_index.value;
|
||||
numrootSequenceIndex = cfg->num_prach_fd_occasions_list[0].num_root_sequences.value;
|
||||
@@ -586,7 +588,6 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
|
||||
restricted_set = cfg->restricted_set_config.value;
|
||||
|
||||
|
||||
uint8_t prach_fmt = prach_pdu->prach_format;
|
||||
uint16_t N_ZC = (prach_sequence_length==0)?839:139;
|
||||
|
||||
@@ -599,9 +600,6 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
start_meas(&gNB->rx_prach);
|
||||
|
||||
|
||||
|
||||
@@ -61,4 +61,5 @@ uint32_t nr_get_G(uint16_t nb_rb, uint16_t nb_symb_sch, uint8_t nb_re_dmrs, uint
|
||||
|
||||
uint32_t nr_get_E(uint32_t G, uint8_t C, uint8_t Qm, uint8_t Nl, uint8_t r);
|
||||
|
||||
void init_pucch2_luts(void);
|
||||
#endif
|
||||
|
||||
@@ -1028,10 +1028,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
uint8_t is_crnti,
|
||||
uint8_t llr8_flag);
|
||||
|
||||
int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
NR_DL_FRAME_PARMS* frame_parms,
|
||||
uint8_t harq_pid);
|
||||
|
||||
uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
int eNB_id,
|
||||
|
||||
@@ -282,21 +282,18 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||
else
|
||||
is_dmrs_re = 0;
|
||||
|
||||
if ( ((pusch_pdu->pdu_bit_map)>>2)& 0x01 ) {
|
||||
|
||||
if (pusch_pdu->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) {
|
||||
K_ptrs = (pusch_pdu->pusch_ptrs.ptrs_freq_density)?4:2;
|
||||
is_ptrs_symbol_flag = is_ptrs_symbol(symbol,
|
||||
(start_re + re)%frame_parms->ofdm_symbol_size,
|
||||
n_rnti,
|
||||
pusch_pdu->rb_size,
|
||||
pusch_pdu->nr_of_symbols,
|
||||
aarx,
|
||||
K_ptrs,
|
||||
pusch_vars->ptrs_symbols,
|
||||
start_re,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
pusch_pdu->dmrs_config_type,
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset);
|
||||
if(is_ptrs_symbol(symbol, pusch_vars->ptrs_symbols))
|
||||
is_ptrs_symbol_flag = is_ptrs_subcarrier((start_re + re) % frame_parms->ofdm_symbol_size,
|
||||
n_rnti,
|
||||
aarx,
|
||||
pusch_pdu->dmrs_config_type,
|
||||
K_ptrs,
|
||||
pusch_pdu->rb_size,
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset,
|
||||
start_re,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
|
||||
if (is_ptrs_symbol_flag == 1)
|
||||
num_ptrs_symbols++;
|
||||
@@ -304,7 +301,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||
}
|
||||
|
||||
#ifdef DEBUG_RB_EXT
|
||||
printf("re = %d, symbol = %d\n", re, symbol);
|
||||
printf("re = %d, is_ptrs_symbol_flag = %d, symbol = %d\n", re, is_ptrs_symbol_flag, symbol);
|
||||
#endif
|
||||
|
||||
if ( is_dmrs_re == 0 && is_ptrs_symbol_flag == 0) {
|
||||
@@ -315,7 +312,7 @@ void nr_ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||
ul_ch0_ptrs_ext[ul_ch0_ptrs_ext_index] = ul_ch0_ptrs[ul_ch0_ptrs_index];
|
||||
|
||||
#ifdef DEBUG_RB_EXT
|
||||
printf("rxF_ext[%d] = (%d,%d)\n", rxF_ext_index>>1, rxF_ext[rxF_ext_index],rxF_ext[rxF_ext_index+1]);
|
||||
printf("rxF_ext[%d] = %d, %d\n", rxF_ext_index, rxF_ext[rxF_ext_index], rxF_ext[rxF_ext_index+1]);
|
||||
#endif
|
||||
|
||||
ul_ch0_ext_index++;
|
||||
@@ -1021,7 +1018,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
unsigned char harq_pid)
|
||||
{
|
||||
|
||||
uint8_t aarx, aatx, dmrs_symbol_flag, ptrs_symbol_flag; // dmrs_symbol_flag, a flag to indicate DMRS REs in current symbol
|
||||
uint8_t first_symbol_flag, aarx, aatx, dmrs_symbol_flag; // dmrs_symbol_flag, a flag to indicate DMRS REs in current symbol
|
||||
uint32_t nb_re_pusch, bwp_start_subcarrier;
|
||||
uint8_t L_ptrs = 0; // PTRS parameter
|
||||
int avgs;
|
||||
@@ -1030,7 +1027,7 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
nfapi_nr_pusch_pdu_t *rel15_ul = &gNB->ulsch[ulsch_id][0]->harq_processes[harq_pid]->ulsch_pdu;
|
||||
|
||||
dmrs_symbol_flag = 0;
|
||||
ptrs_symbol_flag = 0;
|
||||
first_symbol_flag = 0;
|
||||
gNB->pusch_vars[ulsch_id]->ptrs_sc_per_ofdm_symbol = 0;
|
||||
|
||||
if(symbol == rel15_ul->start_symbol_index){
|
||||
@@ -1039,16 +1036,14 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
gNB->pusch_vars[ulsch_id]->cl_done = 0;
|
||||
gNB->pusch_vars[ulsch_id]->ptrs_symbols = 0;
|
||||
|
||||
if ( ((rel15_ul->pdu_bit_map)>>2)& 0x01 ) { // if there is ptrs pdu
|
||||
if (rel15_ul->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) { // if there is ptrs pdu
|
||||
L_ptrs = 1<<(rel15_ul->pusch_ptrs.ptrs_time_density);
|
||||
|
||||
set_ptrs_symb_idx(&gNB->pusch_vars[ulsch_id]->ptrs_symbols,
|
||||
rel15_ul->nr_of_symbols,
|
||||
rel15_ul->start_symbol_index,
|
||||
rel15_ul->dmrs_config_type,
|
||||
L_ptrs,
|
||||
1, // only dmrs of length 1 is currently supported
|
||||
frame_parms->ofdm_symbol_size);
|
||||
rel15_ul->ul_dmrs_symb_pos);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1073,23 +1068,9 @@ int nr_rx_pusch(PHY_VARS_gNB *gNB,
|
||||
nb_re_pusch = rel15_ul->rb_size * NR_NB_SC_PER_RB;
|
||||
}
|
||||
|
||||
if ( ((rel15_ul->pdu_bit_map)>>2)& 0x01 ) { // if there is ptrs pdu
|
||||
ptrs_symbol_flag = is_ptrs_symbol(symbol,
|
||||
0,
|
||||
rel15_ul->rnti,
|
||||
rel15_ul->rb_size,
|
||||
rel15_ul->nr_of_symbols,
|
||||
0,
|
||||
(rel15_ul->pusch_ptrs.ptrs_freq_density)?4:2,
|
||||
gNB->pusch_vars[ulsch_id]->ptrs_symbols,
|
||||
0,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
rel15_ul->dmrs_config_type,
|
||||
rel15_ul->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset);
|
||||
}
|
||||
|
||||
if (ptrs_symbol_flag == 1){
|
||||
gNB->pusch_vars[ulsch_id]->ptrs_symbol_index = symbol;
|
||||
if (rel15_ul->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) { // if there is ptrs pdu
|
||||
if(is_ptrs_symbol(symbol, gNB->pusch_vars[ulsch_id]->ptrs_symbols))
|
||||
gNB->pusch_vars[ulsch_id]->ptrs_symbol_index = symbol;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
|
||||
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h>
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport.h"
|
||||
#include "PHY/NR_REFSIG/nr_refsig.h"
|
||||
@@ -201,7 +202,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
||||
* Defining cyclic shift hopping TS 38.211 Subclause 6.3.2.2.2
|
||||
*/
|
||||
// alpha is cyclic shift
|
||||
double alpha;
|
||||
//double alpha;
|
||||
// lnormal is the OFDM symbol number in the PUCCH transmission where l=0 corresponds to the first OFDM symbol of the PUCCH transmission
|
||||
//uint8_t lnormal;
|
||||
// lprime is the index of the OFDM symbol in the slot that corresponds to the first OFDM symbol of the PUCCH transmission in the slot given by [5, TS 38.213]
|
||||
@@ -240,7 +241,7 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
||||
for(i=0;i<nr_sequences;i++){
|
||||
// we proceed to calculate alpha according to TS 38.211 Subclause 6.3.2.2.2
|
||||
for (l=0; l<pucch_pdu->nr_of_symbols; l++){
|
||||
alpha = nr_cyclic_shift_hopping(pucch_pdu->hopping_id,pucch_pdu->initial_cyclic_shift,mcs[i],l,pucch_pdu->start_symbol_index,slot);
|
||||
double alpha = nr_cyclic_shift_hopping(pucch_pdu->hopping_id,pucch_pdu->initial_cyclic_shift,mcs[i],l,pucch_pdu->start_symbol_index,slot);
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("\t [nr_generate_pucch0] sequence generation \tu=%d \tv=%d \talpha=%lf \t(for symbol l=%d/%d,mcs %d)\n",u,v,alpha,l,l+pucch_pdu->start_symbol_index,mcs[i]);
|
||||
printf("lut output %d\n",gNB->pucch0_lut.lut[cs_ind][slot][l+pucch_pdu->start_symbol_index]);
|
||||
@@ -311,9 +312,9 @@ void nr_decode_pucch0(PHY_VARS_gNB *gNB,
|
||||
}
|
||||
#else
|
||||
|
||||
int16_t *x_re = table_5_2_2_2_2_Re[u],*x_im = table_5_2_2_2_2_Im[u];
|
||||
const int16_t *x_re = table_5_2_2_2_2_Re[u],*x_im = table_5_2_2_2_2_Im[u];
|
||||
int16_t xr[24] __attribute__((aligned(32)));
|
||||
int16_t xrt[24] __attribute__((aligned(32)));
|
||||
//int16_t xrt[24] __attribute__((aligned(32)));
|
||||
int32_t xrtmag=0;
|
||||
int maxpos=0;
|
||||
int n2=0;
|
||||
@@ -439,7 +440,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
|
||||
uint8_t timeDomainOCC,
|
||||
uint8_t nr_bit) {
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("\t [nr_generate_pucch1] start function at slot(nr_tti_tx)=%d payload=%d m0=%d nrofSymbols=%d startingSymbolIndex=%d startingPRB=%d startingPRB_intraSlotHopping=%d timeDomainOCC=%d nr_bit=%d\n",
|
||||
printf("\t [nr_generate_pucch1] start function at slot(nr_tti_tx)=%d payload=%lp m0=%d nrofSymbols=%d startingSymbolIndex=%d startingPRB=%d startingPRB_intraSlotHopping=%d timeDomainOCC=%d nr_bit=%d\n",
|
||||
nr_tti_tx,payload,m0,nrofSymbols,startingSymbolIndex,startingPRB,startingPRB_intraSlotHopping,timeDomainOCC,nr_bit);
|
||||
#endif
|
||||
/*
|
||||
@@ -449,7 +450,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
|
||||
// complex-valued symbol d_re, d_im containing complex-valued symbol d(0):
|
||||
int16_t d_re=0, d_im=0,d1_re=0,d1_im=0;
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("\t [nr_generate_pucch1] sequence modulation: payload=%x \tde_re=%d \tde_im=%d\n",payload,d_re,d_im);
|
||||
printf("\t [nr_generate_pucch1] sequence modulation: payload=%lp \tde_re=%d \tde_im=%d\n",payload,d_re,d_im);
|
||||
#endif
|
||||
/*
|
||||
* Defining cyclic shift hopping TS 38.211 Subclause 6.3.2.2.2
|
||||
@@ -543,7 +544,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
|
||||
z_re_rx[i+n] = ((int16_t *)&rxdataF[0][re_offset])[0];
|
||||
z_im_rx[i+n] = ((int16_t *)&rxdataF[0][re_offset])[1];
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("\t [nr_generate_pucch1] mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%d)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
||||
printf("\t [nr_generate_pucch1] mapping PUCCH to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_pucch[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
||||
amp,frame_parms->ofdm_symbol_size,frame_parms->N_RB_DL,frame_parms->first_carrier_offset,i+n,re_offset,
|
||||
l,n,((int16_t *)&rxdataF[0][re_offset])[0],((int16_t *)&rxdataF[0][re_offset])[1]);
|
||||
#endif
|
||||
@@ -554,7 +555,7 @@ void nr_decode_pucch1( int32_t **rxdataF,
|
||||
z_dmrs_im_rx[i+n] = ((int16_t *)&rxdataF[0][re_offset])[1];
|
||||
// printf("%d\t%d\t%d\n",l,z_dmrs_re_rx[i+n],z_dmrs_im_rx[i+n]);
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
printf("\t [nr_generate_pucch1] mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%d)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
||||
printf("\t [nr_generate_pucch1] mapping DM-RS to RE \t amp=%d \tofdm_symbol_size=%d \tN_RB_DL=%d \tfirst_carrier_offset=%d \tz_dm-rs[%d]=txptr(%u)=(x_n(l=%d,n=%d)=(%d,%d))\n",
|
||||
amp,frame_parms->ofdm_symbol_size,frame_parms->N_RB_DL,frame_parms->first_carrier_offset,i+n,re_offset,
|
||||
l,n,((int16_t *)&rxdataF[0][re_offset])[0],((int16_t *)&rxdataF[0][re_offset])[1]);
|
||||
#endif
|
||||
@@ -1006,7 +1007,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
|
||||
int32_t **rxdataF = gNB->common_vars.rxdataF;
|
||||
NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms;
|
||||
pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
|
||||
//pucch_GroupHopping_t pucch_GroupHopping = pucch_pdu->group_hop_flag + (pucch_pdu->sequence_hop_flag<<1);
|
||||
|
||||
AssertFatal(pucch_pdu->nr_of_symbols==1 || pucch_pdu->nr_of_symbols==2,
|
||||
"Illegal number of symbols for PUCCH 2 %d\n",pucch_pdu->nr_of_symbols);
|
||||
@@ -1014,7 +1015,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
|
||||
//extract pucch and dmrs first
|
||||
|
||||
int l2;
|
||||
int l2=-1;
|
||||
int re_offset = (12*pucch_pdu->prb_start) + (12*pucch_pdu->bwp_start) + frame_parms->first_carrier_offset;
|
||||
if (re_offset>= frame_parms->ofdm_symbol_size)
|
||||
re_offset-=frame_parms->ofdm_symbol_size;
|
||||
@@ -1109,7 +1110,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
r_im_ext[aa][15]=rp[aa][47];
|
||||
|
||||
#ifdef DEBUG_NR_PUCCH_RX
|
||||
for (int i=0;i<8;i++) printf("Ant %d PRB %d dmrs[%d] -> (%d,%d)\n",aa,prb+(i>>2),i,rd_re_ext[aa][i],rd_im_ext[aa],i);
|
||||
for (int i=0;i<8;i++) printf("Ant %d PRB %d dmrs[%d] -> (%d,%d)\n",aa,prb+(i>>2),i,rd_re_ext[aa][i],rd_im_ext[aa]);
|
||||
#endif
|
||||
} // aa
|
||||
} // prb
|
||||
@@ -1378,7 +1379,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB,
|
||||
|
||||
int harq_bytes=pucch_pdu->bit_len_harq>>3;
|
||||
if ((pucch_pdu->bit_len_harq&7) > 0) harq_bytes++;
|
||||
uci_pdu->harq.harq_payload = (nfapi_nr_harq_t*)malloc(harq_bytes);
|
||||
uci_pdu->harq.harq_payload = (uint8_t*)malloc(harq_bytes);
|
||||
uci_pdu->harq.harq_crc = 2;
|
||||
for (int i=0;i<harq_bytes;i++) {
|
||||
uci_pdu->harq.harq_payload[i] = cw_ML & 255;
|
||||
|
||||
@@ -618,7 +618,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
#ifdef DEBUG_PDCCH
|
||||
printf("pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt+2,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
printf("pilot %u : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt+2,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
|
||||
#endif
|
||||
|
||||
multadd_real_vector_complex_scalar(fr,
|
||||
|
||||
@@ -29,6 +29,10 @@
|
||||
* \note
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
||||
#define __PHY_NR_UE_TRANSPORT_DCI_NR__H__
|
||||
|
||||
#ifndef USER_MODE
|
||||
#include "PHY/types.h"
|
||||
#else
|
||||
@@ -118,4 +122,5 @@ typedef struct NR_DCI_INFO_EXTRACTED NR_DCI_INFO_EXTRACTED_t;
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include <openair1/PHY/NR_TRANSPORT/nr_transport_proto_common.h>
|
||||
|
||||
#include "T.h"
|
||||
#include <openair1/PHY/NR_TRANSPORT/nr_transport_proto_common.h>
|
||||
|
||||
@@ -1053,7 +1053,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
|
||||
int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
NR_DL_FRAME_PARMS* frame_parms,
|
||||
uint8_t harq_pid);
|
||||
uint8_t harq_pid,
|
||||
unsigned int G);
|
||||
|
||||
/*! \brief Perform PUSCH scrambling. TS 38.211 V15.4.0 subclause 6.3.1.1
|
||||
@param[in] in, Pointer to input bits
|
||||
|
||||
@@ -42,6 +42,9 @@
|
||||
#include "UTIL/LISTS/list.h"
|
||||
#endif
|
||||
|
||||
#include "LAYER2/NR_MAC_gNB/mac_proto.h"
|
||||
#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h"
|
||||
|
||||
//#include "../LTE_TRANSPORT/transport_common.h"
|
||||
|
||||
// structures below implement 36-211 and 36-212
|
||||
@@ -84,40 +87,26 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
/// NDAPI struct for UE
|
||||
nfapi_nr_ue_pusch_pdu_t pusch_pdu;
|
||||
/// Indicator of first transmission
|
||||
uint8_t first_tx;
|
||||
/// Last Ndi received for this process on DCI (used for C-RNTI only)
|
||||
uint8_t DCINdi;
|
||||
/// HARQ tx status
|
||||
harq_result_t tx_status;
|
||||
/// Flag indicating that this ULSCH has a new packet (start of new round)
|
||||
// uint8_t Ndi;
|
||||
/// Status Flag indicating for this ULSCH (idle,active,disabled)
|
||||
SCH_status_t status;
|
||||
/// Subframe scheduling indicator (i.e. Transmission opportunity indicator)
|
||||
uint8_t subframe_scheduling_flag;
|
||||
/// Subframe cba scheduling indicator (i.e. Transmission opportunity indicator)
|
||||
uint8_t subframe_cba_scheduling_flag;
|
||||
/// First Allocated RB
|
||||
uint16_t first_rb;
|
||||
/// Current Number of RBs
|
||||
uint16_t nb_rb;
|
||||
/// number of layers
|
||||
uint8_t Nl;
|
||||
/// Last TPC command
|
||||
uint8_t TPC;
|
||||
/// Transport block size
|
||||
uint32_t TBS;
|
||||
/// The payload + CRC size in bits, "B" from 36-212
|
||||
uint32_t B;
|
||||
/// Length of ACK information (bits)
|
||||
uint8_t O_ACK;
|
||||
/// Index of current HARQ round for this ULSCH
|
||||
uint8_t round;
|
||||
/// MCS format of this ULSCH
|
||||
uint8_t mcs;
|
||||
/// Redundancy-version of the current sub-frame
|
||||
uint8_t rvidx;
|
||||
/// pointer to pdu from MAC interface (TS 36.212 V15.4.0, Sec 5.1 p. 8)
|
||||
unsigned char *a;
|
||||
/// Pointer to the payload + CRC
|
||||
@@ -150,19 +139,11 @@ typedef struct {
|
||||
uint32_t G;
|
||||
// Number of modulated symbols carrying data
|
||||
uint32_t num_of_mod_symbols;
|
||||
// This is "L" in TS 38.214 V15.4.0 subclause 6.1.2.1
|
||||
uint8_t number_of_symbols;
|
||||
// This is "S" in TS 38.214 V15.4.0 subclause 6.1.2.1
|
||||
uint8_t start_symbol;
|
||||
// decode phich
|
||||
uint8_t decode_phich;
|
||||
} NR_UL_UE_HARQ_t;
|
||||
|
||||
typedef struct {
|
||||
/// number of DMRS resource elements
|
||||
uint8_t nb_re_dmrs;
|
||||
/// DMRS length
|
||||
uint8_t length_dmrs;
|
||||
/// SRS active flag
|
||||
uint8_t srs_active;
|
||||
//#if defined(UPGRADE_RAT_NR)
|
||||
@@ -224,8 +205,6 @@ typedef struct {
|
||||
uint8_t power_offset;
|
||||
// for cooperative communication
|
||||
uint8_t cooperation_flag;
|
||||
/// RNTI attributed to this ULSCH
|
||||
uint16_t rnti;
|
||||
/// RNTI type
|
||||
uint8_t rnti_type;
|
||||
/// Cell ID
|
||||
|
||||
@@ -216,15 +216,15 @@ NR_UE_ULSCH_t *new_nr_ue_ulsch(uint16_t N_RB_UL,
|
||||
|
||||
int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
NR_DL_FRAME_PARMS* frame_parms,
|
||||
uint8_t harq_pid)
|
||||
uint8_t harq_pid,
|
||||
unsigned int G)
|
||||
{
|
||||
/////////////////////////parameters and variables declaration/////////////////////////
|
||||
///////////
|
||||
|
||||
unsigned int G,crc;
|
||||
unsigned int crc;
|
||||
NR_UL_UE_HARQ_t *harq_process;
|
||||
uint16_t nb_rb ;
|
||||
uint8_t nb_symb_sch ;
|
||||
uint32_t A, Z, F;
|
||||
uint32_t *pz;
|
||||
uint8_t mod_order;
|
||||
@@ -234,8 +234,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
uint32_t E,Kb;
|
||||
uint8_t Ilbrm;
|
||||
uint32_t Tbslbrm;
|
||||
uint8_t nb_re_dmrs;
|
||||
uint16_t length_dmrs;
|
||||
uint16_t R;
|
||||
float Coderate;
|
||||
|
||||
@@ -248,20 +246,17 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
|
||||
crc = 1;
|
||||
harq_process = ulsch->harq_processes[harq_pid];
|
||||
nb_rb = harq_process->nb_rb;
|
||||
nb_symb_sch = harq_process->number_of_symbols;
|
||||
A = harq_process->TBS;
|
||||
nb_rb = harq_process->pusch_pdu.rb_size;
|
||||
A = harq_process->pusch_pdu.pusch_data.tb_size;
|
||||
pz = &Z;
|
||||
mod_order = nr_get_Qm_ul(harq_process->mcs,0);
|
||||
R = nr_get_code_rate_ul(harq_process->mcs, 0);
|
||||
mod_order = nr_get_Qm_ul(harq_process->pusch_pdu.mcs_index, harq_process->pusch_pdu.mcs_table);
|
||||
R = nr_get_code_rate_ul(harq_process->pusch_pdu.mcs_index, harq_process->pusch_pdu.mcs_table);
|
||||
Kr=0;
|
||||
r_offset=0;
|
||||
BG = 1;
|
||||
F=0;
|
||||
Ilbrm = 0;
|
||||
Tbslbrm = 950984; //max tbs
|
||||
nb_re_dmrs = ulsch->nb_re_dmrs;
|
||||
length_dmrs = ulsch->length_dmrs;
|
||||
Coderate = 0.0;
|
||||
|
||||
///////////
|
||||
@@ -270,10 +265,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
|
||||
|
||||
LOG_D(PHY,"ulsch coding nb_rb %d nb_symb_sch %d nb_re_dmrs %d, length_dmrs %d, harq_process->Nl = %d\n", nb_rb,nb_symb_sch, nb_re_dmrs,length_dmrs, harq_process->Nl);
|
||||
|
||||
|
||||
G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs,mod_order,harq_process->Nl);
|
||||
LOG_D(PHY,"ulsch coding nb_rb %d, Nl = %d\n", nb_rb, harq_process->pusch_pdu.nrOfLayers);
|
||||
LOG_D(PHY,"ulsch coding A %d G %d mod_order %d\n", A,G, mod_order);
|
||||
|
||||
// if (harq_process->Ndi == 1) { // this is a new packet
|
||||
@@ -433,15 +425,15 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
|
||||
//start_meas(rm_stats);
|
||||
#ifdef DEBUG_DLSCH_CODING
|
||||
printf("rvidx in encoding = %d\n", harq_process->rvidx);
|
||||
printf("rvidx in encoding = %d\n", harq_process->pusch_pdu.pusch_data.rv_index);
|
||||
#endif
|
||||
|
||||
///////////////////////// d---->| Rate matching bit selection |---->e /////////////////////////
|
||||
///////////
|
||||
|
||||
E = nr_get_E(G, harq_process->C, mod_order, harq_process->Nl, r);
|
||||
E = nr_get_E(G, harq_process->C, mod_order, harq_process->pusch_pdu.nrOfLayers, r);
|
||||
|
||||
Tbslbrm = nr_compute_tbslbrm(0,nb_rb,harq_process->Nl,harq_process->C);
|
||||
Tbslbrm = nr_compute_tbslbrm(0,nb_rb,harq_process->pusch_pdu.nrOfLayers,harq_process->C);
|
||||
|
||||
nr_rate_matching_ldpc(Ilbrm,
|
||||
Tbslbrm,
|
||||
@@ -452,7 +444,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
|
||||
harq_process->C,
|
||||
F,
|
||||
Kr-F-2*(*pz),
|
||||
harq_process->rvidx,
|
||||
harq_process->pusch_pdu.pusch_data.rv_index,
|
||||
E);
|
||||
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
uint8_t thread_id,
|
||||
int gNB_id) {
|
||||
|
||||
uint32_t available_bits;
|
||||
uint32_t available_bits, TBS;
|
||||
uint8_t mod_order, cwd_index, num_of_codewords, l;
|
||||
uint32_t scrambled_output[NR_MAX_NB_CODEWORDS][NR_MAX_PDSCH_ENCODED_LENGTH>>5];
|
||||
uint32_t ***pusch_dmrs;
|
||||
@@ -106,11 +106,11 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
int32_t **txdataF;
|
||||
uint16_t start_sc, start_rb;
|
||||
int8_t Wf[2], Wt[2], l_prime[2], delta;
|
||||
uint16_t n_dmrs, code_rate, number_dmrs_symbols, k;
|
||||
uint8_t dmrs_type;
|
||||
uint16_t rnti, n_dmrs, code_rate, number_dmrs_symbols, nb_rb, k;
|
||||
uint8_t dmrs_type, nb_dmrs_re_per_rb, number_of_symbols, mcs, Nl;
|
||||
int ap, start_symbol, Nid_cell, i;
|
||||
int sample_offsetF, N_RE_prime, N_PRB_oh;
|
||||
uint16_t n_rnti;
|
||||
uint16_t ul_dmrs_symb_pos;
|
||||
uint8_t data_existing =0;
|
||||
uint8_t L_ptrs, K_ptrs; // PTRS parameters
|
||||
uint16_t beta_ptrs; // PTRS parameter related to power control
|
||||
@@ -120,14 +120,12 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
NR_DL_FRAME_PARMS *frame_parms = &UE->frame_parms;
|
||||
NR_UE_PUSCH *pusch_ue = UE->pusch_vars[thread_id][gNB_id];
|
||||
uint8_t ulsch_input_buffer[MAX_ULSCH_PAYLOAD_BYTES];
|
||||
ptrs_UplinkConfig_t *ptrs_Uplink_Config = &UE->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
|
||||
// ptrs_UplinkConfig_t *ptrs_Uplink_Config = &UE->pusch_config.dmrs_UplinkConfig.ptrs_UplinkConfig;
|
||||
|
||||
num_of_codewords = 1; // tmp assumption
|
||||
n_rnti = 0x1234;
|
||||
Nid_cell = 0;
|
||||
N_PRB_oh = 0; // higher layer (RRC) parameter xOverhead in PUSCH-ServingCellConfig
|
||||
number_dmrs_symbols = 0;
|
||||
uint8_t mapping_type = UE->pusch_config.pusch_TimeDomainResourceAllocation[0]->mappingType;
|
||||
|
||||
|
||||
for (cwd_index = 0;cwd_index < num_of_codewords; cwd_index++) {
|
||||
@@ -135,42 +133,41 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
ulsch_ue = UE->ulsch[thread_id][gNB_id][cwd_index];
|
||||
harq_process_ul_ue = ulsch_ue->harq_processes[harq_pid];
|
||||
|
||||
start_symbol = harq_process_ul_ue->start_symbol;
|
||||
start_symbol = harq_process_ul_ue->pusch_pdu.start_symbol_index;
|
||||
ul_dmrs_symb_pos = harq_process_ul_ue->pusch_pdu.ul_dmrs_symb_pos;
|
||||
number_of_symbols = harq_process_ul_ue->pusch_pdu.nr_of_symbols;
|
||||
dmrs_type = harq_process_ul_ue->pusch_pdu.dmrs_config_type;
|
||||
|
||||
for (i = start_symbol; i < start_symbol + harq_process_ul_ue->number_of_symbols; i++)
|
||||
number_dmrs_symbols += is_dmrs_symbol((mapping_type)?i-start_symbol:i,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
for (i = start_symbol; i < start_symbol + number_of_symbols; i++) {
|
||||
|
||||
if((ul_dmrs_symb_pos >> i) & 0x01)
|
||||
number_dmrs_symbols += 1;
|
||||
|
||||
ulsch_ue->length_dmrs = number_dmrs_symbols; // pusch.MaxLenght is redundant here as number_dmrs_symbols
|
||||
// contains all dmrs symbols even for double symbol dmrs
|
||||
ulsch_ue->rnti = n_rnti;
|
||||
}
|
||||
|
||||
rnti = harq_process_ul_ue->pusch_pdu.rnti;
|
||||
ulsch_ue->Nid_cell = Nid_cell;
|
||||
ulsch_ue->nb_re_dmrs = 12; //FIXME temprary for no data in dmrs symbol
|
||||
//((UE->dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type1)?6:4)*number_dmrs_symbols;
|
||||
nb_dmrs_re_per_rb = ((dmrs_type == pusch_dmrs_type1) ? 6:4);
|
||||
|
||||
N_RE_prime = NR_NB_SC_PER_RB*harq_process_ul_ue->number_of_symbols - ulsch_ue->nb_re_dmrs*number_dmrs_symbols - N_PRB_oh;
|
||||
N_RE_prime = NR_NB_SC_PER_RB*number_of_symbols - nb_dmrs_re_per_rb*number_dmrs_symbols - N_PRB_oh;
|
||||
|
||||
harq_process_ul_ue->num_of_mod_symbols = N_RE_prime*harq_process_ul_ue->nb_rb*num_of_codewords;
|
||||
nb_rb = harq_process_ul_ue->pusch_pdu.rb_size;
|
||||
|
||||
mod_order = nr_get_Qm_ul(harq_process_ul_ue->mcs, 0);
|
||||
code_rate = nr_get_code_rate_ul(harq_process_ul_ue->mcs, 0);
|
||||
harq_process_ul_ue->num_of_mod_symbols = N_RE_prime*nb_rb*num_of_codewords;
|
||||
|
||||
harq_process_ul_ue->TBS = nr_compute_tbs(mod_order,
|
||||
mcs = harq_process_ul_ue->pusch_pdu.mcs_index;
|
||||
Nl = harq_process_ul_ue->pusch_pdu.nrOfLayers;
|
||||
mod_order = nr_get_Qm_ul(mcs, 0);
|
||||
code_rate = nr_get_code_rate_ul(mcs, 0);
|
||||
|
||||
harq_process_ul_ue->pusch_pdu.pusch_data.tb_size = nr_compute_tbs(mod_order,
|
||||
code_rate,
|
||||
harq_process_ul_ue->nb_rb,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
ulsch_ue->nb_re_dmrs*ulsch_ue->length_dmrs,
|
||||
nb_rb,
|
||||
number_of_symbols,
|
||||
nb_dmrs_re_per_rb*number_dmrs_symbols,
|
||||
0,
|
||||
0,
|
||||
harq_process_ul_ue->Nl);
|
||||
harq_process_ul_ue->pusch_pdu.nrOfLayers);
|
||||
|
||||
|
||||
uint8_t access_mode = SCHEDULED_ACCESS;
|
||||
@@ -179,14 +176,16 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
// to be removed later when MAC is ready
|
||||
|
||||
if (harq_process_ul_ue != NULL){
|
||||
TBS = harq_process_ul_ue->pusch_pdu.pusch_data.tb_size;
|
||||
data_existing = 0;
|
||||
|
||||
if (IS_SOFTMODEM_NOS1){
|
||||
data_existing = nr_ue_get_sdu(UE->Mod_id, UE->CC_id, frame,
|
||||
slot, 0, ulsch_input_buffer, harq_process_ul_ue->TBS/8, &access_mode);
|
||||
slot, 0, ulsch_input_buffer, TBS/8, &access_mode);
|
||||
//IP traffic to be transmitted
|
||||
if(data_existing){
|
||||
//harq_process_ul_ue->a = (unsigned char*)calloc(harq_process_ul_ue->TBS/8, sizeof(unsigned char));
|
||||
memcpy(harq_process_ul_ue->a, ulsch_input_buffer, harq_process_ul_ue->TBS/8);
|
||||
memcpy(harq_process_ul_ue->a, ulsch_input_buffer, TBS/8);
|
||||
}
|
||||
}
|
||||
//Random traffic to be transmitted if there is no IP traffic available for this Tx opportunity
|
||||
@@ -201,7 +200,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
for (i = 0; i<payload_offset; i++)
|
||||
harq_process_ul_ue->a[i] = 64;
|
||||
|
||||
for (i = payload_offset; i < harq_process_ul_ue->TBS / 8; i++) {
|
||||
for (i = payload_offset; i < TBS / 8; i++) {
|
||||
harq_process_ul_ue->a[i] = (unsigned char) rand();
|
||||
//printf(" input encoder a[%d]=0x%02x\n",i,harq_process_ul_ue->a[i]);
|
||||
}
|
||||
@@ -223,8 +222,10 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
/////////////////////////ULSCH coding/////////////////////////
|
||||
///////////
|
||||
|
||||
unsigned int G = nr_get_G(nb_rb, number_of_symbols,
|
||||
nb_dmrs_re_per_rb, number_dmrs_symbols, mod_order, Nl);
|
||||
|
||||
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid);
|
||||
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid, G);
|
||||
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@@ -232,21 +233,14 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
/////////////////////////ULSCH scrambling/////////////////////////
|
||||
///////////
|
||||
|
||||
mod_order = nr_get_Qm_ul(harq_process_ul_ue->mcs, 0);
|
||||
|
||||
available_bits = nr_get_G(harq_process_ul_ue->nb_rb,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
ulsch_ue->nb_re_dmrs,
|
||||
ulsch_ue->length_dmrs,
|
||||
mod_order,
|
||||
1);
|
||||
available_bits = G;
|
||||
|
||||
memset(scrambled_output[cwd_index], 0, ((available_bits>>5)+1)*sizeof(uint32_t));
|
||||
|
||||
nr_pusch_codeword_scrambling(ulsch_ue->g,
|
||||
available_bits,
|
||||
ulsch_ue->Nid_cell,
|
||||
ulsch_ue->rnti,
|
||||
rnti,
|
||||
scrambled_output[cwd_index]); // assume one codeword for the moment
|
||||
|
||||
|
||||
@@ -273,11 +267,9 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
/////////////////////////DMRS Modulation/////////////////////////
|
||||
///////////
|
||||
ulsch_ue->nb_re_dmrs = ((UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type == pusch_dmrs_type1)?6:4)*number_dmrs_symbols; //FIXME temprary here for no data in dmrs symbol
|
||||
pusch_dmrs = UE->nr_gold_pusch_dmrs[slot];
|
||||
n_dmrs = (harq_process_ul_ue->nb_rb*ulsch_ue->nb_re_dmrs*ulsch_ue->length_dmrs);
|
||||
n_dmrs = (nb_rb*nb_dmrs_re_per_rb*number_dmrs_symbols);
|
||||
int16_t mod_dmrs[n_dmrs<<1];
|
||||
dmrs_type = UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type;
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -285,26 +277,23 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
/////////////////////////PTRS parameters' initialization/////////////////////////
|
||||
///////////
|
||||
|
||||
int16_t mod_ptrs[(harq_process_ul_ue->nb_rb/2)*(NR_SYMBOLS_PER_SLOT-1)*2]; // assume maximum number of PTRS per pusch allocation
|
||||
int16_t mod_ptrs[(nb_rb/2)*(NR_SYMBOLS_PER_SLOT-1)*2]; // assume maximum number of PTRS per pusch allocation
|
||||
K_ptrs = 0; // just to avoid a warning
|
||||
|
||||
if (UE->ptrs_configured == 1) {
|
||||
if (harq_process_ul_ue->pusch_pdu.pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) {
|
||||
|
||||
K_ptrs = get_K_ptrs(ptrs_Uplink_Config, harq_process_ul_ue->nb_rb);
|
||||
|
||||
L_ptrs = get_L_ptrs(ptrs_Uplink_Config, harq_process_ul_ue->mcs);
|
||||
K_ptrs = (harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_freq_density)?4:2;
|
||||
L_ptrs = 1<<harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_time_density;
|
||||
|
||||
beta_ptrs = 1; // temp value until power control is implemented
|
||||
|
||||
ulsch_ue->ptrs_symbols = 0;
|
||||
|
||||
set_ptrs_symb_idx(&ulsch_ue->ptrs_symbols,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
number_of_symbols,
|
||||
start_symbol,
|
||||
dmrs_type,
|
||||
L_ptrs,
|
||||
ulsch_ue->length_dmrs,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
ul_dmrs_symb_pos);
|
||||
}
|
||||
|
||||
///////////
|
||||
@@ -316,7 +305,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
tx_layers = (int16_t **)pusch_ue->txdataF_layers;
|
||||
|
||||
nr_ue_layer_mapping(UE->ulsch[thread_id][gNB_id],
|
||||
harq_process_ul_ue->Nl,
|
||||
Nl,
|
||||
available_bits/mod_order,
|
||||
tx_layers);
|
||||
|
||||
@@ -333,24 +322,19 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
uint32_t nb_re_pusch, nb_re_dmrs_per_rb;
|
||||
uint32_t y_offset = 0;
|
||||
|
||||
for (l = start_symbol; l < start_symbol + harq_process_ul_ue->number_of_symbols; l++) {
|
||||
for (l = start_symbol; l < start_symbol + number_of_symbols; l++) {
|
||||
|
||||
if((ul_dmrs_symb_pos >> l) & 0x01)
|
||||
is_dmrs = 1;
|
||||
else
|
||||
is_dmrs = 0;
|
||||
|
||||
is_dmrs = is_dmrs_symbol((mapping_type)?l-start_symbol:l,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
dmrs_type,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
|
||||
if (is_dmrs == 1)
|
||||
nb_re_dmrs_per_rb = ulsch_ue->nb_re_dmrs;
|
||||
nb_re_dmrs_per_rb = nb_dmrs_re_per_rb;
|
||||
else
|
||||
nb_re_dmrs_per_rb = 0;
|
||||
|
||||
nb_re_pusch = harq_process_ul_ue->nb_rb * (NR_NB_SC_PER_RB - nb_re_dmrs_per_rb);
|
||||
nb_re_pusch = nb_rb * (NR_NB_SC_PER_RB - nb_re_dmrs_per_rb);
|
||||
|
||||
nr_dft(&ulsch_ue->y[y_offset], &((int32_t*)tx_layers[0])[y_offset], nb_re_pusch);
|
||||
|
||||
@@ -370,13 +354,13 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
txdataF = UE->common_vars.txdataF;
|
||||
|
||||
start_rb = harq_process_ul_ue->first_rb;
|
||||
start_rb = harq_process_ul_ue->pusch_pdu.rb_start;
|
||||
start_sc = frame_parms->first_carrier_offset + start_rb*NR_NB_SC_PER_RB;
|
||||
|
||||
if (start_sc >= frame_parms->ofdm_symbol_size)
|
||||
start_sc -= frame_parms->ofdm_symbol_size;
|
||||
|
||||
for (ap=0; ap<harq_process_ul_ue->Nl; ap++) {
|
||||
for (ap=0; ap< Nl; ap++) {
|
||||
|
||||
// DMRS params for this ap
|
||||
get_Wt(Wt, ap, dmrs_type);
|
||||
@@ -386,46 +370,38 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
uint8_t k_prime=0;
|
||||
uint8_t is_dmrs, is_ptrs;
|
||||
uint8_t l_ref;
|
||||
uint16_t m=0, n=0, dmrs_idx=0, ptrs_idx = 0;
|
||||
|
||||
for (l=start_symbol; l<start_symbol+harq_process_ul_ue->number_of_symbols; l++) {
|
||||
for (l=start_symbol; l<start_symbol+number_of_symbols; l++) {
|
||||
|
||||
k = start_sc;
|
||||
n = 0;
|
||||
dmrs_idx = 0;
|
||||
l_ref = (mapping_type) ? l-start_symbol : l;
|
||||
|
||||
for (i=0; i<harq_process_ul_ue->nb_rb*NR_NB_SC_PER_RB; i++) {
|
||||
for (i=0; i< nb_rb*NR_NB_SC_PER_RB; i++) {
|
||||
|
||||
sample_offsetF = l*frame_parms->ofdm_symbol_size + k;
|
||||
|
||||
is_dmrs = 0;
|
||||
is_ptrs = 0;
|
||||
|
||||
is_dmrs = is_dmrs_symbol(l_ref,
|
||||
k,
|
||||
start_sc,
|
||||
k_prime,
|
||||
n,
|
||||
delta,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
dmrs_type,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
if((ul_dmrs_symb_pos >> l) & 0x01) {
|
||||
if (k == ((start_sc+get_dmrs_freq_idx_ul(n, k_prime, delta, dmrs_type))%frame_parms->ofdm_symbol_size))
|
||||
is_dmrs = 1;
|
||||
}
|
||||
|
||||
if (UE->ptrs_configured == 1){
|
||||
is_ptrs = is_ptrs_symbol(l,
|
||||
k,
|
||||
ulsch_ue->rnti,
|
||||
harq_process_ul_ue->nb_rb,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
ap,
|
||||
K_ptrs,
|
||||
ulsch_ue->ptrs_symbols,
|
||||
start_sc,
|
||||
frame_parms->ofdm_symbol_size,
|
||||
UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type,
|
||||
ptrs_Uplink_Config->resourceElementOffset);
|
||||
if (harq_process_ul_ue->pusch_pdu.pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS){
|
||||
|
||||
if(is_ptrs_symbol(l, ulsch_ue->ptrs_symbols))
|
||||
is_ptrs = is_ptrs_subcarrier(k,
|
||||
rnti,
|
||||
ap,
|
||||
dmrs_type,
|
||||
K_ptrs,
|
||||
nb_rb,
|
||||
harq_process_ul_ue->pusch_pdu.pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset,
|
||||
start_sc,
|
||||
frame_parms->ofdm_symbol_size);
|
||||
}
|
||||
|
||||
if (is_dmrs == 1) {
|
||||
@@ -452,7 +428,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
} else if (is_ptrs == 1) {
|
||||
|
||||
if (k == start_sc){
|
||||
nr_modulation(pusch_dmrs[l][0], harq_process_ul_ue->nb_rb/2, DMRS_MOD_ORDER, mod_ptrs);
|
||||
nr_modulation(pusch_dmrs[l][0], nb_rb, DMRS_MOD_ORDER, mod_ptrs);
|
||||
}
|
||||
|
||||
((int16_t*)txdataF[ap])[(sample_offsetF)<<1] = (beta_ptrs*AMP*mod_ptrs[ptrs_idx<<1]) >> 15;
|
||||
@@ -460,29 +436,18 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
|
||||
|
||||
ptrs_idx++;
|
||||
|
||||
} else {
|
||||
} else {
|
||||
|
||||
if (!is_dmrs_symbol((mapping_type)?l-start_symbol:l,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
harq_process_ul_ue->number_of_symbols,
|
||||
UE->pusch_config.dmrs_UplinkConfig.pusch_dmrs_type,
|
||||
frame_parms->ofdm_symbol_size))
|
||||
{
|
||||
((int16_t*)txdataF[ap])[(sample_offsetF)<<1] = ((int16_t *) ulsch_ue->y)[m<<1];
|
||||
((int16_t*)txdataF[ap])[((sample_offsetF)<<1) + 1] = ((int16_t *) ulsch_ue->y)[(m<<1) + 1];
|
||||
((int16_t*)txdataF[ap])[(sample_offsetF)<<1] = ((int16_t *) ulsch_ue->y)[m<<1];
|
||||
((int16_t*)txdataF[ap])[((sample_offsetF)<<1) + 1] = ((int16_t *) ulsch_ue->y)[(m<<1) + 1];
|
||||
|
||||
#ifdef DEBUG_PUSCH_MAPPING
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, k, ((int16_t*)txdataF[ap])[(sample_offsetF)<<1],
|
||||
((int16_t*)txdataF[ap])[((sample_offsetF)<<1) + 1]);
|
||||
printf("m %d\t l %d \t k %d \t txdataF: %d %d\n",
|
||||
m, l, k, ((int16_t*)txdataF[ap])[(sample_offsetF)<<1],
|
||||
((int16_t*)txdataF[ap])[((sample_offsetF)<<1) + 1]);
|
||||
#endif
|
||||
|
||||
m++;
|
||||
}
|
||||
m++;
|
||||
}
|
||||
|
||||
if (++k >= frame_parms->ofdm_symbol_size)
|
||||
@@ -511,7 +476,7 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE,
|
||||
int32_t **txdata;
|
||||
int32_t **txdataF;
|
||||
int timing_advance;
|
||||
uint8_t Nl = UE->ulsch[thread_id][gNB_id][0]->harq_processes[harq_pid]->Nl; // cw 0
|
||||
uint8_t Nl = UE->ulsch[thread_id][gNB_id][0]->harq_processes[harq_pid]->pusch_pdu.nrOfLayers; // cw 0
|
||||
|
||||
/////////////////////////IFFT///////////////////////
|
||||
///////////
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include <openair1/PHY/CODING/nrSmallBlock/nr_small_block_defs.h>
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
|
||||
@@ -911,19 +911,18 @@ void reset_stats_gNB(FL_OBJECT *button,
|
||||
|
||||
|
||||
static void *scope_thread_gNB(void *arg) {
|
||||
int UE_id;
|
||||
int ue_cnt=0;
|
||||
scopeParms_t * p=(scopeParms_t *) arg;
|
||||
//# ifdef ENABLE_XFORMS_WRITE_STATS
|
||||
// FILE *gNB_stats = fopen("gNB_stats.txt", "w");
|
||||
//#endif
|
||||
|
||||
while (!oai_exit) {
|
||||
ue_cnt=0;
|
||||
int ue_cnt=0;
|
||||
|
||||
for(UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
for(int UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
if ((ue_cnt<scope_enb_num_ue)) {
|
||||
//this function needs to be written
|
||||
phy_scope_gNB(form_gnb[ue_cnt], RC.gNB[0], RC.ru[0], UE_id);
|
||||
phy_scope_gNB(form_gnb[ue_cnt], p->gNB, p->ru, UE_id);
|
||||
ue_cnt++;
|
||||
}
|
||||
}
|
||||
@@ -983,5 +982,5 @@ void startScope(scopeParms_t * p) {
|
||||
} // UE_id
|
||||
|
||||
pthread_t forms_thread;
|
||||
threadCreate(&forms_thread, scope_thread_gNB, NULL, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||
threadCreate(&forms_thread, scope_thread_gNB, p, "scope", -1, OAI_PRIORITY_RT_LOW);
|
||||
}
|
||||
|
||||
@@ -68,19 +68,13 @@ typedef struct {
|
||||
typedef struct {
|
||||
int *argc;
|
||||
char **argv;
|
||||
RU_t* ru;
|
||||
PHY_VARS_gNB *gNB;
|
||||
} scopeParms_t;
|
||||
|
||||
extern unsigned char scope_enb_num_ue;
|
||||
FD_phy_scope_gnb * create_phy_scope_gnb( void );
|
||||
FD_phy_scope_nrue * create_phy_scope_nrue( void );
|
||||
|
||||
|
||||
void phy_scope_gNB(FD_phy_scope_gnb *form,
|
||||
PHY_VARS_gNB *phy_vars_gnb,
|
||||
RU_t *phy_vars_ru,
|
||||
int UE_id);
|
||||
|
||||
|
||||
void phy_scope_nrUE(FD_phy_scope_nrue *form,
|
||||
PHY_VARS_NR_UE *phy_vars_ue,
|
||||
int eNB_id,
|
||||
@@ -90,6 +84,5 @@ void phy_scope_nrUE(FD_phy_scope_nrue *form,
|
||||
|
||||
void startScope(scopeParms_t * p);
|
||||
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
This library offers some functions to remotely program the R&S SMBV100A.
|
||||
*/
|
||||
|
||||
#ifndef __PHY_TOOLS_SMBV__H__
|
||||
#define __PHY_TOOLS_SMBV__H__
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
@@ -93,3 +95,4 @@ int smbv_configure_common_dci(const char* fname, uint8_t subframe, const char* t
|
||||
// item is the row in the DCI table
|
||||
int smbv_configure_ue_spec_dci(const char* fname, uint8_t subframe, uint8_t user, DCI_ALLOC_t *dci_alloc, uint8_t item);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -148,11 +148,7 @@ static inline void* malloc16_clear( size_t size )
|
||||
#define NB_BANDS_MAX_NB_IoT 8
|
||||
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
typedef enum {normal_txrx_NB_IoT=0,rx_calib_ue_NB_IoT=1,rx_calib_ue_med_NB_IoT=2,rx_calib_ue_byp_NB_IoT=3,debug_prach_NB_IoT=4,no_L2_connect_NB_IoT=5,calib_prach_tx_NB_IoT=6,rx_dump_frame_NB_IoT=7,loop_through_memory_NB_IoT=8} runmode_NB_IoT_t;
|
||||
#endif
|
||||
/*
|
||||
enum transmission_access_mode {
|
||||
NO_ACCESS=0,
|
||||
|
||||
@@ -44,9 +44,6 @@
|
||||
#define MAX_RRU_CONFIG_SIZE 1024
|
||||
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
|
||||
typedef enum {
|
||||
normal_txrx=0,
|
||||
@@ -92,7 +89,6 @@ typedef enum {
|
||||
synch_to_other, // synch to another source_(timer, other RU)
|
||||
synch_to_mobipass_standalone // special case for mobipass in standalone mode
|
||||
} node_timing_t;
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct {
|
||||
@@ -552,6 +548,8 @@ typedef struct RU_t_s {
|
||||
void (*wakeup_prach_gNB)(struct PHY_VARS_gNB_s *gNB, struct RU_t_s *ru, int frame, int subframe);
|
||||
/// function pointer to wakeup routine in lte-enb.
|
||||
void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru, int frame, int subframe);
|
||||
/// function pointer to start a thread of tx write for USRP.
|
||||
int (*start_write_thread)(struct RU_t_s *ru);
|
||||
|
||||
/// function pointer to NB entry routine
|
||||
void (*eNB_top)(struct PHY_VARS_eNB_s *eNB, int frame_rx, int subframe_rx, char *string, struct RU_t_s *ru);
|
||||
|
||||
@@ -99,9 +99,6 @@
|
||||
|
||||
#define NB_RX_ANTENNAS_MAX 64
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include "enums.h"
|
||||
#else
|
||||
|
||||
typedef enum {TDD=1,FDD=0} lte_frame_type_t;
|
||||
|
||||
@@ -122,7 +119,6 @@ typedef enum {
|
||||
one=6,
|
||||
two=12
|
||||
} PHICH_RESOURCE_t;
|
||||
#endif
|
||||
/// PHICH-Config from 36.331 RRC spec
|
||||
typedef struct {
|
||||
/// Parameter: PHICH-Duration, see TS 36.211 (Table 6.9.3-1).
|
||||
@@ -250,12 +246,10 @@ typedef struct {
|
||||
} UL_REFERENCE_SIGNALS_PUSCH_t;
|
||||
|
||||
/// Enumeration for parameter Hopping-mode \ref PUSCH_CONFIG_COMMON::hoppingMode.
|
||||
#ifndef OCP_FRAMEWORK
|
||||
typedef enum {
|
||||
interSubFrame=0,
|
||||
intraAndInterSubFrame=1
|
||||
} PUSCH_HOPPING_t;
|
||||
#endif
|
||||
|
||||
/// PUSCH-ConfigCommon from 36.331 RRC spec.
|
||||
typedef struct {
|
||||
@@ -434,7 +428,6 @@ typedef struct {
|
||||
uint8_t filterCoefficient;
|
||||
} UL_POWER_CONTROL_DEDICATED;
|
||||
|
||||
#ifndef OCP_FRAMEWORK
|
||||
/// Enumeration for parameter \f$\alpha\f$ \ref UL_POWER_CONTROL_CONFIG_COMMON::alpha.
|
||||
typedef enum {
|
||||
al0=0,
|
||||
@@ -446,7 +439,6 @@ typedef enum {
|
||||
al09=6,
|
||||
al1=7
|
||||
} PUSCH_alpha_t;
|
||||
#endif
|
||||
|
||||
/// \note UNUSED
|
||||
typedef enum {
|
||||
|
||||
@@ -956,9 +956,6 @@ typedef struct {
|
||||
/// PUSCH DMRS sequence
|
||||
uint32_t ****nr_gold_pusch_dmrs;
|
||||
|
||||
/// flag to indicate if PTRS is configured
|
||||
uint8_t ptrs_configured;
|
||||
|
||||
uint32_t X_u[64][839];
|
||||
|
||||
uint32_t high_speed_flag;
|
||||
|
||||
+16
-17
@@ -38,7 +38,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
|
||||
extern unsigned int DAQ_MBOX;
|
||||
extern int number_of_cards;
|
||||
|
||||
extern short conjugate[8],conjugate2[8];
|
||||
extern const short conjugate[8],conjugate2[8];
|
||||
|
||||
extern RAN_CONTEXT_t RC;
|
||||
|
||||
@@ -73,8 +73,8 @@ extern int flag_LA;
|
||||
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
||||
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
||||
extern int table_length[MCS_COUNT];
|
||||
extern double sinr_to_cqi[4][16];
|
||||
extern int cqi_to_mcs[16];
|
||||
extern const double sinr_to_cqi[4][16];
|
||||
extern const int cqi_to_mcs[16];
|
||||
|
||||
//for MU-MIMO abstraction using MIESM
|
||||
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
|
||||
@@ -82,23 +82,22 @@ extern double MI_map_4qam[3][162];
|
||||
extern double MI_map_16qam[3][197];
|
||||
extern double MI_map_64qam[3][227];
|
||||
|
||||
extern double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
|
||||
extern double q_qpsk[8];
|
||||
extern double q_qam16[8];
|
||||
extern double q_qam64[8];
|
||||
extern const double q_qpsk[8];
|
||||
extern const double q_qam16[8];
|
||||
extern const double q_qam64[8];
|
||||
extern const double p_qpsk[8];
|
||||
extern const double p_qam16[8];
|
||||
extern const double p_qam64[8];
|
||||
|
||||
extern double p_qpsk[8];
|
||||
extern double p_qam16[8];
|
||||
extern double p_qam64[8];
|
||||
extern const double beta1_dlsch[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch[6][MCS_COUNT];
|
||||
|
||||
extern double beta1_dlsch[6][MCS_COUNT];
|
||||
extern double beta2_dlsch[6][MCS_COUNT];
|
||||
|
||||
extern char NB_functions[7][20];
|
||||
extern char NB_timing[2][20];
|
||||
extern char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
extern const char NB_functions[7][20];
|
||||
extern const char NB_timing[2][20];
|
||||
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
|
||||
extern int16_t unscrambling_lut[65536*16];
|
||||
extern uint8_t scrambling_lut[65536*16];
|
||||
|
||||
@@ -34,7 +34,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
|
||||
|
||||
//#include "PHY/LTE_TRANSPORT/transport_extern.h"
|
||||
|
||||
extern short conjugate[8],conjugate2[8];
|
||||
extern const short conjugate[8],conjugate2[8];
|
||||
extern int number_of_cards;
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ extern int flag_LA;
|
||||
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
||||
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
||||
extern int table_length[MCS_COUNT];
|
||||
extern double sinr_to_cqi[4][16];
|
||||
extern int cqi_to_mcs[16];
|
||||
extern const double sinr_to_cqi[4][16];
|
||||
extern const int cqi_to_mcs[16];
|
||||
|
||||
//for MU-MIMO abstraction using MIESM
|
||||
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
|
||||
@@ -79,23 +79,19 @@ extern double MI_map_4qam[3][162];
|
||||
extern double MI_map_16qam[3][197];
|
||||
extern double MI_map_64qam[3][227];
|
||||
|
||||
extern double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
|
||||
extern double q_qpsk[8];
|
||||
extern double q_qam16[8];
|
||||
extern double q_qam64[8];
|
||||
extern const double q_qpsk[8];
|
||||
extern const double q_qam16[8];
|
||||
extern const double q_qam64[8];
|
||||
|
||||
extern double p_qpsk[8];
|
||||
extern double p_qam16[8];
|
||||
extern double p_qam64[8];
|
||||
extern const double beta1_dlsch[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch[6][MCS_COUNT];
|
||||
|
||||
extern double beta1_dlsch[6][MCS_COUNT];
|
||||
extern double beta2_dlsch[6][MCS_COUNT];
|
||||
|
||||
extern char NB_functions[7][20];
|
||||
extern char NB_timing[2][20];
|
||||
extern char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
extern const char NB_functions[7][20];
|
||||
extern const char NB_timing[2][20];
|
||||
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
|
||||
extern int16_t unscrambling_lut[65536*16];
|
||||
extern uint8_t scrambling_lut[65536*16];
|
||||
|
||||
@@ -36,7 +36,7 @@ extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
|
||||
|
||||
extern int number_of_cards;
|
||||
|
||||
extern short conjugate[8],conjugate2[8];
|
||||
extern const short conjugate[8],conjugate2[8];
|
||||
|
||||
|
||||
extern PHY_VARS_UE ***PHY_vars_UE_g;
|
||||
@@ -70,8 +70,8 @@ extern int flag_LA;
|
||||
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
|
||||
extern double sinr_bler_map_up[MCS_COUNT][2][16];
|
||||
extern int table_length[MCS_COUNT];
|
||||
extern double sinr_to_cqi[4][16];
|
||||
extern int cqi_to_mcs[16];
|
||||
extern const double sinr_to_cqi[4][16];
|
||||
extern const int cqi_to_mcs[16];
|
||||
|
||||
//for MU-MIMO abstraction using MIESM
|
||||
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
|
||||
@@ -79,23 +79,23 @@ extern double MI_map_4qam[3][162];
|
||||
extern double MI_map_16qam[3][197];
|
||||
extern double MI_map_64qam[3][227];
|
||||
|
||||
extern double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta1_dlsch_MI[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch_MI[6][MCS_COUNT];
|
||||
|
||||
extern double q_qpsk[8];
|
||||
extern double q_qam16[8];
|
||||
extern double q_qam64[8];
|
||||
extern const double q_qpsk[8];
|
||||
extern const double q_qam16[8];
|
||||
extern const double q_qam64[8];
|
||||
|
||||
extern double p_qpsk[8];
|
||||
extern double p_qam16[8];
|
||||
extern double p_qam64[8];
|
||||
extern const double p_qpsk[8];
|
||||
extern const double p_qam16[8];
|
||||
extern const double p_qam64[8];
|
||||
|
||||
extern double beta1_dlsch[6][MCS_COUNT];
|
||||
extern double beta2_dlsch[6][MCS_COUNT];
|
||||
extern const double beta1_dlsch[6][MCS_COUNT];
|
||||
extern const double beta2_dlsch[6][MCS_COUNT];
|
||||
|
||||
extern char NB_functions[7][20];
|
||||
extern char NB_timing[2][20];
|
||||
extern char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
extern const char NB_functions[7][20];
|
||||
extern const char NB_timing[2][20];
|
||||
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
|
||||
|
||||
extern int16_t unscrambling_lut[65536*16];
|
||||
extern uint8_t scrambling_lut[65536*16];
|
||||
|
||||
+17
-21
@@ -50,8 +50,8 @@ unsigned short rev[2048],rev_times4[8192],rev_half[1024];
|
||||
unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192];
|
||||
|
||||
|
||||
short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
|
||||
|
||||
#include "SIMULATION/ETH_TRANSPORT/vars.h"
|
||||
@@ -84,29 +84,29 @@ double MI_map_16qam[3][197];
|
||||
double MI_map_64qam[3][227];
|
||||
|
||||
// here the first index is for transmission mode 1, 2, 5 and 6 whereas the second index is for the 16 sinr vaues corresponding to 16 CQIs
|
||||
double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
const double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
{-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572},
|
||||
{-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392},
|
||||
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
|
||||
};
|
||||
|
||||
//int cqi_to_mcs[16]={0, 0, 1, 3, 5, 7, 9, 13, 15, 16, 20, 23, 25, 27, 27, 27};
|
||||
int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
|
||||
//for SNR to MI conversion 7 th order Polynomial coeff
|
||||
double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
const double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
const double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
const double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
|
||||
//for MI to SNR conversion 7 th order Polynomial coeff
|
||||
double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
const double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
const double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
const double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
|
||||
// ideal CE MIESM
|
||||
|
||||
double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
const double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
const double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
|
||||
//real CE MIESM
|
||||
/*
|
||||
@@ -116,8 +116,8 @@ double beta2_dlsch_MI[6][MCS_COUNT] = { {1.36875, 0.59304, 0.53870, 0.98239, 0.8
|
||||
//ideal channel estimation values
|
||||
//double beta1_dlsch[6][MCS_COUNT] = { {2.3814, 0.4956, 0.5273, 1.1708, 0.8014, 0.7889, 0.8111, 0.8139, 0.8124, 0.8479, 1.9280, 1.9664, 2.3857, 2.5147, 2.4511, 3.0158, 2.8643, 5.3013, 5.8594, 6.5372, 7.8073, 7.8030, 7.5295, 7.1320}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
//double beta2_dlsch[6][MCS_COUNT] = { {2.3639, 0.4952, 0.5207, 1.1572, 0.8026, 0.7864, 0.7996, 0.8034, 0.8200, 0.8367, 1.8701, 1.9212, 2.2947, 2.4472, 2.4091, 2.9479, 2.8973, 5.0591, 5.5134, 6.1483, 7.2166, 7.5177, 7.5704, 7.2248}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
const double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
const double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
|
||||
//real channel estimation valus
|
||||
/*
|
||||
@@ -126,13 +126,9 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
|
||||
|
||||
*/
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
#endif
|
||||
const char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
const char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
|
||||
/// lookup table for unscrambling in RX
|
||||
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
|
||||
|
||||
@@ -49,8 +49,8 @@ unsigned short rev[2048],rev_times4[8192],rev_half[1024];
|
||||
unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192];
|
||||
|
||||
|
||||
short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
|
||||
|
||||
#include "SIMULATION/ETH_TRANSPORT/vars.h"
|
||||
@@ -84,29 +84,29 @@ double MI_map_16qam[3][197];
|
||||
double MI_map_64qam[3][227];
|
||||
|
||||
// here the first index is for transmission mode 1, 2, 5 and 6 whereas the second index is for the 16 sinr vaues corresponding to 16 CQIs
|
||||
double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
const double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
{-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572},
|
||||
{-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392},
|
||||
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
|
||||
};
|
||||
|
||||
//int cqi_to_mcs[16]={0, 0, 1, 3, 5, 7, 9, 13, 15, 16, 20, 23, 25, 27, 27, 27};
|
||||
int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
|
||||
//for SNR to MI conversion 7 th order Polynomial coeff
|
||||
double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
const double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
const double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
const double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
|
||||
//for MI to SNR conversion 7 th order Polynomial coeff
|
||||
double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
const double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
const double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
const double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
|
||||
// ideal CE MIESM
|
||||
|
||||
double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
const double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
const double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
|
||||
//real CE MIESM
|
||||
/*
|
||||
@@ -116,8 +116,8 @@ double beta2_dlsch_MI[6][MCS_COUNT] = { {1.36875, 0.59304, 0.53870, 0.98239, 0.8
|
||||
//ideal channel estimation values
|
||||
//double beta1_dlsch[6][MCS_COUNT] = { {2.3814, 0.4956, 0.5273, 1.1708, 0.8014, 0.7889, 0.8111, 0.8139, 0.8124, 0.8479, 1.9280, 1.9664, 2.3857, 2.5147, 2.4511, 3.0158, 2.8643, 5.3013, 5.8594, 6.5372, 7.8073, 7.8030, 7.5295, 7.1320}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
//double beta2_dlsch[6][MCS_COUNT] = { {2.3639, 0.4952, 0.5207, 1.1572, 0.8026, 0.7864, 0.7996, 0.8034, 0.8200, 0.8367, 1.8701, 1.9212, 2.2947, 2.4472, 2.4091, 2.9479, 2.8973, 5.0591, 5.5134, 6.1483, 7.2166, 7.5177, 7.5704, 7.2248}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
const double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
const double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
|
||||
//real channel estimation valus
|
||||
/*
|
||||
@@ -126,13 +126,9 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
|
||||
|
||||
*/
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
#endif
|
||||
const char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
const char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
|
||||
/// lookup table for unscrambling in RX
|
||||
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
|
||||
|
||||
+20
-24
@@ -19,8 +19,8 @@
|
||||
* contact@openairinterface.org
|
||||
*/
|
||||
|
||||
#ifndef __PHY_VARS_H__
|
||||
#define __PHY_VARS_H__
|
||||
#ifndef __PHY_VARS_UE__H__
|
||||
#define __PHY_VARS_UE__H__
|
||||
|
||||
#include "PHY/types.h"
|
||||
#include "PHY/defs_UE.h"
|
||||
@@ -43,8 +43,8 @@ unsigned short rev[2048],rev_times4[8192],rev_half[1024];
|
||||
unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192];
|
||||
|
||||
|
||||
short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
|
||||
const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
|
||||
|
||||
|
||||
#include "SIMULATION/ETH_TRANSPORT/vars.h"
|
||||
@@ -77,29 +77,29 @@ double MI_map_16qam[3][197];
|
||||
double MI_map_64qam[3][227];
|
||||
|
||||
// here the first index is for transmission mode 1, 2, 5 and 6 whereas the second index is for the 16 sinr vaues corresponding to 16 CQIs
|
||||
double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
const double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
|
||||
{-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572},
|
||||
{-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392},
|
||||
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
|
||||
};
|
||||
|
||||
//int cqi_to_mcs[16]={0, 0, 1, 3, 5, 7, 9, 13, 15, 16, 20, 23, 25, 27, 27, 27};
|
||||
int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
|
||||
|
||||
//for SNR to MI conversion 7 th order Polynomial coeff
|
||||
double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
const double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
|
||||
const double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
|
||||
const double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
|
||||
|
||||
//for MI to SNR conversion 7 th order Polynomial coeff
|
||||
double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
const double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
|
||||
const double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
|
||||
const double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
|
||||
|
||||
// ideal CE MIESM
|
||||
|
||||
double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
const double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
|
||||
const double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
|
||||
|
||||
//real CE MIESM
|
||||
/*
|
||||
@@ -109,8 +109,8 @@ double beta2_dlsch_MI[6][MCS_COUNT] = { {1.36875, 0.59304, 0.53870, 0.98239, 0.8
|
||||
//ideal channel estimation values
|
||||
//double beta1_dlsch[6][MCS_COUNT] = { {2.3814, 0.4956, 0.5273, 1.1708, 0.8014, 0.7889, 0.8111, 0.8139, 0.8124, 0.8479, 1.9280, 1.9664, 2.3857, 2.5147, 2.4511, 3.0158, 2.8643, 5.3013, 5.8594, 6.5372, 7.8073, 7.8030, 7.5295, 7.1320}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
//double beta2_dlsch[6][MCS_COUNT] = { {2.3639, 0.4952, 0.5207, 1.1572, 0.8026, 0.7864, 0.7996, 0.8034, 0.8200, 0.8367, 1.8701, 1.9212, 2.2947, 2.4472, 2.4091, 2.9479, 2.8973, 5.0591, 5.5134, 6.1483, 7.2166, 7.5177, 7.5704, 7.2248}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
const double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
|
||||
const double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
|
||||
|
||||
//real channel estimation valus
|
||||
/*
|
||||
@@ -119,13 +119,9 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
|
||||
|
||||
*/
|
||||
|
||||
#ifdef OCP_FRAMEWORK
|
||||
#include <enums.h>
|
||||
#else
|
||||
char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
#endif
|
||||
const char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
|
||||
const char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
|
||||
const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
|
||||
|
||||
/// lookup table for unscrambling in RX
|
||||
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
|
||||
@@ -133,4 +129,4 @@ int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
|
||||
uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
|
||||
|
||||
uint8_t max_turbo_iterations=4;
|
||||
#endif /*__PHY_VARS_H__ */
|
||||
#endif /* __PHY_VARS_UE__H__ */
|
||||
|
||||
@@ -1419,7 +1419,7 @@ void fill_rx_indication(PHY_VARS_eNB *eNB,
|
||||
pdu->rx_indication_rel8.offset = 1; // DJP - I dont understand - but broken unless 1 ???? 0; // filled in at the end of the UL_INFO formation
|
||||
pdu->data = eNB->ulsch[UE_id]->harq_processes[harq_pid]->decodedBytes;
|
||||
// estimate timing advance for MAC
|
||||
sync_pos = lte_est_timing_advance_pusch(eNB,UE_id);
|
||||
sync_pos = lte_est_timing_advance_pusch(&eNB->frame_parms, eNB->pusch_vars[UE_id]->drs_ch_estimates_time);
|
||||
timing_advance_update = sync_pos; // - eNB->frame_parms.nb_prefix_samples/4; //to check
|
||||
|
||||
// if (timing_advance_update > 10) { dump_ulsch(eNB,frame,subframe,UE_id); exit(-1);}
|
||||
|
||||
@@ -693,12 +693,6 @@ void ru_fep_full_2thread(RU_t *ru,
|
||||
3/(fp->symbols_per_tti/2),// Ns = slot number
|
||||
fp);
|
||||
|
||||
/*lte_ul_channel_estimation((PHY_VARS_eNB *)NULL,
|
||||
proc,
|
||||
ru->idx,
|
||||
3%(fp->symbols_per_tti/2),
|
||||
3/(fp->symbols_per_tti/2));
|
||||
*/
|
||||
lte_ul_channel_estimation_RRU(fp,
|
||||
calibration->drs_ch_estimates,
|
||||
calibration->drs_ch_estimates_time,
|
||||
@@ -713,7 +707,7 @@ void ru_fep_full_2thread(RU_t *ru,
|
||||
0,//interpolate,
|
||||
0 /*eNB->ulsch[ru->idx]->rnti rnti or ru->ulsch[eNB_id]->rnti*/);
|
||||
|
||||
check_sync_pos = lte_est_timing_advance_pusch((PHY_VARS_eNB *)NULL, ru->idx);
|
||||
check_sync_pos = lte_est_timing_advance_pusch(ru->frame_parms, ru->calibration.drs_ch_estimates_time);
|
||||
if (ru->state == RU_CHECK_SYNC) {
|
||||
if ((check_sync_pos >= 0 && check_sync_pos<8) || (check_sync_pos < 0 && check_sync_pos>-8)) {
|
||||
LOG_I(PHY,"~~~~~~~~~~~ check_sync_pos %d, frame %d, cnt %d\n",check_sync_pos,proc->frame_rx,ru->wait_check);
|
||||
|
||||
@@ -116,7 +116,6 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
if (scheduled_response->ul_config != NULL){
|
||||
|
||||
fapi_nr_ul_config_request_t *ul_config = scheduled_response->ul_config;
|
||||
|
||||
for (i = 0; i < ul_config->number_pdus; ++i){
|
||||
|
||||
uint8_t pdu_type = ul_config->ul_config_list[i].pdu_type, pucch_resource_id, current_harq_pid, format, gNB_id = 0;
|
||||
@@ -124,7 +123,7 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
NR_PRACH_RESOURCES_t *prach_resources;
|
||||
fapi_nr_ul_config_prach_pdu *prach_config_pdu;
|
||||
/* PUSCH */
|
||||
fapi_nr_ul_config_pusch_pdu_rel15_t *pusch_config_pdu;
|
||||
nfapi_nr_ue_pusch_pdu_t *pusch_config_pdu;
|
||||
/* PUCCH */
|
||||
fapi_nr_ul_config_pucch_pdu *pucch_config_pdu;
|
||||
PUCCH_ConfigCommon_nr_t *pucch_config_common_nr;
|
||||
@@ -135,16 +134,12 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
|
||||
case (FAPI_NR_UL_CONFIG_TYPE_PUSCH):
|
||||
// pusch config pdu
|
||||
pusch_config_pdu = &ul_config->ul_config_list[i].ulsch_config_pdu.ulsch_pdu_rel15;
|
||||
current_harq_pid = pusch_config_pdu->harq_process_nbr;
|
||||
ulsch0->harq_processes[current_harq_pid]->nb_rb = pusch_config_pdu->number_rbs;
|
||||
ulsch0->harq_processes[current_harq_pid]->first_rb = pusch_config_pdu->start_rb;
|
||||
ulsch0->harq_processes[current_harq_pid]->number_of_symbols = pusch_config_pdu->number_symbols;
|
||||
ulsch0->harq_processes[current_harq_pid]->start_symbol = pusch_config_pdu->start_symbol;
|
||||
ulsch0->harq_processes[current_harq_pid]->mcs = pusch_config_pdu->mcs;
|
||||
ulsch0->harq_processes[current_harq_pid]->DCINdi = pusch_config_pdu->ndi;
|
||||
ulsch0->harq_processes[current_harq_pid]->rvidx = pusch_config_pdu->rv;
|
||||
ulsch0->harq_processes[current_harq_pid]->Nl = pusch_config_pdu->n_layers;
|
||||
pusch_config_pdu = &ul_config->ul_config_list[i].pusch_config_pdu;
|
||||
current_harq_pid = pusch_config_pdu->pusch_data.harq_process_id;
|
||||
nfapi_nr_ue_pusch_pdu_t *pusch_pdu = &ulsch0->harq_processes[current_harq_pid]->pusch_pdu;
|
||||
|
||||
memcpy(pusch_pdu, pusch_config_pdu, sizeof(nfapi_nr_ue_pusch_pdu_t));
|
||||
|
||||
ulsch0->f_pusch = pusch_config_pdu->absolute_delta_PUSCH;
|
||||
break;
|
||||
|
||||
@@ -216,6 +211,8 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config){
|
||||
|
||||
fapi_nr_config_request_t *nrUE_config = &PHY_vars_UE_g[phy_config->Mod_id][phy_config->CC_id]->nrUE_config;
|
||||
|
||||
@@ -296,7 +296,7 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u
|
||||
/* 38.321 5.4.2.1 2> if the uplink grant was received on PDCCH for the C-RNTI and the HARQ buffer of the identified process is empty */
|
||||
if ((ulsch->harq_processes[harq_pid]->first_tx == 1) && (rnti_type == _C_RNTI_)) { /* no transmission yet on this process so consider its harq buffer as empty */
|
||||
ulsch->harq_processes[harq_pid]->first_tx = 0;
|
||||
ulsch->harq_processes[harq_pid]->DCINdi = ndi; /* store first value of ndi */
|
||||
ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator = ndi; /* store first value of ndi */
|
||||
ulsch->harq_processes[harq_pid]->round = 0;
|
||||
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
|
||||
|
||||
@@ -306,8 +306,8 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u
|
||||
}
|
||||
/* 38.321 5.4.2.1 2> if the received grant was not addressed to a Temporary C-RNTI on PDCCH, and the NDI provided in the associated HARQ */
|
||||
/* information has been toggled compared to the value in the previous transmission of this TB of this HARQ process */
|
||||
else if ((ulsch->harq_processes[harq_pid]->DCINdi != ndi) && (rnti_type != _TC_RNTI_)) { /* is ndi toogled so this is a new grant ? */
|
||||
ulsch->harq_processes[harq_pid]->DCINdi = ndi; /* store first value of ndi */
|
||||
else if ((ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator != ndi) && (rnti_type != _TC_RNTI_)) { /* is ndi toogled so this is a new grant ? */
|
||||
ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator = ndi; /* store first value of ndi */
|
||||
ulsch->harq_processes[harq_pid]->round = 0;
|
||||
ulsch->harq_processes[harq_pid]->subframe_scheduling_flag = 1;
|
||||
|
||||
@@ -317,7 +317,7 @@ harq_result_t uplink_harq_process(NR_UE_ULSCH_t *ulsch, int harq_pid, int ndi, u
|
||||
}
|
||||
/* 38.321 5.4.2.1 2> else (i.e. retransmission): */
|
||||
else {
|
||||
ulsch->harq_processes[harq_pid]->DCINdi = ndi; /* ndi has not toggled si this is a retransmission */
|
||||
ulsch->harq_processes[harq_pid]->pusch_pdu.pusch_data.new_data_indicator = ndi; /* ndi has not toggled si this is a retransmission */
|
||||
ulsch->harq_processes[harq_pid]->round++; /* increment number of retransmission */
|
||||
|
||||
result_harq = RETRANSMISSION_HARQ;
|
||||
|
||||
@@ -88,17 +88,6 @@ char nr_mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"};
|
||||
|
||||
extern double cpuf;
|
||||
|
||||
|
||||
|
||||
int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
||||
uint32_t frame,
|
||||
uint32_t slot);
|
||||
|
||||
uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
||||
int frame,
|
||||
int nr_tti_rx,
|
||||
fapi_nr_dci_indication_t *dci_ind);
|
||||
|
||||
/*
|
||||
int nr_generate_ue_ul_dlsch_params_from_dci(PHY_VARS_NR_UE *ue,
|
||||
uint8_t eNB_id,
|
||||
|
||||
@@ -28,8 +28,9 @@
|
||||
* \email: lionel.gauthier@eurecom.fr
|
||||
*/
|
||||
|
||||
#ifndef __SOCKET_H__
|
||||
# define __SOCKET_H__
|
||||
#ifndef __SIMULATION_ETH_TRANSPORT_SOCKET__H__
|
||||
#define __SIMULATION_ETH_TRANSPORT_SOCKET__H__
|
||||
|
||||
# ifdef SOCKET_C
|
||||
# define private_socket(x) x
|
||||
# define public_socket(x) x
|
||||
|
||||
@@ -897,7 +897,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (errors_scrambling > 0) {
|
||||
if (n_trials == 1)
|
||||
printf("errors_scrambling = %d/%d (trial %d)\n", errors_scrambling, available_bits,trial);
|
||||
printf("errors_scrambling = %u/%u (trial %d)\n", errors_scrambling, available_bits,trial);
|
||||
}
|
||||
|
||||
if (errors_bit > 0) {
|
||||
@@ -1019,6 +1019,8 @@ int main(int argc, char **argv)
|
||||
if (input_fd)
|
||||
fclose(input_fd);
|
||||
|
||||
if (scg_fd)
|
||||
fclose(scg_fd);
|
||||
return(n_errors);
|
||||
|
||||
}
|
||||
|
||||
@@ -173,21 +173,27 @@ int main(int argc, char **argv){
|
||||
|
||||
case 'H':
|
||||
channel_model=Rayleigh8;
|
||||
break;
|
||||
|
||||
case 'I':
|
||||
channel_model=Rayleigh1;
|
||||
break;
|
||||
|
||||
case 'J':
|
||||
channel_model=Rayleigh1_corr;
|
||||
break;
|
||||
|
||||
case 'K':
|
||||
channel_model=Rayleigh1_anticorr;
|
||||
break;
|
||||
|
||||
case 'L':
|
||||
channel_model=Rice8;
|
||||
break;
|
||||
|
||||
case 'M':
|
||||
channel_model=Rice1;
|
||||
break;
|
||||
|
||||
case 'N':
|
||||
channel_model=Rayleigh1_800;
|
||||
@@ -721,11 +727,13 @@ int main(int argc, char **argv){
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
printf("SNR %f dB, UE Speed %f km/h: errors %d/%d (delay %f)\n", SNR, ue_speed, prach_errors, n_frames, delay_avg/(double)(n_frames-prach_errors));
|
||||
if (input_fd)
|
||||
break;
|
||||
if (prach_errors)
|
||||
break;
|
||||
|
||||
} // UE Speed loop
|
||||
if (!prach_errors) {
|
||||
printf("PRACH test OK\n");
|
||||
|
||||
@@ -465,7 +465,7 @@ int main(int argc, char **argv)
|
||||
mcs=table1_mcs[actual_payload];
|
||||
else if(nr_bit==2)
|
||||
mcs=table2_mcs[actual_payload];
|
||||
else AssertFatal(1==0,"Either nr_bit %d or sr_flag %d must be non-zero\n");
|
||||
else AssertFatal(1==0,"Either nr_bit %d or sr_flag %d must be non-zero\n", nr_bit, sr_flag);
|
||||
}
|
||||
|
||||
for(SNR=snr0;SNR<=snr1;SNR=SNR+1){
|
||||
|
||||
@@ -402,7 +402,6 @@ int main(int argc, char **argv)
|
||||
rel15_ul->mcs_index = Imcs;
|
||||
rel15_ul->pusch_data.rv_index = rvidx;
|
||||
rel15_ul->nrOfLayers = Nl;
|
||||
//rel15_ul->length_dmrs = length_dmrs;
|
||||
rel15_ul->target_code_rate = code_rate;
|
||||
rel15_ul->pusch_data.tb_size = TBS>>3;
|
||||
///////////////////////////////////////////////////
|
||||
@@ -424,15 +423,6 @@ int main(int argc, char **argv)
|
||||
for (i = 0; i < TBS / 8; i++)
|
||||
test_input[i] = (unsigned char) rand();
|
||||
|
||||
|
||||
/////////////////////////[adk] preparing NR_UE_ULSCH_t parameters///////////////////////// A HOT FIX until creating nfapi_nr_ul_config_ulsch_pdu_rel15_t
|
||||
///////////
|
||||
ulsch_ue->nb_re_dmrs = nb_re_dmrs;
|
||||
ulsch_ue->length_dmrs = length_dmrs;
|
||||
ulsch_ue->rnti = n_rnti;
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////[adk] preparing UL harq_process parameters/////////////////////////
|
||||
///////////
|
||||
NR_UL_UE_HARQ_t *harq_process_ul_ue = ulsch_ue->harq_processes[harq_pid];
|
||||
@@ -442,13 +432,14 @@ int main(int argc, char **argv)
|
||||
|
||||
if (harq_process_ul_ue) {
|
||||
|
||||
harq_process_ul_ue->mcs = Imcs;
|
||||
harq_process_ul_ue->Nl = Nl;
|
||||
harq_process_ul_ue->nb_rb = nb_rb;
|
||||
harq_process_ul_ue->number_of_symbols = nb_symb_sch;
|
||||
harq_process_ul_ue->pusch_pdu.rnti = n_rnti;
|
||||
harq_process_ul_ue->pusch_pdu.mcs_index = Imcs;
|
||||
harq_process_ul_ue->pusch_pdu.nrOfLayers = Nl;
|
||||
harq_process_ul_ue->pusch_pdu.rb_size = nb_rb;
|
||||
harq_process_ul_ue->pusch_pdu.nr_of_symbols = nb_symb_sch;
|
||||
harq_process_ul_ue->num_of_mod_symbols = N_RE_prime*nb_rb*nb_codewords;
|
||||
harq_process_ul_ue->rvidx = rvidx;
|
||||
harq_process_ul_ue->TBS = TBS;
|
||||
harq_process_ul_ue->pusch_pdu.pusch_data.rv_index = rvidx;
|
||||
harq_process_ul_ue->pusch_pdu.pusch_data.tb_size = TBS;
|
||||
harq_process_ul_ue->a = &test_input[0];
|
||||
|
||||
}
|
||||
@@ -461,9 +452,10 @@ int main(int argc, char **argv)
|
||||
|
||||
/////////////////////////ULSCH coding/////////////////////////
|
||||
///////////
|
||||
unsigned int G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs, mod_order, Nl);
|
||||
|
||||
if (input_fd == NULL) {
|
||||
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid);
|
||||
nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid, G);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
@@ -133,7 +133,7 @@ int main(int argc, char **argv)
|
||||
int loglvl = OAILOG_WARNING;
|
||||
uint64_t SSB_positions=0x01;
|
||||
uint16_t nb_symb_sch = 12;
|
||||
int start_symbol = 0;
|
||||
int start_symbol = 2;
|
||||
uint16_t nb_rb = 50;
|
||||
uint8_t Imcs = 9;
|
||||
uint8_t precod_nbr_layers = 1;
|
||||
@@ -548,17 +548,31 @@ int main(int argc, char **argv)
|
||||
uint16_t number_dmrs_symbols = 1;
|
||||
unsigned int available_bits;
|
||||
|
||||
uint8_t nb_re_dmrs=12; // no PUSCH REs
|
||||
uint8_t length_dmrs = 1;
|
||||
uint8_t nb_re_dmrs;
|
||||
unsigned char mod_order;
|
||||
uint16_t code_rate;
|
||||
uint8_t ptrs_mcs1 = 2;
|
||||
uint8_t ptrs_mcs2 = 4;
|
||||
uint8_t ptrs_mcs3 = 10;
|
||||
uint16_t n_rb0 = 25;
|
||||
uint16_t n_rb1 = 75;
|
||||
uint8_t mcs_table = 0;
|
||||
uint16_t pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA; // | PUSCH_PDU_BITMAP_PUSCH_PTRS;
|
||||
|
||||
uint8_t length_dmrs = pusch_len1; // [hna] remove dmrs struct
|
||||
uint16_t l_prime_mask = get_l_prime(nb_symb_sch, typeB, pusch_dmrs_pos0, length_dmrs); // [hna] remove dmrs struct
|
||||
uint8_t ptrs_time_density = get_L_ptrs(ptrs_mcs1, ptrs_mcs2, ptrs_mcs3, Imcs, mcs_table);
|
||||
uint8_t ptrs_freq_density = get_K_ptrs(n_rb0, n_rb1, nb_rb);
|
||||
|
||||
if(1<<ptrs_time_density >= nb_symb_sch)
|
||||
pdu_bit_map &= ~PUSCH_PDU_BITMAP_PUSCH_PTRS; // disable PUSCH PTRS
|
||||
|
||||
for (i = 0; i < nb_symb_sch; i++) {
|
||||
number_dmrs_symbols += (l_prime_mask >> i) & 0x01;
|
||||
}
|
||||
|
||||
mod_order = nr_get_Qm_ul(Imcs, 0);
|
||||
|
||||
code_rate = nr_get_code_rate_ul(Imcs, 0);
|
||||
available_bits = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs, mod_order, 1);
|
||||
TBS = nr_compute_tbs(mod_order, code_rate, nb_rb, nb_symb_sch, nb_re_dmrs*length_dmrs, 0, 0, precod_nbr_layers);
|
||||
|
||||
printf("\n");
|
||||
|
||||
@@ -622,16 +636,16 @@ int main(int argc, char **argv)
|
||||
pusch_pdu->bwp_size = abwp_size;
|
||||
}
|
||||
|
||||
pusch_pdu->pdu_bit_map = PUSCH_PDU_BITMAP_PUSCH_DATA;
|
||||
pusch_pdu->pdu_bit_map = pdu_bit_map;
|
||||
pusch_pdu->rnti = n_rnti;
|
||||
pusch_pdu->mcs_index = Imcs;
|
||||
pusch_pdu->mcs_table = 0;
|
||||
pusch_pdu->mcs_table = mcs_table;
|
||||
pusch_pdu->target_code_rate = code_rate;
|
||||
pusch_pdu->qam_mod_order = mod_order;
|
||||
pusch_pdu->transform_precoding = 1;
|
||||
pusch_pdu->data_scrambling_id = *scc->physCellId;
|
||||
pusch_pdu->nrOfLayers = 1;
|
||||
pusch_pdu->ul_dmrs_symb_pos = (1<<start_symbol);
|
||||
pusch_pdu->ul_dmrs_symb_pos = l_prime_mask << start_symbol;
|
||||
pusch_pdu->dmrs_config_type = 0;
|
||||
pusch_pdu->ul_dmrs_scrambling_id = *scc->physCellId;
|
||||
pusch_pdu->scid = 0;
|
||||
@@ -648,8 +662,11 @@ int main(int argc, char **argv)
|
||||
pusch_pdu->pusch_data.rv_index = 0;
|
||||
pusch_pdu->pusch_data.harq_process_id = 0;
|
||||
pusch_pdu->pusch_data.new_data_indicator = 0;
|
||||
pusch_pdu->pusch_data.tb_size = TBS>>3;
|
||||
pusch_pdu->pusch_data.num_cb = 0;
|
||||
pusch_pdu->pusch_ptrs.ptrs_time_density = ptrs_time_density;
|
||||
pusch_pdu->pusch_ptrs.ptrs_freq_density = ptrs_freq_density;
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list = (nfapi_nr_ptrs_ports_t *) malloc(2*sizeof(nfapi_nr_ptrs_ports_t));
|
||||
pusch_pdu->pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset = 0;
|
||||
|
||||
// prepare ULSCH/PUSCH reception
|
||||
nr_schedule_response(Sched_INFO);
|
||||
@@ -667,47 +684,62 @@ int main(int argc, char **argv)
|
||||
ul_config.slot = slot;
|
||||
ul_config.number_pdus = 1;
|
||||
ul_config.ul_config_list[0].pdu_type = FAPI_NR_UL_CONFIG_TYPE_PUSCH;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.rnti = n_rnti;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_rbs = nb_rb;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_rb = start_rb;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.number_symbols = nb_symb_sch;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.start_symbol = start_symbol;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.mcs = Imcs;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.ndi = 0;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.rv = 0;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.n_layers = precod_nbr_layers;
|
||||
ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.harq_process_nbr = harq_pid;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.rnti = n_rnti;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pdu_bit_map = pdu_bit_map;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.rb_size = nb_rb;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.rb_start = start_rb;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.nr_of_symbols = nb_symb_sch;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.start_symbol_index = start_symbol;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.ul_dmrs_symb_pos = l_prime_mask << start_symbol;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.dmrs_config_type = 0;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.mcs_index = Imcs;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.mcs_table = mcs_table;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.new_data_indicator = 0;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.rv_index = 0;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.nrOfLayers = precod_nbr_layers;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.harq_process_id = harq_pid;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_time_density = ptrs_time_density;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_freq_density = ptrs_freq_density;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_ports_list = (nfapi_nr_ue_ptrs_ports_t *) malloc(2*sizeof(nfapi_nr_ue_ptrs_ports_t));
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_ptrs.ptrs_ports_list[0].ptrs_re_offset = 0;
|
||||
//there are plenty of other parameters that we don't seem to be using for now. e.g.
|
||||
//ul_config.ul_config_list[0].ulsch_config_pdu.ulsch_pdu_rel15.absolute_delta_PUSCH = 0;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.absolute_delta_PUSCH = 0;
|
||||
|
||||
nb_re_dmrs = ((ul_config.ul_config_list[0].pusch_config_pdu.dmrs_config_type == pusch_dmrs_type1) ? 6 : 4);
|
||||
available_bits = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, number_dmrs_symbols, mod_order, 1);
|
||||
TBS = nr_compute_tbs(mod_order, code_rate, nb_rb, nb_symb_sch, nb_re_dmrs * number_dmrs_symbols, 0, 0, precod_nbr_layers);
|
||||
|
||||
<<<<<<< HEAD
|
||||
if (input_fd != NULL) {
|
||||
// set FAPI parameters for UE, put them in the scheduled response and call
|
||||
nr_ue_scheduled_response(&scheduled_response);
|
||||
|
||||
/////////////////////////phy_procedures_nr_ue_TX///////////////////////
|
||||
///////////
|
||||
|
||||
phy_procedures_nrUE_TX(UE, &UE_proc, gNB_id, 0);
|
||||
|
||||
if (n_trials==1)
|
||||
LOG_M("txsig0.m","txs0", UE->common_vars.txdata[0],frame_length_complex_samples,1,1);
|
||||
|
||||
///////////
|
||||
////////////////////////////////////////////////////
|
||||
tx_offset = frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);
|
||||
|
||||
txlev = signal_energy(&UE->common_vars.txdata[0][tx_offset + 5*frame_parms->ofdm_symbol_size + 4*frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0],
|
||||
frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples);
|
||||
|
||||
txlev_float = (double)txlev; // output of signal_energy is fixed point representation
|
||||
|
||||
n_errors = 0;
|
||||
n_false_positive = 0;
|
||||
|
||||
//AWGN
|
||||
sigma_dB = 10*log10(txlev_float)-SNR;
|
||||
sigma = pow(10,sigma_dB/10);
|
||||
}
|
||||
pusch_pdu->pusch_data.tb_size = TBS>>3;
|
||||
ul_config.ul_config_list[0].pusch_config_pdu.pusch_data.tb_size = TBS;
|
||||
// set FAPI parameters for UE, put them in the scheduled response and call
|
||||
nr_ue_scheduled_response(&scheduled_response);
|
||||
|
||||
/////////////////////////phy_procedures_nr_ue_TX///////////////////////
|
||||
///////////
|
||||
|
||||
phy_procedures_nrUE_TX(UE, &UE_proc, gNB_id, 0);
|
||||
|
||||
if (n_trials==1)
|
||||
LOG_M("txsig0.m","txs0", UE->common_vars.txdata[0],frame_length_complex_samples,1,1);
|
||||
|
||||
///////////
|
||||
////////////////////////////////////////////////////
|
||||
tx_offset = frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);
|
||||
|
||||
txlev = signal_energy_amp_shift(&UE->common_vars.txdata[0][tx_offset + 5*frame_parms->ofdm_symbol_size + 4*frame_parms->nb_prefix_samples + frame_parms->nb_prefix_samples0],
|
||||
frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples);
|
||||
|
||||
txlev_float = (double)txlev/(double)AMP; // output of signal_energy is fixed point representation
|
||||
|
||||
n_errors = 0;
|
||||
n_false_positive = 0;
|
||||
|
||||
//AWGN
|
||||
sigma_dB = 10*log10(txlev_float)-SNR;
|
||||
sigma = pow(10,sigma_dB/10);
|
||||
}
|
||||
else n_trials = 1;
|
||||
|
||||
for (trial = 0; trial < n_trials; trial++) {
|
||||
@@ -799,7 +831,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (errors_scrambling > 0) {
|
||||
if (n_trials==1)
|
||||
printf("\x1B[31m""[frame %d][trial %d]\tnumber of errors in unscrambling = %d\n" "\x1B[0m", frame, trial, errors_scrambling);
|
||||
printf("\x1B[31m""[frame %d][trial %d]\tnumber of errors in unscrambling = %u\n" "\x1B[0m", frame, trial, errors_scrambling);
|
||||
}
|
||||
|
||||
for (i = 0; i < TBS; i++) {
|
||||
@@ -817,13 +849,13 @@ int main(int argc, char **argv)
|
||||
if (errors_decoding > 0) {
|
||||
n_false_positive++;
|
||||
if (n_trials==1)
|
||||
printf("\x1B[31m""[frame %d][trial %d]\tnumber of errors in decoding = %d\n" "\x1B[0m", frame, trial, errors_decoding);
|
||||
printf("\x1B[31m""[frame %d][trial %d]\tnumber of errors in decoding = %u\n" "\x1B[0m", frame, trial, errors_decoding);
|
||||
}
|
||||
|
||||
} // trial loop
|
||||
|
||||
printf("*****************************************\n");
|
||||
printf("SNR %f: n_errors (negative CRC) = %d/%d, false_positive %d/%d, errors_scrambling %d/%d\n", SNR, n_errors, n_trials, n_false_positive, n_trials, errors_scrambling, n_trials);
|
||||
printf("SNR %f: n_errors (negative CRC) = %d/%d, false_positive %d/%d, errors_scrambling %u/%d\n", SNR, n_errors, n_trials, n_false_positive, n_trials, errors_scrambling, n_trials);
|
||||
printf("\n");
|
||||
printf("SNR %f: Channel BLER %e, Channel BER %e\n", SNR,(double)n_errors/n_trials,(double)errors_scrambling/available_bits/n_trials);
|
||||
printf("*****************************************\n");
|
||||
@@ -866,5 +898,8 @@ int main(int argc, char **argv)
|
||||
if (input_fd)
|
||||
fclose(input_fd);
|
||||
|
||||
if (scg_fd)
|
||||
fclose(scg_fd);
|
||||
|
||||
return (n_errors);
|
||||
}
|
||||
|
||||
@@ -432,15 +432,6 @@ void multipath_tv_channel(channel_desc_t *desc,
|
||||
/**@} */
|
||||
/**@} */
|
||||
|
||||
void rxAddInput( struct complex16 *input_sig,
|
||||
struct complex16 *after_channel_sig,
|
||||
int rxAnt,
|
||||
channel_desc_t *channelDesc,
|
||||
int nbSamples,
|
||||
uint64_t TS,
|
||||
uint32_t CirSize
|
||||
);
|
||||
|
||||
int modelid_fromname(char *modelname);
|
||||
double channelmod_get_snr_dB(void);
|
||||
double channelmod_get_sinr_dB(void);
|
||||
|
||||
@@ -79,7 +79,6 @@
|
||||
* the key length is 32 bytes (256 bits)
|
||||
*/
|
||||
#define SECURITY_KEY_LENGTH 32
|
||||
#ifndef OCP_FRAMEWORK
|
||||
typedef enum cell_type_e {
|
||||
CELL_MACRO_ENB,
|
||||
CELL_HOME_ENB,
|
||||
@@ -111,7 +110,6 @@ typedef enum cn_domain_s {
|
||||
CN_DOMAIN_PS = 1,
|
||||
CN_DOMAIN_CS = 2
|
||||
} cn_domain_t;
|
||||
#endif
|
||||
|
||||
typedef struct net_ip_address_s {
|
||||
unsigned ipv4:1;
|
||||
@@ -127,7 +125,6 @@ typedef struct ambr_s {
|
||||
bitrate_t br_dl;
|
||||
} ambr_t;
|
||||
|
||||
#ifndef OCP_FRAMEWORK
|
||||
typedef enum priority_level_s {
|
||||
PRIORITY_LEVEL_SPARE = 0,
|
||||
PRIORITY_LEVEL_HIGHEST = 1,
|
||||
@@ -146,7 +143,6 @@ typedef enum pre_emp_vulnerability_e {
|
||||
PRE_EMPTION_VULNERABILITY_DISABLED = 1,
|
||||
PRE_EMPTION_VULNERABILITY_MAX,
|
||||
} pre_emp_vulnerability_t;
|
||||
#endif
|
||||
|
||||
typedef struct allocation_retention_priority_s {
|
||||
priority_level_t priority_level;
|
||||
|
||||
@@ -31,6 +31,9 @@
|
||||
* \warning this is a warning
|
||||
*/
|
||||
|
||||
#ifndef __DOCS_TEMPLATES_CODE_EXAMPLE_DOXY__H__
|
||||
#define __DOCS_TEMPLATES_CODE_EXAMPLE_DOXY__H__
|
||||
|
||||
//-----------------------------------begin group-----------------------------
|
||||
|
||||
|
||||
@@ -138,3 +141,4 @@ struct frame {
|
||||
int init(int src, int dst);
|
||||
|
||||
//-----------------------end func proto-------------------
|
||||
#endif
|
||||
|
||||
@@ -1579,10 +1579,6 @@ int flexran_agent_unregister_mac_xface(mid_t mod_id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
AGENT_MAC_xface *flexran_agent_get_mac_xface(mid_t mod_id)
|
||||
{
|
||||
return agent_mac_xface[mod_id];
|
||||
}
|
||||
|
||||
void flexran_create_config_structures(mid_t mod_id)
|
||||
{
|
||||
|
||||
@@ -921,7 +921,4 @@ int flexran_agent_unregister_rrc_xface(mid_t mod_id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
AGENT_RRC_xface *flexran_agent_get_rrc_xface(mid_t mod_id)
|
||||
{
|
||||
return agent_rrc_xface[mod_id];
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#ifndef __ENB_APP_L1_PARAMDEF__H__
|
||||
#define __ENB_APP_L1_PARAMDEF__H__
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -114,3 +116,5 @@
|
||||
#define L1_PUCCH1_DTX_EMTC3_THRESHOLD_IDX 22
|
||||
#define L1_PUCCH1AB_DTX_EMTC3_THRESHOLD_IDX 23
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __ENB_APP_MACRLC_PARAMDEF__H__
|
||||
#define __ENB_APP_MACRLC_PARAMDEF__H__
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -104,3 +106,5 @@
|
||||
#define MACRLC_PUSCH10xSNR_IDX 18
|
||||
#define MACRLC_PUCCH10xSNR_IDX 19
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#endif
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user