Merge remote-tracking branch 'origin/develop-nr_cppcheck' into integration-develop-nr-2020w02
This commit is contained in:
@@ -43,6 +43,7 @@ openairinterface5g
|
|||||||
|
|
||||||
RELEASE NOTES:
|
RELEASE NOTES:
|
||||||
|
|
||||||
|
v1.1.1 -> November 2019. Bug fix in the TDD Fair Round-Robin scheduler
|
||||||
v1.1.0 -> July 2019. This version adds the following implemented features:
|
v1.1.0 -> July 2019. This version adds the following implemented features:
|
||||||
* Experimental support of LTE-M
|
* Experimental support of LTE-M
|
||||||
- Single LTE-M UE attachment, legacy-LTE UE attachment is disabled
|
- Single LTE-M UE attachment, legacy-LTE UE attachment is disabled
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
enb_*.log
|
||||||
|
ue_*.log
|
||||||
|
ping_*.*
|
||||||
|
iperf_*.*
|
||||||
|
phones_list.txt
|
||||||
|
modules_list.txt
|
||||||
|
test_results*.html
|
||||||
@@ -0,0 +1,421 @@
|
|||||||
|
#!/bin/groovy
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Abstraction function to send social media messages:
|
||||||
|
// like on Slack or Mattermost
|
||||||
|
def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) {
|
||||||
|
if (params.pipelineUsesSlack != null) {
|
||||||
|
if (params.pipelineUsesSlack) {
|
||||||
|
slackSend channel: pipeChannel, color: pipeColor, message: pipeMessage
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Location of the test XML file to be run
|
||||||
|
def testXMLFile = params.pythonTestXmlFile
|
||||||
|
def mainPythonAllXmlFiles = ""
|
||||||
|
def buildStageStatus = true
|
||||||
|
|
||||||
|
// Name of the test stage
|
||||||
|
def testStageName = params.pipelineTestStageName
|
||||||
|
|
||||||
|
// Name of the branch to work on
|
||||||
|
def ranRepoBranch = params.pythonWorkingBranch
|
||||||
|
|
||||||
|
// Lease booking parameters
|
||||||
|
def r2labStartTime = params.R2LAB_LeaseBookStartTime
|
||||||
|
def r2labDuration = params.R2LAB_LeaseBookDuration
|
||||||
|
|
||||||
|
|
||||||
|
// Fixed deployment
|
||||||
|
def r2labBaseIpAddr = '192.168.3.'
|
||||||
|
def r2labPythonExeIdx = '14'
|
||||||
|
def r2labPythonExe = 'fit' + r2labPythonExeIdx
|
||||||
|
def r2labENB0Idx = '23'
|
||||||
|
def r2labENB0 = 'fit' + r2labENB0Idx
|
||||||
|
def r2labENB0IpAddr = r2labBaseIpAddr + r2labENB0Idx
|
||||||
|
def r2labEPC0Idx = '17'
|
||||||
|
def r2labEPC0 = 'fit' + r2labEPC0Idx
|
||||||
|
def r2labEPC0IpAddr = r2labBaseIpAddr + r2labEPC0Idx
|
||||||
|
def r2labUE0Idx = '6'
|
||||||
|
def r2labUE0 = 'fit0' + r2labUE0Idx
|
||||||
|
def r2labUE0IpAddr = r2labBaseIpAddr + r2labUE0Idx
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label 'master'
|
||||||
|
}
|
||||||
|
|
||||||
|
options {
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
timestamps()
|
||||||
|
ansiColor('xterm')
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage ("Book session") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
||||||
|
|
||||||
|
def allParametersPresent = true
|
||||||
|
if (params.R2LAB_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.R2LAB_FitNode_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.R2LAB_LeaseBookStartTime == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.R2LAB_LeaseBookDuration == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
|
||||||
|
// If not present picking a default Stage Name
|
||||||
|
if (params.pipelineTestStageName == null) {
|
||||||
|
// picking default
|
||||||
|
testStageName = 'Tests at Inria R2LAB'
|
||||||
|
}
|
||||||
|
// If not present picking a default branch name
|
||||||
|
if (params.pythonWorkingBranch == null) {
|
||||||
|
ranRepoBranch = 'develop'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.pythonTestXmlFile == null) {
|
||||||
|
// picking default
|
||||||
|
testXMLFile = 'xml_files/inria/enb_usrp210_band7_build.xml'
|
||||||
|
echo "Test XML file(default): ${testXMLFile}"
|
||||||
|
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
|
||||||
|
} else {
|
||||||
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||||
|
echo "Test XML file : ${xmlFile}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!allParametersPresent) {
|
||||||
|
currentBuild.result = 'ABORTED'
|
||||||
|
error('Stopping early because no R2LAB credentials')
|
||||||
|
}
|
||||||
|
|
||||||
|
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --rfc-3339=seconds | sed -e "s#+00:00##"'
|
||||||
|
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mBook a Session\u001B[0m'
|
||||||
|
|
||||||
|
BOOK_TIMESTAMP = sh returnStdout: true, script: 'date --rfc-3339=date'
|
||||||
|
BOOK_TIMESTAMP = BOOK_TIMESTAMP.trim()
|
||||||
|
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_Credentials}", usernameVariable: 'r2labuser', passwordVariable: 'r2labpassword']
|
||||||
|
]) {
|
||||||
|
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}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Load Images") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
echo '\u2705 \u001B[32mLoad Image for Python Executor\u001B[0m'
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labPythonExeIdx} > /dev/null 2>&1'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labPythonExeIdx}'"
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mLoad Image for one eNB\u001B[0m'
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labENB0Idx} > /dev/null 2>&1'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labENB0Idx}'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'uon ${r2labENB0Idx}'"
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mLoad Image for one OAI UE\u001B[0m'
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labUE0Idx} > /dev/null 2>&1'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labUE0Idx}'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'uon ${r2labUE0Idx}'"
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mLoad Image for one EPC\u001B[0m'
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-epc ${r2labEPC0Idx} > /dev/null 2>&1'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labEPC0Idx}'"
|
||||||
|
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'nodes ${r2labUE0Idx},${r2labPythonExeIdx},${r2labEPC0Idx},${r2labENB0Idx} && st'"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Prepare Python Executor") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g && git fetch --all --prune --quiet\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g && git checkout --quiet ${ranRepoBranch}\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g && git pull --quiet origin ${ranRepoBranch}\"'"
|
||||||
|
GIT_COMMIT_TO_RUN = sh returnStdout: true, script: "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g && git log -n1 --pretty=format:%H\"' | grep -v fit"
|
||||||
|
GIT_COMMIT_TO_RUN = GIT_COMMIT_TO_RUN.trim()
|
||||||
|
echo "Latest commit to use is ${GIT_COMMIT_TO_RUN}"
|
||||||
|
|
||||||
|
// Putting the adaptation parameters for the OAI UE
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp /home/inria_oaici/for-ci/adapt_usim_parameters_${r2labUE0}.sed ${fituser}@${r2labUE0}:/tmp/adapt_usim_parameters.sed'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp /home/inria_oaici/for-ci/phones_list.txt ${fituser}@${r2labEPC0}:/tmp'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S cp /tmp/phones_list.txt /etc/ci\"'"
|
||||||
|
|
||||||
|
// Out of rload, the sub-network-interfaces are not up
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ifconfig control:m11 172.16.1.102 up\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ifconfig control:m10 192.168.10.110 up\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ifconfig control:sxu 172.55.55.102 up\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ifconfig control:s1u 192.168.248.159 up\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ifconfig control:sxc 172.55.55.101 up\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ifconfig control:s5c 172.58.58.102 up\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ifconfig control:p5c 172.58.58.101 up\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ifconfig control:s11 172.16.1.104 up\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"ifconfig\"'"
|
||||||
|
|
||||||
|
// Adding routes on the EPC
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ip route add default via 192.168.3.100 dev control table lte\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ip rule add from 12.0.0.0/8 table lte\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labEPC0} \"echo ${fitpasswd} | sudo -S ip rule add from 12.1.1.0/8 table lte\"'"
|
||||||
|
|
||||||
|
// Adding a route on the eNB for the S1U interface
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labENB0} \"echo ${fitpasswd} | sudo -S ip route add 192.168.248.0/24 via ${r2labEPC0IpAddr} dev control\"'"
|
||||||
|
|
||||||
|
// For the moment, simple way to route traffic from python executor to any UEs
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'ssh -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"echo ${fitpasswd} | sudo -S ip route add 12.1.1.0/24 via ${r2labEPC0IpAddr} dev control\"'"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Build and Test") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=InitiateHtml --ranRepository=https://gitlab.eurecom.fr/oai/openairinterface5g --ranBranch=${ranRepoBranch} --ranCommitID=${GIT_COMMIT_TO_RUN} --ranAllowMerge=false --ADBIPAddress=${r2labEPC0IpAddr} --ADBUserName=${fituser} --ADBPassword=${fitpasswd} --ADBType=distributed ${mainPythonAllXmlFiles}\"'"
|
||||||
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
try {
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=TesteNB --ranRepository=https://gitlab.eurecom.fr/oai/openairinterface5g --ranBranch=${ranRepoBranch} --ranCommitID=${GIT_COMMIT_TO_RUN} --ranAllowMerge=false --eNBIPAddress=${r2labENB0IpAddr} --eNBUserName=${fituser} --eNBPassword=${fitpasswd} --eNBSourceCodePath=/home/${fituser}/openairinterface5g --UEIPAddress=${r2labUE0IpAddr} --UEUserName=${fituser} --UEPassword=${fitpasswd} --UESourceCodePath=/home/${fituser}/openairinterface5g --EPCIPAddress=${r2labEPC0IpAddr} --EPCType=OAI-Rel14-CUPS --EPCUserName=${fituser} --EPCPassword=${fitpasswd} --EPCSourceCodePath=/home/${fituser}/openair-cn --ADBIPAddress=${r2labEPC0IpAddr} --ADBUserName=${fituser} --ADBPassword=${fitpasswd} --ADBType=distributed --XMLTestFile=${xmlFile}\"'"
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
buildStageStatus = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${r2labENB0IpAddr} --eNBUserName=${fituser} --eNBPassword=${fitpasswd}\"'"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Prepare Log Collection") {
|
||||||
|
steps {
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'mkdir -p /home/inria_oaici/archives'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'touch /home/inria_oaici/archives/no_error.txt'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'rm -f /home/inria_oaici/archives/*.*'"
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp ${fituser}@${r2labPythonExe}:/home/${fituser}/openairinterface5g/ci-scripts/test_results.html /home/inria_oaici/archives'"
|
||||||
|
}
|
||||||
|
sh "scp inria_oaici@faraday.inria.fr:/home/inria_oaici/archives/test_results.html ."
|
||||||
|
script {
|
||||||
|
if(fileExists("./test_results.html")) {
|
||||||
|
sh "mv ./test_results.html test_results-${JOB_NAME}.html"
|
||||||
|
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' -e 's#TEMPLATE_BUILD_TIME#${JOB_TIMESTAMP}#' test_results-${JOB_NAME}.html"
|
||||||
|
archiveArtifacts "test_results-${JOB_NAME}.html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Log Collection") {
|
||||||
|
parallel {
|
||||||
|
stage('Log Collection (OAI eNB - Build)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (OAI eNB - Build)\u001B[0m'
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=LogCollectBuild --eNBIPAddress=${r2labENB0IpAddr} --eNBUserName=${fituser} --eNBPassword=${fitpasswd} --eNBSourceCodePath=/home/${fituser}/openairinterface5g\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp ${fituser}@${r2labENB0}:/home/${fituser}/openairinterface5g/cmake_targets/build.log.zip /home/inria_oaici/archives/enb.build.log.zip'"
|
||||||
|
}
|
||||||
|
sh "scp inria_oaici@faraday.inria.fr:/home/inria_oaici/archives/enb.build.log.zip enb.build.log.${env.BUILD_ID}.zip"
|
||||||
|
script {
|
||||||
|
if(fileExists("enb.build.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "enb.build.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (OAI UE - Build)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m'
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=LogCollectBuild --UEIPAddress=${r2labUE0IpAddr} --UEUserName=${fituser} --UEPassword=${fitpasswd} --UESourceCodePath=/home/${fituser}/openairinterface5g\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp ${fituser}@${r2labUE0}:/home/${fituser}/openairinterface5g/cmake_targets/build.log.zip /home/inria_oaici/archives/ue.build.log.zip'"
|
||||||
|
}
|
||||||
|
sh "scp inria_oaici@faraday.inria.fr:/home/inria_oaici/archives/ue.build.log.zip ue.build.log.${env.BUILD_ID}.zip"
|
||||||
|
script {
|
||||||
|
if(fileExists("ue.build.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "ue.build.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (OAI eNB - Runs)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (OAI eNB - Runs)\u001B[0m'
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=LogCollecteNB --eNBIPAddress=${r2labENB0IpAddr} --eNBUserName=${fituser} --eNBPassword=${fitpasswd} --eNBSourceCodePath=/home/${fituser}/openairinterface5g\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp ${fituser}@${r2labENB0}:/home/${fituser}/openairinterface5g/cmake_targets/enb.log.zip /home/inria_oaici/archives/enb.run.log.zip'"
|
||||||
|
}
|
||||||
|
sh "scp inria_oaici@faraday.inria.fr:/home/inria_oaici/archives/enb.run.log.zip enb.run.log.${env.BUILD_ID}.zip"
|
||||||
|
script {
|
||||||
|
if(fileExists("enb.run.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "enb.run.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (OAI UE - Runs)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (OAI UE - Runs)\u001B[0m'
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=LogCollectOAIUE --UEIPAddress=${r2labUE0IpAddr} --UEUserName=${fituser} --UEPassword=${fitpasswd} --UESourceCodePath=/home/${fituser}/openairinterface5g\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp ${fituser}@${r2labUE0}:/home/${fituser}/openairinterface5g/cmake_targets/ue.log.zip /home/inria_oaici/archives/ue.run.log.zip'"
|
||||||
|
}
|
||||||
|
sh "scp inria_oaici@faraday.inria.fr:/home/inria_oaici/archives/ue.run.log.zip ue.run.log.${env.BUILD_ID}.zip"
|
||||||
|
script {
|
||||||
|
if(fileExists("ue.run.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "ue.run.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (MME)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (MME)\u001B[0m'
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=LogCollectMME --EPCIPAddress=${r2labEPC0IpAddr} --EPCUserName=${fituser} --EPCPassword=${fitpasswd} --EPCSourceCodePath=/home/${fituser}/openair-cn --EPCType=OAI-Rel14-CUPS\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp ${fituser}@${r2labEPC0}:/home/${fituser}/openair-cn/scripts/mme.log.zip /home/inria_oaici/archives/mme.log.zip'"
|
||||||
|
}
|
||||||
|
sh "scp inria_oaici@faraday.inria.fr:/home/inria_oaici/archives/mme.log.zip mme.log.${env.BUILD_ID}.zip"
|
||||||
|
script {
|
||||||
|
if(fileExists("mme.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "mme.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (HSS)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (HSS)\u001B[0m'
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=LogCollectHSS --EPCIPAddress=${r2labEPC0IpAddr} --EPCUserName=${fituser} --EPCPassword=${fitpasswd} --EPCSourceCodePath=/home/${fituser}/openair-cn --EPCType=OAI-Rel14-CUPS\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp ${fituser}@${r2labEPC0}:/home/${fituser}/openair-cn/scripts/hss.log.zip /home/inria_oaici/archives/hss.log.zip'"
|
||||||
|
}
|
||||||
|
sh "scp inria_oaici@faraday.inria.fr:/home/inria_oaici/archives/hss.log.zip hss.log.${env.BUILD_ID}.zip"
|
||||||
|
script {
|
||||||
|
if(fileExists("hss.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "hss.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (SPGW)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (SPGW)\u001B[0m'
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=LogCollectSPGW --EPCIPAddress=${r2labEPC0IpAddr} --EPCUserName=${fituser} --EPCPassword=${fitpasswd} --EPCSourceCodePath=/home/${fituser}/openair-cn --EPCType=OAI-Rel14-CUPS\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp ${fituser}@${r2labEPC0}:/home/${fituser}/openair-cn/scripts/spgw.log.zip /home/inria_oaici/archives/spgw.log.zip'"
|
||||||
|
}
|
||||||
|
sh "scp inria_oaici@faraday.inria.fr:/home/inria_oaici/archives/spgw.log.zip spgw.log.${env.BUILD_ID}.zip"
|
||||||
|
script {
|
||||||
|
if(fileExists("spgw.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "spgw.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (Ping)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m'
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=LogCollectPing --EPCIPAddress=${r2labEPC0IpAddr} --EPCUserName=${fituser} --EPCPassword=${fitpasswd} --EPCSourceCodePath=/home/${fituser}/openair-cn --EPCType=OAI-Rel14-CUPS\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp ${fituser}@${r2labEPC0}:/home/${fituser}/openair-cn/scripts/ping.log.zip /home/inria_oaici/archives/ping.log.zip'"
|
||||||
|
}
|
||||||
|
sh "scp inria_oaici@faraday.inria.fr:/home/inria_oaici/archives/ping.log.zip ping.log.${env.BUILD_ID}.zip"
|
||||||
|
script {
|
||||||
|
if(fileExists("ping.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "ping.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (Iperf)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.R2LAB_FitNode_Credentials}", usernameVariable: 'fituser', passwordVariable: 'fitpasswd']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (Iperf)\u001B[0m'
|
||||||
|
sh "ssh -t -t inria_oaici@faraday.inria.fr 'ssh -t -t -b 192.168.3.100 ${fituser}@${r2labPythonExe} \"cd openairinterface5g/ci-scripts && python3 main.py --mode=LogCollectIperf --EPCIPAddress=${r2labEPC0IpAddr} --EPCUserName=${fituser} --EPCPassword=${fitpasswd} --EPCSourceCodePath=/home/${fituser}/openair-cn --EPCType=OAI-Rel14-CUPS\"'"
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'scp ${fituser}@${r2labEPC0}:/home/${fituser}/openair-cn/scripts/iperf.log.zip /home/inria_oaici/archives/iperf.log.zip'"
|
||||||
|
}
|
||||||
|
sh "scp inria_oaici@faraday.inria.fr:/home/inria_oaici/archives/iperf.log.zip iperf.log.${env.BUILD_ID}.zip"
|
||||||
|
script {
|
||||||
|
if(fileExists("iperf.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "iperf.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Clean-up Log Collection") {
|
||||||
|
steps {
|
||||||
|
sh "ssh -t inria_oaici@faraday.inria.fr 'rm -Rf /home/inria_oaici/archives'"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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"'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+421
-130
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@
|
|||||||
<htmlTabRef>test-05-tm2</htmlTabRef>
|
<htmlTabRef>test-05-tm2</htmlTabRef>
|
||||||
<htmlTabName>Test-05MHz-TM2</htmlTabName>
|
<htmlTabName>Test-05MHz-TM2</htmlTabName>
|
||||||
<htmlTabIcon>tasks</htmlTabIcon>
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
<repeatCount>2</repeatCount>
|
<repeatCount>3</repeatCount>
|
||||||
<TestCaseRequestedList>
|
<TestCaseRequestedList>
|
||||||
030201
|
030201
|
||||||
040101
|
040101
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
<testCase id="030105">
|
<testCase id="030105">
|
||||||
<class>Initialize_eNB</class>
|
<class>Initialize_eNB</class>
|
||||||
<desc>Initialize eNB (TDD/Band40/5MHz)</desc>
|
<desc>Initialize eNB (TDD/Band40/5MHz)</desc>
|
||||||
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm2.25PRB.FairScheduler.usrpb210.conf --MACRLCs.[0].scheduler_mode default</Initialize_eNB_args>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="030201">
|
<testCase id="030201">
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<TestCaseRequestedList>
|
<TestCaseRequestedList>
|
||||||
030201
|
030201
|
||||||
040101
|
040101
|
||||||
030124 040301 040521 040622 040621 040623 040624 040625 040662 040661 040663 040664 040665 040401 040201 030201
|
030124 040301 040521 040622 040621 040623 040662 040401 040201 030201
|
||||||
</TestCaseRequestedList>
|
</TestCaseRequestedList>
|
||||||
<TestCaseExclusionList></TestCaseExclusionList>
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,150 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>test-20-tm1-defSched</htmlTabRef>
|
||||||
|
<htmlTabName>Test-20MHz-TM1-default-scheduler</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
030201
|
||||||
|
040101
|
||||||
|
030125 040301 040522 040627 040626 040628 040629 040630 040667 040666 040668 040669 040670 040401 040201 030201
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="030125">
|
||||||
|
<class>Initialize_eNB</class>
|
||||||
|
<desc>Initialize eNB (TDD/Band40/20MHz/info)</desc>
|
||||||
|
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band40.tm1.100PRB.FairScheduler.usrpb210.conf --MACRLCs.[0].scheduler_mode default</Initialize_eNB_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030201">
|
||||||
|
<class>Terminate_eNB</class>
|
||||||
|
<desc>Terminate eNB</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040101">
|
||||||
|
<class>Initialize_UE</class>
|
||||||
|
<desc>Initialize UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040201">
|
||||||
|
<class>Terminate_UE</class>
|
||||||
|
<desc>Terminate UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040301">
|
||||||
|
<class>Attach_UE</class>
|
||||||
|
<desc>Attach UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040401">
|
||||||
|
<class>Detach_UE</class>
|
||||||
|
<desc>Detach UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040522">
|
||||||
|
<class>Ping</class>
|
||||||
|
<desc>ping (20MHz - 20 sec)</desc>
|
||||||
|
<ping_args>-c 20</ping_args>
|
||||||
|
<ping_packetloss_threshold>25</ping_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040626">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (20MHz - DL/27.5Mbps/UDP)(30 sec)(balanced)</desc>
|
||||||
|
<iperf_args>-u -b 27.5M -t 30 -i 1</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>balanced</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040627">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (20MHz - DL/27.5Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||||
|
<iperf_args>-u -b 27.5M -t 30 -i 1</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>single-ue</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040628">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (20MHz - DL/27.5Mbps/UDP)(30 sec)(unbalanced)</desc>
|
||||||
|
<iperf_args>-u -b 27.5M -t 30 -i 1</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>unbalanced</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040629">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (20MHz - DL/TCP)(30 sec)(single-ue)</desc>
|
||||||
|
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>single-ue</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040630">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (20MHz - DL/TCP)(30 sec)</desc>
|
||||||
|
<iperf_args>-t 30 -i 1 -fm</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040666">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (20MHz - UL/7Mbps/UDP)(30 sec)(balanced)</desc>
|
||||||
|
<iperf_args>-u -b 7M -t 30 -i 1 -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>balanced</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040667">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (20MHz - UL/7Mbps/UDP)(30 sec)(single-ue)</desc>
|
||||||
|
<iperf_args>-u -b 7M -t 30 -i 1 -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>single-ue</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040668">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (20MHz - UL/7Mbps/UDP)(30 sec)(unbalanced)</desc>
|
||||||
|
<iperf_args>-u -b 7M -t 30 -i 1 -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>unbalanced</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040669">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (20MHz - UL/TCP)(30 sec)(single-ue)</desc>
|
||||||
|
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>single-ue</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040670">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (20MHz - UL/TCP)(30 sec)</desc>
|
||||||
|
<iperf_args>-t 30 -i 1 -fm -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -56,7 +56,6 @@
|
|||||||
<testCase id="040302">
|
<testCase id="040302">
|
||||||
<class>Attach_UE</class>
|
<class>Attach_UE</class>
|
||||||
<desc>Attach UE</desc>
|
<desc>Attach UE</desc>
|
||||||
<nbMaxUEtoAttach>1</nbMaxUEtoAttach>
|
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
<testCase id="040401">
|
<testCase id="040401">
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<testCase id="030125">
|
<testCase id="030125">
|
||||||
<class>Initialize_eNB</class>
|
<class>Initialize_eNB</class>
|
||||||
<desc>Initialize RCC (TDD/Band40/20MHz/info)</desc>
|
<desc>Initialize RCC (TDD/Band40/20MHz/info)</desc>
|
||||||
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf</Initialize_eNB_args>
|
<Initialize_eNB_args>-O ci-scripts/conf_files/rcc.band40.tm1.100PRB.FairScheduler.usrpb210.conf --MACRLCs.[0].scheduler_mode default</Initialize_eNB_args>
|
||||||
<eNB_instance>1</eNB_instance>
|
<eNB_instance>1</eNB_instance>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>epc-start-oai-ue</htmlTabRef>
|
||||||
|
<htmlTabName>EPC-Start-OAI-UE</htmlTabName>
|
||||||
|
<htmlTabIcon>log-in</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
050101 000001 060101 000001 070101
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="050101">
|
||||||
|
<class>Initialize_HSS</class>
|
||||||
|
<desc>Initialize HSS</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="060101">
|
||||||
|
<class>Initialize_MME</class>
|
||||||
|
<desc>Initialize MME</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="070101">
|
||||||
|
<class>Initialize_SPGW</class>
|
||||||
|
<desc>Initialize SPGW</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>epc-closure</htmlTabRef>
|
||||||
|
<htmlTabName>EPC-Closure</htmlTabName>
|
||||||
|
<htmlTabIcon>log-out</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
050201 060201 070201
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="050201">
|
||||||
|
<class>Terminate_HSS</class>
|
||||||
|
<desc>Terminate HSS</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="060201">
|
||||||
|
<class>Terminate_MME</class>
|
||||||
|
<desc>Terminate MME</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="070201">
|
||||||
|
<class>Terminate_SPGW</class>
|
||||||
|
<desc>Terminate SPGW</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>terminate-enb-oai-ue</htmlTabRef>
|
||||||
|
<htmlTabName>Terminate-all-eNBs-OAI-UEs</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
030201 090109
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="030201">
|
||||||
|
<class>Terminate_eNB</class>
|
||||||
|
<desc>Terminate eNB</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="090109">
|
||||||
|
<class>Terminate_OAI_UE</class>
|
||||||
|
<desc>Terminate OAI UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>test-05-tm1-oai-ue</htmlTabRef>
|
||||||
|
<htmlTabName>Test-05MHz-TM1-OAI-UE</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<repeatCount>4</repeatCount>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
030201 090109
|
||||||
|
030102 000001 090102 000002 040503 000002 040603 040604 040643 040644 000002 090109 000001 030201
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep for 10 sec</desc>
|
||||||
|
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000002">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep for 3 sec</desc>
|
||||||
|
<idle_sleep_time_in_sec>3</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030201">
|
||||||
|
<class>Terminate_eNB</class>
|
||||||
|
<desc>Terminate eNB</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="090102">
|
||||||
|
<class>Initialize_OAI_UE</class>
|
||||||
|
<desc>Initialize OAI UE (FDD/Band7/5MHz)</desc>
|
||||||
|
<Initialize_OAI_UE_args>-C 2680000000 -r 25 --ue-rxgain 130 --ue-txgain 1 --ue-max-power -6 --ue-scan-carrier --nokrnmod 1</Initialize_OAI_UE_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="090109">
|
||||||
|
<class>Terminate_OAI_UE</class>
|
||||||
|
<desc>Terminate OAI UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040503">
|
||||||
|
<class>Ping</class>
|
||||||
|
<desc>ping (5MHz - 20 sec)</desc>
|
||||||
|
<ping_args>-I 192.168.248.159 -c 20</ping_args>
|
||||||
|
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040603">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-u -b 1M -t 30 -i 1 -fm</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040604">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - DL/12Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-u -b 12M -t 30 -i 1 -fm</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040643">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-u -b 1M -t 30 -i 1 -fm -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040644">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-u -b 2M -t 30 -i 1 -fm -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>test-05-tm1-nos1-tunnel</htmlTabRef>
|
||||||
|
<htmlTabName>Test-05MHz-TM1-noS1-tunnel</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<repeatCount>2</repeatCount>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
030201 090109
|
||||||
|
030101 000001 090101 000002 040501 040502 000001 040601 040602 040641 040642 000001 090109 030201
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000002">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>5</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000003">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>60</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030201">
|
||||||
|
<class>Terminate_eNB</class>
|
||||||
|
<desc>Terminate eNB</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="090101">
|
||||||
|
<class>Initialize_OAI_UE</class>
|
||||||
|
<desc>Initialize OAI UE (FDD/Band7/5MHz)</desc>
|
||||||
|
<Initialize_OAI_UE_args>-C 2680000000 -r 25 --ue-rxgain 130 --ue-txgain 1 --ue-max-power -6 --ue-scan-carrier --nokrnmod 1 --noS1</Initialize_OAI_UE_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="090109">
|
||||||
|
<class>Terminate_OAI_UE</class>
|
||||||
|
<desc>Terminate OAI UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040501">
|
||||||
|
<class>Ping</class>
|
||||||
|
<desc>ping (5MHz - 20 sec)(from eNB to OAI UE)</desc>
|
||||||
|
<ping_args>-I oaitun_enb1 -c 20 10.0.1.2</ping_args>
|
||||||
|
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040502">
|
||||||
|
<class>Ping</class>
|
||||||
|
<desc>ping (5MHz - 20 sec)(from OAI UE to eNB)</desc>
|
||||||
|
<ping_args>-I oaitun_ue1 -c 20 10.0.1.1</ping_args>
|
||||||
|
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040601">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-c 10.0.1.2 -u -b 1M -t 30 -i 1 -fm -B 10.0.1.1</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040602">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - DL/10Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-c 10.0.1.2 -u -b 10M -t 30 -i 1 -fm -B 10.0.1.1</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040641">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-c 10.0.1.1 -u -b 1M -t 30 -i 1 -fm -B 10.0.1.2 -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>balanced</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040642">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-c 10.0.1.1 -u -b 2M -t 30 -i 1 -fm -B 10.0.1.2 -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
<iperf_profile>balanced</iperf_profile>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>build-tab-enb0</htmlTabRef>
|
||||||
|
<htmlTabName>Build eNB0</htmlTabName>
|
||||||
|
<htmlTabIcon>wrench</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
010101
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="010101">
|
||||||
|
<class>Build_eNB</class>
|
||||||
|
<desc>Build eNB (USRP)</desc>
|
||||||
|
<Build_eNB_args>-w USRP -c --eNB</Build_eNB_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>epc-start</htmlTabRef>
|
||||||
|
<htmlTabName>EPC-Start</htmlTabName>
|
||||||
|
<htmlTabIcon>log-in</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
050102 000001 060102 000001 070102
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep</desc>
|
||||||
|
<idle_sleep_time_in_sec>20</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="050102">
|
||||||
|
<class>Initialize_HSS</class>
|
||||||
|
<desc>Initialize HSS</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="060102">
|
||||||
|
<class>Initialize_MME</class>
|
||||||
|
<desc>Initialize MME</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="070102">
|
||||||
|
<class>Initialize_SPGW</class>
|
||||||
|
<desc>Initialize SPGW</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>epc-stop</htmlTabRef>
|
||||||
|
<htmlTabName>EPC-Stop</htmlTabName>
|
||||||
|
<htmlTabIcon>log-out</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
050201 060201 070201
|
||||||
|
040101
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="050201">
|
||||||
|
<class>Terminate_HSS</class>
|
||||||
|
<desc>Terminate HSS</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="060201">
|
||||||
|
<class>Terminate_MME</class>
|
||||||
|
<desc>Terminate MME</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="070201">
|
||||||
|
<class>Terminate_SPGW</class>
|
||||||
|
<desc>Terminate SPGW</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040101">
|
||||||
|
<class>Initialize_UE</class>
|
||||||
|
<desc>Initialize UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
030102 000002 040301 000002 040504 040605 040606 040645 040646 000001 040401 000002 030201
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>test-05-tm1</htmlTabRef>
|
||||||
|
<htmlTabName>Test-05MHz-TM1</htmlTabName>
|
||||||
|
<htmlTabIcon>tasks</htmlTabIcon>
|
||||||
|
<repeatCount>2</repeatCount>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
030201 040101
|
||||||
|
030102 000002 040301 000002 040504 000001 040401 000002 030201
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="040101">
|
||||||
|
<class>Initialize_UE</class>
|
||||||
|
<desc>Initialize UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000001">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep for 10 sec</desc>
|
||||||
|
<idle_sleep_time_in_sec>10</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="000002">
|
||||||
|
<class>IdleSleep</class>
|
||||||
|
<desc>Sleep for 3 sec</desc>
|
||||||
|
<idle_sleep_time_in_sec>3</idle_sleep_time_in_sec>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<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>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="030201">
|
||||||
|
<class>Terminate_eNB</class>
|
||||||
|
<desc>Terminate eNB</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040301">
|
||||||
|
<class>Attach_UE</class>
|
||||||
|
<desc>Attach UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040401">
|
||||||
|
<class>Detach_UE</class>
|
||||||
|
<desc>Detach UE</desc>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040504">
|
||||||
|
<class>Ping</class>
|
||||||
|
<desc>ping (5MHz - 20 sec)</desc>
|
||||||
|
<ping_args>-I 192.168.248.159 -c 20</ping_args>
|
||||||
|
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040605">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - DL/1Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-u -b 1M -t 30 -i 1 -fm</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040606">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - DL/12Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-u -b 12M -t 30 -i 1 -fm</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040645">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - UL/1Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-u -b 1M -t 30 -i 1 -fm -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase id="040646">
|
||||||
|
<class>Iperf</class>
|
||||||
|
<desc>iperf (5MHz - UL/2Mbps/UDP)(30 sec)</desc>
|
||||||
|
<iperf_args>-u -b 2M -t 30 -i 1 -fm -R</iperf_args>
|
||||||
|
<iperf_packetloss_threshold>50</iperf_packetloss_threshold>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>build-tab-ue0</htmlTabRef>
|
||||||
|
<htmlTabName>Build UE0</htmlTabName>
|
||||||
|
<htmlTabIcon>wrench</htmlTabIcon>
|
||||||
|
<TestCaseRequestedList>
|
||||||
|
090101
|
||||||
|
</TestCaseRequestedList>
|
||||||
|
<TestCaseExclusionList></TestCaseExclusionList>
|
||||||
|
|
||||||
|
<testCase id="090101">
|
||||||
|
<class>Build_OAI_UE</class>
|
||||||
|
<desc>Build OAI UE</desc>
|
||||||
|
<Build_OAI_UE_args>-w USRP --UE</Build_OAI_UE_args>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
@@ -12,6 +12,7 @@ void usage(void)
|
|||||||
"usage: <number of tags> <input record file> <output curated record file>\n"
|
"usage: <number of tags> <input record file> <output curated record file>\n"
|
||||||
"options:\n"
|
"options:\n"
|
||||||
" -d <database file> this option is mandatory\n"
|
" -d <database file> this option is mandatory\n"
|
||||||
|
" -e <event name> trace given event (default CALIBRATION_CHANNEL_ESTIMATES)\n"
|
||||||
);
|
);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -88,6 +89,7 @@ int main(int n, char **v)
|
|||||||
int number_of_tags = -1;
|
int number_of_tags = -1;
|
||||||
char *input_filename = NULL;
|
char *input_filename = NULL;
|
||||||
char *output_filename = NULL;
|
char *output_filename = NULL;
|
||||||
|
char *event_name = "CALIBRATION_CHANNEL_ESTIMATES";
|
||||||
int i;
|
int i;
|
||||||
FILE *in;
|
FILE *in;
|
||||||
FILE *out;
|
FILE *out;
|
||||||
@@ -107,6 +109,8 @@ int main(int n, char **v)
|
|||||||
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
|
||||||
if (!strcmp(v[i], "-d")) { if (i > n-2) usage();
|
if (!strcmp(v[i], "-d")) { if (i > n-2) usage();
|
||||||
database_filename = v[++i]; continue; }
|
database_filename = v[++i]; continue; }
|
||||||
|
if (!strcmp(v[i], "-e")) { if (i > n-2) usage();
|
||||||
|
event_name = v[++i]; continue; }
|
||||||
if (number_of_tags == -1) { number_of_tags = atoi(v[i]);
|
if (number_of_tags == -1) { number_of_tags = atoi(v[i]);
|
||||||
if (number_of_tags <= 0) {usage();} continue; }
|
if (number_of_tags <= 0) {usage();} continue; }
|
||||||
if (input_filename == NULL) { input_filename = v[i]; continue; }
|
if (input_filename == NULL) { input_filename = v[i]; continue; }
|
||||||
@@ -124,7 +128,7 @@ int main(int n, char **v)
|
|||||||
|
|
||||||
database = parse_database(database_filename);
|
database = parse_database(database_filename);
|
||||||
|
|
||||||
channel_estimate_id = event_id_from_name(database, "CALIBRATION_CHANNEL_ESTIMATES");
|
channel_estimate_id = event_id_from_name(database, event_name);
|
||||||
f = get_format(database, channel_estimate_id);
|
f = get_format(database, channel_estimate_id);
|
||||||
|
|
||||||
frame_arg = get_field(&f, "frame", "int");
|
frame_arg = get_field(&f, "frame", "int");
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ int lte_segmentation(unsigned char *input_buffer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((*C)>MAX_NUM_DLSCH_SEGMENTS) {
|
if ((*C)>MAX_NUM_DLSCH_SEGMENTS) {
|
||||||
printf("%d\n",*(int*)0);
|
printf("%d\n",*(int *)0);
|
||||||
LOG_E(PHY,"lte_segmentation.c: too many segments %d, B %d, L %d, Bprime %d\n",*C,B,L,Bprime);
|
LOG_E(PHY,"lte_segmentation.c: too many segments %d, B %d, L %d, Bprime %d\n",*C,B,L,Bprime);
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ int lte_segmentation(unsigned char *input_buffer,
|
|||||||
#endif
|
#endif
|
||||||
*Kminus = (*Kplus - 64);
|
*Kminus = (*Kplus - 64);
|
||||||
} else {
|
} else {
|
||||||
printf("lte_segmentation.c: Illegal codeword size !!!\n");
|
LOG_E(PHY,"lte_segmentation.c: Illegal codeword size !!!\n");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
*/
|
*/
|
||||||
#include "PHY/defs_eNB.h"
|
#include "PHY/defs_eNB.h"
|
||||||
#ifdef DEBUG_UCI_TOOLS
|
#ifdef DEBUG_UCI_TOOLS
|
||||||
#include "PHY/vars.h"
|
#include "PHY/vars.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define DEBUG_UCI 1
|
//#define DEBUG_UCI 1
|
||||||
@@ -41,15 +41,21 @@ int16_t find_uci(uint16_t rnti, int frame, int subframe, PHY_VARS_eNB *eNB,find_
|
|||||||
uint16_t i;
|
uint16_t i;
|
||||||
int16_t first_free_index=-1;
|
int16_t first_free_index=-1;
|
||||||
AssertFatal(eNB!=NULL,"eNB is null\n");
|
AssertFatal(eNB!=NULL,"eNB is null\n");
|
||||||
|
|
||||||
for (i=0; i<NUMBER_OF_UCI_VARS_MAX; i++) {
|
for (i=0; i<NUMBER_OF_UCI_VARS_MAX; i++) {
|
||||||
if ((eNB->uci_vars[i].active >0) &&
|
if ((eNB->uci_vars[i].active >0) &&
|
||||||
(eNB->uci_vars[i].rnti==rnti) &&
|
(eNB->uci_vars[i].rnti==rnti) &&
|
||||||
(eNB->uci_vars[i].frame==frame) &&
|
(eNB->uci_vars[i].frame==frame) &&
|
||||||
(eNB->uci_vars[i].subframe==subframe)) return(i);
|
(eNB->uci_vars[i].subframe==subframe)) return(i);
|
||||||
else if ((eNB->uci_vars[i].active == 0) && (first_free_index==-1)) first_free_index=i;
|
else if ((eNB->uci_vars[i].active == 0) && (first_free_index==-1)) first_free_index=i;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == SEARCH_EXIST) return(-1);
|
if (type == SEARCH_EXIST) return(-1);
|
||||||
else return(first_free_index);
|
|
||||||
|
if (first_free_index==-1)
|
||||||
|
LOG_E(MAC,"UCI table is full\n");
|
||||||
|
|
||||||
|
return(first_free_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -561,8 +561,8 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
|
|||||||
else
|
else
|
||||||
tc = *decoder8;
|
tc = *decoder8;
|
||||||
|
|
||||||
if(ulsch_harq->repetition_number == 1){
|
if(ulsch_harq->repetition_number == 1) {
|
||||||
memset(pusch_rep_buffer,0,(sizeof(int32_t)*3*(6144+64))) ; // reset the buffer every new repetitions
|
memset(pusch_rep_buffer,0,(sizeof(int32_t)*3*(6144+64))) ; // reset the buffer every new repetitions
|
||||||
}
|
}
|
||||||
|
|
||||||
for (r=0; r<ulsch_harq->C; r++) {
|
for (r=0; r<ulsch_harq->C; r++) {
|
||||||
@@ -579,11 +579,10 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
|
|||||||
(uint8_t *)&dummy_w[r][0],
|
(uint8_t *)&dummy_w[r][0],
|
||||||
(r==0) ? ulsch_harq->F : 0);
|
(r==0) ? ulsch_harq->F : 0);
|
||||||
#ifdef DEBUG_ULSCH_DECODING
|
#ifdef DEBUG_ULSCH_DECODING
|
||||||
printf("Rate Matching Segment %u (coded bits (G) %d,unpunctured/repeated bits %u, Q_m %d, nb_rb %d, Nl %d)...\n",
|
printf("Rate Matching Segment %u (coded bits (G) %d,unpunctured/repeated bits %u, Q_m %d, Nl %d)...\n",
|
||||||
r, G,
|
r, G,
|
||||||
Kr*3,
|
Kr*3,
|
||||||
Q_m,
|
ulsch_harq->Qm,
|
||||||
nb_rb,
|
|
||||||
ulsch_harq->Nl);
|
ulsch_harq->Nl);
|
||||||
#endif
|
#endif
|
||||||
start_meas(&eNB->ulsch_rate_unmatching_stats);
|
start_meas(&eNB->ulsch_rate_unmatching_stats);
|
||||||
@@ -608,27 +607,23 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop_meas(&eNB->ulsch_rate_unmatching_stats);
|
stop_meas(&eNB->ulsch_rate_unmatching_stats);
|
||||||
|
|
||||||
max_Ncb = 3*ulsch_harq->RTC[r]*32 ;
|
max_Ncb = 3*ulsch_harq->RTC[r]*32 ;
|
||||||
|
|
||||||
if(ulsch_harq->total_number_of_repetitions > 1)
|
if(ulsch_harq->total_number_of_repetitions > 1) {
|
||||||
{
|
if (ulsch_harq->rvidx==1) {
|
||||||
if (ulsch_harq->rvidx==1)
|
// Store the result of HARQ combining in the last emtc repetitions of sequence 0,2,3,1
|
||||||
{ // Store the result of HARQ combining in the last emtc repetitions of sequence 0,2,3,1
|
for (int nn=0; nn<max_Ncb; nn++) {
|
||||||
for (int nn=0;nn<max_Ncb;nn++)
|
pusch_rep_buffer[nn] += ulsch_harq->w[r][nn] ;
|
||||||
{
|
|
||||||
pusch_rep_buffer[nn] += ulsch_harq->w[r][nn] ;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (ulsch_harq->repetition_number == ulsch_harq->total_number_of_repetitions)
|
|
||||||
{
|
|
||||||
for (int nn=0;nn<max_Ncb;nn++)
|
|
||||||
{
|
|
||||||
ulsch_harq->w[r][nn] = pusch_rep_buffer[nn] ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ulsch_harq->repetition_number == ulsch_harq->total_number_of_repetitions) {
|
||||||
|
for (int nn=0; nn<max_Ncb; nn++) {
|
||||||
|
ulsch_harq->w[r][nn] = pusch_rep_buffer[nn] ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
r_offset += E;
|
r_offset += E;
|
||||||
start_meas(&eNB->ulsch_deinterleaving_stats);
|
start_meas(&eNB->ulsch_deinterleaving_stats);
|
||||||
sub_block_deinterleaving_turbo(4+Kr,
|
sub_block_deinterleaving_turbo(4+Kr,
|
||||||
@@ -727,11 +722,13 @@ static inline unsigned int lte_gold_unscram(unsigned int *x1, unsigned int *x2,
|
|||||||
// printf("n=%d : c %x\n",n,x1^x2);
|
// printf("n=%d : c %x\n",n,x1^x2);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,
|
||||||
|
L1_rxtx_proc_t *proc,
|
||||||
uint8_t UE_id,
|
uint8_t UE_id,
|
||||||
uint8_t control_only_flag,
|
uint8_t control_only_flag,
|
||||||
uint8_t Nbundled,
|
uint8_t Nbundled,
|
||||||
uint8_t llr8_flag) {
|
uint8_t llr8_flag)
|
||||||
|
{
|
||||||
int16_t *ulsch_llr = eNB->pusch_vars[UE_id]->llr;
|
int16_t *ulsch_llr = eNB->pusch_vars[UE_id]->llr;
|
||||||
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
|
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
|
||||||
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
LTE_eNB_ULSCH_t *ulsch = eNB->ulsch[UE_id];
|
||||||
@@ -762,12 +759,13 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
|||||||
int frame = proc->frame_rx;
|
int frame = proc->frame_rx;
|
||||||
int subframe = proc->subframe_rx;
|
int subframe = proc->subframe_rx;
|
||||||
LTE_UL_eNB_HARQ_t *ulsch_harq;
|
LTE_UL_eNB_HARQ_t *ulsch_harq;
|
||||||
|
|
||||||
LOG_D(PHY,"ue_type %d\n",ulsch->ue_type);
|
LOG_D(PHY,"ue_type %d\n",ulsch->ue_type);
|
||||||
|
|
||||||
if (ulsch->ue_type>0) harq_pid = 0;
|
if (ulsch->ue_type>0)
|
||||||
else {
|
harq_pid = 0;
|
||||||
|
else
|
||||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||||
}
|
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1);
|
||||||
// x1 is set in lte_gold_generic
|
// x1 is set in lte_gold_generic
|
||||||
|
|||||||
@@ -278,6 +278,7 @@ char phich_string[13][4] = {"","1/6","","1/2","","","one","","","","","","two"};
|
|||||||
char duplex_string[2][4] = {"FDD","TDD"};
|
char duplex_string[2][4] = {"FDD","TDD"};
|
||||||
char prefix_string[2][9] = {"NORMAL","EXTENDED"};
|
char prefix_string[2][9] = {"NORMAL","EXTENDED"};
|
||||||
|
|
||||||
|
|
||||||
int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
||||||
int32_t sync_pos,sync_pos2,sync_pos_slot;
|
int32_t sync_pos,sync_pos2,sync_pos_slot;
|
||||||
int32_t metric_fdd_ncp=0,metric_fdd_ecp=0,metric_tdd_ncp=0,metric_tdd_ecp=0;
|
int32_t metric_fdd_ncp=0,metric_fdd_ecp=0,metric_tdd_ncp=0,metric_tdd_ecp=0;
|
||||||
@@ -557,13 +558,12 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
|||||||
ue->measurements.rx_power_avg_dB[0] = dB_fixed(ue->measurements.rx_power_avg[0]);
|
ue->measurements.rx_power_avg_dB[0] = dB_fixed(ue->measurements.rx_power_avg[0]);
|
||||||
LOG_I(PHY,"[UE%d] Initial sync : Estimated power: %d dB\n",ue->Mod_id,ue->measurements.rx_power_avg_dB[0] );
|
LOG_I(PHY,"[UE%d] Initial sync : Estimated power: %d dB\n",ue->Mod_id,ue->measurements.rx_power_avg_dB[0] );
|
||||||
|
|
||||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM )
|
if (IS_SOFTMODEM_BASICSIM )
|
||||||
phy_adjust_gain(ue,ue->measurements.rx_power_avg_dB[0],0);
|
phy_adjust_gain(ue,ue->measurements.rx_power_avg_dB[0],0);
|
||||||
} else {
|
} else {
|
||||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM )
|
if (IS_SOFTMODEM_BASICSIM )
|
||||||
phy_adjust_gain(ue,dB_fixed(ue->measurements.rssi),0);
|
phy_adjust_gain(ue,dB_fixed(ue->measurements.rssi),0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
|||||||
int i, prach_len;
|
int i, prach_len;
|
||||||
uint16_t first_nonzero_root_idx=0;
|
uint16_t first_nonzero_root_idx=0;
|
||||||
|
|
||||||
if ( !(IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) ) {
|
if ( !(IS_SOFTMODEM_BASICSIM ) ) {
|
||||||
prach_start = (ue->rx_offset+subframe*ue->frame_parms.samples_per_tti-ue->hw_timing_advance-ue->N_TA_offset);
|
prach_start = (ue->rx_offset+subframe*ue->frame_parms.samples_per_tti-ue->hw_timing_advance-ue->N_TA_offset);
|
||||||
#ifdef PRACH_DEBUG
|
#ifdef PRACH_DEBUG
|
||||||
LOG_I(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id,
|
LOG_I(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id,
|
||||||
@@ -473,7 +473,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
|
|||||||
AssertFatal(prach_fmt<4,
|
AssertFatal(prach_fmt<4,
|
||||||
"prach_fmt4 not fully implemented" );
|
"prach_fmt4 not fully implemented" );
|
||||||
|
|
||||||
if (!(IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) ) {
|
if (!(IS_SOFTMODEM_BASICSIM ) ) {
|
||||||
int j;
|
int j;
|
||||||
int overflow = prach_start + prach_len - LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.samples_per_tti;
|
int overflow = prach_start + prach_len - LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*ue->frame_parms.samples_per_tti;
|
||||||
LOG_I( PHY, "prach_start=%d, overflow=%d\n", prach_start, overflow );
|
LOG_I( PHY, "prach_start=%d, overflow=%d\n", prach_start, overflow );
|
||||||
|
|||||||
@@ -283,10 +283,9 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
uint8_t harq_pid,
|
uint8_t harq_pid,
|
||||||
uint8_t is_crnti)
|
uint8_t is_crnti)
|
||||||
{
|
{
|
||||||
|
|
||||||
uint32_t A,E;
|
uint32_t A,E;
|
||||||
uint32_t G;
|
uint32_t G;
|
||||||
uint32_t ret,offset;
|
uint32_t ret, offset;
|
||||||
int32_t no_iteration_ldpc, length_dec;
|
int32_t no_iteration_ldpc, length_dec;
|
||||||
uint32_t r,r_offset=0,Kr=8424,Kr_bytes,K_bytes_F,err_flag=0;
|
uint32_t r,r_offset=0,Kr=8424,Kr_bytes,K_bytes_F,err_flag=0;
|
||||||
uint8_t crc_type;
|
uint8_t crc_type;
|
||||||
@@ -313,10 +312,10 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
|
|
||||||
int16_t z [68*384];
|
int16_t z [68*384];
|
||||||
int8_t l [68*384];
|
int8_t l [68*384];
|
||||||
uint8_t kc=255;
|
uint8_t kc = 255;
|
||||||
uint8_t Ilbrm = 0;
|
uint8_t Ilbrm = 0;
|
||||||
uint32_t Tbslbrm = 950984;
|
uint32_t Tbslbrm = 950984;
|
||||||
double Coderate = 0.0;
|
double Coderate = 0.0;
|
||||||
|
|
||||||
// ------------------------------------------------------------------
|
// ------------------------------------------------------------------
|
||||||
uint16_t nb_rb = nfapi_ulsch_pdu_rel15->number_rbs;
|
uint16_t nb_rb = nfapi_ulsch_pdu_rel15->number_rbs;
|
||||||
@@ -528,7 +527,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
write_output("decoder_in.m","dec",&harq_process->d[0][0],(3*8*Kr_bytes)+12,1,0);
|
write_output("decoder_in.m","dec",&harq_process->d[0][0],(3*8*Kr_bytes)+12,1,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("decoder input(segment %u) :",r);
|
printf("decoder input(segment %u) :", r);
|
||||||
int i;
|
int i;
|
||||||
for (i=0;i<(3*8*Kr_bytes)+12;i++)
|
for (i=0;i<(3*8*Kr_bytes)+12;i++)
|
||||||
printf("%d : %d\n",i,harq_process->d[r][i]);
|
printf("%d : %d\n",i,harq_process->d[r][i]);
|
||||||
@@ -705,13 +704,9 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
|
|||||||
offset += (Kr_bytes - (harq_process->F>>3) - ((harq_process->C>1)?3:0));
|
offset += (Kr_bytes - (harq_process->F>>3) - ((harq_process->C>1)?3:0));
|
||||||
|
|
||||||
#ifdef DEBUG_ULSCH_DECODING
|
#ifdef DEBUG_ULSCH_DECODING
|
||||||
printf("Segment %u : Kr= %u bytes\n",r,Kr_bytes);
|
printf("Segment %u : Kr = %u bytes\n", r, Kr_bytes);
|
||||||
printf("copied %d bytes to b sequence (harq_pid %d)\n",
|
printf("copied %d bytes to b sequence (harq_pid %d)\n", (Kr_bytes - (harq_process->F>>3)-((harq_process->C>1)?3:0)), harq_pid);
|
||||||
(Kr_bytes - (harq_process->F>>3)-((harq_process->C>1)?3:0)),harq_pid);
|
printf("b[0] = %x, c[%d] = %x\n", harq_process->b[offset], harq_process->F>>3, harq_process->c[r]);
|
||||||
printf("b[0] = %x,c[%d] = %x\n",
|
|
||||||
harq_process->b[offset],
|
|
||||||
harq_process->F>>3,
|
|
||||||
harq_process->c[r]);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,12 +192,12 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
|
|||||||
|
|
||||||
|
|
||||||
int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||||
uint8_t eNB_offset,
|
uint8_t eNB_offset,
|
||||||
unsigned char Ns,
|
unsigned char Ns,
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
int dmrss,
|
int dmrss,
|
||||||
uint8_t ssb_index,
|
uint8_t ssb_index,
|
||||||
uint8_t n_hf)
|
uint8_t n_hf)
|
||||||
{
|
{
|
||||||
int pilot[200] __attribute__((aligned(16)));
|
int pilot[200] __attribute__((aligned(16)));
|
||||||
unsigned char aarx,p;
|
unsigned char aarx,p;
|
||||||
|
|||||||
@@ -25,8 +25,7 @@
|
|||||||
* \date 2011
|
* \date 2011
|
||||||
* \version 0.1
|
* \version 0.1
|
||||||
* \company Eurecom
|
* \company Eurecom
|
||||||
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr, javier.morgad
|
* \email: {knopp, florian.kaltenberger, navid.nikaein}@eurecom.fr, javier.morgade@ieee.org
|
||||||
e@ieee.org
|
|
||||||
* \note
|
* \note
|
||||||
* \warning
|
* \warning
|
||||||
*/
|
*/
|
||||||
@@ -184,13 +183,16 @@ unsigned int get_tx_amp(int power_dBm,
|
|||||||
int gain_dB;
|
int gain_dB;
|
||||||
double gain_lin;
|
double gain_lin;
|
||||||
|
|
||||||
if (power_dBm<=power_max_dBm)
|
if ( (power_dBm<=power_max_dBm) && ! IS_SOFTMODEM_RFSIM)
|
||||||
gain_dB = power_dBm - power_max_dBm;
|
gain_dB = power_dBm - power_max_dBm;
|
||||||
else
|
else
|
||||||
gain_dB = 0;
|
gain_dB = 0;
|
||||||
|
|
||||||
gain_lin = pow(10,.1*gain_dB);
|
gain_lin = pow(10,.1*gain_dB);
|
||||||
AssertFatal((nb_rb >0) && (nb_rb <= N_RB_UL),"Illegal nb_rb/N_RB_UL combination (%d/%d)\n",nb_rb,N_RB_UL);
|
AssertFatal((nb_rb >0) && (nb_rb <= N_RB_UL),"Illegal nb_rb/N_RB_UL combination (%d/%d)\n",nb_rb,N_RB_UL);
|
||||||
|
LOG_D(PHY," tx gain: %d = %d * sqrt ( pow(10, 0.1*max(0,%d-%d)) * %d/%d ) (gain lin=%f (dB=%d))\n",
|
||||||
|
(int)(AMP*sqrt(gain_lin*N_RB_UL/(double)nb_rb)),
|
||||||
|
AMP, power_dBm, power_max_dBm, N_RB_UL, nb_rb, gain_lin, gain_dB);
|
||||||
return((int)(AMP*sqrt(gain_lin*N_RB_UL/(double)nb_rb)));
|
return((int)(AMP*sqrt(gain_lin*N_RB_UL/(double)nb_rb)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1152,7 +1154,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue,
|
|||||||
|
|
||||||
nsymb = (frame_parms->Ncp == 0) ? 14 : 12;
|
nsymb = (frame_parms->Ncp == 0) ? 14 : 12;
|
||||||
|
|
||||||
if (!(IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) ) {
|
if (!IS_SOFTMODEM_BASICSIM) {
|
||||||
ulsch_start = (ue->rx_offset+subframe_tx*frame_parms->samples_per_tti-
|
ulsch_start = (ue->rx_offset+subframe_tx*frame_parms->samples_per_tti-
|
||||||
ue->hw_timing_advance-
|
ue->hw_timing_advance-
|
||||||
ue->timing_advance-
|
ue->timing_advance-
|
||||||
@@ -1183,7 +1185,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||||
int *Buff = (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) ? &ue->common_vars.txdata[aa][ulsch_start] :dummy_tx_buffer;
|
int *Buff = IS_SOFTMODEM_BASICSIM ? &ue->common_vars.txdata[aa][ulsch_start] :dummy_tx_buffer;
|
||||||
|
|
||||||
if (frame_parms->Ncp == 1) {
|
if (frame_parms->Ncp == 1) {
|
||||||
PHY_ofdm_mod(&ue->common_vars.txdataF[aa][subframe_tx*nsymb*frame_parms->ofdm_symbol_size],
|
PHY_ofdm_mod(&ue->common_vars.txdataF[aa][subframe_tx*nsymb*frame_parms->ofdm_symbol_size],
|
||||||
@@ -1204,7 +1206,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue,
|
|||||||
&ue->frame_parms);
|
&ue->frame_parms);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
|
if (IS_SOFTMODEM_BASICSIM) {
|
||||||
apply_7_5_kHz(ue,&ue->common_vars.txdata[aa][ulsch_start],0);
|
apply_7_5_kHz(ue,&ue->common_vars.txdata[aa][ulsch_start],0);
|
||||||
apply_7_5_kHz(ue,&ue->common_vars.txdata[aa][ulsch_start],1);
|
apply_7_5_kHz(ue,&ue->common_vars.txdata[aa][ulsch_start],1);
|
||||||
} else {
|
} else {
|
||||||
@@ -1212,7 +1214,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue,
|
|||||||
apply_7_5_kHz(ue,dummy_tx_buffer,1);
|
apply_7_5_kHz(ue,dummy_tx_buffer,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM) ) {
|
if (!(IS_SOFTMODEM_BASICSIM) ) {
|
||||||
overflow = ulsch_start - 9*frame_parms->samples_per_tti;
|
overflow = ulsch_start - 9*frame_parms->samples_per_tti;
|
||||||
|
|
||||||
for (k=ulsch_start,l=0; k<cmin(frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME,ulsch_start+frame_parms->samples_per_tti); k++,l++) {
|
for (k=ulsch_start,l=0; k<cmin(frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME,ulsch_start+frame_parms->samples_per_tti); k++,l++) {
|
||||||
@@ -1316,7 +1318,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,
|
|||||||
ue->prach_resources[eNB_id]->ra_RNTI);
|
ue->prach_resources[eNB_id]->ra_RNTI);
|
||||||
ue->tx_total_RE[subframe_tx] = 96;
|
ue->tx_total_RE[subframe_tx] = 96;
|
||||||
|
|
||||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
|
if (IS_SOFTMODEM_BASICSIM) {
|
||||||
ue->prach_vars[eNB_id]->amp = get_tx_amp(ue->tx_power_dBm[subframe_tx],
|
ue->prach_vars[eNB_id]->amp = get_tx_amp(ue->tx_power_dBm[subframe_tx],
|
||||||
ue->tx_power_max_dBm,
|
ue->tx_power_max_dBm,
|
||||||
ue->frame_parms.N_RB_UL,
|
ue->frame_parms.N_RB_UL,
|
||||||
@@ -1690,7 +1692,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,
|
|||||||
|
|
||||||
ue->tx_total_RE[subframe_tx] = nb_rb*12;
|
ue->tx_total_RE[subframe_tx] = nb_rb*12;
|
||||||
|
|
||||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
|
if (IS_SOFTMODEM_BASICSIM) {
|
||||||
tx_amp = AMP;
|
tx_amp = AMP;
|
||||||
} else {
|
} else {
|
||||||
tx_amp = get_tx_amp(ue->tx_power_dBm[subframe_tx],
|
tx_amp = get_tx_amp(ue->tx_power_dBm[subframe_tx],
|
||||||
@@ -1767,7 +1769,7 @@ void ue_srs_procedures(PHY_VARS_UE *ue,
|
|||||||
Po_SRS = ue->tx_power_max_dBm;
|
Po_SRS = ue->tx_power_max_dBm;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
|
if (IS_SOFTMODEM_BASICSIM) {
|
||||||
tx_amp = AMP;
|
tx_amp = AMP;
|
||||||
} else {
|
} else {
|
||||||
if (ue->mac_enabled==1) {
|
if (ue->mac_enabled==1) {
|
||||||
@@ -2010,7 +2012,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,
|
|||||||
ue->tx_power_dBm[subframe_tx] = Po_PUCCH;
|
ue->tx_power_dBm[subframe_tx] = Po_PUCCH;
|
||||||
ue->tx_total_RE[subframe_tx] = 12;
|
ue->tx_total_RE[subframe_tx] = 12;
|
||||||
|
|
||||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
|
if (IS_SOFTMODEM_BASICSIM) {
|
||||||
tx_amp = AMP;
|
tx_amp = AMP;
|
||||||
} else {
|
} else {
|
||||||
tx_amp = get_tx_amp(Po_PUCCH,
|
tx_amp = get_tx_amp(Po_PUCCH,
|
||||||
@@ -2091,7 +2093,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,
|
|||||||
ue->tx_power_dBm[subframe_tx] = Po_PUCCH;
|
ue->tx_power_dBm[subframe_tx] = Po_PUCCH;
|
||||||
ue->tx_total_RE[subframe_tx] = 12;
|
ue->tx_total_RE[subframe_tx] = 12;
|
||||||
|
|
||||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM ) {
|
if (IS_SOFTMODEM_BASICSIM) {
|
||||||
tx_amp = AMP;
|
tx_amp = AMP;
|
||||||
} else {
|
} else {
|
||||||
tx_amp = get_tx_amp(Po_PUCCH,
|
tx_amp = get_tx_amp(Po_PUCCH,
|
||||||
@@ -2346,7 +2348,7 @@ void ue_measurement_procedures(uint16_t l, // symbol index of each slot [0..6
|
|||||||
// AGC
|
// AGC
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_IN);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_IN);
|
||||||
|
|
||||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM )
|
if (IS_SOFTMODEM_BASICSIM)
|
||||||
phy_adjust_gain (ue,dB_fixed(ue->measurements.rssi),0);
|
phy_adjust_gain (ue,dB_fixed(ue->measurements.rssi),0);
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT);
|
||||||
@@ -2423,8 +2425,6 @@ void ue_pbch_procedures(uint8_t eNB_id,
|
|||||||
dummy[2] = ue->pbch_vars[eNB_id]->decoded_output[0];
|
dummy[2] = ue->pbch_vars[eNB_id]->decoded_output[0];
|
||||||
trace_pdu( DIRECTION_DOWNLINK, dummy, WS_C_RNTI, ue->Mod_id, 0, 0,
|
trace_pdu( DIRECTION_DOWNLINK, dummy, WS_C_RNTI, ue->Mod_id, 0, 0,
|
||||||
frame_rx, subframe_rx, 0, 0);
|
frame_rx, subframe_rx, 0, 0);
|
||||||
LOG_D(OPT,"[UE %d][PBCH] Frame %d trace pdu for PBCH\n",
|
|
||||||
ue->Mod_id, subframe_rx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pbch_tx_ant>2) {
|
if (pbch_tx_ant>2) {
|
||||||
@@ -2871,8 +2871,7 @@ void ue_pmch_procedures(PHY_VARS_UE *ue,
|
|||||||
UE_rxtx_proc_t *proc,
|
UE_rxtx_proc_t *proc,
|
||||||
int eNB_id,
|
int eNB_id,
|
||||||
int abstraction_flag,
|
int abstraction_flag,
|
||||||
uint8_t fembms_flag
|
uint8_t fembms_flag) {
|
||||||
) {
|
|
||||||
int subframe_rx = proc->subframe_rx;
|
int subframe_rx = proc->subframe_rx;
|
||||||
int frame_rx = proc->frame_rx;
|
int frame_rx = proc->frame_rx;
|
||||||
int pmch_mcs=-1;
|
int pmch_mcs=-1;
|
||||||
@@ -3532,7 +3531,6 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
|
|||||||
ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
|
ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
|
||||||
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
|
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case P_PDSCH:
|
case P_PDSCH:
|
||||||
@@ -4401,6 +4399,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,
|
|||||||
void phy_procedures_UE_SL_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
|
void phy_procedures_UE_SL_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int phy_procedures_UE_RX(PHY_VARS_UE *ue,
|
int phy_procedures_UE_RX(PHY_VARS_UE *ue,
|
||||||
UE_rxtx_proc_t *proc,
|
UE_rxtx_proc_t *proc,
|
||||||
uint8_t eNB_id,
|
uint8_t eNB_id,
|
||||||
@@ -4880,7 +4879,6 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void phy_procedures_UE_lte(PHY_VARS_UE *ue,
|
void phy_procedures_UE_lte(PHY_VARS_UE *ue,
|
||||||
UE_rxtx_proc_t *proc,
|
UE_rxtx_proc_t *proc,
|
||||||
uint8_t eNB_id,
|
uint8_t eNB_id,
|
||||||
|
|||||||
@@ -75,30 +75,28 @@ void config_common(int Mod_idP,int CC_idP,int Nid_cell,int nr_bandP,uint64_t SSB
|
|||||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const int CC_id, const uint8_t gNB_index,
|
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const int CC_id, const uint8_t gNB_index,
|
||||||
const int8_t channel, const uint8_t* pduP, const sdu_size_t pdu_len) {return(0);}
|
const int8_t channel, const uint8_t* pduP, const sdu_size_t pdu_len) {return(0);}
|
||||||
uint64_t get_softmodem_optmask(void) {return 0;}
|
uint64_t get_softmodem_optmask(void) {return 0;}
|
||||||
mac_rlc_status_resp_t mac_rlc_status_ind( const module_id_t module_idP,
|
mac_rlc_status_resp_t mac_rlc_status_ind(const module_id_t module_idP,
|
||||||
const rnti_t rntiP,
|
const rnti_t rntiP,
|
||||||
const eNB_index_t eNB_index,
|
const eNB_index_t eNB_index,
|
||||||
const frame_t frameP,
|
const frame_t frameP,
|
||||||
const sub_frame_t subframeP,
|
const sub_frame_t subframeP,
|
||||||
const eNB_flag_t enb_flagP,
|
const eNB_flag_t enb_flagP,
|
||||||
const MBMS_flag_t MBMS_flagP,
|
const MBMS_flag_t MBMS_flagP,
|
||||||
const logical_chan_id_t channel_idP,
|
const logical_chan_id_t channel_idP,
|
||||||
const tb_size_t tb_sizeP,
|
const tb_size_t tb_sizeP,
|
||||||
const uint32_t sourceL2Id,
|
const uint32_t sourceL2Id,
|
||||||
const uint32_t destinationL2Id)
|
const uint32_t destinationL2Id) {mac_rlc_status_resp_t mac_rlc_status_resp = {0}; return mac_rlc_status_resp;}
|
||||||
{mac_rlc_status_resp_t mac_rlc_status_resp={0}; return mac_rlc_status_resp;}
|
tbs_size_t mac_rlc_data_req(const module_id_t module_idP,
|
||||||
tbs_size_t mac_rlc_data_req( const module_id_t module_idP,
|
const rnti_t rntiP,
|
||||||
const rnti_t rntiP,
|
const eNB_index_t eNB_index,
|
||||||
const eNB_index_t eNB_index,
|
const frame_t frameP,
|
||||||
const frame_t frameP,
|
const eNB_flag_t enb_flagP,
|
||||||
const eNB_flag_t enb_flagP,
|
const MBMS_flag_t MBMS_flagP,
|
||||||
const MBMS_flag_t MBMS_flagP,
|
const logical_chan_id_t channel_idP,
|
||||||
const logical_chan_id_t channel_idP,
|
const tb_size_t tb_sizeP,
|
||||||
const tb_size_t tb_sizeP,
|
char *buffer_pP,
|
||||||
char *buffer_pP,
|
const uint32_t sourceL2Id,
|
||||||
const uint32_t sourceL2Id,
|
const uint32_t destinationL2Id) {return 0;}
|
||||||
const uint32_t destinationL2Id )
|
|
||||||
{return 0;}
|
|
||||||
int generate_dlsch_header(unsigned char *mac_header,
|
int generate_dlsch_header(unsigned char *mac_header,
|
||||||
unsigned char num_sdus,
|
unsigned char num_sdus,
|
||||||
unsigned short *sdu_lengths,
|
unsigned short *sdu_lengths,
|
||||||
@@ -862,7 +860,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
if (errors_scrambling > 0) {
|
if (errors_scrambling > 0) {
|
||||||
if (n_trials == 1)
|
if (n_trials == 1)
|
||||||
printf("errors_scrambling = %d (trial %d)\n", errors_scrambling, trial);
|
printf("errors_scrambling = %u (trial %d)\n", errors_scrambling, trial);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (errors_bit > 0) {
|
if (errors_bit > 0) {
|
||||||
|
|||||||
@@ -81,9 +81,9 @@
|
|||||||
#define MAX_eNB 2
|
#define MAX_eNB 2
|
||||||
#define MAX_gNB 2
|
#define MAX_gNB 2
|
||||||
#else
|
#else
|
||||||
#define MAX_MOBILES_PER_ENB 16
|
#define MAX_MOBILES_PER_ENB 4
|
||||||
#define MAX_MOBILES_PER_ENB_NB_IoT 16
|
#define MAX_MOBILES_PER_ENB_NB_IoT 4
|
||||||
#define MAX_MOBILES_PER_GNB 16
|
#define MAX_MOBILES_PER_GNB 4
|
||||||
#define MAX_eNB 2
|
#define MAX_eNB 2
|
||||||
#define MAX_gNB 2
|
#define MAX_gNB 2
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -142,13 +142,14 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
|
|||||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.size = get_TBS_UL (ra->msg3_mcs, ra->msg3_nb_rb);
|
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.size = get_TBS_UL (ra->msg3_mcs, ra->msg3_nb_rb);
|
||||||
// Re13 fields
|
// Re13 fields
|
||||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.ue_type = ra->rach_resource_type > 2 ? 2 : 1;
|
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.ue_type = ra->rach_resource_type > 2 ? 2 : 1;
|
||||||
|
|
||||||
if (ra->rach_resource_type > 0) {
|
if (ra->rach_resource_type > 0) {
|
||||||
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
|
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
|
||||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions= pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][ra->pusch_repetition_levels];
|
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions= pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][ra->pusch_repetition_levels];
|
||||||
}
|
} else {
|
||||||
else{
|
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions=1;
|
||||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions=1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number = 1;
|
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number = 1;
|
||||||
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.initial_transmission_sf_io = (ra->Msg3_frame * 10) + ra->Msg3_subframe;
|
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.initial_transmission_sf_io = (ra->Msg3_frame * 10) + ra->Msg3_subframe;
|
||||||
ul_req_body->number_of_pdus++;
|
ul_req_body->number_of_pdus++;
|
||||||
@@ -269,10 +270,9 @@ void generate_Msg2(module_id_t module_idP,
|
|||||||
uint16_t absSF_Msg2 = (10 * ra->Msg2_frame) + ra->Msg2_subframe;
|
uint16_t absSF_Msg2 = (10 * ra->Msg2_frame) + ra->Msg2_subframe;
|
||||||
|
|
||||||
if (ra->rach_resource_type > 0) {
|
if (ra->rach_resource_type > 0) {
|
||||||
PUSCH_Rep_Level= *(rrc->configuration.pusch_repetitionLevelCEmodeA_r13[CC_idP]);
|
PUSCH_Rep_Level= *(rrc->configuration.pusch_repetitionLevelCEmodeA_r13[CC_idP]);
|
||||||
}
|
} else {
|
||||||
else {
|
PUSCH_Rep_Level= 0;
|
||||||
PUSCH_Rep_Level= 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (absSF > absSF_Msg2) {
|
if (absSF > absSF_Msg2) {
|
||||||
@@ -415,7 +415,7 @@ void generate_Msg2(module_id_t module_idP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
ra->pusch_repetition_levels = PUSCH_Rep_Level;
|
ra->pusch_repetition_levels = PUSCH_Rep_Level;
|
||||||
|
|
||||||
if((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) {
|
if((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) {
|
||||||
/* Program PDSCH */
|
/* Program PDSCH */
|
||||||
LOG_D(MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH\n",
|
LOG_D(MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : In generate_Msg2, Programming PDSCH\n",
|
||||||
@@ -902,11 +902,10 @@ generate_Msg4(module_id_t module_idP,
|
|||||||
ul_req_body->number_of_pdus++;
|
ul_req_body->number_of_pdus++;
|
||||||
T (T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT (module_idP), T_INT (CC_idP), T_INT (ra->rnti), T_INT (frameP), T_INT (subframeP),
|
T (T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT (module_idP), T_INT (CC_idP), T_INT (ra->rnti), T_INT (frameP), T_INT (subframeP),
|
||||||
T_INT (0 /*harq_pid always 0? */ ), T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].payload[0], ra->msg4_TBsize));
|
T_INT (0 /*harq_pid always 0? */ ), T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].payload[0], ra->msg4_TBsize));
|
||||||
|
trace_pdu (DIRECTION_DOWNLINK, (uint8_t *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0],
|
||||||
if (opt_enabled == 1) {
|
ra->msg4_rrc_sdu_length,
|
||||||
trace_pdu (1, (uint8_t *) mac->UE_list.DLSCH_pdu[CC_idP][0][(unsigned char) UE_id].payload[0], ra->msg4_rrc_sdu_length, UE_id, 3, UE_RNTI (module_idP, UE_id), mac->frame, mac->subframe, 0, 0);
|
UE_id, 3, UE_RNTI (module_idP, UE_id),
|
||||||
LOG_D (OPT, "[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n", module_idP, CC_idP, frameP, UE_RNTI (module_idP, UE_id), ra->msg4_rrc_sdu_length);
|
mac->frame, mac->subframe, 0, 0);
|
||||||
}
|
|
||||||
} // Msg4 frame/subframe
|
} // Msg4 frame/subframe
|
||||||
} // rach_resource_type > 0
|
} // rach_resource_type > 0
|
||||||
else {
|
else {
|
||||||
@@ -1079,20 +1078,12 @@ generate_Msg4(module_id_t module_idP,
|
|||||||
T_INT(subframeP), T_INT(0 /*harq_pid always 0? */ ),
|
T_INT(subframeP), T_INT(0 /*harq_pid always 0? */ ),
|
||||||
T_BUFFER(&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].
|
T_BUFFER(&mac->UE_list.DLSCH_pdu[CC_idP][0][UE_id].
|
||||||
payload[0], ra->msg4_TBsize));
|
payload[0], ra->msg4_TBsize));
|
||||||
|
trace_pdu(DIRECTION_DOWNLINK,
|
||||||
if (opt_enabled == 1) {
|
(uint8_t *) mac->
|
||||||
trace_pdu(DIRECTION_DOWNLINK,
|
UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0],
|
||||||
(uint8_t *) mac->
|
rrc_sdu_length, UE_id, WS_C_RNTI,
|
||||||
UE_list.DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0],
|
UE_RNTI(module_idP, UE_id), mac->frame,
|
||||||
rrc_sdu_length, UE_id, WS_C_RNTI,
|
mac->subframe, 0, 0);
|
||||||
UE_RNTI(module_idP, UE_id), mac->frame,
|
|
||||||
mac->subframe, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n",
|
|
||||||
module_idP, CC_idP, frameP, UE_RNTI(module_idP,
|
|
||||||
UE_id),
|
|
||||||
rrc_sdu_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR) {
|
if(RC.mac[module_idP]->scheduler_mode == SCHED_MODE_FAIR_RR) {
|
||||||
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
|
set_dl_ue_select_msg4(CC_idP, 4, UE_id, ra->rnti);
|
||||||
|
|||||||
@@ -26,7 +26,6 @@
|
|||||||
* \email: navid.nikaein@eurecom.fr
|
* \email: navid.nikaein@eurecom.fr
|
||||||
* \version 1.0
|
* \version 1.0
|
||||||
* @ingroup _mac
|
* @ingroup _mac
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
@@ -279,16 +278,10 @@ schedule_SIB1_MBMS(module_id_t module_idP,
|
|||||||
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||||
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||||
|
trace_pdu(DIRECTION_DOWNLINK,
|
||||||
if (opt_enabled == 1) {
|
&cc->BCCH_BR_pdu[0].payload[0],
|
||||||
trace_pdu(DIRECTION_DOWNLINK,
|
bcch_sdu_length,
|
||||||
&cc->BCCH_BR_pdu[0].payload[0],
|
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||||
bcch_sdu_length,
|
|
||||||
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cc->tdd_Config != NULL) { //TDD
|
if (cc->tdd_Config != NULL) { //TDD
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
@@ -509,16 +502,10 @@ schedule_SIB1_BR(module_id_t module_idP,
|
|||||||
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
eNB->TX_req[CC_id].tx_request_body.tl.tag = NFAPI_TX_REQUEST_BODY_TAG;
|
||||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||||
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
eNB->TX_req[CC_id].header.message_id = NFAPI_TX_REQUEST;
|
||||||
|
trace_pdu(DIRECTION_DOWNLINK,
|
||||||
if (opt_enabled == 1) {
|
&cc->BCCH_BR_pdu[0].payload[0],
|
||||||
trace_pdu(DIRECTION_DOWNLINK,
|
bcch_sdu_length,
|
||||||
&cc->BCCH_BR_pdu[0].payload[0],
|
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||||
bcch_sdu_length,
|
|
||||||
0xffff, WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cc->tdd_Config != NULL) { //TDD
|
if (cc->tdd_Config != NULL) { //TDD
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
@@ -696,18 +683,13 @@ schedule_SI_BR(module_id_t module_idP, frame_t frameP,
|
|||||||
TX_req->segments[0].segment_length = bcch_sdu_length;
|
TX_req->segments[0].segment_length = bcch_sdu_length;
|
||||||
TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[i+1].payload;
|
TX_req->segments[0].segment_data = cc->BCCH_BR_pdu[i+1].payload;
|
||||||
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
eNB->TX_req[CC_id].tx_request_body.number_of_pdus++;
|
||||||
|
trace_pdu(DIRECTION_DOWNLINK,
|
||||||
if (opt_enabled == 1) {
|
&cc->BCCH_BR_pdu[i + 1].payload[0],
|
||||||
trace_pdu(DIRECTION_DOWNLINK,
|
bcch_sdu_length,
|
||||||
&cc->BCCH_BR_pdu[i + 1].payload[0],
|
0xffff,
|
||||||
bcch_sdu_length,
|
WS_SI_RNTI,
|
||||||
0xffff,
|
0xffff, eNB->frame, eNB->subframe, 0,
|
||||||
WS_SI_RNTI,
|
0);
|
||||||
0xffff, eNB->frame, eNB->subframe, 0,
|
|
||||||
0);
|
|
||||||
LOG_D(OPT, "[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, CC_id, 0xffff, bcch_sdu_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cc->tdd_Config != NULL) { //TDD
|
if (cc->tdd_Config != NULL) { //TDD
|
||||||
LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-BR %d->DLSCH (TDD) for CC_id %d SI-BR %d bytes\n",
|
LOG_D(MAC, "[eNB] Frame %d : Scheduling BCCH-BR %d->DLSCH (TDD) for CC_id %d SI-BR %d bytes\n",
|
||||||
@@ -901,18 +883,11 @@ schedule_SI_MBMS(module_id_t module_idP, frame_t frameP,
|
|||||||
|
|
||||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
|
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
|
||||||
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_MBMS_pdu.payload, bcch_sdu_length));
|
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_MBMS_pdu.payload, bcch_sdu_length));
|
||||||
|
trace_pdu(DIRECTION_DOWNLINK,
|
||||||
if (opt_enabled == 1) {
|
&cc->BCCH_MBMS_pdu.payload[0],
|
||||||
trace_pdu(DIRECTION_DOWNLINK,
|
bcch_sdu_length,
|
||||||
&cc->BCCH_MBMS_pdu.payload[0],
|
0xffff,
|
||||||
bcch_sdu_length,
|
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||||
0xffff,
|
|
||||||
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[eNB %d][BCH-MBMS] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, CC_id, 0xffff,
|
|
||||||
bcch_sdu_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0/*cc->tdd_Config != NULL*/) { //TDD not for FeMBMS
|
if (0/*cc->tdd_Config != NULL*/) { //TDD not for FeMBMS
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
@@ -1177,18 +1152,11 @@ schedule_SI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
|
|||||||
|
|
||||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
|
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(0xffff),
|
||||||
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_pdu.payload, bcch_sdu_length));
|
T_INT(frameP), T_INT(subframeP), T_INT(0), T_BUFFER(cc->BCCH_pdu.payload, bcch_sdu_length));
|
||||||
|
trace_pdu(DIRECTION_DOWNLINK,
|
||||||
if (opt_enabled == 1) {
|
&cc->BCCH_pdu.payload[0],
|
||||||
trace_pdu(DIRECTION_DOWNLINK,
|
bcch_sdu_length,
|
||||||
&cc->BCCH_pdu.payload[0],
|
0xffff,
|
||||||
bcch_sdu_length,
|
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
||||||
0xffff,
|
|
||||||
WS_SI_RNTI, 0xffff, eNB->frame, eNB->subframe, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[eNB %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, CC_id, 0xffff,
|
|
||||||
bcch_sdu_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cc->tdd_Config != NULL) { //TDD
|
if (cc->tdd_Config != NULL) { //TDD
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
|
|||||||
@@ -1398,27 +1398,17 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
dlsch_pdu->payload[0][offset + sdu_length_total + j] = 0;
|
dlsch_pdu->payload[0][offset + sdu_length_total + j] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_enabled == 1) {
|
trace_pdu(DIRECTION_DOWNLINK,
|
||||||
trace_pdu(DIRECTION_DOWNLINK,
|
(uint8_t *) dlsch_pdu->payload[0],
|
||||||
(uint8_t *) dlsch_pdu->payload[0],
|
TBS,
|
||||||
TBS,
|
module_idP,
|
||||||
module_idP,
|
WS_C_RNTI,
|
||||||
WS_C_RNTI,
|
UE_RNTI(module_idP,
|
||||||
UE_RNTI(module_idP,
|
UE_id),
|
||||||
UE_id),
|
eNB->frame,
|
||||||
eNB->frame,
|
eNB->subframe,
|
||||||
eNB->subframe,
|
0,
|
||||||
0,
|
0);
|
||||||
0);
|
|
||||||
LOG_D(OPT, "[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
|
|
||||||
module_idP,
|
|
||||||
CC_id,
|
|
||||||
frameP,
|
|
||||||
UE_RNTI(module_idP,
|
|
||||||
UE_id),
|
|
||||||
TBS);
|
|
||||||
}
|
|
||||||
|
|
||||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
|
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
|
||||||
T_INT(module_idP),
|
T_INT(module_idP),
|
||||||
T_INT(CC_id),
|
T_INT(CC_id),
|
||||||
@@ -1482,7 +1472,7 @@ schedule_ue_spec(module_id_t module_idP,
|
|||||||
tpc = 1; //0
|
tpc = 1; //0
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(MAC, "[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d\n",
|
LOG_D(MAC, "[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, snr/target snr %d/%d (normal case)\n",
|
||||||
module_idP,
|
module_idP,
|
||||||
frameP,
|
frameP,
|
||||||
subframeP,
|
subframeP,
|
||||||
@@ -2319,25 +2309,16 @@ schedule_ue_spec_br(module_id_t module_idP,
|
|||||||
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = (char)(taus()&0xff);
|
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset + sdu_length_total + j] = (char)(taus()&0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_enabled == 1) {
|
trace_pdu(DIRECTION_DOWNLINK,
|
||||||
trace_pdu(1,
|
(uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
|
||||||
(uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
|
TBS,
|
||||||
TBS,
|
module_idP,
|
||||||
module_idP,
|
3,
|
||||||
3,
|
UE_RNTI(module_idP,UE_id),
|
||||||
UE_RNTI(module_idP,UE_id),
|
mac->frame,
|
||||||
mac->frame,
|
mac->subframe,
|
||||||
mac->subframe,
|
0,
|
||||||
0,
|
0);
|
||||||
0);
|
|
||||||
LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
|
|
||||||
module_idP,
|
|
||||||
CC_id,
|
|
||||||
frameP,
|
|
||||||
UE_RNTI(module_idP, UE_id),
|
|
||||||
TBS);
|
|
||||||
}
|
|
||||||
|
|
||||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
|
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA,
|
||||||
T_INT(module_idP),
|
T_INT(module_idP),
|
||||||
T_INT(CC_id),
|
T_INT(CC_id),
|
||||||
@@ -2530,25 +2511,16 @@ schedule_ue_spec_br(module_id_t module_idP,
|
|||||||
T_INT (subframeP),
|
T_INT (subframeP),
|
||||||
T_INT (0 /* harq_pid always 0? */ ),
|
T_INT (0 /* harq_pid always 0? */ ),
|
||||||
T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_id][0][UE_id].payload[0], TX_req->pdu_length));
|
T_BUFFER (&mac->UE_list.DLSCH_pdu[CC_id][0][UE_id].payload[0], TX_req->pdu_length));
|
||||||
|
trace_pdu(1,
|
||||||
if (opt_enabled == 1) {
|
(uint8_t *) mac->UE_list.DLSCH_pdu[CC_id][0][(unsigned char) UE_id].payload[0],
|
||||||
trace_pdu(1,
|
TX_req->pdu_length,
|
||||||
(uint8_t *) mac->UE_list.DLSCH_pdu[CC_id][0][(unsigned char) UE_id].payload[0],
|
UE_id,
|
||||||
TX_req->pdu_length,
|
3,
|
||||||
UE_id,
|
rnti,
|
||||||
3,
|
frameP,
|
||||||
rnti,
|
subframeP,
|
||||||
frameP,
|
0,
|
||||||
subframeP,
|
0);
|
||||||
0,
|
|
||||||
0);
|
|
||||||
LOG_D(OPT, "[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n",
|
|
||||||
module_idP,
|
|
||||||
CC_id,
|
|
||||||
frameP,
|
|
||||||
rnti,
|
|
||||||
TX_req->pdu_length);
|
|
||||||
}
|
|
||||||
} // end else if ((subframeP == 7) && (round_DL < 8))
|
} // end else if ((subframeP == 7) && (round_DL < 8))
|
||||||
} // end loop on UE_id
|
} // end loop on UE_id
|
||||||
}
|
}
|
||||||
@@ -3145,25 +3117,16 @@ schedule_PCH(module_id_t module_idP,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_enabled == 1) {
|
trace_pdu(DIRECTION_DOWNLINK,
|
||||||
trace_pdu(DIRECTION_DOWNLINK,
|
&eNB->common_channels[CC_id].PCCH_pdu.payload[0],
|
||||||
&eNB->common_channels[CC_id].PCCH_pdu.payload[0],
|
pcch_sdu_length,
|
||||||
pcch_sdu_length,
|
0xffff,
|
||||||
0xffff,
|
PCCH,
|
||||||
PCCH,
|
P_RNTI,
|
||||||
P_RNTI,
|
eNB->frame,
|
||||||
eNB->frame,
|
eNB->subframe,
|
||||||
eNB->subframe,
|
0,
|
||||||
0,
|
0);
|
||||||
0);
|
|
||||||
LOG_D(OPT,"[eNB %d][PCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
|
||||||
module_idP,
|
|
||||||
frameP,
|
|
||||||
CC_id,
|
|
||||||
0xffff,
|
|
||||||
pcch_sdu_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
eNB->eNB_stats[CC_id].total_num_pcch_pdu++;
|
eNB->eNB_stats[CC_id].total_num_pcch_pdu++;
|
||||||
eNB->eNB_stats[CC_id].pcch_buffer = pcch_sdu_length;
|
eNB->eNB_stats[CC_id].pcch_buffer = pcch_sdu_length;
|
||||||
eNB->eNB_stats[CC_id].total_pcch_buffer += pcch_sdu_length;
|
eNB->eNB_stats[CC_id].total_pcch_buffer += pcch_sdu_length;
|
||||||
|
|||||||
@@ -1681,14 +1681,9 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
|||||||
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset+sdu_length_total+j] = (char)(taus()&0xff);
|
UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0][offset+sdu_length_total+j] = (char)(taus()&0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_enabled == 1) {
|
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
|
||||||
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0],
|
TBS, module_idP, WS_RA_RNTI, UE_RNTI(module_idP, UE_id),
|
||||||
TBS, module_idP, WS_RA_RNTI, UE_RNTI(module_idP, UE_id),
|
eNB->frame, eNB->subframe,0,0);
|
||||||
eNB->frame, eNB->subframe,0,0);
|
|
||||||
LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d rnti %x with size %d\n",
|
|
||||||
module_idP, CC_id, frameP, UE_RNTI(module_idP, UE_id), TBS);
|
|
||||||
}
|
|
||||||
|
|
||||||
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
|
T(T_ENB_MAC_UE_DL_PDU_WITH_DATA, T_INT(module_idP), T_INT(CC_id), T_INT(rnti), T_INT(frameP), T_INT(subframeP),
|
||||||
T_INT(harq_pid), T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS));
|
T_INT(harq_pid), T_BUFFER(UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], TBS));
|
||||||
UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb;
|
UE_list->UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb;
|
||||||
@@ -1974,6 +1969,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
|||||||
int format_flag;
|
int format_flag;
|
||||||
nfapi_hi_dci0_request_body_t *HI_DCI0_req;
|
nfapi_hi_dci0_request_body_t *HI_DCI0_req;
|
||||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
|
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
|
||||||
|
int rrc_status;
|
||||||
|
|
||||||
for ( CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++ ) {
|
for ( CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++ ) {
|
||||||
//save ulsch dci number
|
//save ulsch dci number
|
||||||
@@ -2069,9 +2065,11 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
|||||||
}
|
}
|
||||||
|
|
||||||
UE_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
UE_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||||
|
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||||
|
|
||||||
if ( ((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
|
if ( ((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
|
||||||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP,UE_id)) < RRC_CONNECTED))) {
|
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) ||
|
||||||
|
((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) {
|
||||||
first_ue_id[CC_id][ue_first_num[CC_id]]= UE_id;
|
first_ue_id[CC_id][ue_first_num[CC_id]]= UE_id;
|
||||||
first_ue_total[CC_id] [ue_first_num[CC_id]] = 0;
|
first_ue_total[CC_id] [ue_first_num[CC_id]] = 0;
|
||||||
ue_first_num[CC_id]++;
|
ue_first_num[CC_id]++;
|
||||||
@@ -2176,10 +2174,12 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
|||||||
int bytes_to_schedule = UE_list->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_list->UE_template[CC_id][UE_id].scheduled_ul_bytes;
|
int bytes_to_schedule = UE_list->UE_template[CC_id][UE_id].estimated_ul_buffer - UE_list->UE_template[CC_id][UE_id].scheduled_ul_bytes;
|
||||||
|
|
||||||
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
|
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
|
||||||
|
rrc_status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||||
|
|
||||||
if ( (bytes_to_schedule > 0) || (UE_list->UE_template[CC_id][UE_id].ul_SR > 0) ||
|
if ( (bytes_to_schedule > 0) || (UE_list->UE_template[CC_id][UE_id].ul_SR > 0) ||
|
||||||
((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
|
((UE_sched_ctl->ul_inactivity_timer>20)&&(UE_sched_ctl->ul_scheduled==0)) ||
|
||||||
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP,UE_id)) < RRC_CONNECTED)) ) {
|
((UE_sched_ctl->ul_inactivity_timer>10)&&(UE_sched_ctl->ul_scheduled==0)&&(rrc_status < RRC_CONNECTED)) ||
|
||||||
|
((UE_sched_ctl->cqi_req_timer>300)&&((rrc_status >= RRC_CONNECTED))) ) {
|
||||||
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
|
hi_dci0_pdu = &HI_DCI0_req->hi_dci0_pdu_list[HI_DCI0_req->number_of_dci+HI_DCI0_req->number_of_hi];
|
||||||
format_flag = 2;
|
format_flag = 2;
|
||||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||||
@@ -2761,19 +2761,25 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
|||||||
|
|
||||||
if (status < RRC_CONNECTED)
|
if (status < RRC_CONNECTED)
|
||||||
cqi_req = 0;
|
cqi_req = 0;
|
||||||
else if (UE_sched_ctrl->cqi_req_timer>30) {
|
else if (UE_sched_ctrl->cqi_received == 1){
|
||||||
|
LOG_D(MAC,"Clearing CQI request timer\n");
|
||||||
|
UE_sched_ctrl->cqi_req_flag = 0;
|
||||||
|
UE_sched_ctrl->cqi_received = 0;
|
||||||
|
UE_sched_ctrl->cqi_req_timer = 0;
|
||||||
|
cqi_req = 0;
|
||||||
|
}else if (UE_sched_ctrl->cqi_req_timer>30) {
|
||||||
cqi_req = 1;
|
cqi_req = 1;
|
||||||
|
|
||||||
// To be safe , do not ask CQI in special SFs:36.213/7.2.3 CQI definition
|
// To be safe , do not ask CQI in special SFs:36.213/7.2.3 CQI definition
|
||||||
if (cc->tdd_Config) {
|
if (cc->tdd_Config) {
|
||||||
switch (cc->tdd_Config->subframeAssignment) {
|
switch (cc->tdd_Config->subframeAssignment) {
|
||||||
case 1:
|
case 1:
|
||||||
if( sched_subframeP == 1 || sched_subframeP == 6 ) cqi_req=0;
|
if( subframeP == 1 || subframeP == 6 ) cqi_req=0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
if( sched_subframeP == 1 ) cqi_req=0;
|
if( subframeP == 1 ) cqi_req=0;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2784,7 +2790,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(cqi_req == 1) {
|
if(cqi_req == 1) {
|
||||||
UE_sched_ctrl->cqi_req_timer=0;
|
|
||||||
UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP;
|
UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@@ -2818,7 +2823,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (tpc!=1) {
|
if (tpc!=1) {
|
||||||
LOG_D(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
|
LOG_D(MAC,"[eNB %d] ULSCH schedulerRR: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
|
||||||
module_idP,frameP,subframeP,harq_pid,tpc,
|
module_idP,frameP,subframeP,harq_pid,tpc,
|
||||||
tpc_accumulated,snr,target_snr);
|
tpc_accumulated,snr,target_snr);
|
||||||
}
|
}
|
||||||
@@ -2863,6 +2868,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
|||||||
//store for possible retransmission
|
//store for possible retransmission
|
||||||
UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index];
|
UE_template->nb_rb_ul[harq_pid] = rb_table[rb_table_index];
|
||||||
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
|
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
|
||||||
|
UE_template->cqi_req[harq_pid] = cqi_req;
|
||||||
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
|
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
|
||||||
|
|
||||||
if (UE_id == UE_list->head)
|
if (UE_id == UE_list->head)
|
||||||
@@ -3030,6 +3036,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
|||||||
//store for possible retransmission
|
//store for possible retransmission
|
||||||
UE_template->nb_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
|
UE_template->nb_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
|
||||||
UE_template->first_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb;
|
UE_template->first_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].start_rb;
|
||||||
|
cqi_req = UE_template->cqi_req[harq_pid];
|
||||||
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
|
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
|
||||||
// Cyclic shift for DM RS
|
// Cyclic shift for DM RS
|
||||||
cshift = 0;// values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
|
cshift = 0;// values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
|
||||||
|
|||||||
@@ -60,9 +60,7 @@
|
|||||||
extern RAN_CONTEXT_t RC;
|
extern RAN_CONTEXT_t RC;
|
||||||
|
|
||||||
|
|
||||||
int8_t
|
int8_t get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id, uint8_t mbsfn_sync_area) {
|
||||||
get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
|
|
||||||
uint8_t mbsfn_sync_area) {
|
|
||||||
// currently there is one-to-one mapping between sf allocation pattern and sync area
|
// currently there is one-to-one mapping between sf allocation pattern and sync area
|
||||||
if (mbsfn_sync_area >= MAX_MBSFN_AREA) {
|
if (mbsfn_sync_area >= MAX_MBSFN_AREA) {
|
||||||
LOG_W(MAC,
|
LOG_W(MAC,
|
||||||
@@ -81,9 +79,8 @@ get_mbsfn_sf_alloction(module_id_t module_idP, uint8_t CC_id,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
int schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP, sub_frame_t subframeP) {
|
||||||
sub_frame_t subframeP) {
|
|
||||||
int mcch_flag = 0, mtch_flag = 0, msi_flag = 0;
|
int mcch_flag = 0, mtch_flag = 0, msi_flag = 0;
|
||||||
int mbsfn_period = 0; // 1<<(RC.mac[module_idP]->mbsfn_SubframeConfig[0]->radioframeAllocationPeriod);
|
int mbsfn_period = 0; // 1<<(RC.mac[module_idP]->mbsfn_SubframeConfig[0]->radioframeAllocationPeriod);
|
||||||
int mcch_period = 0; //32<<(RC.mac[module_idP]->mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
|
int mcch_period = 0; //32<<(RC.mac[module_idP]->mbsfn_AreaInfo[0]->mcch_Config_r9.mcch_RepetitionPeriod_r9);
|
||||||
@@ -734,15 +731,8 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Tracing of PDU is done on UE side */
|
/* Tracing of PDU is done on UE side */
|
||||||
if (opt_enabled == 1) {
|
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI, 0xffff, // M_RNTI = 6 in wireshark
|
||||||
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) cc->MCH_pdu.payload, TBS, module_idP, WS_M_RNTI, 0xffff, // M_RNTI = 6 in wirehsark
|
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe, 0, 0);
|
||||||
RC.mac[module_idP]->frame,
|
|
||||||
RC.mac[module_idP]->subframe, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[eNB %d][MCH] CC_id %d Frame %d : MAC PDU with size %d\n",
|
|
||||||
module_idP, CC_id, frameP, TBS);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
for (j=0;j<sdu_length_total;j++)
|
for (j=0;j<sdu_length_total;j++)
|
||||||
printf("%2x.",RC.mac[module_idP]->MCH_pdu.payload[j+offset]);
|
printf("%2x.",RC.mac[module_idP]->MCH_pdu.payload[j+offset]);
|
||||||
@@ -771,8 +761,8 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
MCH_PDU *get_mch_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
|
||||||
sub_frame_t subframeP) {
|
MCH_PDU *get_mch_sdu(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t subframeP) {
|
||||||
// RC.mac[module_idP]->MCH_pdu.mcs=0;
|
// RC.mac[module_idP]->MCH_pdu.mcs=0;
|
||||||
//LOG_D(MAC," MCH_pdu.mcs is %d\n", RC.mac[module_idP]->MCH_pdu.mcs);
|
//LOG_D(MAC," MCH_pdu.mcs is %d\n", RC.mac[module_idP]->MCH_pdu.mcs);
|
||||||
//#warning "MCH pdu should take the CC_id index"
|
//#warning "MCH pdu should take the CC_id index"
|
||||||
|
|||||||
@@ -2495,6 +2495,7 @@ UE_is_to_be_scheduled(module_id_t module_idP,
|
|||||||
{
|
{
|
||||||
UE_TEMPLATE *UE_template = &RC.mac[module_idP]->UE_list.UE_template[CC_id][UE_id];
|
UE_TEMPLATE *UE_template = &RC.mac[module_idP]->UE_list.UE_template[CC_id][UE_id];
|
||||||
UE_sched_ctrl_t *UE_sched_ctl = &RC.mac[module_idP]->UE_list.UE_sched_ctrl[UE_id];
|
UE_sched_ctrl_t *UE_sched_ctl = &RC.mac[module_idP]->UE_list.UE_sched_ctrl[UE_id];
|
||||||
|
int rrc_status;
|
||||||
|
|
||||||
// do not schedule UE if UL is not working
|
// do not schedule UE if UL is not working
|
||||||
if (UE_sched_ctl->ul_failure_timer > 0 || UE_sched_ctl->ul_out_of_sync > 0)
|
if (UE_sched_ctl->ul_failure_timer > 0 || UE_sched_ctl->ul_out_of_sync > 0)
|
||||||
@@ -2506,13 +2507,14 @@ UE_is_to_be_scheduled(module_id_t module_idP,
|
|||||||
UE_id,
|
UE_id,
|
||||||
ue_rnti);
|
ue_rnti);
|
||||||
|
|
||||||
|
rrc_status = mac_eNB_get_rrc_status(module_idP, ue_rnti);
|
||||||
|
|
||||||
if (UE_template->scheduled_ul_bytes < UE_template->estimated_ul_buffer ||
|
if (UE_template->scheduled_ul_bytes < UE_template->estimated_ul_buffer ||
|
||||||
UE_template->ul_SR > 0 || // uplink scheduling request
|
UE_template->ul_SR > 0 || // uplink scheduling request
|
||||||
(UE_sched_ctl->ul_inactivity_timer > 19 && UE_sched_ctl->ul_scheduled == 0) || // every 2 frames when RRC_CONNECTED
|
(UE_sched_ctl->ul_inactivity_timer > 19 && UE_sched_ctl->ul_scheduled == 0) || // every 2 frames when RRC_CONNECTED
|
||||||
(UE_sched_ctl->ul_inactivity_timer > 10 &&
|
(UE_sched_ctl->ul_inactivity_timer > 10 &&
|
||||||
UE_sched_ctl->ul_scheduled == 0 &&
|
UE_sched_ctl->ul_scheduled == 0 && rrc_status < RRC_CONNECTED) || // every Frame when not RRC_CONNECTED
|
||||||
mac_eNB_get_rrc_status(module_idP,
|
(UE_sched_ctl->cqi_req_timer > 300 && rrc_status >= RRC_CONNECTED)) { // cqi req timer expired long ago (do not put too low value)
|
||||||
ue_rnti) < RRC_CONNECTED)) { // every Frame when not RRC_CONNECTED
|
|
||||||
LOG_D(MAC, "[eNB %d][PUSCH] UE %d/%x should be scheduled (BSR0 estimated size %d, SR %d)\n",
|
LOG_D(MAC, "[eNB %d][PUSCH] UE %d/%x should be scheduled (BSR0 estimated size %d, SR %d)\n",
|
||||||
module_idP,
|
module_idP,
|
||||||
UE_id,
|
UE_id,
|
||||||
|
|||||||
@@ -85,11 +85,10 @@ uint8_t rb_table[34] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// This table hold the possible number of MTC repetition for CE ModeA
|
// This table hold the possible number of MTC repetition for CE ModeA
|
||||||
const uint8_t pusch_repetition_Table8_2_36213[3][4]=
|
const uint8_t pusch_repetition_Table8_2_36213[3][4]= {
|
||||||
{
|
{1, 2, 4, 8 },
|
||||||
{1 , 2 , 4 , 8 },
|
{1, 4, 8, 16},
|
||||||
{1 , 4 , 8 , 16},
|
{1, 4, 16, 32}
|
||||||
{1 , 4 , 16, 32}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern mui_t rrc_eNB_mui;
|
extern mui_t rrc_eNB_mui;
|
||||||
@@ -142,15 +141,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
memset(rx_lengths, 0, NB_RB_MAX * sizeof(unsigned short));
|
memset(rx_lengths, 0, NB_RB_MAX * sizeof(unsigned short));
|
||||||
start_meas(&mac->rx_ulsch_sdu);
|
start_meas(&mac->rx_ulsch_sdu);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 1);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_SDU, 1);
|
||||||
|
trace_pdu(DIRECTION_UPLINK, sduP, sdu_lenP, 0, WS_C_RNTI, current_rnti, frameP, subframeP, 0, 0);
|
||||||
if (opt_enabled == 1) {
|
|
||||||
trace_pdu(DIRECTION_UPLINK, sduP, sdu_lenP, 0, WS_C_RNTI, current_rnti, frameP, subframeP, 0, 0);
|
|
||||||
LOG_D(OPT, "[eNB %d][ULSCH] Frame %d rnti %x with size %d\n",
|
|
||||||
enb_mod_idP,
|
|
||||||
frameP,
|
|
||||||
current_rnti,
|
|
||||||
sdu_lenP);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UE_id != -1) {
|
if (UE_id != -1) {
|
||||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||||
@@ -301,22 +292,20 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
if (ra->msg3_round >= mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
|
if (ra->msg3_round >= mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx - 1) {
|
||||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
||||||
} else {
|
} else {
|
||||||
if (ra->rach_resource_type > 0) {
|
if (ra->rach_resource_type > 0) {
|
||||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); // TODO: Currently we don't support retransmission of Msg3 ( If in error Cancel RA procedure and reattach)
|
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); // TODO: Currently we don't support retransmission of Msg3 ( If in error Cancel RA procedure and reattach)
|
||||||
}
|
} else {
|
||||||
else
|
// first_rb = UE_template_ptr->first_rb_ul[harq_pid]; // UE_id = -1 !!!!
|
||||||
{
|
ra->msg3_round++;
|
||||||
// first_rb = UE_template_ptr->first_rb_ul[harq_pid]; // UE_id = -1 !!!!
|
/* Prepare handling of retransmission */
|
||||||
ra->msg3_round++;
|
get_Msg3allocret(&mac->common_channels[CC_idP],
|
||||||
/* Prepare handling of retransmission */
|
ra->Msg3_subframe,
|
||||||
get_Msg3allocret(&mac->common_channels[CC_idP],
|
ra->Msg3_frame,
|
||||||
ra->Msg3_subframe,
|
&ra->Msg3_frame,
|
||||||
ra->Msg3_frame,
|
&ra->Msg3_subframe);
|
||||||
&ra->Msg3_frame,
|
// prepare handling of retransmission
|
||||||
&ra->Msg3_subframe);
|
add_msg3(enb_mod_idP, CC_idP, ra, frameP, subframeP);
|
||||||
// prepare handling of retransmission
|
}
|
||||||
add_msg3(enb_mod_idP, CC_idP, ra, frameP, subframeP);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: program NACK for PHICH? */
|
/* TODO: program NACK for PHICH? */
|
||||||
@@ -466,13 +455,15 @@ rx_sdu(const module_id_t enb_mod_idP,
|
|||||||
RA_t *ra = &(mac->common_channels[CC_idP].ra[RA_id]);
|
RA_t *ra = &(mac->common_channels[CC_idP].ra[RA_id]);
|
||||||
int8_t ret = mac_rrc_data_ind(enb_mod_idP,
|
int8_t ret = mac_rrc_data_ind(enb_mod_idP,
|
||||||
CC_idP,
|
CC_idP,
|
||||||
frameP, subframeP,
|
frameP,
|
||||||
|
subframeP,
|
||||||
UE_id,
|
UE_id,
|
||||||
old_rnti,
|
old_rnti,
|
||||||
DCCH,
|
DCCH,
|
||||||
(uint8_t *) payload_ptr,
|
(uint8_t *) payload_ptr,
|
||||||
rx_lengths[i],
|
rx_lengths[i],
|
||||||
0,ra->rach_resource_type > 0
|
0,
|
||||||
|
ra->rach_resource_type > 0
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Received a new rnti */
|
/* Received a new rnti */
|
||||||
@@ -1944,8 +1935,8 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
|||||||
UE_list_t *UE_list = &(eNB->UE_list);
|
UE_list_t *UE_list = &(eNB->UE_list);
|
||||||
UE_TEMPLATE *UE_template = NULL;
|
UE_TEMPLATE *UE_template = NULL;
|
||||||
UE_sched_ctrl_t *UE_sched_ctrl = NULL;
|
UE_sched_ctrl_t *UE_sched_ctrl = NULL;
|
||||||
uint8_t Total_Num_Rep_ULSCH,pusch_maxNumRepetitionCEmodeA_r13;
|
uint8_t Total_Num_Rep_ULSCH,pusch_maxNumRepetitionCEmodeA_r13;
|
||||||
uint8_t UL_Scheduling_DCI_SF,UL_Scheduling_DCI_Frame_Even_Odd_Flag; //TODO: To be removed after scheduler relaxation Task
|
uint8_t UL_Scheduling_DCI_SF,UL_Scheduling_DCI_Frame_Even_Odd_Flag; //TODO: To be removed after scheduler relaxation Task
|
||||||
|
|
||||||
if (sched_subframeP < subframeP) {
|
if (sched_subframeP < subframeP) {
|
||||||
sched_frame++;
|
sched_frame++;
|
||||||
@@ -2013,366 +2004,361 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
|||||||
N_RB_UL);
|
N_RB_UL);
|
||||||
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->estimated_ul_buffer;
|
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->estimated_ul_buffer;
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO, UE_template->estimated_ul_buffer);
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BO, UE_template->estimated_ul_buffer);
|
||||||
|
|
||||||
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
|
pusch_maxNumRepetitionCEmodeA_r13= *(rrc->configuration.pusch_maxNumRepetitionCEmodeA_r13[CC_id]);
|
||||||
Total_Num_Rep_ULSCH = pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][UE_template->pusch_repetition_levels];
|
Total_Num_Rep_ULSCH = pusch_repetition_Table8_2_36213[pusch_maxNumRepetitionCEmodeA_r13][UE_template->pusch_repetition_levels];
|
||||||
UL_Scheduling_DCI_SF = (40-4 - Total_Num_Rep_ULSCH)%10; //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
UL_Scheduling_DCI_SF = (40-4 - Total_Num_Rep_ULSCH)%10; //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||||
UL_Scheduling_DCI_Frame_Even_Odd_Flag= ! (((40-4 - Total_Num_Rep_ULSCH)/10 )%2); //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
UL_Scheduling_DCI_Frame_Even_Odd_Flag= ! (((40-4 - Total_Num_Rep_ULSCH)/10 )%2); //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||||
|
|
||||||
/* If frameP odd don't schedule */
|
/* If frameP odd don't schedule */
|
||||||
if ((frameP&1) == UL_Scheduling_DCI_Frame_Even_Odd_Flag) //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
if ((frameP&1) == UL_Scheduling_DCI_Frame_Even_Odd_Flag) { //TODO: [eMTC Scheduler] To be removed after scheduler relaxation task
|
||||||
{
|
//if ((UE_is_to_be_scheduled(module_idP, CC_id, UE_id) > 0) && (subframeP == 5)) {
|
||||||
|
if ((UE_template->ul_SR > 0 || round_UL > 0 || status < RRC_CONNECTED) && (subframeP == UL_Scheduling_DCI_SF)) {
|
||||||
|
/*
|
||||||
|
* if there is information on bsr of DCCH, DTCH,
|
||||||
|
* or if there is UL_SR,
|
||||||
|
* or if there is a packet to retransmit,
|
||||||
|
* or we want to schedule a periodic feedback every frame
|
||||||
|
*/
|
||||||
|
LOG_D(MAC,"[eNB %d][PUSCH %d] Frame %d subframe %d Scheduling UE %d/%x in round_UL %d(SR %d,UL_inactivity timer %d,UL_failure timer %d,cqi_req_timer %d)\n",
|
||||||
|
module_idP,
|
||||||
|
harq_pid,
|
||||||
|
frameP,
|
||||||
|
subframeP,
|
||||||
|
UE_id,
|
||||||
|
rnti,
|
||||||
|
round_UL,
|
||||||
|
UE_template->ul_SR,
|
||||||
|
UE_sched_ctrl->ul_inactivity_timer,
|
||||||
|
UE_sched_ctrl->ul_failure_timer,
|
||||||
|
UE_sched_ctrl->cqi_req_timer);
|
||||||
|
/* Reset the scheduling request */
|
||||||
|
emtc_active[CC_id] = 1;
|
||||||
|
UE_template->ul_SR = 0;
|
||||||
|
status = mac_eNB_get_rrc_status(module_idP,rnti);
|
||||||
|
cqi_req = 0;
|
||||||
|
/* Power control: compute the expected ULSCH RX snr (for the stats) */
|
||||||
|
/* This is the normalized snr and this should be constant (regardless of mcs) */
|
||||||
|
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
||||||
|
target_snr = eNB->puSch10xSnr / 10; /* TODO: target_rx_power was 178, what to put? */
|
||||||
|
/* This assumes accumulated tpc */
|
||||||
|
/* Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out */
|
||||||
|
int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame * 10 + UE_template->pusch_tpc_tx_subframe;
|
||||||
|
|
||||||
|
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || // normal case
|
||||||
|
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) { // frame wrap-around
|
||||||
|
UE_template->pusch_tpc_tx_frame = frameP;
|
||||||
|
UE_template->pusch_tpc_tx_subframe = subframeP;
|
||||||
|
|
||||||
//if ((UE_is_to_be_scheduled(module_idP, CC_id, UE_id) > 0) && (subframeP == 5)) {
|
if (snr > target_snr + 4) {
|
||||||
if ((UE_template->ul_SR > 0 || round_UL > 0 || status < RRC_CONNECTED) && (subframeP == UL_Scheduling_DCI_SF)) {
|
tpc = 0; //-1
|
||||||
/*
|
UE_sched_ctrl->tpc_accumulated[CC_id]--;
|
||||||
* if there is information on bsr of DCCH, DTCH,
|
} else if (snr < target_snr - 4) {
|
||||||
* or if there is UL_SR,
|
tpc = 2; //+1
|
||||||
* or if there is a packet to retransmit,
|
UE_sched_ctrl->tpc_accumulated[CC_id]++;
|
||||||
* or we want to schedule a periodic feedback every frame
|
} else {
|
||||||
*/
|
tpc = 1; //0
|
||||||
LOG_D(MAC,"[eNB %d][PUSCH %d] Frame %d subframe %d Scheduling UE %d/%x in round_UL %d(SR %d,UL_inactivity timer %d,UL_failure timer %d,cqi_req_timer %d)\n",
|
}
|
||||||
module_idP,
|
|
||||||
harq_pid,
|
|
||||||
frameP,
|
|
||||||
subframeP,
|
|
||||||
UE_id,
|
|
||||||
rnti,
|
|
||||||
round_UL,
|
|
||||||
UE_template->ul_SR,
|
|
||||||
UE_sched_ctrl->ul_inactivity_timer,
|
|
||||||
UE_sched_ctrl->ul_failure_timer,
|
|
||||||
UE_sched_ctrl->cqi_req_timer);
|
|
||||||
/* Reset the scheduling request */
|
|
||||||
emtc_active[CC_id] = 1;
|
|
||||||
UE_template->ul_SR = 0;
|
|
||||||
status = mac_eNB_get_rrc_status(module_idP,rnti);
|
|
||||||
cqi_req = 0;
|
|
||||||
/* Power control: compute the expected ULSCH RX snr (for the stats) */
|
|
||||||
/* This is the normalized snr and this should be constant (regardless of mcs) */
|
|
||||||
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
|
||||||
target_snr = eNB->puSch10xSnr / 10; /* TODO: target_rx_power was 178, what to put? */
|
|
||||||
/* This assumes accumulated tpc */
|
|
||||||
/* Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out */
|
|
||||||
int32_t framex10psubframe = UE_template->pusch_tpc_tx_frame * 10 + UE_template->pusch_tpc_tx_subframe;
|
|
||||||
|
|
||||||
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || // normal case
|
|
||||||
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) { // frame wrap-around
|
|
||||||
UE_template->pusch_tpc_tx_frame = frameP;
|
|
||||||
UE_template->pusch_tpc_tx_subframe = subframeP;
|
|
||||||
|
|
||||||
if (snr > target_snr + 4) {
|
|
||||||
tpc = 0; //-1
|
|
||||||
UE_sched_ctrl->tpc_accumulated[CC_id]--;
|
|
||||||
} else if (snr < target_snr - 4) {
|
|
||||||
tpc = 2; //+1
|
|
||||||
UE_sched_ctrl->tpc_accumulated[CC_id]++;
|
|
||||||
} else {
|
} else {
|
||||||
tpc = 1; //0
|
tpc = 1; //0
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
tpc = 1; //0
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tpc != 1) {
|
if (tpc != 1) {
|
||||||
LOG_D(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
|
LOG_D(MAC,"[eNB %d] ULSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, snr/target snr %d/%d\n",
|
||||||
module_idP,
|
module_idP,
|
||||||
frameP,
|
frameP,
|
||||||
subframeP,
|
subframeP,
|
||||||
harq_pid,
|
harq_pid,
|
||||||
tpc,
|
tpc,
|
||||||
UE_sched_ctrl->tpc_accumulated[CC_id],
|
UE_sched_ctrl->tpc_accumulated[CC_id],
|
||||||
snr,
|
snr,
|
||||||
target_snr);
|
target_snr);
|
||||||
}
|
|
||||||
|
|
||||||
/* New transmission */
|
|
||||||
if (round_UL == 0) {
|
|
||||||
ndi = 1 - UE_template->oldNDI_UL[harq_pid];
|
|
||||||
UE_template->oldNDI_UL[harq_pid] = ndi;
|
|
||||||
UE_template->mcs_UL[harq_pid] = 4;
|
|
||||||
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid], 6);
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = 4;
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = UE_template->mcs_UL[harq_pid];
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += 6;
|
|
||||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = UE_template->TBS_UL[harq_pid];
|
|
||||||
T(T_ENB_MAC_UE_UL_SCHEDULE,
|
|
||||||
T_INT(module_idP),
|
|
||||||
T_INT(CC_id),
|
|
||||||
T_INT(rnti),
|
|
||||||
T_INT(frameP),
|
|
||||||
T_INT(subframeP),
|
|
||||||
T_INT(harq_pid),
|
|
||||||
T_INT(UE_template->mcs_UL[harq_pid]),
|
|
||||||
T_INT(0),
|
|
||||||
T_INT(6),
|
|
||||||
T_INT(UE_template->TBS_UL[harq_pid]),
|
|
||||||
T_INT(ndi));
|
|
||||||
/* Store for possible retransmission */
|
|
||||||
UE_template->nb_rb_ul[harq_pid] = 6;
|
|
||||||
UE_sched_ctrl->ul_scheduled |= (1 << harq_pid);
|
|
||||||
|
|
||||||
if (UE_id == UE_list->head) {
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED, UE_sched_ctrl->ul_scheduled);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Adjust total UL buffer status by TBS, wait for UL sdus to do final update */
|
/* New transmission */
|
||||||
UE_template->scheduled_ul_bytes += UE_template->TBS_UL[harq_pid];
|
if (round_UL == 0) {
|
||||||
LOG_D(MAC, "scheduled_ul_bytes, new %d\n", UE_template->scheduled_ul_bytes);
|
ndi = 1 - UE_template->oldNDI_UL[harq_pid];
|
||||||
/* Cyclic shift for DMRS */
|
UE_template->oldNDI_UL[harq_pid] = ndi;
|
||||||
cshift = 0; // values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
|
UE_template->mcs_UL[harq_pid] = 4;
|
||||||
/* save it for a potential retransmission */
|
UE_template->TBS_UL[harq_pid] = get_TBS_UL(UE_template->mcs_UL[harq_pid], 6);
|
||||||
UE_template->cshift[harq_pid] = cshift;
|
UE_list->eNB_UE_stats[CC_id][UE_id].snr = snr;
|
||||||
AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n");
|
UE_list->eNB_UE_stats[CC_id][UE_id].target_snr = target_snr;
|
||||||
AssertFatal (UE_template->physicalConfigDedicated->ext4 != NULL, "UE_template->physicalConfigDedicated->ext4 is null\n");
|
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs1 = 4;
|
||||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 != NULL, "UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
|
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = UE_template->mcs_UL[harq_pid];
|
||||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present == LTE_EPDCCH_Config_r11__config_r11_PR_setup,
|
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += 6;
|
||||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present != setup\n");
|
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = UE_template->TBS_UL[harq_pid];
|
||||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 != NULL,
|
T(T_ENB_MAC_UE_UL_SCHEDULE,
|
||||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = NULL\n");
|
T_INT(module_idP),
|
||||||
LTE_EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0];
|
T_INT(CC_id),
|
||||||
AssertFatal(epdcch_setconfig_r11 != NULL, "epdcch_setconfig_r11 is null\n");
|
T_INT(rnti),
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2 != NULL, "epdcch_setconfig_r11->ext2 is null\n");
|
T_INT(frameP),
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
T_INT(subframeP),
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->present == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup,
|
T_INT(harq_pid),
|
||||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->present is not setup\n");
|
T_INT(UE_template->mcs_UL[harq_pid]),
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 != NULL, "epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 is null");
|
T_INT(0),
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present == LTE_EPDCCH_SetConfig_r11__ext2__numberPRB_Pairs_v1310_PR_setup,
|
T_INT(6),
|
||||||
"epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present is not setup\n");
|
T_INT(UE_template->TBS_UL[harq_pid]),
|
||||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL 6-0A MPDCCH for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d, UESS MPDCCH Narrowband %d\n",
|
T_INT(ndi));
|
||||||
harq_pid,
|
/* Store for possible retransmission */
|
||||||
frameP,
|
UE_template->nb_rb_ul[harq_pid] = 6;
|
||||||
subframeP,
|
UE_sched_ctrl->ul_scheduled |= (1 << harq_pid);
|
||||||
UE_id,
|
|
||||||
rnti,
|
if (UE_id == UE_list->head) {
|
||||||
sched_frame,
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_UE0_SCHEDULED, UE_sched_ctrl->ul_scheduled);
|
||||||
sched_subframeP,
|
}
|
||||||
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
|
||||||
UE_template->first_rb_ul[harq_pid] = narrowband_to_first_rb (cc, epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
/* Adjust total UL buffer status by TBS, wait for UL sdus to do final update */
|
||||||
hi_dci0_pdu = &(hi_dci0_req->hi_dci0_pdu_list[hi_dci0_req->number_of_dci + hi_dci0_req->number_of_hi]);
|
UE_template->scheduled_ul_bytes += UE_template->TBS_UL[harq_pid];
|
||||||
memset((void *) hi_dci0_pdu, 0, sizeof(nfapi_hi_dci0_request_pdu_t));
|
LOG_D(MAC, "scheduled_ul_bytes, new %d\n", UE_template->scheduled_ul_bytes);
|
||||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE;
|
/* Cyclic shift for DMRS */
|
||||||
hi_dci0_pdu->pdu_size = (uint8_t) (2 + sizeof (nfapi_dl_config_mpdcch_pdu));
|
cshift = 0; // values from 0 to 7 can be used for mapping the cyclic shift (36.211 , Table 5.5.2.1.1-1)
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_format = (UE_template->rach_resource_type > 1) ? 5 : 4;
|
/* save it for a potential retransmission */
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type > 1) ? 2 : 1;
|
UE_template->cshift[harq_pid] = cshift;
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_narrowband = epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1;
|
AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_prb_pairs = 6; // checked above that it has to be this
|
AssertFatal (UE_template->physicalConfigDedicated->ext4 != NULL, "UE_template->physicalConfigDedicated->ext4 is null\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_assignment = 0; // Note: this can be dynamic
|
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 != NULL, "UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_transmission_type = epdcch_setconfig_r11->transmissionType_r11; // distibuted
|
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present == LTE_EPDCCH_Config_r11__config_r11_PR_setup,
|
||||||
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 != NULL,
|
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present != setup\n");
|
||||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 is null\n");
|
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 != NULL,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.start_symbol = *UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11;
|
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = NULL\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
|
LTE_EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0];
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.aggreagation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
|
AssertFatal(epdcch_setconfig_r11 != NULL, "epdcch_setconfig_r11 is null\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti_type = 4; // other
|
AssertFatal(epdcch_setconfig_r11->ext2 != NULL, "epdcch_setconfig_r11->ext2 is null\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti = rnti;
|
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type < 3) ? 1 : 2; // already set above...
|
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->present == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.drms_scrambling_init = epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11;
|
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->present is not setup\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.initial_transmission_sf_io = (frameP * 10) + subframeP;
|
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 != NULL, "epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 is null");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.transmission_power = 6000; // 0dB
|
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present == LTE_EPDCCH_SetConfig_r11__ext2__numberPRB_Pairs_v1310_PR_setup,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
"epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present is not setup\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_resource_blocks = 6;
|
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL 6-0A MPDCCH for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d, UESS MPDCCH Narrowband %d\n",
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mcs = 4; // adjust according to size of RAR, 208 bits with N1A_PRB = 3
|
harq_pid,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.pusch_repetition_levels = UE_template->pusch_repetition_levels;
|
frameP,
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off,
|
subframeP,
|
||||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->mpdcch_pdsch_HoppingConfig_r13 is not off\n");
|
UE_id,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.frequency_hopping_flag = 1 - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13;
|
rnti,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.redudency_version = 0;
|
sched_frame,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.new_data_indication = UE_template->oldNDI_UL[harq_pid];
|
sched_subframeP,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.harq_process = 0;
|
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tpc = tpc;
|
UE_template->first_rb_ul[harq_pid] = narrowband_to_first_rb (cc, epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.csi_request = cqi_req;
|
hi_dci0_pdu = &(hi_dci0_req->hi_dci0_pdu_list[hi_dci0_req->number_of_dci + hi_dci0_req->number_of_hi]);
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ul_inex = 0;
|
memset((void *) hi_dci0_pdu, 0, sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dai_presence_flag = 0;
|
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE;
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dl_assignment_index = 0;
|
hi_dci0_pdu->pdu_size = (uint8_t) (2 + sizeof (nfapi_dl_config_mpdcch_pdu));
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.srs_request = 0;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_format = (UE_template->rach_resource_type > 1) ? 5 : 4;
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_subframe_repetition_number = 0;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type > 1) ? 2 : 1;
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tcp_bitmap = 0;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_narrowband = epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1;
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.total_dci_length_include_padding = 29; // hard-coded for 10 MHz
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_prb_pairs = 6; // checked above that it has to be this
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_tx_antenna_ports = 1;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_assignment = 0; // Note: this can be dynamic
|
||||||
hi_dci0_req->number_of_dci++;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_transmission_type = epdcch_setconfig_r11->transmissionType_r11; // distibuted
|
||||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG. Request for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d, UESS mpdcch narrowband %d\n",
|
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 != NULL,
|
||||||
harq_pid,
|
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 is null\n");
|
||||||
frameP,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.start_symbol = *UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11;
|
||||||
subframeP,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
|
||||||
UE_id,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.aggreagation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
|
||||||
rnti,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti_type = 4; // other
|
||||||
sched_frame,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti = rnti;
|
||||||
sched_subframeP,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type < 3) ? 1 : 2; // already set above...
|
||||||
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.drms_scrambling_init = epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11;
|
||||||
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.initial_transmission_sf_io = (frameP * 10) + subframeP;
|
||||||
cqi_req,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.transmission_power = 6000; // 0dB
|
||||||
cc,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
||||||
UE_template->physicalConfigDedicated,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_resource_blocks = 6;
|
||||||
get_tmode(module_idP,CC_id,UE_id),
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mcs = 4; // adjust according to size of RAR, 208 bits with N1A_PRB = 3
|
||||||
eNB->ul_handle,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.pusch_repetition_levels = UE_template->pusch_repetition_levels;
|
||||||
rnti,
|
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off,
|
||||||
UE_template->first_rb_ul[harq_pid], // resource_block_start
|
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->mpdcch_pdsch_HoppingConfig_r13 is not off\n");
|
||||||
UE_template->nb_rb_ul[harq_pid], // number_of_resource_blocks
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.frequency_hopping_flag = 1 - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13;
|
||||||
UE_template->mcs_UL[harq_pid],
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.redudency_version = 0;
|
||||||
cshift, // cyclic_shift_2_for_drms
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.new_data_indication = UE_template->oldNDI_UL[harq_pid];
|
||||||
0, // frequency_hopping_enabled_flag
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.harq_process = 0;
|
||||||
0, // frequency_hopping_bits
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tpc = tpc;
|
||||||
UE_template->oldNDI_UL[harq_pid], // new_data_indication
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.csi_request = cqi_req;
|
||||||
rvidx_tab[round_UL&3], // redundancy_version
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ul_inex = 0;
|
||||||
harq_pid, // harq_process_number
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dai_presence_flag = 0;
|
||||||
0, // ul_tx_mode
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dl_assignment_index = 0;
|
||||||
0, // current_tx_nb
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.srs_request = 0;
|
||||||
0, // n_srs
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_subframe_repetition_number = 0;
|
||||||
UE_template->TBS_UL[harq_pid]
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tcp_bitmap = 0;
|
||||||
);
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.total_dci_length_include_padding = 29; // hard-coded for 10 MHz
|
||||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_tx_antenna_ports = 1;
|
||||||
UE_template->rach_resource_type > 2 ? 2 : 1,
|
hi_dci0_req->number_of_dci++;
|
||||||
Total_Num_Rep_ULSCH, // total_number_of_repetitions
|
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG. Request for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d, UESS mpdcch narrowband %d\n",
|
||||||
1, // repetition_number
|
harq_pid,
|
||||||
(frameP * 10) + subframeP);
|
frameP,
|
||||||
ul_req_tmp->number_of_pdus++;
|
subframeP,
|
||||||
eNB->ul_handle++;
|
UE_id,
|
||||||
add_ue_ulsch_info(module_idP,
|
rnti,
|
||||||
CC_id,
|
sched_frame,
|
||||||
UE_id,
|
sched_subframeP,
|
||||||
subframeP,
|
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||||
S_UL_SCHEDULED);
|
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||||
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n",
|
cqi_req,
|
||||||
module_idP,
|
cc,
|
||||||
CC_id,
|
UE_template->physicalConfigDedicated,
|
||||||
frameP,
|
get_tmode(module_idP,CC_id,UE_id),
|
||||||
subframeP,
|
eNB->ul_handle,
|
||||||
UE_id);
|
rnti,
|
||||||
} else { // round_UL > 0 => retransmission
|
UE_template->first_rb_ul[harq_pid], // resource_block_start
|
||||||
/* In LTE-M the UL HARQ process is asynchronous */
|
UE_template->nb_rb_ul[harq_pid], // number_of_resource_blocks
|
||||||
T(T_ENB_MAC_UE_UL_SCHEDULE_RETRANSMISSION,
|
UE_template->mcs_UL[harq_pid],
|
||||||
T_INT(module_idP),
|
cshift, // cyclic_shift_2_for_drms
|
||||||
T_INT(CC_id),
|
0, // frequency_hopping_enabled_flag
|
||||||
T_INT(rnti),
|
0, // frequency_hopping_bits
|
||||||
T_INT(frameP),
|
UE_template->oldNDI_UL[harq_pid], // new_data_indication
|
||||||
T_INT(subframeP),
|
rvidx_tab[round_UL&3], // redundancy_version
|
||||||
T_INT(harq_pid),
|
harq_pid, // harq_process_number
|
||||||
T_INT(UE_template->mcs_UL[harq_pid]),
|
0, // ul_tx_mode
|
||||||
T_INT(0),
|
0, // current_tx_nb
|
||||||
T_INT(6),
|
0, // n_srs
|
||||||
T_INT(round_UL));
|
UE_template->TBS_UL[harq_pid]
|
||||||
AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n");
|
);
|
||||||
AssertFatal (UE_template->physicalConfigDedicated->ext4 != NULL, "UE_template->physicalConfigDedicated->ext4 is null\n");
|
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 != NULL, "UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
|
UE_template->rach_resource_type > 2 ? 2 : 1,
|
||||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present == LTE_EPDCCH_Config_r11__config_r11_PR_setup,
|
Total_Num_Rep_ULSCH, // total_number_of_repetitions
|
||||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present != setup\n");
|
1, // repetition_number
|
||||||
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 != NULL,
|
(frameP * 10) + subframeP);
|
||||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = NULL\n");
|
ul_req_tmp->number_of_pdus++;
|
||||||
LTE_EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0];
|
eNB->ul_handle++;
|
||||||
AssertFatal(epdcch_setconfig_r11 != NULL, "epdcch_setconfig_r11 is null\n");
|
add_ue_ulsch_info(module_idP,
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2 != NULL, "epdcch_setconfig_r11->ext2 is null\n");
|
CC_id,
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
UE_id,
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
subframeP,
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->present == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup,
|
S_UL_SCHEDULED);
|
||||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->present is not setup\n");
|
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n",
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 != NULL, "epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 is null");
|
module_idP,
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present == LTE_EPDCCH_SetConfig_r11__ext2__numberPRB_Pairs_v1310_PR_setup,
|
CC_id,
|
||||||
"epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present is not setup\n");
|
frameP,
|
||||||
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL 6-0A MPDCCH for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d,UESS MPDCCH Narrowband %d\n",
|
subframeP,
|
||||||
harq_pid,
|
UE_id);
|
||||||
frameP,
|
} else { // round_UL > 0 => retransmission
|
||||||
subframeP,
|
/* In LTE-M the UL HARQ process is asynchronous */
|
||||||
UE_id,
|
T(T_ENB_MAC_UE_UL_SCHEDULE_RETRANSMISSION,
|
||||||
rnti,
|
T_INT(module_idP),
|
||||||
sched_frame,
|
T_INT(CC_id),
|
||||||
sched_subframeP,
|
T_INT(rnti),
|
||||||
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
T_INT(frameP),
|
||||||
UE_template->first_rb_ul[harq_pid] = narrowband_to_first_rb(cc, epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13-1);
|
T_INT(subframeP),
|
||||||
hi_dci0_pdu = &(hi_dci0_req->hi_dci0_pdu_list[hi_dci0_req->number_of_dci+hi_dci0_req->number_of_hi]);
|
T_INT(harq_pid),
|
||||||
memset((void *) hi_dci0_pdu, 0, sizeof(nfapi_hi_dci0_request_pdu_t));
|
T_INT(UE_template->mcs_UL[harq_pid]),
|
||||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE;
|
T_INT(0),
|
||||||
hi_dci0_pdu->pdu_size = (uint8_t) (2 + sizeof (nfapi_dl_config_mpdcch_pdu));
|
T_INT(6),
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_format = (UE_template->rach_resource_type > 1) ? 5 : 4;
|
T_INT(round_UL));
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type > 1) ? 2 : 1;
|
AssertFatal (UE_template->physicalConfigDedicated != NULL, "UE_template->physicalConfigDedicated is null\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_narrowband = epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1;
|
AssertFatal (UE_template->physicalConfigDedicated->ext4 != NULL, "UE_template->physicalConfigDedicated->ext4 is null\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_prb_pairs = 6; // checked above that it has to be this
|
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 != NULL, "UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11 is null\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_assignment = 0; // Note: this can be dynamic
|
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present == LTE_EPDCCH_Config_r11__config_r11_PR_setup,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_transmission_type = epdcch_setconfig_r11->transmissionType_r11; // distibuted
|
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.present != setup\n");
|
||||||
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 != NULL,
|
AssertFatal (UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 != NULL,
|
||||||
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 is null\n");
|
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11 = NULL\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.start_symbol = *UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11;
|
LTE_EPDCCH_SetConfig_r11_t *epdcch_setconfig_r11 = UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.setConfigToAddModList_r11->list.array[0];
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
|
AssertFatal(epdcch_setconfig_r11 != NULL, "epdcch_setconfig_r11 is null\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.aggreagation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
|
AssertFatal(epdcch_setconfig_r11->ext2 != NULL, "epdcch_setconfig_r11->ext2 is null\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti_type = 4; // other
|
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti = rnti;
|
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13 != NULL, "epdcch_setconfig_r11->ext2->mpdcch_config_r13 is null");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type < 3) ? 1 : 2;
|
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->present == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13_PR_setup,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.drms_scrambling_init = epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11;
|
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->present is not setup\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.initial_transmission_sf_io = (frameP * 10) + subframeP;
|
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 != NULL, "epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310 is null");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.transmission_power = 6000; // 0dB
|
AssertFatal(epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present == LTE_EPDCCH_SetConfig_r11__ext2__numberPRB_Pairs_v1310_PR_setup,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
"epdcch_setconfig_r11->ext2->numberPRB_Pairs_v1310->present is not setup\n");
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_resource_blocks = 6;
|
LOG_D(MAC,"[PUSCH %d] Frame %d, Subframe %d: Adding UL 6-0A MPDCCH for BL/CE UE %d/%x, ulsch_frame %d, ulsch_subframe %d,UESS MPDCCH Narrowband %d\n",
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mcs = 4; // adjust according to size of RAR, 208 bits with N1A_PRB=3
|
harq_pid,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.pusch_repetition_levels = 0;
|
frameP,
|
||||||
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off,
|
subframeP,
|
||||||
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->mpdcch_pdsch_HoppingConfig_r13 is not off\n");
|
UE_id,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.frequency_hopping_flag = 1 - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13;
|
rnti,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.redudency_version = rvidx_tab[round_UL&3];
|
sched_frame,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.new_data_indication = UE_template->oldNDI_UL[harq_pid];
|
sched_subframeP,
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.harq_process = harq_pid;
|
(int)epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1);
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tpc = tpc;
|
UE_template->first_rb_ul[harq_pid] = narrowband_to_first_rb(cc, epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13-1);
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.csi_request = cqi_req;
|
hi_dci0_pdu = &(hi_dci0_req->hi_dci0_pdu_list[hi_dci0_req->number_of_dci+hi_dci0_req->number_of_hi]);
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ul_inex = 0;
|
memset((void *) hi_dci0_pdu, 0, sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dai_presence_flag = 0;
|
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_MPDCCH_DCI_PDU_TYPE;
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dl_assignment_index = 0;
|
hi_dci0_pdu->pdu_size = (uint8_t) (2 + sizeof (nfapi_dl_config_mpdcch_pdu));
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.srs_request = 0;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_format = (UE_template->rach_resource_type > 1) ? 5 : 4;
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_subframe_repetition_number = 0;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type > 1) ? 2 : 1;
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tcp_bitmap = 0;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_narrowband = epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_Narrowband_r13 - 1;
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.total_dci_length_include_padding = 29; // hard-coded for 10 MHz
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_prb_pairs = 6; // checked above that it has to be this
|
||||||
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_tx_antenna_ports = 1;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_assignment = 0; // Note: this can be dynamic
|
||||||
hi_dci0_req->number_of_dci++;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mpdcch_transmission_type = epdcch_setconfig_r11->transmissionType_r11; // distibuted
|
||||||
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
AssertFatal(UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 != NULL,
|
||||||
cqi_req,
|
"UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11 is null\n");
|
||||||
cc,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.start_symbol = *UE_template->physicalConfigDedicated->ext4->epdcch_Config_r11->config_r11.choice.setup.startSymbol_r11;
|
||||||
UE_template->physicalConfigDedicated,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
|
||||||
get_tmode(module_idP,CC_id,UE_id),
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.aggreagation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
|
||||||
eNB->ul_handle,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti_type = 4; // other
|
||||||
rnti,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.rnti = rnti;
|
||||||
UE_template->first_rb_ul[harq_pid], // resource_block_start
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ce_mode = (UE_template->rach_resource_type < 3) ? 1 : 2;
|
||||||
UE_template->nb_rb_ul[harq_pid], // number_of_resource_blocks
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.drms_scrambling_init = epdcch_setconfig_r11->dmrs_ScramblingSequenceInt_r11;
|
||||||
UE_template->mcs_UL[harq_pid],
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.initial_transmission_sf_io = (frameP * 10) + subframeP;
|
||||||
cshift, // cyclic_shift_2_for_drms
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.transmission_power = 6000; // 0dB
|
||||||
0, // frequency_hopping_enabled_flag
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.resource_block_start = UE_template->first_rb_ul[harq_pid];
|
||||||
0, // frequency_hopping_bits
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_resource_blocks = 6;
|
||||||
UE_template->oldNDI_UL[harq_pid], // new_data_indication
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.mcs = 4; // adjust according to size of RAR, 208 bits with N1A_PRB=3
|
||||||
rvidx_tab[round_UL&3], // redundancy_version
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.pusch_repetition_levels = 0;
|
||||||
harq_pid, // harq_process_number
|
AssertFatal(epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13 == LTE_EPDCCH_SetConfig_r11__ext2__mpdcch_config_r13__setup__mpdcch_pdsch_HoppingConfig_r13_off,
|
||||||
0, // ul_tx_mode
|
"epdcch_setconfig_r11->ext2->mpdcch_config_r13->mpdcch_pdsch_HoppingConfig_r13 is not off\n");
|
||||||
0, // current_tx_nb
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.frequency_hopping_flag = 1 - epdcch_setconfig_r11->ext2->mpdcch_config_r13->choice.setup.mpdcch_pdsch_HoppingConfig_r13;
|
||||||
0, // n_srs
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.redudency_version = rvidx_tab[round_UL&3];
|
||||||
UE_template->TBS_UL[harq_pid]
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.new_data_indication = UE_template->oldNDI_UL[harq_pid];
|
||||||
);
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.harq_process = harq_pid;
|
||||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tpc = tpc;
|
||||||
UE_template->rach_resource_type>2 ? 2 : 1,
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.csi_request = cqi_req;
|
||||||
1, //total_number_of_repetitions
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.ul_inex = 0;
|
||||||
1, //repetition_number
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dai_presence_flag = 0;
|
||||||
(frameP * 10) + subframeP);
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dl_assignment_index = 0;
|
||||||
ul_req_tmp->number_of_pdus++;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.srs_request = 0;
|
||||||
eNB->ul_handle++;
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.dci_subframe_repetition_number = 0;
|
||||||
}
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.tcp_bitmap = 0;
|
||||||
} // UE_is_to_be_scheduled
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.total_dci_length_include_padding = 29; // hard-coded for 10 MHz
|
||||||
} // ULCCs
|
hi_dci0_pdu->mpdcch_dci_pdu.mpdcch_dci_pdu_rel13.number_of_tx_antenna_ports = 1;
|
||||||
} // loop over UE_id
|
hi_dci0_req->number_of_dci++;
|
||||||
|
fill_nfapi_ulsch_config_request_rel8(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||||
|
cqi_req,
|
||||||
|
cc,
|
||||||
|
UE_template->physicalConfigDedicated,
|
||||||
|
get_tmode(module_idP,CC_id,UE_id),
|
||||||
|
eNB->ul_handle,
|
||||||
|
rnti,
|
||||||
|
UE_template->first_rb_ul[harq_pid], // resource_block_start
|
||||||
|
UE_template->nb_rb_ul[harq_pid], // number_of_resource_blocks
|
||||||
|
UE_template->mcs_UL[harq_pid],
|
||||||
|
cshift, // cyclic_shift_2_for_drms
|
||||||
|
0, // frequency_hopping_enabled_flag
|
||||||
|
0, // frequency_hopping_bits
|
||||||
|
UE_template->oldNDI_UL[harq_pid], // new_data_indication
|
||||||
|
rvidx_tab[round_UL&3], // redundancy_version
|
||||||
|
harq_pid, // harq_process_number
|
||||||
|
0, // ul_tx_mode
|
||||||
|
0, // current_tx_nb
|
||||||
|
0, // n_srs
|
||||||
|
UE_template->TBS_UL[harq_pid]
|
||||||
|
);
|
||||||
|
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_tmp->number_of_pdus],
|
||||||
|
UE_template->rach_resource_type>2 ? 2 : 1,
|
||||||
|
1, //total_number_of_repetitions
|
||||||
|
1, //repetition_number
|
||||||
|
(frameP * 10) + subframeP);
|
||||||
|
ul_req_tmp->number_of_pdus++;
|
||||||
|
eNB->ul_handle++;
|
||||||
|
}
|
||||||
|
} // UE_is_to_be_scheduled
|
||||||
|
} // ULCCs
|
||||||
|
} // loop over UE_id
|
||||||
} // Schedule new ULSCH
|
} // Schedule new ULSCH
|
||||||
|
|
||||||
// This section is to repeat ULSCH PDU for a number of MTC repetitions
|
// This section is to repeat ULSCH PDU for a number of MTC repetitions
|
||||||
for(int i=0;i<ul_req_tmp->number_of_pdus;i++)
|
for(int i=0; i<ul_req_tmp->number_of_pdus; i++) {
|
||||||
{
|
ul_config_pdu = &ul_req_tmp->ul_config_pdu_list[i];
|
||||||
ul_config_pdu = &ul_req_tmp->ul_config_pdu_list[i];
|
|
||||||
if (ul_config_pdu->pdu_type!=NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) // Repeat ULSCH PDUs only
|
|
||||||
continue ;
|
|
||||||
|
|
||||||
if(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number < ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions)
|
if (ul_config_pdu->pdu_type!=NFAPI_UL_CONFIG_ULSCH_PDU_TYPE) // Repeat ULSCH PDUs only
|
||||||
{
|
continue ;
|
||||||
ul_req_body_Rep = &eNB->UL_req_tmp[CC_id][(sched_subframeP+1)%10].ul_config_request_body;
|
|
||||||
ul_config_pdu_Rep = &ul_req_body_Rep->ul_config_pdu_list[ul_req_body_Rep->number_of_pdus];
|
if(ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number < ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.total_number_of_repetitions) {
|
||||||
memcpy ((void *) ul_config_pdu_Rep, ul_config_pdu, sizeof (nfapi_ul_config_request_pdu_t));
|
ul_req_body_Rep = &eNB->UL_req_tmp[CC_id][(sched_subframeP+1)%10].ul_config_request_body;
|
||||||
ul_config_pdu_Rep->ulsch_pdu.ulsch_pdu_rel8.handle = eNB->ul_handle++;
|
ul_config_pdu_Rep = &ul_req_body_Rep->ul_config_pdu_list[ul_req_body_Rep->number_of_pdus];
|
||||||
ul_config_pdu_Rep->ulsch_pdu.ulsch_pdu_rel13.repetition_number = ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number +1;
|
memcpy ((void *) ul_config_pdu_Rep, ul_config_pdu, sizeof (nfapi_ul_config_request_pdu_t));
|
||||||
ul_req_body_Rep->number_of_pdus++;
|
ul_config_pdu_Rep->ulsch_pdu.ulsch_pdu_rel8.handle = eNB->ul_handle++;
|
||||||
} //repetition_number < total_number_of_repetitions
|
ul_config_pdu_Rep->ulsch_pdu.ulsch_pdu_rel13.repetition_number = ul_config_pdu->ulsch_pdu.ulsch_pdu_rel13.repetition_number +1;
|
||||||
|
ul_req_body_Rep->number_of_pdus++;
|
||||||
|
} //repetition_number < total_number_of_repetitions
|
||||||
} // For loop on PDUs
|
} // For loop on PDUs
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2014,6 +2014,14 @@ static int ue_ul_compare(const void *_a, const void *_b, void *_params) {
|
|||||||
UE_list->UE_template[pCCid2][UE_id2].pre_assigned_mcs_ul)
|
UE_list->UE_template[pCCid2][UE_id2].pre_assigned_mcs_ul)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
if (UE_list->UE_sched_ctrl[UE_id1].cqi_req_timer >
|
||||||
|
UE_list->UE_sched_ctrl[UE_id2].cqi_req_timer)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (UE_list->UE_sched_ctrl[UE_id1].cqi_req_timer <
|
||||||
|
UE_list->UE_sched_ctrl[UE_id2].cqi_req_timer)
|
||||||
|
return 1;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -255,17 +255,11 @@ Msg1_transmitted(module_id_t module_idP, uint8_t CC_id,
|
|||||||
"Transmission on secondary CCs is not supported yet\n");
|
"Transmission on secondary CCs is not supported yet\n");
|
||||||
// start contention resolution timer
|
// start contention resolution timer
|
||||||
UE_mac_inst[module_idP].RA_attempt_number++;
|
UE_mac_inst[module_idP].RA_attempt_number++;
|
||||||
|
trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI,
|
||||||
if (opt_enabled) {
|
UE_mac_inst[module_idP].RA_prach_resources.
|
||||||
trace_pdu(DIRECTION_UPLINK, NULL, 0, module_idP, WS_NO_RNTI,
|
ra_PreambleIndex, UE_mac_inst[module_idP].txFrame,
|
||||||
UE_mac_inst[module_idP].RA_prach_resources.
|
UE_mac_inst[module_idP].txSubframe, 0,
|
||||||
ra_PreambleIndex, UE_mac_inst[module_idP].txFrame,
|
UE_mac_inst[module_idP].RA_attempt_number);
|
||||||
UE_mac_inst[module_idP].txSubframe, 0,
|
|
||||||
UE_mac_inst[module_idP].RA_attempt_number);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[UE %d][RAPROC] TX MSG1 Frame %d trace pdu for rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, 1, UE_mac_inst[module_idP].RA_Msg3_size);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -280,19 +274,11 @@ Msg3_transmitted(module_id_t module_idP, uint8_t CC_id,
|
|||||||
module_idP, frameP);
|
module_idP, frameP);
|
||||||
UE_mac_inst[module_idP].RA_contention_resolution_cnt = 0;
|
UE_mac_inst[module_idP].RA_contention_resolution_cnt = 0;
|
||||||
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 1;
|
UE_mac_inst[module_idP].RA_contention_resolution_timer_active = 1;
|
||||||
|
trace_pdu(DIRECTION_UPLINK, &UE_mac_inst[module_idP].CCCH_pdu.payload[0],
|
||||||
if (opt_enabled) { // msg3
|
UE_mac_inst[module_idP].RA_Msg3_size, module_idP, WS_C_RNTI,
|
||||||
trace_pdu(DIRECTION_UPLINK, &UE_mac_inst[module_idP].CCCH_pdu.payload[0],
|
UE_mac_inst[module_idP].crnti,
|
||||||
UE_mac_inst[module_idP].RA_Msg3_size, module_idP, WS_C_RNTI,
|
UE_mac_inst[module_idP].txFrame,
|
||||||
UE_mac_inst[module_idP].crnti,
|
UE_mac_inst[module_idP].txSubframe, 0, 0);
|
||||||
UE_mac_inst[module_idP].txFrame,
|
|
||||||
UE_mac_inst[module_idP].txSubframe, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[UE %d][RAPROC] MSG3 Frame %d trace pdu Preamble %d with size %d\n",
|
|
||||||
module_idP, frameP, UE_mac_inst[module_idP].crnti
|
|
||||||
/*UE_mac_inst[module_idP].RA_prach_resources.ra_PreambleIndex */
|
|
||||||
, UE_mac_inst[module_idP].RA_Msg3_size);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,8 @@ fill_rar(const module_id_t module_idP,
|
|||||||
RA_t *ra,
|
RA_t *ra,
|
||||||
const frame_t frameP,
|
const frame_t frameP,
|
||||||
uint8_t *const dlsch_buffer,
|
uint8_t *const dlsch_buffer,
|
||||||
const uint16_t N_RB_UL, const uint8_t input_buffer_length)
|
const uint16_t N_RB_UL,
|
||||||
|
const uint8_t input_buffer_length)
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||||
@@ -93,16 +94,9 @@ fill_rar(const module_id_t module_idP,
|
|||||||
rar[3] =
|
rar[3] =
|
||||||
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
|
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
|
||||||
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
|
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
|
||||||
|
trace_pdu(DIRECTION_DOWNLINK, dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI, 1,
|
||||||
if (opt_enabled) {
|
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
|
||||||
trace_pdu(DIRECTION_DOWNLINK, dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI, 1,
|
0, 0);
|
||||||
RC.mac[module_idP]->frame, RC.mac[module_idP]->subframe,
|
|
||||||
0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[eNB %d][RAPROC] CC_id %d RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
|
|
||||||
module_idP, CC_id, frameP, ra->rnti, rarh->RAPID,
|
|
||||||
input_buffer_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (ra->rnti);
|
return (ra->rnti);
|
||||||
}
|
}
|
||||||
@@ -194,24 +188,16 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
|||||||
ra->preamble_index,
|
ra->preamble_index,
|
||||||
ra->timing_offset);
|
ra->timing_offset);
|
||||||
|
|
||||||
if (opt_enabled) {
|
trace_pdu(DIRECTION_DOWNLINK,
|
||||||
trace_pdu(DIRECTION_DOWNLINK,
|
dlsch_buffer,
|
||||||
dlsch_buffer,
|
input_buffer_length,
|
||||||
input_buffer_length,
|
eNB->Mod_id,
|
||||||
eNB->Mod_id,
|
WS_RA_RNTI,
|
||||||
WS_RA_RNTI,
|
1,
|
||||||
1,
|
eNB->frame,
|
||||||
eNB->frame,
|
eNB->subframe,
|
||||||
eNB->subframe,
|
0,
|
||||||
0,
|
0);
|
||||||
0);
|
|
||||||
LOG_D(OPT, "[RAPROC] RAR Frame %d trace pdu for rnti %x and rapid %d size %d\n",
|
|
||||||
frameP,
|
|
||||||
ra->rnti,
|
|
||||||
rarh->RAPID,
|
|
||||||
input_buffer_length);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (ra->rnti);
|
return (ra->rnti);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,103 +41,96 @@
|
|||||||
#define DEBUG_RAR
|
#define DEBUG_RAR
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const frame_t frameP, const rnti_t ra_rnti, uint8_t * const dlsch_buffer, rnti_t * const t_crnti, const uint8_t preamble_index, uint8_t * selected_rar_buffer // output argument for storing the selected RAR header and RAR payload
|
uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const frame_t frameP, const rnti_t ra_rnti, uint8_t *const dlsch_buffer, rnti_t *const t_crnti, const uint8_t preamble_index,
|
||||||
)
|
uint8_t *selected_rar_buffer // output argument for storing the selected RAR header and RAR payload
|
||||||
|
)
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
{
|
{
|
||||||
uint16_t ret = 0; // return value
|
uint16_t ret = 0; // return value
|
||||||
|
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||||
|
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
|
||||||
|
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
|
||||||
|
// get the last RAR payload for working with CMW500
|
||||||
|
uint8_t n_rarpy = 0; // number of RAR payloads
|
||||||
|
uint8_t n_rarh = 0; // number of MAC RAR subheaders
|
||||||
|
uint8_t best_rx_rapid = -1; // the closest RAPID receive from all RARs
|
||||||
|
|
||||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
while (1) {
|
||||||
// RAR_PDU *rar = (RAR_PDU *)(dlsch_buffer+1);
|
n_rarh++;
|
||||||
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
|
|
||||||
|
|
||||||
// get the last RAR payload for working with CMW500
|
if (rarh->T == 1) {
|
||||||
uint8_t n_rarpy = 0; // number of RAR payloads
|
n_rarpy++;
|
||||||
uint8_t n_rarh = 0; // number of MAC RAR subheaders
|
LOG_D(MAC, "RAPID %d\n", rarh->RAPID);
|
||||||
uint8_t best_rx_rapid = -1; // the closest RAPID receive from all RARs
|
|
||||||
while (1) {
|
|
||||||
n_rarh++;
|
|
||||||
if (rarh->T == 1) {
|
|
||||||
n_rarpy++;
|
|
||||||
LOG_D(MAC, "RAPID %d\n", rarh->RAPID);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rarh->RAPID == preamble_index) {
|
|
||||||
LOG_D(PHY, "Found RAR with the intended RAPID %d\n",
|
|
||||||
rarh->RAPID);
|
|
||||||
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (abs((int) rarh->RAPID - (int) preamble_index) <
|
|
||||||
abs((int) best_rx_rapid - (int) preamble_index)) {
|
|
||||||
best_rx_rapid = rarh->RAPID;
|
|
||||||
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rarh->E == 0) {
|
|
||||||
LOG_I(PHY,
|
|
||||||
"No RAR found with the intended RAPID. The closest RAPID in all RARs is %d\n",
|
|
||||||
best_rx_rapid);
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
rarh++;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
LOG_D(MAC, "number of RAR subheader %d; number of RAR pyloads %d\n",
|
|
||||||
n_rarh, n_rarpy);
|
|
||||||
|
|
||||||
if (CC_id > 0) {
|
|
||||||
LOG_W(MAC, "Should not have received RAR on secondary CCs! \n");
|
|
||||||
return (0xffff);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_I(MAC,
|
if (rarh->RAPID == preamble_index) {
|
||||||
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
|
LOG_D(PHY, "Found RAR with the intended RAPID %d\n",
|
||||||
module_idP, frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2],
|
rarh->RAPID);
|
||||||
rar[3], rar[4], rar[5], rarh->RAPID, preamble_index);
|
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
|
||||||
#ifdef DEBUG_RAR
|
break;
|
||||||
LOG_D(MAC, "[UE %d][RAPROC] rarh->E %d\n", module_idP, rarh->E);
|
|
||||||
LOG_D(MAC, "[UE %d][RAPROC] rarh->T %d\n", module_idP, rarh->T);
|
|
||||||
LOG_D(MAC, "[UE %d][RAPROC] rarh->RAPID %d\n", module_idP,
|
|
||||||
rarh->RAPID);
|
|
||||||
|
|
||||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->R %d\n",module_idP,rar->R);
|
|
||||||
LOG_D(MAC, "[UE %d][RAPROC] rar->Timing_Advance_Command %d\n",
|
|
||||||
module_idP, (((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
|
|
||||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->hopping_flag %d\n",module_idP,rar->hopping_flag);
|
|
||||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->rb_alloc %d\n",module_idP,rar->rb_alloc);
|
|
||||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->mcs %d\n",module_idP,rar->mcs);
|
|
||||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->TPC %d\n",module_idP,rar->TPC);
|
|
||||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->UL_delay %d\n",module_idP,rar->UL_delay);
|
|
||||||
// LOG_I(MAC,"[UE %d][RAPROC] rar->cqi_req %d\n",module_idP,rar->cqi_req);
|
|
||||||
LOG_D(MAC, "[UE %d][RAPROC] rar->t_crnti %x\n", module_idP,
|
|
||||||
(uint16_t) rar[5] + (rar[4] << 8));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (opt_enabled) {
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[UE %d][RAPROC] CC_id %d RAR Frame %d trace pdu for ra-RNTI %x\n",
|
|
||||||
module_idP, CC_id, frameP, ra_rnti);
|
|
||||||
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) dlsch_buffer, n_rarh + n_rarpy * 6,
|
|
||||||
module_idP, WS_RA_RNTI, ra_rnti, UE_mac_inst[module_idP].rxFrame,
|
|
||||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (preamble_index == rarh->RAPID) {
|
if (abs((int) rarh->RAPID - (int) preamble_index) <
|
||||||
*t_crnti = (uint16_t) rar[5] + (rar[4] << 8); //rar->t_crnti;
|
abs((int) best_rx_rapid - (int) preamble_index)) {
|
||||||
UE_mac_inst[module_idP].crnti = *t_crnti; //rar->t_crnti;
|
best_rx_rapid = rarh->RAPID;
|
||||||
//return(rar->Timing_Advance_Command);
|
rar = (uint8_t *) (dlsch_buffer + n_rarh + (n_rarpy - 1) * 6);
|
||||||
ret = ((((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
|
}
|
||||||
|
|
||||||
|
if (rarh->E == 0) {
|
||||||
|
LOG_I(PHY,
|
||||||
|
"No RAR found with the intended RAPID. The closest RAPID in all RARs is %d\n",
|
||||||
|
best_rx_rapid);
|
||||||
|
break;
|
||||||
} else {
|
} else {
|
||||||
UE_mac_inst[module_idP].crnti = 0;
|
rarh++;
|
||||||
ret = (0xffff);
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// move the selected RAR to the front of the RA_PDSCH buffer
|
LOG_D(MAC, "number of RAR subheader %d; number of RAR pyloads %d\n",
|
||||||
memcpy(selected_rar_buffer + 0, (uint8_t *) rarh, 1);
|
n_rarh, n_rarpy);
|
||||||
memcpy(selected_rar_buffer + 1, (uint8_t *) rar, 6);
|
|
||||||
|
|
||||||
return ret;
|
if (CC_id > 0) {
|
||||||
|
LOG_W(MAC, "Should not have received RAR on secondary CCs! \n");
|
||||||
|
return (0xffff);
|
||||||
|
}
|
||||||
|
|
||||||
|
LOG_I(MAC,
|
||||||
|
"[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
|
||||||
|
module_idP, frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2],
|
||||||
|
rar[3], rar[4], rar[5], rarh->RAPID, preamble_index);
|
||||||
|
#ifdef DEBUG_RAR
|
||||||
|
LOG_D(MAC, "[UE %d][RAPROC] rarh->E %d\n", module_idP, rarh->E);
|
||||||
|
LOG_D(MAC, "[UE %d][RAPROC] rarh->T %d\n", module_idP, rarh->T);
|
||||||
|
LOG_D(MAC, "[UE %d][RAPROC] rarh->RAPID %d\n", module_idP,
|
||||||
|
rarh->RAPID);
|
||||||
|
// LOG_I(MAC,"[UE %d][RAPROC] rar->R %d\n",module_idP,rar->R);
|
||||||
|
LOG_D(MAC, "[UE %d][RAPROC] rar->Timing_Advance_Command %d\n",
|
||||||
|
module_idP, (((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
|
||||||
|
// LOG_I(MAC,"[UE %d][RAPROC] rar->hopping_flag %d\n",module_idP,rar->hopping_flag);
|
||||||
|
// LOG_I(MAC,"[UE %d][RAPROC] rar->rb_alloc %d\n",module_idP,rar->rb_alloc);
|
||||||
|
// LOG_I(MAC,"[UE %d][RAPROC] rar->mcs %d\n",module_idP,rar->mcs);
|
||||||
|
// LOG_I(MAC,"[UE %d][RAPROC] rar->TPC %d\n",module_idP,rar->TPC);
|
||||||
|
// LOG_I(MAC,"[UE %d][RAPROC] rar->UL_delay %d\n",module_idP,rar->UL_delay);
|
||||||
|
// LOG_I(MAC,"[UE %d][RAPROC] rar->cqi_req %d\n",module_idP,rar->cqi_req);
|
||||||
|
LOG_D(MAC, "[UE %d][RAPROC] rar->t_crnti %x\n", module_idP,
|
||||||
|
(uint16_t) rar[5] + (rar[4] << 8));
|
||||||
|
#endif
|
||||||
|
trace_pdu(DIRECTION_DOWNLINK, (uint8_t *) dlsch_buffer, n_rarh + n_rarpy * 6,
|
||||||
|
module_idP, WS_RA_RNTI, ra_rnti, UE_mac_inst[module_idP].rxFrame,
|
||||||
|
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||||
|
|
||||||
|
if (preamble_index == rarh->RAPID) {
|
||||||
|
*t_crnti = (uint16_t) rar[5] + (rar[4] << 8); //rar->t_crnti;
|
||||||
|
UE_mac_inst[module_idP].crnti = *t_crnti; //rar->t_crnti;
|
||||||
|
//return(rar->Timing_Advance_Command);
|
||||||
|
ret = ((((uint16_t) (rar[0] & 0x7f)) << 4) + (rar[1] >> 4));
|
||||||
|
} else {
|
||||||
|
UE_mac_inst[module_idP].crnti = 0;
|
||||||
|
ret = (0xffff);
|
||||||
|
}
|
||||||
|
|
||||||
|
// move the selected RAR to the front of the RA_PDSCH buffer
|
||||||
|
memcpy(selected_rar_buffer + 0, (uint8_t *) rarh, 1);
|
||||||
|
memcpy(selected_rar_buffer + 1, (uint8_t *) rar, 6);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -392,17 +392,9 @@ ue_send_sdu(module_id_t module_idP,
|
|||||||
#endif
|
#endif
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_IN);
|
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SEND_SDU, VCD_FUNCTION_IN);
|
||||||
|
|
||||||
//LOG_D(MAC,"sdu: %x.%x.%x\n",sdu[0],sdu[1],sdu[2]);
|
//LOG_D(MAC,"sdu: %x.%x.%x\n",sdu[0],sdu[1],sdu[2]);
|
||||||
|
trace_pdu(DIRECTION_DOWNLINK, sdu, sdu_len, module_idP, WS_C_RNTI,
|
||||||
if (opt_enabled) {
|
UE_mac_inst[module_idP].crnti, frameP, subframeP, 0, 0);
|
||||||
trace_pdu(DIRECTION_DOWNLINK, sdu, sdu_len, module_idP, WS_C_RNTI,
|
|
||||||
UE_mac_inst[module_idP].crnti, frameP, subframeP, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[UE %d][DLSCH] Frame %d trace pdu for rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, UE_mac_inst[module_idP].crnti, sdu_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
payload_ptr =
|
payload_ptr =
|
||||||
parse_header(sdu, &num_ce, &num_sdu, rx_ces, rx_lcids, rx_lengths,
|
parse_header(sdu, &num_ce, &num_sdu, rx_ces, rx_lcids, rx_lengths,
|
||||||
sdu_len);
|
sdu_len);
|
||||||
@@ -605,19 +597,16 @@ void ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
|
|||||||
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (opt_enabled == 1) {
|
trace_pdu(DIRECTION_UPLINK,
|
||||||
trace_pdu(DIRECTION_UPLINK,
|
(uint8_t *) pdu,
|
||||||
(uint8_t *) pdu,
|
len,
|
||||||
len,
|
module_idP,
|
||||||
module_idP,
|
WS_SI_RNTI,
|
||||||
WS_SI_RNTI,
|
0xffff,
|
||||||
0xffff,
|
UE_mac_inst[module_idP].rxFrame,
|
||||||
UE_mac_inst[module_idP].rxFrame,
|
UE_mac_inst[module_idP].rxSubframe,
|
||||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
0,
|
||||||
LOG_D(OPT,
|
0);
|
||||||
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, CC_id, 0xffff, len);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -640,20 +629,14 @@ ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
|
|||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
||||||
#endif
|
#endif
|
||||||
|
trace_pdu(DIRECTION_UPLINK,
|
||||||
if (opt_enabled == 1) {
|
(uint8_t *) pdu,
|
||||||
trace_pdu(DIRECTION_UPLINK,
|
len,
|
||||||
(uint8_t *) pdu,
|
module_idP,
|
||||||
len,
|
WS_SI_RNTI,
|
||||||
module_idP,
|
0xffff,
|
||||||
WS_SI_RNTI,
|
UE_mac_inst[module_idP].rxFrame,
|
||||||
0xffff,
|
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||||
UE_mac_inst[module_idP].rxFrame,
|
|
||||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, CC_id, 0xffff, len);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -676,20 +659,14 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
|
|||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
stop_meas(&UE_mac_inst[module_idP].rx_p);
|
stop_meas(&UE_mac_inst[module_idP].rx_p);
|
||||||
#endif
|
#endif
|
||||||
|
trace_pdu(DIRECTION_UPLINK,
|
||||||
if (opt_enabled == 1) {
|
(uint8_t *) pdu,
|
||||||
trace_pdu(DIRECTION_UPLINK,
|
len,
|
||||||
(uint8_t *) pdu,
|
module_idP,
|
||||||
len,
|
WS_SI_RNTI,
|
||||||
module_idP,
|
P_RNTI,
|
||||||
WS_SI_RNTI,
|
UE_mac_inst[module_idP].rxFrame,
|
||||||
P_RNTI,
|
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
||||||
UE_mac_inst[module_idP].rxFrame,
|
|
||||||
UE_mac_inst[module_idP].rxSubframe, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[UE %d][BCH] Frame %d trace pdu for CC_id %d rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, CC_id, P_RNTI, len);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char *parse_mch_header(unsigned char *mac_header,
|
unsigned char *parse_mch_header(unsigned char *mac_header,
|
||||||
@@ -2422,17 +2399,10 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
|||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
stop_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu);
|
stop_meas(&UE_mac_inst[module_idP].tx_ulsch_sdu);
|
||||||
#endif
|
#endif
|
||||||
|
trace_pdu(DIRECTION_UPLINK, ulsch_buffer, buflen, module_idP, WS_C_RNTI,
|
||||||
if (opt_enabled) {
|
UE_mac_inst[module_idP].crnti,
|
||||||
trace_pdu(DIRECTION_UPLINK, ulsch_buffer, buflen, module_idP, WS_C_RNTI,
|
UE_mac_inst[module_idP].txFrame,
|
||||||
UE_mac_inst[module_idP].crnti,
|
UE_mac_inst[module_idP].txSubframe, 0, 0);
|
||||||
UE_mac_inst[module_idP].txFrame,
|
|
||||||
UE_mac_inst[module_idP].txSubframe, 0, 0);
|
|
||||||
LOG_D(OPT,
|
|
||||||
"[UE %d][ULSCH] Frame %d subframe %d trace pdu for rnti %x with size %d\n",
|
|
||||||
module_idP, frameP, subframe, UE_mac_inst[module_idP].crnti,
|
|
||||||
buflen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,30 +33,23 @@
|
|||||||
#ifndef __LAYER2_NR_MAC_DEFS_H__
|
#ifndef __LAYER2_NR_MAC_DEFS_H__
|
||||||
#define __LAYER2_NR_MAC_DEFS_H__
|
#define __LAYER2_NR_MAC_DEFS_H__
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "platform_types.h"
|
#include "platform_types.h"
|
||||||
|
|
||||||
#include "NR_DRX-Config.h"
|
#include "NR_DRX-Config.h"
|
||||||
#include "NR_SchedulingRequestConfig.h"
|
#include "NR_SchedulingRequestConfig.h"
|
||||||
#include "NR_BSR-Config.h"
|
#include "NR_BSR-Config.h"
|
||||||
#include "NR_TAG-Config.h"
|
#include "NR_TAG-Config.h"
|
||||||
#include "NR_PHR-Config.h"
|
#include "NR_PHR-Config.h"
|
||||||
#include "NR_RNTI-Value.h"
|
#include "NR_RNTI-Value.h"
|
||||||
|
|
||||||
#include "NR_MIB.h"
|
#include "NR_MIB.h"
|
||||||
#include "NR_MAC-CellGroupConfig.h"
|
#include "NR_MAC-CellGroupConfig.h"
|
||||||
#include "NR_PhysicalCellGroupConfig.h"
|
#include "NR_PhysicalCellGroupConfig.h"
|
||||||
#include "NR_SpCellConfig.h"
|
#include "NR_SpCellConfig.h"
|
||||||
|
|
||||||
#include "NR_ServingCellConfig.h"
|
#include "NR_ServingCellConfig.h"
|
||||||
#include "fapi_nr_ue_interface.h"
|
#include "fapi_nr_ue_interface.h"
|
||||||
#include "NR_IF_Module.h"
|
#include "NR_IF_Module.h"
|
||||||
|
|
||||||
#include "PHY/defs_nr_common.h"
|
#include "PHY/defs_nr_common.h"
|
||||||
|
|
||||||
#define NB_NR_UE_MAC_INST 1
|
#define NB_NR_UE_MAC_INST 1
|
||||||
@@ -72,13 +65,13 @@ typedef enum {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
||||||
//// MAC config
|
//// MAC config
|
||||||
NR_DRX_Config_t *drx_Config;
|
NR_DRX_Config_t *drx_Config;
|
||||||
NR_SchedulingRequestConfig_t *schedulingRequestConfig;
|
NR_SchedulingRequestConfig_t *schedulingRequestConfig;
|
||||||
NR_BSR_Config_t *bsr_Config;
|
NR_BSR_Config_t *bsr_Config;
|
||||||
NR_TAG_Config_t *tag_Config;
|
NR_TAG_Config_t *tag_Config;
|
||||||
NR_PHR_Config_t *phr_Config;
|
NR_PHR_Config_t *phr_Config;
|
||||||
NR_RNTI_Value_t *cs_RNTI;
|
NR_RNTI_Value_t *cs_RNTI;
|
||||||
NR_MIB_t *mib;
|
NR_MIB_t *mib;
|
||||||
|
|
||||||
/// Type0-PDCCH seach space
|
/// Type0-PDCCH seach space
|
||||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t type0_pdcch_dci_config;
|
fapi_nr_dl_config_dci_dl_pdu_rel15_t type0_pdcch_dci_config;
|
||||||
|
|||||||
@@ -82,6 +82,8 @@ uint8_t table_9_2_2_1[16][8]={
|
|||||||
{1,0, 14,4, 0,3,6,9},
|
{1,0, 14,4, 0,3,6,9},
|
||||||
{1,0, 14,26,0,3,0,0}
|
{1,0, 14,26,0,3,0,0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
int8_t nr_ue_process_dlsch(module_id_t module_id,
|
int8_t nr_ue_process_dlsch(module_id_t module_id,
|
||||||
int cc_id,
|
int cc_id,
|
||||||
uint8_t gNB_index,
|
uint8_t gNB_index,
|
||||||
@@ -217,17 +219,17 @@ int8_t nr_ue_process_dlsch(module_id_t module_id,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int8_t nr_ue_decode_mib(
|
|
||||||
UE_nr_rxtx_proc_t *proc,
|
|
||||||
module_id_t module_id,
|
|
||||||
int cc_id,
|
|
||||||
uint8_t gNB_index,
|
|
||||||
uint8_t extra_bits, // 8bits 38.212 c7.1.1
|
|
||||||
uint32_t ssb_length,
|
|
||||||
uint32_t ssb_index,
|
|
||||||
void *pduP,
|
|
||||||
uint16_t cell_id ){
|
|
||||||
|
|
||||||
|
int8_t nr_ue_decode_mib(UE_nr_rxtx_proc_t *proc,
|
||||||
|
module_id_t module_id,
|
||||||
|
int cc_id,
|
||||||
|
uint8_t gNB_index,
|
||||||
|
uint8_t extra_bits, // 8bits 38.212 c7.1.1
|
||||||
|
uint32_t ssb_length,
|
||||||
|
uint32_t ssb_index,
|
||||||
|
void *pduP,
|
||||||
|
uint16_t cell_id)
|
||||||
|
{
|
||||||
LOG_I(MAC,"[L2][MAC] decode mib\n");
|
LOG_I(MAC,"[L2][MAC] decode mib\n");
|
||||||
|
|
||||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||||
@@ -435,18 +437,16 @@ int8_t nr_ue_decode_mib(
|
|||||||
mac->type0_pdcch_dci_config.coreset.precoder_granularity = PRECODER_GRANULARITY_SAME_AS_REG_BUNDLE;
|
mac->type0_pdcch_dci_config.coreset.precoder_granularity = PRECODER_GRANULARITY_SAME_AS_REG_BUNDLE;
|
||||||
mac->type0_pdcch_dci_config.coreset.pdcch_dmrs_scrambling_id = cell_id;
|
mac->type0_pdcch_dci_config.coreset.pdcch_dmrs_scrambling_id = cell_id;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// type0-pdcch search space
|
// type0-pdcch search space
|
||||||
float big_o;
|
float big_o;
|
||||||
float big_m;
|
float big_m;
|
||||||
uint32_t temp;
|
uint32_t temp;
|
||||||
SFN_C_TYPE sfn_c=SFN_C_IMPOSSIBLE; // only valid for mux=1
|
SFN_C_TYPE sfn_c = SFN_C_IMPOSSIBLE; // only valid for mux=1
|
||||||
uint32_t n_c=UINT_MAX;
|
uint32_t n_c = UINT_MAX;
|
||||||
uint32_t number_of_search_space_per_slot=UINT_MAX;
|
uint32_t number_of_search_space_per_slot = UINT_MAX;
|
||||||
uint32_t first_symbol_index=UINT_MAX;
|
uint32_t first_symbol_index = UINT_MAX;
|
||||||
uint32_t search_space_duration; // element of search space
|
uint32_t search_space_duration; // element of search space
|
||||||
uint32_t coreset_duration; // element of coreset
|
uint32_t coreset_duration; // element of coreset
|
||||||
|
|
||||||
// 38.213 table 10.1-1
|
// 38.213 table 10.1-1
|
||||||
|
|
||||||
@@ -496,7 +496,7 @@ int8_t nr_ue_decode_mib(
|
|||||||
// 38.213 Table 13-13
|
// 38.213 Table 13-13
|
||||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-13 4 LSB out of range\n");
|
AssertFatal(index_4lsb == 0, "38.213 Table 13-13 4 LSB out of range\n");
|
||||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
//sfn_c = SFN_C_EQ_SFN_SSB;
|
||||||
n_c = get_ssb_slot(ssb_index);
|
n_c = get_ssb_slot(ssb_index);
|
||||||
switch(ssb_index & 0x3){ // ssb_index(i) mod 4
|
switch(ssb_index & 0x3){ // ssb_index(i) mod 4
|
||||||
case 0:
|
case 0:
|
||||||
@@ -518,7 +518,7 @@ int8_t nr_ue_decode_mib(
|
|||||||
// 38.213 Table 13-14
|
// 38.213 Table 13-14
|
||||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-14 4 LSB out of range\n");
|
AssertFatal(index_4lsb == 0, "38.213 Table 13-14 4 LSB out of range\n");
|
||||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
//sfn_c = SFN_C_EQ_SFN_SSB;
|
||||||
n_c = get_ssb_slot(ssb_index);
|
n_c = get_ssb_slot(ssb_index);
|
||||||
switch(ssb_index & 0x7){ // ssb_index(i) mod 8
|
switch(ssb_index & 0x7){ // ssb_index(i) mod 8
|
||||||
case 0:
|
case 0:
|
||||||
@@ -560,7 +560,7 @@ int8_t nr_ue_decode_mib(
|
|||||||
// 38.213 Table 13-15
|
// 38.213 Table 13-15
|
||||||
AssertFatal(index_4lsb == 0, "38.213 Table 13-15 4 LSB out of range\n");
|
AssertFatal(index_4lsb == 0, "38.213 Table 13-15 4 LSB out of range\n");
|
||||||
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
// PDCCH monitoring occasions (SFN and slot number) same as SSB frame-slot
|
||||||
// sfn_c = SFN_C_EQ_SFN_SSB;
|
//sfn_c = SFN_C_EQ_SFN_SSB;
|
||||||
n_c = get_ssb_slot(ssb_index);
|
n_c = get_ssb_slot(ssb_index);
|
||||||
switch(ssb_index & 0x3){ // ssb_index(i) mod 4
|
switch(ssb_index & 0x3){ // ssb_index(i) mod 4
|
||||||
case 0:
|
case 0:
|
||||||
@@ -601,8 +601,8 @@ int8_t nr_ue_decode_mib(
|
|||||||
mac->type0_pdcch_ss_n_c = n_c;
|
mac->type0_pdcch_ss_n_c = n_c;
|
||||||
|
|
||||||
// fill in the elements in config request inside P5 message
|
// fill in the elements in config request inside P5 message
|
||||||
mac->phy_config.Mod_id = module_id;
|
mac->phy_config.Mod_id = module_id;
|
||||||
mac->phy_config.CC_id = cc_id;
|
mac->phy_config.CC_id = cc_id;
|
||||||
|
|
||||||
mac->phy_config.config_req.pbch_config.system_frame_number = frame; // after calculation
|
mac->phy_config.config_req.pbch_config.system_frame_number = frame; // after calculation
|
||||||
mac->phy_config.config_req.pbch_config.subcarrier_spacing_common = mac->mib->subCarrierSpacingCommon;
|
mac->phy_config.config_req.pbch_config.subcarrier_spacing_common = mac->mib->subCarrierSpacingCommon;
|
||||||
@@ -624,7 +624,6 @@ int8_t nr_ue_decode_mib(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: change to UE parameter, scs: 15KHz, slot duration: 1ms
|
// TODO: change to UE parameter, scs: 15KHz, slot duration: 1ms
|
||||||
uint32_t get_ssb_frame(uint32_t test){
|
uint32_t get_ssb_frame(uint32_t test){
|
||||||
return test;
|
return test;
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ void handle_rach(UL_IND_t *UL_info) {
|
|||||||
NFAPI_SFNSF2SF(UL_RCC_INFO.rach_ind[j].sfn_sf),
|
NFAPI_SFNSF2SF(UL_RCC_INFO.rach_ind[j].sfn_sf),
|
||||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
|
UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list[0].preamble_rel8.rnti,
|
||||||
|
0
|
||||||
);
|
);
|
||||||
free(UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list);
|
free(UL_RCC_INFO.rach_ind[j].rach_indication_body.preamble_list);
|
||||||
UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles = 0;
|
UL_RCC_INFO.rach_ind[j].rach_indication_body.number_of_preambles = 0;
|
||||||
@@ -52,7 +53,8 @@ void handle_rach(UL_IND_t *UL_info) {
|
|||||||
NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
|
NFAPI_SFNSF2SF(UL_info->rach_ind.sfn_sf),
|
||||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.preamble,
|
||||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.timing_advance,
|
||||||
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti,0
|
UL_info->rach_ind.rach_indication_body.preamble_list[0].preamble_rel8.rnti,
|
||||||
|
0
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -382,10 +384,10 @@ static void dump_ul(UL_IND_t *u) {
|
|||||||
|
|
||||||
A("XXXX crc_ind %d\n", u->crc_ind.crc_indication_body.number_of_crcs);
|
A("XXXX crc_ind %d\n", u->crc_ind.crc_indication_body.number_of_crcs);
|
||||||
A("XXXX sr_ind %d\n", u->sr_ind.sr_indication_body.number_of_srs);
|
A("XXXX sr_ind %d\n", u->sr_ind.sr_indication_body.number_of_srs);
|
||||||
A("XXXX cqi_ind %d\n", u->cqi_ind.number_of_cqis);
|
A("XXXX cqi_ind %d\n", u->cqi_ind.cqi_indication_body.number_of_cqis);
|
||||||
|
|
||||||
for (i = 0; i < u->cqi_ind.number_of_cqis; i++) {
|
for (i = 0; i < u->cqi_ind.cqi_indication_body.number_of_cqis; i++) {
|
||||||
nfapi_cqi_indication_pdu_t *v = &u->cqi_ind.cqi_pdu_list[i];
|
nfapi_cqi_indication_pdu_t *v = &u->cqi_ind.cqi_indication_body.cqi_pdu_list[i];
|
||||||
A("XXXX cqi ind %d\n", i);
|
A("XXXX cqi ind %d\n", i);
|
||||||
A("XXXX cqi ul_cqi %d channel %d\n", v->ul_cqi_information.ul_cqi,
|
A("XXXX cqi ul_cqi %d channel %d\n", v->ul_cqi_information.ul_cqi,
|
||||||
v->ul_cqi_information.channel);
|
v->ul_cqi_information.channel);
|
||||||
|
|||||||
@@ -1,13 +1,20 @@
|
|||||||
|
|
||||||
How to configure wireshark for dissecting LTE protocols:
|
How to configure wireshark for dissecting LTE protocols:
|
||||||
- start the wireshark as a sudoers
|
- start the wireshark as a sudoers
|
||||||
- goto analyze->enabled prototols
|
- goto analyze->enabled prototols
|
||||||
=> enable mac_lte_udp and rlc_lte_udp
|
=> enable mac_lte_udp and rlc_lte_udp
|
||||||
- goto edit/preferences and expand Protocols
|
- goto edit/preferences and expand Protocols
|
||||||
- select UDP and check "try heuristic sub-dissectors first"
|
- select UDP and check "try heuristic sub-dissectors first"
|
||||||
- select MAC-LTE, and check all the options (checkboxes), and set the "which layer info to show in info column" to "MAC info"
|
- select MAC-LTE, and check all the options (checkboxes), and set the "which layer info to show in info column" to "MAC info"
|
||||||
- select RLC-LTE, and check all the options except the "May see RLC headers only", and set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM.
|
- select RLC-LTE, and check all the options except the "May see RLC headers only", and
|
||||||
|
set the "call PDCP dissector for DRB PDUs" to "12-bit SN". Optionally you may select the sequence analysis for RLC AM/UM.
|
||||||
|
|
||||||
How to use
|
How to use
|
||||||
- start eNB or UE with option -W (or -P if you want to make a pcap file)
|
- start eNB or UE with option --opt.type wireshark
|
||||||
- capture on local interface "lo"
|
--opt options are:
|
||||||
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
|
--opt.type none/wireshark/pcap
|
||||||
|
--opt.ip 127.0.0.1 to specify the output IP address (default: 127.0.0.1)
|
||||||
|
output port is always: 9999 (to change it, change constant: PACKET_MAC_LTE_DEFAULT_UDP_PORT in OAI code)
|
||||||
|
--opt.path file_name to specify the file name (pcap)
|
||||||
|
- capture on local interface "lo"
|
||||||
|
- filter out the ICMP/DNS/TCP messages (e.g. "!icmp && !dns && !tcp")
|
||||||
|
|||||||
+6
-11
@@ -110,22 +110,17 @@ typedef enum radio_type_e {
|
|||||||
* function def
|
* function def
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void trace_pdu(int direction,
|
extern int opt_enabled;
|
||||||
uint8_t *pdu_buffer,
|
#define trace_pdu(x...) if (opt_enabled) trace_pdu_implementation(x)
|
||||||
unsigned int pdu_buffer_size,
|
|
||||||
int ueid,
|
void trace_pdu_implementation(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
||||||
int rntiType,
|
int ueid, int rntiType, int rnti, uint16_t sysFrame, uint8_t subframe,
|
||||||
int rnti,
|
int oob_event, int oob_event_value);
|
||||||
uint16_t sysFrame,
|
|
||||||
uint8_t subframe,
|
|
||||||
int oob_event,
|
|
||||||
int oob_event_value);
|
|
||||||
|
|
||||||
int init_opt(void);
|
int init_opt(void);
|
||||||
|
|
||||||
void terminate_opt(void);
|
void terminate_opt(void);
|
||||||
|
|
||||||
extern int opt_enabled;
|
|
||||||
//double *timing_analyzer(int index, int direction );
|
//double *timing_analyzer(int index, int direction );
|
||||||
|
|
||||||
#endif /* OPT_H_ */
|
#endif /* OPT_H_ */
|
||||||
|
|||||||
@@ -386,17 +386,22 @@ static int MAC_LTE_PCAP_WritePDU(MAC_Context_Info_t *context,
|
|||||||
extern RAN_CONTEXT_t RC;
|
extern RAN_CONTEXT_t RC;
|
||||||
#include <openair1/PHY/phy_extern_ue.h>
|
#include <openair1/PHY/phy_extern_ue.h>
|
||||||
/* Remote serveraddress (where Wireshark is running) */
|
/* Remote serveraddress (where Wireshark is running) */
|
||||||
void trace_pdu(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
void trace_pdu_implementation(int direction, uint8_t *pdu_buffer, unsigned int pdu_buffer_size,
|
||||||
int ueid, int rntiType, int rnti, uint16_t sysFrameNumber, uint8_t subFrameNumber, int oob_event,
|
int ueid, int rntiType, int rnti, uint16_t sysFrameNumber, uint8_t subFrameNumber, int oob_event,
|
||||||
int oob_event_value) {
|
int oob_event_value) {
|
||||||
MAC_Context_Info_t pdu_context;
|
MAC_Context_Info_t pdu_context;
|
||||||
int radioType=FDD_RADIO;
|
int radioType=FDD_RADIO;
|
||||||
|
LOG_D(OPT,"sending packet to wireshark: direction=%s, size: %d, ueid: %d, rnti: %x, frame/sf: %d.%d\n",
|
||||||
|
direction?"DL":"UL", pdu_buffer_size, ueid, rnti, sysFrameNumber,subFrameNumber);
|
||||||
|
|
||||||
if (RC.eNB[0][0]!=NULL)
|
if (RC.eNB && RC.eNB[0][0]!=NULL)
|
||||||
radioType=RC.eNB[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
|
radioType=RC.eNB[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
|
||||||
|
else if (PHY_vars_UE_g && PHY_vars_UE_g[0][0] != NULL)
|
||||||
if (PHY_vars_UE_g[0][0] != NULL)
|
|
||||||
radioType=PHY_vars_UE_g[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
|
radioType=PHY_vars_UE_g[0][0]->frame_parms.frame_type== FDD ? FDD_RADIO:TDD_RADIO;
|
||||||
|
else {
|
||||||
|
LOG_E(OPT,"not a eNB neither a UE!!! \n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (opt_type) {
|
switch (opt_type) {
|
||||||
case OPT_WIRESHARK :
|
case OPT_WIRESHARK :
|
||||||
|
|||||||
@@ -439,35 +439,33 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
|
|||||||
b->headerMode=false;
|
b->headerMode=false;
|
||||||
|
|
||||||
if ( t->nextTimestamp == 0 ) { // First block in UE, resync with the eNB current TS
|
if ( t->nextTimestamp == 0 ) { // First block in UE, resync with the eNB current TS
|
||||||
t->nextTimestamp=b->th.timestamp> nsamps_for_initial ?
|
t->nextTimestamp = b->th.timestamp > nsamps_for_initial ? b->th.timestamp - nsamps_for_initial : 0;
|
||||||
b->th.timestamp - nsamps_for_initial :
|
b->lastReceivedTS = b->th.timestamp > nsamps_for_initial ? b->th.timestamp : nsamps_for_initial;
|
||||||
0;
|
LOG_W(HW,"UE got first timestamp: starting at %lu\n", t->nextTimestamp);
|
||||||
b->lastReceivedTS=b->th.timestamp> nsamps_for_initial ?
|
b->trashingPacket=true;
|
||||||
b->th.timestamp :
|
} else if ( b->lastReceivedTS < b->th.timestamp) {
|
||||||
nsamps_for_initial;
|
|
||||||
LOG_W(HW,"UE got first timestamp: starting at %lu\n", t->nextTimestamp);
|
|
||||||
b->trashingPacket=true;
|
|
||||||
} else if ( b->lastReceivedTS < b->th.timestamp) {
|
|
||||||
int nbAnt= b->th.nbAnt;
|
int nbAnt= b->th.nbAnt;
|
||||||
|
|
||||||
for (uint64_t index=b->lastReceivedTS; index < b->th.timestamp; index++ ) {
|
for (uint64_t index=b->lastReceivedTS; index < b->th.timestamp; index++ ) {
|
||||||
for (int a=0; a < nbAnt; a++) {
|
for (int a=0; a < nbAnt; a++) {
|
||||||
b->circularBuf[(index*nbAnt+a)%CirSize].r=0;
|
b->circularBuf[(index*nbAnt+a)%CirSize].r = 0;
|
||||||
b->circularBuf[(index*nbAnt+a)%CirSize].i=0;
|
b->circularBuf[(index*nbAnt+a)%CirSize].i = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (b->lastReceivedTS != 0 && b->th.timestamp-b->lastReceivedTS > 50 )
|
if (b->lastReceivedTS != 0 && b->th.timestamp-b->lastReceivedTS > 50 )
|
||||||
LOG_W(HW,"UEsock: %d gap of: %ld in reception\n", fd, b->th.timestamp-b->lastReceivedTS );
|
LOG_W(HW,"UEsock: %d gap of: %ld in reception\n", fd, b->th.timestamp-b->lastReceivedTS );
|
||||||
b->lastReceivedTS=b->th.timestamp;
|
b->lastReceivedTS=b->th.timestamp;
|
||||||
|
|
||||||
} else if ( b->lastReceivedTS > b->th.timestamp && b->th.size == 1 ) {
|
} else if ( b->lastReceivedTS > b->th.timestamp && b->th.size == 1 ) {
|
||||||
LOG_W(HW,"Received Rx/Tx synchro out of order\n");
|
LOG_W(HW,"Received Rx/Tx synchro out of order\n");
|
||||||
b->trashingPacket=true;
|
b->trashingPacket=true;
|
||||||
} else if ( b->lastReceivedTS == b->th.timestamp ) {
|
} else if ( b->lastReceivedTS == b->th.timestamp ) {
|
||||||
// normal case
|
// normal case
|
||||||
} else {
|
} else {
|
||||||
abort();
|
abort();
|
||||||
AssertFatal(false, "received data in past: current is %lu, new reception: %lu!\n", b->lastReceivedTS, b->th.timestamp); }
|
AssertFatal(false, "received data in past: current is %lu, new reception: %lu!\n", b->lastReceivedTS, b->th.timestamp);
|
||||||
|
}
|
||||||
|
|
||||||
pthread_mutex_lock(&Sockmutex);
|
pthread_mutex_lock(&Sockmutex);
|
||||||
|
|
||||||
@@ -481,17 +479,17 @@ static bool flushInput(rfsimulator_state_t *t, int timeout, int nsamps_for_initi
|
|||||||
|
|
||||||
if ( b->headerMode==false ) {
|
if ( b->headerMode==false ) {
|
||||||
LOG_D(HW,"UEsock: %d Set b->lastReceivedTS %ld\n", fd, b->lastReceivedTS);
|
LOG_D(HW,"UEsock: %d Set b->lastReceivedTS %ld\n", fd, b->lastReceivedTS);
|
||||||
if ( ! b->trashingPacket ) {
|
if ( ! b->trashingPacket ) {
|
||||||
b->lastReceivedTS=b->th.timestamp+b->th.size-byteToSample(b->remainToTransfer,b->th.nbAnt);
|
b->lastReceivedTS=b->th.timestamp+b->th.size-byteToSample(b->remainToTransfer,b->th.nbAnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( b->remainToTransfer==0) {
|
if ( b->remainToTransfer==0) {
|
||||||
LOG_D(HW,"UEsock: %d Completed block reception: %ld\n", fd, b->lastReceivedTS);
|
LOG_D(HW,"UEsock: %d Completed block reception: %ld\n", fd, b->lastReceivedTS);
|
||||||
b->headerMode=true;
|
b->headerMode=true;
|
||||||
b->transferPtr=(char *)&b->th;
|
b->transferPtr=(char *)&b->th;
|
||||||
b->remainToTransfer=sizeof(samplesBlockHeader_t);
|
b->remainToTransfer=sizeof(samplesBlockHeader_t);
|
||||||
b->th.magic=-1;
|
b->th.magic=-1;
|
||||||
b->trashingPacket=false;
|
b->trashingPacket=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,24 @@
|
|||||||
|
|
||||||
volatile int oai_exit = 0;
|
volatile int oai_exit = 0;
|
||||||
|
|
||||||
|
int fullread(int fd, void *_buf, int count) {
|
||||||
|
char *buf = _buf;
|
||||||
|
int ret = 0;
|
||||||
|
int l;
|
||||||
|
|
||||||
|
while (count) {
|
||||||
|
l = read(fd, buf, count);
|
||||||
|
|
||||||
|
if (l <= 0) return -1;
|
||||||
|
|
||||||
|
count -= l;
|
||||||
|
buf += l;
|
||||||
|
ret += l;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
void fullwrite(int fd, void *_buf, int count) {
|
void fullwrite(int fd, void *_buf, int count) {
|
||||||
char *buf = _buf;
|
char *buf = _buf;
|
||||||
int l;
|
int l;
|
||||||
@@ -63,10 +81,9 @@ sin_addr:
|
|||||||
bool connected=false;
|
bool connected=false;
|
||||||
|
|
||||||
while(!connected) {
|
while(!connected) {
|
||||||
LOG_I(HW,"rfsimulator: trying to connect to %s:%d\n", IP, port);
|
//LOG_I(HW,"rfsimulator: trying to connect to %s:%d\n", IP, port);
|
||||||
|
|
||||||
if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0) {
|
if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) == 0) {
|
||||||
LOG_I(HW,"rfsimulator: connection established\n");
|
//LOG_I(HW,"rfsimulator: connection established\n");
|
||||||
connected=true;
|
connected=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -108,12 +125,13 @@ int main(int argc, char *argv[]) {
|
|||||||
if (strcmp(argv[2],"server")==0) {
|
if (strcmp(argv[2],"server")==0) {
|
||||||
serviceSock=server_start(atoi(argv[3]));
|
serviceSock=server_start(atoi(argv[3]));
|
||||||
} else {
|
} else {
|
||||||
client_start(argv[2],atoi(argv[3]));
|
serviceSock=client_start(argv[2],atoi(argv[3]));
|
||||||
}
|
}
|
||||||
|
|
||||||
samplesBlockHeader_t header;
|
samplesBlockHeader_t header;
|
||||||
int bufSize=100000;
|
int bufSize=100000;
|
||||||
void *buff=malloc(bufSize);
|
void *buff=malloc(bufSize);
|
||||||
|
uint64_t readTS=0;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
//Rewind the file to loop on the samples
|
//Rewind the file to loop on the samples
|
||||||
@@ -125,9 +143,11 @@ int main(int argc, char *argv[]) {
|
|||||||
AssertFatal(read(fd,&header,sizeof(header)), "");
|
AssertFatal(read(fd,&header,sizeof(header)), "");
|
||||||
fullwrite(serviceSock, &header, sizeof(header));
|
fullwrite(serviceSock, &header, sizeof(header));
|
||||||
int dataSize=sizeof(int32_t)*header.size*header.nbAnt;
|
int dataSize=sizeof(int32_t)*header.size*header.nbAnt;
|
||||||
|
uint64_t wroteTS=header.timestamp;
|
||||||
|
|
||||||
if (dataSize>bufSize) {
|
if (dataSize>bufSize) {
|
||||||
void * new_buff = realloc(buff, dataSize);
|
void *new_buff = realloc(buff, dataSize);
|
||||||
|
|
||||||
if (new_buff == NULL) {
|
if (new_buff == NULL) {
|
||||||
free(buff);
|
free(buff);
|
||||||
AssertFatal(1, "Could not reallocate");
|
AssertFatal(1, "Could not reallocate");
|
||||||
@@ -139,9 +159,18 @@ int main(int argc, char *argv[]) {
|
|||||||
AssertFatal(read(fd,buff,dataSize) == dataSize, "");
|
AssertFatal(read(fd,buff,dataSize) == dataSize, "");
|
||||||
fullwrite(serviceSock, buff, dataSize);
|
fullwrite(serviceSock, buff, dataSize);
|
||||||
// Purge incoming samples
|
// Purge incoming samples
|
||||||
setblocking(serviceSock, notBlocking);
|
setblocking(serviceSock, blocking);
|
||||||
|
|
||||||
while(recv(serviceSock,buff, bufSize, MSG_DONTWAIT) > 0) {
|
while(readTS < wroteTS) {
|
||||||
|
if ( fullread(serviceSock, &header,sizeof(header)) != sizeof(header) ||
|
||||||
|
fullread(serviceSock, buff, sizeof(int32_t)*header.size*header.nbAnt) !=
|
||||||
|
sizeof(int32_t)*header.size*header.nbAnt
|
||||||
|
) {
|
||||||
|
printf("error: %s\n", strerror(errno));
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
readTS=header.timestamp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+89
-107
@@ -25,7 +25,7 @@
|
|||||||
* \date 2019
|
* \date 2019
|
||||||
* \version 0.1
|
* \version 0.1
|
||||||
* \company Eurecom
|
* \company Eurecom
|
||||||
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr
|
* \email: {knopp, florian.kaltenberger, navid.nikaein}@eurecom.fr
|
||||||
* \note
|
* \note
|
||||||
* \warning
|
* \warning
|
||||||
*/
|
*/
|
||||||
@@ -160,8 +160,8 @@ static inline void fh_if4p5_south_out(RU_t *ru,
|
|||||||
|
|
||||||
LOG_D(PHY,"ENTERED fh_if4p5_south_out Sending IF4p5 for frame %d subframe %d ru %d\n",ru->proc.frame_tx,ru->proc.tti_tx,ru->idx);
|
LOG_D(PHY,"ENTERED fh_if4p5_south_out Sending IF4p5 for frame %d subframe %d ru %d\n",ru->proc.frame_tx,ru->proc.tti_tx,ru->idx);
|
||||||
|
|
||||||
if (subframe_select(ru->frame_parms,subframe)!=SF_UL) {
|
if (subframe_select(ru->frame_parms, subframe)!=SF_UL) {
|
||||||
send_IF4p5(ru,frame, subframe, IF4p5_PDLFFT);
|
send_IF4p5(ru, frame, subframe, IF4p5_PDLFFT);
|
||||||
ru->south_out_cnt++;
|
ru->south_out_cnt++;
|
||||||
LOG_D(PHY,"south_out_cnt %d\n",ru->south_out_cnt);
|
LOG_D(PHY,"south_out_cnt %d\n",ru->south_out_cnt);
|
||||||
}
|
}
|
||||||
@@ -257,22 +257,21 @@ void fh_if4p5_south_in(RU_t *ru,
|
|||||||
}
|
}
|
||||||
|
|
||||||
//calculate timestamp_rx, timestamp_tx based on frame and subframe
|
//calculate timestamp_rx, timestamp_tx based on frame and subframe
|
||||||
proc->tti_rx = sf;
|
proc->tti_rx = sf;
|
||||||
proc->frame_rx= f;
|
proc->frame_rx = f;
|
||||||
proc->timestamp_rx = ((proc->frame_rx * 10) + proc->tti_rx ) * fp->samples_per_tti ;
|
proc->timestamp_rx = ((proc->frame_rx * 10) + proc->tti_rx ) * fp->samples_per_tti ;
|
||||||
|
|
||||||
// proc->timestamp_tx = proc->timestamp_rx + (4*fp->samples_per_tti);
|
// proc->timestamp_tx = proc->timestamp_rx + (4*fp->samples_per_tti);
|
||||||
if (get_nprocs()<=4) {
|
if (get_nprocs()<=4) {
|
||||||
proc->tti_tx = (sf+sf_ahead)%10;
|
proc->tti_tx = (sf+sf_ahead)%10;
|
||||||
proc->frame_tx= (sf>(9-sf_ahead)) ? (f+1)&1023 : f;
|
proc->frame_tx = (sf>(9-sf_ahead)) ? (f+1)&1023 : f;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PHY,"Setting proc for (%d,%d)\n",sf,f);
|
LOG_D(PHY,"Setting proc for (%d,%d)\n",sf,f);
|
||||||
|
|
||||||
if (proc->first_rx == 0) {
|
if (proc->first_rx == 0) {
|
||||||
if (proc->tti_rx != *subframe) {
|
if (proc->tti_rx != *subframe) {
|
||||||
LOG_E(PHY,"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->tti_rx %d, subframe %d, symbol_mask %x)\n",
|
LOG_E(PHY,"Received Timestamp (IF4p5) doesn't correspond to the time we think it is (proc->tti_rx %d, subframe %d, symbol_mask %x)\n", proc->tti_rx, *subframe, proc->symbol_mask[*subframe]);
|
||||||
proc->tti_rx,*subframe,proc->symbol_mask[*subframe]);
|
|
||||||
*subframe=sf;
|
*subframe=sf;
|
||||||
//exit_fun("Exiting");
|
//exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
@@ -299,7 +298,7 @@ void fh_if4p5_south_in(RU_t *ru,
|
|||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_tx );
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_tx );
|
||||||
}*/
|
}*/
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_SOUTH_IN_RU +ru->idx,f );
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_SOUTH_IN_RU+ru->idx,f);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_IF4P5_SOUTH_IN_RU+ru->idx,sf);
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_IF4P5_SOUTH_IN_RU+ru->idx,sf);
|
||||||
proc->symbol_mask[sf] = 0;
|
proc->symbol_mask[sf] = 0;
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff);
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff);
|
||||||
@@ -480,11 +479,9 @@ void fh_if4p5_north_asynch_in(RU_t *ru,
|
|||||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||||
RU_proc_t *proc = &ru->proc;
|
RU_proc_t *proc = &ru->proc;
|
||||||
uint16_t packet_type;
|
uint16_t packet_type;
|
||||||
uint32_t symbol_number,symbol_mask,symbol_mask_full;
|
uint32_t symbol_number = 0, symbol_mask = 0, symbol_mask_full;
|
||||||
int tti_tx,frame_tx, ret;
|
int tti_tx, frame_tx, ret;
|
||||||
LOG_D(PHY, "%s(ru:%p frame, subframe)\n", __FUNCTION__, ru);
|
LOG_D(PHY, "%s(ru:%p frame, subframe)\n", __FUNCTION__, ru);
|
||||||
symbol_number = 0;
|
|
||||||
symbol_mask = 0;
|
|
||||||
symbol_mask_full = ((subframe_select(fp,*subframe) == SF_S) ? (1<<fp->dl_symbols_in_S_subframe) : (1<<fp->symbols_per_tti))-1;
|
symbol_mask_full = ((subframe_select(fp,*subframe) == SF_S) ? (1<<fp->dl_symbols_in_S_subframe) : (1<<fp->symbols_per_tti))-1;
|
||||||
LOG_D(PHY,"fh_if4p5_north_asynch_in: RU %d, frame %d, subframe %d\n", ru->idx, *frame, *subframe);
|
LOG_D(PHY,"fh_if4p5_north_asynch_in: RU %d, frame %d, subframe %d\n", ru->idx, *frame, *subframe);
|
||||||
|
|
||||||
@@ -503,7 +500,7 @@ void fh_if4p5_north_asynch_in(RU_t *ru,
|
|||||||
|
|
||||||
if ((subframe_select(fp,tti_tx) == SF_DL) && (symbol_number == 0)) start_meas(&ru->rx_fhaul);
|
if ((subframe_select(fp,tti_tx) == SF_DL) && (symbol_number == 0)) start_meas(&ru->rx_fhaul);
|
||||||
|
|
||||||
LOG_D(PHY,"subframe %d (%d): frame %d, subframe %d, symbol %d\n", *subframe,subframe_select(fp,*subframe),frame_tx,tti_tx,symbol_number);
|
LOG_D(PHY,"subframe %d (%d): frame %d, subframe %d, symbol %d\n", *subframe, subframe_select(fp,*subframe), frame_tx, tti_tx, symbol_number);
|
||||||
|
|
||||||
if (proc->first_tx != 0) {
|
if (proc->first_tx != 0) {
|
||||||
*frame = frame_tx;
|
*frame = frame_tx;
|
||||||
@@ -526,8 +523,8 @@ void fh_if4p5_north_asynch_in(RU_t *ru,
|
|||||||
if (subframe_select(fp,tti_tx) == SF_DL) stop_meas(&ru->rx_fhaul);
|
if (subframe_select(fp,tti_tx) == SF_DL) stop_meas(&ru->rx_fhaul);
|
||||||
|
|
||||||
ru->north_in_cnt++;
|
ru->north_in_cnt++;
|
||||||
proc->tti_tx = tti_tx;
|
proc->tti_tx = tti_tx;
|
||||||
proc->frame_tx= frame_tx;
|
proc->frame_tx = frame_tx;
|
||||||
|
|
||||||
if ((frame_tx == 0)&&(tti_tx == 0)) proc->frame_tx_unwrap += 1024;
|
if ((frame_tx == 0)&&(tti_tx == 0)) proc->frame_tx_unwrap += 1024;
|
||||||
|
|
||||||
@@ -542,9 +539,9 @@ void fh_if4p5_north_asynch_in(RU_t *ru,
|
|||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_IF4P5_NORTH_ASYNCH_IN, tti_tx);
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_IF4P5_NORTH_ASYNCH_IN, tti_tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ru->feptx_ofdm) ru->feptx_ofdm(ru,frame_tx,tti_tx);
|
if (ru->feptx_ofdm) ru->feptx_ofdm(ru, frame_tx, tti_tx);
|
||||||
|
|
||||||
if (ru->fh_south_out) ru->fh_south_out(ru,frame_tx,tti_tx,proc->timestamp_tx);
|
if (ru->fh_south_out) ru->fh_south_out(ru, frame_tx, tti_tx, proc->timestamp_tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -560,7 +557,7 @@ void fh_if5_north_out(RU_t *ru) {
|
|||||||
|
|
||||||
// RRU IF4p5 northbound interface (RX)
|
// RRU IF4p5 northbound interface (RX)
|
||||||
void fh_if4p5_north_out(RU_t *ru) {
|
void fh_if4p5_north_out(RU_t *ru) {
|
||||||
RU_proc_t *proc=&ru->proc;
|
RU_proc_t *proc = &ru->proc;
|
||||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||||
const int subframe = proc->tti_rx;
|
const int subframe = proc->tti_rx;
|
||||||
|
|
||||||
@@ -570,7 +567,7 @@ void fh_if4p5_north_out(RU_t *ru) {
|
|||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_NORTH_OUT, proc->frame_rx );
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_IF4P5_NORTH_OUT, proc->frame_rx );
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PHY,"fh_if4p5_north_out: Sending IF4p5_PULFFT SFN.SF %d.%d\n",proc->frame_rx,proc->tti_rx);
|
LOG_D(PHY,"fh_if4p5_north_out: Sending IF4p5_PULFFT SFN.SF %d.%d\n", proc->frame_rx, proc->tti_rx);
|
||||||
|
|
||||||
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) {
|
if ((fp->frame_type == TDD) && (subframe_select(fp,subframe)!=SF_UL)) {
|
||||||
/// **** in TDD during DL send_IF4 of ULTICK to RCC **** ///
|
/// **** in TDD during DL send_IF4 of ULTICK to RCC **** ///
|
||||||
@@ -587,11 +584,11 @@ void fh_if4p5_north_out(RU_t *ru) {
|
|||||||
|
|
||||||
/* add fail safe for late command */
|
/* add fail safe for late command */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
STATE_BURST_NORMAL = 0,
|
STATE_BURST_NORMAL = 0,
|
||||||
STATE_BURST_TERMINATE = 1,
|
STATE_BURST_TERMINATE = 1,
|
||||||
STATE_BURST_STOP_1 = 2,
|
STATE_BURST_STOP_1 = 2,
|
||||||
STATE_BURST_STOP_2 = 3,
|
STATE_BURST_STOP_2 = 3,
|
||||||
STATE_BURST_RESTART = 4,
|
STATE_BURST_RESTART = 4,
|
||||||
} late_control_e;
|
} late_control_e;
|
||||||
|
|
||||||
volatile late_control_e late_control=STATE_BURST_NORMAL;
|
volatile late_control_e late_control=STATE_BURST_NORMAL;
|
||||||
@@ -737,7 +734,7 @@ void rx_rf(RU_t *ru,
|
|||||||
|
|
||||||
if (ru->fh_north_asynch_in == NULL) {
|
if (ru->fh_north_asynch_in == NULL) {
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_rx );
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_tx );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -928,11 +925,12 @@ static void *ru_thread_asynch_rxtx( void *param ) {
|
|||||||
|
|
||||||
// asynchronous receive from south (Mobipass)
|
// asynchronous receive from south (Mobipass)
|
||||||
if (ru->fh_south_asynch_in) {
|
if (ru->fh_south_asynch_in) {
|
||||||
ru->fh_south_asynch_in(ru,&frame,&subframe);
|
ru->fh_south_asynch_in(ru, &frame, &subframe);
|
||||||
}
|
}
|
||||||
// asynchronous receive from north (RRU IF4/IF5)
|
// asynchronous receive from north (RRU IF4/IF5)
|
||||||
else if (ru->fh_north_asynch_in) {
|
else if (ru->fh_north_asynch_in) {
|
||||||
if (subframe_select(ru->frame_parms,subframe)!=SF_UL) ru->fh_north_asynch_in(ru,&frame,&subframe);
|
if (subframe_select(ru->frame_parms,subframe)!=SF_UL)
|
||||||
|
ru->fh_north_asynch_in(ru, &frame, &subframe);
|
||||||
} else
|
} else
|
||||||
AssertFatal(1==0,"Unknown function in ru_thread_asynch_rxtx\n");
|
AssertFatal(1==0,"Unknown function in ru_thread_asynch_rxtx\n");
|
||||||
}
|
}
|
||||||
@@ -1167,9 +1165,7 @@ void do_ru_synch(RU_t *ru) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int check_sync(RU_t *ru,
|
int check_sync(RU_t *ru, RU_t *ru_master, int subframe) {
|
||||||
RU_t *ru_master,
|
|
||||||
int subframe) {
|
|
||||||
if (fabs(ru_master->proc.t[subframe].tv_nsec - ru->proc.t[subframe].tv_nsec) > 500000)
|
if (fabs(ru_master->proc.t[subframe].tv_nsec - ru->proc.t[subframe].tv_nsec) > 500000)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
@@ -1179,23 +1175,22 @@ int check_sync(RU_t *ru,
|
|||||||
|
|
||||||
void wakeup_L1s(RU_t *ru) {
|
void wakeup_L1s(RU_t *ru) {
|
||||||
PHY_VARS_eNB **eNB_list = ru->eNB_list;
|
PHY_VARS_eNB **eNB_list = ru->eNB_list;
|
||||||
LOG_D(PHY,"wakeup_L1s (num %d) for RU %d (%d.%d)\n", ru->num_eNB, ru->idx, ru->proc.frame_rx,ru->proc.tti_rx);
|
PHY_VARS_eNB *eNB = eNB_list[0];
|
||||||
PHY_VARS_eNB *eNB = eNB_list[0];
|
L1_proc_t *proc = &eNB->proc;
|
||||||
L1_proc_t *proc = &eNB->proc;
|
|
||||||
struct timespec t;
|
struct timespec t;
|
||||||
LOG_D(PHY,"wakeup_L1s (num %d) for RU %d ru->eNB_top:%p\n", ru->num_eNB, ru->idx, ru->eNB_top);
|
LOG_D(PHY, "wakeup_L1s (num %d) for RU %d (%d.%d) ru->eNB_top:%p\n", ru->num_eNB, ru->idx, ru->proc.frame_rx, ru->proc.tti_rx, ru->eNB_top);
|
||||||
// call eNB function directly
|
// call eNB function directly
|
||||||
char string[20];
|
char string[20];
|
||||||
sprintf(string,"Incoming RU %d",ru->idx);
|
sprintf(string, "Incoming RU %d", ru->idx);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU +ru->idx, ru->proc.frame_rx);
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.frame_rx);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.tti_rx);
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.tti_rx);
|
||||||
AssertFatal(0==pthread_mutex_lock(&proc->mutex_RU),"");
|
AssertFatal(0==pthread_mutex_lock(&proc->mutex_RU),"");
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU+ru->idx, 1);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU+ru->idx, 1);
|
||||||
//printf("wakeup_L1s: Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask[%d] %x\n",
|
//printf("wakeup_L1s: Frame %d, Subframe %d: RU %d done (wait_cnt %d),RU_mask[%d] %x\n",
|
||||||
// ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,ru->wait_cnt,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx]);
|
// ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,ru->wait_cnt,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx]);
|
||||||
// VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.frame_rx);
|
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.frame_rx);
|
||||||
// VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.subframe_rx);
|
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.subframe_rx);
|
||||||
clock_gettime(CLOCK_MONOTONIC,&ru->proc.t[ru->proc.tti_rx]);
|
clock_gettime(CLOCK_MONOTONIC, &ru->proc.t[ru->proc.tti_rx]);
|
||||||
|
|
||||||
if (proc->RU_mask[ru->proc.tti_rx] == 0) {
|
if (proc->RU_mask[ru->proc.tti_rx] == 0) {
|
||||||
//clock_gettime(CLOCK_MONOTONIC,&proc->t[ru->proc.subframe_rx]);
|
//clock_gettime(CLOCK_MONOTONIC,&proc->t[ru->proc.subframe_rx]);
|
||||||
@@ -1211,21 +1206,21 @@ void wakeup_L1s(RU_t *ru) {
|
|||||||
eNB->RU_list[i]->idx, eNB->RU_list[i]->proc.frame_rx, eNB->RU_list[i]->proc.tti_rx, ru_states[eNB->RU_list[i]->state]);
|
eNB->RU_list[i]->idx, eNB->RU_list[i]->proc.frame_rx, eNB->RU_list[i]->proc.tti_rx, ru_states[eNB->RU_list[i]->state]);
|
||||||
|
|
||||||
if (ru == eNB->RU_list[i] && eNB->RU_list[i]->wait_cnt == 0) {
|
if (ru == eNB->RU_list[i] && eNB->RU_list[i]->wait_cnt == 0) {
|
||||||
// AssertFatal((proc->RU_mask&(1<<i)) == 0, "eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n",eNB->Mod_id,ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,eNB->num_RU,proc->RU_mask);
|
//AssertFatal((proc->RU_mask&(1<<i)) == 0, "eNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n", eNB->Mod_id,ru->proc.frame_rx,ru->proc.subframe_rx,ru->idx,eNB->num_RU,proc->RU_mask);
|
||||||
proc->RU_mask[ru->proc.tti_rx] |= (1<<i);
|
proc->RU_mask[ru->proc.tti_rx] |= (1<<i);
|
||||||
} else if (/*eNB->RU_list[i]->state == RU_SYNC ||*/(eNB->RU_list[i]->is_slave==1 && eNB->RU_list[i]->wait_cnt>0 && ru!=eNB->RU_list[i] && ru->is_slave==0)) {
|
} else if (/*eNB->RU_list[i]->state == RU_SYNC ||*/(eNB->RU_list[i]->is_slave==1 && eNB->RU_list[i]->wait_cnt>0 && ru!=eNB->RU_list[i] && ru->is_slave==0) ) {
|
||||||
proc->RU_mask[ru->proc.tti_rx] |= (1<<i);
|
proc->RU_mask[ru->proc.tti_rx] |= (1<<i);
|
||||||
}
|
}
|
||||||
|
|
||||||
//printf("RU %d, RU_mask[%d] %d, i %d, frame %d, slave %d, ru->cnt %d, i->cnt %d\n",ru->idx,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx],i,ru->proc.frame_rx,ru->is_slave,ru->wait_cnt,eNB->RU_list[i]->wait_cnt);
|
//printf("RU %d, RU_mask[%d] %d, i %d, frame %d, slave %d, ru->cnt %d, i->cnt %d\n",ru->idx,ru->proc.subframe_rx,proc->RU_mask[ru->proc.subframe_rx],i,ru->proc.frame_rx,ru->is_slave,ru->wait_cnt,eNB->RU_list[i]->wait_cnt);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_MASK_RU, proc->RU_mask[ru->proc.tti_rx]);
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_MASK_RU, proc->RU_mask[ru->proc.tti_rx]);
|
||||||
|
|
||||||
if (ru->is_slave == 0 && ( (proc->RU_mask[ru->proc.tti_rx]&(1<<i)) == 1) && eNB->RU_list[i]->state == RU_RUN) { // This is master & the RRU has already been received
|
if (ru->is_slave == 0 && ( (proc->RU_mask[ru->proc.tti_rx]&(1<<i)) == 1 ) && eNB->RU_list[i]->state == RU_RUN) { //This is master & the RRU has already been received
|
||||||
if (check_sync(eNB->RU_list[i],eNB->RU_list[0],ru->proc.tti_rx) == 0)
|
if (check_sync(eNB->RU_list[i],eNB->RU_list[0],ru->proc.tti_rx) == 0)
|
||||||
LOG_E(PHY,"RU %d is not SYNC, subframe %d, time %f this is master\n",
|
LOG_E(PHY,"RU %d is not SYNC, subframe %d, time %f this is master\n",
|
||||||
eNB->RU_list[i]->idx, ru->proc.tti_rx, fabs(eNB->RU_list[i]->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
|
eNB->RU_list[i]->idx, ru->proc.tti_rx, fabs(eNB->RU_list[i]->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
|
||||||
} else if (ru->is_slave == 1 && ru->state == RU_RUN && ( (proc->RU_mask[ru->proc.tti_rx]&(1<<0)) == 1)) { // master already received. TODO: we assume that RU0 is master.
|
} else if (ru->is_slave == 1 && ru->state == RU_RUN && ( (proc->RU_mask[ru->proc.tti_rx]&(1<<0)) == 1)) { // master already received. TODO: we assume that RU0 is master.
|
||||||
if (check_sync(ru,eNB->RU_list[0],ru->proc.tti_rx) == 0)
|
if (check_sync(ru,eNB->RU_list[0],ru->proc.tti_rx) == 0)
|
||||||
LOG_E(PHY,"RU %d is not SYNC time, subframe %d, time %f\n",
|
LOG_E(PHY,"RU %d is not SYNC time, subframe %d, time %f\n",
|
||||||
ru->idx, ru->proc.tti_rx, fabs(ru->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
|
ru->idx, ru->proc.tti_rx, fabs(ru->proc.t[ru->proc.tti_rx].tv_nsec - eNB->RU_list[0]->proc.t[ru->proc.tti_rx].tv_nsec));
|
||||||
}
|
}
|
||||||
@@ -1238,16 +1233,14 @@ void wakeup_L1s(RU_t *ru) {
|
|||||||
LOG_D(PHY,"ru_mask is %d \n ", proc->RU_mask[ru->proc.tti_rx]);
|
LOG_D(PHY,"ru_mask is %d \n ", proc->RU_mask[ru->proc.tti_rx]);
|
||||||
LOG_D(PHY,"the number of RU is %d, the current ru is RU %d \n ", (1<<eNB->num_RU)-1, ru->idx);
|
LOG_D(PHY,"the number of RU is %d, the current ru is RU %d \n ", (1<<eNB->num_RU)-1, ru->idx);
|
||||||
LOG_D(PHY,"ru->proc.subframe_rx is %d \n", ru->proc.tti_rx);
|
LOG_D(PHY,"ru->proc.subframe_rx is %d \n", ru->proc.tti_rx);
|
||||||
LOG_D(PHY,"Reseting mask frame %d, subframe %d, this is RU %d\n",ru->proc.frame_rx, ru->proc.tti_rx, ru->idx);
|
LOG_D(PHY,"Resetting mask frame %d, subframe %d, this is RU %d\n", ru->proc.frame_rx, ru->proc.tti_rx, ru->idx);
|
||||||
proc->RU_mask[ru->proc.tti_rx] = 0;
|
proc->RU_mask[ru->proc.tti_rx] = 0;
|
||||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_MASK_RU, proc->RU_mask[ru->proc.tti_rx]);
|
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_MASK_RU, proc->RU_mask[ru->proc.tti_rx]);
|
||||||
clock_gettime(CLOCK_MONOTONIC,&t);
|
clock_gettime(CLOCK_MONOTONIC,&t);
|
||||||
//stop_meas(&proc->ru_arrival_time);
|
//stop_meas(&proc->ru_arrival_time);
|
||||||
/* AssertFatal(t.tv_nsec < proc->t[ru->proc.subframe_rx].tv_nsec+5000000,
|
/*AssertFatal(t.tv_nsec < proc->t[ru->proc.subframe_rx].tv_nsec+5000000, "Time difference for subframe %d (Frame %d) => %lu > 5ms, this is RU %d\n",
|
||||||
"Time difference for subframe %d (Frame %d) => %lu > 5ms, this is RU %d\n",
|
ru->proc.subframe_rx, ru->proc.frame_rx, t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec, ru->idx);*/
|
||||||
ru->proc.subframe_rx, ru->proc.frame_rx, t.tv_nsec - proc->t[ru->proc.subframe_rx].tv_nsec, ru->idx);
|
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.frame_rx);
|
||||||
*/
|
|
||||||
// VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.frame_rx);
|
|
||||||
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.subframe_rx);
|
//VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_WAKEUP_L1S_RU+ru->idx, ru->proc.subframe_rx);
|
||||||
AssertFatal(0==pthread_mutex_unlock(&proc->mutex_RU),"");
|
AssertFatal(0==pthread_mutex_unlock(&proc->mutex_RU),"");
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU+ru->idx, 0 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_LOCK_MUTEX_RU+ru->idx, 0 );
|
||||||
@@ -1287,7 +1280,7 @@ void wakeup_L1s(RU_t *ru) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline int wakeup_prach_ru(RU_t *ru) {
|
void wakeup_prach_ru(RU_t *ru) {
|
||||||
struct timespec wait;
|
struct timespec wait;
|
||||||
int time_ns = 5000000L, ret;
|
int time_ns = 5000000L, ret;
|
||||||
clock_gettime(CLOCK_REALTIME,&wait);
|
clock_gettime(CLOCK_REALTIME,&wait);
|
||||||
@@ -1317,14 +1310,12 @@ static inline int wakeup_prach_ru(RU_t *ru) {
|
|||||||
} else LOG_W(PHY,"RU prach thread busy, skipping\n");
|
} else LOG_W(PHY,"RU prach thread busy, skipping\n");
|
||||||
|
|
||||||
AssertFatal((ret=pthread_mutex_unlock( &ru->proc.mutex_prach ))==0,"mutex_unlock returns %d\n",ret);
|
AssertFatal((ret=pthread_mutex_unlock( &ru->proc.mutex_prach ))==0,"mutex_unlock returns %d\n",ret);
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline int wakeup_prach_ru_br(RU_t *ru) {
|
void wakeup_prach_ru_br(RU_t *ru) {
|
||||||
int ret;
|
|
||||||
struct timespec wait;
|
struct timespec wait;
|
||||||
int time_ns = 5000000L;
|
int time_ns = 5000000L, ret;
|
||||||
clock_gettime(CLOCK_REALTIME,&wait);
|
clock_gettime(CLOCK_REALTIME,&wait);
|
||||||
wait.tv_nsec += time_ns;
|
wait.tv_nsec += time_ns;
|
||||||
|
|
||||||
@@ -1345,15 +1336,12 @@ inline int wakeup_prach_ru_br(RU_t *ru) {
|
|||||||
} else LOG_W(PHY,"RU prach thread busy, skipping\n");
|
} else LOG_W(PHY,"RU prach thread busy, skipping\n");
|
||||||
|
|
||||||
AssertFatal((ret=pthread_mutex_unlock( &ru->proc.mutex_prach_br ))==0,"mutex_unlock returns %d\n",ret);
|
AssertFatal((ret=pthread_mutex_unlock( &ru->proc.mutex_prach_br ))==0,"mutex_unlock returns %d\n",ret);
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// this is for RU with local RF unit
|
// this is for RU with local RF unit
|
||||||
void fill_rf_config(RU_t *ru,
|
void fill_rf_config(RU_t *ru,
|
||||||
char *rf_config_file) {
|
char *rf_config_file) {
|
||||||
int i;
|
|
||||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||||
openair0_config_t *cfg = &ru->openair0_cfg;
|
openair0_config_t *cfg = &ru->openair0_cfg;
|
||||||
//printf("////////////////numerology in config = %d\n",numerology);
|
//printf("////////////////numerology in config = %d\n",numerology);
|
||||||
@@ -1417,7 +1405,7 @@ void fill_rf_config(RU_t *ru,
|
|||||||
cfg->rx_num_channels=ru->nb_rx;
|
cfg->rx_num_channels=ru->nb_rx;
|
||||||
cfg->clock_source=get_softmodem_params()->clock_source;
|
cfg->clock_source=get_softmodem_params()->clock_source;
|
||||||
|
|
||||||
for (i=0; i<ru->nb_tx; i++) {
|
for (int i=0; i<ru->nb_tx; i++) {
|
||||||
cfg->tx_freq[i] = (double)fp->dl_CarrierFreq;
|
cfg->tx_freq[i] = (double)fp->dl_CarrierFreq;
|
||||||
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
|
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
|
||||||
cfg->tx_gain[i] = (double)ru->att_tx;
|
cfg->tx_gain[i] = (double)ru->att_tx;
|
||||||
@@ -1606,7 +1594,7 @@ static void *ru_thread_tx( void *param ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PHY,"ru_thread_tx: releasing RU TX in %d.%d\n",proc->frame_tx,proc->tti_tx);
|
LOG_D(PHY,"ru_thread_tx: releasing RU TX in %d.%d\n", proc->frame_tx, proc->tti_tx);
|
||||||
release_thread(&proc->mutex_eNBs,&proc->instance_cnt_eNBs,"ru_thread_tx");
|
release_thread(&proc->mutex_eNBs,&proc->instance_cnt_eNBs,"ru_thread_tx");
|
||||||
|
|
||||||
for(int i = 0; i<ru->num_eNB; i++) {
|
for(int i = 0; i<ru->num_eNB; i++) {
|
||||||
@@ -1638,7 +1626,7 @@ static void *ru_thread_tx( void *param ) {
|
|||||||
AssertFatal((ret=pthread_mutex_unlock(&eNB_proc->mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
|
AssertFatal((ret=pthread_mutex_unlock(&eNB_proc->mutex_RU_tx))==0,"mutex_unlock returns %d\n",ret);
|
||||||
AssertFatal((ret=pthread_mutex_lock( &L1_proc->mutex_RUs))==0,"mutex_lock returns %d\n",ret);
|
AssertFatal((ret=pthread_mutex_lock( &L1_proc->mutex_RUs))==0,"mutex_lock returns %d\n",ret);
|
||||||
L1_proc->instance_cnt_RUs = 0;
|
L1_proc->instance_cnt_RUs = 0;
|
||||||
LOG_D(PHY,"ru_thread_tx: Signaling RU TX done in %d.%d\n",proc->frame_tx,proc->tti_tx);
|
LOG_D(PHY,"ru_thread_tx: Signaling RU TX done in %d.%d\n", proc->frame_tx, proc->tti_tx);
|
||||||
// the thread can now be woken up
|
// the thread can now be woken up
|
||||||
LOG_D(PHY,"ru_thread_tx: clearing mask and Waking up L1 thread\n");
|
LOG_D(PHY,"ru_thread_tx: clearing mask and Waking up L1 thread\n");
|
||||||
|
|
||||||
@@ -1661,8 +1649,8 @@ static void *ru_thread_tx( void *param ) {
|
|||||||
|
|
||||||
|
|
||||||
static void *ru_thread( void *param ) {
|
static void *ru_thread( void *param ) {
|
||||||
RU_t *ru = (RU_t *)param;
|
RU_t *ru = (RU_t *)param;
|
||||||
RU_proc_t *proc = &ru->proc;
|
RU_proc_t *proc = &ru->proc;
|
||||||
int subframe = 9;
|
int subframe = 9;
|
||||||
int frame = 1023;
|
int frame = 1023;
|
||||||
int resynch_done = 0;
|
int resynch_done = 0;
|
||||||
@@ -1680,7 +1668,7 @@ static void *ru_thread( void *param ) {
|
|||||||
//pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
//pthread_setaffinity_np(pthread_self(), sizeof(cpu_set_t), &cpuset);
|
||||||
pthread_setname_np( pthread_self(),"ru thread");
|
pthread_setname_np( pthread_self(),"ru thread");
|
||||||
LOG_I(PHY,"thread ru created id=%ld\n", syscall(__NR_gettid));
|
LOG_I(PHY,"thread ru created id=%ld\n", syscall(__NR_gettid));
|
||||||
LOG_I(PHY,"Starting RU %d (%s,%s),\n",ru->idx, NB_functions[ru->function], NB_timing[ru->if_timing]);
|
LOG_I(PHY,"Starting RU %d (%s,%s),\n", ru->idx, NB_functions[ru->function], NB_timing[ru->if_timing]);
|
||||||
|
|
||||||
if(get_softmodem_params()->emulate_rf) {
|
if(get_softmodem_params()->emulate_rf) {
|
||||||
fill_rf_config(ru,ru->rf_config_file);
|
fill_rf_config(ru,ru->rf_config_file);
|
||||||
@@ -1865,7 +1853,7 @@ static void *ru_thread( void *param ) {
|
|||||||
wakeup_slaves(proc);
|
wakeup_slaves(proc);
|
||||||
|
|
||||||
// do RX front-end processing (frequency-shift, dft) if needed
|
// do RX front-end processing (frequency-shift, dft) if needed
|
||||||
if (ru->feprx) ru->feprx(ru,proc->tti_rx);
|
if (ru->feprx) ru->feprx(ru, proc->tti_rx);
|
||||||
|
|
||||||
// wakeup all eNB processes waiting for this RU
|
// wakeup all eNB processes waiting for this RU
|
||||||
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_eNBs))==0,"mutex_lock returns %d\n",ret);
|
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_eNBs))==0,"mutex_lock returns %d\n",ret);
|
||||||
@@ -1908,7 +1896,7 @@ static void *ru_thread( void *param ) {
|
|||||||
|
|
||||||
if(!(get_softmodem_params()->emulate_rf)) { //if(!emulate_rf){
|
if(!(get_softmodem_params()->emulate_rf)) { //if(!emulate_rf){
|
||||||
// do outgoing fronthaul (south) if needed
|
// do outgoing fronthaul (south) if needed
|
||||||
if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru,proc->frame_tx,proc->tti_tx,proc->timestamp_tx);
|
if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru, proc->frame_tx, proc->tti_tx, proc->timestamp_tx);
|
||||||
|
|
||||||
if ((ru->fh_north_out) && (ru->state!=RU_CHECK_SYNC)) ru->fh_north_out(ru);
|
if ((ru->fh_north_out) && (ru->state!=RU_CHECK_SYNC)) ru->fh_north_out(ru);
|
||||||
} else {
|
} else {
|
||||||
@@ -1956,6 +1944,7 @@ static void *ru_thread( void *param ) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// This thread run the initial synchronization like a UE
|
// This thread run the initial synchronization like a UE
|
||||||
void *ru_thread_synch(void *arg) {
|
void *ru_thread_synch(void *arg) {
|
||||||
RU_t *ru = (RU_t *)arg;
|
RU_t *ru = (RU_t *)arg;
|
||||||
@@ -2108,14 +2097,14 @@ static void *eNB_thread_phy_tx( void *param ) {
|
|||||||
phy_tx_txdataF_end = 1;
|
phy_tx_txdataF_end = 1;
|
||||||
|
|
||||||
if(pthread_mutex_lock(&ru->proc.mutex_rf_tx) != 0) {
|
if(pthread_mutex_lock(&ru->proc.mutex_rf_tx) != 0) {
|
||||||
LOG_E( PHY, "[RU] ERROR pthread_mutex_lock for rf tx thread (IC %d)\n", ru->proc.instance_cnt_rf_tx);
|
LOG_E(PHY, "[RU] ERROR pthread_mutex_lock for rf tx thread (IC %d)\n", ru->proc.instance_cnt_rf_tx);
|
||||||
exit_fun( "error locking mutex_rf_tx" );
|
exit_fun("error locking mutex_rf_tx");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ru->proc.instance_cnt_rf_tx==-1) {
|
if (ru->proc.instance_cnt_rf_tx==-1) {
|
||||||
++ru->proc.instance_cnt_rf_tx;
|
++ru->proc.instance_cnt_rf_tx;
|
||||||
ru->proc.frame_tx = proc->frame_phy_tx;
|
ru->proc.frame_tx = proc->frame_phy_tx;
|
||||||
ru->proc.tti_tx = proc->subframe_phy_tx;
|
ru->proc.tti_tx = proc->subframe_phy_tx;
|
||||||
ru->proc.timestamp_tx = proc->timestamp_phy_tx;
|
ru->proc.timestamp_tx = proc->timestamp_phy_tx;
|
||||||
// the thread can now be woken up
|
// the thread can now be woken up
|
||||||
AssertFatal(pthread_cond_signal(&ru->proc.cond_rf_tx) == 0, "ERROR pthread_cond_signal for rf_tx thread\n");
|
AssertFatal(pthread_cond_signal(&ru->proc.cond_rf_tx) == 0, "ERROR pthread_cond_signal for rf_tx thread\n");
|
||||||
@@ -2200,15 +2189,16 @@ int stop_rf(RU_t *ru) {
|
|||||||
|
|
||||||
|
|
||||||
extern void configure_ru(int idx, void *arg);
|
extern void configure_ru(int idx, void *arg);
|
||||||
extern void fep_full(RU_t *ru,int subframe);
|
extern void fep_full(RU_t *ru, int subframe);
|
||||||
extern void feptx_ofdm(RU_t *ru,int frame_tx,int tti_tx);
|
extern void feptx_ofdm(RU_t *ru, int frame_tx, int tti_tx);
|
||||||
extern void feptx_ofdm_2thread(RU_t *ru,int frame_tx,int tti_tx);
|
extern void feptx_ofdm_2thread(RU_t *ru, int frame_tx, int tti_tx);
|
||||||
extern void feptx_prec(RU_t *ru,int frame_tx,int tti_tx);
|
extern void feptx_prec(RU_t *ru, int frame_tx, int tti_tx);
|
||||||
extern void init_fep_thread(RU_t *ru, pthread_attr_t *attr_fep);
|
extern void init_fep_thread(RU_t *ru, pthread_attr_t *attr_fep);
|
||||||
extern void init_feptx_thread(RU_t *ru, pthread_attr_t *attr_feptx);
|
extern void init_feptx_thread(RU_t *ru, pthread_attr_t *attr_feptx);
|
||||||
extern void kill_fep_thread(RU_t *ru);
|
extern void kill_fep_thread(RU_t *ru);
|
||||||
extern void kill_feptx_thread(RU_t *ru);
|
extern void kill_feptx_thread(RU_t *ru);
|
||||||
extern void ru_fep_full_2thread(RU_t *ru,int subframe);
|
extern void ru_fep_full_2thread(RU_t *ru, int subframe);
|
||||||
|
extern void *ru_thread_control( void *param );
|
||||||
|
|
||||||
|
|
||||||
void reset_proc(RU_t *ru) {
|
void reset_proc(RU_t *ru) {
|
||||||
@@ -2226,15 +2216,11 @@ void reset_proc(RU_t *ru) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
extern void *ru_thread_control( void *param );
|
|
||||||
|
|
||||||
|
|
||||||
void init_RU_proc(RU_t *ru) {
|
void init_RU_proc(RU_t *ru) {
|
||||||
int i=0,ret;
|
int i=0, ret;
|
||||||
RU_proc_t *proc;
|
RU_proc_t *proc;
|
||||||
pthread_attr_t *attr_FH=NULL, *attr_FH1=NULL, *attr_prach=NULL, *attr_asynch=NULL, *attr_synch=NULL, *attr_emulateRF=NULL, *attr_ctrl=NULL;
|
pthread_attr_t *attr_FH=NULL, *attr_FH1=NULL, *attr_prach=NULL, *attr_asynch=NULL, *attr_synch=NULL, *attr_emulateRF=NULL, *attr_ctrl=NULL, *attr_prach_br=NULL;
|
||||||
//pthread_attr_t *attr_fep=NULL;
|
//pthread_attr_t *attr_fep=NULL;
|
||||||
pthread_attr_t *attr_prach_br=NULL;
|
|
||||||
#ifndef OCP_FRAMEWORK
|
#ifndef OCP_FRAMEWORK
|
||||||
LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
|
LOG_I(PHY,"Initializing RU proc %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
|
||||||
#endif
|
#endif
|
||||||
@@ -2614,9 +2600,9 @@ void set_function_spec_param(RU_t *ru) {
|
|||||||
|
|
||||||
case REMOTE_IF5: // the remote unit is IF5 RRU
|
case REMOTE_IF5: // the remote unit is IF5 RRU
|
||||||
ru->do_prach = 0;
|
ru->do_prach = 0;
|
||||||
ru->feprx = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full : fep_full; // this is frequency-shift + DFTs
|
ru->feprx = (get_thread_worker_conf() == WORKER_DISABLE) ? fep_full : fep_full; // this is frequency-shift + DFTs
|
||||||
ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs
|
ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs
|
||||||
ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs
|
ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_DISABLE) ? feptx_ofdm : feptx_ofdm_2thread; // need to do transmit Precoding + IDFTs
|
||||||
|
|
||||||
if (ru->if_timing == synch_to_other) {
|
if (ru->if_timing == synch_to_other) {
|
||||||
ru->fh_south_in = fh_slave_south_in; // synchronize to master
|
ru->fh_south_in = fh_slave_south_in; // synchronize to master
|
||||||
@@ -2679,16 +2665,12 @@ void set_function_spec_param(RU_t *ru) {
|
|||||||
|
|
||||||
//extern void RCconfig_RU(void);
|
//extern void RCconfig_RU(void);
|
||||||
|
|
||||||
void init_RU(char *rf_config_file,
|
|
||||||
clock_source_t clock_source,
|
void init_RU(char *rf_config_file, clock_source_t clock_source, clock_source_t time_source, int send_dmrssync) {
|
||||||
clock_source_t time_source,
|
int ru_id, i, CC_id;
|
||||||
int send_dmrssync) {
|
|
||||||
int ru_id;
|
|
||||||
RU_t *ru;
|
RU_t *ru;
|
||||||
PHY_VARS_eNB *eNB0 = (PHY_VARS_eNB *)NULL;
|
PHY_VARS_eNB *eNB0 = (PHY_VARS_eNB *)NULL;
|
||||||
LTE_DL_FRAME_PARMS *fp = (LTE_DL_FRAME_PARMS *)NULL;
|
LTE_DL_FRAME_PARMS *fp = (LTE_DL_FRAME_PARMS *)NULL;
|
||||||
int i;
|
|
||||||
int CC_id;
|
|
||||||
// create status mask
|
// create status mask
|
||||||
RC.ru_mask = 0;
|
RC.ru_mask = 0;
|
||||||
pthread_mutex_init(&RC.ru_mutex,NULL);
|
pthread_mutex_init(&RC.ru_mutex,NULL);
|
||||||
@@ -2706,25 +2688,25 @@ void init_RU(char *rf_config_file,
|
|||||||
|
|
||||||
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
for (ru_id=0; ru_id<RC.nb_RU; ru_id++) {
|
||||||
LOG_D(PHY,"Process RC.ru[%d]\n",ru_id);
|
LOG_D(PHY,"Process RC.ru[%d]\n",ru_id);
|
||||||
ru = RC.ru[ru_id];
|
ru = RC.ru[ru_id];
|
||||||
ru->rf_config_file = rf_config_file;
|
ru->rf_config_file = rf_config_file;
|
||||||
ru->idx = ru_id;
|
ru->idx = ru_id;
|
||||||
ru->ts_offset = 0;
|
ru->ts_offset = 0;
|
||||||
|
|
||||||
if (ru->is_slave == 1) {
|
if (ru->is_slave == 1) {
|
||||||
ru->in_synch = 0;
|
ru->in_synch = 0;
|
||||||
ru->generate_dmrs_sync = 0;
|
ru->generate_dmrs_sync = 0;
|
||||||
} else {
|
} else {
|
||||||
ru->in_synch = 1;
|
ru->in_synch = 1;
|
||||||
ru->generate_dmrs_sync=send_dmrssync;
|
ru->generate_dmrs_sync = send_dmrssync;
|
||||||
}
|
}
|
||||||
|
|
||||||
ru->cmd = EMPTY;
|
ru->cmd = EMPTY;
|
||||||
ru->south_out_cnt= 0;
|
ru->south_out_cnt = 0;
|
||||||
// use eNB_list[0] as a reference for RU frame parameters
|
// use eNB_list[0] as a reference for RU frame parameters
|
||||||
// NOTE: multiple CC_id are not handled here yet!
|
// NOTE: multiple CC_id are not handled here yet!
|
||||||
ru->openair0_cfg.clock_source = clock_source;
|
ru->openair0_cfg.clock_source = clock_source;
|
||||||
ru->openair0_cfg.time_source = time_source;
|
ru->openair0_cfg.time_source = time_source;
|
||||||
|
|
||||||
//ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
|
//ru->generate_dmrs_sync = (ru->is_slave == 0) ? 1 : 0;
|
||||||
if ((ru->is_slave == 0) && (ru->ota_sync_enable == 1))
|
if ((ru->is_slave == 0) && (ru->ota_sync_enable == 1))
|
||||||
@@ -2750,8 +2732,8 @@ void init_RU(char *rf_config_file,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eNB0 = ru->eNB_list[0];
|
eNB0 = ru->eNB_list[0];
|
||||||
fp = ru->frame_parms;
|
fp = ru->frame_parms;
|
||||||
LOG_D(PHY, "RU FUnction:%d ru->if_south:%d\n", ru->function, ru->if_south);
|
LOG_D(PHY, "RU FUnction:%d ru->if_south:%d\n", ru->function, ru->if_south);
|
||||||
LOG_D(PHY, "eNB0:%p fp:%p\n", eNB0, fp);
|
LOG_D(PHY, "eNB0:%p fp:%p\n", eNB0, fp);
|
||||||
|
|
||||||
@@ -2772,14 +2754,14 @@ void init_RU(char *rf_config_file,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_I(PHY,"Initializing RRU descriptor %d : (%s,%s,%d)\n",ru_id,ru_if_types[ru->if_south],NB_timing[ru->if_timing],ru->function);
|
LOG_I(PHY, "Initializing RRU descriptor %d : (%s,%s,%d)\n", ru_id, ru_if_types[ru->if_south], NB_timing[ru->if_timing], ru->function);
|
||||||
set_function_spec_param(ru);
|
set_function_spec_param(ru);
|
||||||
LOG_I(PHY,"Starting ru_thread %d, is_slave %d, send_dmrs %d\n",ru_id,ru->is_slave,ru->generate_dmrs_sync);
|
LOG_I(PHY, "Starting ru_thread %d, is_slave %d, send_dmrs %d\n", ru_id, ru->is_slave, ru->generate_dmrs_sync);
|
||||||
init_RU_proc(ru);
|
init_RU_proc(ru);
|
||||||
} // for ru_id
|
} // for ru_id
|
||||||
|
|
||||||
// sleep(1);
|
// sleep(1);
|
||||||
LOG_D(HW,"[lte-softmodem.c] RU threads created\n");
|
LOG_D(HW, "[lte-softmodem.c] RU threads created\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user