Merge branch 'nr_fapi_for_push' of https://gitlab.eurecom.fr/oai/openairinterface5g into nr_fapi_for_push
This commit is contained in:
@@ -44,7 +44,7 @@ pipeline {
|
||||
disableConcurrentBuilds()
|
||||
timestamps()
|
||||
gitLabConnection('OAI GitLab')
|
||||
gitlabBuilds(builds: ["Build gNB-USRP", "Build nr-UE-USRP", "Build eNB-USRP", "Build basic-sim", "Build phy-sim", "Build eNB-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13", "Test-Mono-FDD-Band13-X2-HO"])
|
||||
gitlabBuilds(builds: ["Build gNB-USRP", "Build nr-UE-USRP", "Build eNB-USRP", "Build basic-sim", "Build phy-sim", "Build eNB-ethernet", "Build UE-ethernet", "Analysis with cppcheck", "Test phy-sim", "Test basic-sim", "Test L2-sim", "Test-Mono-FDD-Band7", "Test-Mono-TDD-Band40", "Test-IF4p5-FDD-Band7", "Test-IF4p5-TDD-Band40", "Test-Mono-FDD-Band13", "Test-Mono-FDD-Band13-X2-HO", "Test-TDD-Band78-gNB-NR-UE"])
|
||||
ansiColor('xterm')
|
||||
}
|
||||
|
||||
@@ -615,6 +615,25 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Test OAI NR UE - OAI gNB - TDD - Band 78 - N300") {
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('gNB-nrUE-MONO-TDD-Band78-N300', 'Test-TDD-Band78-gNB-NR-UE')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
finalizeSlaveJob('gNB-nrUE-MONO-TDD-Band78-N300')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
|
||||
@@ -54,6 +54,10 @@ def eNB_CommitID
|
||||
def eNB_AllowMergeRequestProcess = false
|
||||
def eNB_TargetBranch
|
||||
|
||||
def doEpcLogCollection = true
|
||||
|
||||
|
||||
|
||||
pipeline {
|
||||
agent {
|
||||
label pythonExecutor
|
||||
@@ -61,7 +65,7 @@ pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
ansiColor('xterm')
|
||||
lock(extra: [[resource: ciSmartPhoneResource]], resource: ciSmartPhoneResource)
|
||||
lock(extra: [[resource: oaiUEResource]], resource: ciSmartPhoneResource)
|
||||
}
|
||||
|
||||
stages {
|
||||
@@ -139,6 +143,11 @@ pipeline {
|
||||
|
||||
if (params.EPC_IPAddress == null) {
|
||||
allParametersPresent = false
|
||||
} else {
|
||||
if (params.EPC_IPAddress == "none") {
|
||||
doEpcLogCollection = false
|
||||
echo "No EPC collections (ping/iperf/hss/mme/spgw)"
|
||||
}
|
||||
}
|
||||
if (params.EPC_Type == null) {
|
||||
allParametersPresent = false
|
||||
@@ -167,8 +176,8 @@ pipeline {
|
||||
sh "git checkout -f ${eNB_CommitID}"
|
||||
}
|
||||
} else {
|
||||
echo "Some parameters are missing"
|
||||
sh "./ci-scripts/fail.sh"
|
||||
currentBuild.result = 'ABORTED'
|
||||
error('Stopping early because some parameters are missing')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -299,6 +308,9 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Ping)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
@@ -317,6 +329,9 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage('Log Collection (Iperf)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
@@ -335,6 +350,9 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage('Log Collection (SPGW)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
@@ -353,6 +371,9 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage('Log Collection (MME)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
@@ -371,6 +392,9 @@ pipeline {
|
||||
}
|
||||
}
|
||||
stage('Log Collection (HSS)') {
|
||||
when {
|
||||
expression {doEpcLogCollection}
|
||||
}
|
||||
steps {
|
||||
withCredentials([
|
||||
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
|
||||
|
||||
@@ -103,6 +103,7 @@ function build_on_vm {
|
||||
echo "############################################################"
|
||||
echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS
|
||||
echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS
|
||||
echo "git config --global https.postBuffer 123289600" >> $VM_CMDS
|
||||
if [[ "$VM_NAME" == *"-cppcheck"* ]]
|
||||
then
|
||||
if [ $DAEMON -eq 0 ]
|
||||
|
||||
+8
-3
@@ -984,8 +984,14 @@ class SSHConnection():
|
||||
logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m')
|
||||
tunnelInterfaceStatus = True
|
||||
else:
|
||||
logging.error('\u001B[1m oaitun_ue1 interface is either NOT mounted or NOT configured\u001B[0m')
|
||||
tunnelInterfaceStatus = False
|
||||
self.command('ifconfig oaitun_ue1', '\$', 4)
|
||||
result = re.search('inet addr', str(self.ssh.before))
|
||||
if result is not None:
|
||||
logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m')
|
||||
tunnelInterfaceStatus = True
|
||||
else:
|
||||
logging.error('\u001B[1m oaitun_ue1 interface is either NOT mounted or NOT configured\u001B[0m')
|
||||
tunnelInterfaceStatus = False
|
||||
else:
|
||||
tunnelInterfaceStatus = True
|
||||
else:
|
||||
@@ -1807,7 +1813,6 @@ class SSHConnection():
|
||||
else:
|
||||
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||
self.command('cd ' + self.UESourceCodePath + '/cmake_targets/', '\$', 5)
|
||||
self.command('cd cmake_targets', '\$', 5)
|
||||
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
||||
ping_status = self.command('stdbuf -o0 ping ' + self.ping_args + ' 2>&1 | stdbuf -o0 tee ping_' + self.testCase_id + '.log', '\$', int(ping_time[0])*1.5)
|
||||
# TIMEOUT CASE
|
||||
|
||||
@@ -348,10 +348,11 @@ fi
|
||||
VM_TEMPLATE=ci-
|
||||
|
||||
|
||||
# look for default ASN1 release in cmake directives
|
||||
# look for ASN1 release in cmake directives
|
||||
# It will be the release used when building
|
||||
ASN1VEROPT=( `grep "add_list2_option(RRC_ASN1_VERSION" cmake_targets/CMakeLists.txt` )
|
||||
ASN1VER=${ASN1VEROPT[1]//\"}
|
||||
ASN1VEROPT=( `grep "set (RRC_ASN1_VERSION" cmake_targets/CMakeLists.txt` )
|
||||
ASN1VER=${ASN1VEROPT[2]//\"}
|
||||
ASN1VER=${ASN1VER//)}
|
||||
unset ASN1VEROPT
|
||||
|
||||
# variable to identify and store the command (build, create ...)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<htmlTabRef>test-10-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-10MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>2</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040102
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
<htmlTabRef>test-20-tm1</htmlTabRef>
|
||||
<htmlTabName>Test-20MHz-TM1</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
030201
|
||||
040101
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef>
|
||||
<htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName>
|
||||
<htmlTabRef>run-oai-gnb-nr-ue</htmlTabRef>
|
||||
<htmlTabName>Run-gNB-and-NR-UE</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<repeatCount>4</repeatCount>
|
||||
<TestCaseRequestedList>
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef>
|
||||
<htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName>
|
||||
<htmlTabRef>terminate-oai-gnb-nr-ue</htmlTabRef>
|
||||
<htmlTabName>Terminate-gNB-and-NR-UE</htmlTabName>
|
||||
<htmlTabIcon>tasks</htmlTabIcon>
|
||||
<TestCaseRequestedList>
|
||||
090108 090109
|
||||
|
||||
@@ -285,34 +285,10 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
|
||||
|
||||
# RRC
|
||||
######
|
||||
add_list2_option(RRC_ASN1_VERSION "Rel15" "ASN.1 version of RRC interface" "Rel8" "Rel10" "Rel14" "CBA")
|
||||
set (RRC_ASN1_VERSION "Rel15")
|
||||
make_version(LTE_RRC_VERSION 15 6 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1)
|
||||
|
||||
if (${RRC_ASN1_VERSION} STREQUAL "Rel8")
|
||||
make_version(LTE_RRC_VERSION 8 6 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-86.asn)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "CBA")
|
||||
make_version(LTE_RRC_VERSION 10 2 0)
|
||||
add_definitions(-DCBA)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20-lola.asn)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel10")
|
||||
make_version(LTE_RRC_VERSION 10 2 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/EUTRA-RRC-Definitions-a20.asn)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel11")
|
||||
make_version(LTE_RRC_VERSION 11 18 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-11.18.0.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel12")
|
||||
make_version(LTE_RRC_VERSION 12 16 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-12.16.0.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel13")
|
||||
make_version(LTE_RRC_VERSION 13 9 1)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-13.9.1.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel14")
|
||||
make_version(LTE_RRC_VERSION 14 7 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-14.7.0.asn1)
|
||||
elseif (${RRC_ASN1_VERSION} STREQUAL "Rel15")
|
||||
make_version(LTE_RRC_VERSION 15 6 0)
|
||||
set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1)
|
||||
endif (${RRC_ASN1_VERSION} STREQUAL "Rel8")
|
||||
add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION})
|
||||
set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
|
||||
|
||||
@@ -339,12 +315,9 @@ include_directories ("${RRC_FULL_DIR}")
|
||||
|
||||
#NR RRC
|
||||
#######
|
||||
add_list2_option(NR_RRC_ASN1_VERSION "NR_Rel15" "ASN.1 version of NR_RRC interface")
|
||||
|
||||
if (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
|
||||
make_version(NR_RRC_VERSION 15 6 0)
|
||||
set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.6.0.asn1)
|
||||
endif (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15")
|
||||
set (NR_RRC_ASN1_VERSION "NR_Rel15" )
|
||||
make_version(NR_RRC_VERSION 15 6 0)
|
||||
set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.6.0.asn1)
|
||||
add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION})
|
||||
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/${NR_RRC_ASN1_VERSION})
|
||||
|
||||
@@ -373,34 +346,12 @@ include_directories ("${NR_RRC_FULL_DIR}")
|
||||
# Same limitation as described in RRC: unknown generated file list
|
||||
# so we generate it at cmake time
|
||||
##############
|
||||
add_list1_option(S1AP_RELEASE R15 "S1AP ASN.1 grammar version" R8 R9 R10 R14 R15)
|
||||
set (S1AP_RELEASE R15)
|
||||
|
||||
set(S1AP_DIR ${OPENAIR3_DIR}/S1AP)
|
||||
if (${S1AP_RELEASE} STREQUAL "R8")
|
||||
make_version(S1AP_VERSION 8 10 0)
|
||||
set(S1AP_ASN_FILES "s1ap-8.10.0.asn1")
|
||||
elseif (${S1AP_RELEASE} STREQUAL "R9")
|
||||
make_version(S1AP_VERSION 9 10 0)
|
||||
set(S1AP_ASN_FILES "s1ap-9.10.0.asn1")
|
||||
elseif (${S1AP_RELEASE} STREQUAL "R10")
|
||||
make_version(S1AP_VERSION 10 9 0)
|
||||
set(S1AP_ASN_FILES "s1ap-10.9.0.asn1")
|
||||
elseif (${S1AP_RELEASE} STREQUAL "R11")
|
||||
make_version(S1AP_VERSION 11 8 0)
|
||||
set(S1AP_ASN_FILES "s1ap-11.8.0.asn1")
|
||||
elseif (${S1AP_RELEASE} STREQUAL "R12")
|
||||
make_version(S1AP_VERSION 12 7 0)
|
||||
set(S1AP_ASN_FILES "s1ap-12.7.0.asn1")
|
||||
elseif (${S1AP_RELEASE} STREQUAL "R13")
|
||||
make_version(S1AP_VERSION 13 6 0)
|
||||
set(S1AP_ASN_FILES "s1ap-13.6.0.asn1")
|
||||
elseif (${S1AP_RELEASE} STREQUAL "R14")
|
||||
make_version(S1AP_VERSION 14 9 0)
|
||||
set(S1AP_ASN_FILES "s1ap-14.9.0.asn1")
|
||||
else (${S1AP_RELEASE} STREQUAL "R15")
|
||||
make_version(S1AP_VERSION 15 6 0)
|
||||
set(S1AP_ASN_FILES "s1ap-15.6.0.asn1")
|
||||
endif(${S1AP_RELEASE} STREQUAL "R8")
|
||||
make_version(S1AP_VERSION 15 6 0)
|
||||
set(S1AP_ASN_FILES "s1ap-15.6.0.asn1")
|
||||
|
||||
add_definitions(-DS1AP_VERSION=${S1AP_VERSION})
|
||||
set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE})
|
||||
set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE})
|
||||
@@ -448,25 +399,12 @@ add_dependencies(S1AP_ENB rrc_flag s1ap_flag)
|
||||
# Same limitation as described in RRC/S1AP: unknown generated file list
|
||||
# so we generate it at cmake time
|
||||
##############
|
||||
add_list1_option(X2AP_RELEASE R15 "X2AP ASN.1 grammar version" R8 R11 R12 R14 R15)
|
||||
set (X2AP_RELEASE R15)
|
||||
|
||||
set(X2AP_DIR ${OPENAIR2_DIR}/X2AP)
|
||||
if (${X2AP_RELEASE} STREQUAL "R8")
|
||||
make_version(X2AP_VERSION 8 9 0)
|
||||
set(X2AP_ASN_FILES x2ap-8.9.0.asn1)
|
||||
elseif (${X2AP_RELEASE} STREQUAL "R11")
|
||||
make_version(X2AP_VERSION 11 9 0)
|
||||
set(X2AP_ASN_FILES x2ap-11.9.0.asn1)
|
||||
elseif (${X2AP_RELEASE} STREQUAL "R12")
|
||||
make_version(X2AP_VERSION 12 9 0)
|
||||
set(X2AP_ASN_FILES x2ap-12.9.0.asn1)
|
||||
elseif (${X2AP_RELEASE} STREQUAL "R14")
|
||||
make_version(X2AP_VERSION 14 7 0)
|
||||
set(X2AP_ASN_FILES x2ap-14.7.0.asn1)
|
||||
elseif (${X2AP_RELEASE} STREQUAL "R15")
|
||||
make_version(X2AP_VERSION 15 6 0)
|
||||
set(X2AP_ASN_FILES x2ap-15.6.0.asn1)
|
||||
endif(${X2AP_RELEASE} STREQUAL "R8")
|
||||
make_version(X2AP_VERSION 15 6 0)
|
||||
set(X2AP_ASN_FILES x2ap-15.6.0.asn1)
|
||||
|
||||
add_definitions(-DX2AP_VERSION=${X2AP_VERSION})
|
||||
set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE})
|
||||
set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE})
|
||||
|
||||
@@ -47,7 +47,6 @@ VCD_TIMING="False"
|
||||
DEADLINE_SCHEDULER_FLAG_USER=""
|
||||
CPU_AFFINITY_FLAG_USER="False" #Only valid when low-latency flag is set to False
|
||||
REL="Rel15"
|
||||
NR_REL="NR_Rel15"
|
||||
HW="None"
|
||||
TP="None"
|
||||
EPC=0
|
||||
@@ -107,10 +106,6 @@ Options
|
||||
Makes test program for haw latency tests
|
||||
-a | --agent
|
||||
Enables agent for software-defined control of the eNB
|
||||
-r | --3gpp-release
|
||||
default is Rel14,
|
||||
Rel8 limits the implementation to 3GPP Release 8 version
|
||||
Rel10 limits the implementation to 3GPP Release 10 version
|
||||
-w | --hardware
|
||||
EXMIMO, USRP, BLADERF, LMSSDR, IRIS, ADRV9371_ZC706, SIMU, None (Default)
|
||||
Adds this RF board support (in external packages installation and in compilation)
|
||||
@@ -236,10 +231,6 @@ function main() {
|
||||
--UE-gen-nvram)
|
||||
gen_nvram_path=$(readlink -f $2)
|
||||
shift 2;;
|
||||
-r | --3gpp-release)
|
||||
REL=$2
|
||||
echo_info "Setting release to: $REL"
|
||||
shift 2;;
|
||||
-w | --hardware)
|
||||
# Use OAI_USRP as the key word USRP is used inside UHD driver
|
||||
case "$2" in
|
||||
@@ -551,8 +542,6 @@ function main() {
|
||||
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
|
||||
echo "set ( UESIM_EXPANSION $UESIM_EXPANSION )" >> $cmake_file
|
||||
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
|
||||
echo "set ( NR_RRC_ASN1_VERSION \"${NR_REL}\")" >> $cmake_file
|
||||
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
|
||||
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
|
||||
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
|
||||
|
||||
@@ -11,5 +11,14 @@ if [ "$done_flag" -ot $ASN1_SOURCE_DIR ] ; then
|
||||
rm -f "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.c "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.h
|
||||
mkdir -p "$GENERATED_FULL_DIR"
|
||||
asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example $options -D $GENERATED_FULL_DIR $ASN1_SOURCE_DIR |& egrep -v "^Copied|^Compiled" | sort -u
|
||||
if [ "$ASN1C_PREFIX" = "X2AP_" ] ; then
|
||||
sed -i 's/18446744073709551615))/18446744073709551615U))/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReport-Item.c
|
||||
sed -i 's/18446744073709551615 }/18446744073709551615U }/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReport-Item.c
|
||||
fi
|
||||
if [ "$ASN1C_PREFIX" = "S1AP_" ] ; then
|
||||
sed -i 's/18446744073709551615))/18446744073709551615U))/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReportItem.c
|
||||
sed -i 's/18446744073709551615 }/18446744073709551615U }/g' "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}E-RABUsageReportItem.c
|
||||
fi
|
||||
|
||||
fi
|
||||
touch $done_flag
|
||||
touch $done_flag
|
||||
|
||||
@@ -643,6 +643,10 @@ inline static uint32_t vcd_get_write_index(void)
|
||||
return write_index;
|
||||
}
|
||||
|
||||
#if defined(ENABLE_ITTI)
|
||||
int signal_mask(void);
|
||||
#endif
|
||||
|
||||
void *vcd_dumper_thread_rt(void *args)
|
||||
{
|
||||
vcd_queue_user_data_t *data;
|
||||
|
||||
@@ -193,7 +193,6 @@ static inline int rxtx(PHY_VARS_gNB *gNB,int frame_rx, int slot_rx, int frame_tx
|
||||
// UE-specific RX processing for subframe n
|
||||
if (nfapi_mode == 0 || nfapi_mode == 1) */
|
||||
|
||||
|
||||
pthread_mutex_lock(&gNB->UL_INFO_mutex);
|
||||
gNB->UL_INFO.frame = frame_rx;
|
||||
gNB->UL_INFO.slot = slot_rx;
|
||||
@@ -665,11 +664,7 @@ static void* gNB_thread_prach( void* param ) {
|
||||
if (wait_on_condition(&proc->mutex_prach,&proc->cond_prach,&proc->instance_cnt_prach,"gNB_prach_thread") < 0) break;
|
||||
|
||||
LOG_D(PHY,"Running gNB prach procedures\n");
|
||||
prach_procedures(gNB
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
);
|
||||
prach_procedures(gNB ,0);
|
||||
|
||||
if (release_thread(&proc->mutex_prach,&proc->instance_cnt_prach,"gNB_prach_thread") < 0) break;
|
||||
}
|
||||
|
||||
+24
-21
@@ -731,10 +731,18 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
int i;
|
||||
T(T_ENB_PHY_OUTPUT_SIGNAL, T_INT(0), T_INT(0), T_INT(frame), T_INT(slot),
|
||||
T_INT(0), T_BUFFER(&ru->common.txdata[0][slot * fp->samples_per_slot], fp->samples_per_slot * 4));
|
||||
nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
|
||||
int sf_extension = 0;
|
||||
nr_subframe_t SF_type = nr_slot_select(cfg,slot%fp->slots_per_frame);
|
||||
|
||||
if ((slot == 0) ||
|
||||
(slot == 1)) {
|
||||
int siglen=fp->samples_per_slot;
|
||||
int flags;
|
||||
if (slot==0)
|
||||
flags = 2;
|
||||
else if (slot==1)
|
||||
flags=3;
|
||||
|
||||
int siglen=fp->samples_per_slot,flags=1;
|
||||
/*
|
||||
if (SF_type == SF_S) {
|
||||
siglen = fp->dl_symbols_in_S_subframe*(fp->ofdm_symbol_size+fp->nb_prefix_samples0);
|
||||
@@ -774,6 +782,7 @@ void tx_rf(RU_t *ru,int frame,int slot, uint64_t timestamp) {
|
||||
(long long unsigned int)timestamp,frame,proc->frame_tx_unwrap,slot);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 );
|
||||
AssertFatal(txs == siglen+sf_extension,"TX : Timeout (sent %d/%d)\n",txs, siglen);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -852,10 +861,7 @@ static void *ru_thread_prach( void *param ) {
|
||||
|
||||
/*if (ru->gNB_list[0]){
|
||||
prach_procedures(
|
||||
ru->gNB_list[0]
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
ru->gNB_list[0],0
|
||||
);
|
||||
}
|
||||
else {
|
||||
@@ -865,10 +871,7 @@ static void *ru_thread_prach( void *param ) {
|
||||
NULL,
|
||||
NULL,
|
||||
proc->frame_prach,
|
||||
0
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0
|
||||
#endif
|
||||
0,0
|
||||
);
|
||||
}
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0 ); */
|
||||
@@ -1996,8 +1999,8 @@ void set_function_spec_param(RU_t *ru) {
|
||||
ru->fh_north_out = fh_if4p5_north_out; // send_IF4p5 on reception
|
||||
ru->fh_south_out = tx_rf; // send output to RF
|
||||
ru->fh_north_asynch_in = fh_if4p5_north_asynch_in; // TX packets come asynchronously
|
||||
ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full; // RX DFTs
|
||||
ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // this is fep with idft only (no precoding in RRU)
|
||||
ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full; // RX DFTs
|
||||
ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // this is fep with idft only (no precoding in RRU)
|
||||
ru->feptx_prec = NULL;
|
||||
ru->nr_start_if = nr_start_if; // need to start the if interface for if4p5
|
||||
ru->ifdevice.host_type = RRU_HOST;
|
||||
@@ -2018,8 +2021,8 @@ void set_function_spec_param(RU_t *ru) {
|
||||
malloc_IF4p5_buffer(ru);
|
||||
} else if (ru->function == gNodeB_3GPP) {
|
||||
ru->do_prach = 0; // no prach processing in RU
|
||||
ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full; // RX DFTs
|
||||
ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // this is fep with idft and precoding
|
||||
ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full; // RX DFTs
|
||||
ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // this is fep with idft and precoding
|
||||
ru->feptx_prec = NULL; // this is fep with idft and precoding
|
||||
ru->fh_north_in = NULL; // no incoming fronthaul from north
|
||||
ru->fh_north_out = NULL; // no outgoing fronthaul to north
|
||||
@@ -2048,13 +2051,13 @@ void set_function_spec_param(RU_t *ru) {
|
||||
|
||||
case REMOTE_IF5: // the remote unit is IF5 RRU
|
||||
ru->do_prach = 0;
|
||||
ru->feprx = nr_fep_full; // this is frequency-shift + DFTs
|
||||
ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs
|
||||
ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // need to do transmit Precoding + IDFTs
|
||||
ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception
|
||||
ru->fh_south_out = fh_if5_south_out; // synchronous IF5 transmission
|
||||
ru->fh_south_asynch_in = NULL; // no asynchronous UL
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->feprx = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_fep_full_2thread : nr_fep_full; // this is frequency-shift + DFTs
|
||||
ru->feptx_prec = feptx_prec; // need to do transmit Precoding + IDFTs
|
||||
ru->feptx_ofdm = (get_thread_worker_conf() == WORKER_ENABLE) ? nr_feptx_ofdm_2thread : nr_feptx_ofdm; // need to do transmit Precoding + IDFTs
|
||||
ru->fh_south_in = fh_if5_south_in; // synchronous IF5 reception
|
||||
ru->fh_south_out = fh_if5_south_out; // synchronous IF5 transmission
|
||||
ru->fh_south_asynch_in = NULL; // no asynchronous UL
|
||||
ru->start_rf = NULL; // no local RF
|
||||
ru->stop_rf = NULL;
|
||||
ru->nr_start_if = nr_start_if; // need to start if interface for IF5
|
||||
ru->ifdevice.host_type = RAU_HOST;
|
||||
|
||||
@@ -63,7 +63,6 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "UTIL/OPT/opt.h"
|
||||
|
||||
//#include "PHY/TOOLS/time_meas.h"
|
||||
@@ -513,17 +512,7 @@ static void get_options(void) {
|
||||
paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC_NR ;
|
||||
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
||||
|
||||
if (strlen(in_path) > 0) {
|
||||
opt_type = OPT_PCAP;
|
||||
opt_enabled=1;
|
||||
printf("Enabling OPT for PCAP with the following file %s \n",in_path);
|
||||
}
|
||||
|
||||
if (strlen(in_ip) > 0) {
|
||||
opt_enabled=1;
|
||||
opt_type = OPT_WIRESHARK;
|
||||
printf("Enabling OPT for wireshark for local interface");
|
||||
}
|
||||
|
||||
config_process_cmdline( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL);
|
||||
|
||||
@@ -923,10 +912,8 @@ int main( int argc, char **argv )
|
||||
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
|
||||
#endif
|
||||
|
||||
if (opt_type != OPT_NONE) {
|
||||
if (init_opt() == -1)
|
||||
LOG_E(OPT,"failed to run OPT \n");
|
||||
}
|
||||
init_opt();
|
||||
|
||||
|
||||
#ifdef PDCP_USE_NETLINK
|
||||
netlink_init();
|
||||
@@ -1158,8 +1145,6 @@ int main( int argc, char **argv )
|
||||
RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice);
|
||||
}
|
||||
|
||||
if (opt_enabled == 1)
|
||||
terminate_opt();
|
||||
|
||||
logClean();
|
||||
printf("Bye.\n");
|
||||
|
||||
@@ -34,8 +34,6 @@
|
||||
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \
|
||||
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||
{"W" , CONFIG_HLP_L2MONW, 0, strptr:(char **)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, sizeof(in_ip)}, \
|
||||
{"P" , CONFIG_HLP_L2MONP, 0, strptr:(char **)&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)},\
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
|
||||
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
|
||||
|
||||
+2
-2
@@ -699,7 +699,7 @@ void *UE_thread(void *arg) {
|
||||
slot_nr*UE->frame_parms.samples_per_slot];
|
||||
|
||||
for (int i=0; i<UE->frame_parms.nb_antennas_tx; i++)
|
||||
txp[i] = (void *)&UE->common_vars.txdata[i][((curMsg->proc.nr_tti_rx + 4)%nb_slot_frame)*UE->frame_parms.samples_per_slot];
|
||||
txp[i] = (void *)&UE->common_vars.txdata[i][((curMsg->proc.nr_tti_rx + DURATION_RX_TO_TX)%nb_slot_frame)*UE->frame_parms.samples_per_slot];
|
||||
|
||||
int readBlockSize, writeBlockSize;
|
||||
|
||||
@@ -725,7 +725,7 @@ void *UE_thread(void *arg) {
|
||||
AssertFatal( writeBlockSize ==
|
||||
UE->rfdevice.trx_write_func(&UE->rfdevice,
|
||||
timestamp+
|
||||
(4*UE->frame_parms.samples_per_slot) -
|
||||
(DURATION_RX_TO_TX*UE->frame_parms.samples_per_slot) -
|
||||
UE->frame_parms.ofdm_symbol_size-UE->frame_parms.nb_prefix_samples0 -
|
||||
openair0_cfg[0].tx_sample_advance,
|
||||
txp,
|
||||
|
||||
@@ -409,18 +409,6 @@ static void get_options(void) {
|
||||
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC_NR ;
|
||||
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
|
||||
|
||||
if (strlen(in_path) > 0) {
|
||||
opt_type = OPT_PCAP;
|
||||
opt_enabled=1;
|
||||
printf("Enabling OPT for PCAP with the following file %s \n",in_path);
|
||||
}
|
||||
|
||||
if (strlen(in_ip) > 0) {
|
||||
opt_enabled=1;
|
||||
opt_type = OPT_WIRESHARK;
|
||||
printf("Enabling OPT for wireshark for local interface");
|
||||
}
|
||||
|
||||
config_process_cmdline( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL);
|
||||
|
||||
if(config_isparamset(cmdline_logparams,CMDLINE_ONLINELOG_IDX)) {
|
||||
@@ -703,10 +691,7 @@ int main( int argc, char **argv ) {
|
||||
cpuf=get_cpu_freq_GHz();
|
||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
|
||||
|
||||
if (opt_type != OPT_NONE) {
|
||||
if (init_opt() == -1)
|
||||
LOG_E(OPT,"failed to run OPT \n");
|
||||
}
|
||||
init_opt() ;
|
||||
|
||||
if (ouput_vcd) {
|
||||
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
|
||||
|
||||
@@ -74,8 +74,6 @@
|
||||
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0}, \
|
||||
{"m" , CONFIG_HLP_DLMCS, 0, uptr:&target_dl_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||
{"t" , CONFIG_HLP_ULMCS, 0, uptr:&target_ul_mcs, defintval:0, TYPE_UINT, 0}, \
|
||||
{"W" , CONFIG_HLP_L2MONW, 0, strptr:(char **)&in_ip, defstrval:"127.0.0.1", TYPE_STRING, sizeof(in_ip)}, \
|
||||
{"P" , CONFIG_HLP_L2MONP, 0, strptr:(char **)&in_path, defstrval:"/tmp/oai_opt.pcap", TYPE_STRING, sizeof(in_path)}, \
|
||||
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
|
||||
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
|
||||
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
|
||||
|
||||
@@ -24,52 +24,43 @@
|
||||
#define __INIT_DEFS_NB_IOT__H__
|
||||
|
||||
//#include "PHY/defs_NB_IoT.h"
|
||||
#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
|
||||
#include "nfapi_interface.h"
|
||||
#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
|
||||
#include "nfapi_interface.h"
|
||||
|
||||
//#include "SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
//#include "RadioResourceConfigDedicated.h"
|
||||
//#include "TDD-Config.h"
|
||||
//#include "MBSFN-SubframeConfigList.h"
|
||||
//#include "MobilityControlInfo.h"
|
||||
//#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
//#include "SCellToAddMod-r10.h"
|
||||
//#endif
|
||||
|
||||
/*brief Configure LTE_DL_FRAME_PARMS with components derived after initial synchronization (MIB-NB decoding + primary/secondary synch).*/
|
||||
void phy_config_mib_eNB_NB_IoT(int Mod_id,
|
||||
int eutra_band,
|
||||
int Nid_cell,
|
||||
int Ncp,
|
||||
int Ncp_UL,
|
||||
int p_eNB,
|
||||
uint16_t EARFCN,
|
||||
uint16_t prb_index, // NB_IoT_RB_ID,
|
||||
uint16_t operating_mode,
|
||||
uint16_t control_region_size,
|
||||
uint16_t eutra_NumCRS_ports);
|
||||
void phy_config_mib_eNB_NB_IoT(int Mod_id,
|
||||
int eutra_band,
|
||||
int Nid_cell,
|
||||
int Ncp,
|
||||
int Ncp_UL,
|
||||
int p_eNB,
|
||||
uint16_t EARFCN,
|
||||
uint16_t prb_index, // NB_IoT_RB_ID,
|
||||
uint16_t operating_mode,
|
||||
uint16_t control_region_size,
|
||||
uint16_t eutra_NumCRS_ports);
|
||||
|
||||
/*NB_phy_config_sib1_eNB is not needed since NB-IoT use only FDD mode*/
|
||||
|
||||
/*brief Configure LTE_DL_FRAME_PARMS with components of SIB2-NB (at eNB).*/
|
||||
|
||||
//void NB_phy_config_sib2_eNB(module_id_t Mod_id,
|
||||
// int CC_id,
|
||||
// int CC_id,
|
||||
// RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon
|
||||
// );
|
||||
|
||||
void phy_config_sib2_eNB_NB_IoT(uint8_t Mod_id,
|
||||
nfapi_nb_iot_config_t *config,
|
||||
nfapi_rf_config_t *rf_config,
|
||||
nfapi_uplink_reference_signal_config_t* ul_nrs_config,
|
||||
extra_phyConfig_t* extra_phy_parms);
|
||||
nfapi_nb_iot_config_t *config,
|
||||
nfapi_rf_config_t *rf_config,
|
||||
nfapi_uplink_reference_signal_config_t *ul_nrs_config,
|
||||
extra_phyConfig_t *extra_phy_parms);
|
||||
|
||||
void phy_config_dedicated_eNB_NB_IoT(module_id_t Mod_id,
|
||||
rnti_t rnti,
|
||||
extra_phyConfig_t* extra_phy_parms);
|
||||
rnti_t rnti,
|
||||
extra_phyConfig_t *extra_phy_parms);
|
||||
|
||||
// void phy_init_lte_top_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms);
|
||||
// void phy_init_lte_top_NB_IoT(NB_IoT_DL_FRAME_PARMS *frame_parms);
|
||||
void phy_init_nb_iot_eNB(PHY_VARS_eNB_NB_IoT *phyvar);
|
||||
int l1_north_init_NB_IoT(void);
|
||||
|
||||
|
||||
+146
-219
@@ -47,82 +47,66 @@ uint8_t dmrs1_tab[8] = { 0, 2, 3, 4, 6, 8, 9, 10 };
|
||||
int N_RB_DL_array[6] = { 6, 15, 25, 50, 75, 100 };
|
||||
|
||||
int
|
||||
l1_north_init_eNB ()
|
||||
{
|
||||
|
||||
l1_north_init_eNB () {
|
||||
int i,j;
|
||||
|
||||
if (RC.nb_L1_inst > 0 && RC.nb_L1_CC != NULL && RC.eNB != NULL)
|
||||
{
|
||||
if (RC.nb_L1_inst > 0 && RC.nb_L1_CC != NULL && RC.eNB != NULL) {
|
||||
AssertFatal(RC.nb_L1_inst>0,"nb_L1_inst=%d\n",RC.nb_L1_inst);
|
||||
AssertFatal(RC.nb_L1_CC!=NULL,"nb_L1_CC is null\n");
|
||||
AssertFatal(RC.eNB!=NULL,"RC.eNB is null\n");
|
||||
|
||||
LOG_I(PHY,"%s() RC.nb_L1_inst:%d\n", __FUNCTION__, RC.nb_L1_inst);
|
||||
|
||||
for (i=0;i<RC.nb_L1_inst;i++) {
|
||||
for (i=0; i<RC.nb_L1_inst; i++) {
|
||||
AssertFatal(RC.eNB[i]!=NULL,"RC.eNB[%d] is null\n",i);
|
||||
AssertFatal(RC.nb_L1_CC[i]>0,"RC.nb_L1_CC[%d]=%d\n",i,RC.nb_L1_CC[i]);
|
||||
|
||||
LOG_I(PHY,"%s() RC.nb_L1_CC[%d]:%d\n", __FUNCTION__, i, RC.nb_L1_CC[i]);
|
||||
|
||||
for (j=0;j<RC.nb_L1_CC[i];j++) {
|
||||
for (j=0; j<RC.nb_L1_CC[i]; j++) {
|
||||
AssertFatal(RC.eNB[i][j]!=NULL,"RC.eNB[%d][%d] is null\n",i,j);
|
||||
|
||||
if ((RC.eNB[i][j]->if_inst = IF_Module_init(i))<0) return(-1);
|
||||
if ((RC.eNB[i][j]->if_inst = IF_Module_init(i))<0) return(-1);
|
||||
|
||||
LOG_I(PHY,"%s() RC.eNB[%d][%d] installing callbacks\n", __FUNCTION__, i, j);
|
||||
|
||||
RC.eNB[i][j]->if_inst->PHY_config_req = phy_config_request;
|
||||
RC.eNB[i][j]->if_inst->schedule_response = schedule_response;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
LOG_I(PHY,"%s() Not installing PHY callbacks - RC.nb_L1_inst:%d RC.nb_L1_CC:%p RC.eNB:%p\n", __FUNCTION__, RC.nb_L1_inst, RC.nb_L1_CC, RC.eNB);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
void phy_config_request(PHY_Config_t *phy_config) {
|
||||
|
||||
uint8_t Mod_id = phy_config->Mod_id;
|
||||
int CC_id = phy_config->CC_id;
|
||||
nfapi_config_request_t *cfg = phy_config->cfg;
|
||||
|
||||
|
||||
LTE_DL_FRAME_PARMS *fp;
|
||||
PHICH_RESOURCE_t phich_resource_table[4]={oneSixth,half,one,two};
|
||||
int eutra_band = cfg->nfapi_config.rf_bands.rf_band[0];
|
||||
PHICH_RESOURCE_t phich_resource_table[4]= {oneSixth,half,one,two};
|
||||
int eutra_band = cfg->nfapi_config.rf_bands.rf_band[0];
|
||||
int dl_Bandwidth = cfg->rf_config.dl_channel_bandwidth.value;
|
||||
int ul_Bandwidth = cfg->rf_config.ul_channel_bandwidth.value;
|
||||
int Nid_cell = cfg->sch_config.physical_cell_id.value;
|
||||
int Ncp = cfg->subframe_config.dl_cyclic_prefix_type.value;
|
||||
int p_eNB = cfg->rf_config.tx_antenna_ports.value;
|
||||
uint32_t dl_CarrierFreq = cfg->nfapi_config.earfcn.value;
|
||||
|
||||
LOG_I(PHY,"Configuring MIB for instance %d, CCid %d : (band %d,N_RB_DL %d, N_RB_UL %d, Nid_cell %d,eNB_tx_antenna_ports %d,Ncp %d,DL freq %u,phich_config.resource %d, phich_config.duration %d)\n",
|
||||
Mod_id, CC_id, eutra_band, dl_Bandwidth, ul_Bandwidth, Nid_cell, p_eNB,Ncp,dl_CarrierFreq,
|
||||
cfg->phich_config.phich_resource.value,
|
||||
cfg->phich_config.phich_duration.value);
|
||||
|
||||
Mod_id, CC_id, eutra_band, dl_Bandwidth, ul_Bandwidth, Nid_cell, p_eNB,Ncp,dl_CarrierFreq,
|
||||
cfg->phich_config.phich_resource.value,
|
||||
cfg->phich_config.phich_duration.value);
|
||||
AssertFatal (RC.eNB != NULL, "PHY instance pointer doesn't exist\n");
|
||||
AssertFatal (RC.eNB[Mod_id] != NULL, "PHY instance %d doesn't exist\n", Mod_id);
|
||||
AssertFatal (RC.eNB[Mod_id][CC_id] != NULL, "PHY instance %d, CCid %d doesn't exist\n", Mod_id, CC_id);
|
||||
|
||||
|
||||
if (RC.eNB[Mod_id][CC_id]->configured == 1)
|
||||
{
|
||||
if (RC.eNB[Mod_id][CC_id]->configured == 1) {
|
||||
LOG_E(PHY,"Already eNB already configured, do nothing\n");
|
||||
return;
|
||||
}
|
||||
|
||||
RC.eNB[Mod_id][CC_id]->mac_enabled = 1;
|
||||
|
||||
fp = &RC.eNB[Mod_id][CC_id]->frame_parms;
|
||||
|
||||
fp->N_RB_DL = dl_Bandwidth;
|
||||
fp->N_RB_UL = ul_Bandwidth;
|
||||
fp->Nid_cell = Nid_cell;
|
||||
@@ -131,17 +115,13 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
fp->Ncp = Ncp;
|
||||
fp->Ncp_UL = Ncp;
|
||||
fp->nb_antenna_ports_eNB = p_eNB;
|
||||
|
||||
fp->threequarter_fs = 0;
|
||||
|
||||
AssertFatal (cfg->phich_config.phich_resource.value < 4, "Illegal phich_Resource\n");
|
||||
|
||||
fp->phich_config_common.phich_resource = phich_resource_table[cfg->phich_config.phich_resource.value];
|
||||
fp->phich_config_common.phich_duration = cfg->phich_config.phich_duration.value;
|
||||
// Note: "from_earfcn" has to be in a common library with MACRLC
|
||||
fp->dl_CarrierFreq = from_earfcn (eutra_band, dl_CarrierFreq);
|
||||
fp->ul_CarrierFreq = fp->dl_CarrierFreq - (get_uldl_offset (eutra_band) * 100000);
|
||||
|
||||
fp->tdd_config = 0;
|
||||
fp->tdd_config_S = 0;
|
||||
|
||||
@@ -163,46 +143,36 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
|
||||
fp->prach_config_common.rootSequenceIndex = cfg->prach_config.root_sequence_index.value;
|
||||
LOG_I (PHY, "prach_config_common.rootSequenceIndex = %d\n", cfg->prach_config.root_sequence_index.value);
|
||||
|
||||
fp->prach_config_common.prach_Config_enabled = 1;
|
||||
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex = cfg->prach_config.configuration_index.value;
|
||||
LOG_I (PHY, "prach_config_common.prach_ConfigInfo.prach_ConfigIndex = %d\n", cfg->prach_config.configuration_index.value);
|
||||
|
||||
fp->prach_config_common.prach_ConfigInfo.highSpeedFlag = cfg->prach_config.high_speed_flag.value;
|
||||
LOG_I (PHY, "prach_config_common.prach_ConfigInfo.highSpeedFlag = %d\n", cfg->prach_config.high_speed_flag.value);
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = cfg->prach_config.zero_correlation_zone_configuration.value;
|
||||
LOG_I (PHY, "prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = %d\n", cfg->prach_config.zero_correlation_zone_configuration.value);
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset = cfg->prach_config.frequency_offset.value;
|
||||
LOG_I (PHY, "prach_config_common.prach_ConfigInfo.prach_FreqOffset = %d\n", cfg->prach_config.frequency_offset.value);
|
||||
|
||||
init_prach_tables (839);
|
||||
compute_prach_seq (fp->prach_config_common.rootSequenceIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig, fp->prach_config_common.prach_ConfigInfo.highSpeedFlag, fp->frame_type, RC.eNB[Mod_id][CC_id]->X_u);
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (cfg->emtc_config.prach_ce_level_0_enable.value == 1) {
|
||||
fp->prach_emtc_config_common.prach_Config_enabled = 1;
|
||||
|
||||
fp->prach_emtc_config_common.rootSequenceIndex = cfg->emtc_config.prach_catm_root_sequence_index.value;
|
||||
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.highSpeedFlag = cfg->emtc_config.prach_catm_high_speed_flag.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig = cfg->emtc_config.prach_catm_zero_correlation_zone_configuration.value;
|
||||
|
||||
// CE Level 3 parameters
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[3] = cfg->emtc_config.prach_ce_level_3_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[3] = cfg->emtc_config.prach_ce_level_3_starting_subframe_periodicity.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[3] = cfg->emtc_config.prach_ce_level_3_number_of_repetitions_per_attempt.value;
|
||||
AssertFatal (fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[3] >= fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[3],
|
||||
"prach_starting_subframe_periodicity[3] < prach_numPetitionPerPreambleAttempt[3]\n");
|
||||
|
||||
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3] = cfg->emtc_config.prach_ce_level_3_configuration_index.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[3] = cfg->emtc_config.prach_ce_level_3_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[3] = cfg->emtc_config.prach_ce_level_3_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[3] = cfg->emtc_config.prach_ce_level_3_hopping_offset.value;
|
||||
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[3] == 1)
|
||||
compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
@@ -219,6 +189,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[2] = cfg->emtc_config.prach_ce_level_2_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[2] = cfg->emtc_config.prach_ce_level_2_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[2] = cfg->emtc_config.prach_ce_level_2_hopping_offset.value;
|
||||
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[2] == 1)
|
||||
compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
@@ -231,11 +202,11 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[1] = cfg->emtc_config.prach_ce_level_1_number_of_repetitions_per_attempt.value;
|
||||
AssertFatal (fp->prach_emtc_config_common.prach_ConfigInfo.prach_starting_subframe_periodicity[1] >= fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[1],
|
||||
"prach_starting_subframe_periodicity[1] < prach_numPetitionPerPreambleAttempt[1]\n");
|
||||
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[1] = cfg->emtc_config.prach_ce_level_1_configuration_index.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[1] = cfg->emtc_config.prach_ce_level_1_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[1] = cfg->emtc_config.prach_ce_level_1_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[1] = cfg->emtc_config.prach_ce_level_1_hopping_offset.value;
|
||||
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[1] == 1)
|
||||
compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
@@ -254,6 +225,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[0] = cfg->emtc_config.prach_ce_level_0_frequency_offset.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_enable[0] = cfg->emtc_config.prach_ce_level_0_hopping_enable.value;
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_hopping_offset[0] = cfg->emtc_config.prach_ce_level_0_hopping_offset.value;
|
||||
|
||||
if (fp->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] == 1) {
|
||||
compute_prach_seq (fp->prach_emtc_config_common.rootSequenceIndex,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[3],
|
||||
@@ -263,63 +235,49 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
fp->pucch_config_common.deltaPUCCH_Shift = 1 + cfg->pucch_config.delta_pucch_shift.value;
|
||||
fp->pucch_config_common.nRB_CQI = cfg->pucch_config.n_cqi_rb.value;
|
||||
fp->pucch_config_common.nCS_AN = cfg->pucch_config.n_an_cs.value;
|
||||
fp->pucch_config_common.n1PUCCH_AN = cfg->pucch_config.n1_pucch_an.value;
|
||||
|
||||
fp->pdsch_config_common.referenceSignalPower = cfg->rf_config.reference_signal_power.value;
|
||||
fp->pdsch_config_common.p_b = cfg->subframe_config.pb.value;
|
||||
|
||||
fp->pusch_config_common.n_SB = cfg->pusch_config.number_of_subbands.value;
|
||||
LOG_I (PHY, "pusch_config_common.n_SB = %d\n", fp->pusch_config_common.n_SB);
|
||||
|
||||
fp->pusch_config_common.hoppingMode = cfg->pusch_config.hopping_mode.value;
|
||||
LOG_I (PHY, "pusch_config_common.hoppingMode = %d\n", fp->pusch_config_common.hoppingMode);
|
||||
|
||||
fp->pusch_config_common.pusch_HoppingOffset = cfg->pusch_config.hopping_offset.value;
|
||||
LOG_I (PHY, "pusch_config_common.pusch_HoppingOffset = %d\n", fp->pusch_config_common.pusch_HoppingOffset);
|
||||
|
||||
fp->pusch_config_common.enable64QAM = 0;//radioResourceConfigCommon->pusch_ConfigCommon.pusch_ConfigBasic.enable64QAM;
|
||||
LOG_I(PHY,"pusch_config_common.enable64QAM = %d\n",fp->pusch_config_common.enable64QAM );
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 0;
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0;
|
||||
if (cfg->uplink_reference_signal_config.uplink_rs_hopping.value == 1)
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1;
|
||||
if (cfg->uplink_reference_signal_config.uplink_rs_hopping.value == 2)
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 1;
|
||||
|
||||
if (cfg->uplink_reference_signal_config.uplink_rs_hopping.value == 1)
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1;
|
||||
|
||||
if (cfg->uplink_reference_signal_config.uplink_rs_hopping.value == 2)
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 1;
|
||||
|
||||
LOG_I(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = %d\n",fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled);
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = cfg->uplink_reference_signal_config.group_assignment.value;
|
||||
LOG_I(PHY,"pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = %d\n",fp->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH);
|
||||
|
||||
LOG_I (PHY, "pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = %d\n", fp->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled);
|
||||
|
||||
fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = dmrs1_tab[cfg->uplink_reference_signal_config.cyclic_shift_1_for_drms.value];
|
||||
LOG_I (PHY, "pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = %d\n", fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift);
|
||||
|
||||
init_ul_hopping (fp);
|
||||
|
||||
fp->soundingrs_ul_config_common.enabled_flag = 0; // 1; Don't know how to turn this off in NFAPI
|
||||
fp->soundingrs_ul_config_common.srs_BandwidthConfig = cfg->srs_config.bandwidth_configuration.value;
|
||||
fp->soundingrs_ul_config_common.srs_SubframeConfig = cfg->srs_config.srs_subframe_configuration.value;
|
||||
fp->soundingrs_ul_config_common.ackNackSRS_SimultaneousTransmission = cfg->srs_config.srs_acknack_srs_simultaneous_transmission.value;
|
||||
fp->soundingrs_ul_config_common.srs_MaxUpPts = cfg->srs_config.max_up_pts.value;
|
||||
|
||||
fp->num_MBSFN_config = 0;
|
||||
|
||||
fp->NonMBSFN_config_flag =cfg->fembms_config.non_mbsfn_config_flag.value;
|
||||
fp->NonMBSFN_config.non_mbsfn_SubframeConfig = cfg->fembms_config.non_mbsfn_subframeconfig.value;
|
||||
fp->NonMBSFN_config.radioframeAllocationPeriod = cfg->fembms_config.radioframe_allocation_period.value;
|
||||
fp->NonMBSFN_config.radioframeAllocationOffset = cfg->fembms_config.radioframe_allocation_offset.value;
|
||||
LOG_D(PHY,"eNB %d/%d frame NonMBSFN configured: %d (%x) %d/%d\n",Mod_id,CC_id,fp->NonMBSFN_config_flag,fp->NonMBSFN_config.non_mbsfn_SubframeConfig,fp->NonMBSFN_config.radioframeAllocationPeriod,fp->NonMBSFN_config.radioframeAllocationOffset);
|
||||
|
||||
LOG_D(PHY,"eNB %d/%d frame NonMBSFN configured: %d (%x) %d/%d\n",Mod_id,CC_id,fp->NonMBSFN_config_flag,fp->NonMBSFN_config.non_mbsfn_SubframeConfig,fp->NonMBSFN_config.radioframeAllocationPeriod,
|
||||
fp->NonMBSFN_config.radioframeAllocationOffset);
|
||||
init_ncs_cell (fp, RC.eNB[Mod_id][CC_id]->ncs_cell);
|
||||
|
||||
|
||||
init_ul_hopping (fp);
|
||||
RC.eNB[Mod_id][CC_id]->configured = 1;
|
||||
LOG_I (PHY, "eNB %d/%d configured\n", Mod_id, CC_id);
|
||||
@@ -328,12 +286,8 @@ void phy_config_request(PHY_Config_t *phy_config) {
|
||||
|
||||
|
||||
void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
|
||||
long mbsfn_AreaId_r9)
|
||||
{
|
||||
|
||||
long mbsfn_AreaId_r9) {
|
||||
LTE_DL_FRAME_PARMS *fp = &RC.eNB[Mod_id][CC_id]->frame_parms;
|
||||
|
||||
|
||||
LOG_I (PHY, "[eNB%d] Applying MBSFN_Area_id %ld for index %d\n", Mod_id, mbsfn_AreaId_r9, mbsfn_Area_idx);
|
||||
|
||||
if (mbsfn_Area_idx == 0) {
|
||||
@@ -342,37 +296,28 @@ void phy_config_sib13_eNB(module_id_t Mod_id,int CC_id,int mbsfn_Area_idx,
|
||||
}
|
||||
|
||||
lte_gold_mbsfn (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_table, fp->Nid_cell_mbsfn);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
lte_gold_mbsfn_khz_1dot25 (fp, RC.eNB[Mod_id][CC_id]->lte_gold_mbsfn_khz_1dot25_table, fp->Nid_cell_mbsfn);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
unsigned char is_secondary_eNB,
|
||||
unsigned char abstraction_flag)
|
||||
{
|
||||
|
||||
unsigned char abstraction_flag) {
|
||||
// shortcuts
|
||||
LTE_DL_FRAME_PARMS* const fp = &eNB->frame_parms;
|
||||
LTE_eNB_COMMON* const common_vars = &eNB->common_vars;
|
||||
LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
|
||||
LTE_eNB_SRS* const srs_vars = eNB->srs_vars;
|
||||
LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
|
||||
#endif
|
||||
LTE_DL_FRAME_PARMS *const fp = &eNB->frame_parms;
|
||||
LTE_eNB_COMMON *const common_vars = &eNB->common_vars;
|
||||
LTE_eNB_PUSCH **const pusch_vars = eNB->pusch_vars;
|
||||
LTE_eNB_SRS *const srs_vars = eNB->srs_vars;
|
||||
LTE_eNB_PRACH *const prach_vars = &eNB->prach_vars;
|
||||
LTE_eNB_PRACH *const prach_vars_br = &eNB->prach_vars_br;
|
||||
int i, UE_id;
|
||||
|
||||
LOG_I(PHY,"[eNB %d] %s() About to wait for eNB to be configured", eNB->Mod_id, __FUNCTION__);
|
||||
|
||||
eNB->total_dlsch_bitrate = 0;
|
||||
eNB->total_transmitted_bits = 0;
|
||||
eNB->total_system_throughput = 0;
|
||||
eNB->check_for_MUMIMO_transmissions = 0;
|
||||
|
||||
LOG_I(PHY,"[eNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u nb_antenna_ports_eNB:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n",
|
||||
LOG_I(PHY,
|
||||
"[eNB %"PRIu8"] Initializing DL_FRAME_PARMS : N_RB_DL %"PRIu8", PHICH Resource %d, PHICH Duration %d nb_antennas_tx:%u nb_antennas_rx:%u nb_antenna_ports_eNB:%u PRACH[rootSequenceIndex:%u prach_Config_enabled:%u configIndex:%u highSpeed:%u zeroCorrelationZoneConfig:%u freqOffset:%u]\n",
|
||||
eNB->Mod_id,
|
||||
fp->N_RB_DL,fp->phich_config_common.phich_resource,
|
||||
fp->phich_config_common.phich_duration,
|
||||
@@ -383,156 +328,135 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
|
||||
fp->prach_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset
|
||||
);
|
||||
);
|
||||
LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_eNB][MOD %02"PRIu8"][]\n", eNB->Mod_id);
|
||||
|
||||
LOG_I (PHY, "[eNB %" PRIu8 "] Initializing DL_FRAME_PARMS : N_RB_DL %" PRIu8 ", PHICH Resource %d, PHICH Duration %d\n",
|
||||
eNB->Mod_id, fp->N_RB_DL, fp->phich_config_common.phich_resource, fp->phich_config_common.phich_duration);
|
||||
LOG_D (PHY, "[MSC_NEW][FRAME 00000][PHY_eNB][MOD %02" PRIu8 "][]\n", eNB->Mod_id);
|
||||
|
||||
crcTableInit();
|
||||
|
||||
lte_gold (fp, eNB->lte_gold_table, fp->Nid_cell);
|
||||
generate_pcfich_reg_mapping (fp);
|
||||
generate_phich_reg_mapping (fp);
|
||||
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
eNB->first_run_timing_advance[UE_id] = 1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
|
||||
|
||||
eNB->first_run_timing_advance[UE_id] =
|
||||
1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
|
||||
// clear whole structure
|
||||
bzero (&eNB->UE_stats[UE_id], sizeof (LTE_eNB_UE_stats));
|
||||
|
||||
eNB->physicalConfigDedicated[UE_id] = NULL;
|
||||
}
|
||||
|
||||
eNB->first_run_I0_measurements = 1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
|
||||
|
||||
|
||||
eNB->first_run_I0_measurements =
|
||||
1; ///This flag used to be static. With multiple eNBs this does no longer work, hence we put it in the structure. However it has to be initialized with 1, which is performed here.
|
||||
|
||||
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF){
|
||||
common_vars->rxdata = (int32_t **)NULL;
|
||||
common_vars->txdataF = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t*));
|
||||
common_vars->rxdataF = (int32_t **)malloc16(64*sizeof(int32_t*));
|
||||
|
||||
LOG_I(PHY,"[INIT] NB_ANTENNA_PORTS_ENB:%d fp->nb_antenna_ports_eNB:%d\n", NB_ANTENNA_PORTS_ENB, fp->nb_antenna_ports_eNB);
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF) {
|
||||
common_vars->rxdata = (int32_t **)NULL;
|
||||
common_vars->txdataF = (int32_t **)malloc16(NB_ANTENNA_PORTS_ENB*sizeof(int32_t *));
|
||||
common_vars->rxdataF = (int32_t **)malloc16(64*sizeof(int32_t *));
|
||||
LOG_I(PHY,"[INIT] NB_ANTENNA_PORTS_ENB:%d fp->nb_antenna_ports_eNB:%d\n", NB_ANTENNA_PORTS_ENB, fp->nb_antenna_ports_eNB);
|
||||
|
||||
for (i=0; i<NB_ANTENNA_PORTS_ENB; i++) {
|
||||
if (i<fp->nb_antenna_ports_eNB || i==5) {
|
||||
common_vars->txdataF[i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) );
|
||||
|
||||
LOG_I(PHY,"[INIT] common_vars->txdataF[%d] = %p (%lu bytes)\n",
|
||||
i,common_vars->txdataF[i],
|
||||
fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Channel estimates for SRS
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
|
||||
srs_vars[UE_id].srs_ch_estimates = (int32_t **) malloc16 (64 * sizeof (int32_t *));
|
||||
srs_vars[UE_id].srs_ch_estimates_time = (int32_t **) malloc16 (64 * sizeof (int32_t *));
|
||||
|
||||
for (i = 0; i < 64; i++) {
|
||||
srs_vars[UE_id].srs_ch_estimates[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size);
|
||||
srs_vars[UE_id].srs_ch_estimates_time[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size * 2);
|
||||
}
|
||||
} //UE_id
|
||||
|
||||
|
||||
generate_ul_ref_sigs_rx ();
|
||||
|
||||
init_ulsch_power_LUT ();
|
||||
|
||||
// SRS
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
srs_vars[UE_id].srs = (int32_t *) malloc16_clear (2 * fp->ofdm_symbol_size * sizeof (int32_t));
|
||||
}
|
||||
|
||||
// PRACH
|
||||
prach_vars->prachF = (int16_t *) malloc16_clear (1024 * 2 * sizeof (int16_t));
|
||||
|
||||
// assume maximum of 64 RX antennas for PRACH receiver
|
||||
prach_vars->prach_ifft[0] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
|
||||
for (i = 0; i < 64; i++)
|
||||
prach_vars->prach_ifft[0][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
|
||||
|
||||
prach_vars->rxsigF[0] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
|
||||
// PRACH BR
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
prach_vars_br->prachF = (int16_t*)malloc16_clear( 1024*2*sizeof(int32_t) );
|
||||
|
||||
// assume maximum of 64 RX antennas for PRACH receiver
|
||||
for (int ce_level = 0; ce_level < 4; ce_level++) {
|
||||
prach_vars_br->prach_ifft[ce_level] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
|
||||
for (i = 0; i < 64; i++)
|
||||
prach_vars_br->prach_ifft[ce_level][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
|
||||
prach_vars->rxsigF[ce_level] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0])
|
||||
AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->rxsigF) / sizeof(prach_vars->rxsigF[0]),
|
||||
"nb_antennas_rx too large");
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
prach_vars->rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]);
|
||||
}*/
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
|
||||
//FIXME
|
||||
pusch_vars[UE_id] = (LTE_eNB_PUSCH *) malloc16_clear (NUMBER_OF_UE_MAX * sizeof (LTE_eNB_PUSCH));
|
||||
|
||||
pusch_vars[UE_id]->rxdataF_ext = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->rxdataF_ext2 = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->drs_ch_estimates = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->drs_ch_estimates_time = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->rxdataF_comp = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->ul_ch_mag = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->ul_ch_magb = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
|
||||
AssertFatal (fp->ofdm_symbol_size > 127, "fp->ofdm_symbol_size %d<128\n", fp->ofdm_symbol_size);
|
||||
AssertFatal (fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n", fp->symbols_per_tti);
|
||||
AssertFatal (fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n", fp->N_RB_UL);
|
||||
for (i = 0; i < 2; i++) {
|
||||
// RK 2 times because of output format of FFT!
|
||||
// FIXME We should get rid of this
|
||||
pusch_vars[UE_id]->rxdataF_ext[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->rxdataF_ext2[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->drs_ch_estimates[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->drs_ch_estimates_time[i] = (int32_t*)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size );
|
||||
pusch_vars[UE_id]->rxdataF_comp[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->ul_ch_mag[i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
|
||||
pusch_vars[UE_id]->ul_ch_magb[i] = (int32_t*)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
|
||||
for (i=0; i<NB_ANTENNA_PORTS_ENB; i++) {
|
||||
if (i<fp->nb_antenna_ports_eNB || i==5) {
|
||||
common_vars->txdataF[i] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) );
|
||||
LOG_I(PHY,"[INIT] common_vars->txdataF[%d] = %p (%lu bytes)\n",
|
||||
i,common_vars->txdataF[i],
|
||||
fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t));
|
||||
}
|
||||
|
||||
pusch_vars[UE_id]->llr = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
|
||||
} //UE_id
|
||||
}
|
||||
|
||||
// Channel estimates for SRS
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
srs_vars[UE_id].srs_ch_estimates = (int32_t **) malloc16 (64 * sizeof (int32_t *));
|
||||
srs_vars[UE_id].srs_ch_estimates_time = (int32_t **) malloc16 (64 * sizeof (int32_t *));
|
||||
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++)
|
||||
eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id];
|
||||
for (i = 0; i < 64; i++) {
|
||||
srs_vars[UE_id].srs_ch_estimates[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size);
|
||||
srs_vars[UE_id].srs_ch_estimates_time[i] = (int32_t *) malloc16_clear (sizeof (int32_t) * fp->ofdm_symbol_size * 2);
|
||||
}
|
||||
} //UE_id
|
||||
|
||||
generate_ul_ref_sigs_rx ();
|
||||
init_ulsch_power_LUT ();
|
||||
|
||||
// SRS
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
|
||||
srs_vars[UE_id].srs = (int32_t *) malloc16_clear (2 * fp->ofdm_symbol_size * sizeof (int32_t));
|
||||
}
|
||||
|
||||
// PRACH
|
||||
prach_vars->prachF = (int16_t *) malloc16_clear (1024 * 2 * sizeof (int16_t));
|
||||
// assume maximum of 64 RX antennas for PRACH receiver
|
||||
prach_vars->prach_ifft[0] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
|
||||
|
||||
for (i = 0; i < 64; i++)
|
||||
prach_vars->prach_ifft[0][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
|
||||
|
||||
prach_vars->rxsigF[0] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
|
||||
// PRACH BR
|
||||
prach_vars_br->prachF = (int16_t *)malloc16_clear( 1024*2*sizeof(int32_t) );
|
||||
|
||||
// assume maximum of 64 RX antennas for PRACH receiver
|
||||
for (int ce_level = 0; ce_level < 4; ce_level++) {
|
||||
prach_vars_br->prach_ifft[ce_level] = (int32_t **) malloc16_clear (64 * sizeof (int32_t *));
|
||||
|
||||
for (i = 0; i < 64; i++)
|
||||
prach_vars_br->prach_ifft[ce_level][i] = (int32_t *) malloc16_clear (1024 * 2 * sizeof (int32_t));
|
||||
|
||||
prach_vars->rxsigF[ce_level] = (int16_t **) malloc16_clear (64 * sizeof (int16_t *));
|
||||
}
|
||||
|
||||
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0])
|
||||
AssertFatal(fp->nb_antennas_rx <= sizeof(prach_vars->rxsigF) / sizeof(prach_vars->rxsigF[0]),
|
||||
"nb_antennas_rx too large");
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
prach_vars->rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,prach_vars->rxsigF[i]);
|
||||
}*/
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
//FIXME
|
||||
pusch_vars[UE_id] = (LTE_eNB_PUSCH *) malloc16_clear (NUMBER_OF_UE_MAX * sizeof (LTE_eNB_PUSCH));
|
||||
pusch_vars[UE_id]->rxdataF_ext = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->rxdataF_ext2 = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->drs_ch_estimates = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->drs_ch_estimates_time = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->rxdataF_comp = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->ul_ch_mag = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
pusch_vars[UE_id]->ul_ch_magb = (int32_t **) malloc16 (2 * sizeof (int32_t *));
|
||||
AssertFatal (fp->ofdm_symbol_size > 127, "fp->ofdm_symbol_size %d<128\n", fp->ofdm_symbol_size);
|
||||
AssertFatal (fp->symbols_per_tti > 11, "fp->symbols_per_tti %d < 12\n", fp->symbols_per_tti);
|
||||
AssertFatal (fp->N_RB_UL > 5, "fp->N_RB_UL %d < 6\n", fp->N_RB_UL);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
// RK 2 times because of output format of FFT!
|
||||
// FIXME We should get rid of this
|
||||
pusch_vars[UE_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->rxdataF_ext2[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->drs_ch_estimates[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->drs_ch_estimates_time[i] = (int32_t *)malloc16_clear( 2*sizeof(int32_t)*fp->ofdm_symbol_size );
|
||||
pusch_vars[UE_id]->rxdataF_comp[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
pusch_vars[UE_id]->ul_ch_mag[i] = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
|
||||
pusch_vars[UE_id]->ul_ch_magb[i] = (int32_t *)malloc16_clear( fp->symbols_per_tti*sizeof(int32_t)*fp->N_RB_UL*12 );
|
||||
}
|
||||
|
||||
pusch_vars[UE_id]->llr = (int16_t *)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
|
||||
} //UE_id
|
||||
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++)
|
||||
eNB->UE_stats_ptr[UE_id] = &eNB->UE_stats[UE_id];
|
||||
}
|
||||
|
||||
eNB->pdsch_config_dedicated->p_a = dB0; //defaul value until overwritten by RRCConnectionReconfiguration
|
||||
|
||||
|
||||
return (0);
|
||||
|
||||
}
|
||||
|
||||
void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
|
||||
{
|
||||
LTE_DL_FRAME_PARMS* const fp = &eNB->frame_parms;
|
||||
LTE_eNB_COMMON* const common_vars = &eNB->common_vars;
|
||||
LTE_eNB_PUSCH** const pusch_vars = eNB->pusch_vars;
|
||||
LTE_eNB_SRS* const srs_vars = eNB->srs_vars;
|
||||
LTE_eNB_PRACH* const prach_vars = &eNB->prach_vars;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_eNB_PRACH* const prach_vars_br = &eNB->prach_vars_br;
|
||||
#endif
|
||||
void phy_free_lte_eNB(PHY_VARS_eNB *eNB) {
|
||||
LTE_DL_FRAME_PARMS *const fp = &eNB->frame_parms;
|
||||
LTE_eNB_COMMON *const common_vars = &eNB->common_vars;
|
||||
LTE_eNB_PUSCH **const pusch_vars = eNB->pusch_vars;
|
||||
LTE_eNB_SRS *const srs_vars = eNB->srs_vars;
|
||||
LTE_eNB_PRACH *const prach_vars = &eNB->prach_vars;
|
||||
LTE_eNB_PRACH *const prach_vars_br = &eNB->prach_vars_br;
|
||||
int i, UE_id;
|
||||
|
||||
for (i = 0; i < NB_ANTENNA_PORTS_ENB; i++) {
|
||||
@@ -541,6 +465,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
|
||||
/* rxdataF[i] is not allocated -> don't free */
|
||||
}
|
||||
}
|
||||
|
||||
free_and_zero(common_vars->txdataF);
|
||||
free_and_zero(common_vars->rxdataF);
|
||||
|
||||
@@ -550,6 +475,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
|
||||
free_and_zero(srs_vars[UE_id].srs_ch_estimates[i]);
|
||||
free_and_zero(srs_vars[UE_id].srs_ch_estimates_time[i]);
|
||||
}
|
||||
|
||||
free_and_zero(srs_vars[UE_id].srs_ch_estimates);
|
||||
free_and_zero(srs_vars[UE_id].srs_ch_estimates_time);
|
||||
} //UE_id
|
||||
@@ -561,16 +487,17 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
|
||||
free_and_zero(prach_vars->prachF);
|
||||
|
||||
for (i = 0; i < 64; i++) free_and_zero(prach_vars->prach_ifft[0][i]);
|
||||
|
||||
free_and_zero(prach_vars->prach_ifft[0]);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
for (int ce_level = 0; ce_level < 4; ce_level++) {
|
||||
for (i = 0; i < 64; i++) free_and_zero(prach_vars_br->prach_ifft[ce_level][i]);
|
||||
|
||||
free_and_zero(prach_vars_br->prach_ifft[ce_level]);
|
||||
free_and_zero(prach_vars->rxsigF[ce_level]);
|
||||
}
|
||||
|
||||
free_and_zero(prach_vars_br->prachF);
|
||||
#endif
|
||||
free_and_zero(prach_vars->rxsigF[0]);
|
||||
|
||||
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
|
||||
@@ -583,6 +510,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
|
||||
free_and_zero(pusch_vars[UE_id]->ul_ch_mag[i]);
|
||||
free_and_zero(pusch_vars[UE_id]->ul_ch_magb[i]);
|
||||
}
|
||||
|
||||
free_and_zero(pusch_vars[UE_id]->rxdataF_ext);
|
||||
free_and_zero(pusch_vars[UE_id]->rxdataF_ext2);
|
||||
free_and_zero(pusch_vars[UE_id]->drs_ch_estimates);
|
||||
@@ -597,8 +525,7 @@ void phy_free_lte_eNB(PHY_VARS_eNB *eNB)
|
||||
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) eNB->UE_stats_ptr[UE_id] = NULL;
|
||||
}
|
||||
|
||||
void install_schedule_handlers(IF_Module_t *if_inst)
|
||||
{
|
||||
void install_schedule_handlers(IF_Module_t *if_inst) {
|
||||
if_inst->PHY_config_req = phy_config_request;
|
||||
if_inst->schedule_response = schedule_response;
|
||||
}
|
||||
|
||||
+113
-105
@@ -34,215 +34,223 @@
|
||||
|
||||
void init_7_5KHz(void);
|
||||
|
||||
int phy_init_RU(RU_t *ru)
|
||||
{
|
||||
int phy_init_RU(RU_t *ru) {
|
||||
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
int i,j,p,re;
|
||||
|
||||
init_dfts();
|
||||
|
||||
init_dfts();
|
||||
LOG_I(PHY,"Initializing RU signal buffers (if_south %s) nb_tx %d\n",ru_if_types[ru->if_south],ru->nb_tx);
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
generate_ul_ref_sigs_rx();
|
||||
generate_ul_ref_sigs_rx();
|
||||
}
|
||||
|
||||
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals
|
||||
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so allocate memory for time-domain signals
|
||||
// Time-domain signals
|
||||
ru->common.txdata = (int32_t**)malloc16(ru->nb_tx*sizeof(int32_t*));
|
||||
ru->common.rxdata = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
|
||||
ru->common.txdata = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t *));
|
||||
ru->common.rxdata = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) );
|
||||
|
||||
for (i=0; i<ru->nb_tx; i++) {
|
||||
// Allocate 10 subframes of I/Q TX signal data (time) if not
|
||||
ru->common.txdata[i] = (int32_t*)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
|
||||
ru->common.txdata[i] = (int32_t *)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
|
||||
LOG_I(PHY,"[INIT] common.txdata[%d] = %p (%lu bytes)\n",i,ru->common.txdata[i],
|
||||
fp->samples_per_tti*10*sizeof(int32_t));
|
||||
fp->samples_per_tti*10*sizeof(int32_t));
|
||||
}
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
calibration->drs_ch_estimates_time = (int32_t**)malloc16_clear(ru->nb_rx*sizeof(int32_t*));
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
calibration->drs_ch_estimates_time[i] = (int32_t*)malloc16_clear(2*sizeof(int32_t)*fp->ofdm_symbol_size);
|
||||
}
|
||||
calibration->drs_ch_estimates_time = (int32_t **)malloc16_clear(ru->nb_rx*sizeof(int32_t *));
|
||||
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
calibration->drs_ch_estimates_time[i] = (int32_t *)malloc16_clear(2*sizeof(int32_t)*fp->ofdm_symbol_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (i=0;i<ru->nb_rx;i++) {
|
||||
ru->common.rxdata[i] = (int32_t*)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
ru->common.rxdata[i] = (int32_t *)malloc16_clear( fp->samples_per_tti*10*sizeof(int32_t) );
|
||||
}
|
||||
} // IF5 or local RF
|
||||
else {
|
||||
// LOG_I(PHY,"No rxdata/txdata for RU\n");
|
||||
ru->common.txdata = (int32_t**)NULL;
|
||||
ru->common.rxdata = (int32_t**)NULL;
|
||||
|
||||
ru->common.txdata = (int32_t **)NULL;
|
||||
ru->common.rxdata = (int32_t **)NULL;
|
||||
}
|
||||
|
||||
if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
|
||||
init_dfts();
|
||||
init_7_5KHz();
|
||||
LOG_I(PHY,"nb_tx %d\n",ru->nb_tx);
|
||||
ru->common.rxdata_7_5kHz = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
|
||||
for (i=0;i<ru->nb_rx;i++) {
|
||||
ru->common.rxdata_7_5kHz[i] = (int32_t*)malloc16_clear( 2*fp->samples_per_tti*2*sizeof(int32_t) );
|
||||
ru->common.rxdata_7_5kHz = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) );
|
||||
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
ru->common.rxdata_7_5kHz[i] = (int32_t *)malloc16_clear( 2*fp->samples_per_tti*2*sizeof(int32_t) );
|
||||
LOG_I(PHY,"rxdata_7_5kHz[%d] %p for RU %d\n",i,ru->common.rxdata_7_5kHz[i],ru->idx);
|
||||
}
|
||||
|
||||
|
||||
// allocate IFFT input buffers (TX)
|
||||
ru->common.txdataF_BF = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t*));
|
||||
ru->common.txdataF_BF = (int32_t **)malloc16(ru->nb_tx*sizeof(int32_t *));
|
||||
LOG_I(PHY,"[INIT] common.txdata_BF= %p (%lu bytes)\n",ru->common.txdataF_BF,
|
||||
ru->nb_tx*sizeof(int32_t*));
|
||||
ru->nb_tx*sizeof(int32_t *));
|
||||
|
||||
for (i=0; i<ru->nb_tx; i++) {
|
||||
ru->common.txdataF_BF[i] = (int32_t*)malloc16_clear(fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t) );
|
||||
ru->common.txdataF_BF[i] = (int32_t *)malloc16_clear(fp->symbols_per_tti*fp->ofdm_symbol_size*sizeof(int32_t) );
|
||||
LOG_I(PHY,"txdataF_BF[%d] %p for RU %d\n",i,ru->common.txdataF_BF[i],ru->idx);
|
||||
}
|
||||
|
||||
// allocate FFT output buffers (RX)
|
||||
ru->common.rxdataF = (int32_t**)malloc16(ru->nb_rx*sizeof(int32_t*) );
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
ru->common.rxdataF = (int32_t **)malloc16(ru->nb_rx*sizeof(int32_t *) );
|
||||
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
// allocate 2 subframes of I/Q signal data (frequency)
|
||||
ru->common.rxdataF[i] = (int32_t*)malloc16_clear(sizeof(int32_t)*(2*fp->ofdm_symbol_size*fp->symbols_per_tti) );
|
||||
ru->common.rxdataF[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*(2*fp->ofdm_symbol_size*fp->symbols_per_tti) );
|
||||
LOG_I(PHY,"rxdataF[%d] %p for RU %d\n",i,ru->common.rxdataF[i],ru->idx);
|
||||
}
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
// allocate FFT output buffers after extraction (RX)
|
||||
calibration->rxdataF_ext = (int32_t**)malloc16(2*sizeof(int32_t*));
|
||||
calibration->drs_ch_estimates = (int32_t**)malloc16(2*sizeof(int32_t*));
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
// allocate 2 subframes of I/Q signal data (frequency)
|
||||
calibration->rxdataF_ext[i] = (int32_t*)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
LOG_I(PHY,"rxdataF_ext[%d] %p for RU %d\n",i,calibration->rxdataF_ext[i],ru->idx);
|
||||
calibration->drs_ch_estimates[i] = (int32_t*)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti);
|
||||
}
|
||||
}
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
// allocate FFT output buffers after extraction (RX)
|
||||
calibration->rxdataF_ext = (int32_t **)malloc16(2*sizeof(int32_t *));
|
||||
calibration->drs_ch_estimates = (int32_t **)malloc16(2*sizeof(int32_t *));
|
||||
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
// allocate 2 subframes of I/Q signal data (frequency)
|
||||
calibration->rxdataF_ext[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti );
|
||||
LOG_I(PHY,"rxdataF_ext[%d] %p for RU %d\n",i,calibration->rxdataF_ext[i],ru->idx);
|
||||
calibration->drs_ch_estimates[i] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->N_RB_UL*12*fp->symbols_per_tti);
|
||||
}
|
||||
}
|
||||
|
||||
/* number of elements of an array X is computed as sizeof(X) / sizeof(X[0]) */
|
||||
//AssertFatal(ru->nb_rx <= sizeof(ru->prach_rxsigF) / sizeof(ru->prach_rxsigF[0]),
|
||||
//"nb_antennas_rx too large");
|
||||
ru->prach_rxsigF = (int16_t**)malloc(ru->nb_rx * sizeof(int16_t*));
|
||||
for (j=0;j<4;j++) ru->prach_rxsigF_br[j] = (int16_t**)malloc(ru->nb_rx * sizeof(int16_t*));
|
||||
//"nb_antennas_rx too large");
|
||||
ru->prach_rxsigF = (int16_t **)malloc(ru->nb_rx * sizeof(int16_t *));
|
||||
|
||||
for (j=0; j<4; j++) ru->prach_rxsigF_br[j] = (int16_t **)malloc(ru->nb_rx * sizeof(int16_t *));
|
||||
|
||||
for (i=0; i<ru->nb_rx; i++) {
|
||||
ru->prach_rxsigF[i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
ru->prach_rxsigF[i] = (int16_t *)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars->rxsigF[%d] = %p\n",i,ru->prach_rxsigF[i]);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
for (j=0;j<4;j++) {
|
||||
ru->prach_rxsigF_br[j][i] = (int16_t*)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars_br->rxsigF[%d] = %p\n",i,ru->prach_rxsigF_br[j][i]);
|
||||
|
||||
for (j=0; j<4; j++) {
|
||||
ru->prach_rxsigF_br[j][i] = (int16_t *)malloc16_clear( fp->ofdm_symbol_size*12*2*sizeof(int16_t) );
|
||||
LOG_D(PHY,"[INIT] prach_vars_br->rxsigF[%d] = %p\n",i,ru->prach_rxsigF_br[j][i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
AssertFatal(RC.nb_L1_inst <= NUMBER_OF_eNB_MAX,"eNB instances %d > %d\n",
|
||||
RC.nb_L1_inst,NUMBER_OF_eNB_MAX);
|
||||
|
||||
RC.nb_L1_inst,NUMBER_OF_eNB_MAX);
|
||||
LOG_D(PHY,"[INIT] %s() RC.nb_L1_inst:%d \n", __FUNCTION__, RC.nb_L1_inst);
|
||||
|
||||
int starting_antenna_index=0;
|
||||
for (i=0; i<ru->idx;i++) starting_antenna_index+=ru->nb_tx;
|
||||
|
||||
for (i=0; i<ru->idx; i++) starting_antenna_index+=ru->nb_tx;
|
||||
|
||||
for (i=0; i<RC.nb_L1_inst; i++) {
|
||||
for (p=0;p<15;p++) {
|
||||
for (p=0; p<15; p++) {
|
||||
LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB);
|
||||
if (p<ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p==5) {
|
||||
LOG_D(PHY,"[INIT] %s() DO BEAM WEIGHTS nb_antenna_ports_eNB:%d nb_tx:%d\n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB, ru->nb_tx);
|
||||
ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
|
||||
for (j=0; j<ru->nb_tx; j++) {
|
||||
ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
|
||||
// antenna ports 0-3 are mapped on antennas 0-3 as follows
|
||||
// - antenna port p is mapped to antenna j on ru->idx as: p = (starting_antenna_index+j)%nb_anntena_ports_eNB
|
||||
// antenna port 4 is mapped on antenna 0
|
||||
// antenna ports 5-14 are mapped on all antennas
|
||||
|
||||
if (((p<4) &&
|
||||
(p==((starting_antenna_index+j)%ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB))) ||
|
||||
((p==4) && (j==0))) {
|
||||
for (re=0; re<fp->ofdm_symbol_size; re++)
|
||||
{
|
||||
ru->beam_weights[i][p][j][re] = 0x00007fff;
|
||||
|
||||
if (p<ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p==5) {
|
||||
LOG_D(PHY,"[INIT] %s() DO BEAM WEIGHTS nb_antenna_ports_eNB:%d nb_tx:%d\n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB, ru->nb_tx);
|
||||
ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t *));
|
||||
|
||||
for (j=0; j<ru->nb_tx; j++) {
|
||||
ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
|
||||
// antenna ports 0-3 are mapped on antennas 0-3 as follows
|
||||
// - antenna port p is mapped to antenna j on ru->idx as: p = (starting_antenna_index+j)%nb_anntena_ports_eNB
|
||||
// antenna port 4 is mapped on antenna 0
|
||||
// antenna ports 5-14 are mapped on all antennas
|
||||
|
||||
if (((p<4) &&
|
||||
(p==((starting_antenna_index+j)%ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB))) ||
|
||||
((p==4) && (j==0))) {
|
||||
for (re=0; re<fp->ofdm_symbol_size; re++) {
|
||||
ru->beam_weights[i][p][j][re] = 0x00007fff;
|
||||
//LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]);
|
||||
}
|
||||
}
|
||||
else if (p>4) {
|
||||
for (re=0; re<fp->ofdm_symbol_size; re++)
|
||||
{
|
||||
ru->beam_weights[i][p][j][re] = 0x00007fff/ru->nb_tx;
|
||||
} else if (p>4) {
|
||||
for (re=0; re<fp->ofdm_symbol_size; re++) {
|
||||
ru->beam_weights[i][p][j][re] = 0x00007fff/ru->nb_tx;
|
||||
//LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d][%d][%d] = %d\n", i,p,j,re,ru->beam_weights[i][p][j][re]);
|
||||
}
|
||||
}
|
||||
//LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d] = %p (%lu bytes)\n", i,j,ru->beam_weights[i][p][j], fp->ofdm_symbol_size*sizeof(int32_t));
|
||||
} // for (j=0
|
||||
} // if (p<ru
|
||||
}
|
||||
|
||||
//LOG_D(PHY,"[INIT] lte_common_vars->beam_weights[%d][%d] = %p (%lu bytes)\n", i,j,ru->beam_weights[i][p][j], fp->ofdm_symbol_size*sizeof(int32_t));
|
||||
} // for (j=0
|
||||
} // if (p<ru
|
||||
} // for p
|
||||
} //for i
|
||||
} // !=IF5
|
||||
ru->common.sync_corr = (uint32_t*)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_tti );
|
||||
|
||||
ru->common.sync_corr = (uint32_t *)malloc16_clear( LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(uint32_t)*fp->samples_per_tti );
|
||||
return(0);
|
||||
}
|
||||
|
||||
void phy_free_RU(RU_t *ru)
|
||||
{
|
||||
void phy_free_RU(RU_t *ru) {
|
||||
int i,j,p;
|
||||
RU_CALIBRATION *calibration = &ru->calibration;
|
||||
|
||||
LOG_I(PHY, "Feeing RU signal buffers (if_south %s) nb_tx %d\n", ru_if_types[ru->if_south], ru->nb_tx);
|
||||
|
||||
free_and_zero(ru->frame_parms);
|
||||
|
||||
if (ru->if_south <= REMOTE_IF5) { // this means REMOTE_IF5 or LOCAL_RF, so free memory for time-domain signals
|
||||
for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdata[i]);
|
||||
|
||||
for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdata[i]);
|
||||
if (ru->is_slave == 1) {
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
free_and_zero(calibration->drs_ch_estimates_time[i]);
|
||||
}
|
||||
free_and_zero(calibration->drs_ch_estimates_time);
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
free_and_zero(calibration->drs_ch_estimates_time[i]);
|
||||
}
|
||||
|
||||
free_and_zero(calibration->drs_ch_estimates_time);
|
||||
}
|
||||
|
||||
free_and_zero(ru->common.txdata);
|
||||
free_and_zero(ru->common.rxdata);
|
||||
} // else: IF5 or local RF -> nothing to free()
|
||||
|
||||
if (ru->function != NGFI_RRU_IF5) { // we need to do RX/TX RU processing
|
||||
for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdata_7_5kHz[i]);
|
||||
|
||||
free_and_zero(ru->common.rxdata_7_5kHz);
|
||||
|
||||
// free IFFT input buffers (TX)
|
||||
for (i = 0; i < ru->nb_tx; i++) free_and_zero(ru->common.txdataF_BF[i]);
|
||||
|
||||
free_and_zero(ru->common.txdataF_BF);
|
||||
|
||||
// free FFT output buffers (RX)
|
||||
for (i = 0; i < ru->nb_rx; i++) free_and_zero(ru->common.rxdataF[i]);
|
||||
|
||||
free_and_zero(ru->common.rxdataF);
|
||||
|
||||
if (ru->is_slave == 1) {
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
free_and_zero(calibration->rxdataF_ext[i]);
|
||||
free_and_zero(calibration->drs_ch_estimates[i]);
|
||||
}
|
||||
free_and_zero(calibration->rxdataF_ext);
|
||||
free_and_zero(calibration->drs_ch_estimates);
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
free_and_zero(calibration->rxdataF_ext[i]);
|
||||
free_and_zero(calibration->drs_ch_estimates[i]);
|
||||
}
|
||||
|
||||
free_and_zero(calibration->rxdataF_ext);
|
||||
free_and_zero(calibration->drs_ch_estimates);
|
||||
}
|
||||
|
||||
for (i = 0; i < ru->nb_rx; i++) {
|
||||
free_and_zero(ru->prach_rxsigF[i]);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
for (j = 0; j < 4; j++) free_and_zero(ru->prach_rxsigF_br[j][i]);
|
||||
#endif
|
||||
}
|
||||
|
||||
for (j = 0; j < 4; j++) free_and_zero(ru->prach_rxsigF_br[j]);
|
||||
|
||||
free_and_zero(ru->prach_rxsigF);
|
||||
/* ru->prach_rxsigF_br is not allocated -> don't free */
|
||||
|
||||
for (i = 0; i < RC.nb_L1_inst; i++) {
|
||||
for (p = 0; p < 15; p++) {
|
||||
if (p < ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p == 5) {
|
||||
for (j=0; j<ru->nb_tx; j++) free_and_zero(ru->beam_weights[i][p][j]);
|
||||
free_and_zero(ru->beam_weights[i][p]);
|
||||
}
|
||||
if (p < ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB || p == 5) {
|
||||
for (j=0; j<ru->nb_tx; j++) free_and_zero(ru->beam_weights[i][p][j]);
|
||||
|
||||
free_and_zero(ru->beam_weights[i][p]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
free_and_zero(ru->common.sync_corr);
|
||||
}
|
||||
|
||||
@@ -165,20 +165,16 @@ void phy_config_sib13_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_A
|
||||
}
|
||||
|
||||
lte_gold_mbsfn(fp,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_table,fp->Nid_cell_mbsfn);
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
lte_gold_mbsfn_khz_1dot25(fp,PHY_vars_UE_g[Mod_id][CC_id]->lte_gold_mbsfn_khz_1dot25_table,fp->Nid_cell_mbsfn);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
|
||||
uint8_t eNB_id,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig){
|
||||
uint8_t eNB_id,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig) {
|
||||
PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
|
||||
LTE_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
||||
|
||||
if (nonMBSFN_SubframeConfig != NULL) {
|
||||
fp->NonMBSFN_config_flag = 0;
|
||||
fp->NonMBSFN_config.radioframeAllocationPeriod=nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
|
||||
@@ -186,7 +182,7 @@ void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
|
||||
fp->NonMBSFN_config.non_mbsfn_SubframeConfig=(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]>>7);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
@@ -310,20 +306,19 @@ void phy_config_meas_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8
|
||||
memcpy((void *)phy_meas->adj_cell_id,(void *)adj_cell_id,n_adj_cells*sizeof(unsigned int));
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
|
||||
uint8_t eNB_index,
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
int CC_id) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void phy_config_harq_ue(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
uint8_t eNB_id,
|
||||
uint16_t max_harq_tx)
|
||||
{
|
||||
int CC_id,
|
||||
uint8_t eNB_id,
|
||||
uint16_t max_harq_tx) {
|
||||
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
|
||||
phy_vars_ue->ulsch[eNB_id]->Mlimit = max_harq_tx;
|
||||
}
|
||||
@@ -500,18 +495,6 @@ void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CBA
|
||||
|
||||
if (physicalConfigDedicated->pusch_CBAConfigDedicated_vlola) {
|
||||
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].betaOffset_CA_Index = (uint16_t) *physicalConfigDedicated->pusch_CBAConfigDedicated_vlola->betaOffset_CBA_Index;
|
||||
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].cShift = (uint16_t) *physicalConfigDedicated->pusch_CBAConfigDedicated_vlola->cShift_CBA;
|
||||
LOG_D(PHY,"[UE %d ] physicalConfigDedicated pusch CBA config dedicated: beta offset %d cshift %d \n",Mod_id,
|
||||
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].betaOffset_CA_Index,
|
||||
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].cShift);
|
||||
}
|
||||
|
||||
#endif
|
||||
} else {
|
||||
LOG_D(PHY,"[PHY][UE %d] Received NULL radioResourceConfigDedicated from eNB %d\n",Mod_id,eNB_id);
|
||||
return;
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
uint16_t dl_S_table_normal[10]= {3,9,10,11,12,3,9,10,11,6};
|
||||
uint16_t dl_S_table_extended[10]= {3,8,9,10,3,8,9,5,0,0};
|
||||
|
||||
void set_S_config(LTE_DL_FRAME_PARMS *fp)
|
||||
{
|
||||
void set_S_config(LTE_DL_FRAME_PARMS *fp) {
|
||||
int X = fp->srsX;
|
||||
fp->ul_symbols_in_S_subframe=(1+X);
|
||||
|
||||
@@ -37,8 +36,7 @@ void set_S_config(LTE_DL_FRAME_PARMS *fp)
|
||||
}
|
||||
|
||||
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t osf)
|
||||
{
|
||||
uint8_t osf) {
|
||||
uint8_t log2_osf;
|
||||
LOG_I(PHY,"Initializing frame parms for N_RB_DL %d, Ncp %d, osf %d\n",frame_parms->N_RB_DL,frame_parms->Ncp,osf);
|
||||
|
||||
@@ -128,12 +126,10 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
frame_parms->nb_prefix_samples0>>=(2-log2_osf);
|
||||
frame_parms->N_RBGS = 2;
|
||||
frame_parms->N_RBG = 13;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
frame_parms->ofdm_symbol_size_khz_1dot25 = 6144*osf;
|
||||
frame_parms->first_carrier_offset_khz_1dot25 = frame_parms->ofdm_symbol_size_khz_1dot25 - 1800; //4344
|
||||
frame_parms->nb_prefix_samples_khz_1dot25>>=(2-log2_osf);
|
||||
frame_parms->nb_prefix_samples0_khz_1dot25>>=(2-log2_osf);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 15:
|
||||
@@ -170,8 +166,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
|
||||
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
LOG_I(PHY,"frame_parms->N_RB_DL=%d\n",frame_parms->N_RB_DL);
|
||||
LOG_I(PHY,"frame_parms->N_RB_UL=%d\n",frame_parms->N_RB_UL);
|
||||
LOG_I(PHY,"frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell);
|
||||
|
||||
@@ -507,6 +507,26 @@ void init_nr_transport(PHY_VARS_gNB *gNB) {
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
LOG_I(PHY,"Initializing nFAPI for ULSCH, UE %d\n",i);
|
||||
// [hna] added here for RT implementation
|
||||
uint8_t harq_pid = 0;
|
||||
nfapi_nr_ul_config_ulsch_pdu *rel15_ul = &gNB->ulsch[i+1][j]->harq_processes[harq_pid]->ulsch_pdu;
|
||||
|
||||
// --------- setting rel15_ul parameters ----------
|
||||
rel15_ul->rnti = 0x1234;
|
||||
rel15_ul->ulsch_pdu_rel15.start_rb = 0;
|
||||
rel15_ul->ulsch_pdu_rel15.number_rbs = 50;
|
||||
rel15_ul->ulsch_pdu_rel15.start_symbol = 2;
|
||||
rel15_ul->ulsch_pdu_rel15.number_symbols = 12;
|
||||
rel15_ul->ulsch_pdu_rel15.nb_re_dmrs = 6;
|
||||
rel15_ul->ulsch_pdu_rel15.length_dmrs = 1;
|
||||
rel15_ul->ulsch_pdu_rel15.Qm = 2;
|
||||
rel15_ul->ulsch_pdu_rel15.mcs = 9;
|
||||
rel15_ul->ulsch_pdu_rel15.rv = 0;
|
||||
rel15_ul->ulsch_pdu_rel15.n_layers = 1;
|
||||
///////////////////////////////////////////////////
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+207
-279
@@ -86,10 +86,10 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id,
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset;
|
||||
|
||||
compute_prach_seq(fp->prach_config_common.rootSequenceIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->frame_type,ue->X_u);
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
fp->prach_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->frame_type,ue->X_u);
|
||||
|
||||
|
||||
|
||||
@@ -240,9 +240,9 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_
|
||||
|
||||
//compute_prach_seq(u,N_ZC, PHY_vars_UE_g[Mod_id]->X_u);
|
||||
compute_prach_seq(PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.rootSequenceIndex,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->frame_parms.prach_config_common.prach_ConfigInfo.highSpeedFlag,
|
||||
fp->frame_type,
|
||||
PHY_vars_UE_g[Mod_id][CC_id]->X_u);
|
||||
|
||||
@@ -353,24 +353,19 @@ void phy_config_meas_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n
|
||||
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
|
||||
uint8_t eNB_index,
|
||||
SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
int CC_id)
|
||||
{
|
||||
|
||||
int CC_id) {
|
||||
}
|
||||
#endif
|
||||
|
||||
void phy_config_harq_ue(module_id_t Mod_id,
|
||||
int CC_id,
|
||||
uint8_t eNB_id,
|
||||
uint16_t max_harq_tx)
|
||||
{
|
||||
|
||||
int CC_id,
|
||||
uint8_t eNB_id,
|
||||
uint16_t max_harq_tx) {
|
||||
int num_of_threads,num_of_code_words;
|
||||
|
||||
PHY_VARS_NR_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
|
||||
|
||||
for (num_of_threads=0;num_of_threads<RX_NB_TH_MAX;num_of_threads++)
|
||||
for (num_of_code_words=0;num_of_code_words<NR_MAX_NB_CODEWORDS;num_of_code_words++)
|
||||
for (num_of_threads=0; num_of_threads<RX_NB_TH_MAX; num_of_threads++)
|
||||
for (num_of_code_words=0; num_of_code_words<NR_MAX_NB_CODEWORDS; num_of_code_words++)
|
||||
phy_vars_ue->ulsch[num_of_threads][eNB_id][num_of_code_words]->Mlimit = max_harq_tx;
|
||||
}
|
||||
|
||||
@@ -552,17 +547,6 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CBA
|
||||
|
||||
if (physicalConfigDedicated->pusch_CBAConfigDedicated_vlola) {
|
||||
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].betaOffset_CA_Index = (uint16_t) *physicalConfigDedicated->pusch_CBAConfigDedicated_vlola->betaOffset_CBA_Index;
|
||||
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].cShift = (uint16_t) *physicalConfigDedicated->pusch_CBAConfigDedicated_vlola->cShift_CBA;
|
||||
LOG_D(PHY,"[UE %d ] physicalConfigDedicated pusch CBA config dedicated: beta offset %d cshift %d \n",Mod_id,
|
||||
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].betaOffset_CA_Index,
|
||||
phy_vars_ue->pusch_ca_config_dedicated[eNB_id].cShift);
|
||||
}
|
||||
|
||||
#endif
|
||||
} else {
|
||||
LOG_D(PHY,"[PHY][UE %d] Received NULL radioResourceConfigDedicated from eNB %d\n",Mod_id,eNB_id);
|
||||
return;
|
||||
@@ -575,9 +559,9 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
first_dedicated_configuration ++;
|
||||
if(first_dedicated_configuration > 1)
|
||||
{
|
||||
LOG_I(PHY,"Disable SIB MIB decoding \n");
|
||||
phy_vars_ue->decode_SIB = 0;
|
||||
phy_vars_ue->decode_MIB = 0;
|
||||
LOG_I(PHY,"Disable SIB MIB decoding \n");
|
||||
phy_vars_ue->decode_SIB = 0;
|
||||
phy_vars_ue->decode_MIB = 0;
|
||||
}
|
||||
//phy_vars_ue->pdcch_vars[1][eNB_id]->crnti = phy_vars_ue->pdcch_vars[0][eNB_id]->crnti;
|
||||
if(phy_vars_ue->pdcch_vars[0][eNB_id]->crnti == 0x1234)
|
||||
@@ -596,83 +580,72 @@ void phy_config_dedicated_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,
|
||||
* \param[in] frame_parms LTE_DL_FRAME_PARMS structure.
|
||||
* \note This function is optimistic in that it expects malloc() to succeed.
|
||||
*/
|
||||
void phy_init_nr_ue__PDSCH(NR_UE_PDSCH* const pdsch,
|
||||
const NR_DL_FRAME_PARMS* const fp)
|
||||
{
|
||||
void phy_init_nr_ue__PDSCH(NR_UE_PDSCH *const pdsch,
|
||||
const NR_DL_FRAME_PARMS *const fp) {
|
||||
AssertFatal( pdsch, "pdsch==0" );
|
||||
|
||||
pdsch->pmi_ext = (uint8_t*)malloc16_clear( fp->N_RB_DL );
|
||||
pdsch->llr[0] = (int16_t*)malloc16_clear( (8*(3*8*6144))*sizeof(int16_t) );
|
||||
pdsch->layer_llr[0] = (int16_t*)malloc16_clear( (8*(3*8*6144))*sizeof(int16_t) );
|
||||
pdsch->llr128 = (int16_t**)malloc16_clear( sizeof(int16_t*) );
|
||||
pdsch->pmi_ext = (uint8_t *)malloc16_clear( fp->N_RB_DL );
|
||||
pdsch->llr[0] = (int16_t *)malloc16_clear( (8*(3*8*6144))*sizeof(int16_t) );
|
||||
pdsch->layer_llr[0] = (int16_t *)malloc16_clear( (8*(3*8*6144))*sizeof(int16_t) );
|
||||
pdsch->llr128 = (int16_t **)malloc16_clear( sizeof(int16_t *) );
|
||||
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
|
||||
// FK, 11-3-2015: this is only as a temporary pointer, no memory is stored there
|
||||
|
||||
|
||||
pdsch->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pdsch->rxdataF_uespec_pilots = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pdsch->rxdataF_comp0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pdsch->rho = (int32_t**)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t*) );
|
||||
pdsch->dl_ch_estimates = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pdsch->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pdsch->dl_bf_ch_estimates = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pdsch->dl_bf_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pdsch->rxdataF_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
pdsch->rxdataF_uespec_pilots = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
pdsch->rxdataF_comp0 = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
pdsch->rho = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
pdsch->dl_ch_estimates = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
pdsch->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
pdsch->dl_bf_ch_estimates = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
pdsch->dl_bf_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
//pdsch->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
//pdsch->dl_ch_rho2_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pdsch->dl_ch_mag0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pdsch->dl_ch_magb0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
|
||||
|
||||
pdsch->dl_ch_mag0 = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
pdsch->dl_ch_magb0 = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
// the allocated memory size is fixed:
|
||||
AssertFatal( fp->nb_antennas_rx <= 2, "nb_antennas_rx > 2" );
|
||||
|
||||
for (int i=0; i<fp->nb_antennas_rx; i++) {
|
||||
pdsch->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*7*2) );
|
||||
pdsch->rho[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(fp->N_RB_DL*12*7*2) );
|
||||
|
||||
for (int j=0; j<4; j++) { //fp->nb_antennas_tx; j++)
|
||||
const int idx = (j<<1)+i;
|
||||
const size_t num = 7*2*fp->N_RB_DL*12;
|
||||
pdsch->rxdataF_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->rxdataF_uespec_pilots[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->N_RB_DL*12);
|
||||
pdsch->rxdataF_comp0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->dl_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
|
||||
pdsch->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->dl_bf_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
|
||||
pdsch->dl_bf_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->rxdataF_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->rxdataF_uespec_pilots[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * fp->N_RB_DL*12);
|
||||
pdsch->rxdataF_comp0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
|
||||
pdsch->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->dl_bf_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * fp->ofdm_symbol_size*7*2);
|
||||
pdsch->dl_bf_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
//pdsch->dl_ch_rho_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
//pdsch->dl_ch_rho2_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->dl_ch_mag0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->dl_ch_magb0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->dl_ch_mag0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
pdsch->dl_ch_magb0[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void phy_init_nr_ue_PUSCH(NR_UE_PUSCH* const pusch,
|
||||
const NR_DL_FRAME_PARMS* const fp)
|
||||
{
|
||||
void phy_init_nr_ue_PUSCH(NR_UE_PUSCH *const pusch,
|
||||
const NR_DL_FRAME_PARMS *const fp) {
|
||||
AssertFatal( pusch, "pusch==0" );
|
||||
|
||||
for (int i=0; i<NR_MAX_NB_LAYERS; i++){
|
||||
pusch->txdataF_layers[i] = (int32_t *)malloc16_clear((NR_MAX_PUSCH_ENCODED_LENGTH)*sizeof(int32_t*));
|
||||
for (int i=0; i<NR_MAX_NB_LAYERS; i++) {
|
||||
pusch->txdataF_layers[i] = (int32_t *)malloc16_clear((NR_MAX_PUSCH_ENCODED_LENGTH)*sizeof(int32_t *));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
int nb_connected_eNB,
|
||||
uint8_t abstraction_flag)
|
||||
{
|
||||
uint8_t abstraction_flag) {
|
||||
// create shortcuts
|
||||
NR_DL_FRAME_PARMS* const fp = &ue->frame_parms;
|
||||
NR_UE_COMMON* const common_vars = &ue->common_vars;
|
||||
NR_UE_PDSCH** const pdsch_vars_SI = ue->pdsch_vars_SI;
|
||||
NR_UE_PDSCH** const pdsch_vars_ra = ue->pdsch_vars_ra;
|
||||
NR_UE_PDSCH** const pdsch_vars_p = ue->pdsch_vars_p;
|
||||
NR_UE_PDSCH** const pdsch_vars_mch = ue->pdsch_vars_MCH;
|
||||
NR_UE_PBCH** const pbch_vars = ue->pbch_vars;
|
||||
NR_UE_PRACH** const prach_vars = ue->prach_vars;
|
||||
|
||||
|
||||
NR_DL_FRAME_PARMS *const fp = &ue->frame_parms;
|
||||
NR_UE_COMMON *const common_vars = &ue->common_vars;
|
||||
NR_UE_PDSCH **const pdsch_vars_SI = ue->pdsch_vars_SI;
|
||||
NR_UE_PDSCH **const pdsch_vars_ra = ue->pdsch_vars_ra;
|
||||
NR_UE_PDSCH **const pdsch_vars_p = ue->pdsch_vars_p;
|
||||
NR_UE_PDSCH **const pdsch_vars_mch = ue->pdsch_vars_MCH;
|
||||
NR_UE_PBCH **const pbch_vars = ue->pbch_vars;
|
||||
NR_UE_PRACH **const prach_vars = ue->prach_vars;
|
||||
int i,j,k,l,slot,symb,q;
|
||||
int eNB_id;
|
||||
int th_id;
|
||||
@@ -684,14 +657,10 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
abstraction_flag = 0;
|
||||
fp->nb_antennas_tx = 1;
|
||||
fp->nb_antennas_rx=1;
|
||||
|
||||
|
||||
printf("Initializing UE vars (abstraction %"PRIu8") for eNB TXant %"PRIu8", UE RXant %"PRIu8"\n",abstraction_flag,fp->nb_antennas_tx,fp->nb_antennas_rx);
|
||||
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
|
||||
|
||||
nr_init_frame_parms_ue(fp,NR_MU_1,NORMAL,fp->N_RB_DL,n_ssb_crb,k_ssb);
|
||||
phy_init_nr_top(ue);
|
||||
|
||||
// many memory allocation sizes are hard coded
|
||||
AssertFatal( fp->nb_antennas_rx <= 2, "hard coded allocation for ue_common_vars->dl_ch_estimates[eNB_id]" );
|
||||
AssertFatal( nb_connected_eNB <= NUMBER_OF_CONNECTED_eNB_MAX, "n_connected_eNB is too large" );
|
||||
@@ -712,98 +681,93 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
ue->total_received_bits[eNB_id] = 0;
|
||||
}
|
||||
|
||||
/////////////////////////PUSCH init/////////////////////////
|
||||
///////////
|
||||
for (th_id = 0; th_id < RX_NB_TH_MAX; th_id++){
|
||||
for (eNB_id = 0; eNB_id < ue->n_connected_eNB; eNB_id++){
|
||||
|
||||
/////////////////////////PUSCH init/////////////////////////
|
||||
///////////
|
||||
for (th_id = 0; th_id < RX_NB_TH_MAX; th_id++) {
|
||||
for (eNB_id = 0; eNB_id < ue->n_connected_eNB; eNB_id++) {
|
||||
ue->pusch_vars[th_id][eNB_id] = (NR_UE_PUSCH *)malloc16(sizeof(NR_UE_PUSCH));
|
||||
phy_init_nr_ue_PUSCH( ue->pusch_vars[th_id][eNB_id], fp );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/////////////////////////PUSCH DMRS init/////////////////////////
|
||||
///////////
|
||||
/////////////////////////PUSCH DMRS init/////////////////////////
|
||||
///////////
|
||||
|
||||
// default values until overwritten by RRCConnectionReconfiguration
|
||||
|
||||
for (i=0;i<MAX_NR_OF_UL_ALLOCATIONS;i++){
|
||||
for (i=0; i<MAX_NR_OF_UL_ALLOCATIONS; i++) {
|
||||
ue->pusch_config.pusch_TimeDomainResourceAllocation[i] = (PUSCH_TimeDomainResourceAllocation_t *)malloc16(sizeof(PUSCH_TimeDomainResourceAllocation_t));
|
||||
ue->pusch_config.pusch_TimeDomainResourceAllocation[i]->mappingType = typeA;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------- config DMRS parameters--------------//
|
||||
//------------- config DMRS parameters--------------//
|
||||
ue->dmrs_UplinkConfig.pusch_dmrs_type = pusch_dmrs_type1;
|
||||
ue->dmrs_UplinkConfig.pusch_dmrs_AdditionalPosition = pusch_dmrs_pos0;
|
||||
ue->dmrs_UplinkConfig.pusch_maxLength = pusch_len1;
|
||||
//-------------------------------------------------//
|
||||
ue->nr_gold_pusch_dmrs = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t ***));
|
||||
pusch_dmrs = ue->nr_gold_pusch_dmrs;
|
||||
n_scid = 0; // This quantity is indicated by higher layer parameter dmrs-SeqInitialization
|
||||
|
||||
ue->nr_gold_pusch_dmrs = (uint32_t ****)malloc16(fp->slots_per_frame*sizeof(uint32_t***));
|
||||
pusch_dmrs = ue->nr_gold_pusch_dmrs;
|
||||
n_scid = 0; // This quantity is indicated by higher layer parameter dmrs-SeqInitialization
|
||||
|
||||
for (slot=0; slot<fp->slots_per_frame; slot++) {
|
||||
pusch_dmrs[slot] = (uint32_t ***)malloc16(fp->symbols_per_slot*sizeof(uint32_t**));
|
||||
for (slot=0; slot<fp->slots_per_frame; slot++) {
|
||||
pusch_dmrs[slot] = (uint32_t ***)malloc16(fp->symbols_per_slot*sizeof(uint32_t **));
|
||||
AssertFatal(pusch_dmrs[slot]!=NULL, "init_nr_ue_signal: pusch_dmrs for slot %d - malloc failed\n", slot);
|
||||
for (symb=0; symb<fp->symbols_per_slot; symb++){
|
||||
pusch_dmrs[slot][symb] = (uint32_t **)malloc16(NR_MAX_NB_CODEWORDS*sizeof(uint32_t*));
|
||||
|
||||
for (symb=0; symb<fp->symbols_per_slot; symb++) {
|
||||
pusch_dmrs[slot][symb] = (uint32_t **)malloc16(NR_MAX_NB_CODEWORDS*sizeof(uint32_t *));
|
||||
AssertFatal(pusch_dmrs[slot][symb]!=NULL, "init_nr_ue_signal: pusch_dmrs for slot %d symbol %d - malloc failed\n", slot, symb);
|
||||
|
||||
for (q=0; q<NR_MAX_NB_CODEWORDS; q++) {
|
||||
pusch_dmrs[slot][symb][q] = (uint32_t*)malloc16(NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD*sizeof(uint32_t));
|
||||
pusch_dmrs[slot][symb][q] = (uint32_t *)malloc16(NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD*sizeof(uint32_t));
|
||||
AssertFatal(pusch_dmrs[slot][symb][q]!=NULL, "init_nr_ue_signal: pusch_dmrs for slot %d symbol %d codeword %d - malloc failed\n", slot, symb, q);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
nr_init_pusch_dmrs(ue, N_n_scid, n_scid);
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
///////////
|
||||
////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
for (i=0;i<10;i++)
|
||||
for (i=0; i<10; i++)
|
||||
ue->tx_power_dBm[i]=-127;
|
||||
|
||||
if (abstraction_flag == 0) {
|
||||
|
||||
// init TX buffers
|
||||
|
||||
common_vars->txdata = (int32_t**)malloc16( fp->nb_antennas_tx*sizeof(int32_t*) );
|
||||
common_vars->txdataF = (int32_t **)malloc16( fp->nb_antennas_tx*sizeof(int32_t*) );
|
||||
common_vars->txdata = (int32_t **)malloc16( fp->nb_antennas_tx*sizeof(int32_t *) );
|
||||
common_vars->txdataF = (int32_t **)malloc16( fp->nb_antennas_tx*sizeof(int32_t *) );
|
||||
|
||||
for (i=0; i<fp->nb_antennas_tx; i++) {
|
||||
|
||||
common_vars->txdata[i] = (int32_t*)malloc16_clear( fp->samples_per_subframe*10*sizeof(int32_t) );
|
||||
common_vars->txdata[i] = (int32_t *)malloc16_clear( fp->samples_per_subframe*10*sizeof(int32_t) );
|
||||
common_vars->txdataF[i] = (int32_t *)malloc16_clear( fp->samples_per_slot_wCP*sizeof(int32_t) );
|
||||
}
|
||||
|
||||
// init RX buffers
|
||||
common_vars->rxdata = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
|
||||
common_vars->rxdata = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
common_vars->common_vars_rx_data_per_thread[th_id].rxdataF = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
|
||||
common_vars->common_vars_rx_data_per_thread[th_id].rxdataF = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
}
|
||||
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
common_vars->rxdata[i] = (int32_t*) malloc16_clear( (2*(fp->samples_per_frame)+2048)*sizeof(int32_t) );
|
||||
common_vars->rxdata[i] = (int32_t *) malloc16_clear( (2*(fp->samples_per_frame)+2048)*sizeof(int32_t) );
|
||||
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
common_vars->common_vars_rx_data_per_thread[th_id].rxdataF[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->samples_per_slot_wCP) );
|
||||
common_vars->common_vars_rx_data_per_thread[th_id].rxdataF[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(fp->samples_per_slot_wCP) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// DLSCH
|
||||
for (eNB_id=0; eNB_id<ue->n_connected_eNB; eNB_id++) {
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdsch_vars[th_id][eNB_id] = (NR_UE_PDSCH *)malloc16_clear(sizeof(NR_UE_PDSCH));
|
||||
ue->pdsch_vars[th_id][eNB_id] = (NR_UE_PDSCH *)malloc16_clear(sizeof(NR_UE_PDSCH));
|
||||
}
|
||||
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdcch_vars[th_id][eNB_id] = (NR_UE_PDCCH *)malloc16_clear(sizeof(NR_UE_PDCCH));
|
||||
ue->pdcch_vars[th_id][eNB_id] = (NR_UE_PDCCH *)malloc16_clear(sizeof(NR_UE_PDCCH));
|
||||
}
|
||||
|
||||
pdsch_vars_SI[eNB_id] = (NR_UE_PDSCH *)malloc16_clear(sizeof(NR_UE_PDSCH));
|
||||
@@ -815,62 +779,62 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
|
||||
if (abstraction_flag == 0) {
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
phy_init_nr_ue__PDSCH( ue->pdsch_vars[th_id][eNB_id], fp );
|
||||
phy_init_nr_ue__PDSCH( ue->pdsch_vars[th_id][eNB_id], fp );
|
||||
}
|
||||
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdsch_vars[th_id][eNB_id]->llr_shifts = (uint8_t*)malloc16_clear(7*2*fp->N_RB_DL*12);
|
||||
ue->pdsch_vars[th_id][eNB_id]->llr_shifts = (uint8_t *)malloc16_clear(7*2*fp->N_RB_DL*12);
|
||||
ue->pdsch_vars[th_id][eNB_id]->llr_shifts_p = ue->pdsch_vars[0][eNB_id]->llr_shifts;
|
||||
ue->pdsch_vars[th_id][eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->layer_llr[1] = (int16_t*)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->llr128_2ndstream = (int16_t**)malloc16_clear( sizeof(int16_t*) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->rho = (int32_t**)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t*) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->layer_llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->llr128_2ndstream = (int16_t **)malloc16_clear( sizeof(int16_t *) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->rho = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
}
|
||||
|
||||
for (int i=0; i<fp->nb_antennas_rx; i++){
|
||||
for (int i=0; i<fp->nb_antennas_rx; i++) {
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdsch_vars[th_id][eNB_id]->rho[i] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->rho[i] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
}
|
||||
|
||||
for (i=0; i<fp->nb_antennas_rx; i++)
|
||||
for (j=0; j<4; j++) {
|
||||
const int idx = (j<<1)+i;
|
||||
const size_t num = 7*2*fp->N_RB_DL*12+4;
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
}
|
||||
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
}
|
||||
}
|
||||
|
||||
//const size_t num = 7*2*fp->N_RB_DL*12+4;
|
||||
for (k=0;k<8;k++) { //harq_pid
|
||||
for (l=0;l<8;l++) { //round
|
||||
for (k=0; k<8; k++) { //harq_pid
|
||||
for (l=0; l<8; l++) { //round
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdsch_vars[th_id][eNB_id]->rxdataF_comp1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho_ext[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_mag1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_magb1[k][l] = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->rxdataF_comp1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho_ext[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_mag1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_magb1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
}
|
||||
|
||||
|
||||
for (int i=0; i<fp->nb_antennas_rx; i++)
|
||||
for (int j=0; j<4; j++) { //frame_parms->nb_antennas_tx; j++)
|
||||
const int idx = (j<<1)+i;
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->rxdataF_comp1[k][l][idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_mag1[k][l][idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_magb1[k][l][idx] = (int32_t*)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
|
||||
}
|
||||
|
||||
}
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->rxdataF_comp1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_mag1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->dl_ch_magb1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
phy_init_nr_ue__PDSCH( pdsch_vars_SI[eNB_id], fp );
|
||||
phy_init_nr_ue__PDSCH( pdsch_vars_ra[eNB_id], fp );
|
||||
phy_init_nr_ue__PDSCH( pdsch_vars_p[eNB_id], fp );
|
||||
@@ -878,65 +842,63 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
|
||||
// 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdcch_vars[th_id][eNB_id]->llr = (int16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->llr16 = (int16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->wbar = (int16_t*)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->e_rx = (int16_t*)malloc16_clear( 4*2*100*12 );
|
||||
ue->pdcch_vars[th_id][eNB_id]->llr = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->llr16 = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->wbar = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->e_rx = (int16_t *)malloc16_clear( 4*2*100*12 );
|
||||
ue->pdcch_vars[th_id][eNB_id]->rxdataF_comp = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_rho_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->rho = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->rxdataF_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
// Channel estimates
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
|
||||
|
||||
ue->pdcch_vars[th_id][eNB_id]->rxdataF_comp = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->rho = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
ue->pdcch_vars[th_id][eNB_id]->rho[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(100*12*4) );
|
||||
|
||||
// Channel estimates
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_time = (int32_t**)malloc16_clear(8*sizeof(int32_t*));
|
||||
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
ue->pdcch_vars[th_id][eNB_id]->rho[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(100*12*4) );
|
||||
for (j=0; j<4; j++) {
|
||||
int idx = (j<<1) + i;
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_time[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
|
||||
|
||||
// size_t num = 7*2*fp->N_RB_DL*12;
|
||||
size_t num = 4*273*12; // 4 symbols, 100 PRBs, 12 REs per PRB
|
||||
ue->pdcch_vars[th_id][eNB_id]->rxdataF_comp[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_rho_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
ue->pdcch_vars[th_id][eNB_id]->rxdataF_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
|
||||
}
|
||||
}
|
||||
for (j=0; j<4; j++) {
|
||||
int idx = (j<<1) + i;
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) );
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_time[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 );
|
||||
// size_t num = 7*2*fp->N_RB_DL*12;
|
||||
size_t num = 4*273*12; // 4 symbols, 100 PRBs, 12 REs per PRB
|
||||
ue->pdcch_vars[th_id][eNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_rho_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
ue->pdcch_vars[th_id][eNB_id]->rxdataF_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// PBCH
|
||||
pbch_vars[eNB_id]->rxdataF_ext = (int32_t**)malloc16( fp->nb_antennas_rx*sizeof(int32_t*) );
|
||||
pbch_vars[eNB_id]->rxdataF_comp = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pbch_vars[eNB_id]->dl_ch_estimates = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pbch_vars[eNB_id]->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
|
||||
pbch_vars[eNB_id]->llr = (int16_t*)malloc16_clear( 1920 );//
|
||||
prach_vars[eNB_id]->prachF = (int16_t*)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
|
||||
prach_vars[eNB_id]->prach = (int16_t*)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
|
||||
pbch_vars[eNB_id]->rxdataF_ext = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) );
|
||||
pbch_vars[eNB_id]->rxdataF_comp = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
pbch_vars[eNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
pbch_vars[eNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) );
|
||||
pbch_vars[eNB_id]->llr = (int16_t *)malloc16_clear( 1920 ); //
|
||||
prach_vars[eNB_id]->prachF = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
|
||||
prach_vars[eNB_id]->prach = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) );
|
||||
|
||||
for (i=0; i<fp->nb_antennas_rx; i++) {
|
||||
pbch_vars[eNB_id]->rxdataF_ext[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||
pbch_vars[eNB_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||
|
||||
for (j=0; j<4; j++) {//fp->nb_antennas_tx;j++) {
|
||||
int idx = (j<<1)+i;
|
||||
pbch_vars[eNB_id]->rxdataF_comp[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||
pbch_vars[eNB_id]->dl_ch_estimates[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size) );
|
||||
pbch_vars[eNB_id]->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||
pbch_vars[eNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||
pbch_vars[eNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size) );
|
||||
pbch_vars[eNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pbch_vars[eNB_id]->decoded_output = (uint8_t*)malloc16_clear( 64 );
|
||||
pbch_vars[eNB_id]->decoded_output = (uint8_t *)malloc16_clear( 64 );
|
||||
}
|
||||
|
||||
// initialization for the last instance of pdsch_vars (used for MU-MIMO)
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
ue->pdsch_vars[th_id][eNB_id] = (NR_UE_PDSCH *)malloc16_clear( sizeof(NR_UE_PDSCH) );
|
||||
ue->pdsch_vars[th_id][eNB_id] = (NR_UE_PDSCH *)malloc16_clear( sizeof(NR_UE_PDSCH) );
|
||||
}
|
||||
|
||||
pdsch_vars_SI[eNB_id] = (NR_UE_PDSCH *)malloc16_clear( sizeof(NR_UE_PDSCH) );
|
||||
@@ -945,51 +907,41 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
|
||||
|
||||
if (abstraction_flag == 0) {
|
||||
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
|
||||
//phy_init_lte_ue__PDSCH( ue->pdsch_vars[th_id][eNB_id], fp );
|
||||
ue->pdsch_vars[th_id][eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->layer_llr[1] = (int16_t*)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
|
||||
//phy_init_lte_ue__PDSCH( ue->pdsch_vars[th_id][eNB_id], fp );
|
||||
ue->pdsch_vars[th_id][eNB_id]->llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
|
||||
ue->pdsch_vars[th_id][eNB_id]->layer_llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
|
||||
}
|
||||
|
||||
} else { //abstraction == 1
|
||||
ue->sinr_dB = (double*) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
|
||||
ue->sinr_dB = (double *) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
|
||||
}
|
||||
|
||||
ue->sinr_CQI_dB = (double*) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
|
||||
|
||||
ue->sinr_CQI_dB = (double *) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
|
||||
ue->init_averaging = 1;
|
||||
|
||||
// default value until overwritten by RRCConnectionReconfiguration
|
||||
if (fp->nb_antenna_ports_eNB==2)
|
||||
ue->pdsch_config_dedicated->p_a = dBm3;
|
||||
else
|
||||
ue->pdsch_config_dedicated->p_a = dB0;
|
||||
|
||||
|
||||
// set channel estimation to do linear interpolation in time
|
||||
ue->high_speed_flag = 1;
|
||||
ue->ch_est_alpha = 24576;
|
||||
|
||||
// enable MIB/SIB decoding by default
|
||||
ue->decode_MIB = 1;
|
||||
ue->decode_SIB = 1;
|
||||
|
||||
ue->ssb_periodicity = 5; // initialization of ssb periodicity to 5ms according to TS38.213 section 4.1
|
||||
|
||||
init_prach_tables(839);
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
void init_nr_ue_transport(PHY_VARS_NR_UE *ue,
|
||||
int abstraction_flag)
|
||||
{
|
||||
int abstraction_flag) {
|
||||
for (int i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) {
|
||||
for (int j=0; j<2; j++) {
|
||||
for (int k=0; k<RX_NB_TH_MAX; k++) {
|
||||
AssertFatal((ue->dlsch[k][i][j] = new_nr_ue_dlsch(1,NR_MAX_DLSCH_HARQ_PROCESSES,NSOFT,MAX_LDPC_ITERATIONS,ue->frame_parms.N_RB_DL, abstraction_flag))!=NULL,"Can't get ue dlsch structures\n");
|
||||
LOG_D(PHY,"dlsch[%d][%d][%d] => %p\n",k,i,j,ue->dlsch[k][i][j]);
|
||||
|
||||
AssertFatal((ue->ulsch[k][i][j] = new_nr_ue_ulsch(ue->frame_parms.N_RB_UL, NR_MAX_ULSCH_HARQ_PROCESSES, abstraction_flag))!=NULL,"Can't get ue ulsch structures\n");
|
||||
LOG_D(PHY,"ulsch[%d][%d][%d] => %p\n",k,i,j,ue->ulsch[k][i][j]);
|
||||
}
|
||||
@@ -997,102 +949,78 @@ void init_nr_ue_transport(PHY_VARS_NR_UE *ue,
|
||||
|
||||
ue->dlsch_SI[i] = new_nr_ue_dlsch(1,1,NSOFT,MAX_LDPC_ITERATIONS,ue->frame_parms.N_RB_DL, abstraction_flag);
|
||||
ue->dlsch_ra[i] = new_nr_ue_dlsch(1,1,NSOFT,MAX_LDPC_ITERATIONS,ue->frame_parms.N_RB_DL, abstraction_flag);
|
||||
|
||||
ue->transmission_mode[i] = ue->frame_parms.nb_antenna_ports_eNB==1 ? 1 : 2;
|
||||
}
|
||||
|
||||
//ue->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1;
|
||||
|
||||
ue->dlsch_MCH[0] = new_nr_ue_dlsch(1,NR_MAX_DLSCH_HARQ_PROCESSES,NSOFT,MAX_LDPC_ITERATIONS_MBSFN,ue->frame_parms.N_RB_DL,0);
|
||||
|
||||
}
|
||||
|
||||
void phy_init_nr_top(PHY_VARS_NR_UE *ue)
|
||||
{
|
||||
void phy_init_nr_top(PHY_VARS_NR_UE *ue) {
|
||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
|
||||
crcTableInit();
|
||||
|
||||
init_dfts();
|
||||
|
||||
init_context_synchro_nr(frame_parms);
|
||||
|
||||
generate_ul_reference_signal_sequences(SHRT_MAX);
|
||||
|
||||
// Polar encoder init for PBCH
|
||||
|
||||
//lte_sync_time_init(frame_parms);
|
||||
|
||||
//generate_ul_ref_sigs();
|
||||
//generate_ul_ref_sigs_rx();
|
||||
|
||||
//generate_64qam_table();
|
||||
//generate_16qam_table();
|
||||
//generate_RIV_tables();
|
||||
|
||||
//init_unscrambling_lut();
|
||||
//init_scrambling_lut();
|
||||
|
||||
//set_taus_seed(1328);
|
||||
|
||||
}
|
||||
|
||||
void set_default_frame_parms_single(nfapi_nr_config_request_t *config,
|
||||
NR_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
NR_DL_FRAME_PARMS *frame_parms) {
|
||||
//int CC_id;
|
||||
|
||||
//for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
/* Set some default values that may be overwritten while reading options */
|
||||
frame_parms = (NR_DL_FRAME_PARMS*) malloc(sizeof(NR_DL_FRAME_PARMS));
|
||||
config = (nfapi_nr_config_request_t*) malloc(sizeof(nfapi_nr_config_request_t));
|
||||
config->subframe_config.numerology_index_mu.value =1;
|
||||
config->subframe_config.duplex_mode.value = 1; //FDD
|
||||
config->subframe_config.dl_cyclic_prefix_type.value = 0; //NORMAL
|
||||
config->rf_config.dl_carrier_bandwidth.value = 106;
|
||||
config->rf_config.ul_carrier_bandwidth.value = 106;
|
||||
config->sch_config.physical_cell_id.value = 0;
|
||||
/* Set some default values that may be overwritten while reading options */
|
||||
frame_parms = (NR_DL_FRAME_PARMS *) malloc(sizeof(NR_DL_FRAME_PARMS));
|
||||
config = (nfapi_nr_config_request_t *) malloc(sizeof(nfapi_nr_config_request_t));
|
||||
config->subframe_config.numerology_index_mu.value =1;
|
||||
config->subframe_config.duplex_mode.value = 1; //FDD
|
||||
config->subframe_config.dl_cyclic_prefix_type.value = 0; //NORMAL
|
||||
config->rf_config.dl_carrier_bandwidth.value = 106;
|
||||
config->rf_config.ul_carrier_bandwidth.value = 106;
|
||||
config->sch_config.physical_cell_id.value = 0;
|
||||
frame_parms->frame_type = FDD;
|
||||
frame_parms->tdd_config = 3;
|
||||
//frame_parms[CC_id]->tdd_config_S = 0;
|
||||
frame_parms->N_RB_DL = 100;
|
||||
frame_parms->N_RB_UL = 100;
|
||||
frame_parms->Ncp = NORMAL;
|
||||
//frame_parms[CC_id]->Ncp_UL = NORMAL;
|
||||
frame_parms->Nid_cell = 0;
|
||||
//frame_parms[CC_id]->num_MBSFN_config = 0;
|
||||
frame_parms->nb_antenna_ports_eNB = 1;
|
||||
frame_parms->nb_antennas_tx = 1;
|
||||
frame_parms->nb_antennas_rx = 1;
|
||||
//frame_parms[CC_id]->nushift = 0;
|
||||
///frame_parms[CC_id]->phich_config_common.phich_resource = oneSixth;
|
||||
//frame_parms[CC_id]->phich_config_common.phich_duration = normal;
|
||||
// UL RS Config
|
||||
/*frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 1;//n_DMRS1 set to 0
|
||||
frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1;
|
||||
frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0;
|
||||
frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0;
|
||||
|
||||
frame_parms->frame_type = FDD;
|
||||
frame_parms->tdd_config = 3;
|
||||
//frame_parms[CC_id]->tdd_config_S = 0;
|
||||
frame_parms->N_RB_DL = 100;
|
||||
frame_parms->N_RB_UL = 100;
|
||||
frame_parms->Ncp = NORMAL;
|
||||
//frame_parms[CC_id]->Ncp_UL = NORMAL;
|
||||
frame_parms->Nid_cell = 0;
|
||||
//frame_parms[CC_id]->num_MBSFN_config = 0;
|
||||
frame_parms->nb_antenna_ports_eNB = 1;
|
||||
frame_parms->nb_antennas_tx = 1;
|
||||
frame_parms->nb_antennas_rx = 1;
|
||||
|
||||
//frame_parms[CC_id]->nushift = 0;
|
||||
|
||||
///frame_parms[CC_id]->phich_config_common.phich_resource = oneSixth;
|
||||
//frame_parms[CC_id]->phich_config_common.phich_duration = normal;
|
||||
|
||||
// UL RS Config
|
||||
/*frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 1;//n_DMRS1 set to 0
|
||||
frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1;
|
||||
frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0;
|
||||
frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0;
|
||||
|
||||
frame_parms[CC_id]->pusch_config_common.n_SB = 1;
|
||||
frame_parms[CC_id]->pusch_config_common.hoppingMode = 0;
|
||||
frame_parms[CC_id]->pusch_config_common.pusch_HoppingOffset = 0;
|
||||
frame_parms[CC_id]->pusch_config_common.enable64QAM = 0;
|
||||
|
||||
frame_parms[CC_id]->prach_config_common.rootSequenceIndex=22;
|
||||
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig=1;
|
||||
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_ConfigIndex=0;
|
||||
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0;
|
||||
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;*/
|
||||
|
||||
// NR: Init to legacy LTE 20Mhz params
|
||||
frame_parms->numerology_index = 0;
|
||||
frame_parms->ttis_per_subframe = 1;
|
||||
frame_parms->slots_per_tti = 2;
|
||||
|
||||
//}
|
||||
frame_parms[CC_id]->pusch_config_common.n_SB = 1;
|
||||
frame_parms[CC_id]->pusch_config_common.hoppingMode = 0;
|
||||
frame_parms[CC_id]->pusch_config_common.pusch_HoppingOffset = 0;
|
||||
frame_parms[CC_id]->pusch_config_common.enable64QAM = 0;
|
||||
|
||||
frame_parms[CC_id]->prach_config_common.rootSequenceIndex=22;
|
||||
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig=1;
|
||||
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_ConfigIndex=0;
|
||||
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.highSpeedFlag=0;
|
||||
frame_parms[CC_id]->prach_config_common.prach_ConfigInfo.prach_FreqOffset=0;*/
|
||||
// NR: Init to legacy LTE 20Mhz params
|
||||
frame_parms->numerology_index = 0;
|
||||
frame_parms->ttis_per_subframe = 1;
|
||||
frame_parms->slots_per_tti = 2;
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -79,6 +79,32 @@ int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp, uint8_t i_ssb, uint8_t half_f
|
||||
return symbol;
|
||||
}
|
||||
|
||||
int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot)
|
||||
{
|
||||
|
||||
uint8_t n_hf;
|
||||
int rel_slot;
|
||||
|
||||
n_hf = cfg->sch_config.half_frame_index.value;
|
||||
|
||||
// if SSB periodicity is 5ms, they are transmitted in both half frames
|
||||
if ( cfg->sch_config.ssb_periodicity.value == 5) {
|
||||
if (slot<10)
|
||||
n_hf=0;
|
||||
else
|
||||
n_hf=1;
|
||||
}
|
||||
|
||||
// to set a effective slot number between 0 to 9 in the half frame where the SSB is supposed to be
|
||||
rel_slot = (n_hf)? (slot-10) : slot;
|
||||
|
||||
if(rel_slot<10 && rel_slot>=0)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
|
||||
int nr_init_frame_parms0(NR_DL_FRAME_PARMS *fp,
|
||||
int mu,
|
||||
|
||||
@@ -34,12 +34,9 @@
|
||||
#include "LTE_PHICH-Config.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_MobilityControlInfo.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#include "LTE_SCellToAddMod-r10.h"
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#include "LTE_NonMBSFN-SubframeConfig-r14.h"
|
||||
#endif
|
||||
|
||||
/** @addtogroup _PHY_STRUCTURES_
|
||||
* @{
|
||||
*/
|
||||
@@ -73,8 +70,8 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue);
|
||||
@note The current implementation will never return -1, but segfault.
|
||||
*/
|
||||
int init_lte_ue_signal(PHY_VARS_UE *phy_vars_ue,
|
||||
int nb_connected_eNB,
|
||||
uint8_t abstraction_flag);
|
||||
int nb_connected_eNB,
|
||||
uint8_t abstraction_flag);
|
||||
|
||||
/*!
|
||||
\brief Allocate and initialize the PHY variables releated to the transport channel buffers (UL/DL)
|
||||
@@ -114,15 +111,15 @@ void phy_free_lte_eNB(PHY_VARS_eNB *phy_vars_eNb);
|
||||
@param phich_config Pointer to PHICH_CONFIG_COMMON
|
||||
*/
|
||||
void phy_config_mib_eNB(int Mod_id,
|
||||
int CC_id,
|
||||
int eutra_band,
|
||||
int N_RB_DL,
|
||||
LTE_PHICH_Config_t *phich_config,
|
||||
int Nid_cell,
|
||||
int Ncp,
|
||||
int p_eNB,
|
||||
uint32_t dl_CarrierFreq,
|
||||
uint32_t ul_CarrierFreq);
|
||||
int CC_id,
|
||||
int eutra_band,
|
||||
int N_RB_DL,
|
||||
LTE_PHICH_Config_t *phich_config,
|
||||
int Nid_cell,
|
||||
int Ncp,
|
||||
int p_eNB,
|
||||
uint32_t dl_CarrierFreq,
|
||||
uint32_t ul_CarrierFreq);
|
||||
|
||||
|
||||
|
||||
@@ -249,7 +246,7 @@ void phy_config_dedicated_ue(module_id_t Mod_id,
|
||||
|
||||
*/
|
||||
void phy_config_harq_ue(module_id_t Mod_id,int CC_id,uint8_t CH_index,
|
||||
uint16_t max_harq_tx);
|
||||
uint16_t max_harq_tx);
|
||||
/**
|
||||
\brief Configure UE MBSFN common parameters.
|
||||
\details Invoked upon reception of SIB13 from eNB.
|
||||
@@ -265,8 +262,8 @@ void phy_config_sib13_ue(module_id_t Mod_id,
|
||||
long mbsfn_AreaId_r9);
|
||||
|
||||
void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
|
||||
uint8_t eNB_id,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig);
|
||||
uint8_t eNB_id,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig);
|
||||
|
||||
/**
|
||||
\brief Configure eNB MBSFN common parameters.
|
||||
@@ -341,25 +338,24 @@ void init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms);
|
||||
//void copy_lte_parms_to_phy_framing(LTE_DL_FRAME_PARMS *frame_parm, PHY_FRAMING *phy_framing);
|
||||
|
||||
void lte_param_init(PHY_VARS_eNB **eNBp,
|
||||
PHY_VARS_UE **UEp,
|
||||
RU_t **rup,
|
||||
unsigned char N_tx_port_eNB,
|
||||
PHY_VARS_UE **UEp,
|
||||
RU_t **rup,
|
||||
unsigned char N_tx_port_eNB,
|
||||
unsigned char N_tx_phy,
|
||||
unsigned char N_rx_ru,
|
||||
unsigned char N_rx_ue,
|
||||
unsigned char transmission_mode,
|
||||
uint8_t extended_prefix_flag,
|
||||
frame_t frame_type,
|
||||
uint16_t Nid_cell,
|
||||
uint8_t tdd_config,
|
||||
uint8_t N_RB_DL,
|
||||
uint8_t pa,
|
||||
uint8_t threequarter_fs,
|
||||
unsigned char N_rx_ru,
|
||||
unsigned char N_rx_ue,
|
||||
unsigned char transmission_mode,
|
||||
uint8_t extended_prefix_flag,
|
||||
frame_t frame_type,
|
||||
uint16_t Nid_cell,
|
||||
uint8_t tdd_config,
|
||||
uint8_t N_RB_DL,
|
||||
uint8_t pa,
|
||||
uint8_t threequarter_fs,
|
||||
uint8_t osf,
|
||||
uint32_t perfect_ce);
|
||||
uint32_t perfect_ce);
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
void phy_config_dedicated_scell_ue(uint8_t Mod_id,
|
||||
uint8_t eNB_index,
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
@@ -370,7 +366,6 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
int CC_id);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -383,7 +378,8 @@ void phy_config_request(PHY_Config_t *phy_config);
|
||||
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
|
||||
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
|
||||
int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp, uint8_t i_ssb, uint8_t half_frame_index);
|
||||
int nr_init_frame_parms(nfapi_nr_config_request_t* config, NR_DL_FRAME_PARMS *frame_parms);
|
||||
int nr_is_ssb_slot(nfapi_nr_config_request_t *cfg, int slot);
|
||||
int nr_init_frame_parms(nfapi_nr_config_request_t *config, NR_DL_FRAME_PARMS *frame_parms);
|
||||
int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms,int mu,int Ncp,int N_RB_DL,int n_ssb_crb,int ssb_subcarrier_offset);
|
||||
int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB,uint8_t abstraction_flag);
|
||||
void init_nr_ue_transport(PHY_VARS_NR_UE *ue,int abstraction_flag);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*! \file config_ue.c
|
||||
* \brief This includes FeMBMS UE Channel Estimation Procedures for FeMBMS 1.25KHz Carrier Spacing
|
||||
* \brief This includes FeMBMS UE Channel Estimation Procedures for FeMBMS 1.25KHz Carrier Spacing
|
||||
* \author Javier Morgade
|
||||
* \date 2019
|
||||
* \version 0.1
|
||||
@@ -42,23 +42,16 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
module_id_t eNB_id,
|
||||
uint8_t eNB_offset,
|
||||
int subframe,
|
||||
unsigned char l)
|
||||
{
|
||||
|
||||
|
||||
|
||||
unsigned char l) {
|
||||
int pilot[600] __attribute__((aligned(16)));
|
||||
unsigned char aarx,aa;
|
||||
unsigned int rb;
|
||||
short *pil,*rxF,*ch,*ch0,*ch1,*ch11,*chp,*ch_prev;
|
||||
int ch_offset,symbol_offset;
|
||||
|
||||
// unsigned int n;
|
||||
// int i;
|
||||
|
||||
int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0];
|
||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
|
||||
|
||||
ch_offset = (l*(ue->frame_parms.ofdm_symbol_size));
|
||||
symbol_offset = ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
|
||||
|
||||
@@ -71,12 +64,9 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
l>>2);
|
||||
} // if symbol==2, return 0 else if symbol = 6, return 1, else if symbol=10 return 2
|
||||
|
||||
|
||||
|
||||
pil = (short *)&pilot[0];
|
||||
rxF = (short *)&rxdataF[aarx][((symbol_offset+ue->frame_parms.first_carrier_offset))];
|
||||
ch = (short *)&dl_ch_estimates[aarx][ch_offset];
|
||||
|
||||
// if (eNb_id==0)
|
||||
memset(ch,0,4*(ue->frame_parms.ofdm_symbol_size));
|
||||
|
||||
@@ -84,7 +74,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
if ((ue->frame_parms.N_RB_DL==6) ||
|
||||
(ue->frame_parms.N_RB_DL==50) ||
|
||||
(ue->frame_parms.N_RB_DL==100)) {
|
||||
|
||||
// Interpolation and extrapolation;
|
||||
if (l==6) {
|
||||
// ________________________First half of RBs____________________
|
||||
@@ -94,7 +83,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
|
||||
for (rb=0; rb<ue->frame_parms.N_RB_DL; rb++) {
|
||||
// ------------------------1st pilot------------------------
|
||||
|
||||
if (rb==(ue->frame_parms.N_RB_DL>>1)) {
|
||||
rxF = (short *)&rxdataF[aarx][symbol_offset+1];
|
||||
|
||||
@@ -179,7 +167,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
rxF+=24;
|
||||
}
|
||||
}
|
||||
|
||||
//*********************************************************************
|
||||
else if (ue->frame_parms.N_RB_DL==25) {
|
||||
//printf("Channel estimation\n");
|
||||
@@ -191,7 +178,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
|
||||
for (rb=0; rb<12; rb++) {
|
||||
// ------------------------1st pilot------------------------
|
||||
|
||||
ch[0] = (short)(((int)pil[0]*rxF[0] - (int)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (short)(((int)pil[0]*rxF[1] + (int)pil[1]*rxF[0])>>15);
|
||||
ch[2] = ch[0]>>1;
|
||||
@@ -269,7 +255,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
ch[1] = (short)(((int)pil[0]*rxF[1] + (int)pil[1]*rxF[0])>>15);
|
||||
ch[2] = ch[0]>>1;
|
||||
ch[3] = ch[1]>>1;
|
||||
|
||||
chp[22] += ch[2];
|
||||
chp[23] += ch[3];
|
||||
/* printf("rb %d: pil0 (%d,%d) x (%d,%d) = (%d,%d)\n",
|
||||
@@ -297,11 +282,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
/* printf("rb %d: pil2 (%d,%d) x (%d,%d) = (%d,%d)\n",
|
||||
rb,pil[4],pil[5],rxF[8],rxF[9],ch[8],ch[9]);*/
|
||||
// printf("Second half\n");
|
||||
|
||||
// ________________________Second half of RB____________________
|
||||
|
||||
rxF = (short *)&rxdataF[aarx][((symbol_offset+2))];
|
||||
|
||||
// 4th pilot
|
||||
ch[12] = (short)(((int)pil[6]*rxF[0] - (int)pil[7]*rxF[1])>>15);
|
||||
ch[13] = (short)(((int)pil[6]*rxF[1] + (int)pil[7]*rxF[0])>>15);
|
||||
@@ -483,7 +465,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
ch[7] += ch[11];
|
||||
/* printf("rb %d: pil2 (%d,%d) x (%d,%d) = (%d,%d)\n",
|
||||
rb,pil[4],pil[5],rxF[8],rxF[9],ch[8],ch[9]);*/
|
||||
|
||||
// ------------------------4th pilot------------------------
|
||||
ch[12] = (short)(((int)pil[6]*rxF[12] - (int)pil[7]*rxF[13])>>15);
|
||||
ch[13] = (short)(((int)pil[6]*rxF[13] + (int)pil[7]*rxF[12])>>15);
|
||||
@@ -518,7 +499,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
|
||||
// ------------------------middle PRB--------------------------
|
||||
// ------------------------1st pilot---------------------------
|
||||
|
||||
ch[0] = (short)(((int)pil[0]*rxF[0] - (int)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (short)(((int)pil[0]*rxF[1] + (int)pil[1]*rxF[0])>>15);
|
||||
ch[2] = ch[0]>>1;
|
||||
@@ -546,7 +526,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
/* printf("rb %d: pil2 (%d,%d) x (%d,%d) = (%d,%d)\n",
|
||||
rb,pil[4],pil[5],rxF[8],rxF[9],ch[8],ch[9]);*/
|
||||
// printf("Second half\n");
|
||||
|
||||
// ------------------------Second half of RBs---------------------//
|
||||
rxF = (short *)&rxdataF[aarx][((symbol_offset+1))];
|
||||
// ---------------------------------------------------------------//
|
||||
@@ -590,7 +569,6 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
ch[3] = ch[1]>>1;
|
||||
ch[-2] += ch[2];
|
||||
ch[-1] += ch[3];
|
||||
|
||||
/* printf("rb %d: pil0 (%d,%d) x (%d,%d) = (%d,%d)\n",
|
||||
13+rb,pil[0],pil[1],rxF[0],rxF[1],ch[0],ch[1]);*/
|
||||
// ------------------------2nd pilot------------------------
|
||||
@@ -708,14 +686,11 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
ch_prev = (short *)&dl_ch_estimates[aarx][2*(ue->frame_parms.ofdm_symbol_size)];
|
||||
ch0 = (short *)&dl_ch_estimates[aarx][0*(ue->frame_parms.ofdm_symbol_size)];
|
||||
memcpy(ch0,ch_prev,4*ue->frame_parms.ofdm_symbol_size);
|
||||
|
||||
ch1 = (short *)&dl_ch_estimates[aarx][1*(ue->frame_parms.ofdm_symbol_size)];
|
||||
memcpy(ch1,ch_prev,4*ue->frame_parms.ofdm_symbol_size);
|
||||
|
||||
// 3/4 ch2 + 1/4 ch6 => ch3
|
||||
multadd_complex_vector_real_scalar(ch_prev,24576,ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)),1,ue->frame_parms.ofdm_symbol_size);
|
||||
multadd_complex_vector_real_scalar(ch,8192,ch_prev+(2*(ue->frame_parms.ofdm_symbol_size)),0,ue->frame_parms.ofdm_symbol_size);
|
||||
|
||||
// 1/2 ch2 + 1/2 ch6 => ch4
|
||||
multadd_complex_vector_real_scalar(ch_prev,16384,ch_prev+(4*(ue->frame_parms.ofdm_symbol_size)),1,ue->frame_parms.ofdm_symbol_size);
|
||||
multadd_complex_vector_real_scalar(ch,16384,ch_prev+(4*(ue->frame_parms.ofdm_symbol_size)),0,ue->frame_parms.ofdm_symbol_size);
|
||||
@@ -748,33 +723,38 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
for (aa=0; aa<ue->frame_parms.nb_antennas_rx*ue->frame_parms.nb_antennas_tx; aa++) {
|
||||
if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa]) {
|
||||
switch (ue->frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
idft128((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
case 25:
|
||||
idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
case 50:
|
||||
idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
case 75:
|
||||
idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
case 100:
|
||||
idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case 6:
|
||||
idft128((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
idft512((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 50:
|
||||
idft1024((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 75:
|
||||
idft1536((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
case 100:
|
||||
idft2048((int16_t *) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
|
||||
(int16_t *) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
|
||||
1);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -783,15 +763,11 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
|
||||
}
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
|
||||
module_id_t eNB_id,
|
||||
uint8_t eNB_offset,
|
||||
int subframe)
|
||||
{
|
||||
|
||||
|
||||
|
||||
module_id_t eNB_id,
|
||||
uint8_t eNB_offset,
|
||||
int subframe) {
|
||||
int pilot_khz_1dot25[600] __attribute__((aligned(16)));
|
||||
unsigned char aarx/*,aa*/;
|
||||
//unsigned int rb;
|
||||
@@ -799,163 +775,138 @@ int lte_dl_mbsfn_khz_1dot25_channel_estimation(PHY_VARS_UE *ue,
|
||||
short *pil,*rxF,*dl_ch/*,*ch0,*ch1,*ch11,*chp,*ch_prev*/;
|
||||
int ch_offset,symbol_offset;
|
||||
int pilot_cnt;
|
||||
|
||||
int16_t *f,*f2,*fl,*f2l2,*fr,*f2r2/*,*f2_dc,*f_dc*/;
|
||||
|
||||
unsigned int k;
|
||||
|
||||
// unsigned int n;
|
||||
// int i;
|
||||
|
||||
int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0];
|
||||
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
|
||||
|
||||
ch_offset = 0;//(l*(ue->frame_parms.ofdm_symbol_size));
|
||||
symbol_offset = 0;//ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
|
||||
|
||||
AssertFatal( ue->frame_parms.N_RB_DL==25,"OFDM symbol size %d not yet supported for FeMBMS\n",ue->frame_parms.N_RB_DL);
|
||||
|
||||
if( (subframe&0x1) == 0){
|
||||
f=filt24_0_khz_1dot25;
|
||||
f2=filt24_2_khz_1dot25;
|
||||
fl=filt24_0_khz_1dot25;
|
||||
f2l2=filt24_2_khz_1dot25;
|
||||
fr=filt24_0r2_khz_1dot25;
|
||||
f2r2=filt24_2r_khz_1dot25;
|
||||
//f_dc=filt24_0_dcr_khz_1dot25;
|
||||
//f2_dc=filt24_2_dcl_khz_1dot25;
|
||||
}else{
|
||||
f=filt24_0_khz_1dot25;
|
||||
f2=filt24_2_khz_1dot25;
|
||||
fl=filt24_0_khz_1dot25;
|
||||
f2l2=filt24_2_khz_1dot25;
|
||||
fr=filt24_0r2_khz_1dot25;
|
||||
f2r2=filt24_2r_khz_1dot25;
|
||||
//f_dc=filt24_0_dcr_khz_1dot25;
|
||||
//f2_dc=filt24_2_dcl_khz_1dot25;
|
||||
}
|
||||
if( (subframe&0x1) == 0) {
|
||||
f=filt24_0_khz_1dot25;
|
||||
f2=filt24_2_khz_1dot25;
|
||||
fl=filt24_0_khz_1dot25;
|
||||
f2l2=filt24_2_khz_1dot25;
|
||||
fr=filt24_0r2_khz_1dot25;
|
||||
f2r2=filt24_2r_khz_1dot25;
|
||||
//f_dc=filt24_0_dcr_khz_1dot25;
|
||||
//f2_dc=filt24_2_dcl_khz_1dot25;
|
||||
} else {
|
||||
f=filt24_0_khz_1dot25;
|
||||
f2=filt24_2_khz_1dot25;
|
||||
fl=filt24_0_khz_1dot25;
|
||||
f2l2=filt24_2_khz_1dot25;
|
||||
fr=filt24_0r2_khz_1dot25;
|
||||
f2r2=filt24_2r_khz_1dot25;
|
||||
//f_dc=filt24_0_dcr_khz_1dot25;
|
||||
//f2_dc=filt24_2_dcl_khz_1dot25;
|
||||
}
|
||||
|
||||
|
||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
|
||||
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
|
||||
// generate pilot
|
||||
lte_dl_mbsfn_khz_1dot25_rx(ue,
|
||||
&pilot_khz_1dot25[0],
|
||||
subframe);
|
||||
|
||||
|
||||
lte_dl_mbsfn_khz_1dot25_rx(ue,
|
||||
&pilot_khz_1dot25[0],
|
||||
subframe);
|
||||
pil = (short *)&pilot_khz_1dot25[0];
|
||||
rxF = (short *)&rxdataF[aarx][((ue->frame_parms.first_carrier_offset_khz_1dot25))];
|
||||
dl_ch = (short *)&dl_ch_estimates[aarx][ch_offset];
|
||||
|
||||
memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size_khz_1dot25));
|
||||
|
||||
if( (subframe&0x1) == 0){
|
||||
rxF+=0;
|
||||
k=0;
|
||||
}else{
|
||||
rxF+=6;//2*3;
|
||||
k=3;
|
||||
if( (subframe&0x1) == 0) {
|
||||
rxF+=0;
|
||||
k=0;
|
||||
} else {
|
||||
rxF+=6;//2*3;
|
||||
k=3;
|
||||
}
|
||||
|
||||
if(ue->frame_parms.N_RB_DL==25){
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
if(ue->frame_parms.N_RB_DL==25) {
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(fl,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2; // Re Im
|
||||
rxF+=12;
|
||||
dl_ch+=8;
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(f2l2,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2; // Re Im
|
||||
rxF+=12;
|
||||
dl_ch+=16;
|
||||
|
||||
multadd_real_vector_complex_scalar(fl,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2; // Re Im
|
||||
rxF+=12;
|
||||
dl_ch+=8;
|
||||
for(pilot_cnt=2; pilot_cnt<299; pilot_cnt+=2) {
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(f,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2; // Re Im
|
||||
rxF+=12;
|
||||
dl_ch+=8;
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(f2,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2;
|
||||
rxF+=12;
|
||||
dl_ch+=16;
|
||||
}
|
||||
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
rxF = (int16_t *)&rxdataF[aarx][((symbol_offset+1+k))]; //Skip DC offset
|
||||
|
||||
multadd_real_vector_complex_scalar(f2l2,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2; // Re Im
|
||||
rxF+=12;
|
||||
dl_ch+=16;
|
||||
for(pilot_cnt=0; pilot_cnt<297; pilot_cnt+=2) {
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(f,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2;
|
||||
rxF+=12;
|
||||
dl_ch+=8;
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(f2,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2;
|
||||
rxF+=12;
|
||||
dl_ch+=16;
|
||||
}
|
||||
|
||||
for(pilot_cnt=2;pilot_cnt<299;pilot_cnt+=2){
|
||||
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
multadd_real_vector_complex_scalar(f,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2; // Re Im
|
||||
rxF+=12;
|
||||
dl_ch+=8;
|
||||
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
multadd_real_vector_complex_scalar(f2,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2;
|
||||
rxF+=12;
|
||||
dl_ch+=16;
|
||||
|
||||
}
|
||||
|
||||
rxF = (int16_t *)&rxdataF[aarx][((symbol_offset+1+k))]; //Skip DC offset
|
||||
|
||||
for(pilot_cnt=0; pilot_cnt<297; pilot_cnt+=2){
|
||||
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
multadd_real_vector_complex_scalar(f,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2;
|
||||
rxF+=12;
|
||||
dl_ch+=8;
|
||||
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
multadd_real_vector_complex_scalar(f2,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2;
|
||||
rxF+=12;
|
||||
dl_ch+=16;
|
||||
}
|
||||
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
multadd_real_vector_complex_scalar(fr,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2; // Re Im
|
||||
rxF+=12;
|
||||
dl_ch+=8;
|
||||
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
|
||||
multadd_real_vector_complex_scalar(f2r2,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(fr,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
pil+=2; // Re Im
|
||||
rxF+=12;
|
||||
dl_ch+=8;
|
||||
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
|
||||
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
|
||||
multadd_real_vector_complex_scalar(f2r2,
|
||||
ch,
|
||||
dl_ch,
|
||||
24);
|
||||
}
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -131,67 +131,53 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *ue,
|
||||
return(0);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int lte_dl_mbsfn_khz_1dot25(PHY_VARS_eNB *eNB, int32_t *output,
|
||||
short amp,
|
||||
int subframe)
|
||||
{
|
||||
|
||||
short amp,
|
||||
int subframe) {
|
||||
unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
|
||||
unsigned short k=0,a;
|
||||
int32_t qpsk[4];
|
||||
|
||||
a = (amp*ONE_OVER_SQRT2_Q15)>>15;
|
||||
((short *)&qpsk[0])[0] = a;
|
||||
((short *)&qpsk[0])[1] = a;
|
||||
|
||||
((short *)&qpsk[1])[0] = -a;
|
||||
((short *)&qpsk[1])[1] = a;
|
||||
((short *)&qpsk[2])[0] = a;
|
||||
((short *)&qpsk[2])[1] = -a;
|
||||
|
||||
((short *)&qpsk[3])[0] = -a;
|
||||
((short *)&qpsk[3])[1] = -a;
|
||||
|
||||
|
||||
mprime = 3*(110 - eNB->frame_parms.N_RB_DL);
|
||||
|
||||
for (m=0; m<eNB->frame_parms.N_RB_DL*24; m++) // m = 0:24*N_RB_DL-1
|
||||
{
|
||||
if ((subframe&0x1)==0) // n_sf mod 2 == 0: even
|
||||
k = 6*m;
|
||||
else
|
||||
k = 6*m + 3;
|
||||
for (m=0; m<eNB->frame_parms.N_RB_DL*24; m++) { // m = 0:24*N_RB_DL-1
|
||||
if ((subframe&0x1)==0) // n_sf mod 2 == 0: even
|
||||
k = 6*m;
|
||||
else
|
||||
k = 6*m + 3;
|
||||
|
||||
k+=eNB->frame_parms.first_carrier_offset_khz_1dot25;
|
||||
mprime_dword = mprime>>4;
|
||||
mprime_qpsk_symb = mprime&0xf;
|
||||
|
||||
k+=eNB->frame_parms.first_carrier_offset_khz_1dot25;
|
||||
if (k >= eNB->frame_parms.ofdm_symbol_size_khz_1dot25) {
|
||||
k++; // skip DC carrier
|
||||
k-=eNB->frame_parms.ofdm_symbol_size_khz_1dot25;
|
||||
}
|
||||
|
||||
mprime_dword = mprime>>4;
|
||||
mprime_qpsk_symb = mprime&0xf;
|
||||
|
||||
if (k >= eNB->frame_parms.ofdm_symbol_size_khz_1dot25) {
|
||||
k++; // skip DC carrier
|
||||
k-=eNB->frame_parms.ofdm_symbol_size_khz_1dot25;
|
||||
}
|
||||
output[k] = qpsk[(eNB->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
|
||||
mprime++;
|
||||
}
|
||||
output[k] = qpsk[(eNB->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
|
||||
mprime++;
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
int lte_dl_mbsfn_khz_1dot25_rx(PHY_VARS_UE *ue,
|
||||
int *output,
|
||||
int subframe)
|
||||
{
|
||||
|
||||
int *output,
|
||||
int subframe) {
|
||||
unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
|
||||
unsigned short k=0;
|
||||
unsigned int qpsk[4];
|
||||
|
||||
// This includes complex conjugate for channel estimation
|
||||
|
||||
((short *)&qpsk[0])[0] = ONE_OVER_SQRT2_Q15;
|
||||
((short *)&qpsk[0])[1] = -ONE_OVER_SQRT2_Q15;
|
||||
((short *)&qpsk[1])[0] = -ONE_OVER_SQRT2_Q15;
|
||||
@@ -200,23 +186,18 @@ int lte_dl_mbsfn_khz_1dot25_rx(PHY_VARS_UE *ue,
|
||||
((short *)&qpsk[2])[1] = ONE_OVER_SQRT2_Q15;
|
||||
((short *)&qpsk[3])[0] = -ONE_OVER_SQRT2_Q15;
|
||||
((short *)&qpsk[3])[1] = ONE_OVER_SQRT2_Q15;
|
||||
|
||||
mprime = 3*(110 - ue->frame_parms.N_RB_DL);
|
||||
|
||||
for (m=0; m<ue->frame_parms.N_RB_DL*24; m++) // m = 0:24*N_RB_DL-1
|
||||
{ mprime_dword = mprime>>4;
|
||||
for (m=0; m<ue->frame_parms.N_RB_DL*24; m++) { // m = 0:24*N_RB_DL-1
|
||||
mprime_dword = mprime>>4;
|
||||
mprime_qpsk_symb = mprime&0xf;
|
||||
|
||||
// this is r_mprime from 3GPP 36-211 6.10.1.2
|
||||
output[k] = qpsk[(ue->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
|
||||
|
||||
mprime++;
|
||||
k++;
|
||||
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
#endif // MAKE Rel14
|
||||
|
||||
|
||||
@@ -44,15 +44,12 @@
|
||||
|
||||
#include "lte_refsig.h"
|
||||
|
||||
void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_mbsfn)
|
||||
{
|
||||
|
||||
void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_mbsfn) {
|
||||
unsigned char sfn,l;
|
||||
unsigned int n,x1,x2;//,x1tmp,x2tmp;
|
||||
|
||||
for (sfn=0; sfn<10; sfn++) {
|
||||
for (l=0; l<3; l++) {
|
||||
|
||||
if (l==0)
|
||||
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + 2 + (7*(1+(sfn<<1)))))<<9); //cinit
|
||||
else
|
||||
@@ -61,26 +58,21 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl
|
||||
//x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
|
||||
//n = 0
|
||||
// printf("cinit (sfn %d, l %d) => %d\n",sfn,l,x2);
|
||||
|
||||
// Initializing the Sequence
|
||||
|
||||
x1 = 1+ (1<<31);
|
||||
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
||||
// skip first 50 double words (1600 bits)
|
||||
// printf("n=0 : x1 %x, x2 %x\n",x1,x2);
|
||||
|
||||
for (n=1; n<50; n++) {
|
||||
|
||||
x1 = (x1>>1) ^ (x1>>4);
|
||||
x1 = x1 ^ (x1<<31) ^ (x1<<28);
|
||||
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
|
||||
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
|
||||
// printf("x1 : %x, x2 : %x\n",x1,x2);
|
||||
|
||||
}
|
||||
|
||||
for (n=0; n<42; n++) {
|
||||
|
||||
x1 = (x1>>1) ^ (x1>>4);
|
||||
x1 = x1 ^ (x1<<31) ^ (x1<<28);
|
||||
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
|
||||
@@ -88,15 +80,11 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl
|
||||
lte_gold_mbsfn_table[sfn][l][n] = x1^x2;
|
||||
// printf("n=%d : c %x\n",n,x1^x2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150],uint16_t Nid_mbsfn){
|
||||
void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150],uint16_t Nid_mbsfn) {
|
||||
unsigned char sfn;
|
||||
unsigned int n,x1,x2;//,x1tmp,x2tmp;
|
||||
|
||||
@@ -104,12 +92,14 @@ void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold
|
||||
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + (7*(1+sfn))))<<9); //cinit
|
||||
x1 = 1+ (1<<31);
|
||||
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
|
||||
|
||||
for (n=1; n<50; n++) {
|
||||
x1 = (x1>>1) ^ (x1>>4);
|
||||
x1 = x1 ^ (x1<<31) ^ (x1<<28);
|
||||
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
|
||||
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
|
||||
}
|
||||
|
||||
for (n=0; n<150; n++) {
|
||||
x1 = (x1>>1) ^ (x1>>4);
|
||||
x1 = x1 ^ (x1<<31) ^ (x1<<28);
|
||||
@@ -119,16 +109,12 @@ void lte_gold_mbsfn_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef LTE_GOLD_MAIN
|
||||
main()
|
||||
{
|
||||
|
||||
main() {
|
||||
lte_gold_mbsfn(423,0);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+1670
-1707
File diff suppressed because it is too large
Load Diff
@@ -48,18 +48,13 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int G,
|
||||
uint8_t q,
|
||||
uint16_t frame,
|
||||
uint8_t Ns)
|
||||
{
|
||||
|
||||
uint8_t Ns) {
|
||||
int n;
|
||||
// uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e;
|
||||
uint8_t *e=dlsch_e;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
// Rule for accumulation of subframes for BL/CE UEs
|
||||
uint8_t Nacc=4;
|
||||
uint16_t j0,j,idelta;
|
||||
@@ -69,122 +64,116 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
#else
|
||||
uint16_t i0 = dlsch->i0;
|
||||
#endif
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
|
||||
if (dlsch->harq_processes[harq_pid]->sib1_br_flag==1) Nacc=1;
|
||||
|
||||
#else
|
||||
|
||||
if (dlsch->sib1_br_flag==1) Nacc=1;
|
||||
|
||||
#endif
|
||||
else if (dlsch->rnti == 0xFFFF || dlsch->rnti == 0xFFFE) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
// Note: above SC-RNTI will also have to be added when/if implemented
|
||||
else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeA) Nacc=1;
|
||||
else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
|
||||
|
||||
#else
|
||||
// Note: above SC-RNTI will also have to be added when/if implemented
|
||||
else if (dlsch->CEmode == CEmodeA) Nacc=1;
|
||||
else if (dlsch->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
|
||||
|
||||
#endif
|
||||
|
||||
if (frame_parms->frame_type == FDD || Nacc == 1) idelta = 0;
|
||||
else idelta = Nacc-2;
|
||||
|
||||
j0 = (i0+idelta)/Nacc;
|
||||
j = (i - i0)/Nacc;
|
||||
#endif
|
||||
j = (i - i0)/Nacc;
|
||||
|
||||
// reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
if (mbsfn_flag == 0) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#ifdef PHY_TX_THREAD
|
||||
|
||||
if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) {
|
||||
#else
|
||||
|
||||
if (dlsch->i0 != 0xFFFF) {
|
||||
#endif
|
||||
// rule for BL/CE UEs from Section 6.3.1 in 36.211
|
||||
x2= (dlsch->rnti<<14) + (q<<13) + ((((j0+j)*Nacc)%10)<<9) + frame_parms->Nid_cell;
|
||||
|
||||
if ((frame&1023) < 200) LOG_D(PHY,"Scrambling init for (i0 %d, i %d, j0 %d, j %d, Nacc %d) => x2 %d\n",i0,i,j0,j,Nacc,x2);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
x2 = (dlsch->rnti<<14) + (q<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 for PDSCH
|
||||
} else
|
||||
x2 = (dlsch->rnti<<14) + (q<<13) + ((Ns>>1)<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1 for PDSCH
|
||||
} else {
|
||||
x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1 for PMCH
|
||||
}
|
||||
|
||||
#ifdef DEBUG_SCRAMBLING
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
printf("scrambling: i0 %d rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->i0,dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
|
||||
#else
|
||||
printf("scrambling: rnti %x, q %d, Ns %d, Nid_cell %d, G %d x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell, G, x2);
|
||||
#endif
|
||||
#endif
|
||||
s = lte_gold_generic(&x1, &x2, 1);
|
||||
|
||||
for (n=0; n<(1+(G>>5)); n++) {
|
||||
|
||||
#ifdef DEBUG_SCRAMBLING
|
||||
for (int k=0;k<32;k++) printf("scrambling %d : %d xor %d = %d\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
|
||||
#endif
|
||||
|
||||
|
||||
e[0] = (e[0]) ^ (s&1);
|
||||
e[1] = (e[1]) ^ ((s>>1)&1);
|
||||
e[2] = (e[2]) ^ ((s>>2)&1);
|
||||
e[3] = (e[3]) ^ ((s>>3)&1);
|
||||
e[4] = (e[4]) ^ ((s>>4)&1);
|
||||
e[5] = (e[5]) ^ ((s>>5)&1);
|
||||
e[6] = (e[6]) ^ ((s>>6)&1);
|
||||
e[7] = (e[7]) ^ ((s>>7)&1);
|
||||
e[8] = (e[8]) ^ ((s>>8)&1);
|
||||
e[9] = (e[9]) ^ ((s>>9)&1);
|
||||
e[10] = (e[10]) ^ ((s>>10)&1);
|
||||
e[11] = (e[11]) ^ ((s>>11)&1);
|
||||
e[12] = (e[12]) ^ ((s>>12)&1);
|
||||
e[13] = (e[13]) ^ ((s>>13)&1);
|
||||
e[14] = (e[14]) ^ ((s>>14)&1);
|
||||
e[15] = (e[15]) ^ ((s>>15)&1);
|
||||
e[16] = (e[16]) ^ ((s>>16)&1);
|
||||
e[17] = (e[17]) ^ ((s>>17)&1);
|
||||
e[18] = (e[18]) ^ ((s>>18)&1);
|
||||
e[19] = (e[19]) ^ ((s>>19)&1);
|
||||
e[20] = (e[20]) ^ ((s>>20)&1);
|
||||
e[21] = (e[21]) ^ ((s>>21)&1);
|
||||
e[22] = (e[22]) ^ ((s>>22)&1);
|
||||
e[23] = (e[23]) ^ ((s>>23)&1);
|
||||
e[24] = (e[24]) ^ ((s>>24)&1);
|
||||
e[25] = (e[25]) ^ ((s>>25)&1);
|
||||
e[26] = (e[26]) ^ ((s>>26)&1);
|
||||
e[27] = (e[27]) ^ ((s>>27)&1);
|
||||
e[28] = (e[28]) ^ ((s>>28)&1);
|
||||
e[29] = (e[29]) ^ ((s>>29)&1);
|
||||
e[30] = (e[30]) ^ ((s>>30)&1);
|
||||
e[31] = (e[31]) ^ ((s>>31)&1);
|
||||
|
||||
for (int k=0; k<32; k++) printf("scrambling %d : %d xor %d = %d\n",k+(n<<5),e[k],(s>>k)&1,e[k]^((s>>k)&1));
|
||||
|
||||
#endif
|
||||
e[0] = (e[0]) ^ (s&1);
|
||||
e[1] = (e[1]) ^ ((s>>1)&1);
|
||||
e[2] = (e[2]) ^ ((s>>2)&1);
|
||||
e[3] = (e[3]) ^ ((s>>3)&1);
|
||||
e[4] = (e[4]) ^ ((s>>4)&1);
|
||||
e[5] = (e[5]) ^ ((s>>5)&1);
|
||||
e[6] = (e[6]) ^ ((s>>6)&1);
|
||||
e[7] = (e[7]) ^ ((s>>7)&1);
|
||||
e[8] = (e[8]) ^ ((s>>8)&1);
|
||||
e[9] = (e[9]) ^ ((s>>9)&1);
|
||||
e[10] = (e[10]) ^ ((s>>10)&1);
|
||||
e[11] = (e[11]) ^ ((s>>11)&1);
|
||||
e[12] = (e[12]) ^ ((s>>12)&1);
|
||||
e[13] = (e[13]) ^ ((s>>13)&1);
|
||||
e[14] = (e[14]) ^ ((s>>14)&1);
|
||||
e[15] = (e[15]) ^ ((s>>15)&1);
|
||||
e[16] = (e[16]) ^ ((s>>16)&1);
|
||||
e[17] = (e[17]) ^ ((s>>17)&1);
|
||||
e[18] = (e[18]) ^ ((s>>18)&1);
|
||||
e[19] = (e[19]) ^ ((s>>19)&1);
|
||||
e[20] = (e[20]) ^ ((s>>20)&1);
|
||||
e[21] = (e[21]) ^ ((s>>21)&1);
|
||||
e[22] = (e[22]) ^ ((s>>22)&1);
|
||||
e[23] = (e[23]) ^ ((s>>23)&1);
|
||||
e[24] = (e[24]) ^ ((s>>24)&1);
|
||||
e[25] = (e[25]) ^ ((s>>25)&1);
|
||||
e[26] = (e[26]) ^ ((s>>26)&1);
|
||||
e[27] = (e[27]) ^ ((s>>27)&1);
|
||||
e[28] = (e[28]) ^ ((s>>28)&1);
|
||||
e[29] = (e[29]) ^ ((s>>29)&1);
|
||||
e[30] = (e[30]) ^ ((s>>30)&1);
|
||||
e[31] = (e[31]) ^ ((s>>31)&1);
|
||||
// This is not faster for some unknown reason
|
||||
// ((__m128i *)e)[0] = _mm_xor_si128(((__m128i *)e)[0],((__m128i *)scrambling_lut)[s&65535]);
|
||||
// ((__m128i *)e)[1] = _mm_xor_si128(((__m128i *)e)[1],((__m128i *)scrambling_lut)[s>>16]);
|
||||
|
||||
|
||||
|
||||
s = lte_gold_generic(&x1, &x2, 0);
|
||||
e += 32;
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void init_scrambling_lut(void) {
|
||||
|
||||
uint32_t s;
|
||||
int i=0,j;
|
||||
|
||||
for (s=0;s<=65535;s++) {
|
||||
for (j=0;j<16;j++) {
|
||||
for (s=0; s<=65535; s++) {
|
||||
for (j=0; j<16; j++) {
|
||||
scrambling_lut[i++] = (uint8_t)((s>>j)&1);
|
||||
}
|
||||
}
|
||||
@@ -194,11 +183,9 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int mbsfn_flag,
|
||||
LTE_UE_DLSCH_t *dlsch,
|
||||
int G,
|
||||
int16_t* llr,
|
||||
int16_t *llr,
|
||||
uint8_t q,
|
||||
uint8_t Ns)
|
||||
{
|
||||
|
||||
uint8_t Ns) {
|
||||
int i,j,k=0;
|
||||
// uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
@@ -212,14 +199,14 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1
|
||||
|
||||
#ifdef DEBUG_SCRAMBLING
|
||||
printf("unscrambling: rnti %x, q %d, Ns %d, Nid_cell %d G %d, x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell,G,x2);
|
||||
printf("unscrambling: rnti %x, q %d, Ns %d, Nid_cell %d G %d, x2 %x\n",dlsch->rnti,q,Ns,frame_parms->Nid_cell,G,x2);
|
||||
#endif
|
||||
s = lte_gold_generic(&x1, &x2, 1);
|
||||
|
||||
for (i=0; i<(1+(G>>5)); i++) {
|
||||
for (j=0; j<32; j++,k++) {
|
||||
#ifdef DEBUG_SCRAMBLING
|
||||
printf("unscrambling %d : %d xor %d =",k,llr[k],(s>>j)&1);
|
||||
printf("unscrambling %d : %d xor %d =",k,llr[k],(s>>j)&1);
|
||||
#endif
|
||||
llr[k] = ((2*((s>>j)&1))-1)*llr[k];
|
||||
#ifdef DEBUG_SCRAMBLING
|
||||
@@ -232,12 +219,11 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
void init_unscrambling_lut(void) {
|
||||
|
||||
uint32_t s;
|
||||
int i=0,j;
|
||||
|
||||
for (s=0;s<=65535;s++) {
|
||||
for (j=0;j<16;j++) {
|
||||
for (s=0; s<=65535; s++) {
|
||||
for (j=0; j<16; j++) {
|
||||
unscrambling_lut[i++] = (int16_t)((((s>>j)&1)<<1)-1);
|
||||
}
|
||||
}
|
||||
|
||||
+116
-141
@@ -49,22 +49,18 @@
|
||||
//#define DEBUG_DCI_DECODING 1
|
||||
//#define DEBUG_PHY
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) {
|
||||
|
||||
void generate_edci_top(PHY_VARS_eNB *eNB, int frame, int subframe) {
|
||||
}
|
||||
|
||||
void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, uint16_t i, uint8_t * e, uint32_t length)
|
||||
{
|
||||
void mpdcch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, mDCI_ALLOC_t *mdci, uint16_t i, uint8_t *e, uint32_t length) {
|
||||
int n;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s = 0;
|
||||
uint8_t Nacc = 4;
|
||||
uint16_t j0, j, idelta;
|
||||
uint16_t i0 = mdci->i0;
|
||||
|
||||
// Note: we could actually not do anything if i-i0 < Nacc, save it for later
|
||||
|
||||
reset = 1;
|
||||
// x1 is set in lte_gold_generic
|
||||
|
||||
@@ -80,12 +76,11 @@ void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, ui
|
||||
|
||||
j0 = (i0 + idelta) / Nacc;
|
||||
j = (i - i0) / Nacc;
|
||||
|
||||
|
||||
// rule for BL/CE UEs from Section 6.8.B2 in 36.211
|
||||
x2 = ((((j0 + j) * Nacc) % 10) << 9) + mdci->dmrs_scrambling_init;
|
||||
LOG_D(PHY,"MPDCCH cinit = %x (mdci->dmrs_scrambling_init = %d), scrambling %d encoded DCI bits\n",
|
||||
x2,mdci->dmrs_scrambling_init,length);
|
||||
x2,mdci->dmrs_scrambling_init,length);
|
||||
|
||||
for (n = 0; n < length; n++) {
|
||||
if ((n & 0x1f) == 0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
@@ -94,7 +89,6 @@ void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, ui
|
||||
}
|
||||
|
||||
e[n] = (e[n] & 1) ^ ((s >> (n & 0x1f)) & 1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,23 +99,23 @@ void mpdcch_scrambling(LTE_DL_FRAME_PARMS * frame_parms, mDCI_ALLOC_t * mdci, ui
|
||||
// Total = 648+216 = 864 REs = 1728 bits
|
||||
static uint16_t mpdcch5ss1tab[864];
|
||||
|
||||
void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
|
||||
int l, k, kmod, re=0;
|
||||
|
||||
LOG_D(PHY, "Inititalizing mpdcchss15tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
|
||||
for (l = 1; l < 14; l++) {
|
||||
for (k = 0; k < 72; k++) {
|
||||
kmod = k % 12;
|
||||
|
||||
if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9)) {
|
||||
mpdcch5ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
} else if ((kmod == 0) || (kmod == 5) || (kmod == 10)) {
|
||||
mpdcch5ss1tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
mpdcch5ss1tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AssertFatal(re == 864, "RE count not equal to 864 (%d)\n", re);
|
||||
}
|
||||
|
||||
@@ -132,28 +126,31 @@ void init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
// Total = 576+216 = 792 REs = 1584 bits
|
||||
static uint16_t mpdcch5ss2tab[792];
|
||||
|
||||
void init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
void init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
|
||||
int l, k, kmod, re=0;
|
||||
int nushift = eNB->frame_parms.Nid_cell % 6;
|
||||
int nushiftp3 = (eNB->frame_parms.Nid_cell+3) % 6;
|
||||
// NOTE : THIS IS FOR TM1 ONLY FOR NOW!!!!!!!
|
||||
LOG_D(PHY, "Inititalizing mpdcch5ss2tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
|
||||
for (l = 2; l < 14; l++) {
|
||||
for (k = 0; k < 72; k++) {
|
||||
kmod = k % 12;
|
||||
if ((((l == 4)||(l==11)) && (kmod != nushiftp3) && (kmod != (nushiftp3+6))) ||
|
||||
((l == 7) && (kmod != nushift) &&(kmod != (nushift+6)))) { // CS RS
|
||||
mpdcch5ss2tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
|
||||
if ((((l == 4)||(l==11)) && (kmod != nushiftp3) && (kmod != (nushiftp3+6))) ||
|
||||
((l == 7) && (kmod != nushift) &&(kmod != (nushift+6)))) { // CS RS
|
||||
mpdcch5ss2tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
}
|
||||
if (((l!=4)&&(l!=7)&&(l!=11)) &&
|
||||
(((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9))) {
|
||||
mpdcch5ss2tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
|
||||
if (((l!=4)&&(l!=7)&&(l!=11)) &&
|
||||
(((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9))) {
|
||||
mpdcch5ss2tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AssertFatal(re == 684, "RE count not equal to 684\n");
|
||||
}
|
||||
|
||||
@@ -163,22 +160,23 @@ void init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
// 4 symbols with DMRS (3 REs stolen per symbol = 4*9*6 REs = 216 REs
|
||||
// Total = 504+216 = 720 REs = 1440 bits
|
||||
static uint16_t mpdcch5ss3tab[720];
|
||||
void init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
void init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
|
||||
int l, k, kmod, re=0;
|
||||
|
||||
LOG_D(PHY, "Inititalizing mpdcch5ss3tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
|
||||
for (l = 3; l < 14; l++) {
|
||||
for (k = 0; k < 72; k++) {
|
||||
kmod = k % 12;
|
||||
|
||||
if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (kmod == 2) || (kmod == 3) || (kmod == 4) || (kmod == 7) || (kmod == 8) || (kmod == 9)) {
|
||||
mpdcch5ss3tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
mpdcch5ss3tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
} else if ((kmod == 0) || (kmod == 5) || (kmod == 10)) {
|
||||
mpdcch5ss3tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
mpdcch5ss3tab[re++] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AssertFatal(re == 720, "RE count not equal to 792\n");
|
||||
}
|
||||
|
||||
@@ -189,20 +187,21 @@ void init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
// Total = 432+144 = 576 = 16CCE*36RE/CCE
|
||||
static uint16_t mpdcch3ss1tab[576];
|
||||
|
||||
void init_mpdcch3ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
void init_mpdcch3ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
|
||||
int l, k, kmod, re=0;
|
||||
|
||||
LOG_D(PHY, "Inititalizing mpdcch3ss1tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
|
||||
for (l = 1, re = 0; l < 14; l++) {
|
||||
for (k = 0; k < 48; k++) {
|
||||
kmod = k % 12;
|
||||
|
||||
if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (((l == 5) || (l == 6) || (l == 12) || (l == 13)) && (kmod != 0) && (kmod != 5) && (kmod != 10))) {
|
||||
mpdcch3ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
mpdcch3ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AssertFatal(re == 576, "RE count not equal to 864\n");
|
||||
}
|
||||
|
||||
@@ -213,34 +212,33 @@ void init_mpdcch3ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
// Total = 216+72 = 288 = 8CCE*36RE/CCE
|
||||
static uint16_t mpdcch2ss1tab[288];
|
||||
|
||||
void init_mpdcch2ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
void init_mpdcch2ss1tab_normal_regular_subframe_evenNRBDL(PHY_VARS_eNB *eNB) {
|
||||
int l, k, kmod, re=0;
|
||||
|
||||
LOG_D(PHY, "Inititalizing mpdcch2ss1tab for normal prefix, normal prefix, no PSS/SSS/PBCH, even N_RB_DL\n");
|
||||
|
||||
for (l = 1, re = 0; l < 14; l++) {
|
||||
for (k = 0; k < 24; k++) {
|
||||
kmod = k % 12;
|
||||
|
||||
if (((l != 5) && (l != 6) && (l != 12) && (l != 13)) || (((l == 5) || (l == 6) || (l == 12) || (l == 13)) && (kmod != 0) && (kmod != 5) && (kmod != 10))) {
|
||||
mpdcch2ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
mpdcch2ss1tab[re] = (l * eNB->frame_parms.ofdm_symbol_size) + k;
|
||||
re++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
AssertFatal(re == 288, "RE count not equal to 288\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
extern uint8_t *generate_dci0(uint8_t * dci, uint8_t * e, uint8_t DCI_LENGTH, uint16_t coded_bits, uint16_t rnti);
|
||||
extern uint8_t *generate_dci0(uint8_t *dci, uint8_t *e, uint8_t DCI_LENGTH, uint16_t coded_bits, uint16_t rnti);
|
||||
|
||||
|
||||
uint16_t mpdcch_dmrs_tab[12 * 6];
|
||||
|
||||
void init_mpdcch_dmrs_tab(uint16_t oss)
|
||||
{
|
||||
|
||||
void init_mpdcch_dmrs_tab(uint16_t oss) {
|
||||
int re = 5 * oss;
|
||||
int pos = 0;
|
||||
|
||||
@@ -250,6 +248,7 @@ void init_mpdcch_dmrs_tab(uint16_t oss)
|
||||
mpdcch_dmrs_tab[pos++] = re + 5;
|
||||
mpdcch_dmrs_tab[pos++] = re + 10;
|
||||
}
|
||||
|
||||
if (symb == 0)
|
||||
re = 6 * oss;
|
||||
else if (symb == 1)
|
||||
@@ -257,12 +256,9 @@ void init_mpdcch_dmrs_tab(uint16_t oss)
|
||||
else if (symb == 2)
|
||||
re = 13 * oss;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, int32_t ** txdataF)
|
||||
{
|
||||
|
||||
void generate_mdci_top(PHY_VARS_eNB *eNB, int frame, int subframe, int16_t amp, int32_t **txdataF) {
|
||||
LTE_eNB_MPDCCH *mpdcch = &eNB->mpdcch_vars[subframe & 1];
|
||||
mDCI_ALLOC_t *mdci;
|
||||
int coded_bits;
|
||||
@@ -270,40 +266,30 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
|
||||
int i;
|
||||
int gain_lin_QPSK;
|
||||
uint16_t *mpdcchtab;
|
||||
|
||||
uint32_t x1, x2, s = 0;
|
||||
uint8_t Nacc = 4;
|
||||
uint16_t j0, j, idelta;
|
||||
uint16_t i0;
|
||||
|
||||
int off=0;
|
||||
|
||||
// Assumption: only handle a single MPDCCH per narrowband
|
||||
|
||||
int nsymb = (fp->Ncp==0) ? 14:12;
|
||||
|
||||
int symbol_offset = (uint32_t)fp->ofdm_symbol_size*(subframe*nsymb);
|
||||
|
||||
int wp[2][4] = {{1,1,1,1},{1,-1,1,-1}};
|
||||
int *w;
|
||||
|
||||
LOG_D(PHY, "generate_mdci_top: num_dci %d\n", mpdcch->num_dci);
|
||||
|
||||
for (i = 0; i < mpdcch->num_dci; i++) {
|
||||
mdci = &mpdcch->mdci_alloc[i];
|
||||
|
||||
AssertFatal(fp->frame_type == FDD, "TDD is not yet supported for MPDCCH\n");
|
||||
AssertFatal(fp->Ncp == NORMAL, "Extended Prefix not yet supported for MPDCCH\n");
|
||||
AssertFatal(mdci->L <= 24, "L is %d\n", mdci->L);
|
||||
AssertFatal(fp->N_RB_DL == 50 || fp->N_RB_DL == 100, "Only N_RB_DL=50,100 for MPDCCH\n");
|
||||
// Force MPDDCH format 5
|
||||
AssertFatal(mdci->number_of_prb_pairs == 6, "2 or 4 PRB pairs not support yet for MPDCCH\n");
|
||||
|
||||
// These are to avoid unimplemented things
|
||||
AssertFatal(mdci->ce_mode == 1, "CE mode (%d) B not activated yet\n", mdci->ce_mode);
|
||||
AssertFatal(mdci->L == 24, "Only 2+4 and aggregation 24 for now\n");
|
||||
int a_index=mdci->rnti & 3;
|
||||
|
||||
i0 = mdci->i0;
|
||||
// antenna index
|
||||
|
||||
@@ -319,27 +305,20 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
|
||||
} else
|
||||
AssertFatal(1 == 0, "Illegal combination start_symbol %d, a_index %d\n", mdci->start_symbol, a_index);
|
||||
|
||||
LOG_D(PHY, "mdci %d, length %d: rnti %x, L %d, prb_pairs %d, ce_mode %d, transmission type %s, i0 %d, ss %d ,coded_bits %d\n",
|
||||
i, mdci->dci_length,mdci->rnti,
|
||||
mdci->L, mdci->number_of_prb_pairs,
|
||||
mdci->ce_mode,
|
||||
mdci->transmission_type == 1? "dist" : "loc",
|
||||
mdci->i0, mdci->start_symbol,
|
||||
coded_bits);
|
||||
|
||||
LOG_D(PHY, "mdci %d, length %d: rnti %x, L %d, prb_pairs %d, ce_mode %d, transmission type %s, i0 %d, ss %d ,coded_bits %d\n",
|
||||
i, mdci->dci_length,mdci->rnti,
|
||||
mdci->L, mdci->number_of_prb_pairs,
|
||||
mdci->ce_mode,
|
||||
mdci->transmission_type == 1? "dist" : "loc",
|
||||
mdci->i0, mdci->start_symbol,
|
||||
coded_bits);
|
||||
// Note: We only have to run this every Nacc subframes during repetitions, data and scrambling are constant, but we do it for now to simplify during testing
|
||||
|
||||
generate_dci0(mdci->dci_pdu, mpdcch->e, mdci->dci_length, coded_bits, mdci->rnti);
|
||||
|
||||
|
||||
|
||||
// scrambling
|
||||
uint16_t absSF = (frame * 10) + subframe;
|
||||
|
||||
AssertFatal(absSF < 10240, "Absolute subframe %d = %d*10 + %d > 10239\n", absSF, frame, subframe);
|
||||
|
||||
mpdcch_scrambling(fp, mdci, absSF, mpdcch->e, coded_bits);
|
||||
|
||||
|
||||
// Modulation for PDCCH
|
||||
if (fp->nb_antenna_ports_eNB == 1)
|
||||
gain_lin_QPSK = (int16_t) ((amp * ONE_OVER_SQRT2_Q15) >> 15);
|
||||
@@ -347,37 +326,39 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
|
||||
gain_lin_QPSK = amp / 2;
|
||||
|
||||
uint8_t *e_ptr = mpdcch->e;
|
||||
|
||||
// if (mdci->transmission_type==0) nprime=mdci->rnti&3; // for Localized 2+4 we use 6.8B.5 rule
|
||||
// map directly to one antenna port for now
|
||||
// Note: aside from the antenna port mapping, there is no difference between localized and distributed transmission for MPDCCH format 5
|
||||
|
||||
// first RE of narrowband
|
||||
// mpdcchtab5 below contains the mapping from each coded symbol to relative RE avoiding the DMRS
|
||||
|
||||
int nb_i0;
|
||||
switch (fp->N_RB_DL) {
|
||||
|
||||
case 6:
|
||||
case 25:
|
||||
nb_i0 = 0;
|
||||
break;
|
||||
case 15:
|
||||
case 50:
|
||||
case 75:
|
||||
nb_i0 = 1;
|
||||
break;
|
||||
case 100:
|
||||
nb_i0 = 2;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1 == 0, "Illegal N_RB_DL %d\n", fp->N_RB_DL);
|
||||
break;
|
||||
switch (fp->N_RB_DL) {
|
||||
case 6:
|
||||
case 25:
|
||||
nb_i0 = 0;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
case 50:
|
||||
case 75:
|
||||
nb_i0 = 1;
|
||||
break;
|
||||
|
||||
case 100:
|
||||
nb_i0 = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1 == 0, "Illegal N_RB_DL %d\n", fp->N_RB_DL);
|
||||
break;
|
||||
}
|
||||
|
||||
int re_offset = fp->first_carrier_offset + (12 * nb_i0) + (mdci->narrowband * 12 * 6);
|
||||
|
||||
if (re_offset > fp->ofdm_symbol_size)
|
||||
re_offset -= (fp->ofdm_symbol_size - 1);
|
||||
|
||||
int32_t *txF = &txdataF[0][symbol_offset+re_offset];
|
||||
int32_t yIQ;
|
||||
|
||||
@@ -388,14 +369,15 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
|
||||
((int16_t *) & yIQ)[1] = (*e_ptr == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
|
||||
e_ptr++;
|
||||
txF[mpdcchtab[i]] = yIQ;
|
||||
/*
|
||||
/*
|
||||
LOG_I(PHY,"Frame %d, subframe %d: mpdcch pos %d (%d,%d) => (%d,%d)\n",
|
||||
frame,subframe,i,mpdcchtab[i]+re_offset,mpdcchtab[i]/fp->ofdm_symbol_size,
|
||||
((int16_t *) & yIQ)[0],((int16_t *) & yIQ)[1]);*/
|
||||
frame,subframe,i,mpdcchtab[i]+re_offset,mpdcchtab[i]/fp->ofdm_symbol_size,
|
||||
((int16_t *) & yIQ)[0],((int16_t *) & yIQ)[1]);*/
|
||||
}
|
||||
|
||||
if (mdci->transmission_type == 1) w=0; // distributed
|
||||
else w = wp[a_index&1];
|
||||
|
||||
// pilot scrambling initiatlization (note: this is for a single repetition)
|
||||
|
||||
// x1 is set in lte_gold_generic
|
||||
@@ -414,70 +396,64 @@ void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp,
|
||||
|
||||
j0 = (i0 + idelta) / Nacc;
|
||||
j = (absSF - i0) / Nacc;
|
||||
|
||||
|
||||
|
||||
uint32_t a = ((((j0 + j) * Nacc) % 10) + 1);
|
||||
uint32_t b = ((mdci->dmrs_scrambling_init << 1) + 1) << 16;
|
||||
x2 = a * b;
|
||||
x2 = x2 + 2;
|
||||
LOG_D(PHY, "mpdcch_dmrs cinit %x (a=%d,b=%d,i0=%d,j0=%d)\n", x2,a,b,i0,j0);
|
||||
|
||||
// add MPDCCH pilots
|
||||
int reset = 1;
|
||||
|
||||
int first_prb = (mdci->narrowband*6) + nb_i0;
|
||||
int last_prb = (mdci->narrowband*6) + nb_i0 + 5;
|
||||
int soffset[4] = {5,6,12,13};
|
||||
|
||||
for (int lprime=0,i=0; lprime<4; lprime++) {
|
||||
for (int nprb=0; nprb<110; nprb++) {
|
||||
if (nprb<fp->N_RB_DL) {
|
||||
re_offset = fp->first_carrier_offset + (12 * nprb);
|
||||
|
||||
for (int lprime=0,i=0;lprime<4;lprime++) {
|
||||
for (int nprb=0;nprb<110;nprb++) {
|
||||
if (nprb<fp->N_RB_DL) {
|
||||
re_offset = fp->first_carrier_offset + (12 * nprb);
|
||||
if (re_offset > fp->ofdm_symbol_size)
|
||||
re_offset -= (fp->ofdm_symbol_size - 1);
|
||||
txF = &txdataF[0][symbol_offset + re_offset + fp->ofdm_symbol_size*soffset[lprime]];
|
||||
}
|
||||
for (int mprime=0;mprime<3;mprime++,i+=2) {
|
||||
|
||||
if ((i & 0x1f) == 0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
}
|
||||
if (re_offset > fp->ofdm_symbol_size)
|
||||
re_offset -= (fp->ofdm_symbol_size - 1);
|
||||
|
||||
// select PRBs corresponding to narrowband
|
||||
if ((nprb>= first_prb) &&
|
||||
(nprb<= last_prb)) {
|
||||
((int16_t *) & yIQ)[0] = (((s >> (i & 0x1f)) & 1) == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
|
||||
((int16_t *) & yIQ)[1] = (((s >> ((i + 1) & 0x1f)) & 1) == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
|
||||
AssertFatal(mdci->transmission_type==1,"transmission_type %d!=1, handle this ...\n",mdci->transmission_type);
|
||||
if (mdci->transmission_type==1) { // same thing on both 107 and 109
|
||||
txF[(5*mprime)] = yIQ;
|
||||
txF[1+(5*mprime)] = yIQ;
|
||||
}
|
||||
else { // put on selected antenna port with w sequence
|
||||
txF = &txdataF[0][symbol_offset + re_offset + fp->ofdm_symbol_size*soffset[lprime]];
|
||||
}
|
||||
|
||||
if (((mprime+nprb)&1) == 0)
|
||||
txF[off+(5*mprime)] = yIQ*w[lprime];
|
||||
else
|
||||
txF[off+(5*mprime)] = yIQ*w[3-lprime];
|
||||
}
|
||||
/*
|
||||
LOG_I(PHY, "mpdcch_dmrs pos (dist %d, l %d,nprb %d,mprime %d) %d => (%d,%d)\n",
|
||||
mdci->transmission_type, soffset[lprime],nprb,mprime,
|
||||
re_offset + fp->ofdm_symbol_size*soffset[lprime]+(5*mprime),
|
||||
((int16_t *) & yIQ)[0], ((int16_t *) & yIQ)[1]);*/
|
||||
} // narrowband condition
|
||||
} // RE (m') loop
|
||||
for (int mprime=0; mprime<3; mprime++,i+=2) {
|
||||
if ((i & 0x1f) == 0) {
|
||||
s = lte_gold_generic(&x1, &x2, reset);
|
||||
reset = 0;
|
||||
}
|
||||
|
||||
// select PRBs corresponding to narrowband
|
||||
if ((nprb>= first_prb) &&
|
||||
(nprb<= last_prb)) {
|
||||
((int16_t *) & yIQ)[0] = (((s >> (i & 0x1f)) & 1) == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
|
||||
((int16_t *) & yIQ)[1] = (((s >> ((i + 1) & 0x1f)) & 1) == 1) ? -gain_lin_QPSK : gain_lin_QPSK;
|
||||
AssertFatal(mdci->transmission_type==1,"transmission_type %d!=1, handle this ...\n",mdci->transmission_type);
|
||||
|
||||
if (mdci->transmission_type==1) { // same thing on both 107 and 109
|
||||
txF[(5*mprime)] = yIQ;
|
||||
txF[1+(5*mprime)] = yIQ;
|
||||
} else { // put on selected antenna port with w sequence
|
||||
if (((mprime+nprb)&1) == 0)
|
||||
txF[off+(5*mprime)] = yIQ*w[lprime];
|
||||
else
|
||||
txF[off+(5*mprime)] = yIQ*w[3-lprime];
|
||||
}
|
||||
|
||||
/*
|
||||
LOG_I(PHY, "mpdcch_dmrs pos (dist %d, l %d,nprb %d,mprime %d) %d => (%d,%d)\n",
|
||||
mdci->transmission_type, soffset[lprime],nprb,mprime,
|
||||
re_offset + fp->ofdm_symbol_size*soffset[lprime]+(5*mprime),
|
||||
((int16_t *) & yIQ)[0], ((int16_t *) & yIQ)[1]);*/
|
||||
} // narrowband condition
|
||||
} // RE (m') loop
|
||||
} // nprb loop
|
||||
} // symbol (l') loop
|
||||
} // num_dci loop
|
||||
}
|
||||
|
||||
void init_mpdcch(PHY_VARS_eNB * eNB)
|
||||
{
|
||||
|
||||
void init_mpdcch(PHY_VARS_eNB *eNB) {
|
||||
init_mpdcch5ss1tab_normal_regular_subframe_evenNRBDL(eNB);
|
||||
init_mpdcch5ss2tab_normal_regular_subframe_evenNRBDL(eNB);
|
||||
init_mpdcch5ss3tab_normal_regular_subframe_evenNRBDL(eNB);
|
||||
@@ -486,4 +462,3 @@ void init_mpdcch(PHY_VARS_eNB * eNB)
|
||||
init_mpdcch_dmrs_tab(eNB->frame_parms.ofdm_symbol_size);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -34,33 +34,25 @@
|
||||
#include "PHY/phy_extern.h"
|
||||
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
|
||||
|
||||
unsigned char get_Qm(unsigned char I_MCS)
|
||||
{
|
||||
|
||||
unsigned char get_Qm(unsigned char I_MCS) {
|
||||
if (I_MCS < 10)
|
||||
return(2);
|
||||
else if (I_MCS < 17)
|
||||
return(4);
|
||||
else
|
||||
return(6);
|
||||
|
||||
}
|
||||
|
||||
unsigned char get_Qm_ul(unsigned char I_MCS)
|
||||
{
|
||||
|
||||
unsigned char get_Qm_ul(unsigned char I_MCS) {
|
||||
if (I_MCS < 11)
|
||||
return(2);
|
||||
else if (I_MCS < 21)
|
||||
return(4);
|
||||
else
|
||||
return(6);
|
||||
|
||||
}
|
||||
|
||||
unsigned char get_I_TBS(unsigned char I_MCS)
|
||||
{
|
||||
|
||||
unsigned char get_I_TBS(unsigned char I_MCS) {
|
||||
if (I_MCS < 10)
|
||||
return(I_MCS);
|
||||
else if (I_MCS == 10)
|
||||
@@ -70,12 +62,9 @@ unsigned char get_I_TBS(unsigned char I_MCS)
|
||||
else if (I_MCS == 17)
|
||||
return(15);
|
||||
else return(I_MCS-2);
|
||||
|
||||
}
|
||||
|
||||
unsigned char get_I_TBS_UL(unsigned char I_MCS)
|
||||
{
|
||||
|
||||
unsigned char get_I_TBS_UL(unsigned char I_MCS) {
|
||||
if (I_MCS <= 10)
|
||||
return(I_MCS);
|
||||
else if (I_MCS == 10)
|
||||
@@ -83,11 +72,9 @@ unsigned char get_I_TBS_UL(unsigned char I_MCS)
|
||||
else if (I_MCS < 21)
|
||||
return(I_MCS-1);
|
||||
else return(I_MCS-2);
|
||||
|
||||
}
|
||||
|
||||
unsigned char I_TBS2I_MCS(unsigned char I_TBS)
|
||||
{
|
||||
unsigned char I_TBS2I_MCS(unsigned char I_TBS) {
|
||||
unsigned char I_MCS = -1;
|
||||
|
||||
///note: change from <= to < to go from choosing higher modulation rather than high code-rate
|
||||
@@ -107,9 +94,7 @@ unsigned char I_TBS2I_MCS(unsigned char I_TBS)
|
||||
return I_MCS;
|
||||
}
|
||||
|
||||
uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb)
|
||||
{
|
||||
|
||||
uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb) {
|
||||
uint32_t TBS;
|
||||
|
||||
if ((nb_rb > 0) && (mcs < 29)) {
|
||||
@@ -121,9 +106,7 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb)
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
|
||||
{
|
||||
|
||||
uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb) {
|
||||
uint32_t TBS = 0;
|
||||
|
||||
if ((nb_rb > 0) && (mcs < 29)) {
|
||||
@@ -136,12 +119,9 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb)
|
||||
}
|
||||
|
||||
|
||||
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol)
|
||||
{
|
||||
|
||||
int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe,uint8_t symbol) {
|
||||
int rb,re_pbch_sss=0;
|
||||
int rb_alloc_ind,nsymb;
|
||||
|
||||
nsymb = (frame_parms->Ncp==NORMAL) ? 14 : 12;
|
||||
|
||||
// printf("adjust_G2 : symbol %d, subframe %d\n",symbol,subframe);
|
||||
@@ -178,11 +158,9 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
|
||||
}
|
||||
|
||||
if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL
|
||||
|
||||
for (rb=((frame_parms->N_RB_DL>>1)-3);
|
||||
rb<=((frame_parms->N_RB_DL>>1)+3);
|
||||
rb++) {
|
||||
|
||||
if (rb < 32)
|
||||
rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
|
||||
else if (rb < 64)
|
||||
@@ -206,7 +184,6 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
|
||||
for (rb=((frame_parms->N_RB_DL>>1)-3);
|
||||
rb<((frame_parms->N_RB_DL>>1)+3);
|
||||
rb++) {
|
||||
|
||||
if (rb < 32)
|
||||
rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
|
||||
else if (rb < 64)
|
||||
@@ -228,22 +205,17 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
|
||||
return(re_pbch_sss);
|
||||
}
|
||||
|
||||
int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe)
|
||||
{
|
||||
|
||||
int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_order,uint8_t subframe) {
|
||||
int rb,re_pbch_sss=0;
|
||||
uint8_t rb_alloc_ind;
|
||||
|
||||
if ((subframe!=0) && (subframe!=5) && (subframe!=6)) // if not PBCH/SSS/PSS or SSS/PSS
|
||||
return(0);
|
||||
|
||||
|
||||
if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL
|
||||
|
||||
for (rb=((frame_parms->N_RB_DL>>1)-3);
|
||||
rb<=((frame_parms->N_RB_DL>>1)+3);
|
||||
rb++) {
|
||||
|
||||
if (rb < 32)
|
||||
rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
|
||||
else if (rb < 64)
|
||||
@@ -305,7 +277,6 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
|
||||
//SISO so PBCH 3+(5/6) symbols, PSS+SSS 2symbols REs => (35/6)*re_pbch_sss for normal CP,
|
||||
// 2+10/6 symbols, SSS+PSS 2 symbols => (34/6)*re_pbch_sss for ext. CP
|
||||
return((-frame_parms->Ncp+35)*re_pbch_sss * mod_order/6);
|
||||
|
||||
}
|
||||
} else if (subframe == 5) // SSS+PSS for FDD, SSS for TDD
|
||||
return(((frame_parms->frame_type==FDD)?2:1)*re_pbch_sss * 1 * mod_order);
|
||||
@@ -315,8 +286,7 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
|
||||
return(0);
|
||||
}
|
||||
|
||||
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode)
|
||||
{
|
||||
int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode) {
|
||||
int G_adj;
|
||||
|
||||
if (is_pmch_subframe(frame,subframe,frame_parms) == 0) {
|
||||
@@ -327,7 +297,7 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint
|
||||
// PDDDPDD PDDDPDD - 13 PDSCH symbols, 10 full, 3 w/ pilots = 10*12 + 3*8
|
||||
// PCDDPDD PDDDPDD - 12 PDSCH symbols, 9 full, 3 w/ pilots = 9*12 + 3*8
|
||||
// PCCDPDD PDDDPDD - 11 PDSCH symbols, 8 full, 3 w/pilots = 8*12 + 3*8
|
||||
if (beamforming_mode==0 && frame_parms->nb_antenna_ports_eNB!=1)
|
||||
if (beamforming_mode==0 && frame_parms->nb_antenna_ports_eNB!=1)
|
||||
return((((int)nb_rb * mod_order * ((11-num_pdcch_symbols)*12 + 3*8)) - G_adj)*Nl);
|
||||
else if(beamforming_mode==7)
|
||||
return(((int)nb_rb * mod_order * ((7-num_pdcch_symbols)*12 + 3*10 + 4*9)) - G_adj);
|
||||
@@ -349,11 +319,9 @@ int get_G(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint
|
||||
}
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode)
|
||||
{
|
||||
//int G_adj;
|
||||
|
||||
int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb_alloc,uint8_t mod_order,uint8_t Nl,uint8_t num_pdcch_symbols,int frame,uint8_t subframe,uint8_t beamforming_mode) {
|
||||
//int G_adj;
|
||||
/*if (is_pmch_subframe(frame,subframe,frame_parms) == 0) {
|
||||
G_adj= adjust_G(frame_parms,rb_alloc,mod_order,subframe);
|
||||
|
||||
@@ -362,7 +330,7 @@ int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb
|
||||
// PDDDPDD PDDDPDD - 13 PDSCH symbols, 10 full, 3 w/ pilots = 10*12 + 3*8
|
||||
// PCDDPDD PDDDPDD - 12 PDSCH symbols, 9 full, 3 w/ pilots = 9*12 + 3*8
|
||||
// PCCDPDD PDDDPDD - 11 PDSCH symbols, 8 full, 3 w/pilots = 8*12 + 3*8
|
||||
if (beamforming_mode==0 && frame_parms->nb_antenna_ports_eNB!=1)
|
||||
if (beamforming_mode==0 && frame_parms->nb_antenna_ports_eNB!=1)
|
||||
return((((int)nb_rb * mod_order * ((11-num_pdcch_symbols)*12 + 3*8)) - G_adj)*Nl);
|
||||
else if(beamforming_mode==7)
|
||||
return(((int)nb_rb * mod_order * ((7-num_pdcch_symbols)*12 + 3*10 + 4*9)) - G_adj);
|
||||
@@ -384,15 +352,14 @@ int get_G_khz_1dot25(LTE_DL_FRAME_PARMS *frame_parms,uint16_t nb_rb,uint32_t *rb
|
||||
}*/
|
||||
return((int)frame_parms->N_RB_DL * mod_order * 120);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// following function requires dlsch_tbs_full.h
|
||||
#include "PHY/LTE_TRANSPORT/dlsch_tbs_full.h"
|
||||
|
||||
unsigned char SE2I_TBS(float SE,
|
||||
unsigned char N_PRB,
|
||||
unsigned char symbPerRB)
|
||||
{
|
||||
unsigned char symbPerRB) {
|
||||
unsigned char I_TBS= -1;
|
||||
int throughPutGoal = 0;
|
||||
short diffOld = TBStable[0][N_PRB-1] - throughPutGoal; // always positive because of unsigned arithmetic
|
||||
@@ -427,9 +394,7 @@ unsigned char SE2I_TBS(float SE,
|
||||
|
||||
//added for ALU icic purpose
|
||||
|
||||
uint8_t Get_SB_size(uint8_t n_rb_dl)
|
||||
{
|
||||
|
||||
uint8_t Get_SB_size(uint8_t n_rb_dl) {
|
||||
if(n_rb_dl<27)
|
||||
return 4;
|
||||
else if(n_rb_dl<64)
|
||||
|
||||
@@ -35,78 +35,97 @@
|
||||
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int is_fembms_cas_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms){
|
||||
uint32_t period;
|
||||
if(frame_parms->NonMBSFN_config_flag ) {
|
||||
period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
|
||||
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
|
||||
switch (subframe) {
|
||||
|
||||
int is_fembms_cas_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
uint32_t period;
|
||||
|
||||
if(frame_parms->NonMBSFN_config_flag ) {
|
||||
period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
|
||||
|
||||
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
|
||||
switch (subframe) {
|
||||
case 0:
|
||||
return(1); //This should be CAS
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int is_fembms_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
uint32_t period;
|
||||
|
||||
if(frame_parms->NonMBSFN_config_flag ) {
|
||||
period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
|
||||
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
|
||||
switch (subframe) {
|
||||
case 1:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x100) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 2:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x80) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 3:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x40) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 4:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x20) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 5:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x10) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 6:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x8) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 7:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x4) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 8:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x2) > 0)
|
||||
return(1);
|
||||
break;
|
||||
case 9:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x1) > 0)
|
||||
return(1);
|
||||
break;
|
||||
}
|
||||
} else { //Then regular MBSFN FeMBMS subframe
|
||||
return(1);
|
||||
return(1); //This should be CAS
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int is_fembms_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
uint32_t period;
|
||||
|
||||
if(frame_parms->NonMBSFN_config_flag ) {
|
||||
period = 4<<frame_parms->NonMBSFN_config.radioframeAllocationPeriod;
|
||||
|
||||
if ((frame % period) == frame_parms->NonMBSFN_config.radioframeAllocationOffset) {
|
||||
switch (subframe) {
|
||||
case 1:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x100) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x80) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x40) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x20) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x10) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x8) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x4) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x2) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if ((frame_parms->NonMBSFN_config.non_mbsfn_SubframeConfig & 0x1) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
}
|
||||
} else { //Then regular MBSFN FeMBMS subframe
|
||||
return(1);
|
||||
}
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
|
||||
int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
uint32_t period;
|
||||
uint8_t i;
|
||||
uint8_t j;
|
||||
@@ -121,163 +140,160 @@ int is_pmch_subframe(uint32_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_par
|
||||
if ((frame % period) == frame_parms->MBSFN_config[i].radioframeAllocationOffset) {
|
||||
if (frame_parms->frame_type == FDD) {
|
||||
switch (subframe) {
|
||||
|
||||
case 1:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF1) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF2) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF3) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF6) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF7) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF8) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (subframe) {
|
||||
case 3:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF3) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF4) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF7) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF8) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF9) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else { // handle 4 frames case
|
||||
|
||||
for(j=0;j<4;j++) {
|
||||
if ((frame % period) == (frame_parms->MBSFN_config[i].radioframeAllocationOffset + j)) {
|
||||
if (frame_parms->frame_type == FDD) {
|
||||
switch (subframe) {
|
||||
case 1:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x800000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x800000>>(j*6));
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF1) > 0)
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x400000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x400000>>(j*6));
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF2) > 0)
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x200000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x200000>>(j*6));
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF3) > 0)
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x100000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x100000>>(j*6));
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF6) > 0)
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x80000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x80000>>(j*6));
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF7) > 0)
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x40000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x40000>>(j*6));
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_FDD_SF8) > 0)
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (subframe) {
|
||||
}
|
||||
} else {
|
||||
switch (subframe) {
|
||||
case 3:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF3) > 0)
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF3) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF4) > 0)
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF4) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF7) > 0)
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF7) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF8) > 0)
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF8) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF9) > 0)
|
||||
if ((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig & MBSFN_TDD_SF9) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // handle 4 frames case
|
||||
for(j=0; j<4; j++) {
|
||||
if ((frame % period) == (frame_parms->MBSFN_config[i].radioframeAllocationOffset + j)) {
|
||||
if (frame_parms->frame_type == FDD) {
|
||||
switch (subframe) {
|
||||
case 1:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x800000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x800000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x400000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x400000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x200000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x200000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x100000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x100000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x80000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x80000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig) & (0x40000>>(j*6))) > 0) {
|
||||
//LOG_E(PHY,"SubframeConfig<<6(%x),MBSFN_FDD_SF1(%x)\n",frame_parms->MBSFN_config[i].mbsfn_SubframeConfig,0x40000>>(j*6));
|
||||
return(1);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch (subframe) {
|
||||
case 3:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF3) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF4) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF7) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 8:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF8) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if (((frame_parms->MBSFN_config[i].mbsfn_SubframeConfig>>j*6) & MBSFN_TDD_SF9) > 0)
|
||||
return(1);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,22 +39,16 @@
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "prach_extern.h"
|
||||
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
|
||||
#define rx_prach0 rx_prach
|
||||
#endif
|
||||
|
||||
void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
RU_t *ru,
|
||||
uint16_t *max_preamble,
|
||||
uint16_t *max_preamble_energy,
|
||||
uint16_t *max_preamble_delay,
|
||||
uint16_t *avg_preamble_energy,
|
||||
uint16_t *avg_preamble_energy,
|
||||
uint16_t Nf,
|
||||
uint8_t tdd_mapindex
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint8_t br_flag,
|
||||
uint8_t ce_level
|
||||
#endif
|
||||
uint8_t tdd_mapindex,
|
||||
uint8_t br_flag,
|
||||
uint8_t ce_level
|
||||
) {
|
||||
int i;
|
||||
LTE_DL_FRAME_PARMS *fp=NULL;
|
||||
@@ -93,9 +87,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
int16_t prach_ifft_tmp[2048*2] __attribute__((aligned(32)));
|
||||
int32_t *prach_ifft=(int32_t *)NULL;
|
||||
int32_t **prach_ifftp=(int32_t **)NULL;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int prach_ifft_cnt=0;
|
||||
#endif
|
||||
|
||||
if(eNB) {
|
||||
fp = &(eNB->frame_parms);
|
||||
nb_rx = fp->nb_antennas_rx;
|
||||
@@ -103,12 +96,10 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
fp = (ru->frame_parms);
|
||||
nb_rx = ru->nb_rx;
|
||||
}
|
||||
|
||||
AssertFatal(fp!=NULL,"rx_prach called without valid RU or eNB descriptor\n");
|
||||
|
||||
frame_type = fp->frame_type;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (br_flag == 1) {
|
||||
AssertFatal(fp->prach_emtc_config_common.prach_Config_enabled==1,
|
||||
"emtc prach_Config is not enabled\n");
|
||||
@@ -125,9 +116,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
max_preamble += ce_level;
|
||||
max_preamble_energy += ce_level;
|
||||
max_preamble_delay += ce_level;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
rootSequenceIndex = fp->prach_config_common.rootSequenceIndex;
|
||||
prach_ConfigIndex = fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
|
||||
Ncs_config = fp->prach_config_common.prach_ConfigInfo.zeroCorrelationZoneConfig;
|
||||
@@ -142,36 +131,33 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
uint16_t N_ZC = (prach_fmt <4)?839:139;
|
||||
|
||||
if (eNB) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (br_flag == 1) {
|
||||
prach_ifftp = eNB->prach_vars_br.prach_ifft[ce_level];
|
||||
subframe = eNB->proc.subframe_prach_br;
|
||||
prachF = eNB->prach_vars_br.prachF;
|
||||
rxsigF = eNB->prach_vars_br.rxsigF[ce_level];
|
||||
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
|
||||
br_flag,ce_level,eNB->proc.frame_prach,subframe,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
|
||||
prach_ConfigIndex,rootSequenceIndex,
|
||||
eNB->prach_vars_br.repetition_number[ce_level],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
prach_ifftp = eNB->prach_vars.prach_ifft[0];
|
||||
subframe = eNB->proc.subframe_prach;
|
||||
prachF = eNB->prach_vars.prachF;
|
||||
rxsigF = eNB->prach_vars.rxsigF[0];
|
||||
if (LOG_DEBUGFLAG(PRACH)){
|
||||
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
|
||||
}
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,
|
||||
"PRACH (eNB) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d, rootSequenceIndex %d, repetition number %d,numRepetitionsPrePreambleAttempt %d\n",
|
||||
br_flag,ce_level,eNB->proc.frame_prach,subframe,
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],
|
||||
prach_ConfigIndex,rootSequenceIndex,
|
||||
eNB->prach_vars_br.repetition_number[ce_level],
|
||||
fp->prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]);
|
||||
}
|
||||
} else {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
prach_ifftp = eNB->prach_vars.prach_ifft[0];
|
||||
subframe = eNB->proc.subframe_prach;
|
||||
prachF = eNB->prach_vars.prachF;
|
||||
rxsigF = eNB->prach_vars.rxsigF[0];
|
||||
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
if (((eNB->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (eNB) : running rx_prach for subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d , rootSequenceIndex %d\n", subframe,
|
||||
fp->prach_config_common.prach_ConfigInfo.prach_FreqOffset,prach_ConfigIndex,rootSequenceIndex);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (br_flag == 1) {
|
||||
subframe = ru->proc.subframe_prach_br;
|
||||
rxsigF = ru->prach_rxsigF_br[ce_level];
|
||||
@@ -180,9 +166,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
if (((ru->proc.frame_prach)&1023) < 20) LOG_I(PHY,"PRACH (RU) : running rx_prach (br_flag %d, ce_level %d) for frame %d subframe %d, prach_FreqOffset %d, prach_ConfigIndex %d\n",
|
||||
br_flag,ce_level,ru->proc.frame_prach,subframe,fp->prach_emtc_config_common.prach_ConfigInfo.prach_FreqOffset[ce_level],prach_ConfigIndex);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
subframe = ru->proc.subframe_prach;
|
||||
rxsigF = ru->prach_rxsigF;
|
||||
|
||||
@@ -422,11 +406,11 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
|
||||
if ((eNB==NULL) && ru->function == NGFI_RRU_IF4p5) {
|
||||
/// **** send_IF4 of rxsigF to RAU **** ///
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (br_flag == 1) send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level);
|
||||
if (br_flag == 1)
|
||||
send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH+1+ce_level);
|
||||
else
|
||||
#endif
|
||||
send_IF4p5(ru, ru->proc.frame_prach, ru->proc.subframe_prach, IF4p5_PRACH);
|
||||
|
||||
return;
|
||||
} else if (eNB!=NULL) {
|
||||
if ( LOG_DEBUGFLAG(PRACH)) {
|
||||
@@ -443,27 +427,26 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
uint8_t update_TA2 = 1;
|
||||
|
||||
switch (eNB->frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
update_TA = 16;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
update_TA = 16;
|
||||
break;
|
||||
|
||||
case 25:
|
||||
update_TA = 4;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
update_TA = 2;
|
||||
break;
|
||||
|
||||
case 75:
|
||||
update_TA = 3;
|
||||
update_TA2 = 2;
|
||||
break;
|
||||
case 100:
|
||||
update_TA = 1;
|
||||
break;
|
||||
case 25:
|
||||
update_TA = 4;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
update_TA = 2;
|
||||
break;
|
||||
|
||||
case 75:
|
||||
update_TA = 3;
|
||||
update_TA2 = 2;
|
||||
break;
|
||||
|
||||
case 100:
|
||||
update_TA = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
*max_preamble_energy=0;
|
||||
@@ -568,16 +551,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
|
||||
if (new_dft == 1) {
|
||||
new_dft = 0;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (br_flag == 1) {
|
||||
Xu=(int16_t *)eNB->X_u_br[ce_level][preamble_offset-first_nonzero_root_idx];
|
||||
prach_ifft = prach_ifftp[prach_ifft_cnt++];
|
||||
|
||||
if (eNB->prach_vars_br.repetition_number[ce_level]==1) memset(prach_ifft,0,((N_ZC==839)?2048:256)*sizeof(int32_t));
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
Xu=(int16_t *)eNB->X_u[preamble_offset-first_nonzero_root_idx];
|
||||
prach_ifft = prach_ifftp[0];
|
||||
memset(prach_ifft,0,((N_ZC==839) ? 2048 : 256)*sizeof(int32_t));
|
||||
@@ -632,13 +612,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
} // new dft
|
||||
|
||||
// check energy in nth time shift, for
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if ((br_flag==0) ||
|
||||
(eNB->prach_vars_br.repetition_number[ce_level]==
|
||||
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level]))
|
||||
#endif
|
||||
{
|
||||
eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_numRepetitionPerPreambleAttempt[ce_level])) {
|
||||
if (LOG_DEBUGFLAG(PRACH)) {
|
||||
int en = dB_fixed(signal_energy((int32_t *)&rxsigF[0][0],840));
|
||||
|
||||
@@ -649,7 +625,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
|
||||
for (i=0; i<NCS2; i++) {
|
||||
lev = (int32_t)prach_ifft[(preamble_shift2+i)];
|
||||
avg_en += lev;
|
||||
avg_en += lev;
|
||||
levdB = dB_fixed_times10(lev);
|
||||
|
||||
if (levdB>*max_preamble_energy) {
|
||||
@@ -670,7 +646,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
} ///ncs2
|
||||
}
|
||||
}// preamble_index
|
||||
|
||||
*avg_preamble_energy=dB_fixed(avg_en/64);
|
||||
|
||||
if (LOG_DUMPFLAG(PRACH)) {
|
||||
int en = dB_fixed(signal_energy((int32_t *)&rxsigF[0][0],840));
|
||||
|
||||
@@ -688,7 +666,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
|
||||
LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
|
||||
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
|
||||
exit(-1);
|
||||
exit(-1);
|
||||
} else {
|
||||
LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
|
||||
LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1);
|
||||
@@ -703,14 +681,13 @@ void rx_prach0(PHY_VARS_eNB *eNB,
|
||||
if (eNB) stop_meas(&eNB->rx_prach);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
void rx_prach(PHY_VARS_eNB *eNB,
|
||||
RU_t *ru,
|
||||
uint16_t *max_preamble,
|
||||
uint16_t *max_preamble_energy,
|
||||
uint16_t *max_preamble_delay,
|
||||
uint16_t *avg_preamble_energy,
|
||||
uint16_t *avg_preamble_energy,
|
||||
uint16_t Nf,
|
||||
uint8_t tdd_mapindex,
|
||||
uint8_t br_flag) {
|
||||
@@ -739,10 +716,9 @@ void rx_prach(PHY_VARS_eNB *eNB,
|
||||
eNB->prach_vars_br.repetition_number[i]=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} /* for i ... */
|
||||
} /* else br_flag == 0 */
|
||||
}
|
||||
|
||||
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
|
||||
|
||||
@@ -326,11 +326,8 @@ uint16_t prach_root_sequence_map4[138] = { 1,138,2,137,3,136,4,135,5,134,6,133,
|
||||
61,78,62,77,63,76,64,75,65,74,66,73,67,72,68,71,69,70
|
||||
};
|
||||
|
||||
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
|
||||
{
|
||||
|
||||
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
|
||||
FILE *fd;
|
||||
|
||||
fd = fopen("prach_config.txt","w");
|
||||
fprintf(fd,"prach_config: subframe = %d\n",subframe);
|
||||
fprintf(fd,"prach_config: N_RB_UL = %d\n",frame_parms->N_RB_UL);
|
||||
@@ -344,13 +341,10 @@ void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe)
|
||||
fprintf(fd,"prach_config: highSpeedFlag = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.highSpeedFlag);
|
||||
fprintf(fd,"prach_config: n_ra_prboffset = %d\n",frame_parms->prach_config_common.prach_ConfigInfo.prach_FreqOffset);
|
||||
fclose(fd);
|
||||
|
||||
}
|
||||
|
||||
// This function computes the du
|
||||
void fill_du(uint8_t prach_fmt)
|
||||
{
|
||||
|
||||
void fill_du(uint8_t prach_fmt) {
|
||||
uint16_t iu,u,p;
|
||||
uint16_t N_ZC;
|
||||
uint16_t *prach_root_sequence_map;
|
||||
@@ -364,7 +358,6 @@ void fill_du(uint8_t prach_fmt)
|
||||
}
|
||||
|
||||
for (iu=0; iu<(N_ZC-1); iu++) {
|
||||
|
||||
u=prach_root_sequence_map[iu];
|
||||
p=1;
|
||||
|
||||
@@ -373,27 +366,21 @@ void fill_du(uint8_t prach_fmt)
|
||||
|
||||
du[u] = ((p<(N_ZC>>1)) ? p : (N_ZC-p));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
uint8_t get_num_prach_tdd(module_id_t Mod_id)
|
||||
{
|
||||
uint8_t get_num_prach_tdd(module_id_t Mod_id) {
|
||||
LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms;
|
||||
return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].num_prach);
|
||||
}
|
||||
|
||||
uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index)
|
||||
{
|
||||
uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index) {
|
||||
LTE_DL_FRAME_PARMS *fp = &PHY_vars_UE_g[Mod_id][0]->frame_parms;
|
||||
return(tdd_preamble_map[fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex][fp->tdd_config].map[tdd_map_index].f_ra);
|
||||
}
|
||||
|
||||
uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type)
|
||||
{
|
||||
|
||||
uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type) {
|
||||
if (frame_type == FDD) // FDD
|
||||
return(prach_ConfigIndex>>4);
|
||||
|
||||
else {
|
||||
if (prach_ConfigIndex < 20)
|
||||
return (0);
|
||||
@@ -411,21 +398,18 @@ uint8_t get_prach_fmt(uint8_t prach_ConfigIndex,lte_frame_type_t frame_type)
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t n_ra_prboffset,
|
||||
uint8_t tdd_mapindex, uint16_t Nf)
|
||||
{
|
||||
uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t n_ra_prboffset,
|
||||
uint8_t tdd_mapindex, uint16_t Nf) {
|
||||
lte_frame_type_t frame_type = frame_parms->frame_type;
|
||||
uint8_t tdd_config = frame_parms->tdd_config;
|
||||
|
||||
uint8_t n_ra_prb;
|
||||
uint8_t f_ra,t1_ra;
|
||||
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
|
||||
uint8_t Nsp=2;
|
||||
|
||||
if (frame_type == TDD) { // TDD
|
||||
|
||||
if (tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach==0) {
|
||||
LOG_E(PHY, "Illegal prach_ConfigIndex %"PRIu8"", prach_ConfigIndex);
|
||||
return(-1);
|
||||
@@ -452,21 +436,19 @@ uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
n_ra_prb = frame_parms->N_RB_UL - 6*(f_ra+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
else { //FDD
|
||||
} else { //FDD
|
||||
n_ra_prb = n_ra_prboffset;
|
||||
}
|
||||
|
||||
return(n_ra_prb);
|
||||
}
|
||||
|
||||
int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex,uint32_t frame, uint8_t subframe)
|
||||
{
|
||||
int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex,uint32_t frame, uint8_t subframe) {
|
||||
// uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
|
||||
uint8_t tdd_config = frame_parms->tdd_config;
|
||||
uint8_t t0_ra;
|
||||
uint8_t t1_ra;
|
||||
uint8_t t2_ra;
|
||||
|
||||
int prach_mask = 0;
|
||||
|
||||
if (frame_parms->frame_type == FDD) { //FDD
|
||||
@@ -479,68 +461,78 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
|
||||
return(0);
|
||||
|
||||
switch (prach_ConfigIndex&0x1f) {
|
||||
case 0:
|
||||
case 3:
|
||||
if (subframe==1) prach_mask = 1;
|
||||
break;
|
||||
case 0:
|
||||
case 3:
|
||||
if (subframe==1) prach_mask = 1;
|
||||
|
||||
case 1:
|
||||
case 4:
|
||||
if (subframe==4) prach_mask = 1;
|
||||
break;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 5:
|
||||
if (subframe==7) prach_mask = 1;
|
||||
break;
|
||||
case 1:
|
||||
case 4:
|
||||
if (subframe==4) prach_mask = 1;
|
||||
|
||||
case 6:
|
||||
if ((subframe==1) || (subframe==6)) prach_mask=1;
|
||||
break;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
if ((subframe==2) || (subframe==7)) prach_mask=1;
|
||||
break;
|
||||
case 2:
|
||||
case 5:
|
||||
if (subframe==7) prach_mask = 1;
|
||||
|
||||
case 8:
|
||||
if ((subframe==3) || (subframe==8)) prach_mask=1;
|
||||
break;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
if ((subframe==1) || (subframe==4) || (subframe==7)) prach_mask=1;
|
||||
break;
|
||||
case 6:
|
||||
if ((subframe==1) || (subframe==6)) prach_mask=1;
|
||||
|
||||
case 10:
|
||||
if ((subframe==2) || (subframe==5) || (subframe==8)) prach_mask=1;
|
||||
break;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if ((subframe==3) || (subframe==6) || (subframe==9)) prach_mask=1;
|
||||
break;
|
||||
case 7:
|
||||
if ((subframe==2) || (subframe==7)) prach_mask=1;
|
||||
|
||||
case 12:
|
||||
if ((subframe&1)==0) prach_mask=1;
|
||||
break;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
if ((subframe&1)==1) prach_mask=1;
|
||||
break;
|
||||
case 8:
|
||||
if ((subframe==3) || (subframe==8)) prach_mask=1;
|
||||
|
||||
case 14:
|
||||
prach_mask=1;
|
||||
break;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (subframe==9) prach_mask=1;
|
||||
break;
|
||||
case 9:
|
||||
if ((subframe==1) || (subframe==4) || (subframe==7)) prach_mask=1;
|
||||
|
||||
break;
|
||||
|
||||
case 10:
|
||||
if ((subframe==2) || (subframe==5) || (subframe==8)) prach_mask=1;
|
||||
|
||||
break;
|
||||
|
||||
case 11:
|
||||
if ((subframe==3) || (subframe==6) || (subframe==9)) prach_mask=1;
|
||||
|
||||
break;
|
||||
|
||||
case 12:
|
||||
if ((subframe&1)==0) prach_mask=1;
|
||||
|
||||
break;
|
||||
|
||||
case 13:
|
||||
if ((subframe&1)==1) prach_mask=1;
|
||||
|
||||
break;
|
||||
|
||||
case 14:
|
||||
prach_mask=1;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (subframe==9) prach_mask=1;
|
||||
|
||||
break;
|
||||
}
|
||||
} else { // TDD
|
||||
|
||||
AssertFatal(prach_ConfigIndex<64,
|
||||
"Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
|
||||
"Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
|
||||
AssertFatal(tdd_preamble_map[prach_ConfigIndex][tdd_config].num_prach>0,
|
||||
"Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
|
||||
|
||||
"Illegal prach_ConfigIndex %d for ",prach_ConfigIndex);
|
||||
t0_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t0_ra;
|
||||
t1_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t1_ra;
|
||||
t2_ra = tdd_preamble_map[prach_ConfigIndex][tdd_config].map[0].t2_ra;
|
||||
@@ -557,7 +549,7 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
|
||||
(((subframe<5)&&(t1_ra==0)) || // PRACH is in 1st half-frame
|
||||
(((subframe>4)&&(t1_ra==1))))) { // PRACH is in 2nd half-frame
|
||||
if ((prach_ConfigIndex<48) && // PRACH only in normal UL subframe
|
||||
(((subframe%5)-2)==t2_ra)) prach_mask=1;
|
||||
(((subframe%5)-2)==t2_ra)) prach_mask=1;
|
||||
else if ((prach_ConfigIndex>47) && (((subframe%5)-1)==t2_ra)) prach_mask=1; // PRACH can be in UpPTS
|
||||
}
|
||||
}
|
||||
@@ -566,29 +558,25 @@ int is_prach_subframe0(LTE_DL_FRAME_PARMS *frame_parms,uint8_t prach_ConfigIndex
|
||||
}
|
||||
|
||||
int is_prach_subframe(LTE_DL_FRAME_PARMS *frame_parms, uint32_t frame, uint8_t subframe) {
|
||||
|
||||
uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
|
||||
int prach_mask = is_prach_subframe0(frame_parms, prach_ConfigIndex, frame, subframe);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
for (int i=0; i<4; i++) {
|
||||
if (frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] == 1)
|
||||
if (frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] == 1)
|
||||
prach_mask |= (is_prach_subframe0(frame_parms, frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[i],
|
||||
frame, subframe) << (i+1));
|
||||
}
|
||||
#endif
|
||||
|
||||
return(prach_mask);
|
||||
}
|
||||
|
||||
|
||||
void compute_prach_seq(uint16_t rootSequenceIndex,
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t zeroCorrelationZoneConfig,
|
||||
uint8_t highSpeedFlag,
|
||||
lte_frame_type_t frame_type,
|
||||
uint32_t X_u[64][839])
|
||||
{
|
||||
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t zeroCorrelationZoneConfig,
|
||||
uint8_t highSpeedFlag,
|
||||
lte_frame_type_t frame_type,
|
||||
uint32_t X_u[64][839]) {
|
||||
// Compute DFT of x_u => X_u[k] = x_u(inv(u)*k)^* X_u[k] = exp(j\pi u*inv(u)*k*(inv(u)*k+1)/N_ZC)
|
||||
unsigned int k,inv_u,i,NCS=0,num_preambles;
|
||||
int N_ZC;
|
||||
@@ -597,15 +585,12 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
|
||||
uint16_t u, preamble_offset;
|
||||
uint16_t n_shift_ra,n_shift_ra_bar, d_start,numshift;
|
||||
uint8_t not_found;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_IN);
|
||||
|
||||
#ifdef PRACH_DEBUG
|
||||
LOG_I(PHY,"compute_prach_seq: NCS_config %d, prach_fmt %d\n",zeroCorrelationZoneConfig, prach_fmt);
|
||||
#endif
|
||||
|
||||
AssertFatal(prach_fmt<4,
|
||||
"PRACH sequence is only precomputed for prach_fmt<4 (have %"PRIu8")\n", prach_fmt );
|
||||
"PRACH sequence is only precomputed for prach_fmt<4 (have %"PRIu8")\n", prach_fmt );
|
||||
N_ZC = (prach_fmt < 4) ? 839 : 139;
|
||||
//init_prach_tables(N_ZC); //moved to phy_init_lte_ue/eNB, since it takes to long in real-time
|
||||
|
||||
@@ -616,37 +601,30 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
|
||||
prach_root_sequence_map = prach_root_sequence_map4;
|
||||
}
|
||||
|
||||
|
||||
#ifdef PRACH_DEBUG
|
||||
LOG_I( PHY, "compute_prach_seq: done init prach_tables\n" );
|
||||
#endif
|
||||
|
||||
if (highSpeedFlag== 0) {
|
||||
|
||||
#ifdef PRACH_DEBUG
|
||||
LOG_I(PHY,"Low speed prach : NCS_config %d\n",zeroCorrelationZoneConfig);
|
||||
#endif
|
||||
|
||||
AssertFatal(zeroCorrelationZoneConfig<=15,
|
||||
"FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
|
||||
"FATAL, Illegal Ncs_config for unrestricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
|
||||
NCS = NCS_unrestricted[zeroCorrelationZoneConfig];
|
||||
|
||||
num_preambles = (NCS==0) ? 64 : ((64*NCS)/N_ZC);
|
||||
|
||||
if (NCS>0) num_preambles++;
|
||||
|
||||
preamble_offset = 0;
|
||||
} else {
|
||||
|
||||
#ifdef PRACH_DEBUG
|
||||
LOG_I( PHY, "high speed prach : NCS_config %"PRIu8"\n", zeroCorrelationZoneConfig );
|
||||
#endif
|
||||
|
||||
AssertFatal(zeroCorrelationZoneConfig<=14,
|
||||
"FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
|
||||
"FATAL, Illegal Ncs_config for restricted format %"PRIu8"\n", zeroCorrelationZoneConfig );
|
||||
NCS = NCS_restricted[zeroCorrelationZoneConfig];
|
||||
fill_du(prach_fmt);
|
||||
|
||||
num_preambles = 64; // compute ZC sequence for 64 possible roots
|
||||
// find first non-zero shift root (stored in preamble_offset)
|
||||
not_found = 1;
|
||||
@@ -665,7 +643,6 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
|
||||
}
|
||||
|
||||
u = prach_root_sequence_map[index];
|
||||
|
||||
uint16_t n_group_ra = 0;
|
||||
|
||||
if ( (du[u]<(N_ZC/3)) && (du[u]>=NCS) ) {
|
||||
@@ -714,28 +691,22 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
|
||||
}
|
||||
|
||||
u = prach_root_sequence_map[index];
|
||||
|
||||
inv_u = ZC_inv[u]; // multiplicative inverse of u
|
||||
|
||||
|
||||
// X_u[0] stores the first ZC sequence where the root u has a non-zero number of shifts
|
||||
// for the unrestricted case X_u[0] is the first root indicated by the rootSequenceIndex
|
||||
|
||||
for (k=0; k<N_ZC; k++) {
|
||||
// 420 is the multiplicative inverse of 2 (required since ru is exp[j 2\pi n])
|
||||
X_u[i][k] = ((uint32_t*)ru)[(((k*(1+(inv_u*k)))%N_ZC)*420)%N_ZC];
|
||||
X_u[i][k] = ((uint32_t *)ru)[(((k*(1+(inv_u*k)))%N_ZC)*420)%N_ZC];
|
||||
}
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_OUT);
|
||||
|
||||
}
|
||||
|
||||
void init_prach_tables(int N_ZC)
|
||||
{
|
||||
|
||||
void init_prach_tables(int N_ZC) {
|
||||
int i,m;
|
||||
|
||||
// Compute the modular multiplicative inverse 'iu' of u s.t. iu*u = 1 mod N_ZC
|
||||
ZC_inv[0] = 0;
|
||||
ZC_inv[1] = 1;
|
||||
|
||||
@@ -477,7 +477,6 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
|
||||
len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",ue->dlsch_received[0],ue->dlsch_errors[0],ue->dlsch_fer[0]);
|
||||
len += sprintf(&buffer[len], "[UE PROC] DLSCH (SI) Total %d, Error %d\n",ue->dlsch_SI_received[0],ue->dlsch_SI_errors[0]);
|
||||
len += sprintf(&buffer[len], "[UE PROC] DLSCH (RA) Total %d, Error %d\n",ue->dlsch_ra_received[0],ue->dlsch_ra_errors[0]);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
int i=0;
|
||||
|
||||
//len += sprintf(&buffer[len], "[UE PROC] MCH Total %d\n", ue->dlsch_mch_received[0]);
|
||||
@@ -488,7 +487,6 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length
|
||||
i, ue->dlsch_mtch_received[i][0],ue->dlsch_mtch_errors[i][0],ue->dlsch_mtch_trials[i][0]);
|
||||
}
|
||||
|
||||
#endif
|
||||
len += sprintf(&buffer[len], "[UE PROC] DLSCH Bitrate %dkbps\n",(ue->bitrate[0]/1000));
|
||||
len += sprintf(&buffer[len], "[UE PROC] Total Received Bits %dkbits\n",(ue->total_received_bits[0]/1000));
|
||||
len += sprintf(&buffer[len], "[UE PROC] IA receiver %d\n",ue->use_ia_receiver);
|
||||
|
||||
+1096
-1132
File diff suppressed because it is too large
Load Diff
@@ -36,7 +36,7 @@
|
||||
#include "mdci.h"
|
||||
//#include "uci.h"
|
||||
#ifndef STANDALONE_COMPILE
|
||||
#include "UTIL/LISTS/list.h"
|
||||
#include "UTIL/LISTS/list.h"
|
||||
#endif
|
||||
|
||||
#define MOD_TABLE_QPSK_OFFSET 1
|
||||
@@ -66,19 +66,19 @@
|
||||
#define MAX_NUM_RE (14*1200)
|
||||
|
||||
#if !defined(SI_RNTI)
|
||||
#define SI_RNTI (rnti_t)0xffff
|
||||
#define SI_RNTI (rnti_t)0xffff
|
||||
#endif
|
||||
#if !defined(M_RNTI)
|
||||
#define M_RNTI (rnti_t)0xfffd
|
||||
#define M_RNTI (rnti_t)0xfffd
|
||||
#endif
|
||||
#if !defined(P_RNTI)
|
||||
#define P_RNTI (rnti_t)0xfffe
|
||||
#define P_RNTI (rnti_t)0xfffe
|
||||
#endif
|
||||
#if !defined(CBA_RNTI)
|
||||
#define CBA_RNTI (rnti_t)0xfff4
|
||||
#define CBA_RNTI (rnti_t)0xfff4
|
||||
#endif
|
||||
#if !defined(C_RNTI)
|
||||
#define C_RNTI (rnti_t)0x1234
|
||||
#define C_RNTI (rnti_t)0x1234
|
||||
#endif
|
||||
// These are the codebook indexes according to Table 6.3.4.2.3-1 of 36.211
|
||||
//1 layer
|
||||
@@ -92,7 +92,8 @@
|
||||
#define PMI_2A_R1_1j 2
|
||||
|
||||
typedef enum { SEARCH_EXIST=0,
|
||||
SEARCH_EXIST_OR_FREE} find_type_t;
|
||||
SEARCH_EXIST_OR_FREE
|
||||
} find_type_t;
|
||||
|
||||
typedef enum {
|
||||
SCH_IDLE=0,
|
||||
@@ -102,14 +103,10 @@ typedef enum {
|
||||
} SCH_status_t;
|
||||
|
||||
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
typedef enum {
|
||||
CEmodeA = 0,
|
||||
CEmodeB = 1
|
||||
} CEmode_t;
|
||||
#endif
|
||||
|
||||
#define PUSCH_x 2
|
||||
#define PUSCH_y 3
|
||||
@@ -134,20 +131,14 @@ typedef enum {
|
||||
HARQ_SR,
|
||||
HARQ_CQI,
|
||||
SR_CQI,
|
||||
HARQ_SR_CQI
|
||||
HARQ_SR_CQI
|
||||
} UCI_type_t;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
typedef enum {
|
||||
NOCE,
|
||||
CEMODEA,
|
||||
CEMODEB
|
||||
} UE_type_t;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef enum {
|
||||
SI_PDSCH=0,
|
||||
@@ -182,8 +173,6 @@ typedef struct {
|
||||
PRACH_TDD_PREAMBLE_MAP_elem map[6];
|
||||
} PRACH_TDD_PREAMBLE_MAP;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
typedef struct {
|
||||
uint16_t slss_id;
|
||||
uint8_t *slmib;
|
||||
@@ -252,7 +241,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
/// payload length
|
||||
int payload_length;
|
||||
uint8_t payload[100];
|
||||
uint8_t payload[100];
|
||||
} SLDCH_t;
|
||||
|
||||
#define TTI_SYNC 0
|
||||
@@ -275,7 +264,6 @@ typedef struct UE_tport_s {
|
||||
uint8_t payload[1500];
|
||||
} UE_tport_t;
|
||||
|
||||
#endif
|
||||
|
||||
/**@}*/
|
||||
#endif
|
||||
|
||||
@@ -103,7 +103,7 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
|
||||
|
||||
|
||||
#ifndef modOrder
|
||||
#define modOrder(I_MCS,I_TBS) ((I_MCS-I_TBS)*2+2) // Find modulation order from I_TBS and I_MCS
|
||||
#define modOrder(I_MCS,I_TBS) ((I_MCS-I_TBS)*2+2) // Find modulation order from I_TBS and I_MCS
|
||||
#endif
|
||||
|
||||
/** \fn uint8_t I_TBS2I_MCS(uint8_t I_TBS);
|
||||
@@ -132,10 +132,10 @@ uint8_t SE2I_TBS(float SE,
|
||||
@returns 0 on success*/
|
||||
|
||||
int generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
|
||||
int *txdataF,
|
||||
int16_t amp,
|
||||
uint32_t subframe);
|
||||
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
|
||||
int *txdataF,
|
||||
int16_t amp,
|
||||
uint32_t subframe);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -149,7 +149,7 @@ int generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
|
||||
int32_t compareints (const void * a, const void * b);
|
||||
int32_t compareints (const void *a, const void *b);
|
||||
|
||||
uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame,uint8_t subframe);
|
||||
|
||||
@@ -240,11 +240,11 @@ uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index);
|
||||
@param Xu DFT output
|
||||
*/
|
||||
void compute_prach_seq(uint16_t rootSequenceIndex,
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t zeroCorrelationZoneConfig,
|
||||
uint8_t highSpeedFlag,
|
||||
lte_frame_type_t frame_type,
|
||||
uint32_t X_u[64][839]);
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t zeroCorrelationZoneConfig,
|
||||
uint8_t highSpeedFlag,
|
||||
lte_frame_type_t frame_type,
|
||||
uint32_t X_u[64][839]);
|
||||
|
||||
|
||||
void init_prach_tables(int N_ZC);
|
||||
@@ -258,7 +258,7 @@ void init_prach_tables(int N_ZC);
|
||||
*/
|
||||
int is_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
/*!
|
||||
\brief Return the status of CAS in this frame/subframe
|
||||
@param frame Frame index
|
||||
@@ -276,7 +276,7 @@ int is_fembms_cas_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *fram
|
||||
@returns 1 if subframe is for MBSFN
|
||||
*/
|
||||
int is_fembms_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parms);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -302,10 +302,10 @@ void init_scrambling_lut(void);
|
||||
void init_unscrambling_lut(void);
|
||||
|
||||
|
||||
uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t n_ra_prboffset,
|
||||
uint8_t tdd_mapindex, uint16_t Nf);
|
||||
uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t n_ra_prboffset,
|
||||
uint8_t tdd_mapindex, uint16_t Nf);
|
||||
|
||||
uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame,uint8_t subframe);
|
||||
uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t n);
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#include "mdci.h"
|
||||
#include "uci_common.h"
|
||||
#ifndef STANDALONE_COMPILE
|
||||
#include "UTIL/LISTS/list.h"
|
||||
#include "UTIL/LISTS/list.h"
|
||||
#endif
|
||||
|
||||
|
||||
@@ -126,14 +126,12 @@ typedef struct {
|
||||
/// codeword this transport block is mapped to
|
||||
uint8_t codeword;
|
||||
#ifdef PHY_TX_THREAD
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
|
||||
uint8_t sib1_br_flag;
|
||||
/// initial absolute subframe (see 36.211 Section 6.3.1), needed for c_init for scrambling
|
||||
uint16_t i0;
|
||||
CEmode_t CEmode;
|
||||
#endif
|
||||
#endif
|
||||
} LTE_DL_eNB_HARQ_t;
|
||||
|
||||
|
||||
@@ -185,14 +183,12 @@ typedef struct {
|
||||
/// amplitude of PDSCH (compared to RS) in symbols containing pilots
|
||||
int16_t sqrt_rho_b;
|
||||
#ifndef PHY_TX_THREAD
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// indicator that this DLSCH corresponds to SIB1-BR, needed for c_init for scrambling
|
||||
uint8_t sib1_br_flag;
|
||||
/// initial absolute subframe (see 36.211 Section 6.3.1), needed for c_init for scrambling
|
||||
uint16_t i0;
|
||||
CEmode_t CEmode;
|
||||
#endif
|
||||
#endif
|
||||
} LTE_eNB_DLSCH_t;
|
||||
|
||||
|
||||
@@ -344,7 +340,7 @@ typedef struct {
|
||||
uint16_t n_pucch_1[4][2];
|
||||
/// two antenna n1_pucch 1_0 for SR
|
||||
uint16_t n_pucch_1_0_sr[2];
|
||||
/// two antenna n2_pucch
|
||||
/// two antenna n2_pucch
|
||||
uint16_t n_pucch_2[2];
|
||||
/// two antenna n3_pucch
|
||||
uint16_t n_pucch_3[2];
|
||||
@@ -352,7 +348,6 @@ typedef struct {
|
||||
uint8_t tdd_bundling;
|
||||
/// Received Energy
|
||||
uint32_t stat;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// non BL/CE, CEmodeA, CEmodeB
|
||||
UE_type_t ue_type;
|
||||
/// Indicates the symbols that are left empty due to eMTC retuning.
|
||||
@@ -369,7 +364,6 @@ typedef struct {
|
||||
uint8_t cdm_Index;
|
||||
// Indicates if the resource blocks allocated for this grant overlap with the SRS configuration.
|
||||
uint8_t Nsrs;
|
||||
#endif
|
||||
} LTE_eNB_UCI;
|
||||
|
||||
typedef struct {
|
||||
@@ -447,10 +441,8 @@ typedef struct {
|
||||
} LTE_eNB_UE_stats;
|
||||
|
||||
typedef struct {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// UE type (normal, CEModeA, CEModeB)
|
||||
uint8_t ue_type;
|
||||
#endif
|
||||
/// HARQ process mask, indicates which processes are currently active
|
||||
uint16_t harq_mask;
|
||||
/// Pointers to 8 HARQ processes for the ULSCH
|
||||
|
||||
@@ -60,7 +60,7 @@ void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch);
|
||||
@param abstraction_flag Flag to indicate abstracted interface
|
||||
@param frame_parms Pointer to frame descriptor structure
|
||||
*/
|
||||
LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t N_RB_DL, uint8_t abstraction_flag, LTE_DL_FRAME_PARMS* frame_parms);
|
||||
LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t N_RB_DL, uint8_t abstraction_flag, LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
|
||||
|
||||
@@ -73,18 +73,18 @@ void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch);
|
||||
LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uint8_t abstraction_flag);
|
||||
|
||||
int dlsch_encoding_all(PHY_VARS_eNB *eNB,
|
||||
unsigned char *a,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
time_stats_t *rm_stats,
|
||||
time_stats_t *te_stats,
|
||||
time_stats_t *te_wait_stats,
|
||||
time_stats_t *te_main_stats,
|
||||
time_stats_t *te_wakeup_stats0,
|
||||
time_stats_t *te_wakeup_stats1,
|
||||
time_stats_t *i_stats);
|
||||
unsigned char *a,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
time_stats_t *rm_stats,
|
||||
time_stats_t *te_stats,
|
||||
time_stats_t *te_wait_stats,
|
||||
time_stats_t *te_main_stats,
|
||||
time_stats_t *te_wakeup_stats0,
|
||||
time_stats_t *te_wakeup_stats1,
|
||||
time_stats_t *i_stats);
|
||||
|
||||
/** \fn dlsch_encoding(PHY_VARS_eNB *eNB,
|
||||
uint8_t *input_buffer,
|
||||
@@ -155,12 +155,12 @@ int32_t dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
|
||||
uint8_t subframe,
|
||||
time_stats_t *rm_stats,
|
||||
time_stats_t *te_stats,
|
||||
time_stats_t *te_wait_stats,
|
||||
time_stats_t *te_main_stats,
|
||||
time_stats_t *te_wakeup_stats0,
|
||||
time_stats_t *te_wakeup_stats1,
|
||||
time_stats_t *te_wait_stats,
|
||||
time_stats_t *te_main_stats,
|
||||
time_stats_t *te_wakeup_stats0,
|
||||
time_stats_t *te_wakeup_stats1,
|
||||
time_stats_t *i_stats,
|
||||
int worker_num);
|
||||
int worker_num);
|
||||
|
||||
// Functions below implement 36-211
|
||||
|
||||
@@ -199,7 +199,7 @@ int32_t dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
|
||||
\param frame_parms Frame parameter descriptor
|
||||
*/
|
||||
|
||||
int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
||||
int32_t allocate_REs_in_RB(PHY_VARS_eNB *phy_vars_eNB,
|
||||
int32_t **txdataF,
|
||||
uint32_t *jj,
|
||||
uint32_t *jj2,
|
||||
@@ -238,7 +238,7 @@ int32_t allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
|
||||
@param dlsch0 Pointer to Transport Block 0 DLSCH descriptor for this allocation
|
||||
@param dlsch1 Pointer to Transport Block 0 DLSCH descriptor for this allocation
|
||||
*/
|
||||
int32_t dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
||||
int32_t dlsch_modulation(PHY_VARS_eNB *phy_vars_eNB,
|
||||
int32_t **txdataF,
|
||||
int16_t amp,
|
||||
int frame,
|
||||
@@ -248,11 +248,11 @@ int32_t dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
|
||||
LTE_eNB_DLSCH_t *dlsch1);
|
||||
|
||||
int32_t dlsch_modulation_SIC(int32_t **sic_buffer,
|
||||
uint32_t sub_frame_offset,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch0,
|
||||
int G);
|
||||
uint32_t sub_frame_offset,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t num_pdcch_symbols,
|
||||
LTE_eNB_DLSCH_t *dlsch0,
|
||||
int G);
|
||||
/*
|
||||
\brief This function is the top-level routine for generation of the sub-frame signal (frequency-domain) for MCH.
|
||||
@param txdataF Table of pointers for frequency-domain TX signals
|
||||
@@ -376,7 +376,7 @@ void dci_encoding(uint8_t *a,
|
||||
*/
|
||||
|
||||
uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
|
||||
uint8_t num_dci,
|
||||
uint8_t num_dci,
|
||||
DCI_ALLOC_t *dci_alloc,
|
||||
uint32_t n_rnti,
|
||||
int16_t amp,
|
||||
@@ -385,7 +385,7 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
|
||||
uint32_t sub_frame_offset);
|
||||
|
||||
|
||||
void generate_mdci_top(PHY_VARS_eNB * eNB, int frame, int subframe, int16_t amp, int32_t ** txdataF);
|
||||
void generate_mdci_top(PHY_VARS_eNB *eNB, int frame, int subframe, int16_t amp, int32_t **txdataF);
|
||||
|
||||
void generate_64qam_table(void);
|
||||
void generate_16qam_table(void);
|
||||
@@ -412,21 +412,21 @@ void ulsch_extract_rbs_single(int32_t **rxdataF,
|
||||
void fill_dci_and_dlsch(PHY_VARS_eNB *eNB,
|
||||
int frame,
|
||||
int subframe,
|
||||
L1_rxtx_proc_t *proc,
|
||||
DCI_ALLOC_t *dci_alloc,
|
||||
nfapi_dl_config_dci_dl_pdu *pdu);
|
||||
L1_rxtx_proc_t *proc,
|
||||
DCI_ALLOC_t *dci_alloc,
|
||||
nfapi_dl_config_dci_dl_pdu *pdu);
|
||||
|
||||
void fill_mdci_and_dlsch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,mDCI_ALLOC_t *dci_alloc,nfapi_dl_config_mpdcch_pdu *pdu);
|
||||
|
||||
void fill_dci0(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,DCI_ALLOC_t *dci_alloc,
|
||||
nfapi_hi_dci0_dci_pdu *pdu);
|
||||
nfapi_hi_dci0_dci_pdu *pdu);
|
||||
|
||||
void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu,int frame,int subframe);
|
||||
|
||||
void fill_mpdcch_dci0 (PHY_VARS_eNB * eNB, L1_rxtx_proc_t * proc, mDCI_ALLOC_t * dci_alloc, nfapi_hi_dci0_mpdcch_dci_pdu * pdu);
|
||||
void fill_mpdcch_dci0 (PHY_VARS_eNB *eNB, L1_rxtx_proc_t *proc, mDCI_ALLOC_t *dci_alloc, nfapi_hi_dci0_mpdcch_dci_pdu *pdu);
|
||||
|
||||
int generate_eNB_ulsch_params_from_rar(PHY_VARS_eNB *eNB,
|
||||
unsigned char *rar_pdu,
|
||||
unsigned char *rar_pdu,
|
||||
uint32_t frame,
|
||||
unsigned char subframe);
|
||||
|
||||
@@ -467,9 +467,9 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
|
||||
|
||||
|
||||
int ulsch_decoding_data_all(PHY_VARS_eNB *eNB,
|
||||
int UE_id,
|
||||
int harq_pid,
|
||||
int llr8_flag);
|
||||
int UE_id,
|
||||
int harq_pid,
|
||||
int llr8_flag);
|
||||
|
||||
/*!
|
||||
\brief Decoding of PUSCH/ACK/RI/ACK from 36-212.
|
||||
@@ -516,7 +516,7 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,
|
||||
int llr8_flag);
|
||||
|
||||
void generate_phich_top(PHY_VARS_eNB *phy_vars_eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
L1_rxtx_proc_t *proc,
|
||||
int16_t amp);
|
||||
|
||||
|
||||
@@ -529,17 +529,17 @@ void pdcch_interleaving(LTE_DL_FRAME_PARMS *frame_parms,int32_t **z, int32_t **w
|
||||
|
||||
void pdcch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t subframe,
|
||||
int8_t* llr,
|
||||
int8_t *llr,
|
||||
uint32_t length);
|
||||
|
||||
|
||||
void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int mbsfn_flag,
|
||||
LTE_eNB_DLSCH_t *dlsch,
|
||||
int hard_pid,
|
||||
int hard_pid,
|
||||
int G,
|
||||
uint8_t q,
|
||||
uint16_t frame,
|
||||
uint16_t frame,
|
||||
uint8_t Ns);
|
||||
|
||||
|
||||
@@ -553,11 +553,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
||||
uint8_t *payload,
|
||||
int frame,
|
||||
uint8_t subframe,
|
||||
uint8_t pucch1_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,int br_flag
|
||||
#endif
|
||||
);
|
||||
uint8_t pucch1_thres,
|
||||
int br_flag
|
||||
);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -574,16 +572,13 @@ uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
||||
|
||||
*/
|
||||
void rx_prach(PHY_VARS_eNB *phy_vars_eNB,RU_t *ru,
|
||||
uint16_t *max_preamble,
|
||||
uint16_t *max_preamble_energy,
|
||||
uint16_t *max_preamble_delay,
|
||||
uint16_t *avg_preamble_energy,
|
||||
uint16_t Nf, uint8_t tdd_mapindex
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint16_t *max_preamble,
|
||||
uint16_t *max_preamble_energy,
|
||||
uint16_t *max_preamble_delay,
|
||||
uint16_t *avg_preamble_energy,
|
||||
uint16_t Nf, uint8_t tdd_mapindex,
|
||||
uint8_t br_flag
|
||||
#endif
|
||||
);
|
||||
);
|
||||
|
||||
|
||||
void init_unscrambling_lut(void);
|
||||
@@ -597,12 +592,12 @@ uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp,
|
||||
|
||||
|
||||
double computeRhoA_eNB(uint8_t pa,
|
||||
LTE_eNB_DLSCH_t *dlsch_eNB,
|
||||
LTE_eNB_DLSCH_t *dlsch_eNB,
|
||||
int dl_power_off,
|
||||
uint8_t n_antenna_port);
|
||||
|
||||
double computeRhoB_eNB(uint8_t pa,
|
||||
uint8_t pb,
|
||||
uint8_t pb,
|
||||
uint8_t n_antenna_port,
|
||||
LTE_eNB_DLSCH_t *dlsch_eNB,
|
||||
int dl_power_off);
|
||||
@@ -610,8 +605,8 @@ double computeRhoB_eNB(uint8_t pa,
|
||||
|
||||
|
||||
void conv_eMTC_rballoc(uint16_t resource_block_coding,
|
||||
uint32_t N_RB_DL,
|
||||
uint32_t *rb_alloc);
|
||||
uint32_t N_RB_DL,
|
||||
uint32_t *rb_alloc);
|
||||
|
||||
int16_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
|
||||
|
||||
|
||||
@@ -357,7 +357,6 @@ int ulsch_decoding_data_2thread0(td_params *tdp) {
|
||||
void *td_thread(void *param) {
|
||||
PHY_VARS_eNB *eNB = ((td_params *)param)->eNB;
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
|
||||
pthread_setname_np( pthread_self(),"td processing");
|
||||
LOG_I(PHY,"thread td created id=%ld\n", syscall(__NR_gettid));
|
||||
//wait_sync("td_thread");
|
||||
@@ -736,18 +735,14 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
int frame = proc->frame_rx;
|
||||
int subframe = proc->subframe_rx;
|
||||
LTE_UL_eNB_HARQ_t *ulsch_harq;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(PHY,"ue_type %d\n",ulsch->ue_type);
|
||||
|
||||
if (ulsch->ue_type>0) harq_pid = 0;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
}
|
||||
else {
|
||||
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
|
||||
}
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1);
|
||||
|
||||
// x1 is set in lte_gold_generic
|
||||
x2 = ((uint32_t)ulsch->rnti<<14) + ((uint32_t)subframe<<9) + frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.3.1
|
||||
ulsch_harq = ulsch->harq_processes[harq_pid];
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -50,7 +50,6 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
uint8_t l,pbch_decoded,frame_mod4,pbch_tx_ant,dummy;
|
||||
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
|
||||
char phich_resource[6];
|
||||
|
||||
LOG_D(PHY,"[UE%d] Initial sync: starting PBCH detection (rx_offset %d)\n",ue->Mod_id,
|
||||
ue->rx_offset);
|
||||
|
||||
@@ -95,7 +94,6 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
0);
|
||||
}
|
||||
|
||||
|
||||
LOG_D(PHY,"[UE %d] RX RSSI %d dBm, digital (%d, %d) dB, linear (%d, %d), avg rx power %d dB (%d lin), RX gain %d dB\n",
|
||||
ue->Mod_id,
|
||||
ue->measurements.rx_rssi_dBm[0] - ((ue->frame_parms.nb_antennas_rx==2) ? 3 : 0),
|
||||
@@ -106,7 +104,6 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
ue->measurements.rx_power_avg_dB[0],
|
||||
ue->measurements.rx_power_avg[0],
|
||||
ue->rx_total_gain_dB);
|
||||
|
||||
LOG_D(PHY,"[UE %d] N0 %d dBm digital (%d, %d) dB, linear (%d, %d), avg noise power %d dB (%d lin)\n",
|
||||
ue->Mod_id,
|
||||
ue->measurements.n0_power_tot_dBm,
|
||||
@@ -116,58 +113,49 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
ue->measurements.n0_power[1],
|
||||
ue->measurements.n0_power_avg_dB,
|
||||
ue->measurements.n0_power_avg);
|
||||
|
||||
pbch_decoded = 0;
|
||||
|
||||
for (frame_mod4=0; frame_mod4<4; frame_mod4++) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ue->FeMBMS_active != 2){
|
||||
#endif
|
||||
pbch_tx_ant = rx_pbch(&ue->common_vars,
|
||||
ue->pbch_vars[0],
|
||||
frame_parms,
|
||||
0,
|
||||
SISO,
|
||||
ue->high_speed_flag,
|
||||
frame_mod4);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
}else{
|
||||
pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
|
||||
ue->pbch_vars[0],
|
||||
frame_parms,
|
||||
0,
|
||||
SISO,
|
||||
ue->high_speed_flag,
|
||||
frame_mod4);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) {
|
||||
pbch_decoded = 1;
|
||||
break;
|
||||
if (ue->FeMBMS_active != 2) {
|
||||
pbch_tx_ant = rx_pbch(&ue->common_vars,
|
||||
ue->pbch_vars[0],
|
||||
frame_parms,
|
||||
0,
|
||||
SISO,
|
||||
ue->high_speed_flag,
|
||||
frame_mod4);
|
||||
} else {
|
||||
pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
|
||||
ue->pbch_vars[0],
|
||||
frame_parms,
|
||||
0,
|
||||
SISO,
|
||||
ue->high_speed_flag,
|
||||
frame_mod4);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ue->FeMBMS_active != 2){
|
||||
#endif
|
||||
pbch_tx_ant = rx_pbch(&ue->common_vars,
|
||||
ue->pbch_vars[0],
|
||||
frame_parms,
|
||||
0,
|
||||
ALAMOUTI,
|
||||
ue->high_speed_flag,
|
||||
frame_mod4);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
}else{
|
||||
pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
|
||||
ue->pbch_vars[0],
|
||||
frame_parms,
|
||||
0,
|
||||
ALAMOUTI,
|
||||
ue->high_speed_flag,
|
||||
frame_mod4);
|
||||
if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) {
|
||||
pbch_decoded = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (ue->FeMBMS_active != 2) {
|
||||
pbch_tx_ant = rx_pbch(&ue->common_vars,
|
||||
ue->pbch_vars[0],
|
||||
frame_parms,
|
||||
0,
|
||||
ALAMOUTI,
|
||||
ue->high_speed_flag,
|
||||
frame_mod4);
|
||||
} else {
|
||||
pbch_tx_ant = rx_pbch_fembms(&ue->common_vars,
|
||||
ue->pbch_vars[0],
|
||||
frame_parms,
|
||||
0,
|
||||
ALAMOUTI,
|
||||
ue->high_speed_flag,
|
||||
frame_mod4);
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((pbch_tx_ant>0) && (pbch_tx_ant<=2)) {
|
||||
pbch_decoded = 1;
|
||||
@@ -217,75 +205,69 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
break;
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if(ue->FeMBMS_active != 2) {
|
||||
#endif
|
||||
// now check for PHICH parameters
|
||||
frame_parms->phich_config_common.phich_duration = (PHICH_DURATION_t)((ue->pbch_vars[0]->decoded_output[2]>>4)&1);
|
||||
dummy = (ue->pbch_vars[0]->decoded_output[2]>>2)&3;
|
||||
if(ue->FeMBMS_active != 2) {
|
||||
// now check for PHICH parameters
|
||||
frame_parms->phich_config_common.phich_duration = (PHICH_DURATION_t)((ue->pbch_vars[0]->decoded_output[2]>>4)&1);
|
||||
dummy = (ue->pbch_vars[0]->decoded_output[2]>>2)&3;
|
||||
|
||||
switch (dummy) {
|
||||
case 0:
|
||||
frame_parms->phich_config_common.phich_resource = oneSixth;
|
||||
sprintf(phich_resource,"1/6");
|
||||
break;
|
||||
switch (dummy) {
|
||||
case 0:
|
||||
frame_parms->phich_config_common.phich_resource = oneSixth;
|
||||
sprintf(phich_resource,"1/6");
|
||||
break;
|
||||
|
||||
case 1:
|
||||
frame_parms->phich_config_common.phich_resource = half;
|
||||
sprintf(phich_resource,"1/2");
|
||||
break;
|
||||
case 1:
|
||||
frame_parms->phich_config_common.phich_resource = half;
|
||||
sprintf(phich_resource,"1/2");
|
||||
break;
|
||||
|
||||
case 2:
|
||||
frame_parms->phich_config_common.phich_resource = one;
|
||||
sprintf(phich_resource,"1");
|
||||
break;
|
||||
case 2:
|
||||
frame_parms->phich_config_common.phich_resource = one;
|
||||
sprintf(phich_resource,"1");
|
||||
break;
|
||||
|
||||
case 3:
|
||||
frame_parms->phich_config_common.phich_resource = two;
|
||||
sprintf(phich_resource,"2");
|
||||
break;
|
||||
case 3:
|
||||
frame_parms->phich_config_common.phich_resource = two;
|
||||
sprintf(phich_resource,"2");
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(PHY,"[UE%d] Initial sync: Unknown PHICH_DURATION\n",ue->Mod_id);
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG_E(PHY,"[UE%d] Initial sync: Unknown PHICH_DURATION\n",ue->Mod_id);
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
for(int i=0; i<RX_NB_TH; i++) {
|
||||
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
||||
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
||||
ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
|
||||
}
|
||||
for(int i=0; i<RX_NB_TH; i++) {
|
||||
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
||||
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&3)<<6) + (ue->pbch_vars[0]->decoded_output[1]>>2))<<2;
|
||||
ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
|
||||
}
|
||||
|
||||
|
||||
LOG_D(PHY,"[UE%d] Initial sync: pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, phich_duration %d, phich_resource %s!\n",
|
||||
ue->Mod_id,
|
||||
frame_parms->nb_antenna_ports_eNB,
|
||||
pbch_tx_ant,
|
||||
ue->proc.proc_rxtx[0].frame_rx,
|
||||
frame_parms->N_RB_DL,
|
||||
frame_parms->phich_config_common.phich_duration,
|
||||
phich_resource); //frame_parms->phich_config_common.phich_resource);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
}else{
|
||||
for(int i=0; i<RX_NB_TH;i++)
|
||||
{
|
||||
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&31)<<1) + (ue->pbch_vars[0]->decoded_output[1]>>7))<<4;
|
||||
ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
|
||||
}
|
||||
LOG_D(PHY,"[UE%d] Initial sync: FeMBMS pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, AdditionalNonMBSFN_SF %d, frame_mod4 %d\n",
|
||||
LOG_D(PHY,"[UE%d] Initial sync: pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, phich_duration %d, phich_resource %s!\n",
|
||||
ue->Mod_id,
|
||||
frame_parms->nb_antenna_ports_eNB,
|
||||
pbch_tx_ant,
|
||||
ue->proc.proc_rxtx[0].frame_rx,
|
||||
frame_parms->N_RB_DL,
|
||||
0,
|
||||
frame_mod4
|
||||
);
|
||||
|
||||
}
|
||||
#endif
|
||||
frame_parms->phich_config_common.phich_duration,
|
||||
phich_resource); //frame_parms->phich_config_common.phich_resource);
|
||||
} else {
|
||||
for(int i=0; i<RX_NB_TH; i++) {
|
||||
ue->proc.proc_rxtx[i].frame_rx = (((ue->pbch_vars[0]->decoded_output[2]&31)<<1) + (ue->pbch_vars[0]->decoded_output[1]>>7))<<4;
|
||||
ue->proc.proc_rxtx[i].frame_tx = ue->proc.proc_rxtx[0].frame_rx;
|
||||
}
|
||||
|
||||
LOG_D(PHY,"[UE%d] Initial sync: FeMBMS pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, AdditionalNonMBSFN_SF %d, frame_mod4 %d\n",
|
||||
ue->Mod_id,
|
||||
frame_parms->nb_antenna_ports_eNB,
|
||||
pbch_tx_ant,
|
||||
ue->proc.proc_rxtx[0].frame_rx,
|
||||
frame_parms->N_RB_DL,
|
||||
0,
|
||||
frame_mod4
|
||||
);
|
||||
}
|
||||
|
||||
return(0);
|
||||
} else {
|
||||
return(-1);
|
||||
@@ -310,7 +292,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
frame_parms->frame_type=FDD;
|
||||
frame_parms->nb_antenna_ports_eNB = 2;
|
||||
init_frame_parms(frame_parms,1);
|
||||
|
||||
/*
|
||||
LOG_M("rxdata0.m","rxd0",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
|
||||
|
||||
@@ -326,9 +307,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
else
|
||||
sync_pos2 = sync_pos + FRAME_LENGTH_COMPLEX_SAMPLES - frame_parms->nb_prefix_samples;
|
||||
|
||||
|
||||
LOG_D(PHY,"[UE%d] Initial sync : Estimated PSS position %d, Nid2 %d\n",ue->Mod_id,sync_pos,ue->common_vars.eNb_id);
|
||||
|
||||
// SSS detection
|
||||
// PSS is hypothesized in last symbol of first slot in Frame
|
||||
sync_pos_slot = (frame_parms->samples_per_tti>>1) - frame_parms->ofdm_symbol_size - frame_parms->nb_prefix_samples;
|
||||
@@ -351,23 +330,21 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
lte_gold(frame_parms,ue->lte_gold_table[0],frame_parms->Nid_cell);
|
||||
ret = pbch_detection(ue,mode);
|
||||
// LOG_M("rxdata2.m","rxd2",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
|
||||
|
||||
LOG_D(PHY,"FDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
|
||||
frame_parms->Nid_cell,metric_fdd_ncp,phase_fdd_ncp,flip_fdd_ncp,ret);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ret==-1){
|
||||
ue->FeMBMS_active = 2;
|
||||
ret = pbch_detection(ue,mode);
|
||||
if (ret==-1){
|
||||
ue->FeMBMS_active = 0;
|
||||
frame_parms->FeMBMS_active = 0;
|
||||
}
|
||||
else frame_parms->FeMBMS_active = 1;
|
||||
if (ret==-1) {
|
||||
ue->FeMBMS_active = 2;
|
||||
ret = pbch_detection(ue,mode);
|
||||
|
||||
if (ret==-1) {
|
||||
ue->FeMBMS_active = 0;
|
||||
frame_parms->FeMBMS_active = 0;
|
||||
} else frame_parms->FeMBMS_active = 1;
|
||||
|
||||
LOG_D(PHY,"FeMBMS Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
|
||||
frame_parms->Nid_cell,metric_fdd_ncp,phase_fdd_ncp,flip_fdd_ncp,ret);
|
||||
}
|
||||
#endif
|
||||
frame_parms->Nid_cell,metric_fdd_ncp,phase_fdd_ncp,flip_fdd_ncp,ret);
|
||||
}
|
||||
} else {
|
||||
LOG_D(PHY,"FDD Normal prefix: SSS error condition: sync_pos %d, sync_pos_slot %d\n", sync_pos, sync_pos_slot);
|
||||
}
|
||||
@@ -407,23 +384,19 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
// LOG_M("rxdata3.m","rxd3",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
|
||||
LOG_D(PHY,"FDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
|
||||
frame_parms->Nid_cell,metric_fdd_ecp,phase_fdd_ecp,flip_fdd_ecp,ret);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (ret==-1){
|
||||
ue->FeMBMS_active = 2;
|
||||
ret = pbch_detection(ue,mode);
|
||||
if (ret==-1){
|
||||
ue->FeMBMS_active = 0;
|
||||
frame_parms->FeMBMS_active = 0;
|
||||
}
|
||||
else frame_parms->FeMBMS_active = 1;
|
||||
LOG_I(PHY,"FeMBMS CAS Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
|
||||
frame_parms->Nid_cell,metric_fdd_ecp,phase_fdd_ecp,flip_fdd_ecp,ret);
|
||||
|
||||
if (ret==-1) {
|
||||
ue->FeMBMS_active = 2;
|
||||
ret = pbch_detection(ue,mode);
|
||||
|
||||
if (ret==-1) {
|
||||
ue->FeMBMS_active = 0;
|
||||
frame_parms->FeMBMS_active = 0;
|
||||
} else frame_parms->FeMBMS_active = 1;
|
||||
|
||||
LOG_I(PHY,"FeMBMS CAS Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
|
||||
frame_parms->Nid_cell,metric_fdd_ecp,phase_fdd_ecp,flip_fdd_ecp,ret);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
} else {
|
||||
LOG_D(PHY,"FDD Extended prefix: SSS error condition: sync_pos %d, sync_pos_slot %d\n", sync_pos, sync_pos_slot);
|
||||
}
|
||||
@@ -461,9 +434,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
lte_gold(frame_parms,ue->lte_gold_table[0],frame_parms->Nid_cell);
|
||||
ret = pbch_detection(ue,mode);
|
||||
// LOG_M("rxdata4.m","rxd4",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
|
||||
|
||||
LOG_D(PHY,"TDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
|
||||
|
||||
frame_parms->Nid_cell,metric_tdd_ncp,phase_tdd_ncp,flip_tdd_ncp,ret);
|
||||
|
||||
if (ret==-1) {
|
||||
@@ -497,9 +468,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
lte_gold(frame_parms,ue->lte_gold_table[0],frame_parms->Nid_cell);
|
||||
ret = pbch_detection(ue,mode);
|
||||
// LOG_M("rxdata5.m","rxd5",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
|
||||
|
||||
LOG_D(PHY,"TDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d\n",
|
||||
|
||||
frame_parms->Nid_cell,metric_tdd_ecp,phase_tdd_ecp,flip_tdd_ecp,ret);
|
||||
}
|
||||
}
|
||||
@@ -526,7 +495,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
generate_pcfich_reg_mapping(frame_parms);
|
||||
generate_phich_reg_mapping(frame_parms);
|
||||
ue->pbch_vars[0]->pdu_errors_conseq=0;
|
||||
|
||||
}
|
||||
|
||||
LOG_I(PHY, "[UE %d] Frame %d RRC Measurements => rssi %3.1f dBm (dig %3.1f dB, gain %d), N0 %d dBm, rsrp %3.1f dBm/RE, rsrq %3.1f dB\n",ue->Mod_id,
|
||||
@@ -563,7 +531,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
metric_tdd_ecp,Nid_cell_tdd_ecp);*/
|
||||
LOG_D(PHY,"[UE%d] Initial sync : Estimated Nid_cell %d, Frame_type %d\n",ue->Mod_id,
|
||||
frame_parms->Nid_cell,frame_parms->frame_type);
|
||||
|
||||
ue->UE_mode[0] = NOT_SYNCHED;
|
||||
ue->pbch_vars[0]->pdu_errors_last=ue->pbch_vars[0]->pdu_errors;
|
||||
ue->pbch_vars[0]->pdu_errors++;
|
||||
@@ -588,7 +555,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode) {
|
||||
// we might add a low-pass filter here later
|
||||
ue->measurements.rx_power_avg[0] = rx_power/frame_parms->nb_antennas_rx;
|
||||
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] );
|
||||
|
||||
if (IS_SOFTMODEM_BASICSIM || IS_SOFTMODEM_RFSIM )
|
||||
|
||||
@@ -53,17 +53,12 @@ uint16_t pbch_extract(int **rxdataF,
|
||||
int **dl_ch_estimates_ext,
|
||||
uint32_t symbol,
|
||||
uint32_t high_speed_flag,
|
||||
LTE_DL_FRAME_PARMS *frame_parms)
|
||||
{
|
||||
|
||||
|
||||
LTE_DL_FRAME_PARMS *frame_parms) {
|
||||
uint16_t rb,nb_rb=6;
|
||||
uint8_t i,j,aarx,aatx;
|
||||
int *dl_ch0,*dl_ch0_ext,*rxF,*rxF_ext;
|
||||
|
||||
uint32_t nsymb = (frame_parms->Ncp==0) ? 7:6;
|
||||
uint32_t symbol_mod = symbol % nsymb;
|
||||
|
||||
int rx_offset = frame_parms->ofdm_symbol_size-3*12;
|
||||
int ch_offset = frame_parms->N_RB_DL*6-3*12;
|
||||
int nushiftmod3 = frame_parms->nushift%3;
|
||||
@@ -74,7 +69,6 @@ uint16_t pbch_extract(int **rxdataF,
|
||||
(rx_offset + (symbol*(frame_parms->ofdm_symbol_size)))*2,
|
||||
LTE_CE_OFFSET+ch_offset+(symbol_mod*(frame_parms->ofdm_symbol_size)));
|
||||
*/
|
||||
|
||||
rxF = &rxdataF[aarx][(rx_offset + (symbol*(frame_parms->ofdm_symbol_size)))];
|
||||
rxF_ext = &rxdataF_ext[aarx][symbol_mod*(6*12)];
|
||||
|
||||
@@ -141,7 +135,6 @@ uint16_t pbch_extract(int **rxdataF,
|
||||
}
|
||||
}
|
||||
} //tx antenna loop
|
||||
|
||||
}
|
||||
|
||||
return(0);
|
||||
@@ -152,12 +145,9 @@ uint16_t pbch_extract(int **rxdataF,
|
||||
//compute average channel_level on each (TX,RX) antenna pair
|
||||
int pbch_channel_level(int **dl_ch_estimates_ext,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint32_t symbol)
|
||||
{
|
||||
|
||||
uint32_t symbol) {
|
||||
int16_t rb, nb_rb=6;
|
||||
uint8_t aatx,aarx;
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
__m128i avg128;
|
||||
__m128i *dl_ch128;
|
||||
@@ -166,29 +156,27 @@ int pbch_channel_level(int **dl_ch_estimates_ext,
|
||||
int16x8_t *dl_ch128;
|
||||
#endif
|
||||
int avg1=0,avg2=0;
|
||||
|
||||
uint32_t nsymb = (frame_parms->Ncp==0) ? 7:6;
|
||||
uint32_t symbol_mod = symbol % nsymb;
|
||||
|
||||
for (aatx=0; aatx<4; aatx++) //frame_parms->nb_antenna_ports_eNB;aatx++)
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
//clear average level
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
avg128 = _mm_setzero_si128();
|
||||
dl_ch128=(__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol_mod*6*12];
|
||||
#elif defined(__arm__)
|
||||
avg128 = vdupq_n_s32(0);
|
||||
dl_ch128=(int16x8_t *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol_mod*6*12];
|
||||
|
||||
#endif
|
||||
|
||||
for (rb=0; rb<nb_rb; rb++) {
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[0],dl_ch128[0]));
|
||||
avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[1],dl_ch128[1]));
|
||||
avg128 = _mm_add_epi32(avg128,_mm_madd_epi16(dl_ch128[2],dl_ch128[2]));
|
||||
#elif defined(__arm__)
|
||||
// to be filled in
|
||||
// to be filled in
|
||||
#endif
|
||||
dl_ch128+=3;
|
||||
/*
|
||||
@@ -200,56 +188,51 @@ int pbch_channel_level(int **dl_ch_estimates_ext,
|
||||
*/
|
||||
}
|
||||
|
||||
avg1 = (((int*)&avg128)[0] +
|
||||
((int*)&avg128)[1] +
|
||||
((int*)&avg128)[2] +
|
||||
((int*)&avg128)[3])/(nb_rb*12);
|
||||
avg1 = (((int *)&avg128)[0] +
|
||||
((int *)&avg128)[1] +
|
||||
((int *)&avg128)[2] +
|
||||
((int *)&avg128)[3])/(nb_rb*12);
|
||||
|
||||
if (avg1>avg2)
|
||||
avg2 = avg1;
|
||||
|
||||
//msg("Channel level : %d, %d\n",avg1, avg2);
|
||||
}
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
#endif
|
||||
return(avg2);
|
||||
|
||||
}
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
__m128i mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3;
|
||||
__m128i mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3;
|
||||
#elif defined(__arm__)
|
||||
int16x8_t mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3;
|
||||
int16x8_t mmtmpP0,mmtmpP1,mmtmpP2,mmtmpP3;
|
||||
#endif
|
||||
void pbch_channel_compensation(int **rxdataF_ext,
|
||||
int **dl_ch_estimates_ext,
|
||||
int **rxdataF_comp,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t symbol,
|
||||
uint8_t output_shift)
|
||||
{
|
||||
|
||||
uint8_t output_shift) {
|
||||
uint16_t rb,nb_rb=6;
|
||||
uint8_t aatx,aarx,symbol_mod;
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
__m128i *dl_ch128,*rxdataF128,*rxdataF_comp128;
|
||||
#elif defined(__arm__)
|
||||
|
||||
#endif
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
|
||||
for (aatx=0; aatx<4; aatx++) //frame_parms->nb_antenna_ports_eNB;aatx++)
|
||||
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
dl_ch128 = (__m128i *)&dl_ch_estimates_ext[(aatx<<1)+aarx][symbol_mod*6*12];
|
||||
rxdataF128 = (__m128i *)&rxdataF_ext[aarx][symbol_mod*6*12];
|
||||
rxdataF_comp128 = (__m128i *)&rxdataF_comp[(aatx<<1)+aarx][symbol_mod*6*12];
|
||||
|
||||
#elif defined(__arm__)
|
||||
// to be filled in
|
||||
// to be filled in
|
||||
#endif
|
||||
|
||||
for (rb=0; rb<nb_rb; rb++) {
|
||||
@@ -261,7 +244,7 @@ void pbch_channel_compensation(int **rxdataF_ext,
|
||||
// mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
|
||||
mmtmpP1 = _mm_shufflelo_epi16(dl_ch128[0],_MM_SHUFFLE(2,3,0,1));
|
||||
mmtmpP1 = _mm_shufflehi_epi16(mmtmpP1,_MM_SHUFFLE(2,3,0,1));
|
||||
mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i*)&conjugate[0]);
|
||||
mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i *)&conjugate[0]);
|
||||
// print_ints("im",&mmtmpP1);
|
||||
mmtmpP1 = _mm_madd_epi16(mmtmpP1,rxdataF128[0]);
|
||||
// mmtmpP1 contains imag part of 4 consecutive outputs (32-bit)
|
||||
@@ -277,13 +260,12 @@ void pbch_channel_compensation(int **rxdataF_ext,
|
||||
// print_shorts("rx:",rxdataF128);
|
||||
// print_shorts("ch:",dl_ch128);
|
||||
// print_shorts("pack:",rxdataF_comp128);
|
||||
|
||||
// multiply by conjugated channel
|
||||
mmtmpP0 = _mm_madd_epi16(dl_ch128[1],rxdataF128[1]);
|
||||
// mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
|
||||
mmtmpP1 = _mm_shufflelo_epi16(dl_ch128[1],_MM_SHUFFLE(2,3,0,1));
|
||||
mmtmpP1 = _mm_shufflehi_epi16(mmtmpP1,_MM_SHUFFLE(2,3,0,1));
|
||||
mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i*)&conjugate[0]);
|
||||
mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i *)&conjugate[0]);
|
||||
mmtmpP1 = _mm_madd_epi16(mmtmpP1,rxdataF128[1]);
|
||||
// mmtmpP1 contains imag part of 4 consecutive outputs (32-bit)
|
||||
mmtmpP0 = _mm_srai_epi32(mmtmpP0,output_shift);
|
||||
@@ -301,7 +283,7 @@ void pbch_channel_compensation(int **rxdataF_ext,
|
||||
// mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
|
||||
mmtmpP1 = _mm_shufflelo_epi16(dl_ch128[2],_MM_SHUFFLE(2,3,0,1));
|
||||
mmtmpP1 = _mm_shufflehi_epi16(mmtmpP1,_MM_SHUFFLE(2,3,0,1));
|
||||
mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i*)&conjugate[0]);
|
||||
mmtmpP1 = _mm_sign_epi16(mmtmpP1,*(__m128i *)&conjugate[0]);
|
||||
mmtmpP1 = _mm_madd_epi16(mmtmpP1,rxdataF128[2]);
|
||||
// mmtmpP1 contains imag part of 4 consecutive outputs (32-bit)
|
||||
mmtmpP0 = _mm_srai_epi32(mmtmpP0,output_shift);
|
||||
@@ -312,7 +294,6 @@ void pbch_channel_compensation(int **rxdataF_ext,
|
||||
// print_shorts("rx:",rxdataF128+2);
|
||||
// print_shorts("ch:",dl_ch128+2);
|
||||
// print_shorts("pack:",rxdataF_comp128+2);
|
||||
|
||||
dl_ch128+=3;
|
||||
rxdataF128+=3;
|
||||
rxdataF_comp128+=3;
|
||||
@@ -321,11 +302,13 @@ void pbch_channel_compensation(int **rxdataF_ext,
|
||||
rxdataF128+=2;
|
||||
rxdataF_comp128+=2;
|
||||
}
|
||||
|
||||
#elif defined(__arm__)
|
||||
// to be filled in
|
||||
// to be filled in
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
@@ -334,9 +317,7 @@ void pbch_channel_compensation(int **rxdataF_ext,
|
||||
|
||||
void pbch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int **rxdataF_comp,
|
||||
uint8_t symbol)
|
||||
{
|
||||
|
||||
uint8_t symbol) {
|
||||
uint8_t aatx, symbol_mod;
|
||||
int i, nb_rb=6;
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
@@ -354,19 +335,19 @@ void pbch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
#elif defined(__arm__)
|
||||
rxdataF_comp128_0 = (int16x8_t *)&rxdataF_comp[(aatx<<1)][symbol_mod*6*12];
|
||||
rxdataF_comp128_1 = (int16x8_t *)&rxdataF_comp[(aatx<<1)+1][symbol_mod*6*12];
|
||||
|
||||
#endif
|
||||
|
||||
// MRC on each re of rb, both on MF output and magnitude (for 16QAM/64QAM llr computation)
|
||||
for (i=0; i<nb_rb*3; i++) {
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
rxdataF_comp128_0[i] = _mm_adds_epi16(_mm_srai_epi16(rxdataF_comp128_0[i],1),_mm_srai_epi16(rxdataF_comp128_1[i],1));
|
||||
#elif defined(__arm__)
|
||||
rxdataF_comp128_0[i] = vhaddq_s16(rxdataF_comp128_0[i],rxdataF_comp128_1[i]);
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
_mm_empty();
|
||||
_m_empty();
|
||||
@@ -374,14 +355,12 @@ void pbch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
void pbch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int8_t* llr,
|
||||
int8_t *llr,
|
||||
uint32_t length,
|
||||
uint8_t frame_mod4)
|
||||
{
|
||||
uint8_t frame_mod4) {
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
|
||||
reset = 1;
|
||||
// x1 is set in first call to lte_gold_generic
|
||||
x2 = frame_parms->Nid_cell; //this is c_init in 36.211 Sec 6.6.1
|
||||
@@ -396,7 +375,6 @@ void pbch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
// take the quarter of the PBCH that corresponds to this frame
|
||||
if ((i>=(frame_mod4*(length>>2))) && (i<((1+frame_mod4)*(length>>2)))) {
|
||||
|
||||
if (((s>>(i%32))&1)==0)
|
||||
llr[i] = -llr[i];
|
||||
}
|
||||
@@ -405,47 +383,33 @@ void pbch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
|
||||
void pbch_alamouti(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int **rxdataF_comp,
|
||||
uint8_t symbol)
|
||||
{
|
||||
|
||||
|
||||
uint8_t symbol) {
|
||||
int16_t *rxF0,*rxF1;
|
||||
// __m128i *ch_mag0,*ch_mag1,*ch_mag0b,*ch_mag1b;
|
||||
uint8_t rb,re,symbol_mod;
|
||||
int jj;
|
||||
|
||||
// printf("Doing alamouti\n");
|
||||
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
|
||||
jj = (symbol_mod*6*12);
|
||||
|
||||
rxF0 = (int16_t*)&rxdataF_comp[0][jj]; //tx antenna 0 h0*y
|
||||
rxF1 = (int16_t*)&rxdataF_comp[2][jj]; //tx antenna 1 h1*y
|
||||
rxF0 = (int16_t *)&rxdataF_comp[0][jj]; //tx antenna 0 h0*y
|
||||
rxF1 = (int16_t *)&rxdataF_comp[2][jj]; //tx antenna 1 h1*y
|
||||
|
||||
for (rb=0; rb<6; rb++) {
|
||||
|
||||
for (re=0; re<12; re+=2) {
|
||||
|
||||
// Alamouti RX combining
|
||||
|
||||
rxF0[0] = rxF0[0] + rxF1[2];
|
||||
rxF0[1] = rxF0[1] - rxF1[3];
|
||||
|
||||
rxF0[2] = rxF0[2] - rxF1[0];
|
||||
rxF0[3] = rxF0[3] + rxF1[1];
|
||||
|
||||
rxF0+=4;
|
||||
rxF1+=4;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void pbch_quantize(int8_t *pbch_llr8,
|
||||
int16_t *pbch_llr,
|
||||
uint16_t len)
|
||||
{
|
||||
|
||||
uint16_t len) {
|
||||
uint16_t i;
|
||||
|
||||
for (i=0; i<len; i++) {
|
||||
@@ -455,7 +419,6 @@ void pbch_quantize(int8_t *pbch_llr8,
|
||||
pbch_llr8[i]=-8;
|
||||
else
|
||||
pbch_llr8[i] = (char)(pbch_llr[i]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -469,36 +432,27 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
uint8_t eNB_id,
|
||||
MIMO_mode_t mimo_mode,
|
||||
uint32_t high_speed_flag,
|
||||
uint8_t frame_mod4)
|
||||
{
|
||||
|
||||
uint8_t frame_mod4) {
|
||||
uint8_t log2_maxh;//,aatx,aarx;
|
||||
int max_h=0;
|
||||
|
||||
int symbol,i;
|
||||
uint32_t nsymb = (frame_parms->Ncp==0) ? 14:12;
|
||||
uint16_t pbch_E;
|
||||
uint8_t pbch_a[8];
|
||||
uint8_t RCC;
|
||||
|
||||
int8_t *pbch_e_rx;
|
||||
uint8_t *decoded_output = lte_ue_pbch_vars->decoded_output;
|
||||
uint16_t crc;
|
||||
|
||||
|
||||
// pbch_D = 16+PBCH_A;
|
||||
|
||||
pbch_E = (frame_parms->Ncp==0) ? 1920 : 1728; //RE/RB * #RB * bits/RB (QPSK)
|
||||
pbch_e_rx = <e_ue_pbch_vars->llr[frame_mod4*(pbch_E>>2)];
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"[PBCH] starting symbol loop (Ncp %d, frame_mod4 %d,mimo_mode %d\n",frame_parms->Ncp,frame_mod4,mimo_mode);
|
||||
#endif
|
||||
|
||||
// clear LLR buffer
|
||||
memset(lte_ue_pbch_vars->llr,0,pbch_E);
|
||||
|
||||
for (symbol=(nsymb>>1); symbol<(nsymb>>1)+4; symbol++) {
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"[PBCH] starting extract\n");
|
||||
#endif
|
||||
@@ -513,16 +467,13 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
LOG_D(PHY,"[PHY] PBCH Symbol %d\n",symbol);
|
||||
LOG_D(PHY,"[PHY] PBCH starting channel_level\n");
|
||||
#endif
|
||||
|
||||
max_h = pbch_channel_level(lte_ue_pbch_vars->dl_ch_estimates_ext,
|
||||
frame_parms,
|
||||
symbol);
|
||||
log2_maxh = 3+(log2_approx(max_h)/2);
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"[PHY] PBCH log2_maxh = %d (%d)\n",log2_maxh,max_h);
|
||||
#endif
|
||||
|
||||
pbch_channel_compensation(lte_ue_pbch_vars->rxdataF_ext,
|
||||
lte_ue_pbch_vars->dl_ch_estimates_ext,
|
||||
lte_ue_pbch_vars->rxdataF_comp,
|
||||
@@ -535,7 +486,6 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
lte_ue_pbch_vars->rxdataF_comp,
|
||||
symbol);
|
||||
|
||||
|
||||
if (mimo_mode == ALAMOUTI) {
|
||||
pbch_alamouti(frame_parms,lte_ue_pbch_vars->rxdataF_comp,symbol);
|
||||
} else if (mimo_mode != SISO) {
|
||||
@@ -545,60 +495,38 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
|
||||
if (symbol>(nsymb>>1)+1) {
|
||||
pbch_quantize(pbch_e_rx,
|
||||
(short*)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
|
||||
(short *)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
|
||||
144);
|
||||
|
||||
pbch_e_rx+=144;
|
||||
} else {
|
||||
pbch_quantize(pbch_e_rx,
|
||||
(short*)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
|
||||
(short *)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
|
||||
96);
|
||||
|
||||
pbch_e_rx+=96;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
pbch_e_rx = lte_ue_pbch_vars->llr;
|
||||
|
||||
|
||||
|
||||
//un-scrambling
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"[PBCH] doing unscrambling\n");
|
||||
#endif
|
||||
|
||||
|
||||
pbch_unscrambling(frame_parms,
|
||||
pbch_e_rx,
|
||||
pbch_E,
|
||||
frame_mod4);
|
||||
|
||||
|
||||
|
||||
//un-rate matching
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"[PBCH] doing un-rate-matching\n");
|
||||
#endif
|
||||
|
||||
|
||||
memset(dummy_w_rx,0,3*3*(16+PBCH_A));
|
||||
RCC = generate_dummy_w_cc(16+PBCH_A,
|
||||
dummy_w_rx);
|
||||
|
||||
|
||||
lte_rate_matching_cc_rx(RCC,pbch_E,pbch_w_rx,dummy_w_rx,pbch_e_rx);
|
||||
|
||||
sub_block_deinterleaving_cc((unsigned int)(PBCH_A+16),
|
||||
&pbch_d_rx[96],
|
||||
&pbch_w_rx[0]);
|
||||
|
||||
memset(pbch_a,0,((16+PBCH_A)>>3));
|
||||
|
||||
|
||||
|
||||
|
||||
phy_viterbi_lte_sse2(pbch_d_rx+96,pbch_a,16+PBCH_A);
|
||||
|
||||
// Fix byte endian of PBCH (bit 23 goes in first)
|
||||
@@ -611,13 +539,11 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
LOG_I(PHY,"[PBCH] pbch_a[%d] = %x\n",i,decoded_output[i]);
|
||||
|
||||
#endif //DEBUG_PBCH
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_I(PHY,"PBCH CRC %x : %x\n",
|
||||
crc16(pbch_a,PBCH_A),
|
||||
((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
|
||||
crc16(pbch_a,PBCH_A),
|
||||
((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
|
||||
#endif
|
||||
|
||||
crc = (crc16(pbch_a,PBCH_A)>>16) ^
|
||||
(((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
|
||||
|
||||
@@ -629,20 +555,16 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
return(4);
|
||||
else
|
||||
return(-1);
|
||||
|
||||
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
void pbch_unscrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int8_t* llr,
|
||||
uint32_t length,
|
||||
uint8_t frame_mod4)
|
||||
{
|
||||
int8_t *llr,
|
||||
uint32_t length,
|
||||
uint8_t frame_mod4) {
|
||||
int i;
|
||||
uint8_t reset;
|
||||
uint32_t x1, x2, s=0;
|
||||
|
||||
reset = 1;
|
||||
// x1 is set in first call to lte_gold_generic
|
||||
x2 = frame_parms->Nid_cell+(1<<9); //this is c_init for FeMBMS in 36.211 Sec 6.6.1
|
||||
@@ -654,9 +576,9 @@ void pbch_unscrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
// printf("lte_gold[%d]=%x\n",i,s);
|
||||
reset = 0;
|
||||
}
|
||||
|
||||
// take the quarter of the PBCH that corresponds to this frame
|
||||
if ((i>=(frame_mod4*(length>>2))) && (i<((1+frame_mod4)*(length>>2)))) {
|
||||
|
||||
if (((s>>(i%32))&1)==0)
|
||||
llr[i] = -llr[i];
|
||||
}
|
||||
@@ -664,41 +586,32 @@ void pbch_unscrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
}
|
||||
|
||||
uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
LTE_UE_PBCH *lte_ue_pbch_vars,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t eNB_id,
|
||||
MIMO_mode_t mimo_mode,
|
||||
uint32_t high_speed_flag,
|
||||
uint8_t frame_mod4)
|
||||
{
|
||||
|
||||
LTE_UE_PBCH *lte_ue_pbch_vars,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t eNB_id,
|
||||
MIMO_mode_t mimo_mode,
|
||||
uint32_t high_speed_flag,
|
||||
uint8_t frame_mod4) {
|
||||
uint8_t log2_maxh;//,aatx,aarx;
|
||||
int max_h=0;
|
||||
|
||||
int symbol,i;
|
||||
uint32_t nsymb = (frame_parms->Ncp==0) ? 14:12;
|
||||
uint16_t pbch_E;
|
||||
uint8_t pbch_a[8];
|
||||
uint8_t RCC;
|
||||
|
||||
int8_t *pbch_e_rx;
|
||||
uint8_t *decoded_output = lte_ue_pbch_vars->decoded_output;
|
||||
uint16_t crc;
|
||||
|
||||
|
||||
// pbch_D = 16+PBCH_A;
|
||||
|
||||
pbch_E = (frame_parms->Ncp==0) ? 1920 : 1728; //RE/RB * #RB * bits/RB (QPSK)
|
||||
pbch_e_rx = <e_ue_pbch_vars->llr[frame_mod4*(pbch_E>>2)];
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"[PBCH] starting symbol loop (Ncp %d, frame_mod4 %d,mimo_mode %d\n",frame_parms->Ncp,frame_mod4,mimo_mode);
|
||||
#endif
|
||||
|
||||
// clear LLR buffer
|
||||
memset(lte_ue_pbch_vars->llr,0,pbch_E);
|
||||
|
||||
for (symbol=(nsymb>>1); symbol<(nsymb>>1)+4; symbol++) {
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"[PBCH] starting extract\n");
|
||||
#endif
|
||||
@@ -713,17 +626,13 @@ uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
LOG_D(PHY,"[PHY] PBCH Symbol %d\n",symbol);
|
||||
LOG_D(PHY,"[PHY] PBCH starting channel_level\n");
|
||||
#endif
|
||||
|
||||
max_h = pbch_channel_level(lte_ue_pbch_vars->dl_ch_estimates_ext,
|
||||
frame_parms,
|
||||
symbol);
|
||||
log2_maxh = 3+(log2_approx(max_h)/2);
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
|
||||
LOG_D(PHY,"[PHY] PBCH log2_maxh = %d (%d)\n",log2_maxh,max_h);
|
||||
#endif
|
||||
|
||||
pbch_channel_compensation(lte_ue_pbch_vars->rxdataF_ext,
|
||||
lte_ue_pbch_vars->dl_ch_estimates_ext,
|
||||
lte_ue_pbch_vars->rxdataF_comp,
|
||||
@@ -736,7 +645,6 @@ uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
lte_ue_pbch_vars->rxdataF_comp,
|
||||
symbol);
|
||||
|
||||
|
||||
if (mimo_mode == ALAMOUTI) {
|
||||
pbch_alamouti(frame_parms,lte_ue_pbch_vars->rxdataF_comp,symbol);
|
||||
} else if (mimo_mode != SISO) {
|
||||
@@ -746,58 +654,38 @@ uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
|
||||
if (symbol>(nsymb>>1)+1) {
|
||||
pbch_quantize(pbch_e_rx,
|
||||
(short*)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
|
||||
(short *)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
|
||||
144);
|
||||
|
||||
pbch_e_rx+=144;
|
||||
} else {
|
||||
pbch_quantize(pbch_e_rx,
|
||||
(short*)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
|
||||
(short *)&(lte_ue_pbch_vars->rxdataF_comp[0][(symbol%(nsymb>>1))*72]),
|
||||
96);
|
||||
|
||||
pbch_e_rx+=96;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
pbch_e_rx = lte_ue_pbch_vars->llr;
|
||||
|
||||
|
||||
|
||||
//un-scrambling
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"[PBCH] doing unscrambling\n");
|
||||
#endif
|
||||
|
||||
pbch_unscrambling_fembms(frame_parms,
|
||||
pbch_e_rx,
|
||||
pbch_E,
|
||||
frame_mod4);
|
||||
|
||||
|
||||
pbch_unscrambling_fembms(frame_parms,
|
||||
pbch_e_rx,
|
||||
pbch_E,
|
||||
frame_mod4);
|
||||
//un-rate matching
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_D(PHY,"[PBCH] doing un-rate-matching\n");
|
||||
#endif
|
||||
|
||||
|
||||
memset(dummy_w_rx,0,3*3*(16+PBCH_A));
|
||||
RCC = generate_dummy_w_cc(16+PBCH_A,
|
||||
dummy_w_rx);
|
||||
|
||||
|
||||
lte_rate_matching_cc_rx(RCC,pbch_E,pbch_w_rx,dummy_w_rx,pbch_e_rx);
|
||||
|
||||
sub_block_deinterleaving_cc((unsigned int)(PBCH_A+16),
|
||||
&pbch_d_rx[96],
|
||||
&pbch_w_rx[0]);
|
||||
|
||||
memset(pbch_a,0,((16+PBCH_A)>>3));
|
||||
|
||||
|
||||
|
||||
|
||||
phy_viterbi_lte_sse2(pbch_d_rx+96,pbch_a,16+PBCH_A);
|
||||
|
||||
// Fix byte endian of PBCH (bit 23 goes in first)
|
||||
@@ -810,17 +698,15 @@ pbch_unscrambling_fembms(frame_parms,
|
||||
LOG_I(PHY,"[PBCH] pbch_a[%d] = %x\n",i,decoded_output[i]);
|
||||
|
||||
#endif //DEBUG_PBCH
|
||||
|
||||
#ifdef DEBUG_PBCH
|
||||
LOG_I(PHY,"PBCH CRC %x : %x\n",
|
||||
crc16(pbch_a,PBCH_A),
|
||||
((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
|
||||
crc16(pbch_a,PBCH_A),
|
||||
((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
|
||||
#endif
|
||||
|
||||
crc = (crc16(pbch_a,PBCH_A)>>16) ^
|
||||
(((uint16_t)pbch_a[PBCH_A>>3]<<8)+pbch_a[(PBCH_A>>3)+1]);
|
||||
|
||||
if (crc == 0x0000)
|
||||
if (crc == 0x0000)
|
||||
return(1);
|
||||
else if (crc == 0xffff)
|
||||
return(2);
|
||||
@@ -829,4 +715,4 @@ pbch_unscrambling_fembms(frame_parms,
|
||||
else
|
||||
return(-1);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -73,10 +73,10 @@ int rx_pmch(PHY_VARS_UE *phy_vars_ue,
|
||||
unsigned char symbol);
|
||||
|
||||
int rx_pmch_khz_1dot25(PHY_VARS_UE *ue,
|
||||
unsigned char eNB_id,
|
||||
uint8_t subframe/*,
|
||||
unsigned char eNB_id,
|
||||
uint8_t subframe/*,
|
||||
unsigned char symbol*/
|
||||
,int mcs);
|
||||
,int mcs);
|
||||
|
||||
/** \brief Dump OCTAVE/MATLAB files for PMCH debugging
|
||||
@param phy_vars_ue Pointer to UE variables
|
||||
@@ -860,13 +860,13 @@ void dlsch_dual_stream_correlation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char output_shift);
|
||||
|
||||
void dlsch_dual_stream_correlationTM34(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char symbol,
|
||||
unsigned short nb_rb,
|
||||
int **dl_ch_estimates_ext,
|
||||
int **dl_ch_estimates_ext_i,
|
||||
int **dl_ch_rho_ext,
|
||||
unsigned char output_shift0,
|
||||
unsigned char output_shift1);
|
||||
unsigned char symbol,
|
||||
unsigned short nb_rb,
|
||||
int **dl_ch_estimates_ext,
|
||||
int **dl_ch_estimates_ext_i,
|
||||
int **dl_ch_rho_ext,
|
||||
unsigned char output_shift0,
|
||||
unsigned char output_shift1);
|
||||
//This function is used to compute multiplications in Hhermitian * H matrix
|
||||
void conjch0_mult_ch1(int *ch0,
|
||||
int *ch1,
|
||||
@@ -875,18 +875,18 @@ void conjch0_mult_ch1(int *ch0,
|
||||
unsigned char output_shift0);
|
||||
|
||||
void construct_HhH_elements(int *ch0conj_ch0,
|
||||
int *ch1conj_ch1,
|
||||
int *ch2conj_ch2,
|
||||
int *ch3conj_ch3,
|
||||
int *ch0conj_ch1,
|
||||
int *ch1conj_ch0,
|
||||
int *ch2conj_ch3,
|
||||
int *ch3conj_ch2,
|
||||
int32_t *after_mf_00,
|
||||
int32_t *after_mf_01,
|
||||
int32_t *after_mf_10,
|
||||
int32_t *after_mf_11,
|
||||
unsigned short nb_rb);
|
||||
int *ch1conj_ch1,
|
||||
int *ch2conj_ch2,
|
||||
int *ch3conj_ch3,
|
||||
int *ch0conj_ch1,
|
||||
int *ch1conj_ch0,
|
||||
int *ch2conj_ch3,
|
||||
int *ch3conj_ch2,
|
||||
int32_t *after_mf_00,
|
||||
int32_t *after_mf_01,
|
||||
int32_t *after_mf_10,
|
||||
int32_t *after_mf_11,
|
||||
unsigned short nb_rb);
|
||||
|
||||
void squared_matrix_element(int32_t *Hh_h_00,
|
||||
int32_t *Hh_h_00_sq,
|
||||
@@ -937,19 +937,19 @@ void dlsch_channel_compensation_TM56(int **rxdataF_ext,
|
||||
|
||||
|
||||
void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_UE_PDSCH *lte_ue_pdsch_vars,
|
||||
PHY_MEASUREMENTS *phy_measurements,
|
||||
int eNB_id,
|
||||
unsigned char symbol,
|
||||
unsigned char mod_order0,
|
||||
unsigned char mod_order1,
|
||||
int harq_pid,
|
||||
int round,
|
||||
MIMO_mode_t mimo_mode,
|
||||
unsigned short nb_rb,
|
||||
unsigned short mmse_flag,
|
||||
unsigned char output_shift0,
|
||||
unsigned char output_shift1);
|
||||
LTE_UE_PDSCH *lte_ue_pdsch_vars,
|
||||
PHY_MEASUREMENTS *phy_measurements,
|
||||
int eNB_id,
|
||||
unsigned char symbol,
|
||||
unsigned char mod_order0,
|
||||
unsigned char mod_order1,
|
||||
int harq_pid,
|
||||
int round,
|
||||
MIMO_mode_t mimo_mode,
|
||||
unsigned short nb_rb,
|
||||
unsigned short mmse_flag,
|
||||
unsigned char output_shift0,
|
||||
unsigned char output_shift1);
|
||||
|
||||
|
||||
/** \brief This function computes the average channel level over all allocated RBs and antennas (TX/RX) in order to compute output shift for compensated signal
|
||||
@@ -999,10 +999,10 @@ void dlsch_channel_level_TM56(int32_t **dl_ch_estimates_ext,
|
||||
uint16_t nb_rb);
|
||||
|
||||
void dlsch_channel_level_TM7(int32_t **dl_bf_ch_estimates_ext,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t *avg,
|
||||
uint8_t pilots_flag,
|
||||
uint16_t nb_rb);
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t *avg,
|
||||
uint8_t pilots_flag,
|
||||
uint16_t nb_rb);
|
||||
|
||||
void dlsch_scale_channel(int32_t **dl_ch_estimates_ext,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
@@ -1090,7 +1090,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
|
||||
int pss_sss_extract(PHY_VARS_UE *phy_vars_ue,
|
||||
int32_t pss_ext[4][72],
|
||||
int32_t sss_ext[4][72],
|
||||
uint8_t subframe);
|
||||
uint8_t subframe);
|
||||
|
||||
/*! \brief Extract only PSS resource elements
|
||||
@param phy_vars_ue Pointer to UE variables
|
||||
@@ -1098,8 +1098,8 @@ int pss_sss_extract(PHY_VARS_UE *phy_vars_ue,
|
||||
@returns 0 on success
|
||||
*/
|
||||
int pss_only_extract(PHY_VARS_UE *phy_vars_ue,
|
||||
int32_t pss_ext[4][72],
|
||||
uint8_t subframe);
|
||||
int32_t pss_ext[4][72],
|
||||
uint8_t subframe);
|
||||
|
||||
/*! \brief Extract only SSS resource elements
|
||||
@param phy_vars_ue Pointer to UE variables
|
||||
@@ -1107,8 +1107,8 @@ int pss_only_extract(PHY_VARS_UE *phy_vars_ue,
|
||||
@returns 0 on success
|
||||
*/
|
||||
int sss_only_extract(PHY_VARS_UE *phy_vars_ue,
|
||||
int32_t sss_ext[4][72],
|
||||
uint8_t subframe);
|
||||
int32_t sss_ext[4][72],
|
||||
uint8_t subframe);
|
||||
|
||||
/*! \brief Performs detection of SSS to find cell ID and other framing parameters (FDD/TDD, normal/extended prefix)
|
||||
@param phy_vars_ue Pointer to UE variables
|
||||
@@ -1131,18 +1131,18 @@ uint16_t rx_pbch(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
uint32_t high_speed_flag,
|
||||
uint8_t frame_mod4);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
/*! \brief receiver for the PBCH FeMBMS
|
||||
\returns number of tx antennas or -1 if error
|
||||
*/
|
||||
uint16_t rx_pbch_fembms(LTE_UE_COMMON *lte_ue_common_vars,
|
||||
LTE_UE_PBCH *lte_ue_pbch_vars,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t eNB_id,
|
||||
MIMO_mode_t mimo_mode,
|
||||
uint32_t high_speed_flag,
|
||||
uint8_t frame_mod4);
|
||||
#endif
|
||||
LTE_UE_PBCH *lte_ue_pbch_vars,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t eNB_id,
|
||||
MIMO_mode_t mimo_mode,
|
||||
uint32_t high_speed_flag,
|
||||
uint8_t frame_mod4);
|
||||
|
||||
|
||||
|
||||
uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue,
|
||||
@@ -1157,7 +1157,7 @@ uint16_t rx_pbch_emul(PHY_VARS_UE *phy_vars_ue,
|
||||
\param length Length of the sequence
|
||||
\param frame_mod4 Frame number modulo 4*/
|
||||
void pbch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int8_t* llr,
|
||||
int8_t *llr,
|
||||
uint32_t length,
|
||||
uint8_t frame_mod4);
|
||||
|
||||
@@ -1231,11 +1231,11 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *phy_vars_ue,
|
||||
uint8_t subframe);
|
||||
|
||||
uint16_t dci_CRNTI_decoding_procedure(PHY_VARS_UE *ue,
|
||||
DCI_ALLOC_t *dci_alloc,
|
||||
uint8_t DCIFormat,
|
||||
uint8_t agregationLevel,
|
||||
int16_t eNB_id,
|
||||
uint8_t subframe);
|
||||
DCI_ALLOC_t *dci_alloc,
|
||||
uint8_t DCIFormat,
|
||||
uint8_t agregationLevel,
|
||||
int16_t eNB_id,
|
||||
uint8_t subframe);
|
||||
|
||||
uint16_t dci_decoding_procedure_emul(LTE_UE_PDCCH **lte_ue_pdcch_vars,
|
||||
uint8_t num_ue_spec_dci,
|
||||
@@ -1307,7 +1307,7 @@ int adjust_G2(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_ord
|
||||
|
||||
|
||||
#ifndef modOrder
|
||||
#define modOrder(I_MCS,I_TBS) ((I_MCS-I_TBS)*2+2) // Find modulation order from I_TBS and I_MCS
|
||||
#define modOrder(I_MCS,I_TBS) ((I_MCS-I_TBS)*2+2) // Find modulation order from I_TBS and I_MCS
|
||||
#endif
|
||||
|
||||
/** \fn uint8_t I_TBS2I_MCS(uint8_t I_TBS);
|
||||
@@ -1335,10 +1335,10 @@ uint8_t SE2I_TBS(float SE,
|
||||
@param txdataF pointer to the frequency domain TX signal
|
||||
@returns 0 on success*/
|
||||
int generate_srs(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
|
||||
int *txdataF,
|
||||
int16_t amp,
|
||||
uint32_t subframe);
|
||||
SOUNDINGRS_UL_CONFIG_DEDICATED *soundingrs_ul_config_dedicated,
|
||||
int *txdataF,
|
||||
int16_t amp,
|
||||
uint32_t subframe);
|
||||
|
||||
|
||||
/*!
|
||||
@@ -1359,9 +1359,9 @@ int32_t generate_srs_tx(PHY_VARS_UE *phy_vars_ue,
|
||||
\brief This function generates the downlink reference signal for the PUSCH according to 36.211 v8.6.0. The DRS occuies the RS defined by rb_alloc and the symbols 2 and 8 for extended CP and 3 and 10 for normal CP.
|
||||
*/
|
||||
int generate_drs_pusch(PHY_VARS_UE *ue,
|
||||
UE_rxtx_proc_t *proc,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **txdataF,
|
||||
UE_rxtx_proc_t *proc,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **txdataF,
|
||||
uint8_t eNB_id,
|
||||
short amp,
|
||||
unsigned int subframe,
|
||||
@@ -1383,11 +1383,11 @@ void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms);
|
||||
@param nB nB from 36.304 (0=4T,1=2T,2=T,3=T/2,4=T/4,5=T/8,6=T/16,7=T/32*/
|
||||
int init_ue_paging_info(PHY_VARS_UE *ue, long defaultPagingCycle, long nB);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void init_mpdcch(PHY_VARS_eNB *eNB);
|
||||
#endif
|
||||
|
||||
int32_t compareints (const void * a, const void * b);
|
||||
void init_mpdcch(PHY_VARS_eNB *eNB);
|
||||
|
||||
|
||||
int32_t compareints (const void *a, const void *b);
|
||||
|
||||
|
||||
void ulsch_modulation(int32_t **txdataF,
|
||||
@@ -1433,18 +1433,18 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
|
||||
uint8_t use_srs);
|
||||
|
||||
int32_t generate_ue_ulsch_params_from_rar(PHY_VARS_UE *phy_vars_ue,
|
||||
UE_rxtx_proc_t *proc,
|
||||
uint8_t eNB_id);
|
||||
UE_rxtx_proc_t *proc,
|
||||
uint8_t eNB_id);
|
||||
double sinr_eff_cqi_calc(PHY_VARS_UE *phy_vars_ue,
|
||||
uint8_t eNB_id,
|
||||
uint8_t subframe);
|
||||
uint8_t subframe);
|
||||
|
||||
uint8_t sinr2cqi(double sinr,uint8_t trans_mode);
|
||||
|
||||
|
||||
int dump_dci(LTE_DL_FRAME_PARMS *frame_parms, DCI_ALLOC_t *dci);
|
||||
|
||||
int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, UE_rxtx_proc_t *proc, char* buffer, int length, runmode_t mode, int input_level_dBm);
|
||||
int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, UE_rxtx_proc_t *proc, char *buffer, int length, runmode_t mode, int input_level_dBm);
|
||||
|
||||
|
||||
|
||||
@@ -1581,7 +1581,7 @@ void pdcch_interleaving(LTE_DL_FRAME_PARMS *frame_parms,int32_t **z, int32_t **w
|
||||
|
||||
void pdcch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t subframe,
|
||||
int8_t* llr,
|
||||
int8_t *llr,
|
||||
uint32_t length);
|
||||
|
||||
|
||||
@@ -1590,7 +1590,7 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int mbsfn_flag,
|
||||
LTE_UE_DLSCH_t *dlsch,
|
||||
int G,
|
||||
int16_t* llr,
|
||||
int16_t *llr,
|
||||
uint8_t q,
|
||||
uint8_t Ns);
|
||||
|
||||
@@ -1621,16 +1621,16 @@ void generate_pucch2x(int32_t **txdataF,
|
||||
uint16_t rnti);
|
||||
|
||||
void generate_pucch3x(int32_t **txdataF,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t ncs_cell[20][7],
|
||||
PUCCH_FMT_t fmt,
|
||||
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
|
||||
uint16_t n3_pucch,
|
||||
uint8_t shortened_format,
|
||||
uint8_t *payload,
|
||||
int16_t amp,
|
||||
uint8_t subframe,
|
||||
uint16_t rnti);
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t ncs_cell[20][7],
|
||||
PUCCH_FMT_t fmt,
|
||||
PUCCH_CONFIG_DEDICATED *pucch_config_dedicated,
|
||||
uint16_t n3_pucch,
|
||||
uint8_t shortened_format,
|
||||
uint8_t *payload,
|
||||
int16_t amp,
|
||||
uint8_t subframe,
|
||||
uint16_t rnti);
|
||||
|
||||
void init_ulsch_power_LUT(void);
|
||||
|
||||
@@ -1688,11 +1688,11 @@ uint8_t get_fid_prach_tdd(module_id_t Mod_id,uint8_t tdd_map_index);
|
||||
@param Xu DFT output
|
||||
*/
|
||||
void compute_prach_seq(uint16_t rootSequenceIndex,
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t zeroCorrelationZoneConfig,
|
||||
uint8_t highSpeedFlag,
|
||||
lte_frame_type_t frame_type,
|
||||
uint32_t X_u[64][839]);
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t zeroCorrelationZoneConfig,
|
||||
uint8_t highSpeedFlag,
|
||||
lte_frame_type_t frame_type,
|
||||
uint32_t X_u[64][839]);
|
||||
|
||||
|
||||
void init_prach_tables(int N_ZC);
|
||||
@@ -1741,9 +1741,9 @@ double computeRhoB_UE(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||
*/
|
||||
|
||||
uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t n_ra_prboffset,
|
||||
uint8_t tdd_mapindex, uint16_t Nf);
|
||||
uint8_t prach_ConfigIndex,
|
||||
uint8_t n_ra_prboffset,
|
||||
uint8_t tdd_mapindex, uint16_t Nf);
|
||||
|
||||
/**@}*/
|
||||
#endif
|
||||
|
||||
@@ -31,63 +31,55 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
unsigned char l,
|
||||
int subframe,
|
||||
int sample_offset,
|
||||
int no_prefix)
|
||||
{
|
||||
|
||||
int no_prefix) {
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
LTE_UE_COMMON *common_vars = &ue->common_vars;
|
||||
uint8_t eNB_id = 0;//ue_common_vars->eNb_id;
|
||||
|
||||
unsigned char aa;
|
||||
unsigned char frame_type = frame_parms->frame_type; // Frame Type: 0 - FDD, 1 - TDD;
|
||||
unsigned int nb_prefix_samples = frame_parms->ofdm_symbol_size>>2;//(no_prefix ? 0 : frame_parms->nb_prefix_samples);
|
||||
unsigned int nb_prefix_samples0 = frame_parms->ofdm_symbol_size>>2;//(no_prefix ? 0 : frame_parms->nb_prefix_samples0);
|
||||
unsigned int subframe_offset;
|
||||
|
||||
// int i;
|
||||
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft128;
|
||||
break;
|
||||
|
||||
case 128:
|
||||
dft = dft128;
|
||||
break;
|
||||
case 256:
|
||||
dft = dft256;
|
||||
break;
|
||||
|
||||
case 256:
|
||||
dft = dft256;
|
||||
break;
|
||||
case 512:
|
||||
dft = dft512;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft512;
|
||||
break;
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft1024;
|
||||
break;
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft1536;
|
||||
break;
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft2048;
|
||||
break;
|
||||
|
||||
default:
|
||||
dft = dft512;
|
||||
break;
|
||||
default:
|
||||
dft = dft512;
|
||||
break;
|
||||
}
|
||||
|
||||
if (no_prefix) {
|
||||
subframe_offset = frame_parms->ofdm_symbol_size * frame_parms->symbols_per_tti * subframe;
|
||||
|
||||
} else {
|
||||
subframe_offset = frame_parms->samples_per_tti * subframe;
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (l<0 || l>=12) {
|
||||
LOG_E(PHY,"slot_fep_mbsfn: l must be between 0 and 11\n");
|
||||
return(-1);
|
||||
@@ -106,20 +98,22 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
LOG_D(PHY,"slot_fep_mbsfn: subframe %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, subframe_offset %d, sample_offset %d\n", subframe, l, nb_prefix_samples,nb_prefix_samples0,subframe_offset,
|
||||
sample_offset);
|
||||
LOG_D(PHY,"slot_fep_mbsfn: subframe %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, subframe_offset %d, sample_offset %d\n", subframe, l, nb_prefix_samples,nb_prefix_samples0,
|
||||
subframe_offset,
|
||||
sample_offset);
|
||||
#endif
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
|
||||
memset(&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],0,frame_parms->ofdm_symbol_size*sizeof(int));
|
||||
|
||||
if (l==0) {
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
nb_prefix_samples0 +
|
||||
subframe_offset -
|
||||
SOFFSET) % frame_length_samples],
|
||||
nb_prefix_samples0 +
|
||||
subframe_offset -
|
||||
SOFFSET) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
@@ -138,10 +132,10 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
(frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
|
||||
(frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1) +
|
||||
subframe_offset-
|
||||
SOFFSET) % frame_length_samples],
|
||||
(frame_parms->ofdm_symbol_size+nb_prefix_samples0+nb_prefix_samples) +
|
||||
(frame_parms->ofdm_symbol_size+nb_prefix_samples)*(l-1) +
|
||||
subframe_offset-
|
||||
SOFFSET) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][frame_parms->ofdm_symbol_size*l],1);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
@@ -149,8 +143,6 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//if ((l==0) || (l==(4-frame_parms->Ncp))) {
|
||||
// changed to invoke MBSFN channel estimation in symbols 2,6,10
|
||||
if ((l==2)||(l==6)||(l==10)) {
|
||||
@@ -159,7 +151,6 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
#ifdef DEBUG_FEP
|
||||
LOG_D(PHY,"Channel estimation eNB %d, aatx %d, subframe %d, symbol %d\n",eNB_id,aa,subframe,l);
|
||||
#endif
|
||||
|
||||
lte_dl_mbsfn_channel_estimation(ue,
|
||||
eNB_id,
|
||||
0,
|
||||
@@ -183,7 +174,6 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
l,
|
||||
symbol); */
|
||||
// }
|
||||
|
||||
// do frequency offset estimation here!
|
||||
// use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1})
|
||||
#ifdef DEBUG_FEP
|
||||
@@ -205,72 +195,66 @@ int slot_fep_mbsfn(PHY_VARS_UE *ue,
|
||||
return(0);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
|
||||
int subframe,
|
||||
int sample_offset)
|
||||
{
|
||||
|
||||
int slot_fep_mbsfn_khz_1dot25(PHY_VARS_UE *ue,
|
||||
int subframe,
|
||||
int sample_offset) {
|
||||
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||
LTE_UE_COMMON *common_vars = &ue->common_vars;
|
||||
uint8_t eNB_id = 0;//ue_common_vars->eNb_id;
|
||||
|
||||
unsigned char aa;
|
||||
//unsigned char frame_type = frame_parms->frame_type; // Frame Type: 0 - FDD, 1 - TDD;
|
||||
unsigned int nb_prefix_samples;
|
||||
int ofdm_symbol_size;
|
||||
unsigned int subframe_offset;
|
||||
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
|
||||
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
|
||||
void (*dft)(int16_t *,int16_t *, int);
|
||||
AssertFatal(frame_parms->frame_type == FDD, "Frame is TDD!\n");
|
||||
|
||||
switch (frame_parms->ofdm_symbol_size) {
|
||||
case 128:
|
||||
dft = dft1536;
|
||||
ofdm_symbol_size=1536;
|
||||
nb_prefix_samples=384;
|
||||
break;
|
||||
|
||||
case 128:
|
||||
dft = dft1536;
|
||||
ofdm_symbol_size=1536;
|
||||
nb_prefix_samples=384;
|
||||
break;
|
||||
case 256:
|
||||
AssertFatal(1==0,"FeMBMS dft3072 not implemented\n");
|
||||
dft = dft3072;
|
||||
ofdm_symbol_size=3072;
|
||||
nb_prefix_samples=768;
|
||||
break;
|
||||
case 256:
|
||||
AssertFatal(1==0,"FeMBMS dft3072 not implemented\n");
|
||||
dft = dft3072;
|
||||
ofdm_symbol_size=3072;
|
||||
nb_prefix_samples=768;
|
||||
break;
|
||||
|
||||
case 512:
|
||||
dft = dft6144;
|
||||
nb_prefix_samples=1536;
|
||||
ofdm_symbol_size=6144;
|
||||
break;
|
||||
case 512:
|
||||
dft = dft6144;
|
||||
nb_prefix_samples=1536;
|
||||
ofdm_symbol_size=6144;
|
||||
break;
|
||||
|
||||
case 1024:
|
||||
dft = dft12288;
|
||||
nb_prefix_samples=3072;
|
||||
ofdm_symbol_size=12288;
|
||||
break;
|
||||
case 1024:
|
||||
dft = dft12288;
|
||||
nb_prefix_samples=3072;
|
||||
ofdm_symbol_size=12288;
|
||||
break;
|
||||
|
||||
case 1536:
|
||||
dft = dft18432;
|
||||
nb_prefix_samples=4608;
|
||||
ofdm_symbol_size=18432;
|
||||
break;
|
||||
case 1536:
|
||||
dft = dft18432;
|
||||
nb_prefix_samples=4608;
|
||||
ofdm_symbol_size=18432;
|
||||
break;
|
||||
|
||||
case 2048:
|
||||
dft = dft24576;
|
||||
nb_prefix_samples=6144;
|
||||
ofdm_symbol_size=24576;
|
||||
break;
|
||||
case 2048:
|
||||
dft = dft24576;
|
||||
nb_prefix_samples=6144;
|
||||
ofdm_symbol_size=24576;
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"Illegal ofdm symbol size %d\n",frame_parms->ofdm_symbol_size);
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0,"Illegal ofdm symbol size %d\n",frame_parms->ofdm_symbol_size);
|
||||
break;
|
||||
}
|
||||
|
||||
subframe_offset = frame_parms->samples_per_tti * subframe;
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
LOG_D(PHY,"slot_fep_mbsfn125: subframe %d, nb_prefix_samples %d, subframe_offset %d, sample_offset %d\n", subframe, nb_prefix_samples,subframe_offset,
|
||||
sample_offset);
|
||||
@@ -282,34 +266,30 @@ void (*dft)(int16_t *,int16_t *, int);
|
||||
start_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
dft((int16_t *)&common_vars->rxdata[aa][(sample_offset +
|
||||
nb_prefix_samples +
|
||||
subframe_offset -
|
||||
SOFFSET) % frame_length_samples],
|
||||
nb_prefix_samples +
|
||||
subframe_offset -
|
||||
SOFFSET) % frame_length_samples],
|
||||
(int16_t *)&common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aa][0],1);
|
||||
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&ue->rx_dft_stats);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
|
||||
if (ue->perfect_ce == 0) {
|
||||
#ifdef DEBUG_FEP
|
||||
LOG_D(PHY,"Channel estimation eNB %d, aatx %d, subframe %d\n",eNB_id,aa,subframe);
|
||||
#endif
|
||||
lte_dl_mbsfn_khz_1dot25_channel_estimation(ue,
|
||||
eNB_id,
|
||||
0,
|
||||
subframe);
|
||||
lte_dl_mbsfn_khz_1dot25_channel_estimation(ue,
|
||||
eNB_id,
|
||||
0,
|
||||
subframe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG_FEP
|
||||
LOG_D(PHY,"slot_fep_mbsfn: done\n");
|
||||
#endif
|
||||
|
||||
return(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -347,14 +347,12 @@ int is_prach_subframe(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t sub
|
||||
uint8_t prach_ConfigIndex = frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex;
|
||||
int prach_mask = is_prach_subframe0(frame_parms,prach_ConfigIndex,frame,subframe);
|
||||
|
||||
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int i;
|
||||
|
||||
for (i=0;i<4;i++) {
|
||||
if (frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[i] == 1)
|
||||
prach_mask|=(is_prach_subframe0(frame_parms,frame_parms->prach_emtc_config_common.prach_ConfigInfo.prach_ConfigIndex[i],frame,subframe)<<(i+1));
|
||||
}
|
||||
#endif
|
||||
return(prach_mask);
|
||||
}
|
||||
#endif //0
|
||||
|
||||
@@ -169,7 +169,7 @@ int64_t dot_product64(int16_t *x,
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
__m128i *x128,*y128,mmtmp1,mmtmp2,mmtmp3,mmcumul,mmcumul_re,mmcumul_im;
|
||||
__m128i minus_i = _mm_set_epi16(-1,1,-1,1,-1,1,-1,1);
|
||||
int32_t result;
|
||||
int64_t result;
|
||||
|
||||
x128 = (__m128i*) x;
|
||||
y128 = (__m128i*) y;
|
||||
|
||||
+157
-162
@@ -32,7 +32,7 @@
|
||||
#ifndef __PHY_DEFS_NB_IOT__H__
|
||||
#define __PHY_DEFS_NB_IOT__H__
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <malloc.h>
|
||||
@@ -44,29 +44,29 @@
|
||||
//#include <complex.h>
|
||||
#include "assertions.h"
|
||||
#ifdef MEX
|
||||
# define msg mexPrintf
|
||||
#define msg mexPrintf
|
||||
#else
|
||||
# ifdef OPENAIR2
|
||||
# if ENABLE_RAL
|
||||
# include "collection/hashtable/hashtable.h"
|
||||
# include "COMMON/ral_messages_types.h"
|
||||
# include "UTIL/queue.h"
|
||||
# endif
|
||||
# include "common/utils/LOG/log.h"
|
||||
# define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
||||
# else
|
||||
# define msg printf
|
||||
# endif
|
||||
#ifdef OPENAIR2
|
||||
#if ENABLE_RAL
|
||||
#include "collection/hashtable/hashtable.h"
|
||||
#include "COMMON/ral_messages_types.h"
|
||||
#include "UTIL/queue.h"
|
||||
#endif
|
||||
#include "common/utils/LOG/log.h"
|
||||
#define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
||||
#else
|
||||
#define msg printf
|
||||
#endif
|
||||
#endif
|
||||
//use msg in the real-time thread context
|
||||
#define msg_nrt printf
|
||||
//use msg_nrt in the non real-time context (for initialization, ...)
|
||||
#ifndef malloc16
|
||||
# ifdef __AVX2__
|
||||
# define malloc16(x) memalign(32,x)
|
||||
# else
|
||||
# define malloc16(x) memalign(16,x)
|
||||
# endif
|
||||
#ifdef __AVX2__
|
||||
#define malloc16(x) memalign(32,x)
|
||||
#else
|
||||
#define malloc16(x) memalign(16,x)
|
||||
#endif
|
||||
#endif
|
||||
#define free16(y,x) free(y)
|
||||
#define bigmalloc malloc
|
||||
@@ -423,10 +423,8 @@ typedef struct eNB_proc_NB_IoT_t_s {
|
||||
int RU_mask;
|
||||
/// mask for RUs serving nbiot (PRACH)
|
||||
int RU_mask_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mask for RUs serving eNB (PRACH)
|
||||
int RU_mask_prach_br;
|
||||
#endif
|
||||
/// parameters for turbo-decoding worker thread
|
||||
td_params_NB_IoT tdp;
|
||||
/// parameters for turbo-encoding worker thread
|
||||
@@ -469,7 +467,7 @@ typedef struct {
|
||||
pthread_mutex_t mutex_rxtx;
|
||||
/// scheduling parameters for RXn-TXnp4 thread
|
||||
struct sched_param sched_param_rxtx;
|
||||
///
|
||||
///
|
||||
int sub_frame_start;
|
||||
///
|
||||
int sub_frame_step;
|
||||
@@ -567,10 +565,8 @@ typedef struct PHY_VARS_eNB_NB_IoT_s {
|
||||
uint32_t lte_gold_uespec_table[2][20][2][21];
|
||||
/// mbsfn reference symbols
|
||||
uint32_t lte_gold_mbsfn_table[10][3][42];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mbsfn reference symbols
|
||||
uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150]; //Not sure whether we need this here
|
||||
#endif
|
||||
///
|
||||
uint32_t X_u[64][839];
|
||||
///
|
||||
@@ -597,7 +593,8 @@ typedef struct PHY_VARS_eNB_NB_IoT_s {
|
||||
unsigned char cooperation_flag; // for cooperative communication
|
||||
|
||||
unsigned char is_secondary_eNB; // primary by default
|
||||
unsigned char is_init_sync; /// Flag to tell if initial synchronization is performed. This affects how often the secondary eNB will listen to the PSS from the primary system.
|
||||
unsigned char
|
||||
is_init_sync; /// Flag to tell if initial synchronization is performed. This affects how often the secondary eNB will listen to the PSS from the primary system.
|
||||
unsigned char has_valid_precoder; /// Flag to tell if secondary eNB has channel estimates to create NULL-beams from, and this B/F vector is created.
|
||||
unsigned char PeNB_id; /// id of Primary eNB
|
||||
int rx_offset; /// Timing offset (used if is_secondary_eNB)
|
||||
@@ -704,10 +701,10 @@ typedef struct PHY_VARS_eNB_NB_IoT_s {
|
||||
time_stats_t ulsch_tc_intl1_stats;
|
||||
time_stats_t ulsch_tc_intl2_stats;
|
||||
|
||||
#ifdef LOCALIZATION
|
||||
#ifdef LOCALIZATION
|
||||
/// time state for localization
|
||||
time_stats_t localization_stats;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int32_t pucch1_stats_cnt[NUMBER_OF_UE_MAX_NB_IoT][10];
|
||||
int32_t pucch1_stats[NUMBER_OF_UE_MAX_NB_IoT][10*1024];
|
||||
@@ -843,13 +840,11 @@ typedef struct {
|
||||
uint32_t lte_gold_uespec_table[2][20][2][21];
|
||||
//mbsfn reference symbols
|
||||
uint32_t lte_gold_mbsfn_table[10][3][42];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mbsfn reference symbols
|
||||
uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150]; //Not sure whether we need this here
|
||||
#endif
|
||||
///
|
||||
uint32_t X_u[64][839];
|
||||
///
|
||||
///
|
||||
uint32_t high_speed_flag;
|
||||
uint32_t perfect_ce;
|
||||
int16_t ch_est_alpha;
|
||||
@@ -859,66 +854,66 @@ typedef struct {
|
||||
///
|
||||
char ulsch_no_allocation_counter[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
/*
|
||||
/*
|
||||
|
||||
unsigned char ulsch_Msg3_active[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
uint32_t ulsch_Msg3_frame[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
unsigned char ulsch_Msg3_subframe[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
PRACH_RESOURCES_t *prach_resources[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int turbo_iterations, turbo_cntl_iterations;
|
||||
/// \brief ?.
|
||||
/// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
|
||||
uint32_t total_TBS[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// \brief ?.
|
||||
/// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
|
||||
uint32_t total_TBS_last[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// \brief ?.
|
||||
/// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
|
||||
uint32_t bitrate[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// \brief ?.
|
||||
/// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
|
||||
uint32_t total_received_bits[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_errors[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_errors_last[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_received[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_received_last[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_fer[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_SI_received[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_SI_errors[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_ra_received[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_ra_errors[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_p_received[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_p_errors[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mch_received_sf[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mch_received[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mcch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mtch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mcch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mtch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mcch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mtch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int current_dlsch_cqi[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
unsigned char first_run_timing_advance[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
uint8_t generate_prach;
|
||||
uint8_t prach_cnt;
|
||||
uint8_t prach_PreambleIndex;
|
||||
// uint8_t prach_timer;
|
||||
uint8_t decode_SIB;
|
||||
uint8_t decode_MIB;
|
||||
int rx_offset; /// Timing offset
|
||||
int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP
|
||||
int timing_advance; ///timing advance signalled from eNB
|
||||
int hw_timing_advance;
|
||||
int N_TA_offset; ///timing offset used in TDD
|
||||
/// Flag to tell if UE is secondary user (cognitive mode)
|
||||
unsigned char is_secondary_ue;
|
||||
/// Flag to tell if secondary eNB has channel estimates to create NULL-beams from.
|
||||
unsigned char has_valid_precoder;
|
||||
/// hold the precoder for NULL beam to the primary eNB
|
||||
int **ul_precoder_S_UE;
|
||||
/// holds the maximum channel/precoder coefficient
|
||||
char log2_maxp;
|
||||
*/
|
||||
unsigned char ulsch_Msg3_active[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
uint32_t ulsch_Msg3_frame[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
unsigned char ulsch_Msg3_subframe[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
PRACH_RESOURCES_t *prach_resources[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int turbo_iterations, turbo_cntl_iterations;
|
||||
/// \brief ?.
|
||||
/// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
|
||||
uint32_t total_TBS[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// \brief ?.
|
||||
/// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
|
||||
uint32_t total_TBS_last[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// \brief ?.
|
||||
/// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
|
||||
uint32_t bitrate[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// \brief ?.
|
||||
/// - first index: eNB [0..NUMBER_OF_CONNECTED_eNB_MAX[ (hard coded)
|
||||
uint32_t total_received_bits[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_errors[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_errors_last[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_received[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_received_last[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_fer[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_SI_received[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_SI_errors[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_ra_received[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_ra_errors[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_p_received[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_p_errors[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mch_received_sf[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mch_received[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mcch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mtch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mcch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mtch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mcch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int dlsch_mtch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
int current_dlsch_cqi[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
unsigned char first_run_timing_advance[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
uint8_t generate_prach;
|
||||
uint8_t prach_cnt;
|
||||
uint8_t prach_PreambleIndex;
|
||||
// uint8_t prach_timer;
|
||||
uint8_t decode_SIB;
|
||||
uint8_t decode_MIB;
|
||||
int rx_offset; /// Timing offset
|
||||
int rx_offset_diff; /// Timing adjustment for ofdm symbol0 on HW USRP
|
||||
int timing_advance; ///timing advance signalled from eNB
|
||||
int hw_timing_advance;
|
||||
int N_TA_offset; ///timing offset used in TDD
|
||||
/// Flag to tell if UE is secondary user (cognitive mode)
|
||||
unsigned char is_secondary_ue;
|
||||
/// Flag to tell if secondary eNB has channel estimates to create NULL-beams from.
|
||||
unsigned char has_valid_precoder;
|
||||
/// hold the precoder for NULL beam to the primary eNB
|
||||
int **ul_precoder_S_UE;
|
||||
/// holds the maximum channel/precoder coefficient
|
||||
char log2_maxp;
|
||||
*/
|
||||
/// if ==0 enables phy only test mode
|
||||
int mac_enabled;
|
||||
/// Flag to initialize averaging of PHY measurements
|
||||
@@ -933,98 +928,98 @@ typedef struct {
|
||||
double sinr_eff;
|
||||
/// N0 (used for abstraction)
|
||||
double N0;
|
||||
/*
|
||||
/// PDSCH Varaibles
|
||||
PDSCH_CONFIG_DEDICATED pdsch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/*
|
||||
/// PDSCH Varaibles
|
||||
PDSCH_CONFIG_DEDICATED pdsch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
/// PUSCH Varaibles
|
||||
PUSCH_CONFIG_DEDICATED pusch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// PUSCH Varaibles
|
||||
PUSCH_CONFIG_DEDICATED pusch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
/// PUSCH contention-based access vars
|
||||
PUSCH_CA_CONFIG_DEDICATED pusch_ca_config_dedicated[NUMBER_OF_eNB_MAX]; // lola
|
||||
/// PUSCH contention-based access vars
|
||||
PUSCH_CA_CONFIG_DEDICATED pusch_ca_config_dedicated[NUMBER_OF_eNB_MAX]; // lola
|
||||
|
||||
/// PUCCH variables
|
||||
/// PUCCH variables
|
||||
|
||||
PUCCH_CONFIG_DEDICATED pucch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
PUCCH_CONFIG_DEDICATED pucch_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
uint8_t ncs_cell[20][7];
|
||||
uint8_t ncs_cell[20][7];
|
||||
|
||||
/// UL-POWER-Control
|
||||
UL_POWER_CONTROL_DEDICATED ul_power_control_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// UL-POWER-Control
|
||||
UL_POWER_CONTROL_DEDICATED ul_power_control_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
/// TPC
|
||||
TPC_PDCCH_CONFIG tpc_pdcch_config_pucch[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
TPC_PDCCH_CONFIG tpc_pdcch_config_pusch[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// TPC
|
||||
TPC_PDCCH_CONFIG tpc_pdcch_config_pucch[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
TPC_PDCCH_CONFIG tpc_pdcch_config_pusch[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
/// CQI reporting
|
||||
CQI_REPORT_CONFIG cqi_report_config[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// CQI reporting
|
||||
CQI_REPORT_CONFIG cqi_report_config[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
/// SRS Variables
|
||||
SOUNDINGRS_UL_CONFIG_DEDICATED soundingrs_ul_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// SRS Variables
|
||||
SOUNDINGRS_UL_CONFIG_DEDICATED soundingrs_ul_config_dedicated[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
/// Scheduling Request Config
|
||||
SCHEDULING_REQUEST_CONFIG scheduling_request_config[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// Scheduling Request Config
|
||||
SCHEDULING_REQUEST_CONFIG scheduling_request_config[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
/// Transmission mode per eNB
|
||||
uint8_t transmission_mode[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
/// Transmission mode per eNB
|
||||
uint8_t transmission_mode[NUMBER_OF_CONNECTED_eNB_MAX];
|
||||
|
||||
time_stats_t phy_proc;
|
||||
time_stats_t phy_proc_tx;
|
||||
time_stats_t phy_proc_rx[2];
|
||||
time_stats_t phy_proc;
|
||||
time_stats_t phy_proc_tx;
|
||||
time_stats_t phy_proc_rx[2];
|
||||
|
||||
uint32_t use_ia_receiver;
|
||||
uint32_t use_ia_receiver;
|
||||
|
||||
time_stats_t ofdm_mod_stats;
|
||||
time_stats_t ulsch_encoding_stats;
|
||||
time_stats_t ulsch_modulation_stats;
|
||||
time_stats_t ulsch_segmentation_stats;
|
||||
time_stats_t ulsch_rate_matching_stats;
|
||||
time_stats_t ulsch_turbo_encoding_stats;
|
||||
time_stats_t ulsch_interleaving_stats;
|
||||
time_stats_t ulsch_multiplexing_stats;
|
||||
time_stats_t ofdm_mod_stats;
|
||||
time_stats_t ulsch_encoding_stats;
|
||||
time_stats_t ulsch_modulation_stats;
|
||||
time_stats_t ulsch_segmentation_stats;
|
||||
time_stats_t ulsch_rate_matching_stats;
|
||||
time_stats_t ulsch_turbo_encoding_stats;
|
||||
time_stats_t ulsch_interleaving_stats;
|
||||
time_stats_t ulsch_multiplexing_stats;
|
||||
|
||||
time_stats_t generic_stat;
|
||||
time_stats_t pdsch_procedures_stat;
|
||||
time_stats_t dlsch_procedures_stat;
|
||||
time_stats_t generic_stat;
|
||||
time_stats_t pdsch_procedures_stat;
|
||||
time_stats_t dlsch_procedures_stat;
|
||||
|
||||
time_stats_t ofdm_demod_stats;
|
||||
time_stats_t dlsch_rx_pdcch_stats;
|
||||
time_stats_t rx_dft_stats;
|
||||
time_stats_t dlsch_channel_estimation_stats;
|
||||
time_stats_t dlsch_freq_offset_estimation_stats;
|
||||
time_stats_t dlsch_decoding_stats[2];
|
||||
time_stats_t dlsch_demodulation_stats;
|
||||
time_stats_t dlsch_rate_unmatching_stats;
|
||||
time_stats_t dlsch_turbo_decoding_stats;
|
||||
time_stats_t dlsch_deinterleaving_stats;
|
||||
time_stats_t dlsch_llr_stats;
|
||||
time_stats_t dlsch_unscrambling_stats;
|
||||
time_stats_t dlsch_rate_matching_stats;
|
||||
time_stats_t dlsch_turbo_encoding_stats;
|
||||
time_stats_t dlsch_interleaving_stats;
|
||||
time_stats_t dlsch_tc_init_stats;
|
||||
time_stats_t dlsch_tc_alpha_stats;
|
||||
time_stats_t dlsch_tc_beta_stats;
|
||||
time_stats_t dlsch_tc_gamma_stats;
|
||||
time_stats_t dlsch_tc_ext_stats;
|
||||
time_stats_t dlsch_tc_intl1_stats;
|
||||
time_stats_t dlsch_tc_intl2_stats;
|
||||
time_stats_t tx_prach;
|
||||
time_stats_t ofdm_demod_stats;
|
||||
time_stats_t dlsch_rx_pdcch_stats;
|
||||
time_stats_t rx_dft_stats;
|
||||
time_stats_t dlsch_channel_estimation_stats;
|
||||
time_stats_t dlsch_freq_offset_estimation_stats;
|
||||
time_stats_t dlsch_decoding_stats[2];
|
||||
time_stats_t dlsch_demodulation_stats;
|
||||
time_stats_t dlsch_rate_unmatching_stats;
|
||||
time_stats_t dlsch_turbo_decoding_stats;
|
||||
time_stats_t dlsch_deinterleaving_stats;
|
||||
time_stats_t dlsch_llr_stats;
|
||||
time_stats_t dlsch_unscrambling_stats;
|
||||
time_stats_t dlsch_rate_matching_stats;
|
||||
time_stats_t dlsch_turbo_encoding_stats;
|
||||
time_stats_t dlsch_interleaving_stats;
|
||||
time_stats_t dlsch_tc_init_stats;
|
||||
time_stats_t dlsch_tc_alpha_stats;
|
||||
time_stats_t dlsch_tc_beta_stats;
|
||||
time_stats_t dlsch_tc_gamma_stats;
|
||||
time_stats_t dlsch_tc_ext_stats;
|
||||
time_stats_t dlsch_tc_intl1_stats;
|
||||
time_stats_t dlsch_tc_intl2_stats;
|
||||
time_stats_t tx_prach;
|
||||
|
||||
/// RF and Interface devices per CC
|
||||
openair0_device rfdevice;
|
||||
time_stats_t dlsch_encoding_SIC_stats;
|
||||
time_stats_t dlsch_scrambling_SIC_stats;
|
||||
time_stats_t dlsch_modulation_SIC_stats;
|
||||
time_stats_t dlsch_llr_stripping_unit_SIC_stats;
|
||||
time_stats_t dlsch_unscrambling_SIC_stats;
|
||||
/// RF and Interface devices per CC
|
||||
openair0_device rfdevice;
|
||||
time_stats_t dlsch_encoding_SIC_stats;
|
||||
time_stats_t dlsch_scrambling_SIC_stats;
|
||||
time_stats_t dlsch_modulation_SIC_stats;
|
||||
time_stats_t dlsch_llr_stripping_unit_SIC_stats;
|
||||
time_stats_t dlsch_unscrambling_SIC_stats;
|
||||
|
||||
#if ENABLE_RAL
|
||||
hash_table_t *ral_thresholds_timed;
|
||||
SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
|
||||
SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
|
||||
#endif
|
||||
*/
|
||||
#if ENABLE_RAL
|
||||
hash_table_t *ral_thresholds_timed;
|
||||
SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
|
||||
SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
|
||||
#endif
|
||||
*/
|
||||
} PHY_VARS_UE_NB_IoT;
|
||||
|
||||
|
||||
|
||||
+12
-37
@@ -67,14 +67,15 @@ typedef enum {
|
||||
ZEROS,
|
||||
NONE
|
||||
} Extension_t;
|
||||
|
||||
|
||||
enum transmission_access_mode {
|
||||
NO_ACCESS=0,
|
||||
POSTPONED_ACCESS,
|
||||
CANCELED_ACCESS,
|
||||
UNKNOWN_ACCESS,
|
||||
SCHEDULED_ACCESS,
|
||||
CBA_ACCESS};
|
||||
CBA_ACCESS
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
eNodeB_3GPP=0, // classical eNodeB function
|
||||
@@ -122,8 +123,8 @@ typedef struct {
|
||||
/// \brief Holds output of the sync correlator.
|
||||
/// - first index: sample [0..samples_per_tti*10[
|
||||
uint32_t *sync_corr;
|
||||
/// \brief Holds the tdd reciprocity calibration coefficients
|
||||
/// - first index: eNB id [0..2] (hard coded)
|
||||
/// \brief Holds the tdd reciprocity calibration coefficients
|
||||
/// - first index: eNB id [0..2] (hard coded)
|
||||
/// - second index: tx antenna [0..nb_antennas_tx[
|
||||
/// - third index: frequency [0..]
|
||||
int32_t **tdd_calib_coeffs;
|
||||
@@ -161,28 +162,18 @@ typedef struct RU_proc_t_s {
|
||||
int slot_feptx;
|
||||
/// subframe to act upon for reception of prach
|
||||
int subframe_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// subframe to act upon for reception of prach BL/CE UEs
|
||||
int subframe_prach_br;
|
||||
#endif
|
||||
/// frame to act upon for reception
|
||||
int frame_rx;
|
||||
/// frame to act upon for transmission
|
||||
int frame_tx;
|
||||
/*#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// subframe to act upon for transmission
|
||||
int subframe_tx;
|
||||
/// subframe to act upon for reception
|
||||
int subframe_rx;
|
||||
#endif*/
|
||||
/// unwrapped frame count
|
||||
int frame_tx_unwrap;
|
||||
/// frame to act upon for reception of prach
|
||||
int frame_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// frame to act upon for reception of prach
|
||||
int frame_prach_br;
|
||||
#endif
|
||||
/// frame offset for slave RUs (to correct for frame asynchronism at startup)
|
||||
int frame_offset;
|
||||
/// \brief Instance count for FH processing thread.
|
||||
@@ -191,10 +182,8 @@ typedef struct RU_proc_t_s {
|
||||
int instance_cnt_FH1;
|
||||
/// \internal This variable is protected by \ref mutex_prach.
|
||||
int instance_cnt_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// \internal This variable is protected by \ref mutex_prach.
|
||||
int instance_cnt_prach_br;
|
||||
#endif
|
||||
/// \internal This variable is protected by \ref mutex_synch.
|
||||
int instance_cnt_synch;
|
||||
/// \internal This variable is protected by \ref mutex_eNBs.
|
||||
@@ -218,10 +207,8 @@ typedef struct RU_proc_t_s {
|
||||
pthread_t pthread_ctrl;
|
||||
/// pthread structure for RU prach processing thread
|
||||
pthread_t pthread_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// pthread structure for RU prach processing thread BL/CE UEs
|
||||
pthread_t pthread_prach_br;
|
||||
#endif
|
||||
/// pthread struct for RU synch thread
|
||||
pthread_t pthread_synch;
|
||||
/// pthread struct for RU RX FEP worker thread
|
||||
@@ -243,10 +230,8 @@ typedef struct RU_proc_t_s {
|
||||
pthread_attr_t attr_ctrl;
|
||||
/// pthread attributes for RU prach
|
||||
pthread_attr_t attr_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// pthread attributes for RU prach BL/CE UEs
|
||||
pthread_attr_t attr_prach_br;
|
||||
#endif
|
||||
/// pthread attributes for RU synch thread
|
||||
pthread_attr_t attr_synch;
|
||||
/// pthread attributes for asynchronous RX thread
|
||||
@@ -262,10 +247,8 @@ typedef struct RU_proc_t_s {
|
||||
struct sched_param sched_param_FH1;
|
||||
/// scheduling parameters for RU prach thread
|
||||
struct sched_param sched_param_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// scheduling parameters for RU prach thread BL/CE UEs
|
||||
struct sched_param sched_param_prach_br;
|
||||
#endif
|
||||
/// scheduling parameters for RU synch thread
|
||||
struct sched_param sched_param_synch;
|
||||
/// scheduling parameters for asynch_rxtx thread
|
||||
@@ -275,10 +258,8 @@ typedef struct RU_proc_t_s {
|
||||
pthread_cond_t cond_FH1;
|
||||
/// condition variable for RU prach thread
|
||||
pthread_cond_t cond_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// condition variable for RU prach thread BL/CE UEs
|
||||
pthread_cond_t cond_prach_br;
|
||||
#endif
|
||||
/// condition variable for RU synch thread
|
||||
pthread_cond_t cond_synch;
|
||||
/// condition variable for asynch RX/TX thread
|
||||
@@ -300,10 +281,8 @@ typedef struct RU_proc_t_s {
|
||||
pthread_mutex_t mutex_FH1;
|
||||
/// mutex for RU prach
|
||||
pthread_mutex_t mutex_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mutex for RU prach BL/CE UEs
|
||||
pthread_mutex_t mutex_prach_br;
|
||||
#endif
|
||||
/// mutex for RU synch
|
||||
pthread_mutex_t mutex_synch;
|
||||
/// mutex for eNB signal
|
||||
@@ -370,7 +349,7 @@ typedef enum {
|
||||
REMOTE_IF4p5 =3,
|
||||
REMOTE_IF1pp =4,
|
||||
MAX_RU_IF_TYPES =5
|
||||
//EMULATE_RF =6
|
||||
//EMULATE_RF =6
|
||||
} RU_if_south_t;
|
||||
|
||||
|
||||
@@ -394,7 +373,7 @@ typedef enum {
|
||||
} rru_cmd_t;
|
||||
|
||||
|
||||
typedef struct RU_t_s{
|
||||
typedef struct RU_t_s {
|
||||
/// index of this ru
|
||||
uint32_t idx;
|
||||
/// Pointer to configuration file
|
||||
@@ -410,7 +389,7 @@ typedef struct RU_t_s{
|
||||
/// flag to indicate the RU is in synch with a master reference
|
||||
int in_synch;
|
||||
/// timing offset
|
||||
int rx_offset;
|
||||
int rx_offset;
|
||||
/// south in counter
|
||||
int south_in_cnt;
|
||||
/// south out counter
|
||||
@@ -509,10 +488,8 @@ typedef struct RU_t_s{
|
||||
/// function pointer to wakeup routine in lte-enb/nr-gnb.
|
||||
void (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru, int frame, int subframe);
|
||||
void (*wakeup_prach_gNB)(struct PHY_VARS_gNB_s *gNB, struct RU_t_s *ru, int frame, int subframe);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// function pointer to wakeup routine in lte-enb.
|
||||
void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru, int frame, int subframe);
|
||||
#endif
|
||||
|
||||
/// function pointer to NB entry routine
|
||||
void (*eNB_top)(struct PHY_VARS_eNB_s *eNB, int frame_rx, int subframe_rx, char *string, struct RU_t_s *ru);
|
||||
@@ -533,7 +510,7 @@ typedef struct RU_t_s{
|
||||
/// Timing statistics (RX Fronthaul + Compression)
|
||||
time_stats_t rx_fhaul;
|
||||
/// Timing statistics (TX Fronthaul + Compression)
|
||||
time_stats_t tx_fhaul;
|
||||
time_stats_t tx_fhaul;
|
||||
/// Timong statistics (Compression)
|
||||
time_stats_t compression;
|
||||
/// Timing statistics (Fronthaul transport)
|
||||
@@ -545,9 +522,9 @@ typedef struct RU_t_s{
|
||||
int32_t **beam_weights[NUMBER_OF_eNB_MAX+1][15];
|
||||
/// beamforming weight vectors per gNB
|
||||
int32_t **nrbeam_weights[NUMBER_OF_gNB_MAX+1][16];
|
||||
/// received frequency-domain signal for PRACH (IF4p5 RRU)
|
||||
/// received frequency-domain signal for PRACH (IF4p5 RRU)
|
||||
int16_t **prach_rxsigF;
|
||||
/// received frequency-domain signal for PRACH BR (IF4p5 RRU)
|
||||
/// received frequency-domain signal for PRACH BR (IF4p5 RRU)
|
||||
int16_t **prach_rxsigF_br[4];
|
||||
/// sequence number for IF5
|
||||
uint8_t seqno;
|
||||
@@ -620,7 +597,7 @@ typedef struct RRU_capabilities_s {
|
||||
/// Number of RX ports of each band
|
||||
uint8_t nb_rx[MAX_BANDS_PER_RRU];
|
||||
/// Number of TX ports of each band
|
||||
uint8_t nb_tx[MAX_BANDS_PER_RRU];
|
||||
uint8_t nb_tx[MAX_BANDS_PER_RRU];
|
||||
/// max DL bandwidth (1,6,15,25,50,75,100)
|
||||
uint8_t N_RB_DL[MAX_BANDS_PER_RRU];
|
||||
/// max UL bandwidth (1,6,15,25,50,75,100)
|
||||
@@ -657,13 +634,11 @@ typedef struct RRU_config_s {
|
||||
int prach_FreqOffset[MAX_BANDS_PER_RRU];
|
||||
/// prach_ConfigIndex for IF4p5
|
||||
int prach_ConfigIndex[MAX_BANDS_PER_RRU];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int emtc_prach_CElevel_enable[MAX_BANDS_PER_RRU][4];
|
||||
/// emtc_prach_FreqOffset for IF4p5 per CE Level
|
||||
int emtc_prach_FreqOffset[MAX_BANDS_PER_RRU][4];
|
||||
/// emtc_prach_ConfigIndex for IF4p5 per CE Level
|
||||
int emtc_prach_ConfigIndex[MAX_BANDS_PER_RRU][4];
|
||||
#endif
|
||||
/// mutex for asynch RX/TX thread
|
||||
pthread_mutex_t mutex_asynch_rxtx;
|
||||
/// mutex for RU access to eNB processing (PDSCH/PUSCH)
|
||||
|
||||
+47
-51
@@ -70,34 +70,34 @@
|
||||
#include "assertions.h"
|
||||
|
||||
#ifdef MEX
|
||||
#include "mex.h"
|
||||
# define msg mexPrintf
|
||||
# undef LOG_D
|
||||
# undef LOG_E
|
||||
# undef LOG_I
|
||||
# undef LOG_N
|
||||
# undef LOG_T
|
||||
# undef LOG_W
|
||||
# undef LOG_M
|
||||
# define LOG_D(x, ...) mexPrintf(__VA_ARGS__)
|
||||
# define LOG_E(x, ...) mexPrintf(__VA_ARGS__)
|
||||
# define LOG_I(x, ...) mexPrintf(__VA_ARGS__)
|
||||
# define LOG_N(x, ...) mexPrintf(__VA_ARGS__)
|
||||
# define LOG_T(x, ...) mexPrintf(__VA_ARGS__)
|
||||
# define LOG_W(x, ...) mexPrintf(__VA_ARGS__)
|
||||
# define LOG_M(x, ...) mexPrintf(__VA_ARGS__)
|
||||
#include "mex.h"
|
||||
#define msg mexPrintf
|
||||
#undef LOG_D
|
||||
#undef LOG_E
|
||||
#undef LOG_I
|
||||
#undef LOG_N
|
||||
#undef LOG_T
|
||||
#undef LOG_W
|
||||
#undef LOG_M
|
||||
#define LOG_D(x, ...) mexPrintf(__VA_ARGS__)
|
||||
#define LOG_E(x, ...) mexPrintf(__VA_ARGS__)
|
||||
#define LOG_I(x, ...) mexPrintf(__VA_ARGS__)
|
||||
#define LOG_N(x, ...) mexPrintf(__VA_ARGS__)
|
||||
#define LOG_T(x, ...) mexPrintf(__VA_ARGS__)
|
||||
#define LOG_W(x, ...) mexPrintf(__VA_ARGS__)
|
||||
#define LOG_M(x, ...) mexPrintf(__VA_ARGS__)
|
||||
#else
|
||||
# ifdef OPENAIR2
|
||||
# if ENABLE_RAL
|
||||
# include "collection/hashtable/hashtable.h"
|
||||
# include "COMMON/ral_messages_types.h"
|
||||
# include "UTIL/queue.h"
|
||||
# endif
|
||||
# include "common/utils/LOG/log.h"
|
||||
# define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
||||
# else
|
||||
# define msg printf
|
||||
# endif
|
||||
#ifdef OPENAIR2
|
||||
#if ENABLE_RAL
|
||||
#include "collection/hashtable/hashtable.h"
|
||||
#include "COMMON/ral_messages_types.h"
|
||||
#include "UTIL/queue.h"
|
||||
#endif
|
||||
#include "common/utils/LOG/log.h"
|
||||
#define msg(aRGS...) LOG_D(PHY, ##aRGS)
|
||||
#else
|
||||
#define msg printf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ typedef struct {
|
||||
//pthread_t pthread_slot0_dl_processing;
|
||||
pthread_t pthread_slot1_dl_processing;
|
||||
/// pthread attributes for fep_slot1 processing thread
|
||||
// pthread_attr_t attr_slot0_dl_processing;
|
||||
// pthread_attr_t attr_slot0_dl_processing;
|
||||
pthread_attr_t attr_slot1_dl_processing;
|
||||
/// condition variable for UE fep_slot1 thread;
|
||||
//pthread_cond_t cond_slot0_dl_processing;
|
||||
@@ -195,21 +195,21 @@ typedef struct {
|
||||
|
||||
/// Structure holding timer_thread related elements (phy_stub_UE mode)
|
||||
typedef struct {
|
||||
pthread_t pthread_timer;
|
||||
/// mutex for waiting SF ticking
|
||||
pthread_mutex_t mutex_ticking;
|
||||
/// \brief ticking var for ticking thread.
|
||||
/// \internal This variable is protected by \ref mutex_ticking.
|
||||
int ticking_var;
|
||||
/// condition variable for timer_thread;
|
||||
pthread_cond_t cond_ticking;
|
||||
//time_stats_t timer_stats;
|
||||
pthread_t pthread_timer;
|
||||
/// mutex for waiting SF ticking
|
||||
pthread_mutex_t mutex_ticking;
|
||||
/// \brief ticking var for ticking thread.
|
||||
/// \internal This variable is protected by \ref mutex_ticking.
|
||||
int ticking_var;
|
||||
/// condition variable for timer_thread;
|
||||
pthread_cond_t cond_ticking;
|
||||
//time_stats_t timer_stats;
|
||||
|
||||
// below 3 members is used for waiting each UE threads(multiple UEs test) in L2 FAPI simulator.
|
||||
// This used in UE_phy_stub_single_thread_rxn_txnp4
|
||||
pthread_mutex_t mutex_single_thread;
|
||||
pthread_cond_t cond_single_thread;
|
||||
int num_single_thread[NUMBER_OF_UE_MAX];
|
||||
// below 3 members is used for waiting each UE threads(multiple UEs test) in L2 FAPI simulator.
|
||||
// This used in UE_phy_stub_single_thread_rxn_txnp4
|
||||
pthread_mutex_t mutex_single_thread;
|
||||
pthread_cond_t cond_single_thread;
|
||||
int num_single_thread[NUMBER_OF_UE_MAX];
|
||||
} SF_ticking;
|
||||
|
||||
typedef struct {
|
||||
@@ -323,7 +323,7 @@ typedef struct {
|
||||
/// - second index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
|
||||
/// - third index: samples? [0..2*ofdm_symbol_size[
|
||||
int32_t **dl_ch_estimates_time[7];
|
||||
}LTE_UE_COMMON_PER_THREAD;
|
||||
} LTE_UE_COMMON_PER_THREAD;
|
||||
|
||||
typedef struct {
|
||||
/// \brief Holds the transmit data in time domain.
|
||||
@@ -425,9 +425,9 @@ typedef struct {
|
||||
int16_t *llr[2];
|
||||
/// \f$\log_2(\max|H_i|^2)\f$
|
||||
int16_t log2_maxh;
|
||||
/// \f$\log_2(\max|H_i|^2)\f$ //this is for TM3-4 layer1 channel compensation
|
||||
/// \f$\log_2(\max|H_i|^2)\f$ //this is for TM3-4 layer1 channel compensation
|
||||
int16_t log2_maxh0;
|
||||
/// \f$\log_2(\max|H_i|^2)\f$ //this is for TM3-4 layer2 channel commpensation
|
||||
/// \f$\log_2(\max|H_i|^2)\f$ //this is for TM3-4 layer2 channel commpensation
|
||||
int16_t log2_maxh1;
|
||||
/// \brief LLR shifts for subband scaling.
|
||||
/// - first index: ? [0..168*N_RB_DL[
|
||||
@@ -601,7 +601,8 @@ typedef enum {
|
||||
/// detect only uplink DCIs in the current subframe
|
||||
DL_DCI = 0x2,
|
||||
/// detect both uplink and downlink DCIs in the current subframe
|
||||
UL_DL_DCI = 0x3} dci_detect_mode_t;
|
||||
UL_DL_DCI = 0x3
|
||||
} dci_detect_mode_t;
|
||||
|
||||
typedef struct UE_SCAN_INFO_s {
|
||||
/// 10 best amplitudes (linear) for each pss signals
|
||||
@@ -621,11 +622,8 @@ typedef struct {
|
||||
//uint8_t local_flag;
|
||||
/// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach)
|
||||
runmode_t mode;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// \brief Indicator that UE is configured for FeMBMS functionality (This flag should be avoided) ... just kept for PBCH initical scan (TODO)
|
||||
int FeMBMS_active;
|
||||
#endif
|
||||
/// \brief Indicator that UE should perform band scanning
|
||||
int UE_scan;
|
||||
/// \brief Indicator that UE should perform coarse scanning around carrier
|
||||
@@ -708,10 +706,8 @@ typedef struct {
|
||||
|
||||
/// mbsfn reference symbols
|
||||
uint32_t lte_gold_mbsfn_table[10][3][42];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mbsfn reference symbols
|
||||
uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150];
|
||||
#endif
|
||||
|
||||
uint32_t X_u[64][839];
|
||||
|
||||
|
||||
+45
-83
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <sched.h>
|
||||
#include <stdio.h>
|
||||
@@ -61,7 +61,7 @@
|
||||
//#include <complex.h>
|
||||
#include "PHY/TOOLS/time_meas.h"
|
||||
#include "platform_types.h"
|
||||
#define MAX_NUM_RU_PER_eNB 64
|
||||
#define MAX_NUM_RU_PER_eNB 64
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
@@ -156,7 +156,6 @@ typedef struct {
|
||||
PRACH_CONFIG_INFO prach_ConfigInfo;
|
||||
} PRACH_CONFIG_COMMON;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// PRACH-eMTC-Config from 36.331 RRC spec
|
||||
typedef struct {
|
||||
/// Parameter: High-speed-flag, see TS 36.211 (5.7.2). \vr{[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set.
|
||||
@@ -173,7 +172,7 @@ typedef struct {
|
||||
uint8_t prach_ConfigIndex[4];
|
||||
/// indicator for CE level activation
|
||||
uint8_t prach_CElevel_enable[4];
|
||||
/// prach frequency offset for each CE level
|
||||
/// prach frequency offset for each CE level
|
||||
uint8_t prach_FreqOffset[4];
|
||||
/// indicator for CE level hopping activation
|
||||
uint8_t prach_hopping_enable[4];
|
||||
@@ -188,12 +187,9 @@ typedef struct {
|
||||
/// prach_Config_enabled=1 means enabled. \vr{[0..1]}
|
||||
uint8_t prach_Config_enabled;
|
||||
/// PRACH Configuration Information
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
PRACH_eMTC_CONFIG_INFO prach_ConfigInfo;
|
||||
#endif
|
||||
} PRACH_eMTC_CONFIG_COMMON;
|
||||
|
||||
#endif
|
||||
|
||||
/// Enumeration for parameter \f$N_\text{ANRep}\f$ \ref PUCCH_CONFIG_DEDICATED::repetitionFactor.
|
||||
typedef enum {
|
||||
@@ -575,14 +571,11 @@ typedef struct {
|
||||
int mbsfn_SubframeConfig;
|
||||
} MBSFN_config_t;
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
typedef struct {
|
||||
int radioframeAllocationPeriod;
|
||||
int radioframeAllocationOffset;
|
||||
int non_mbsfn_SubframeConfig;
|
||||
} NonMBSFN_config_t;
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct LTE_DL_FRAME_PARMS {
|
||||
@@ -628,29 +621,21 @@ typedef struct LTE_DL_FRAME_PARMS {
|
||||
uint8_t threequarter_fs;
|
||||
/// Size of FFT
|
||||
uint16_t ofdm_symbol_size;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t FeMBMS_active;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// Size of FFT
|
||||
uint16_t ofdm_symbol_size_khz_1dot25;
|
||||
#endif
|
||||
/// Number of prefix samples in all but first symbol of slot
|
||||
uint16_t nb_prefix_samples;
|
||||
/// Number of prefix samples in first symbol of slot
|
||||
uint16_t nb_prefix_samples0;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// Number of prefix samples in all but first symbol of slot
|
||||
/// Number of prefix samples in all but first symbol of slot
|
||||
uint16_t nb_prefix_samples_khz_1dot25;
|
||||
/// Number of prefix samples in first symbol of slot
|
||||
uint16_t nb_prefix_samples0_khz_1dot25;
|
||||
#endif
|
||||
/// Carrier offset in FFT buffer for first RE in PRB0
|
||||
uint16_t first_carrier_offset;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// Carrier offset in FFT buffer for first RE in PRB0 (FeMBMS
|
||||
uint16_t first_carrier_offset_khz_1dot25;
|
||||
#endif
|
||||
/// Number of samples in a subframe
|
||||
uint32_t samples_per_tti;
|
||||
/// Number of OFDM/SC-FDMA symbols in one subframe (to be modified to account for potential different in UL/DL)
|
||||
@@ -667,10 +652,8 @@ typedef struct LTE_DL_FRAME_PARMS {
|
||||
uint8_t nb_antenna_ports_eNB;
|
||||
/// PRACH_CONFIG
|
||||
PRACH_CONFIG_COMMON prach_config_common;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// PRACH_eMTC_CONFIG
|
||||
PRACH_eMTC_CONFIG_COMMON prach_emtc_config_common;
|
||||
#endif
|
||||
/// PUCCH Config Common (from 36-331 RRC spec)
|
||||
PUCCH_CONFIG_COMMON pucch_config_common;
|
||||
/// PDSCH Config Common (from 36-331 RRC spec)
|
||||
@@ -687,10 +670,8 @@ typedef struct LTE_DL_FRAME_PARMS {
|
||||
int num_MBSFN_config;
|
||||
/// Array of MBSFN Configurations (max 8 (maxMBSFN-Allocations) elements as per 36.331)
|
||||
MBSFN_config_t MBSFN_config[8];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t NonMBSFN_config_flag;
|
||||
NonMBSFN_config_t NonMBSFN_config;
|
||||
#endif
|
||||
/// Maximum Number of Retransmissions of RRCConnectionRequest (from 36-331 RRC Spec)
|
||||
uint8_t maxHARQ_Msg3Tx;
|
||||
/// Size of SI windows used for repetition of one SI message (in frames)
|
||||
@@ -705,9 +686,7 @@ typedef struct LTE_DL_FRAME_PARMS {
|
||||
uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
|
||||
|
||||
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[MAX_MBSFN_AREA];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
struct NonMBSFN_SubframeConfig *non_mbsfn_SubframeConfig;
|
||||
#endif
|
||||
/// for fair RR scheduler
|
||||
uint32_t ue_multiple_max;
|
||||
} LTE_DL_FRAME_PARMS;
|
||||
@@ -808,7 +787,7 @@ typedef struct {
|
||||
rnti_t rnti;
|
||||
/// Format
|
||||
DCI_format_t format;
|
||||
/// epdcch resource assignment (0=localized,1=distributed)
|
||||
/// epdcch resource assignment (0=localized,1=distributed)
|
||||
uint8_t epdcch_resource_assignment_flag;
|
||||
/// epdcch index
|
||||
uint16_t epdcch_id;
|
||||
@@ -817,7 +796,7 @@ typedef struct {
|
||||
/// epdcch number of PRBs in set
|
||||
uint8_t epdcch_num_prb;
|
||||
/// vector of prb ids for set
|
||||
uint8_t epdcch_prb_index[MAX_EPDCCH_PRB];
|
||||
uint8_t epdcch_prb_index[MAX_EPDCCH_PRB];
|
||||
/// LBT parameter for frame configuration
|
||||
uint8_t dwpts_symbols;
|
||||
/// LBT parameter for frame configuration
|
||||
@@ -825,7 +804,7 @@ typedef struct {
|
||||
/// DCI pdu
|
||||
uint8_t dci_pdu[8];
|
||||
} eDCI_ALLOC_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
/// Length of DCI in bits
|
||||
uint8_t dci_length;
|
||||
@@ -849,7 +828,7 @@ typedef struct {
|
||||
uint8_t number_of_prb_pairs;
|
||||
/// mpdcch resource assignment (combinatorial index r)
|
||||
uint8_t resource_block_assignment;
|
||||
/// transmission type (0=localized,1=distributed)
|
||||
/// transmission type (0=localized,1=distributed)
|
||||
uint8_t transmission_type;
|
||||
/// mpdcch start symbol
|
||||
uint8_t start_symbol;
|
||||
@@ -898,9 +877,9 @@ typedef enum {
|
||||
RESYNCH=4
|
||||
} UE_MODE_t;
|
||||
|
||||
#define FOREACH_PARALLEL(GEN) \
|
||||
GEN(PARALLEL_SINGLE_THREAD) \
|
||||
GEN(PARALLEL_RU_L1_SPLIT) \
|
||||
#define FOREACH_PARALLEL(GEN) \
|
||||
GEN(PARALLEL_SINGLE_THREAD) \
|
||||
GEN(PARALLEL_RU_L1_SPLIT) \
|
||||
GEN(PARALLEL_RU_L1_TRX_SPLIT)
|
||||
|
||||
#define GENERATE_ENUM(N) N,
|
||||
@@ -913,7 +892,7 @@ typedef enum {
|
||||
#define FOREACH_WORKER(GEN) GEN(WORKER_DISABLE) GEN(WORKER_ENABLE)
|
||||
typedef enum {
|
||||
FOREACH_WORKER(GENERATE_ENUM)
|
||||
}WORKER_CONF_t;
|
||||
} WORKER_CONF_t;
|
||||
|
||||
typedef struct THREAD_STRUCT_s {
|
||||
PARALLEL_CONF_t parallel_conf;
|
||||
@@ -1005,19 +984,19 @@ extern int sync_var;
|
||||
|
||||
typedef uint8_t(decoder_if_t)(int16_t *y,
|
||||
int16_t *y2,
|
||||
uint8_t *decoded_bytes,
|
||||
uint8_t *decoded_bytes2,
|
||||
uint16_t n,
|
||||
uint8_t max_iterations,
|
||||
uint8_t crc_type,
|
||||
uint8_t F,
|
||||
time_stats_t *init_stats,
|
||||
time_stats_t *alpha_stats,
|
||||
time_stats_t *beta_stats,
|
||||
time_stats_t *gamma_stats,
|
||||
time_stats_t *ext_stats,
|
||||
time_stats_t *intl1_stats,
|
||||
time_stats_t *intl2_stats);
|
||||
uint8_t *decoded_bytes,
|
||||
uint8_t *decoded_bytes2,
|
||||
uint16_t n,
|
||||
uint8_t max_iterations,
|
||||
uint8_t crc_type,
|
||||
uint8_t F,
|
||||
time_stats_t *init_stats,
|
||||
time_stats_t *alpha_stats,
|
||||
time_stats_t *beta_stats,
|
||||
time_stats_t *gamma_stats,
|
||||
time_stats_t *ext_stats,
|
||||
time_stats_t *intl1_stats,
|
||||
time_stats_t *intl2_stats);
|
||||
|
||||
typedef uint8_t(encoder_if_t)(uint8_t *input,
|
||||
uint16_t input_length_bytes,
|
||||
@@ -1025,18 +1004,15 @@ typedef uint8_t(encoder_if_t)(uint8_t *input,
|
||||
uint8_t F);
|
||||
|
||||
|
||||
static inline void wait_sync(char *thread_name)
|
||||
{
|
||||
static inline void wait_sync(char *thread_name) {
|
||||
int rc;
|
||||
|
||||
printf( "waiting for sync (%s,%d/%p,%p,%p)\n",thread_name,sync_var,&sync_var,&sync_cond,&sync_mutex);
|
||||
AssertFatal((rc = pthread_mutex_lock( &sync_mutex ))==0,"sync mutex lock error");
|
||||
|
||||
|
||||
while (sync_var<0)
|
||||
pthread_cond_wait( &sync_cond, &sync_mutex );
|
||||
|
||||
|
||||
AssertFatal((rc = pthread_mutex_unlock( &sync_mutex ))==0,"sync mutex unlock error");
|
||||
|
||||
printf( "got sync (%s)\n", thread_name);
|
||||
/*
|
||||
* Raphael Defosseux: added for CI to get faster the got sync message.
|
||||
@@ -1051,24 +1027,22 @@ static inline int wakeup_thread(pthread_mutex_t *mutex,
|
||||
int *instance_cnt,
|
||||
char *name,
|
||||
int sleeptime,
|
||||
int sleep_cnt_max)
|
||||
{
|
||||
int sleep_cnt_max) {
|
||||
int rc;
|
||||
int sleep_cnt=0;
|
||||
|
||||
AssertFatal((rc = pthread_mutex_lock(mutex))==0,"wakeup_thread(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
|
||||
|
||||
while (*instance_cnt == 0) {
|
||||
|
||||
AssertFatal((rc = pthread_mutex_unlock(mutex))==0,"wakeup_thread(): error unlocking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
|
||||
|
||||
sleep_cnt++;
|
||||
|
||||
if (sleep_cnt>sleep_cnt_max) return(-1);
|
||||
|
||||
usleep(sleeptime);
|
||||
AssertFatal((rc = pthread_mutex_lock(mutex))==0,"wakeup_thread(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
|
||||
}
|
||||
*instance_cnt = *instance_cnt + 1;
|
||||
|
||||
*instance_cnt = *instance_cnt + 1;
|
||||
AssertFatal((rc = pthread_mutex_unlock(mutex))==0,"wakeup_thread(): error unlocking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
|
||||
|
||||
// the thread can now be woken up
|
||||
@@ -1084,33 +1058,31 @@ static inline int wakeup_thread(pthread_mutex_t *mutex,
|
||||
|
||||
|
||||
static inline int timedwait_on_condition(pthread_mutex_t *mutex,
|
||||
pthread_cond_t *cond,
|
||||
int *instance_cnt,
|
||||
char *name,
|
||||
uint32_t time_ns)
|
||||
{
|
||||
pthread_cond_t *cond,
|
||||
int *instance_cnt,
|
||||
char *name,
|
||||
uint32_t time_ns) {
|
||||
int rc;
|
||||
int waitret=0;
|
||||
struct timespec now, abstime;
|
||||
|
||||
AssertFatal((rc = pthread_mutex_lock(mutex))==0,"[SCHED][eNB] timedwait_on_condition(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
|
||||
|
||||
while (*instance_cnt < 0) {
|
||||
clock_gettime(CLOCK_REALTIME, &now);
|
||||
clock_gettime(CLOCK_REALTIME, &now);
|
||||
// most of the time the thread is waiting here
|
||||
// proc->instance_cnt_rxtx is -1
|
||||
abstime.tv_sec = now.tv_sec;
|
||||
abstime.tv_nsec = now.tv_nsec + time_ns;
|
||||
if (abstime.tv_nsec >= 1000*1000*1000)
|
||||
{
|
||||
|
||||
if (abstime.tv_nsec >= 1000*1000*1000) {
|
||||
abstime.tv_nsec -= 1000*1000*1000;
|
||||
abstime.tv_sec += 1;
|
||||
}
|
||||
|
||||
if ((waitret = pthread_cond_timedwait(cond,mutex,&abstime)) == 0) break; // this unlocks mutex_rxtx while waiting and then locks it again
|
||||
}
|
||||
|
||||
AssertFatal((rc = pthread_mutex_unlock(mutex)) == 0,"[SCHED][eNB] timedwait_on_condition(): error unlocking mutex return %d for %s\n", rc, name);
|
||||
|
||||
return(waitret);
|
||||
}
|
||||
|
||||
@@ -1118,10 +1090,8 @@ static inline int timedwait_on_condition(pthread_mutex_t *mutex,
|
||||
static inline int wait_on_condition(pthread_mutex_t *mutex,
|
||||
pthread_cond_t *cond,
|
||||
int *instance_cnt,
|
||||
char *name)
|
||||
{
|
||||
char *name) {
|
||||
int rc;
|
||||
|
||||
AssertFatal((rc = pthread_mutex_lock(mutex))==0,"[SCHED][eNB] wait_on_condition(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
|
||||
|
||||
while (*instance_cnt < 0) {
|
||||
@@ -1131,16 +1101,14 @@ static inline int wait_on_condition(pthread_mutex_t *mutex,
|
||||
}
|
||||
|
||||
AssertFatal((rc = pthread_mutex_unlock(mutex))==0,"[SCHED][eNB] wait_on_condition(): error unlocking mutex return %d for %s\n", rc, name);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
static inline int wait_on_busy_condition(pthread_mutex_t *mutex,
|
||||
pthread_cond_t *cond,
|
||||
int *instance_cnt,
|
||||
char *name)
|
||||
{
|
||||
pthread_cond_t *cond,
|
||||
int *instance_cnt,
|
||||
char *name) {
|
||||
int rc;
|
||||
AssertFatal((rc = pthread_mutex_lock(mutex))==0,"[SCHED][eNB] wait_on_busy_condition(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
|
||||
|
||||
@@ -1151,23 +1119,17 @@ static inline int wait_on_busy_condition(pthread_mutex_t *mutex,
|
||||
}
|
||||
|
||||
AssertFatal((rc = pthread_mutex_unlock(mutex))==0,"[SCHED][eNB] wait_on_busy_condition(): error unlocking mutex return %d for %s\n", rc, name);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
static inline int release_thread(pthread_mutex_t *mutex,
|
||||
int *instance_cnt,
|
||||
char *name)
|
||||
{
|
||||
char *name) {
|
||||
int rc;
|
||||
|
||||
AssertFatal((rc = pthread_mutex_lock(mutex))==0,"[SCHED][eNB] release_thread(): error locking mutex for %s (%d %s, %p)\n", name, rc, strerror(rc), (void *)mutex);
|
||||
|
||||
*instance_cnt=-1;
|
||||
|
||||
AssertFatal((rc = pthread_mutex_unlock(mutex))==0,"[SCHED][eNB] release_thread(): error unlocking mutex return %d for %s\n", rc, name);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
+3
-32
@@ -34,7 +34,7 @@
|
||||
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include <execinfo.h>
|
||||
@@ -90,7 +90,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
uint8_t num_dci;
|
||||
uint8_t num_pdcch_symbols;
|
||||
uint8_t num_pdcch_symbols;
|
||||
DCI_ALLOC_t dci_alloc[32];
|
||||
} LTE_eNB_PDCCH;
|
||||
|
||||
@@ -115,7 +115,7 @@ typedef struct {
|
||||
uint8_t num_dci;
|
||||
/// MPDCCH DCI allocations from MAC
|
||||
mDCI_ALLOC_t mdci_alloc[32];
|
||||
// MAX SIZE of an EPDCCH set is 16EREGs * 9REs/EREG * 8 PRB pairs = 2304 bits
|
||||
// MAX SIZE of an EPDCCH set is 16EREGs * 9REs/EREG * 8 PRB pairs = 2304 bits
|
||||
uint8_t e[2304];
|
||||
} LTE_eNB_MPDCCH;
|
||||
|
||||
@@ -195,12 +195,10 @@ typedef struct {
|
||||
int32_t **prach_ifft[4];
|
||||
|
||||
/// repetition number
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// indicator of first frame in a group of PRACH repetitions
|
||||
int first_frame[4];
|
||||
/// current repetition for each CE level
|
||||
int repetition_number[4];
|
||||
#endif
|
||||
} LTE_eNB_PRACH;
|
||||
|
||||
/// Context data structure for RX/TX portion of subframe processing
|
||||
@@ -282,30 +280,24 @@ typedef struct L1_proc_t_s {
|
||||
int subframe_rx;
|
||||
/// subframe to act upon for PRACH
|
||||
int subframe_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// subframe to act upon for reception of prach BL/CE UEs
|
||||
int subframe_prach_br;
|
||||
#endif
|
||||
/// frame to act upon for reception
|
||||
int frame_rx;
|
||||
/// frame to act upon for transmission
|
||||
int frame_tx;
|
||||
/// frame to act upon for PRACH
|
||||
int frame_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// frame to act upon for PRACH BL/CE UEs
|
||||
int frame_prach_br;
|
||||
#endif
|
||||
/// \internal This variable is protected by \ref mutex_td.
|
||||
int instance_cnt_td;
|
||||
/// \internal This variable is protected by \ref mutex_te.
|
||||
int instance_cnt_te;
|
||||
/// \internal This variable is protected by \ref mutex_prach.
|
||||
int instance_cnt_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// \internal This variable is protected by \ref mutex_prach for BL/CE UEs.
|
||||
int instance_cnt_prach_br;
|
||||
#endif
|
||||
// instance count for over-the-air eNB synchronization
|
||||
int instance_cnt_synch;
|
||||
|
||||
@@ -326,10 +318,8 @@ typedef struct L1_proc_t_s {
|
||||
pthread_attr_t attr_single;
|
||||
/// pthread attributes for prach processing thread
|
||||
pthread_attr_t attr_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// pthread attributes for prach processing thread BL/CE UEs
|
||||
pthread_attr_t attr_prach_br;
|
||||
#endif
|
||||
/// pthread attributes for asynchronous RX thread
|
||||
pthread_attr_t attr_asynch_rxtx;
|
||||
/// scheduling parameters for parallel turbo-decoder thread
|
||||
@@ -340,10 +330,8 @@ typedef struct L1_proc_t_s {
|
||||
struct sched_param sched_param_single;
|
||||
/// scheduling parameters for prach thread
|
||||
struct sched_param sched_param_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// scheduling parameters for prach thread
|
||||
struct sched_param sched_param_prach_br;
|
||||
#endif
|
||||
/// scheduling parameters for asynch_rxtx thread
|
||||
struct sched_param sched_param_asynch_rxtx;
|
||||
/// pthread structure for parallel turbo-decoder thread
|
||||
@@ -352,21 +340,16 @@ typedef struct L1_proc_t_s {
|
||||
pthread_t pthread_te;
|
||||
/// pthread structure for PRACH thread
|
||||
pthread_t pthread_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// pthread structure for PRACH thread BL/CE UEs
|
||||
pthread_t pthread_prach_br;
|
||||
#endif
|
||||
/// condition variable for parallel turbo-decoder thread
|
||||
pthread_cond_t cond_td;
|
||||
/// condition variable for parallel turbo-encoder thread
|
||||
pthread_cond_t cond_te;
|
||||
/// condition variable for PRACH processing thread;
|
||||
pthread_cond_t cond_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// condition variable for PRACH processing thread BL/CE UEs;
|
||||
pthread_cond_t cond_prach_br;
|
||||
#endif
|
||||
|
||||
/// condition variable for asynch RX/TX thread
|
||||
pthread_cond_t cond_asynch_rxtx;
|
||||
/// mutex for parallel turbo-decoder thread
|
||||
@@ -375,10 +358,8 @@ typedef struct L1_proc_t_s {
|
||||
pthread_mutex_t mutex_te;
|
||||
/// mutex for PRACH thread
|
||||
pthread_mutex_t mutex_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mutex for PRACH thread for BL/CE UEs
|
||||
pthread_mutex_t mutex_prach_br;
|
||||
#endif
|
||||
/// mutex for asynch RX/TX thread
|
||||
pthread_mutex_t mutex_asynch_rxtx;
|
||||
/// mutex for RU access to eNB processing (PDSCH/PUSCH)
|
||||
@@ -399,10 +380,8 @@ typedef struct L1_proc_t_s {
|
||||
time_stats_t ru_arrival_time;
|
||||
/// mask for RUs serving eNB (PRACH)
|
||||
int RU_mask_prach;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mask for RUs serving eNB (PRACH)
|
||||
int RU_mask_prach_br;
|
||||
#endif
|
||||
/// parameters for turbo-decoding worker thread
|
||||
td_params tdp;
|
||||
/// parameters for turbo-encoding worker thread
|
||||
@@ -508,18 +487,14 @@ typedef struct PHY_VARS_eNB_s {
|
||||
nfapi_cqi_indication_raw_pdu_t cqi_raw_pdu_list[NFAPI_CQI_IND_MAX_PDU];
|
||||
/// NFAPI PRACH information
|
||||
nfapi_preamble_pdu_t preamble_list[MAX_NUM_RX_PRACH_PREAMBLES];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// NFAPI PRACH information BL/CE UEs
|
||||
nfapi_preamble_pdu_t preamble_list_br[MAX_NUM_RX_PRACH_PREAMBLES];
|
||||
#endif
|
||||
Sched_Rsp_t Sched_INFO;
|
||||
LTE_eNB_PDCCH pdcch_vars[2];
|
||||
LTE_eNB_PHICH phich_vars[2];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_eNB_EPDCCH epdcch_vars[2];
|
||||
LTE_eNB_MPDCCH mpdcch_vars[2];
|
||||
LTE_eNB_PRACH prach_vars_br;
|
||||
#endif
|
||||
LTE_eNB_COMMON common_vars;
|
||||
LTE_eNB_UCI uci_vars[NUMBER_OF_UCI_VARS_MAX];
|
||||
LTE_eNB_SRS srs_vars[NUMBER_OF_UE_MAX];
|
||||
@@ -545,10 +520,8 @@ typedef struct PHY_VARS_eNB_s {
|
||||
|
||||
/// mbsfn reference symbols
|
||||
uint32_t lte_gold_mbsfn_table[10][3][42];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// mbsfn reference symbols
|
||||
uint32_t lte_gold_mbsfn_khz_1dot25_table[10][150];
|
||||
#endif
|
||||
|
||||
// PRACH energy detection parameters
|
||||
/// Detection threshold for LTE PRACH
|
||||
@@ -567,9 +540,7 @@ typedef struct PHY_VARS_eNB_s {
|
||||
int pucch1ab_DTX_threshold_emtc[4];
|
||||
|
||||
uint32_t X_u[64][839];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t X_u_br[4][64][839];
|
||||
#endif
|
||||
uint8_t pbch_configured;
|
||||
uint8_t pbch_pdu[4]; //PBCH_PDU_SIZE
|
||||
char eNB_generate_rar;
|
||||
|
||||
+28
-60
@@ -61,7 +61,6 @@ void handle_nfapi_dci_dl_pdu(PHY_VARS_eNB *eNB,
|
||||
proc->subframe_tx, idx, pdcch_vars->num_dci);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
|
||||
L1_rxtx_proc_t *proc,
|
||||
@@ -77,7 +76,6 @@ void handle_nfapi_mpdcch_pdu(PHY_VARS_eNB *eNB,
|
||||
fill_mdci_and_dlsch(eNB,proc,&mpdcch_vars->mdci_alloc[mpdcch_vars->num_dci],pdu);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu) {
|
||||
@@ -122,7 +120,6 @@ void handle_nfapi_hi_dci0_hi_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxt
|
||||
phich->config[phich->num_hi].n_DMRS = hi_dci0_config_pdu->hi_pdu.hi_pdu_rel8.cyclic_shift_2_for_drms;
|
||||
phich->num_hi++;
|
||||
AssertFatal(phich->num_hi<32,"Maximum number of phich reached in subframe\n");
|
||||
|
||||
}
|
||||
|
||||
void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
@@ -140,28 +137,24 @@ void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
|
||||
// adjust transmit amplitude here based on NFAPI info
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
extern uint32_t localRIV2alloc_LUT6[32];
|
||||
extern uint32_t localRIV2alloc_LUT25[512];
|
||||
extern uint32_t localRIV2alloc_LUT50_0[1600];
|
||||
extern uint32_t localRIV2alloc_LUT50_1[1600];
|
||||
extern uint32_t localRIV2alloc_LUT100_0[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_1[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_2[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_3[6000];
|
||||
#endif
|
||||
|
||||
extern uint32_t localRIV2alloc_LUT6[32];
|
||||
extern uint32_t localRIV2alloc_LUT25[512];
|
||||
extern uint32_t localRIV2alloc_LUT50_0[1600];
|
||||
extern uint32_t localRIV2alloc_LUT50_1[1600];
|
||||
extern uint32_t localRIV2alloc_LUT100_0[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_1[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_2[6000];
|
||||
extern uint32_t localRIV2alloc_LUT100_3[6000];
|
||||
|
||||
|
||||
void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu,
|
||||
uint8_t codeword_index,
|
||||
uint8_t *sdu) {
|
||||
nfapi_dl_config_dlsch_pdu_rel8_t *rel8 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
nfapi_dl_config_dlsch_pdu_rel10_t *rel10 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
nfapi_dl_config_dlsch_pdu_rel13_t *rel13 = &dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13;
|
||||
#endif
|
||||
LTE_eNB_DLSCH_t *dlsch0=NULL,*dlsch1=NULL;
|
||||
LTE_DL_eNB_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL;
|
||||
int UE_id;
|
||||
@@ -180,12 +173,11 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
//AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
|
||||
dlsch0 = eNB->dlsch[UE_id][0];
|
||||
dlsch1 = eNB->dlsch[UE_id][1];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
if ((rel13->pdsch_payload_type < 2) && (rel13->ue_type>0)) dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx] = 0;
|
||||
|
||||
#endif
|
||||
harq_pid = dlsch0->harq_ids[proc->frame_tx%2][proc->subframe_tx];
|
||||
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
|
||||
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
|
||||
return;
|
||||
@@ -245,7 +237,6 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
rel8->rnti,UE_id,harq_pid);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#ifdef PHY_TX_THREAD
|
||||
dlsch0_harq->sib1_br_flag=0;
|
||||
#else
|
||||
@@ -260,9 +251,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
dlsch0->harq_mask = 1;
|
||||
dlsch0_harq = dlsch0->harq_processes[0];
|
||||
dlsch0_harq->pdu = sdu;
|
||||
|
||||
LOG_D(PHY,"NFAPI: frame %d, subframe %d (TX %d.%d): Programming SI-BR (%d) => %d\n",frame,subframe,proc->frame_tx,proc->subframe_tx,rel13->pdsch_payload_type,UE_id);
|
||||
|
||||
dlsch0->rnti = 0xFFFF;
|
||||
dlsch0->Kmimo = 1;
|
||||
dlsch0->Mdlharq = 4;
|
||||
@@ -329,19 +318,14 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
dlsch0_harq->Qm = rel8->modulation;
|
||||
dlsch0_harq->codeword = 0;
|
||||
dlsch0_harq->pdsch_start = rel10->pdsch_start;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
UE_id = find_dlsch(rel8->rnti,eNB,SEARCH_EXIST_OR_FREE);
|
||||
AssertFatal(UE_id!=-1,"no free or exiting dlsch_context\n");
|
||||
AssertFatal(UE_id<NUMBER_OF_UE_MAX,"returned UE_id %d >= %d(NUMBER_OF_UE_MAX)\n",UE_id,NUMBER_OF_UE_MAX);
|
||||
dlsch0 = eNB->dlsch[UE_id][0];
|
||||
dlsch1 = eNB->dlsch[UE_id][1];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
dlsch0->sib1_br_flag=0;
|
||||
dlsch0->i0 = 0xFFFF;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(PHY,"dlsch->i0:%04x dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n",
|
||||
#ifdef PHY_TX_THREAD
|
||||
dlsch0_harq->i0,
|
||||
@@ -352,13 +336,6 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
dlsch0_harq->TBS, dlsch0_harq->Qm, dlsch0_harq->codeword, dlsch0_harq->rb_alloc[0],
|
||||
rel8->length
|
||||
);
|
||||
#else
|
||||
LOG_D(PHY,"dlsch0_harq[pdsch_start:%d nb_rb:%d vrb_type:%d rvidx:%d Nl:%d mimo_mode:%d dl_power_off:%d round:%d status:%d TBS:%d Qm:%d codeword:%d rb_alloc:%d] rel8[length:%d]\n",
|
||||
dlsch0_harq->pdsch_start, dlsch0_harq->nb_rb, dlsch0_harq->vrb_type, dlsch0_harq->rvidx, dlsch0_harq->Nl, dlsch0_harq->mimo_mode, dlsch0_harq->dl_power_off, dlsch0_harq->round, dlsch0_harq->status,
|
||||
dlsch0_harq->TBS, dlsch0_harq->Qm, dlsch0_harq->codeword, dlsch0_harq->rb_alloc[0],
|
||||
rel8->length
|
||||
);
|
||||
#endif
|
||||
dlsch0->active = 1;
|
||||
harq_pid = dlsch0->harq_ids[frame%2][proc->subframe_tx];
|
||||
dlsch0->harq_mask |= (1<<harq_pid);
|
||||
@@ -379,12 +356,9 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
|
||||
computeRhoB_eNB(rel8->pa,eNB->frame_parms.pdsch_config_common.p_b,eNB->frame_parms.nb_antenna_ports_eNB,dlsch1,dlsch1_harq->dl_power_off);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (rel13->ue_type>0)
|
||||
dlsch0_harq->pdsch_start = rel10->pdsch_start;
|
||||
else
|
||||
#endif
|
||||
dlsch0_harq->pdsch_start = eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols;
|
||||
|
||||
if (dlsch0_harq->round==0) { //get pointer to SDU if this a new SDU
|
||||
@@ -569,8 +543,7 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu,
|
||||
uint16_t frame,
|
||||
uint8_t subframe,
|
||||
uint8_t srs_active)
|
||||
{
|
||||
uint8_t srs_active) {
|
||||
LTE_eNB_UCI *uci = &eNB->uci_vars[UE_id];
|
||||
|
||||
if (NFAPI_MODE==NFAPI_MODE_VNF) return;
|
||||
@@ -586,11 +559,9 @@ void handle_uci_sr_pdu(PHY_VARS_eNB *eNB,
|
||||
uci->n_pucch_1_0_sr[0] = ul_config_pdu->uci_sr_pdu.sr_information.sr_information_rel8.pucch_index;
|
||||
uci->srs_active = srs_active;
|
||||
uci->active = 1;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uci->ue_type = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.ue_type;
|
||||
uci->empty_symbols = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.empty_symbols;
|
||||
uci->total_repetitions = ul_config_pdu->uci_sr_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
|
||||
#endif
|
||||
LOG_D(PHY,"Programming UCI SR rnti %x, pucch1_0 %d for (%d,%d)\n",
|
||||
uci->rnti,
|
||||
uci->n_pucch_1_0_sr[0],
|
||||
@@ -613,11 +584,9 @@ void handle_uci_sr_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_
|
||||
uci->n_pucch_1_0_sr[0] = ul_config_pdu->uci_sr_harq_pdu.sr_information.sr_information_rel8.pucch_index;
|
||||
uci->srs_active = srs_active;
|
||||
uci->active = 1;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uci->ue_type = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.ue_type;
|
||||
uci->empty_symbols = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.empty_symbols;
|
||||
uci->total_repetitions = ul_config_pdu->uci_sr_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
|
||||
#endif
|
||||
handle_uci_harq_information(eNB,uci,&ul_config_pdu->uci_sr_harq_pdu.harq_information);
|
||||
}
|
||||
|
||||
@@ -634,11 +603,9 @@ void handle_uci_harq_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu
|
||||
uci->type = HARQ;
|
||||
uci->srs_active = srs_active;
|
||||
uci->num_antenna_ports = ul_config_pdu->uci_harq_pdu.harq_information.harq_information_rel11.num_ant_ports;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uci->ue_type = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.ue_type;
|
||||
uci->empty_symbols = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.empty_symbols;
|
||||
uci->total_repetitions = ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel13.total_number_of_repetitions;
|
||||
#endif
|
||||
handle_uci_harq_information(eNB,uci,&ul_config_pdu->uci_harq_pdu.harq_information);
|
||||
uci->active=1;
|
||||
}
|
||||
@@ -774,9 +741,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
|
||||
eNB->pdcch_vars[subframe&1].num_pdcch_symbols = number_pdcch_ofdm_symbols;
|
||||
eNB->pdcch_vars[subframe&1].num_dci = 0;
|
||||
eNB->phich_vars[subframe&1].num_hi = 0;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
eNB->mpdcch_vars[subframe&1].num_dci = 0;
|
||||
#endif
|
||||
LOG_D(PHY,"NFAPI: Sched_INFO:SFN/SF:%04d%d DL_req:SFN/SF:%04d%d:dl_pdu:%d tx_req:SFN/SF:%04d%d:pdus:%d\n",
|
||||
frame,subframe,
|
||||
NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),number_dl_pdu,
|
||||
@@ -803,13 +768,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
|
||||
|
||||
// clear DCI allocation maps for new subframe
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF)
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
if (eNB->ulsch[i]) {
|
||||
ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid];
|
||||
ulsch_harq->dci_alloc=0;
|
||||
ulsch_harq->rar_alloc=0;
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
if (eNB->ulsch[i]) {
|
||||
ulsch_harq = eNB->ulsch[i]->harq_processes[harq_pid];
|
||||
ulsch_harq->dci_alloc=0;
|
||||
ulsch_harq->rar_alloc=0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i=0; i<number_dl_pdu; i++) {
|
||||
@@ -820,6 +785,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
|
||||
case NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE:
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF)
|
||||
handle_nfapi_dci_dl_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu);
|
||||
|
||||
eNB->pdcch_vars[NFAPI_SFNSF2SF(DL_req->sfn_sf)&1].num_dci++;
|
||||
//LOG_E(PHY,"Incremented num_dci:%d but already set??? dl_config:num_dci:%d\n", eNB->pdcch_vars[subframe&1].num_dci, number_dci);
|
||||
do_oai=1;
|
||||
@@ -832,11 +798,13 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
|
||||
TX_req->tx_request_body.number_of_pdus);
|
||||
eNB->pbch_configured=1;
|
||||
do_oai=1;
|
||||
|
||||
//LOG_D(PHY,"%s() NFAPI_DL_CONFIG_BCH_PDU_TYPE TX:%d/%d RX:%d/%d TXREQ:%d/%d\n",
|
||||
//__FUNCTION__, proc->frame_tx, proc->subframe_tx, proc->frame_rx, proc->subframe_rx, NFAPI_SFNSF2SFN(TX_req->sfn_sf), NFAPI_SFNSF2SF(TX_req->sfn_sf));
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF)
|
||||
handle_nfapi_bch_pdu(eNB,proc,dl_config_pdu,
|
||||
TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index].segments[0].segment_data);
|
||||
TX_req->tx_request_body.tx_pdu_list[dl_config_pdu->bch_pdu.bch_pdu_rel8.pdu_index].segments[0].segment_data);
|
||||
|
||||
break;
|
||||
|
||||
case NFAPI_DL_CONFIG_MCH_PDU_TYPE:
|
||||
@@ -867,8 +835,8 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
|
||||
dlsch_pdu_rel8->transport_blocks);
|
||||
|
||||
if (1) { //sdu != NULL)
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF)
|
||||
handle_nfapi_dlsch_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu, dlsch_pdu_rel8->transport_blocks-1, sdu);
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF)
|
||||
handle_nfapi_dlsch_pdu(eNB,NFAPI_SFNSF2SFN(DL_req->sfn_sf),NFAPI_SFNSF2SF(DL_req->sfn_sf),proc,dl_config_pdu, dlsch_pdu_rel8->transport_blocks-1, sdu);
|
||||
} else {
|
||||
dont_send=1;
|
||||
LOG_E(MAC,"%s() NFAPI_DL_CONFIG_DLSCH_PDU_TYPE sdu is NULL DL_CFG:SFN/SF:%d:pdu_index:%d TX_REQ:SFN/SF:%d:pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(DL_req->sfn_sf), pdu_index,
|
||||
@@ -906,22 +874,22 @@ void schedule_response(Sched_Rsp_t *Sched_INFO) {
|
||||
case NFAPI_DL_CONFIG_EPDCCH_DL_PDU_TYPE:
|
||||
// handle_nfapi_epdcch_pdu(eNB,dl_config_pdu);
|
||||
break;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
case NFAPI_DL_CONFIG_MPDCCH_PDU_TYPE:
|
||||
if (NFAPI_MODE!=NFAPI_MODE_VNF)
|
||||
handle_nfapi_mpdcch_pdu(eNB,proc,dl_config_pdu);
|
||||
|
||||
eNB->mpdcch_vars[subframe&1].num_dci++;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if ((NFAPI_MODE!=NFAPI_MONOLITHIC) && do_oai && !dont_send) {
|
||||
if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0){
|
||||
if(Sched_INFO->TX_req->tx_request_body.number_of_pdus > 0) {
|
||||
Sched_INFO->TX_req->sfn_sf = frame << 4 | subframe;
|
||||
oai_nfapi_tx_req(Sched_INFO->TX_req);
|
||||
}
|
||||
|
||||
Sched_INFO->DL_req->sfn_sf = frame << 4 | subframe;
|
||||
oai_nfapi_dl_config_req(Sched_INFO->DL_req); // DJP - .dl_config_request_body.dl_config_pdu_list[0]); // DJP - FIXME TODO - yuk - only copes with 1 pdu
|
||||
Sched_INFO->UE_release_req->sfn_sf = frame << 4 | subframe;
|
||||
|
||||
@@ -119,15 +119,12 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr
|
||||
}
|
||||
|
||||
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
MCH_PDU *mch_pduP=NULL;
|
||||
// uint8_t sync_area=255;
|
||||
#endif
|
||||
int subframe = proc->subframe_tx;
|
||||
AssertFatal (1 == 0, "pmch not tested for the moment, exiting\n");
|
||||
// This is DL-Cell spec pilots in Control region
|
||||
generate_pilots_slot (eNB, eNB->common_vars.txdataF, AMP, subframe << 1, 1);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
// if mcch is active, send regardless of the node type: eNB or RN
|
||||
// when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing
|
||||
@@ -155,8 +152,6 @@ void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
|
||||
} else {
|
||||
LOG_D (PHY, "[eNB/RN] Frame %d subframe %d: MCH not generated \n", proc->frame_tx, subframe);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void common_signal_procedures (PHY_VARS_eNB *eNB,int frame, int subframe) {
|
||||
@@ -241,8 +236,8 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
|
||||
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
||||
|
||||
if (dlsch->rnti != 0xffff) {//frame < 200) {
|
||||
LOG_D(PHY,
|
||||
"[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH (type %d) with input size = %"PRIu16", pdsch_start %d, G %d, nb_rb %"PRIu16", rb0 %x, rb1 %x, TBS %"PRIu16", pmi_alloc %"PRIx64", rv %"PRIu8" (round %"PRIu8")\n",
|
||||
LOG_D(PHY,
|
||||
"[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH (type %d) with input size = %"PRIu16", pdsch_start %d, G %d, nb_rb %"PRIu16", rb0 %x, rb1 %x, TBS %"PRIu16", pmi_alloc %"PRIx64", rv %"PRIu8" (round %"PRIu8")\n",
|
||||
eNB->Mod_id, dlsch->rnti,harq_pid,
|
||||
frame, subframe, dlsch->ue_type,dlsch_harq->TBS/8, dlsch_harq->pdsch_start,
|
||||
get_G(fp,
|
||||
@@ -279,8 +274,8 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
|
||||
|
||||
if (dlsch->rnti!=0xffff)
|
||||
LOG_D(PHY,"Generating DLSCH/PDSCH pdu:%p pdsch_start:%d frame:%d subframe:%d nb_rb:%d rb_alloc:%d Qm:%d Nl:%d round:%d\n",
|
||||
dlsch_harq->pdu,dlsch_harq->pdsch_start,frame,subframe,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0],
|
||||
dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round);
|
||||
dlsch_harq->pdu,dlsch_harq->pdsch_start,frame,subframe,dlsch_harq->nb_rb,dlsch_harq->rb_alloc[0],
|
||||
dlsch_harq->Qm,dlsch_harq->Nl,dlsch_harq->round);
|
||||
|
||||
// 36-212
|
||||
if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) { // monolthic OR PNF - do not need turbo encoding on VNF
|
||||
@@ -309,6 +304,7 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
|
||||
if(eNB->dlsch_encoding_stats.p_time>500*3000 && opp_enabled == 1) {
|
||||
print_meas_now(&eNB->dlsch_encoding_stats,"total coding",stderr);
|
||||
}
|
||||
|
||||
#ifdef PHY_TX_THREAD
|
||||
dlsch->active[subframe] = 0;
|
||||
#else
|
||||
@@ -318,6 +314,7 @@ bool dlsch_procedures(PHY_VARS_eNB *eNB,
|
||||
LOG_D(PHY,"Generated DLSCH dlsch_harq[round:%d]\n",dlsch_harq->round);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -333,32 +330,31 @@ void pdsch_procedures(PHY_VARS_eNB *eNB,
|
||||
// 36-211
|
||||
start_meas(&eNB->dlsch_scrambling_stats);
|
||||
dlsch_scrambling(fp,
|
||||
0,
|
||||
dlsch,
|
||||
harq_pid,
|
||||
get_G(fp,
|
||||
dlsch_harq->nb_rb,
|
||||
dlsch_harq->rb_alloc,
|
||||
dlsch_harq->Qm,
|
||||
dlsch_harq->Nl,
|
||||
dlsch_harq->pdsch_start,
|
||||
frame,subframe,
|
||||
0),
|
||||
0,
|
||||
frame,
|
||||
subframe<<1);
|
||||
0,
|
||||
dlsch,
|
||||
harq_pid,
|
||||
get_G(fp,
|
||||
dlsch_harq->nb_rb,
|
||||
dlsch_harq->rb_alloc,
|
||||
dlsch_harq->Qm,
|
||||
dlsch_harq->Nl,
|
||||
dlsch_harq->pdsch_start,
|
||||
frame,subframe,
|
||||
0),
|
||||
0,
|
||||
frame,
|
||||
subframe<<1);
|
||||
stop_meas(&eNB->dlsch_scrambling_stats);
|
||||
start_meas(&eNB->dlsch_modulation_stats);
|
||||
dlsch_modulation(eNB,
|
||||
eNB->common_vars.txdataF,
|
||||
AMP,
|
||||
frame,
|
||||
subframe,
|
||||
dlsch_harq->pdsch_start,
|
||||
dlsch,
|
||||
dlsch->ue_type==0 ? dlsch1 : (LTE_eNB_DLSCH_t *)NULL);
|
||||
eNB->common_vars.txdataF,
|
||||
AMP,
|
||||
frame,
|
||||
subframe,
|
||||
dlsch_harq->pdsch_start,
|
||||
dlsch,
|
||||
dlsch->ue_type==0 ? dlsch1 : (LTE_eNB_DLSCH_t *)NULL);
|
||||
stop_meas(&eNB->dlsch_modulation_stats);
|
||||
|
||||
LOG_D(PHY,"Generated PDSCH dlsch_harq[round:%d]\n",dlsch_harq->round);
|
||||
}
|
||||
|
||||
@@ -374,9 +370,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
int16_t UE_id=0;
|
||||
uint8_t num_pdcch_symbols=0;
|
||||
uint8_t num_dci=0;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t num_mdci = 0;
|
||||
#endif
|
||||
uint8_t ul_subframe;
|
||||
uint32_t ul_frame;
|
||||
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
|
||||
@@ -420,11 +414,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
// (subframe_select(fp,ul_subframe)==SF_UL)) { // This means that there is a potential UL subframe that will be scheduled here
|
||||
if (ul_subframe < 10) { // This means that there is a potential UL subframe that will be scheduled here
|
||||
for (i=0; i<NUMBER_OF_UE_MAX; i++) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (eNB->ulsch[i] && eNB->ulsch[i]->ue_type >0) harq_pid = 0;
|
||||
else
|
||||
#endif
|
||||
harq_pid = subframe2harq_pid(fp,ul_frame,ul_subframe);
|
||||
|
||||
if (eNB->ulsch[i]) {
|
||||
@@ -459,7 +450,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,num_pdcch_symbols);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME (VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO, (frame * 10) + subframe);
|
||||
|
||||
if (num_pdcch_symbols == 0){
|
||||
if (num_pdcch_symbols == 0) {
|
||||
LOG_E(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (num_dci %"PRIu8") num_pdcch_symbols:%d\n",eNB->Mod_id,frame, subframe, num_dci, num_pdcch_symbols);
|
||||
return;
|
||||
}
|
||||
@@ -478,15 +469,12 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
fp,
|
||||
eNB->common_vars.txdataF,
|
||||
subframe);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
num_mdci = eNB->mpdcch_vars[subframe &1].num_dci;
|
||||
|
||||
if (num_mdci > 0) {
|
||||
LOG_D (PHY, "[eNB %" PRIu8 "] Frame %d, subframe %d: Calling generate_mdci_top (mpdcch) (num_dci %" PRIu8 ")\n", eNB->Mod_id, frame, subframe, num_mdci);
|
||||
generate_mdci_top (eNB, frame, subframe, AMP, eNB->common_vars.txdataF);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
if (do_meas==1) stop_meas(&eNB->dlsch_common_and_dci);
|
||||
@@ -511,13 +499,10 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
) {
|
||||
// get harq_pid
|
||||
harq_pid = dlsch0->harq_ids[frame%2][subframe];
|
||||
//AssertFatal(harq_pid>=0,"harq_pid is negative\n");
|
||||
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//AssertFatal(harq_pid>=0,"harq_pid is negative\n");
|
||||
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
|
||||
if (dlsch0->ue_type==0)
|
||||
#endif
|
||||
LOG_E(PHY,"harq_pid:%d corrupt must be 0-7 UE_id:%d frame:%d subframe:%d rnti:%x [ %1d.%1d.%1d.%1d.%1d.%1d.%1d.%1d\n", harq_pid,UE_id,frame,subframe,dlsch0->rnti,
|
||||
dlsch0->harq_ids[frame%2][0],
|
||||
dlsch0->harq_ids[frame%2][1],
|
||||
@@ -528,18 +513,18 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
|
||||
dlsch0->harq_ids[frame%2][6],
|
||||
dlsch0->harq_ids[frame%2][7]);
|
||||
} else {
|
||||
if (dlsch_procedures(eNB,
|
||||
proc,
|
||||
harq_pid,
|
||||
dlsch0,
|
||||
&eNB->UE_stats[(uint32_t)UE_id])) {
|
||||
// if we generate dlsch, we must generate pdsch
|
||||
pdsch_procedures(eNB,
|
||||
proc,
|
||||
harq_pid,
|
||||
dlsch0,
|
||||
dlsch1);
|
||||
}
|
||||
if (dlsch_procedures(eNB,
|
||||
proc,
|
||||
harq_pid,
|
||||
dlsch0,
|
||||
&eNB->UE_stats[(uint32_t)UE_id])) {
|
||||
// if we generate dlsch, we must generate pdsch
|
||||
pdsch_procedures(eNB,
|
||||
proc,
|
||||
harq_pid,
|
||||
dlsch0,
|
||||
dlsch1);
|
||||
}
|
||||
}
|
||||
} else if ((dlsch0)&&(dlsch0->rnti>0)&&
|
||||
#ifdef PHY_TX_THREAD
|
||||
@@ -644,7 +629,6 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
subframe,
|
||||
uci->type,
|
||||
i);
|
||||
|
||||
uci->active = 0;
|
||||
|
||||
// Null out PUCCH PRBs for noise measurement
|
||||
@@ -652,24 +636,30 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
case 6:
|
||||
eNB->rb_mask_ul[0] |= (0x1 | (1 << 5)); // position 5
|
||||
break;
|
||||
|
||||
case 15:
|
||||
eNB->rb_mask_ul[0] |= (0x1 | (1 << 14)); // position 14
|
||||
break;
|
||||
|
||||
case 25:
|
||||
eNB->rb_mask_ul[0] |= (0x1 | (1 << 24)); // position 24
|
||||
break;
|
||||
|
||||
case 50:
|
||||
eNB->rb_mask_ul[0] |= 0x1;
|
||||
eNB->rb_mask_ul[1] |= (1 << 17); // position 49 (49-32)
|
||||
break;
|
||||
|
||||
case 75:
|
||||
eNB->rb_mask_ul[0] |= 0x1;
|
||||
eNB->rb_mask_ul[2] |= (1 << 10); // position 74 (74-64)
|
||||
break;
|
||||
|
||||
case 100:
|
||||
eNB->rb_mask_ul[0] |= 0x1;
|
||||
eNB->rb_mask_ul[3] |= (1 << 3); // position 99 (99-96)
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(PHY,"Unknown number for N_RB_UL %d\n", fp->N_RB_UL);
|
||||
break;
|
||||
@@ -690,10 +680,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
&SR_payload,
|
||||
frame,
|
||||
subframe,
|
||||
pucch1_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
LOG_D(PHY,"[eNB %d][SR %x] Frame %d subframe %d Checking SR is %d (uci.type %d SR n1pucch is %d)\n",
|
||||
eNB->Mod_id,
|
||||
@@ -732,10 +720,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
pucch_b0b1[0],
|
||||
frame,
|
||||
subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
|
||||
//dump_ulsch(eNB,frame,subframe,0,0); exit(-1);
|
||||
@@ -756,10 +742,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
pucch_b0b1[0],
|
||||
frame,
|
||||
subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
}
|
||||
|
||||
@@ -786,10 +770,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
pucch_b0b1[0],
|
||||
frame,
|
||||
subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
|
||||
if (uci->type==HARQ_SR && metric[0] > metric_SR) SR_payload = 0;
|
||||
@@ -806,10 +788,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
pucch_b0b1[0],
|
||||
frame,
|
||||
subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
}
|
||||
|
||||
@@ -824,10 +804,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
metric[0] = rx_pucch (eNB, pucch_format1b, i, uci->n_pucch_1_0_sr[0], 0, //n2_pucch
|
||||
uci->srs_active, // shortened format
|
||||
pucch_b0b1[0], frame, subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
} else { //using assigned pucch resources
|
||||
#ifdef DEBUG_PHY_PROC
|
||||
@@ -840,10 +818,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
metric[res] = rx_pucch (eNB, uci->pucch_fmt, i, uci->n_pucch_1[res][0], 0, // n2_pucch
|
||||
uci->srs_active, // shortened format
|
||||
pucch_b0b1[res], frame, subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
|
||||
for (res=0; res<uci->num_pucch_resources; res++)
|
||||
@@ -856,10 +832,8 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
pucch_b0b1[res],
|
||||
frame,
|
||||
subframe,
|
||||
pucch1ab_thres
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uci->ue_type
|
||||
#endif
|
||||
pucch1ab_thres,
|
||||
uci->ue_type
|
||||
);
|
||||
}
|
||||
|
||||
@@ -868,6 +842,7 @@ uci_procedures(PHY_VARS_eNB *eNB,
|
||||
uci->rnti,uci->type,SR_payload,frame,subframe,pucch_b0b1[0][0],pucch_b0b1[0][1],pucch_b0b1[1][0],pucch_b0b1[1][1]);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (SR_payload == 1) { // this implements Table 7.3.1 from 36.213
|
||||
if (pucch_b0b1[0][0] == 4) { // there isn't a likely transmission
|
||||
harq_ack[0] = 4; // DTX
|
||||
@@ -1352,8 +1327,7 @@ void init_td_thread(PHY_VARS_eNB *eNB) {
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
proc->tdp.eNB = eNB;
|
||||
proc->instance_cnt_td = -1;
|
||||
|
||||
threadCreate(&proc->pthread_td, td_thread, (void*)&proc->tdp, "TD", -1, OAI_PRIORITY_RT);
|
||||
threadCreate(&proc->pthread_td, td_thread, (void *)&proc->tdp, "TD", -1, OAI_PRIORITY_RT);
|
||||
}
|
||||
|
||||
void kill_td_thread(PHY_VARS_eNB *eNB) {
|
||||
@@ -1367,23 +1341,20 @@ void kill_td_thread(PHY_VARS_eNB *eNB) {
|
||||
|
||||
extern void *te_thread (void *);
|
||||
|
||||
void init_te_thread(PHY_VARS_eNB *eNB)
|
||||
{
|
||||
void init_te_thread(PHY_VARS_eNB *eNB) {
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
|
||||
for(int i=0; i<3 ; i++) {
|
||||
proc->tep[i].eNB = eNB;
|
||||
proc->tep[i].instance_cnt_te = -1;
|
||||
|
||||
LOG_I(PHY,"Creating te_thread %d\n",i);
|
||||
char txt[128];
|
||||
sprintf(txt,"TE_%d", i);
|
||||
threadCreate(&proc->tep[i].pthread_te, te_thread, (void*)&proc->tep[i], txt, -1, OAI_PRIORITY_RT);
|
||||
sprintf(txt,"TE_%d", i);
|
||||
threadCreate(&proc->tep[i].pthread_te, te_thread, (void *)&proc->tep[i], txt, -1, OAI_PRIORITY_RT);
|
||||
}
|
||||
}
|
||||
|
||||
void kill_te_thread(PHY_VARS_eNB *eNB)
|
||||
{
|
||||
void kill_te_thread(PHY_VARS_eNB *eNB) {
|
||||
L1_proc_t *proc = &eNB->proc;
|
||||
|
||||
for(int i=0; i<3 ; i++) {
|
||||
@@ -1396,20 +1367,16 @@ void kill_te_thread(PHY_VARS_eNB *eNB)
|
||||
}
|
||||
|
||||
void fill_rx_indication(PHY_VARS_eNB *eNB,
|
||||
int UE_id,
|
||||
int frame,
|
||||
int subframe)
|
||||
{
|
||||
int UE_id,
|
||||
int frame,
|
||||
int subframe) {
|
||||
nfapi_rx_indication_pdu_t *pdu;
|
||||
int timing_advance_update;
|
||||
int sync_pos;
|
||||
uint32_t harq_pid;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (eNB->ulsch[UE_id]->ue_type > 0) harq_pid = 0;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
else {
|
||||
harq_pid = subframe2harq_pid (&eNB->frame_parms,
|
||||
frame, subframe);
|
||||
}
|
||||
@@ -1507,31 +1474,27 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
int harq_pid;
|
||||
int subframe_tx;
|
||||
int frame_tx;
|
||||
|
||||
AssertFatal(UE_id != -1, "No existing dlsch context\n");
|
||||
AssertFatal(UE_id < NUMBER_OF_UE_MAX, "Returned UE_id %d >= %d (NUMBER_OF_UE_MAX)\n", UE_id, NUMBER_OF_UE_MAX);
|
||||
|
||||
dlsch0 = eNB->dlsch[UE_id][0];
|
||||
dlsch1 = eNB->dlsch[UE_id][1];
|
||||
|
||||
if (eNB->frame_parms.frame_type == FDD) {
|
||||
subframe_tx = (subframe + 6) % 10;
|
||||
frame_tx = ul_ACK_subframe2_dl_frame(&eNB->frame_parms,
|
||||
frame,
|
||||
subframe,
|
||||
subframe_tx);
|
||||
|
||||
frame,
|
||||
subframe,
|
||||
subframe_tx);
|
||||
harq_pid = dlsch0->harq_ids[frame_tx%2][subframe_tx];
|
||||
|
||||
if((harq_pid < 0) || (harq_pid >= dlsch0->Mdlharq)) {
|
||||
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
||||
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
||||
|
||||
AssertFatal(dlsch0_harq != NULL, "dlsch0_harq is null\n");
|
||||
|
||||
#if T_TRACER
|
||||
|
||||
if (after_rounds != -1) {
|
||||
@@ -1556,7 +1519,6 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
dlsch0_harq->status = SCH_IDLE;
|
||||
dlsch0->harq_mask &= ~(1 << harq_pid);
|
||||
}
|
||||
|
||||
} else {
|
||||
/* Release all processes in the bundle that was acked, based on mask */
|
||||
/* This is at most 4 for multiplexing and 9 for bundling/special bundling */
|
||||
@@ -1564,13 +1526,12 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
|
||||
for (int m=0; m < M; m++) {
|
||||
subframe_tx = ul_ACK_subframe2_dl_subframe(&eNB->frame_parms,
|
||||
subframe,
|
||||
m);
|
||||
|
||||
subframe,
|
||||
m);
|
||||
frame_tx = ul_ACK_subframe2_dl_frame(&eNB->frame_parms,
|
||||
frame,
|
||||
subframe,
|
||||
subframe_tx);
|
||||
frame,
|
||||
subframe,
|
||||
subframe_tx);
|
||||
|
||||
if (((1 << m) & mask) > 0) {
|
||||
harq_pid = dlsch0->harq_ids[frame_tx%2][subframe_tx];
|
||||
@@ -1579,12 +1540,12 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
LOG_E(PHY,"illegal harq_pid %d %s:%d\n", harq_pid, __FILE__, __LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
dlsch0_harq = dlsch0->harq_processes[harq_pid];
|
||||
dlsch1_harq = dlsch1->harq_processes[harq_pid];
|
||||
|
||||
AssertFatal(dlsch0_harq != NULL, "Dlsch0_harq is null\n");
|
||||
|
||||
#if T_TRACER
|
||||
|
||||
if (after_rounds != -1) {
|
||||
T(T_ENB_PHY_DLSCH_UE_NACK,
|
||||
T_INT(0),
|
||||
@@ -1600,7 +1561,9 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
T_INT(dlsch0->rnti),
|
||||
T_INT(harq_pid));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (dlsch0_harq->round >= after_rounds) {
|
||||
dlsch0_harq->status = SCH_IDLE;
|
||||
|
||||
@@ -1614,7 +1577,7 @@ static void do_release_harq(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
|
||||
static void release_harq(PHY_VARS_eNB *eNB,int UE_id,int tb,uint16_t frame,uint8_t subframe,uint16_t mask, int is_ack) {
|
||||
/*
|
||||
/*
|
||||
* Maximum number of DL transmissions = 4.
|
||||
* TODO: get the value from configuration.
|
||||
* If is_ack is true then we release immediately. The value -1 can be used for that.
|
||||
@@ -2012,43 +1975,50 @@ void phy_procedures_eNB_uespec_RX(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_RX_UESPEC, 0 );
|
||||
}
|
||||
|
||||
void release_rnti_of_phy(module_id_t mod_id){
|
||||
int i,j;
|
||||
int CC_id;
|
||||
rnti_t rnti;
|
||||
PHY_VARS_eNB *eNB_PHY = NULL;
|
||||
LTE_eNB_ULSCH_t *ulsch = NULL;
|
||||
LTE_eNB_DLSCH_t *dlsch = NULL;
|
||||
for(i = 0; i< release_rntis.number_of_TLVs;i++){
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
eNB_PHY = RC.eNB[mod_id][CC_id];
|
||||
rnti = release_rntis.ue_release_request_TLVs_list[i].rnti;
|
||||
for (j=0; j<NUMBER_OF_UE_MAX; j++) {
|
||||
ulsch = eNB_PHY->ulsch[j];
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)){
|
||||
LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
void release_rnti_of_phy(module_id_t mod_id) {
|
||||
int i,j;
|
||||
int CC_id;
|
||||
rnti_t rnti;
|
||||
PHY_VARS_eNB *eNB_PHY = NULL;
|
||||
LTE_eNB_ULSCH_t *ulsch = NULL;
|
||||
LTE_eNB_DLSCH_t *dlsch = NULL;
|
||||
|
||||
dlsch = eNB_PHY->dlsch[j][0];
|
||||
if((dlsch != NULL) && (dlsch->rnti == rnti)){
|
||||
LOG_I(PHY, "clean_eNb_dlsch dlsch[%d] UE %x \n", j, rnti);
|
||||
clean_eNb_dlsch(dlsch);
|
||||
}
|
||||
}
|
||||
ulsch = eNB_PHY->ulsch[j];
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)){
|
||||
LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
for(j=0; j<NUMBER_OF_UCI_VARS_MAX; j++) {
|
||||
if(eNB_PHY->uci_vars[j].rnti == rnti){
|
||||
LOG_I(PHY, "clean eNb uci_vars[%d] UE %x \n",j, rnti);
|
||||
memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI));
|
||||
}
|
||||
for(i = 0; i< release_rntis.number_of_TLVs; i++) {
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
eNB_PHY = RC.eNB[mod_id][CC_id];
|
||||
rnti = release_rntis.ue_release_request_TLVs_list[i].rnti;
|
||||
|
||||
}
|
||||
for (j=0; j<NUMBER_OF_UE_MAX; j++) {
|
||||
ulsch = eNB_PHY->ulsch[j];
|
||||
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)) {
|
||||
LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
|
||||
dlsch = eNB_PHY->dlsch[j][0];
|
||||
|
||||
if((dlsch != NULL) && (dlsch->rnti == rnti)) {
|
||||
LOG_I(PHY, "clean_eNb_dlsch dlsch[%d] UE %x \n", j, rnti);
|
||||
clean_eNb_dlsch(dlsch);
|
||||
}
|
||||
}
|
||||
|
||||
ulsch = eNB_PHY->ulsch[j];
|
||||
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)) {
|
||||
LOG_I(PHY, "clean_eNb_ulsch ulsch[%d] UE %x\n", j, rnti);
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
|
||||
for(j=0; j<NUMBER_OF_UCI_VARS_MAX; j++) {
|
||||
if(eNB_PHY->uci_vars[j].rnti == rnti) {
|
||||
LOG_I(PHY, "clean eNb uci_vars[%d] UE %x \n",j, rnti);
|
||||
memset(&eNB_PHY->uci_vars[i],0,sizeof(LTE_eNB_UCI));
|
||||
}
|
||||
}
|
||||
}
|
||||
memset(&release_rntis, 0, sizeof(nfapi_ue_release_request_body_t));
|
||||
}
|
||||
|
||||
memset(&release_rntis, 0, sizeof(nfapi_ue_release_request_body_t));
|
||||
}
|
||||
|
||||
@@ -53,16 +53,11 @@
|
||||
|
||||
extern int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
|
||||
|
||||
void prach_procedures(PHY_VARS_eNB *eNB
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
int br_flag
|
||||
#endif
|
||||
) {
|
||||
void prach_procedures(PHY_VARS_eNB *eNB,
|
||||
int br_flag ) {
|
||||
uint16_t max_preamble[4],max_preamble_energy[4],max_preamble_delay[4],avg_preamble_energy[4];
|
||||
uint16_t i;
|
||||
int frame,subframe;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (br_flag==1) {
|
||||
subframe = eNB->proc.subframe_prach_br;
|
||||
@@ -70,9 +65,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
pthread_mutex_lock(&eNB->UL_INFO_mutex);
|
||||
eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles=0;
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
pthread_mutex_lock(&eNB->UL_INFO_mutex);
|
||||
eNB->UL_INFO.rach_ind.rach_indication_body.number_of_preambles=0;
|
||||
pthread_mutex_unlock(&eNB->UL_INFO_mutex);
|
||||
@@ -90,13 +83,10 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
|
||||
for (ru_aa=0,aa=0; ru_aa<ru->nb_rx; ru_aa++,aa++) {
|
||||
eNB->prach_vars.rxsigF[0][aa] = eNB->RU_list[i]->prach_rxsigF[ru_aa];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int ce_level;
|
||||
|
||||
if (br_flag==1)
|
||||
for (ce_level=0; ce_level<4; ce_level++) eNB->prach_vars_br.rxsigF[ce_level][aa] = eNB->RU_list[i]->prach_rxsigF_br[ce_level][ru_aa];
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,12 +96,9 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
&max_preamble[0],
|
||||
&max_preamble_energy[0],
|
||||
&max_preamble_delay[0],
|
||||
&avg_preamble_energy[0],
|
||||
&avg_preamble_energy[0],
|
||||
frame,
|
||||
0
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,br_flag
|
||||
#endif
|
||||
0,br_flag
|
||||
);
|
||||
LOG_D(PHY,"[RAPROC] Frame %d, subframe %d : BR %d Most likely preamble %d, energy %d dB delay %d (prach_energy counter %d), threshold %d, I0 %d\n",
|
||||
frame,subframe,br_flag,
|
||||
@@ -119,9 +106,8 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
max_preamble_energy[0]/10,
|
||||
max_preamble_delay[0],
|
||||
eNB->prach_energy_counter,
|
||||
eNB->measurements.prach_I0+eNB->prach_DTX_threshold,
|
||||
eNB->measurements.prach_I0);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
eNB->measurements.prach_I0+eNB->prach_DTX_threshold,
|
||||
eNB->measurements.prach_I0);
|
||||
|
||||
if (br_flag==1) {
|
||||
int prach_mask;
|
||||
@@ -161,9 +147,7 @@ void prach_procedures(PHY_VARS_eNB *eNB
|
||||
ind++;
|
||||
}
|
||||
} */// ce_level
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
if ((eNB->prach_energy_counter == 100) &&
|
||||
(max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) {
|
||||
LOG_I(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
|
||||
|
||||
@@ -127,12 +127,10 @@ void phy_procedures_eNB_S_RX(PHY_VARS_eNB *phy_vars_eNB,L1_rxtx_proc_t *proc);
|
||||
@param phy_vars_eNB Pointer to eNB variables on which to act
|
||||
@param br_flag indicator for eMTC PRACH
|
||||
*/
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
void prach_procedures(PHY_VARS_eNB *eNB,
|
||||
int br_flag);
|
||||
#else
|
||||
void prach_procedures(PHY_VARS_eNB *eNB);
|
||||
#endif
|
||||
int br_flag);
|
||||
|
||||
|
||||
/*! \brief Function to compute timing of Msg3 transmission on UL-SCH (first UE transmission in RA procedure). This implements the timing in paragraph a) from Section 6.1.1 in 36.213 (p. 17 in version 8.6). Used by eNB upon transmission of random-access response (RA_RNTI) to program corresponding ULSCH reception procedure. Used by UE upon reception of random-access response (RA_RNTI) to program corresponding ULSCH transmission procedure. This does not support the UL_delay field in RAR (always assumed to be 0).
|
||||
@param frame_parms Pointer to DL frame parameter descriptor
|
||||
@@ -197,7 +195,7 @@ int8_t find_ue_ulsch(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
|
||||
|
||||
void schedule_response(Sched_Rsp_t *Sched_INFO);
|
||||
|
||||
LTE_eNB_UE_stats* get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
|
||||
LTE_eNB_UE_stats *get_UE_stats(uint8_t Mod_id, uint8_t CC_id,uint16_t rnti);
|
||||
|
||||
/*! \brief Function to compute subframe type as a function of Frame type and TDD Configuration (implements Table 4.2.2 from 36.211, p.11 from version 8.6) and subframe index. Same as subframe_select, except that it uses the Mod_id and is provided as a service to the MAC scheduler.
|
||||
@param Mod_id Index of eNB
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
*/
|
||||
|
||||
#include "sched_nr.h"
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
nr_subframe_t nr_slot_select(nfapi_nr_config_request_t *cfg,
|
||||
unsigned char slot)
|
||||
|
||||
+20
-22
@@ -95,14 +95,12 @@
|
||||
@param *phy_vars_rn pointer to RN variables
|
||||
*/
|
||||
void phy_procedures_UE_lte(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,relaying_type_t r_type);
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/*! \brief Top-level entry routine for relay node procedures actinf as UE. This proc will make us of the existing UE procs.
|
||||
@param last_slot Index of last slot (0-19)
|
||||
@param next_slot Index of next_slot (0-19)
|
||||
@param r_type indicates the relaying operation: 0: no_relaying, 1: unicast relaying type 1, 2: unicast relaying type 2, 3: multicast relaying
|
||||
*/
|
||||
int phy_procedures_RN_UE_RX(unsigned char last_slot, unsigned char next_slot, relaying_type_t r_type);
|
||||
#endif
|
||||
|
||||
/*! \brief Scheduling for UE TX procedures in normal subframes.
|
||||
@param phy_vars_ue Pointer to UE variables on which to act
|
||||
@@ -128,7 +126,7 @@ int phy_procedures_slot_parallelization_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_pr
|
||||
|
||||
|
||||
#ifdef UE_SLOT_PARALLELISATION
|
||||
void *UE_thread_slot1_dl_processing(void *arg);
|
||||
void *UE_thread_slot1_dl_processing(void *arg);
|
||||
#endif
|
||||
|
||||
/*! \brief Scheduling for UE TX procedures in TDD S-subframes.
|
||||
@@ -174,10 +172,10 @@ nr_subframe_t nr_get_subframe_direction(uint8_t Mod_id, uint8_t CC_id,uint8_t su
|
||||
@param subframe subframe index where Msg3 is to be transmitted (n, n+1 or n+2)
|
||||
*/
|
||||
void nr_get_Msg3_alloc(NR_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t current_subframe,
|
||||
uint32_t current_frame,
|
||||
uint32_t *frame,
|
||||
uint8_t *subframe);
|
||||
uint8_t current_subframe,
|
||||
uint32_t current_frame,
|
||||
uint32_t *frame,
|
||||
uint8_t *subframe);
|
||||
|
||||
/*! \brief Function to compute timing of Msg3 retransmission on UL-SCH (first UE transmission in RA procedure).
|
||||
@param frame_parms Pointer to DL frame parameter descriptor
|
||||
@@ -187,10 +185,10 @@ void nr_get_Msg3_alloc(NR_DL_FRAME_PARMS *frame_parms,
|
||||
@param subframe subframe index where Msg3 is to be transmitted (n, n+1 or n+2)
|
||||
*/
|
||||
void nr_get_Msg3_alloc_ret(NR_DL_FRAME_PARMS *frame_parms,
|
||||
uint8_t current_subframe,
|
||||
uint32_t current_frame,
|
||||
uint32_t *frame,
|
||||
uint8_t *subframe);
|
||||
uint8_t current_subframe,
|
||||
uint32_t current_frame,
|
||||
uint32_t *frame,
|
||||
uint8_t *subframe);
|
||||
|
||||
/*! \brief Get ULSCH harq_pid for Msg3 from RAR subframe. This returns n+k mod 10 (k>6) and corresponds to the rule in Section 6.1.1 from 36.213
|
||||
@param frame_parms Pointer to DL Frame Parameters
|
||||
@@ -238,12 +236,12 @@ uint8_t nr_get_ack(NR_DL_FRAME_PARMS *frame_parms,nr_harq_status_t *harq_ack,uin
|
||||
@returns status indicator for PUCCH/PUSCH transmission
|
||||
*/
|
||||
uint8_t nr_reset_ack(NR_DL_FRAME_PARMS *frame_parms,
|
||||
nr_harq_status_t *harq_ack,
|
||||
unsigned char subframe_tx,
|
||||
unsigned char subframe_rx,
|
||||
unsigned char *o_ACK,
|
||||
uint8_t *pN_bundled,
|
||||
uint8_t cw_idx);
|
||||
nr_harq_status_t *harq_ack,
|
||||
unsigned char subframe_tx,
|
||||
unsigned char subframe_rx,
|
||||
unsigned char *o_ACK,
|
||||
uint8_t *pN_bundled,
|
||||
uint8_t cw_idx);
|
||||
|
||||
/*! \brief Compute UL ACK subframe from DL subframe. This is used to retrieve corresponding DLSCH HARQ pid at eNB upon reception of ACK/NAK information on PUCCH/PUSCH. Derived from Table 10.1-1 in 36.213 (p. 69 in version 8.6)
|
||||
@param frame_parms Pointer to DL frame parameter descriptor
|
||||
@@ -311,11 +309,11 @@ TDD, this routine computes the complex procedure described in Section 10.1 of 36
|
||||
@returns n1_pucch
|
||||
*/
|
||||
uint16_t nr_get_n1_pucch(PHY_VARS_NR_UE *phy_vars_ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
nr_harq_status_t *harq_ack,
|
||||
uint8_t eNB_id,
|
||||
uint8_t *b,
|
||||
uint8_t SR);
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
nr_harq_status_t *harq_ack,
|
||||
uint8_t eNB_id,
|
||||
uint8_t *b,
|
||||
uint8_t SR);
|
||||
|
||||
#endif
|
||||
/*! \brief This function retrieves the PHY UE mode. It is used as a helper function for the UE MAC.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@
|
||||
|
||||
|
||||
#ifndef OPENAIR2_IN
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#include "LAYER2/RLC/rlc.h"
|
||||
#endif
|
||||
#include "COMMON/platform_types.h"
|
||||
#include "COMMON/platform_constants.h"
|
||||
@@ -34,12 +34,9 @@
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#include "LTE_MeasGapConfig.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#endif
|
||||
//#include "rrm_config_structs.h"
|
||||
//#include "platform_types.h"
|
||||
|
||||
/** @defgroup _mac_rrc_primitives_ MAC Layer Primitives for Communications with RRC
|
||||
* @ingroup _openair_mac_layer_specs_
|
||||
* @{
|
||||
@@ -324,9 +321,9 @@ typedef struct { //RRC_INTERFACE_FUNCTIONS
|
||||
RRC_status_t (*rrc_rx_tx)(uint8_t,uint32_t,uint8_t,uint8_t);
|
||||
uint8_t (*mac_rrc_data_ind)(uint8_t,uint32_t,uint16_t,uint8_t *,uint16_t,eNB_flag_t eNB_flag, uint8_t eNB_index);
|
||||
uint8_t (*mac_rrc_data_req)(uint8_t,uint32_t,uint16_t,uint8_t,uint8_t *,eNB_flag_t eNB_flag, uint8_t eNB_index);
|
||||
void (*mac_rrc_meas_ind)(uint8_t,MAC_MEAS_REQ_ENTRY*);
|
||||
void (*mac_rrc_meas_ind)(uint8_t,MAC_MEAS_REQ_ENTRY *);
|
||||
void (*def_meas_ind)(uint8_t, uint8_t);
|
||||
void (*rrc_data_indP) (module_id_t , rb_id_t , sdu_size_t , char*);
|
||||
void (*rrc_data_indP) (module_id_t, rb_id_t, sdu_size_t, char *);
|
||||
void (*fn_rrc) (void);
|
||||
uint8_t (*get_rrc_status)(uint8_t Mod_id,uint8_t eNB_flag,uint8_t eNB_index);
|
||||
double (*rrc_get_estimated_ue_distance) (module_id_t Mod_id, uint8_t UE_id, uint8_t CC_id, uint8_t loc_type);
|
||||
@@ -339,12 +336,12 @@ typedef struct {
|
||||
unsigned short Node_id[NB_MODULES_MAX];
|
||||
char Is_cluster_head[NB_MODULES_MAX];
|
||||
void (*macphy_exit)(const char *); /* Pointer function that stops the low-level scheduler due an exit condition */
|
||||
unsigned short (*mac_config_req)(uint8_t,uint8_t,MAC_CONFIG_REQ*);
|
||||
MAC_MEAS_REQ_ENTRY* (*mac_meas_req)(uint8_t , MAC_MEAS_REQ*);
|
||||
unsigned short (*mac_config_req)(uint8_t,uint8_t,MAC_CONFIG_REQ *);
|
||||
MAC_MEAS_REQ_ENTRY *(*mac_meas_req)(uint8_t, MAC_MEAS_REQ *);
|
||||
void (*mac_out_of_sync_ind)(uint8_t,uint32_t,unsigned short);
|
||||
//RLC_INTERFACE_FUNCTIONS
|
||||
void (*pdcp_run)(void);
|
||||
void (*pdcp_data_req)(module_id_t, rb_id_t, sdu_size_t, char*);
|
||||
void (*pdcp_data_req)(module_id_t, rb_id_t, sdu_size_t, char *);
|
||||
signed int (*rrc_rlc_config_req)(unsigned int, unsigned int, unsigned int, unsigned int, rlc_info_t );
|
||||
int (*rrc_mac_config_req)(uint8_t Mod_id,uint8_t eNB_flag,uint8_t UE_id,uint8_t eNB_index,
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
@@ -355,32 +352,25 @@ typedef struct {
|
||||
LTE_MeasGapConfig_t *measGapConfig,
|
||||
LTE_TDD_Config_t *tdd_Config,
|
||||
uint8_t *SIwindowsize,
|
||||
uint16_t *SIperiod
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
uint16_t *SIperiod,
|
||||
MBMS_flag_t MBMS_Flag,
|
||||
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
struct LTE_PMCH_InfoList_r9 *pmch_InfoList
|
||||
#endif
|
||||
);
|
||||
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char*
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint32_t
|
||||
,uint32_t
|
||||
#endif
|
||||
);
|
||||
void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char*, tb_size_t, num_tb_t, crc_t* );
|
||||
unsigned int (*mac_rlc_data_req)(module_id_t, unsigned int, const unsigned int,char *
|
||||
,uint32_t
|
||||
,uint32_t
|
||||
);
|
||||
void (*mac_rlc_data_ind)(module_id_t, logical_chan_id_t, char *, tb_size_t, num_tb_t, crc_t * );
|
||||
mac_rlc_status_resp_t (*mac_rlc_status_ind) (module_id_t enb_mod_idP, module_id_t ue_mod_idP, frame_t frameP, sub_frame_t subframeP, eNB_flag_t eNB_flagP, MBMS_flag_t MBMS_flagP,
|
||||
logical_chan_id_t channel_idP, tb_size_t tb_sizeP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint32_t sourceL2Id
|
||||
,uint32_t destinationL2Id
|
||||
#endif
|
||||
);
|
||||
);
|
||||
signed int (*rrc_rlc_data_req)(module_id_t, rb_id_t, mui_t, confirm_t, sdu_size_t, char *);
|
||||
void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t , rb_id_t , sdu_size_t , char* ),
|
||||
void (*rrc_data_confP) (module_id_t , rb_id_t , mui_t ) ) ;
|
||||
void (*rrc_rlc_register_rrc) (void (*rrc_data_indP)(module_id_t, rb_id_t, sdu_size_t, char * ),
|
||||
void (*rrc_data_confP) (module_id_t, rb_id_t, mui_t ) ) ;
|
||||
void (*mrbch_phy_sync_failure) (uint8_t Mod_id, frame_t frame, uint8_t Free_ch_index);
|
||||
void (*dl_phy_sync_success) (uint8_t Mod_id, frame_t frame, uint8_t eNB_index);
|
||||
} MAC_RLC_XFACE;
|
||||
|
||||
@@ -34,66 +34,66 @@
|
||||
# define __PLATFORM_CONSTANTS_H__
|
||||
|
||||
#ifdef JUMBO_FRAME
|
||||
#define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/
|
||||
#define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/
|
||||
#else
|
||||
#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/
|
||||
#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/
|
||||
#endif
|
||||
|
||||
#ifdef LARGE_SCALE
|
||||
# define NB_MODULES_MAX 128
|
||||
# define NB_NODE_MAX 128
|
||||
#define NB_MODULES_MAX 128
|
||||
#define NB_NODE_MAX 128
|
||||
#else
|
||||
# define NB_MODULES_MAX 32
|
||||
# define NB_NODE_MAX 32
|
||||
#define NB_MODULES_MAX 32
|
||||
#define NB_NODE_MAX 32
|
||||
#endif
|
||||
|
||||
#ifdef JUMBO_FRAME
|
||||
# define MAX_IP_PACKET_SIZE 10000 // 9000
|
||||
#define MAX_IP_PACKET_SIZE 10000 // 9000
|
||||
#else
|
||||
# if defined(OAI_NW_DRIVER_TYPE_ETHERNET)
|
||||
/* SR: When using ethernet network driver the packet size is 1512 :
|
||||
* 1500 bytes IP packet + 14 bytes ethernet header
|
||||
*/
|
||||
# define MAX_IP_PACKET_SIZE 1514
|
||||
# else
|
||||
# define MAX_IP_PACKET_SIZE 1500 // 3000
|
||||
# endif
|
||||
#if defined(OAI_NW_DRIVER_TYPE_ETHERNET)
|
||||
/* SR: When using ethernet network driver the packet size is 1512 :
|
||||
* 1500 bytes IP packet + 14 bytes ethernet header
|
||||
*/
|
||||
#define MAX_IP_PACKET_SIZE 1514
|
||||
#else
|
||||
#define MAX_IP_PACKET_SIZE 1500 // 3000
|
||||
#endif
|
||||
#endif
|
||||
// overwrite the previous deinitions
|
||||
|
||||
# define MAX_MODULES NB_MODULES_MAX
|
||||
|
||||
#ifndef UE_EXPANSION
|
||||
// TODO:L2 FAPI simulator.
|
||||
// UESIM_EXPANSION is used to be same value of MAX_MOBILES_PER_ENB
|
||||
// in eNB and UE.
|
||||
// now , if we use --mu option in UE, compiling error will occur.
|
||||
// This problem will be fixed in the future.
|
||||
# ifdef UESIM_EXPANSION
|
||||
# define MAX_MOBILES_PER_ENB 256
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
# define MAX_eNB 2
|
||||
# else
|
||||
# ifdef LARGE_SCALE
|
||||
# define MAX_MOBILES_PER_ENB 128
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 128
|
||||
# define MAX_MOBILES_PER_GNB 128
|
||||
# define MAX_eNB 2
|
||||
# define MAX_gNB 2
|
||||
# else
|
||||
# define MAX_MOBILES_PER_ENB 4
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 4
|
||||
# define MAX_MOBILES_PER_GNB 4
|
||||
# define MAX_eNB 1
|
||||
# define MAX_gNB 1
|
||||
# endif
|
||||
#endif
|
||||
// TODO:L2 FAPI simulator.
|
||||
// UESIM_EXPANSION is used to be same value of MAX_MOBILES_PER_ENB
|
||||
// in eNB and UE.
|
||||
// now , if we use --mu option in UE, compiling error will occur.
|
||||
// This problem will be fixed in the future.
|
||||
#ifdef UESIM_EXPANSION
|
||||
#define MAX_MOBILES_PER_ENB 256
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
#define MAX_eNB 2
|
||||
#else
|
||||
#ifdef LARGE_SCALE
|
||||
#define MAX_MOBILES_PER_ENB 128
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 128
|
||||
#define MAX_MOBILES_PER_GNB 128
|
||||
#define MAX_eNB 2
|
||||
#define MAX_gNB 2
|
||||
#else
|
||||
#define MAX_MOBILES_PER_ENB 16
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 16
|
||||
#define MAX_MOBILES_PER_GNB 16
|
||||
#define MAX_eNB 2
|
||||
#define MAX_gNB 2
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
# define MAX_MOBILES_PER_ENB 256
|
||||
# define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
# define MAX_MOBILES_PER_GNB 256
|
||||
# define MAX_eNB 2
|
||||
# define MAX_gNB 2
|
||||
#define MAX_MOBILES_PER_ENB 256
|
||||
#define MAX_MOBILES_PER_ENB_NB_IoT 256
|
||||
#define MAX_MOBILES_PER_GNB 256
|
||||
#define MAX_eNB 2
|
||||
#define MAX_gNB 2
|
||||
#endif
|
||||
|
||||
#define NUMBER_OF_NR_DLSCH_MAX 4
|
||||
@@ -109,12 +109,9 @@
|
||||
#define DEFAULT_RAB_ID 1
|
||||
|
||||
#define NB_RB_MAX (LTE_maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
#define NB_RB_MBMS_MAX (LTE_maxSessionPerPMCH*LTE_maxServiceCount)
|
||||
#else
|
||||
// Do not allocate unused memory
|
||||
#define NB_RB_MBMS_MAX 1
|
||||
#endif
|
||||
|
||||
#define NB_RAB_MAX LTE_maxDRB /* was 8, now 11 */
|
||||
#define RAB_SHIFT1 9
|
||||
#define RAB_SHIFT2 3
|
||||
@@ -143,14 +140,14 @@
|
||||
// CBA constant
|
||||
#define NUM_MAX_CBA_GROUP 4
|
||||
|
||||
# ifndef __cplusplus
|
||||
# ifndef NULL
|
||||
# define NULL 0
|
||||
# endif
|
||||
# ifndef null
|
||||
# define null 0
|
||||
# endif
|
||||
# endif
|
||||
#ifndef __cplusplus
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
#ifndef null
|
||||
#define null 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define UNUSED_PARAM_MBMS_SESSION_ID 0
|
||||
#define UNUSED_PARAM_MBMS_SERVICE_ID 0
|
||||
|
||||
@@ -160,15 +160,13 @@ typedef struct RadioResourceConfig_s {
|
||||
long ue_TimersAndConstants_n311;
|
||||
long ue_TransmissionMode;
|
||||
long ue_multiple_max;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//SIB2 BR Options
|
||||
long* preambleTransMax_CE_r13;
|
||||
BOOLEAN_t prach_ConfigCommon_v1310;
|
||||
BOOLEAN_t* mpdcch_startSF_CSS_RA_r13;
|
||||
long mpdcch_startSF_CSS_RA_r13_val;
|
||||
long* prach_HoppingOffset_r13;
|
||||
#endif
|
||||
BOOLEAN_t mbms_dedicated_serving_cell;
|
||||
long *preambleTransMax_CE_r13;
|
||||
BOOLEAN_t prach_ConfigCommon_v1310;
|
||||
BOOLEAN_t *mpdcch_startSF_CSS_RA_r13;
|
||||
long mpdcch_startSF_CSS_RA_r13_val;
|
||||
long *prach_HoppingOffset_r13;
|
||||
BOOLEAN_t mbms_dedicated_serving_cell;
|
||||
} RadioResourceConfig;
|
||||
|
||||
// eNB: ENB_APP -> RRC messages
|
||||
@@ -202,43 +200,43 @@ typedef struct RrcConfigurationReq_s {
|
||||
RadioResourceConfig radioresourceconfig[MAX_NUM_CCs];
|
||||
RadioResourceConfig radioresourceconfig_BR[MAX_NUM_CCs];
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
//MIB
|
||||
long schedulingInfoSIB1_BR_r13[MAX_NUM_CCs];
|
||||
long schedulingInfoSIB1_BR_r13[MAX_NUM_CCs];
|
||||
//SIB1 BR options
|
||||
uint16_t* hyperSFN_r13 [MAX_NUM_CCs];
|
||||
long* eDRX_Allowed_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t cellSelectionInfoCE_r13 [MAX_NUM_CCs];
|
||||
long q_RxLevMinCE_r13 [MAX_NUM_CCs];
|
||||
long* q_QualMinRSRQ_CE_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t bandwidthReducedAccessRelatedInfo_r13 [MAX_NUM_CCs];
|
||||
uint16_t *hyperSFN_r13 [MAX_NUM_CCs];
|
||||
long *eDRX_Allowed_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t cellSelectionInfoCE_r13 [MAX_NUM_CCs];
|
||||
long q_RxLevMinCE_r13 [MAX_NUM_CCs];
|
||||
long *q_QualMinRSRQ_CE_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t bandwidthReducedAccessRelatedInfo_r13 [MAX_NUM_CCs];
|
||||
long si_Narrowband_r13 [MAX_NUM_CCs][32];
|
||||
long si_TBS_r13 [MAX_NUM_CCs][32];
|
||||
int scheduling_info_br_size [MAX_NUM_CCs];
|
||||
long si_WindowLength_BR_r13 [MAX_NUM_CCs];
|
||||
long si_RepetitionPattern_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t * fdd_DownlinkOrTddSubframeBitmapBR_r13 [MAX_NUM_CCs];
|
||||
uint64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13 [MAX_NUM_CCs];
|
||||
uint16_t *fdd_UplinkSubframeBitmapBR_r13 [MAX_NUM_CCs];
|
||||
long startSymbolBR_r13 [MAX_NUM_CCs];
|
||||
long si_HoppingConfigCommon_r13 [MAX_NUM_CCs];
|
||||
long* si_ValidityTime_r13 [MAX_NUM_CCs];
|
||||
long si_WindowLength_BR_r13 [MAX_NUM_CCs];
|
||||
long si_RepetitionPattern_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t *fdd_DownlinkOrTddSubframeBitmapBR_r13 [MAX_NUM_CCs];
|
||||
uint64_t fdd_DownlinkOrTddSubframeBitmapBR_val_r13 [MAX_NUM_CCs];
|
||||
uint16_t *fdd_UplinkSubframeBitmapBR_r13 [MAX_NUM_CCs];
|
||||
long startSymbolBR_r13 [MAX_NUM_CCs];
|
||||
long si_HoppingConfigCommon_r13 [MAX_NUM_CCs];
|
||||
long *si_ValidityTime_r13 [MAX_NUM_CCs];
|
||||
long systemInfoValueTagSi_r13 [MAX_NUM_CCs][10];
|
||||
int system_info_value_tag_SI_size [MAX_NUM_CCs];
|
||||
BOOLEAN_t freqHoppingParametersDL_r13 [MAX_NUM_CCs];
|
||||
long* mpdcch_pdsch_HoppingNB_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t interval_DLHoppingConfigCommonModeA_r13 [MAX_NUM_CCs];
|
||||
long interval_DLHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
BOOLEAN_t interval_DLHoppingConfigCommonModeB_r13 [MAX_NUM_CCs];
|
||||
long interval_DLHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long* mpdcch_pdsch_HoppingOffset_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t freqHoppingParametersDL_r13 [MAX_NUM_CCs];
|
||||
long *mpdcch_pdsch_HoppingNB_r13 [MAX_NUM_CCs];
|
||||
BOOLEAN_t interval_DLHoppingConfigCommonModeA_r13 [MAX_NUM_CCs];
|
||||
long interval_DLHoppingConfigCommonModeA_r13_val [MAX_NUM_CCs];
|
||||
BOOLEAN_t interval_DLHoppingConfigCommonModeB_r13 [MAX_NUM_CCs];
|
||||
long interval_DLHoppingConfigCommonModeB_r13_val [MAX_NUM_CCs];
|
||||
long *mpdcch_pdsch_HoppingOffset_r13 [MAX_NUM_CCs];
|
||||
long firstPreamble_r13 [MAX_NUM_CCs][4];
|
||||
long lastPreamble_r13 [MAX_NUM_CCs][4];
|
||||
long ra_ResponseWindowSize_r13 [MAX_NUM_CCs][4];
|
||||
long mac_ContentionResolutionTimer_r13 [MAX_NUM_CCs][4];
|
||||
long rar_HoppingConfig_r13 [MAX_NUM_CCs][4];
|
||||
int rach_CE_LevelInfoList_r13_size [MAX_NUM_CCs];
|
||||
// long pcch_defaultPagingCycle_br;
|
||||
// long pcch_defaultPagingCycle_br;
|
||||
long rsrp_range [MAX_NUM_CCs][3];
|
||||
int rsrp_range_list_size [MAX_NUM_CCs];
|
||||
long prach_config_index [MAX_NUM_CCs][4];
|
||||
@@ -277,7 +275,7 @@ typedef struct RrcConfigurationReq_s {
|
||||
long *pusch_maxNumRepetitionCEmodeA_r13 [MAX_NUM_CCs];
|
||||
long *pusch_maxNumRepetitionCEmodeB_r13 [MAX_NUM_CCs];
|
||||
long *pusch_HoppingOffset_v1310 [MAX_NUM_CCs];
|
||||
#endif
|
||||
|
||||
//SIB18
|
||||
e_LTE_SL_CP_Len_r12 rxPool_sc_CP_Len[MAX_NUM_CCs];
|
||||
e_LTE_SL_PeriodComm_r12 rxPool_sc_Period[MAX_NUM_CCs];
|
||||
@@ -415,13 +413,13 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
|
||||
///NR
|
||||
//MIB
|
||||
long MIB_subCarrierSpacingCommon[MAX_NUM_CCs];
|
||||
uint32_t MIB_ssb_SubcarrierOffset[MAX_NUM_CCs];
|
||||
long MIB_subCarrierSpacingCommon[MAX_NUM_CCs];
|
||||
uint32_t MIB_ssb_SubcarrierOffset[MAX_NUM_CCs];
|
||||
long MIB_dmrs_TypeA_Position[MAX_NUM_CCs];
|
||||
uint32_t pdcch_ConfigSIB1[MAX_NUM_CCs];
|
||||
|
||||
//SIB1
|
||||
long SIB1_frequencyOffsetSSB[MAX_NUM_CCs];
|
||||
long SIB1_frequencyOffsetSSB[MAX_NUM_CCs];
|
||||
long SIB1_ssb_PeriodicityServingCell[MAX_NUM_CCs];
|
||||
long SIB1_ss_PBCH_BlockPower[MAX_NUM_CCs];
|
||||
//NR FrequencyInfoDL
|
||||
@@ -435,9 +433,9 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
uint32_t DL_carrierBandwidth[MAX_NUM_CCs];
|
||||
|
||||
//NR BWP-DownlinkCommon
|
||||
uint32_t DL_locationAndBandwidth[MAX_NUM_CCs];
|
||||
uint32_t DL_locationAndBandwidth[MAX_NUM_CCs];
|
||||
long DL_BWP_SubcarrierSpacing[MAX_NUM_CCs];
|
||||
lte_prefix_type_t DL_BWP_prefix_type[MAX_NUM_CCs];
|
||||
lte_prefix_type_t DL_BWP_prefix_type[MAX_NUM_CCs];
|
||||
|
||||
//NR FrequencyInfoUL
|
||||
long UL_FreqBandIndicatorNR[MAX_NUM_CCs];
|
||||
@@ -552,7 +550,7 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
long PDCCH_cce_REG_MappingType[MAX_NUM_CCs];
|
||||
long PDCCH_reg_BundleSize[MAX_NUM_CCs];
|
||||
long PDCCH_interleaverSize[MAX_NUM_CCs];
|
||||
long PDCCH_shiftIndex[MAX_NUM_CCs];
|
||||
long PDCCH_shiftIndex[MAX_NUM_CCs];
|
||||
long PDCCH_precoderGranularity[MAX_NUM_CCs]; //Corresponds to L1 parameter 'CORESET-precoder-granuality'
|
||||
long PDCCH_TCI_StateId[MAX_NUM_CCs];
|
||||
BOOLEAN_t tci_PresentInDCI[MAX_NUM_CCs];
|
||||
@@ -574,7 +572,7 @@ typedef struct NRRrcConfigurationReq_s {
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_3_monitoringPeriodicity[MAX_NUM_CCs];
|
||||
long Common_dci_Format2_3_nrofPDCCH_Candidates[MAX_NUM_CCs];
|
||||
long ue_Specific__dci_Formats[MAX_NUM_CCs];
|
||||
|
||||
+361
-474
@@ -122,7 +122,6 @@ void RCconfig_L1(void) {
|
||||
for (j = 0; j < RC.nb_L1_inst; j++) {
|
||||
RC.nb_L1_CC[j] = *(L1_ParamList.paramarray[j][L1_CC_IDX].uptr);
|
||||
|
||||
|
||||
if (RC.eNB[j] == NULL) {
|
||||
RC.eNB[j] = (PHY_VARS_eNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_eNB *));
|
||||
LOG_I(PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]);
|
||||
@@ -444,7 +443,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
config_get( CCsParams,sizeof(CCsParams)/sizeof(paramdef_t),ccspath);
|
||||
//printf("Component carrier %d\n",component_carrier);
|
||||
nb_cc++;
|
||||
|
||||
// Cell params, MIB/SIB1 in DU
|
||||
RRC_CONFIGURATION_REQ (msg_p).tdd_config[j] = ccparams_lte.tdd_config;
|
||||
AssertFatal (ccparams_lte.tdd_config <= LTE_TDD_Config__subframeAssignment_sa6,
|
||||
@@ -469,8 +467,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RC.config_file_name, i, ccparams_lte.prefix_type);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (!ccparams_lte.pbch_repetition)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
|
||||
@@ -485,7 +481,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RC.config_file_name, i, ccparams_lte.pbch_repetition);
|
||||
}
|
||||
|
||||
#endif
|
||||
RRC_CONFIGURATION_REQ (msg_p).eutra_band[j] = ccparams_lte.eutra_band;
|
||||
RRC_CONFIGURATION_REQ (msg_p).downlink_frequency[j] = (uint32_t) ccparams_lte.downlink_frequency;
|
||||
RRC_CONFIGURATION_REQ (msg_p).uplink_frequency_offset[j] = (unsigned int) ccparams_lte.uplink_frequency_offset;
|
||||
@@ -604,7 +599,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_nCS_AN choice: 0..7!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_nCS_AN);
|
||||
|
||||
//#if (LTE_RRC_VERSION < MAKE_VERSION(10, 0, 0))
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pucch_n1_AN = ccparams_lte.pucch_n1_AN;
|
||||
|
||||
if ((ccparams_lte.pucch_n1_AN <0) ||
|
||||
@@ -613,7 +607,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pucch_n1_AN choice: 0..2047!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pucch_n1_AN);
|
||||
|
||||
//#endif
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pdsch_referenceSignalPower = ccparams_lte.pdsch_referenceSignalPower;
|
||||
|
||||
if ((ccparams_lte.pdsch_referenceSignalPower <-60) ||
|
||||
@@ -792,29 +785,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for pusch_p0_Nominal choice: -126..24 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_p0_Nominal);
|
||||
|
||||
#if (LTE_RRC_VERSION <= MAKE_VERSION(12, 0, 0))
|
||||
|
||||
if (strcmp(ccparams_lte.pusch_alpha,"AL0")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al0;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL04")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al04;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL05")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al05;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL06")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al06;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL07")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al07;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL08")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al08;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL09")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al09;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL1")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_UplinkPowerControlCommon__alpha_al1;
|
||||
}
|
||||
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 0, 0))
|
||||
|
||||
if (strcmp(ccparams_lte.pusch_alpha,"AL0")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_Alpha_r12_al0;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL04")==0) {
|
||||
@@ -831,10 +801,7 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_Alpha_r12_al09;
|
||||
} else if (strcmp(ccparams_lte.pusch_alpha,"AL1")==0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pusch_alpha= LTE_Alpha_r12_al1;
|
||||
}
|
||||
|
||||
#endif
|
||||
else
|
||||
} else
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pucch_Alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!\n",
|
||||
RC.config_file_name, i, ccparams_lte.pusch_alpha);
|
||||
@@ -1002,53 +969,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
RC.config_file_name, i, ccparams_lte.rach_powerRampingStep);
|
||||
|
||||
switch (ccparams_lte.rach_preambleTransMax) {
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(14, 0, 0))
|
||||
|
||||
case 3:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n3;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n4;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n5;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n6;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n7;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n8;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n10;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n20;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n50;
|
||||
break;
|
||||
|
||||
case 100:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n100;
|
||||
break;
|
||||
|
||||
case 200:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_RACH_ConfigCommon__ra_SupervisionInfo__preambleTransMax_n200;
|
||||
break;
|
||||
#else
|
||||
|
||||
case 3:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_PreambleTransMax_n3;
|
||||
break;
|
||||
@@ -1092,7 +1012,6 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
case 200:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].rach_preambleTransMax= LTE_PreambleTransMax_n200;
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
@@ -1151,387 +1070,374 @@ int RCconfig_RRC(uint32_t i, eNB_RRC_INST *rrc, int macrlc_has_f1) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.pcch_nB, "fourT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_fourT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "twoT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_twoT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "oneT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "halfT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_halfT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "quarterT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_quarterT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "oneEighthT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneEighthT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "oneSixteenthT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneSixteenthT;
|
||||
}
|
||||
else if (strcmp(ccparams_lte.pcch_nB, "oneThirtySecondT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneThirtySecondT;
|
||||
}
|
||||
else {
|
||||
AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
|
||||
RC.config_file_name,
|
||||
i,
|
||||
ccparams_lte.pcch_nB);
|
||||
}
|
||||
if (strcmp(ccparams_lte.pcch_nB, "fourT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_fourT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "twoT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_twoT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "oneT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "halfT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_halfT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "quarterT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_quarterT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "oneEighthT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneEighthT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "oneSixteenthT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneSixteenthT;
|
||||
} else if (strcmp(ccparams_lte.pcch_nB, "oneThirtySecondT") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].pcch_nB= LTE_PCCH_Config__nB_oneThirtySecondT;
|
||||
} else {
|
||||
AssertFatal (0, "Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for pcch_nB choice: fourT,twoT,oneT,halfT,quarterT,oneighthT,oneSixteenthT,oneThirtySecondT !\n",
|
||||
RC.config_file_name,
|
||||
i,
|
||||
ccparams_lte.pcch_nB);
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_Config_present, "prNothing") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_NOTHING;
|
||||
} else if (strcmp(ccparams_lte.drx_Config_present, "prRelease") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_release;
|
||||
} else if (strcmp(ccparams_lte.drx_Config_present, "prSetup") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_setup;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_Config_present choice: prNothing, prRelease, prSetup!\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_Config_present);
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_onDurationTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf3;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf5;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf10;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf20;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf30") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf30;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf40;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf50") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf50;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf60") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf60;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf80;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf100") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf100;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf200") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf200;
|
||||
} else {
|
||||
if (strcmp(ccparams_lte.drx_Config_present, "prNothing") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_NOTHING;
|
||||
} else if (strcmp(ccparams_lte.drx_Config_present, "prRelease") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_release;
|
||||
} else if (strcmp(ccparams_lte.drx_Config_present, "prSetup") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_Config_present = LTE_DRX_Config_PR_setup;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_onDurationTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_onDurationTimer);
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_Config_present choice: prNothing, prRelease, prSetup!\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_Config_present);
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_onDurationTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf3;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf5;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf10;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf20;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf30") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf30;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf40;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf50") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf50;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf60") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf60;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf80;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf100") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf100;
|
||||
} else if (strcmp(ccparams_lte.drx_onDurationTimer, "psf200") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_onDurationTimer = (long) LTE_DRX_Config__setup__onDurationTimer_psf200;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_onDurationTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_onDurationTimer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf3;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf5;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf10;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf20;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf30") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf30;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf40;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf50") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf50;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf60") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf60;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf80;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf100") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf100;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf200") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf200;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf300") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf300;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf500") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf500;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf750") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf750;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1280") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1280;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1920") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1920;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2560") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2560;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf0-v1020") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf0_v1020;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare9") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare9;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare8;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare7") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare7;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare6;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare5;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare4;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare3;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare2;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare1;
|
||||
} else {
|
||||
if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf3;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf5;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf10;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf20;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf30") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf30;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf40;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf50") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf50;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf60") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf60;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf80;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf100") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf100;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf200") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf200;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf300") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf300;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf500") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf500;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf750") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf750;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1280") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1280;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf1920") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf1920;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf2560") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf2560;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "psf0-v1020") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_psf0_v1020;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare9") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare9;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare8;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare7") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare7;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare6;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare5") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare5;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare4;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare3") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare3;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare2;
|
||||
} else if (strcmp(ccparams_lte.drx_InactivityTimer, "spare1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_InactivityTimer = (long) LTE_DRX_Config__setup__drx_InactivityTimer_spare1;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_InactivityTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_InactivityTimer);
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_InactivityTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_InactivityTimer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_multiple_max= ccparams_lte.ue_multiple_max;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].ue_multiple_max= ccparams_lte.ue_multiple_max;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (!ccparams_lte.mbms_dedicated_serving_cell)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
|
||||
else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
|
||||
} else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = FALSE;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.mbms_dedicated_serving_cell);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
switch (ccparams_lte.N_RB_DL) {
|
||||
case 25:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 4))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
case 50:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 8))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
case 100:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 16))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.N_RB_DL);
|
||||
break;
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf16") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf16;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf24") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf24;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf33") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf33;
|
||||
} else {
|
||||
if (!ccparams_lte.mbms_dedicated_serving_cell)
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_RetransmissionTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_RetransmissionTimer);
|
||||
"Failed to parse eNB configuration file %s, enb %d define %s: TRUE,FALSE!\n",
|
||||
RC.config_file_name, i, ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL);
|
||||
else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "ENABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = TRUE;
|
||||
} else if (strcmp(ccparams_lte.mbms_dedicated_serving_cell, "DISABLE") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].mbms_dedicated_serving_cell = FALSE;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for mbms_dedicated_serving_cell choice: TRUE or FALSE !\n",
|
||||
RC.config_file_name, i, ccparams_lte.mbms_dedicated_serving_cell);
|
||||
}
|
||||
|
||||
switch (ccparams_lte.N_RB_DL) {
|
||||
case 25:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 4))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..4!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
case 50:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 8))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..8!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
case 100:
|
||||
if ((ccparams_lte.ue_multiple_max < 1) ||
|
||||
(ccparams_lte.ue_multiple_max > 16))
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for ue_multiple_max choice: 1..16!\n",
|
||||
RC.config_file_name, i, ccparams_lte.ue_multiple_max);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for N_RB_DL choice: 25,50,100 !\n",
|
||||
RC.config_file_name, i, ccparams_lte.N_RB_DL);
|
||||
break;
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf1") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf1;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf2") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf2;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf4") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf4;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf6") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf6;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf8") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf8;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf16") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf16;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf24") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf24;
|
||||
} else if (strcmp(ccparams_lte.drx_RetransmissionTimer, "psf33") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_RetransmissionTimer = (long) LTE_DRX_Config__setup__drx_RetransmissionTimer_psf33;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%s\" for drx_RetransmissionTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_RetransmissionTimer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (ccparams_lte.drx_longDrx_CycleStartOffset_present == NULL || strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prNothing") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_NOTHING;
|
||||
} else {
|
||||
if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10;
|
||||
offsetMaxLimit = 10;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20;
|
||||
offsetMaxLimit = 20;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf32") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32;
|
||||
offsetMaxLimit = 32;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40;
|
||||
offsetMaxLimit = 40;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf64") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64;
|
||||
offsetMaxLimit = 64;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80;
|
||||
offsetMaxLimit = 80;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf128") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128;
|
||||
offsetMaxLimit = 128;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf160") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160;
|
||||
offsetMaxLimit = 160;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf256") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256;
|
||||
offsetMaxLimit = 256;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf320") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320;
|
||||
offsetMaxLimit = 320;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf512") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512;
|
||||
offsetMaxLimit = 512;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf640") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640;
|
||||
offsetMaxLimit = 640;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1024") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024;
|
||||
offsetMaxLimit = 1024;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1280") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280;
|
||||
offsetMaxLimit = 1280;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2048") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048;
|
||||
offsetMaxLimit = 2048;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2560") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560;
|
||||
offsetMaxLimit = 2560;
|
||||
if (ccparams_lte.drx_longDrx_CycleStartOffset_present == NULL || strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prNothing") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_NOTHING;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file \"%s\", enb %d unknown string value \"%s\" for drx_longDrx_CycleStartOffset_present choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset_present);
|
||||
if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf10") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10;
|
||||
offsetMaxLimit = 10;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf20") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20;
|
||||
offsetMaxLimit = 20;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf32") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32;
|
||||
offsetMaxLimit = 32;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf40") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40;
|
||||
offsetMaxLimit = 40;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf64") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64;
|
||||
offsetMaxLimit = 64;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf80") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80;
|
||||
offsetMaxLimit = 80;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf128") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128;
|
||||
offsetMaxLimit = 128;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf160") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160;
|
||||
offsetMaxLimit = 160;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf256") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256;
|
||||
offsetMaxLimit = 256;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf320") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320;
|
||||
offsetMaxLimit = 320;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf512") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512;
|
||||
offsetMaxLimit = 512;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf640") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640;
|
||||
offsetMaxLimit = 640;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1024") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024;
|
||||
offsetMaxLimit = 1024;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf1280") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280;
|
||||
offsetMaxLimit = 1280;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2048") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048;
|
||||
offsetMaxLimit = 2048;
|
||||
} else if (strcmp(ccparams_lte.drx_longDrx_CycleStartOffset_present, "prSf2560") == 0) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset_present = LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560;
|
||||
offsetMaxLimit = 2560;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file \"%s\", enb %d unknown string value \"%s\" for drx_longDrx_CycleStartOffset_present choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset_present);
|
||||
}
|
||||
|
||||
if (ccparams_lte.drx_longDrx_CycleStartOffset >= 0 && ccparams_lte.drx_longDrx_CycleStartOffset < offsetMaxLimit) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset = ccparams_lte.drx_longDrx_CycleStartOffset;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent value \"%d\" for drx_longDrx_CycleStartOffset !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset);
|
||||
}
|
||||
}
|
||||
|
||||
if (ccparams_lte.drx_longDrx_CycleStartOffset >= 0 && ccparams_lte.drx_longDrx_CycleStartOffset < offsetMaxLimit) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_longDrx_CycleStartOffset = ccparams_lte.drx_longDrx_CycleStartOffset;
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") == 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer == 0) {
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") != 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer != 0) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent values \"%s\" - \"%d\" for drx_shortDrx_Cycle or drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle, ccparams_lte.drx_shortDrx_ShortCycleTimer);
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = -1;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = 0;
|
||||
}
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent value \"%d\" for drx_longDrx_CycleStartOffset !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_longDrx_CycleStartOffset);
|
||||
}
|
||||
}
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf2") == 0) {
|
||||
cycleNb = 2;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf2;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf5") == 0) {
|
||||
cycleNb = 5;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf5;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf8") == 0) {
|
||||
cycleNb = 8;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf8;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf10") == 0) {
|
||||
cycleNb = 10;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf10;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf16") == 0) {
|
||||
cycleNb = 16;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf16;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf20") == 0) {
|
||||
cycleNb = 20;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf20;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf32") == 0) {
|
||||
cycleNb = 32;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf32;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf40") == 0) {
|
||||
cycleNb = 40;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf40;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf64") == 0) {
|
||||
cycleNb = 64;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf64;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf80") == 0) {
|
||||
cycleNb = 80;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf80;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf128") == 0) {
|
||||
cycleNb = 128;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf128;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf160") == 0) {
|
||||
cycleNb = 160;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf160;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf256") == 0) {
|
||||
cycleNb = 256;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf256;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf320") == 0) {
|
||||
cycleNb = 320;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf320;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf512") == 0) {
|
||||
cycleNb = 512;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf512;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf640") == 0) {
|
||||
cycleNb = 640;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf640;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent value \"%s\" for drx_shortDrx_Cycle !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle);
|
||||
}
|
||||
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") == 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer == 0) {
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "") != 0 || ccparams_lte.drx_shortDrx_ShortCycleTimer != 0) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent values \"%s\" - \"%d\" for drx_shortDrx_Cycle or drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle, ccparams_lte.drx_shortDrx_ShortCycleTimer);
|
||||
} else {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = -1;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = 0;
|
||||
}
|
||||
} else {
|
||||
if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf2") == 0) {
|
||||
cycleNb = 2;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf2;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf5") == 0) {
|
||||
cycleNb = 5;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf5;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf8") == 0) {
|
||||
cycleNb = 8;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf8;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf10") == 0) {
|
||||
cycleNb = 10;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf10;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf16") == 0) {
|
||||
cycleNb = 16;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf16;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf20") == 0) {
|
||||
cycleNb = 20;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf20;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf32") == 0) {
|
||||
cycleNb = 32;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf32;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf40") == 0) {
|
||||
cycleNb = 40;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf40;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf64") == 0) {
|
||||
cycleNb = 64;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf64;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf80") == 0) {
|
||||
cycleNb = 80;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf80;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf128") == 0) {
|
||||
cycleNb = 128;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf128;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf160") == 0) {
|
||||
cycleNb = 160;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf160;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf256") == 0) {
|
||||
cycleNb = 256;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf256;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf320") == 0) {
|
||||
cycleNb = 320;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf320;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf512") == 0) {
|
||||
cycleNb = 512;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf512;
|
||||
} else if (strcmp(ccparams_lte.drx_shortDrx_Cycle, "sf640") == 0) {
|
||||
cycleNb = 640;
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_Cycle = LTE_DRX_Config__setup__shortDRX__shortDRX_Cycle_sf640;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incoherent value \"%s\" for drx_shortDrx_Cycle !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_Cycle);
|
||||
if (cycleNb > 0 && (offsetMaxLimit % cycleNb != 0 || cycleNb == offsetMaxLimit)) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incompatible (not multiple) values \"%d\" - \"%d\" for drx_shortDrx_Cycle and drx_longDrx_CycleStartOffset choice !\n",
|
||||
RC.config_file_name, i, cycleNb, offsetMaxLimit);
|
||||
}
|
||||
|
||||
if (ccparams_lte.drx_shortDrx_ShortCycleTimer >= 1 && ccparams_lte.drx_shortDrx_ShortCycleTimer <= 16 ) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = ccparams_lte.drx_shortDrx_ShortCycleTimer;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_ShortCycleTimer );
|
||||
}
|
||||
}
|
||||
|
||||
if (cycleNb > 0 && (offsetMaxLimit % cycleNb != 0 || cycleNb == offsetMaxLimit)) {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d incompatible (not multiple) values \"%d\" - \"%d\" for drx_shortDrx_Cycle and drx_longDrx_CycleStartOffset choice !\n",
|
||||
RC.config_file_name, i, cycleNb, offsetMaxLimit);
|
||||
}
|
||||
|
||||
if (ccparams_lte.drx_shortDrx_ShortCycleTimer >= 1 && ccparams_lte.drx_shortDrx_ShortCycleTimer <= 16 ) {
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].drx_shortDrx_ShortCycleTimer = ccparams_lte.drx_shortDrx_ShortCycleTimer;
|
||||
} else {
|
||||
AssertFatal (0,
|
||||
"Failed to parse eNB configuration file %s, enb %d unknown value \"%d\" for drx_shortDrx_ShortCycleTimer choice !\n",
|
||||
RC.config_file_name, i, ccparams_lte.drx_shortDrx_ShortCycleTimer );
|
||||
}
|
||||
}
|
||||
|
||||
switch (ccparams_lte.bcch_modificationPeriodCoeff) {
|
||||
case 2:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n2;
|
||||
break;
|
||||
switch (ccparams_lte.bcch_modificationPeriodCoeff) {
|
||||
case 2:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n2;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
RRC_CONFIGURATION_REQ (msg_p).radioresourceconfig[j].bcch_modificationPeriodCoeff= LTE_BCCH_Config__modificationPeriodCoeff_n4;
|
||||
@@ -2291,7 +2197,7 @@ int RCconfig_S1(
|
||||
|
||||
default: {
|
||||
LOG_E(S1AP, "Default I-DRX value in conf file is invalid (%i). Should be 32, 64, 128 or 256. \
|
||||
Default DRX set to 32 in MME configuration\n",
|
||||
Default DRX set to 32 in MME configuration\n",
|
||||
ccparams_lte.pcch_defaultPagingCycle);
|
||||
S1AP_REGISTER_ENB_REQ(msg_p).default_drx = 0;
|
||||
}
|
||||
@@ -2784,7 +2690,6 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont
|
||||
//carrier->sib11 = &typeandinfo->choice.sib11;
|
||||
LOG_I( ENB_APP, "[RRC %"PRIu8"] Found SIB11 in CU F1AP_SETUP_RESP message\n", inst);
|
||||
break;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 2, 0))
|
||||
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib12_v920:
|
||||
//carrier->sib12 = &typeandinfo->choice.sib12;
|
||||
@@ -2795,8 +2700,6 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont
|
||||
carrier->sib13 = &typeandinfo->choice.sib13_v920;
|
||||
LOG_I( ENB_APP, "[RRC %"PRIu8"] Found SIB13 in CU F1AP_SETUP_RESP message\n", inst);
|
||||
break;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
//SIB18
|
||||
case LTE_SystemInformation_r8_IEs__sib_TypeAndInfo__Member_PR_sib18_v1250:
|
||||
@@ -2815,7 +2718,6 @@ void extract_and_decode_SI(int inst,int si_ind,uint8_t *si_container,int si_cont
|
||||
carrier->sib21 = &typeandinfo->choice.sib21_v1430;
|
||||
LOG_I( ENB_APP, "[RRC %"PRIu8"] Found SIB21 in CU F1AP_SETUP_RESP message\n", inst);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
AssertFatal(1==0,"Shouldn't have received this SI %d\n",typeandinfo->present);
|
||||
@@ -2843,20 +2745,14 @@ void configure_du_mac(int inst) {
|
||||
carrier->Ncp,
|
||||
carrier->sib1->freqBandIndicator,
|
||||
carrier->dl_CarrierFreq,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
carrier->pbch_repetition,
|
||||
#endif
|
||||
0, // rnti
|
||||
(LTE_BCCH_BCH_Message_t *) &carrier->mib,
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) &carrier->sib2->radioResourceConfigCommon,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
(LTE_RadioResourceConfigCommonSIB_t *) &carrier->sib2_BR->radioResourceConfigCommon,
|
||||
#endif
|
||||
(struct LTE_PhysicalConfigDedicated *)NULL,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
(LTE_SCellToAddMod_r10_t *)NULL,
|
||||
//(struct PhysicalConfigDedicatedSCell_r10 *)NULL,
|
||||
#endif
|
||||
(LTE_MeasObjectToAddMod_t **) NULL,
|
||||
(LTE_MAC_MainConfig_t *) NULL, 0,
|
||||
(struct LTE_LogicalChannelConfig *)NULL,
|
||||
@@ -2867,26 +2763,17 @@ void configure_du_mac(int inst) {
|
||||
carrier->ul_CarrierFreq,
|
||||
carrier->sib2->freqInfo.ul_Bandwidth,
|
||||
&carrier->sib2->freqInfo.additionalSpectrumEmission,
|
||||
(LTE_MBSFN_SubframeConfigList_t *) carrier->sib2->mbsfn_SubframeConfigList
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,
|
||||
(LTE_MBSFN_SubframeConfigList_t *) carrier->sib2->mbsfn_SubframeConfigList,
|
||||
carrier->MBMS_flag,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) & carrier->sib13->mbsfn_AreaInfoList_r9,
|
||||
(LTE_PMCH_InfoList_r9_t *) NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
NULL
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
#endif
|
||||
(LTE_PMCH_InfoList_r9_t *) NULL,
|
||||
NULL,
|
||||
0,
|
||||
(LTE_BCCH_DL_SCH_Message_MBMS_t *) NULL,
|
||||
(LTE_SchedulingInfo_MBMS_r14_t *) NULL,
|
||||
(struct LTE_NonMBSFN_SubframeConfig_r14 *) NULL,
|
||||
(LTE_SystemInformationBlockType1_MBMS_r14_t *) NULL,
|
||||
(LTE_MBSFN_AreaInfoList_r9_t *) NULL
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
+415
-416
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
/*! \file openair2/ENB_APP/enb_paramdef.h
|
||||
* \brief definition of configuration parameters for all eNodeB modules
|
||||
* \brief definition of configuration parameters for all eNodeB modules
|
||||
* \author Francois TABURET
|
||||
* \date 2017
|
||||
* \version 0.1
|
||||
@@ -46,9 +46,9 @@
|
||||
#define ENB_CONF_STRING_OTG_BG_TRAFFIC "bg_traffic"
|
||||
|
||||
#ifdef LIBCONFIG_LONG
|
||||
#define libconfig_int long
|
||||
#define libconfig_int long
|
||||
#else
|
||||
#define libconfig_int int
|
||||
#define libconfig_int int
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
@@ -126,31 +126,31 @@ typedef enum {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define RUPARAMS_DESC { \
|
||||
{CONFIG_STRING_RU_LOCAL_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_TRANSPORT_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"udp_if5", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_RF, NULL, 0, strptr:NULL, defstrval:"yes", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_NB_TX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_NB_RX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_MAX_RS_EPRE, NULL, 0, iptr:NULL, defintval:-29, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_MAX_RXGAIN, NULL, 0, iptr:NULL, defintval:120, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_BAND_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFBANDS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_ENB_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_IS_SLAVE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"type=b200", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SF_EXTENSION, NULL, 0, uptr:NULL, defuintval:312, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_END_OF_BURST_DELAY, NULL, 0, uptr:NULL, defuintval:400, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_OTA_SYNC_ENABLE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
}
|
||||
{CONFIG_STRING_RU_LOCAL_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_REMOTE_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_TRANSPORT_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"udp_if5", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_LOCAL_RF, NULL, 0, strptr:NULL, defstrval:"yes", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_NB_TX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_NB_RX, NULL, 0, uptr:NULL, defuintval:1, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_MAX_RS_EPRE, NULL, 0, iptr:NULL, defintval:-29, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_MAX_RXGAIN, NULL, 0, iptr:NULL, defintval:120, TYPE_INT, 0}, \
|
||||
{CONFIG_STRING_RU_BAND_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFBANDS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_ENB_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_ATT_TX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_ATT_RX, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_IS_SLAVE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_NBIOTRRC_LIST, NULL, 0, uptr:NULL, defintarrayval:DEFENBS, TYPE_INTARRAY, 1}, \
|
||||
{CONFIG_STRING_RU_SDR_ADDRS, NULL, 0, strptr:NULL, defstrval:"type=b200", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SDR_CLK_SRC, NULL, 0, strptr:NULL, defstrval:"internal", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_SF_EXTENSION, NULL, 0, uptr:NULL, defuintval:312, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_END_OF_BURST_DELAY, NULL, 0, uptr:NULL, defuintval:400, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_RU_OTA_SYNC_ENABLE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -158,7 +158,7 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE "none"
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_ANNOYING "annoying"
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY_INFO "info"
|
||||
|
||||
|
||||
|
||||
/* global parameters, not under a specific section */
|
||||
#define ENB_CONFIG_STRING_ASN1_VERBOSITY "Asn1_verbosity"
|
||||
@@ -169,10 +169,10 @@ typedef enum {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define ENBSPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ACTIVE_ENBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0}, \
|
||||
{ENB_CONFIG_STRING_NOS1, NULL, PARAMFLAG_BOOL, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_ASN1_VERBOSITY, NULL, 0, uptr:NULL, defstrval:ENB_CONFIG_STRING_ASN1_VERBOSITY_NONE, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ACTIVE_ENBS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRINGLIST, 0}, \
|
||||
{ENB_CONFIG_STRING_NOS1, NULL, PARAMFLAG_BOOL, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
}
|
||||
#define ENB_ASN1_VERBOSITY_IDX 0
|
||||
#define ENB_ACTIVE_ENBS_IDX 1
|
||||
#define ENB_NOS1_IDX 2
|
||||
@@ -206,25 +206,25 @@ typedef enum {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define ENBPARAMS_DESC {\
|
||||
{ENB_CONFIG_STRING_ENB_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_TYPE, NULL, 0, strptr:NULL, defstrval:"CELL_MACRO_ENB", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_NAME, NULL, 0, strptr:NULL, defstrval:"OAIeNodeB", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MEASUREMENT_REPORTS, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_X2, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_ENB_ID, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_TYPE, NULL, 0, strptr:NULL, defstrval:"CELL_MACRO_ENB", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_NAME, NULL, 0, strptr:NULL, defstrval:"OAIeNodeB", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TRACKING_AREA_CODE, NULL, 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE_OLD, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TRANSPORT_S_PREFERENCE, NULL, 0, strptr:NULL, defstrval:"local_mac", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_IF_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.2", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTC, NULL, 0, uptr:NULL, defuintval:50000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_LOCAL_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_REMOTE_S_PORTD, NULL, 0, uptr:NULL, defuintval:50001, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_NR_CELLID, NULL, 0, u64ptr:NULL, defint64val:0, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_RRC_INACTIVITY_THRESHOLD, NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MEASUREMENT_REPORTS, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_X2, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
#define ENB_ENB_ID_IDX 0
|
||||
#define ENB_CELL_TYPE_IDX 1
|
||||
#define ENB_ENB_NAME_IDX 2
|
||||
@@ -246,26 +246,26 @@ typedef enum {
|
||||
|
||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||
#define ENBPARAMS_CHECK { \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s2 = { config_check_intrange, TRACKING_AREA_CODE_OKRANGE } },\
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s2 = { config_check_intrange, TRACKING_AREA_CODE_OKRANGE } },\
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* PLMN ID configuration */
|
||||
|
||||
@@ -280,20 +280,20 @@ typedef enum {
|
||||
#define ENB_MNC_DIGIT_LENGTH 2
|
||||
|
||||
#define PLMNPARAMS_DESC { \
|
||||
/* optname helpstr paramflags XXXptr def val type numelt */ \
|
||||
{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MNC_DIGIT_LENGTH, "length of the MNC (2 or 3)", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
|
||||
}
|
||||
/* optname helpstr paramflags XXXptr def val type numelt */ \
|
||||
{ENB_CONFIG_STRING_MOBILE_COUNTRY_CODE, "mobile country code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MOBILE_NETWORK_CODE, "mobile network code", 0, uptr:NULL, defuintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MNC_DIGIT_LENGTH, "length of the MNC (2 or 3)", 0, uptr:NULL, defuintval:0, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
#define MCC_MNC_OKRANGES {0,999}
|
||||
#define MNC_DIGIT_LENGTH_OKVALUES {2,3}
|
||||
|
||||
#define PLMNPARAMS_CHECK { \
|
||||
{ .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \
|
||||
{ .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \
|
||||
{ .s1 = { config_check_intval, MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \
|
||||
}
|
||||
{ .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \
|
||||
{ .s2 = { config_check_intrange, MCC_MNC_OKRANGES } }, \
|
||||
{ .s1 = { config_check_intval, MNC_DIGIT_LENGTH_OKVALUES, 2 } }, \
|
||||
}
|
||||
|
||||
|
||||
/* component carries configuration parameters name */
|
||||
@@ -311,9 +311,8 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT "pucch_delta_shift"
|
||||
#define ENB_CONFIG_STRING_PUCCH_NRB_CQI "pucch_nRB_CQI"
|
||||
#define ENB_CONFIG_STRING_PUCCH_NCS_AN "pucch_nCS_AN"
|
||||
//#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#define ENB_CONFIG_STRING_PUCCH_N1_AN "pucch_n1_AN"
|
||||
//#endif
|
||||
|
||||
|
||||
#define ENB_CONFIG_STRING_PCCH_CONFIG_V1310 "pcch_config_v1310"
|
||||
#define ENB_CONFIG_STRING_PAGING_NARROWBANDS_R13 "paging_narrowbands_r13"
|
||||
@@ -385,8 +384,8 @@ typedef enum {
|
||||
#define ENB_CONFIG_STRING_UETIMERS_N311 "ue_TimersAndConstants_n311"
|
||||
#define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE "ue_TransmissionMode"
|
||||
#define ENB_CONFIG_STRING_UE_MULTIPLE_MAX "ue_multiple_max"
|
||||
//SIB1-MBMS
|
||||
#define ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL "mbms_dedicated_serving_cell"
|
||||
//SIB1-MBMS
|
||||
#define ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL "mbms_dedicated_serving_cell"
|
||||
|
||||
|
||||
|
||||
@@ -538,271 +537,271 @@ typedef struct ccparams_lte_s {
|
||||
} ccparams_lte_t;
|
||||
|
||||
#define CCPARAMS_CHECK { \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} \
|
||||
}
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} , \
|
||||
{ .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} , \
|
||||
{ .s5= {NULL }} \
|
||||
}
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* component carriers configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt checked_param */
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#define CCPARAMS_DESC(ccparams) { \
|
||||
{ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:&ccparams.frame_type, defstrval:"FDD", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:&ccparams.tdd_config, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG_S, NULL, 0, iptr:&ccparams.tdd_config_s, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PREFIX_TYPE, NULL, 0, strptr:&ccparams.prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PBCH_REPETITION, NULL, 0, strptr:&ccparams.pbch_repetition, defstrval:"FALSE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_EUTRA_BAND, NULL, 0, iptr:&ccparams.eutra_band, defintval:7, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, NULL, 0, i64ptr:(int64_t *)&ccparams.downlink_frequency, defint64val:2680000000, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, NULL, 0, iptr:&ccparams.uplink_frequency_offset, defintval:-120000000, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NID_CELL, NULL, 0, iptr:&ccparams.Nid_cell, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_N_RB_DL, NULL, 0, iptr:&ccparams.N_RB_DL, defintval:25, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_MBSFN, NULL, 0, iptr:&ccparams.Nid_cell_mbsfn, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NB_ANT_PORTS, NULL, 0, iptr:&ccparams.nb_antenna_ports, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, iptr:&ccparams.prach_root, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, iptr:&ccparams.prach_config_index, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, strptr:&ccparams.prach_high_speed, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, iptr:&ccparams.prach_zero_correlation, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, iptr:&ccparams.prach_freq_offset, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, iptr:&ccparams.pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, iptr:&ccparams.pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, iptr:&ccparams.pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&ccparams.pucch_n1_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, iptr:&ccparams.pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, iptr:&ccparams.pdsch_p_b, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, iptr:&ccparams.pusch_n_SB, defintval:1, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, strptr:&ccparams.pusch_hoppingMode, defstrval:"interSubFrame", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, iptr:&ccparams.pusch_hoppingOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, strptr:&ccparams.pusch_enable64QAM, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_groupHoppingEnabled, defstrval:"ENABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, iptr:&ccparams.pusch_groupAssignment, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_sequenceHoppingEnabled, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, iptr:&ccparams.pusch_nDMRS1, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, strptr:&ccparams.phich_duration, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, strptr:&ccparams.phich_resource, defstrval:"ONESIXTH", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, strptr:&ccparams.srs_enable, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, iptr:&ccparams.srs_BandwidthConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, iptr:&ccparams.srs_SubframeConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, strptr:&ccparams.srs_ackNackST, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, strptr:&ccparams.srs_MaxUpPts, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pusch_p0_Nominal, defintval:-90, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, strptr:&ccparams.pusch_alpha, defstrval:"AL1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pucch_p0_Nominal, defintval:-96, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, iptr:&ccparams.msg3_delta_Preamble, defintval:6, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1, defstrval:"DELTAF2", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1b, defstrval:"deltaF3", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2a, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2b, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, iptr:&ccparams.rach_numberOfRA_Preambles, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, strptr:&ccparams.rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, iptr:&ccparams.rach_sizeOfRA_PreamblesGroupA, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, iptr:&ccparams.rach_messageSizeGroupA, defintval:56, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, strptr:&ccparams.rach_messagePowerOffsetGroupB, defstrval:"minusinfinity", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, iptr:&ccparams.rach_powerRampingStep, defintval:4, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, iptr:&ccparams.rach_preambleInitialReceivedTargetPower, defintval:-100, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, iptr:&ccparams.rach_preambleTransMax, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, iptr:&ccparams.rach_raResponseWindowSize, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, iptr:&ccparams.rach_macContentionResolutionTimer, defintval:48, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, strptr:&ccparams.drx_Config_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, strptr:&ccparams.drx_onDurationTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, strptr:&ccparams.drx_InactivityTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, strptr:&ccparams.drx_RetransmissionTimer, defstrval:"psf8", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, strptr:&ccparams.drx_longDrx_CycleStartOffset_present, defstrval:"prSf128", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, iptr:&ccparams.drx_longDrx_CycleStartOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, strptr:&ccparams.drx_shortDrx_Cycle, defstrval:"sf32", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, iptr:&ccparams.drx_shortDrx_ShortCycleTimer, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t310, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ccparams.ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL, NULL, 0, strptr:&ccparams.mbms_dedicated_serving_cell, defstrval:"DISABLE", TYPE_STRING, 0} \
|
||||
}
|
||||
#define CCPARAMS_DESC(ccparams) { \
|
||||
{ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:&ccparams.frame_type, defstrval:"FDD", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:&ccparams.tdd_config, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_TDD_CONFIG_S, NULL, 0, iptr:&ccparams.tdd_config_s, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PREFIX_TYPE, NULL, 0, strptr:&ccparams.prefix_type, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PBCH_REPETITION, NULL, 0, strptr:&ccparams.pbch_repetition, defstrval:"FALSE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_EUTRA_BAND, NULL, 0, iptr:&ccparams.eutra_band, defintval:7, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, NULL, 0, i64ptr:(int64_t *)&ccparams.downlink_frequency, defint64val:2680000000, TYPE_UINT64, 0}, \
|
||||
{ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, NULL, 0, iptr:&ccparams.uplink_frequency_offset, defintval:-120000000, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NID_CELL, NULL, 0, iptr:&ccparams.Nid_cell, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_N_RB_DL, NULL, 0, iptr:&ccparams.N_RB_DL, defintval:25, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_CELL_MBSFN, NULL, 0, iptr:&ccparams.Nid_cell_mbsfn, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_NB_ANT_PORTS, NULL, 0, iptr:&ccparams.nb_antenna_ports, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ROOT, NULL, 0, iptr:&ccparams.prach_root, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_CONFIG_INDEX, NULL, 0, iptr:&ccparams.prach_config_index, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_HIGH_SPEED, NULL, 0, strptr:&ccparams.prach_high_speed, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_ZERO_CORRELATION, NULL, 0, iptr:&ccparams.prach_zero_correlation, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PRACH_FREQ_OFFSET, NULL, 0, iptr:&ccparams.prach_freq_offset, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTA_SHIFT, NULL, 0, iptr:&ccparams.pucch_delta_shift, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NRB_CQI, NULL, 0, iptr:&ccparams.pucch_nRB_CQI, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_NCS_AN, NULL, 0, iptr:&ccparams.pucch_nCS_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_N1_AN, NULL, 0, iptr:&ccparams.pucch_n1_AN, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_RS_EPRE, NULL, 0, iptr:&ccparams.pdsch_referenceSignalPower, defintval:-29, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PDSCH_PB, NULL, 0, iptr:&ccparams.pdsch_p_b, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_N_SB, NULL, 0, iptr:&ccparams.pusch_n_SB, defintval:1, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGMODE, NULL, 0, strptr:&ccparams.pusch_hoppingMode, defstrval:"interSubFrame", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_HOPPINGOFFSET, NULL, 0, iptr:&ccparams.pusch_hoppingOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ENABLE64QAM, NULL, 0, strptr:&ccparams.pusch_enable64QAM, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_groupHoppingEnabled, defstrval:"ENABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_GROUP_ASSIGNMENT, NULL, 0, iptr:&ccparams.pusch_groupAssignment, defintval:0, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_SEQUENCE_HOPPING_EN, NULL, 0, strptr:&ccparams.pusch_sequenceHoppingEnabled, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_NDMRS1, NULL, 0, iptr:&ccparams.pusch_nDMRS1, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_DURATION, NULL, 0, strptr:&ccparams.phich_duration, defstrval:"NORMAL", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PHICH_RESOURCE, NULL, 0, strptr:&ccparams.phich_resource, defstrval:"ONESIXTH", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ENABLE, NULL, 0, strptr:&ccparams.srs_enable, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_BANDWIDTH_CONFIG, NULL, 0, iptr:&ccparams.srs_BandwidthConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_SUBFRAME_CONFIG, NULL, 0, iptr:&ccparams.srs_SubframeConfig, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_ACKNACKST_CONFIG, NULL, 0, strptr:&ccparams.srs_ackNackST, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_SRS_MAXUPPTS, NULL, 0, strptr:&ccparams.srs_MaxUpPts, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pusch_p0_Nominal, defintval:-90, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUSCH_ALPHA, NULL, 0, strptr:&ccparams.pusch_alpha, defstrval:"AL1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_PO_NOMINAL, NULL, 0, iptr:&ccparams.pucch_p0_Nominal, defintval:-96, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_MSG3_DELTA_PREAMBLE, NULL, 0, iptr:&ccparams.msg3_delta_Preamble, defintval:6, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1, defstrval:"DELTAF2", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT1b, NULL, 0, strptr:&ccparams.pucch_deltaF_Format1b, defstrval:"deltaF3", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2A, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2a, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_PUCCH_DELTAF_FORMAT2B, NULL, 0, strptr:&ccparams.pucch_deltaF_Format2b, defstrval:"deltaF0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_NUM_RA_PREAMBLES, NULL, 0, iptr:&ccparams.rach_numberOfRA_Preambles, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLESGROUPACONFIG, NULL, 0, strptr:&ccparams.rach_preamblesGroupAConfig, defstrval:"DISABLE", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_SIZEOFRA_PREAMBLESGROUPA, NULL, 0, iptr:&ccparams.rach_sizeOfRA_PreamblesGroupA, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGESIZEGROUPA, NULL, 0, iptr:&ccparams.rach_messageSizeGroupA, defintval:56, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MESSAGEPOWEROFFSETGROUPB, NULL, 0, strptr:&ccparams.rach_messagePowerOffsetGroupB, defstrval:"minusinfinity", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP, NULL, 0, iptr:&ccparams.rach_powerRampingStep, defintval:4, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER, NULL, 0, iptr:&ccparams.rach_preambleInitialReceivedTargetPower, defintval:-100, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX, NULL, 0, iptr:&ccparams.rach_preambleTransMax, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE, NULL, 0, iptr:&ccparams.rach_raResponseWindowSize, defintval:10, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER, NULL, 0, iptr:&ccparams.rach_macContentionResolutionTimer, defintval:48, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_RACH_MAXHARQMSG3TX, NULL, 0, iptr:&ccparams.rach_maxHARQ_Msg3Tx, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE, NULL, 0, iptr:&ccparams.pcch_defaultPagingCycle, defintval:128, TYPE_INT, 0}, \
|
||||
{ENB_CONFIG_STRING_PCCH_NB, NULL, 0, strptr:&ccparams.pcch_nB, defstrval:"oneT", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_CONFIG_PRESENT, NULL, 0, strptr:&ccparams.drx_Config_present, defstrval:"prNothing", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_ONDURATIONTIMER, NULL, 0, strptr:&ccparams.drx_onDurationTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_INACTIVITYTIMER, NULL, 0, strptr:&ccparams.drx_InactivityTimer, defstrval:"psf10", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_RETRANSMISSIONTIMER, NULL, 0, strptr:&ccparams.drx_RetransmissionTimer, defstrval:"psf8", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET_PRESENT, NULL, 0, strptr:&ccparams.drx_longDrx_CycleStartOffset_present, defstrval:"prSf128", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_LONGDRX_CYCLESTARTOFFSET, NULL, 0, iptr:&ccparams.drx_longDrx_CycleStartOffset, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_CYCLE, NULL, 0, strptr:&ccparams.drx_shortDrx_Cycle, defstrval:"sf32", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DRX_SHORTDRX_SHORTCYCLETIMER, NULL, 0, iptr:&ccparams.drx_shortDrx_ShortCycleTimer, defintval:3, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF, NULL, 0, iptr:&ccparams.bcch_modificationPeriodCoeff, defintval:2, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T300, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t300, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T301, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t301, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t310, defintval:1000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_T311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_t311, defintval:10000, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N310, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n310, defintval:20, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UETIMERS_N311, NULL, 0, iptr:&ccparams.ue_TimersAndConstants_n311, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_TRANSMISSION_MODE, NULL, 0, iptr:&ccparams.ue_TransmissionMode, defintval:1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_UE_MULTIPLE_MAX, NULL, 0, iptr:&ccparams.ue_multiple_max, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_MBMS_DEDICATED_SERVING_CELL, NULL, 0, strptr:&ccparams.mbms_dedicated_serving_cell, defstrval:"DISABLE", TYPE_STRING, 0} \
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define ENB_CONFIG_FRAME_TYPE_IDX 0
|
||||
#define ENB_CONFIG_TDD_CONFIG_IDX 1
|
||||
#define ENB_CONFIG_TDD_CONFIG_S_IDX 2
|
||||
#define ENB_CONFIG_PREFIX_TYPE_IDX 3
|
||||
#define ENB_CONFIG_PBCH_REPETITION_IDX 4
|
||||
#define ENB_CONFIG_EUTRA_BAND_IDX 5
|
||||
#define ENB_CONFIG_DOWNLINK_FREQUENCY_IDX 6
|
||||
#define ENB_CONFIG_UPLINK_FREQUENCY_OFFSET_IDX 7
|
||||
#define ENB_CONFIG_NID_CELL_IDX 8
|
||||
#define ENB_CONFIG_N_RB_DL_IDX 9
|
||||
#define ENB_CONFIG_CELL_MBSFN_IDX 10
|
||||
#define ENB_CONFIG_NB_ANT_PORTS_IDX 11
|
||||
#define ENB_CONFIG_PRACH_ROOT_IDX 12
|
||||
#define ENB_CONFIG_PRACH_CONFIG_INDEX_IDX 13
|
||||
#define ENB_CONFIG_PRACH_HIGH_SPEED_IDX 14
|
||||
#define ENB_CONFIG_PRACH_ZERO_CORRELATION_IDX 15
|
||||
#define ENB_CONFIG_PRACH_FREQ_OFFSET_IDX 16
|
||||
#define ENB_CONFIG_PUCCH_DELTA_SHIFT_IDX 17
|
||||
#define ENB_CONFIG_PUCCH_NRB_CQI_IDX 18
|
||||
#define ENB_CONFIG_PUCCH_NCS_AN_IDX 19
|
||||
#define ENB_CONFIG_PUCCH_N1_AN_IDX 20
|
||||
#define ENB_CONFIG_PDSCH_RS_EPRE_IDX 21
|
||||
#define ENB_CONFIG_PDSCH_PB_IDX 22
|
||||
#define ENB_CONFIG_PUSCH_N_SB_IDX 23
|
||||
#define ENB_CONFIG_PUSCH_HOPPINGMODE_IDX 24
|
||||
#define ENB_CONFIG_PUSCH_HOPPINGOFFSET_IDX 25
|
||||
#define ENB_CONFIG_PUSCH_ENABLE64QAM_IDX 26
|
||||
#define ENB_CONFIG_PUSCH_GROUP_HOPPING_EN_IDX 27
|
||||
#define ENB_CONFIG_PUSCH_GROUP_ASSIGNMENT_IDX 28
|
||||
#define ENB_CONFIG_PUSCH_SEQUENCE_HOPPING_EN_IDX 29
|
||||
#define ENB_CONFIG_PUSCH_NDMRS1_IDX 30
|
||||
#define ENB_CONFIG_PHICH_DURATION_IDX 31
|
||||
#define ENB_CONFIG_PHICH_RESOURCE_IDX 32
|
||||
#define ENB_CONFIG_SRS_ENABLE_IDX 33
|
||||
#define ENB_CONFIG_SRS_BANDWIDTH_CONFIG_IDX 34
|
||||
#define ENB_CONFIG_SRS_SUBFRAME_CONFIG_IDX 35
|
||||
#define ENB_CONFIG_SRS_ACKNACKST_CONFIG_IDX 36
|
||||
#define ENB_CONFIG_SRS_MAXUPPTS_IDX 37
|
||||
#define ENB_CONFIG_PUSCH_PO_NOMINAL_IDX 38
|
||||
#define ENB_CONFIG_PUSCH_ALPHA_IDX 39
|
||||
#define ENB_CONFIG_PUCCH_PO_NOMINAL_IDX 40
|
||||
#define ENB_CONFIG_MSG3_DELTA_PREAMBLE_IDX 41
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1_IDX 42
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1b_IDX 43
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2_IDX 44
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2A_IDX 45
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2B_IDX 46
|
||||
#define ENB_CONFIG_RACH_NUM_RA_PREAMBLES_IDX 47
|
||||
#define ENB_CONFIG_RACH_PREAMBLESGROUPACONFIG_IDX 48
|
||||
#define ENB_CONFIG_RACH_SIZEOFRA_PREAMBLESGROUPA_IDX 49
|
||||
#define ENB_CONFIG_RACH_MESSAGESIZEGROUPA_IDX 50
|
||||
#define ENB_CONFIG_RACH_MESSAGEPOWEROFFSETGROUPB_IDX 51
|
||||
#define ENB_CONFIG_RACH_POWERRAMPINGSTEP_IDX 52
|
||||
#define ENB_CONFIG_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_IDX 53
|
||||
#define ENB_CONFIG_RACH_PREAMBLETRANSMAX_IDX 54
|
||||
#define ENB_CONFIG_RACH_RARESPONSEWINDOWSIZE_IDX 55
|
||||
#define ENB_CONFIG_RACH_MACCONTENTIONRESOLUTIONTIMER_IDX 56
|
||||
#define ENB_CONFIG_RACH_MAXHARQMSG3TX_IDX 57
|
||||
#define ENB_CONFIG_PCCH_DEFAULT_PAGING_CYCLE_IDX 58
|
||||
#define ENB_CONFIG_PCCH_NB_IDX 59
|
||||
#define ENB_CONFIG_FRAME_TYPE_IDX 0
|
||||
#define ENB_CONFIG_TDD_CONFIG_IDX 1
|
||||
#define ENB_CONFIG_TDD_CONFIG_S_IDX 2
|
||||
#define ENB_CONFIG_PREFIX_TYPE_IDX 3
|
||||
#define ENB_CONFIG_PBCH_REPETITION_IDX 4
|
||||
#define ENB_CONFIG_EUTRA_BAND_IDX 5
|
||||
#define ENB_CONFIG_DOWNLINK_FREQUENCY_IDX 6
|
||||
#define ENB_CONFIG_UPLINK_FREQUENCY_OFFSET_IDX 7
|
||||
#define ENB_CONFIG_NID_CELL_IDX 8
|
||||
#define ENB_CONFIG_N_RB_DL_IDX 9
|
||||
#define ENB_CONFIG_CELL_MBSFN_IDX 10
|
||||
#define ENB_CONFIG_NB_ANT_PORTS_IDX 11
|
||||
#define ENB_CONFIG_PRACH_ROOT_IDX 12
|
||||
#define ENB_CONFIG_PRACH_CONFIG_INDEX_IDX 13
|
||||
#define ENB_CONFIG_PRACH_HIGH_SPEED_IDX 14
|
||||
#define ENB_CONFIG_PRACH_ZERO_CORRELATION_IDX 15
|
||||
#define ENB_CONFIG_PRACH_FREQ_OFFSET_IDX 16
|
||||
#define ENB_CONFIG_PUCCH_DELTA_SHIFT_IDX 17
|
||||
#define ENB_CONFIG_PUCCH_NRB_CQI_IDX 18
|
||||
#define ENB_CONFIG_PUCCH_NCS_AN_IDX 19
|
||||
#define ENB_CONFIG_PUCCH_N1_AN_IDX 20
|
||||
#define ENB_CONFIG_PDSCH_RS_EPRE_IDX 21
|
||||
#define ENB_CONFIG_PDSCH_PB_IDX 22
|
||||
#define ENB_CONFIG_PUSCH_N_SB_IDX 23
|
||||
#define ENB_CONFIG_PUSCH_HOPPINGMODE_IDX 24
|
||||
#define ENB_CONFIG_PUSCH_HOPPINGOFFSET_IDX 25
|
||||
#define ENB_CONFIG_PUSCH_ENABLE64QAM_IDX 26
|
||||
#define ENB_CONFIG_PUSCH_GROUP_HOPPING_EN_IDX 27
|
||||
#define ENB_CONFIG_PUSCH_GROUP_ASSIGNMENT_IDX 28
|
||||
#define ENB_CONFIG_PUSCH_SEQUENCE_HOPPING_EN_IDX 29
|
||||
#define ENB_CONFIG_PUSCH_NDMRS1_IDX 30
|
||||
#define ENB_CONFIG_PHICH_DURATION_IDX 31
|
||||
#define ENB_CONFIG_PHICH_RESOURCE_IDX 32
|
||||
#define ENB_CONFIG_SRS_ENABLE_IDX 33
|
||||
#define ENB_CONFIG_SRS_BANDWIDTH_CONFIG_IDX 34
|
||||
#define ENB_CONFIG_SRS_SUBFRAME_CONFIG_IDX 35
|
||||
#define ENB_CONFIG_SRS_ACKNACKST_CONFIG_IDX 36
|
||||
#define ENB_CONFIG_SRS_MAXUPPTS_IDX 37
|
||||
#define ENB_CONFIG_PUSCH_PO_NOMINAL_IDX 38
|
||||
#define ENB_CONFIG_PUSCH_ALPHA_IDX 39
|
||||
#define ENB_CONFIG_PUCCH_PO_NOMINAL_IDX 40
|
||||
#define ENB_CONFIG_MSG3_DELTA_PREAMBLE_IDX 41
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1_IDX 42
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT1b_IDX 43
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2_IDX 44
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2A_IDX 45
|
||||
#define ENB_CONFIG_PUCCH_DELTAF_FORMAT2B_IDX 46
|
||||
#define ENB_CONFIG_RACH_NUM_RA_PREAMBLES_IDX 47
|
||||
#define ENB_CONFIG_RACH_PREAMBLESGROUPACONFIG_IDX 48
|
||||
#define ENB_CONFIG_RACH_SIZEOFRA_PREAMBLESGROUPA_IDX 49
|
||||
#define ENB_CONFIG_RACH_MESSAGESIZEGROUPA_IDX 50
|
||||
#define ENB_CONFIG_RACH_MESSAGEPOWEROFFSETGROUPB_IDX 51
|
||||
#define ENB_CONFIG_RACH_POWERRAMPINGSTEP_IDX 52
|
||||
#define ENB_CONFIG_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_IDX 53
|
||||
#define ENB_CONFIG_RACH_PREAMBLETRANSMAX_IDX 54
|
||||
#define ENB_CONFIG_RACH_RARESPONSEWINDOWSIZE_IDX 55
|
||||
#define ENB_CONFIG_RACH_MACCONTENTIONRESOLUTIONTIMER_IDX 56
|
||||
#define ENB_CONFIG_RACH_MAXHARQMSG3TX_IDX 57
|
||||
#define ENB_CONFIG_PCCH_DEFAULT_PAGING_CYCLE_IDX 58
|
||||
#define ENB_CONFIG_PCCH_NB_IDX 59
|
||||
#define ENB_CONFIG_STRING_DRX_CONFIG_PRESENT_IDX 60
|
||||
#define ENB_CONFIG_STRING_DRX_ONDURATIONTIMER_IDX 61
|
||||
#define ENB_CONFIG_STRING_DRX_INACTIVITYTIMER_IDX 62
|
||||
@@ -819,7 +818,7 @@ typedef struct ccparams_lte_s {
|
||||
#define ENB_CONFIG_UETIMERS_N310_IDX 73
|
||||
#define ENB_CONFIG_UETIMERS_N311_IDX 74
|
||||
#define ENB_CONFIG_UE_TRANSMISSION_MODE_IDX 75
|
||||
#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX 76
|
||||
#define ENB_CONFIG_MBMS_DEDICATED_SERVING_CELL_IDX 76
|
||||
|
||||
/*------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* SRB1 configuration parameters section name */
|
||||
@@ -846,14 +845,14 @@ typedef struct srb1_params_s {
|
||||
int32_t srb1_max_retx_threshold;
|
||||
} srb1_params_t;
|
||||
|
||||
#define SRB1PARAMS_DESC(srb1_params) { \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT, NULL, 0, iptr:&srb1_params.srb1_timer_poll_retransmit, defintval:80, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_REORDERING, NULL, 0, iptr:&srb1_params.srb1_timer_reordering, defintval:35, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT, NULL, 0, iptr:&srb1_params.srb1_timer_status_prohibit, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_POLL_PDU, NULL, 0, iptr:&srb1_params.srb1_poll_pdu, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_POLL_BYTE, NULL, 0, iptr:&srb1_params.srb1_poll_byte, defintval:99999, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD, NULL, 0, iptr:&srb1_params.srb1_max_retx_threshold, defintval:4, TYPE_UINT, 0} \
|
||||
}
|
||||
#define SRB1PARAMS_DESC(srb1_params) { \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_POLL_RETRANSMIT, NULL, 0, iptr:&srb1_params.srb1_timer_poll_retransmit, defintval:80, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_REORDERING, NULL, 0, iptr:&srb1_params.srb1_timer_reordering, defintval:35, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_TIMER_STATUS_PROHIBIT, NULL, 0, iptr:&srb1_params.srb1_timer_status_prohibit, defintval:0, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_POLL_PDU, NULL, 0, iptr:&srb1_params.srb1_poll_pdu, defintval:4, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_POLL_BYTE, NULL, 0, iptr:&srb1_params.srb1_poll_byte, defintval:99999, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SRB1_MAX_RETX_THRESHOLD, NULL, 0, iptr:&srb1_params.srb1_max_retx_threshold, defintval:4, TYPE_UINT, 0} \
|
||||
}
|
||||
|
||||
/* MME configuration parameters section name */
|
||||
#define ENB_CONFIG_STRING_MME_IP_ADDRESS "mme_ip_address"
|
||||
@@ -871,12 +870,12 @@ typedef struct srb1_params_s {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define S1PARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_MME_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL,TYPE_UINTARRAY, 6} \
|
||||
}
|
||||
{ENB_CONFIG_STRING_MME_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_ACTIVE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_MME_BROADCAST_PLMN_INDEX, NULL, 0, uptr:NULL, defintarrayval:NULL,TYPE_UINTARRAY, 6} \
|
||||
}
|
||||
|
||||
#define ENB_MME_IPV4_ADDRESS_IDX 0
|
||||
#define ENB_MME_IPV6_ADDRESS_IDX 1
|
||||
@@ -901,10 +900,10 @@ typedef struct srb1_params_s {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define X2PARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV4_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IPV6_ADDRESS, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_TARGET_ENB_X2_IP_ADDRESS_PREFERENCE, NULL, 0, uptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define ENB_X2_IPV4_ADDRESS_IDX 0
|
||||
#define ENB_X2_IPV6_ADDRESS_IDX 1
|
||||
@@ -924,9 +923,9 @@ typedef struct srb1_params_s {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define SCTPPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_SCTP_INSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SCTP_OUTSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0} \
|
||||
}
|
||||
{ENB_CONFIG_STRING_SCTP_INSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_SCTP_OUTSTREAMS, NULL, 0, uptr:NULL, defintval:-1, TYPE_UINT, 0} \
|
||||
}
|
||||
|
||||
#define ENB_SCTP_INSTREAMS_IDX 0
|
||||
#define ENB_SCTP_OUTSTREAMS_IDX 1
|
||||
@@ -940,8 +939,8 @@ typedef struct srb1_params_s {
|
||||
#define ENB_INTERFACE_NAME_FOR_S1U_IDX 2
|
||||
#define ENB_IPV4_ADDR_FOR_S1U_IDX 3
|
||||
#define ENB_PORT_FOR_S1U_IDX 4
|
||||
#define ENB_IPV4_ADDR_FOR_X2C_IDX 5
|
||||
#define ENB_PORT_FOR_X2C_IDX 6
|
||||
#define ENB_IPV4_ADDR_FOR_X2C_IDX 5
|
||||
#define ENB_PORT_FOR_X2C_IDX 6
|
||||
|
||||
/* S1 interface configuration parameters names */
|
||||
#define ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME "ENB_INTERFACE_NAME_FOR_S1_MME"
|
||||
@@ -959,14 +958,14 @@ typedef struct srb1_params_s {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define NETPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDRESS_FOR_S1_MME, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:NULL, defintval:2152L, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_X2C, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_X2C, NULL, 0, uptr:NULL, defintval:0L, TYPE_UINT, 0}, \
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -975,10 +974,10 @@ typedef struct srb1_params_s {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define GTPUPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:&enb_interface_name_for_S1U, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:&enb_ipv4_address_for_S1U, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:&enb_port_for_S1U, defintval:2152, TYPE_UINT, 0} \
|
||||
}
|
||||
{ENB_CONFIG_STRING_ENB_INTERFACE_NAME_FOR_S1U, NULL, 0, strptr:&enb_interface_name_for_S1U, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_IPV4_ADDR_FOR_S1U, NULL, 0, strptr:&enb_ipv4_address_for_S1U, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_ENB_PORT_FOR_S1U, NULL, 0, uptr:&enb_port_for_S1U, defintval:2152, TYPE_UINT, 0} \
|
||||
}
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -1008,65 +1007,65 @@ typedef struct srb1_params_s {
|
||||
#define FLEXRAN_AWAIT_RECONF_IDX 5
|
||||
|
||||
#define FLEXRANPARAMS_DESC { \
|
||||
{CONFIG_STRING_FLEXRAN_ENABLED, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_INTERFACE_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_IPV4_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_PORT, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_CACHE, NULL, 0, strptr:NULL, defstrval:"/mnt/oai_agent_cache", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_AWAIT_RECONF, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0} \
|
||||
}
|
||||
{CONFIG_STRING_FLEXRAN_ENABLED, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_INTERFACE_NAME, NULL, 0, strptr:NULL, defstrval:"lo", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_IPV4_ADDRESS, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_PORT, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_CACHE, NULL, 0, strptr:NULL, defstrval:"/mnt/oai_agent_cache", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_FLEXRAN_AWAIT_RECONF, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0} \
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* CU/DU configuration section names*/
|
||||
#define CONFIG_STRING_DU_LIST "DU"
|
||||
#define CONFIG_STRING_CU_LIST "CU"
|
||||
#define DU_TYPE_LTE 0
|
||||
#define DU_TYPE_WIFI 1
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACES_CONFIG "CU_INTERFACES"
|
||||
#define CONFIG_STRING_DU_LIST "DU"
|
||||
#define CONFIG_STRING_CU_LIST "CU"
|
||||
#define DU_TYPE_LTE 0
|
||||
#define DU_TYPE_WIFI 1
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACES_CONFIG "CU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U "CU_INTERFACE_NAME_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U "CU_IPV4_ADDRESS_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_CU_PORT_FOR_F1U "CU_PORT_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_TYPE "DU_TYPE"
|
||||
#define ENB_CONFIG_STRING_DU_TYPE "DU_TYPE"
|
||||
#define ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE "F1_U_CU_TRANSPORT_TYPE"
|
||||
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACES_CONFIG "DU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACES_CONFIG "DU_INTERFACES"
|
||||
#define ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U "DU_INTERFACE_NAME_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U "DU_IPV4_ADDRESS_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_DU_PORT_FOR_F1U "DU_PORT_FOR_F1U"
|
||||
#define ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE "F1_U_DU_TRANSPORT_TYPE"
|
||||
|
||||
#define CONFIG_STRING_CU_BALANCING "CU_BALANCING"
|
||||
#define CONFIG_STRING_CU_BALANCING "CU_BALANCING"
|
||||
|
||||
#define CUPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_TYPE, NULL, 0, strptr:NULL, defstrval:"LTE", TYPE_STRING, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_CU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_CU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_CU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_TYPE, NULL, 0, strptr:NULL, defstrval:"LTE", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define DUPARAMS_DESC { \
|
||||
{ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
}
|
||||
{ENB_CONFIG_STRING_DU_INTERFACE_NAME_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"eth0", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_IPV4_ADDRESS_FOR_F1U, NULL, 0, strptr:NULL, defstrval:"127.0.0.1", TYPE_STRING, 0}, \
|
||||
{ENB_CONFIG_STRING_DU_PORT_FOR_F1U, NULL, 0, uptr:NULL, defintval:2210, TYPE_UINT, 0}, \
|
||||
{ENB_CONFIG_STRING_F1_U_DU_TRANSPORT_TYPE, NULL, 0, strptr:NULL, defstrval:"TCP", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define CU_BAL_DESC { \
|
||||
{CONFIG_STRING_CU_BALANCING, NULL, 0, strptr:NULL, defstrval:"ALL", TYPE_STRING, 0}, \
|
||||
}
|
||||
{CONFIG_STRING_CU_BALANCING, NULL, 0, strptr:NULL, defstrval:"ALL", TYPE_STRING, 0}, \
|
||||
}
|
||||
|
||||
#define CU_INTERFACE_F1U 0
|
||||
#define CU_ADDRESS_F1U 1
|
||||
#define CU_PORT_F1U 2
|
||||
#define CU_TYPE_F1U 3
|
||||
#define CU_INTERFACE_F1U 0
|
||||
#define CU_ADDRESS_F1U 1
|
||||
#define CU_PORT_F1U 2
|
||||
#define CU_TYPE_F1U 3
|
||||
|
||||
#define DU_INTERFACE_F1U 0
|
||||
#define DU_ADDRESS_F1U 1
|
||||
#define DU_PORT_F1U 2
|
||||
#define DU_TYPE_F1U 3
|
||||
#define DU_TECH 4
|
||||
#define DU_INTERFACE_F1U 0
|
||||
#define DU_ADDRESS_F1U 1
|
||||
#define DU_PORT_F1U 2
|
||||
#define DU_TYPE_F1U 3
|
||||
#define DU_TECH 4
|
||||
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -1133,9 +1132,9 @@ typedef struct srb1_params_s {
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
#define THREAD_CONF_DESC { \
|
||||
{THREAD_CONFIG_STRING_PARALLEL, CONFIG_HLP_PARALLEL, 0, strptr:NULL, defstrval:"PARALLEL_RU_L1_TRX_SPLIT", TYPE_STRING, 0}, \
|
||||
{THREAD_CONFIG_STRING_WORKER, CONFIG_HLP_WORKER, 0, strptr:NULL, defstrval:"WORKER_ENABLE", TYPE_STRING, 0} \
|
||||
}
|
||||
{THREAD_CONFIG_STRING_PARALLEL, CONFIG_HLP_PARALLEL, 0, strptr:NULL, defstrval:"PARALLEL_RU_L1_TRX_SPLIT", TYPE_STRING, 0}, \
|
||||
{THREAD_CONFIG_STRING_WORKER, CONFIG_HLP_WORKER, 0, strptr:NULL, defstrval:"WORKER_ENABLE", TYPE_STRING, 0} \
|
||||
}
|
||||
|
||||
|
||||
#define CONFIG_HLP_WORKER "coding and FEP worker thread WORKER_DISABLE or WORKER_ENABLE\n"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2030,17 +2030,9 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
}
|
||||
|
||||
if (strcmp(RateMatchPattern_mode , "dynamic") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__dummy_dynamic;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__mode_dynamic;
|
||||
#endif
|
||||
}else if (strcmp(RateMatchPattern_mode , "semiStatic") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__dummy_semiStatic;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPattern_mode[j] = NR_RateMatchPattern__mode_semiStatic;
|
||||
#endif
|
||||
}else {
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPattern_mode !\n",
|
||||
RC.config_file_name, i, RateMatchPattern_mode);
|
||||
@@ -2498,86 +2490,41 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
|
||||
switch(Common_dci_Format2_3_monitoringPeriodicity){
|
||||
case 1:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl1;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n1;
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl2;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n2;
|
||||
#endif
|
||||
break;
|
||||
case 4:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl4;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n4;
|
||||
#endif
|
||||
break;
|
||||
case 5:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl5;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n5;
|
||||
#endif
|
||||
break;
|
||||
case 8:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl8;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n8;
|
||||
#endif
|
||||
break;
|
||||
case 10:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl10;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n10;
|
||||
#endif
|
||||
break;
|
||||
case 16:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl16;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n16;
|
||||
#endif
|
||||
break;
|
||||
case 20:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy1_sl20;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_monitoringPeriodicity[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__monitoringPeriodicity_n20;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_dummy1 choice: 1,2,4,5,8,10,16,20 !\n",
|
||||
RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity);
|
||||
#else
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_monitoringPeriodicity choice: 1,2,4,5,8,10,16,20 !\n",
|
||||
RC.config_file_name, i, Common_dci_Format2_3_monitoringPeriodicity);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
switch(Common_dci_Format2_3_nrofPDCCH_Candidates){
|
||||
case 1:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n1;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n1;
|
||||
#endif
|
||||
break;
|
||||
case 2:
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__dummy2_n2;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).Common_dci_Format2_3_nrofPDCCH_Candidates[j] = NR_SearchSpace__searchSpaceType__common__dci_Format2_3__nrofPDCCH_Candidates_n2;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for Common_dci_Format2_3_nrofPDCCH_Candidates choice: 1,2 !\n",
|
||||
@@ -2701,17 +2648,9 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
|
||||
}
|
||||
|
||||
if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "oneFrame") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_oneFrame;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_oneFrame;
|
||||
#endif
|
||||
}else if (strcmp(RateMatchPatternLTE_CRS_subframeAllocation_choice , "fourFrames") == 0){
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation1_PR_fourFrames;
|
||||
#else
|
||||
NRRRC_CONFIGURATION_REQ (msg_p).RateMatchPatternLTE_CRS_subframeAllocation_choice[j] = NR_EUTRA_MBSFN_SubframeConfig__subframeAllocation_PR_fourFrames;
|
||||
#endif
|
||||
}else {
|
||||
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%s\" for RateMatchPatternLTE_CRS_subframeAllocation_choice !\n",
|
||||
RC.config_file_name, i, RateMatchPatternLTE_CRS_subframeAllocation_choice);
|
||||
|
||||
+149
-138
@@ -33,9 +33,7 @@
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
//#include "RadioResourceConfigCommonSIB.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "LTE_PRACH-ConfigSIB-v1310.h"
|
||||
#endif
|
||||
#include "LTE_PRACH-ConfigSIB-v1310.h"
|
||||
#include "LTE_MeasGapConfig.h"
|
||||
#include "LTE_MeasObjectToAddModList.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
@@ -142,7 +140,6 @@ uint32_t to_earfcn(int eutra_bandP, uint32_t dl_CarrierFreq, uint32_t bw) {
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
|
||||
|
||||
AssertFatal(dl_CarrierFreq_by_100k >= eutra_bandtable[i].dl_min,
|
||||
"Band %d, bw %u : DL carrier frequency %u Hz < %u\n",
|
||||
eutra_bandP, bw, dl_CarrierFreq,
|
||||
@@ -207,20 +204,17 @@ uint32_t from_earfcn(int eutra_bandP, uint32_t dl_earfcn) {
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
|
||||
|
||||
return (eutra_bandtable[i].dl_min +
|
||||
(dl_earfcn - (eutra_bandtable[i].N_OFFs_DL / 10))) * 100000;
|
||||
}
|
||||
|
||||
|
||||
int32_t get_uldl_offset(int eutra_bandP)
|
||||
{
|
||||
int32_t get_uldl_offset(int eutra_bandP) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < BANDTABLE_SIZE && eutra_bandtable[i].band != eutra_bandP; i++);
|
||||
|
||||
AssertFatal(i < BANDTABLE_SIZE, "i %d >= BANDTABLE_SIZE %ld\n", i, BANDTABLE_SIZE);
|
||||
|
||||
return (eutra_bandtable[i].dl_min - eutra_bandtable[i].ul_min);
|
||||
}
|
||||
|
||||
@@ -235,11 +229,8 @@ void config_mib(int Mod_idP,
|
||||
int NcpP,
|
||||
int p_eNBP,
|
||||
uint32_t dl_CarrierFreqP,
|
||||
uint32_t ul_CarrierFreqP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint32_t pbch_repetitionP
|
||||
#endif
|
||||
uint32_t ul_CarrierFreqP,
|
||||
uint32_t pbch_repetitionP
|
||||
) {
|
||||
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
|
||||
cfg->num_tlv=0;
|
||||
@@ -290,16 +281,12 @@ void config_mib(int Mod_idP,
|
||||
cfg->sch_config.physical_cell_id.value = Nid_cellP;
|
||||
cfg->sch_config.physical_cell_id.tl.tag = NFAPI_SCH_CONFIG_PHYSICAL_CELL_ID_TAG;
|
||||
cfg->num_tlv++;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
cfg->emtc_config.pbch_repetitions_enable_r13.value = pbch_repetitionP;
|
||||
cfg->emtc_config.pbch_repetitions_enable_r13.tl.tag = NFAPI_EMTC_CONFIG_PBCH_REPETITIONS_ENABLE_R13_TAG;
|
||||
cfg->num_tlv++;
|
||||
#endif
|
||||
LOG_I(MAC,
|
||||
"%s() NFAPI_CONFIG_REQUEST(num_tlv:%u) DL_BW:%u UL_BW:%u Ncp %d,p_eNB %d,earfcn %d,band %d,phich_resource %u phich_duration %u phich_power_offset %u PSS %d SSS %d PCI %d"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
" PBCH repetition %d"
|
||||
#endif
|
||||
"\n"
|
||||
,__FUNCTION__
|
||||
,cfg->num_tlv
|
||||
@@ -314,9 +301,7 @@ void config_mib(int Mod_idP,
|
||||
,cfg->sch_config.primary_synchronization_signal_epre_eprers.value
|
||||
,cfg->sch_config.secondary_synchronization_signal_epre_eprers.value
|
||||
,cfg->sch_config.physical_cell_id.value
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,cfg->emtc_config.pbch_repetitions_enable_r13.value
|
||||
#endif
|
||||
);
|
||||
}
|
||||
|
||||
@@ -347,9 +332,7 @@ void
|
||||
config_sib2(int Mod_idP,
|
||||
int CC_idP,
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommonP,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BRP,
|
||||
#endif
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BRP,
|
||||
LTE_ARFCN_ValueEUTRA_t *ul_CArrierFreqP,
|
||||
long *ul_BandwidthP,
|
||||
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmissionP,
|
||||
@@ -440,8 +423,6 @@ config_sib2(int Mod_idP,
|
||||
cfg->num_tlv++;
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.schedulingInfoSIB1_BR_r13 > 0) {
|
||||
AssertFatal(radioResourceConfigCommon_BRP != NULL, "radioResource rou is missing\n");
|
||||
AssertFatal(radioResourceConfigCommon_BRP->ext4 != NULL, "ext4 is missing\n");
|
||||
@@ -627,8 +608,6 @@ config_sib2(int Mod_idP,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@@ -650,23 +629,15 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
int physCellId,
|
||||
int p_eNB,
|
||||
int Ncp, int eutra_band, uint32_t dl_CarrierFreq,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int pbch_repetition,
|
||||
#endif
|
||||
int pbch_repetition,
|
||||
rnti_t rntiP,
|
||||
LTE_BCCH_BCH_Message_t *mib,
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon_BR,
|
||||
#endif
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR,
|
||||
struct LTE_PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
//struct LTE_PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
LTE_MeasObjectToAddMod_t **measObj,
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
@@ -680,28 +651,18 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
LTE_AdditionalSpectrumEmission_t *
|
||||
additionalSpectrumEmission,
|
||||
struct LTE_MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, uint8_t MBMS_Flag,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t *pmch_InfoList
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
,
|
||||
LTE_SystemInformationBlockType1_v1310_IEs_t *
|
||||
sib1_v13ext
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint8_t FeMBMS_Flag,
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t * mib_fembms,
|
||||
LTE_SchedulingInfo_MBMS_r14_t * schedulingInfo_fembms,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t * sib1_mbms_r14_fembms,
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
|
||||
#endif
|
||||
) {
|
||||
|
||||
*mbsfn_SubframeConfigList,
|
||||
uint8_t MBMS_Flag,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t *pmch_InfoList,
|
||||
LTE_SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext,
|
||||
uint8_t FeMBMS_Flag,
|
||||
LTE_BCCH_DL_SCH_Message_MBMS_t *mib_fembms,
|
||||
LTE_SchedulingInfo_MBMS_r14_t *schedulingInfo_fembms,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig,
|
||||
LTE_SystemInformationBlockType1_MBMS_r14_t *sib1_mbms_r14_fembms,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms
|
||||
) {
|
||||
int i;
|
||||
int UE_id = -1;
|
||||
eNB_MAC_INST *eNB = RC.mac[Mod_idP];
|
||||
@@ -739,10 +700,8 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
Ncp,
|
||||
p_eNB,
|
||||
dl_CarrierFreq,
|
||||
ul_CarrierFreq
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, pbch_repetition
|
||||
#endif
|
||||
ul_CarrierFreq,
|
||||
pbch_repetition
|
||||
);
|
||||
mac_init_cell_params(Mod_idP,CC_idP);
|
||||
|
||||
@@ -752,20 +711,16 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
config_sib1(Mod_idP,CC_idP,tdd_Config);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) //TODO MBMS this must be passed through function
|
||||
//TODO MBMS this must be passed through function
|
||||
/*if (schedulingInfoList_MBMS!=NULL) {
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList_MBMS = schedulingInfoList_MBMS;
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].schedulingInfoList_MBMS = schedulingInfoList_MBMS;
|
||||
config_sib1_mbms(Mod_idP,CC_idP,tdd_Config);
|
||||
}*/
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
if (sib1_v13ext != NULL) {
|
||||
RC.mac[Mod_idP]->common_channels[CC_idP].sib1_v13ext = sib1_v13ext;
|
||||
}
|
||||
|
||||
#endif
|
||||
AssertFatal(radioResourceConfigCommon != NULL, "radioResourceConfigCommon is null\n");
|
||||
LOG_I(MAC, "[CONFIG]SIB2/3 Contents (partial)\n");
|
||||
LOG_I(MAC, "[CONFIG]pusch_config_common.n_SB = %ld\n",
|
||||
@@ -796,20 +751,15 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
else RC.mac[Mod_idP]->common_channels[CC_idP].ul_Bandwidth = RC.mac[Mod_idP]->common_channels[CC_idP].mib->message.dl_Bandwidth;
|
||||
|
||||
config_sib2(Mod_idP, CC_idP, radioResourceConfigCommon,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
radioResourceConfigCommon_BR,
|
||||
#endif
|
||||
NULL, ul_Bandwidth, additionalSpectrumEmission,
|
||||
mbsfn_SubframeConfigList);
|
||||
} // mib != NULL
|
||||
|
||||
if (mobilityControlInfo !=NULL) {
|
||||
if ((UE_id = add_new_ue(Mod_idP, CC_idP,
|
||||
rntiP, -1
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
rntiP, -1,
|
||||
0
|
||||
#endif
|
||||
)) == -1) {
|
||||
LOG_E(MAC, "%s:%d: fatal\n", __FILE__, __LINE__);
|
||||
abort();
|
||||
@@ -843,8 +793,6 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
LOG_I(MAC,"Added physicalConfigDedicated %p for %d.%d\n",physicalConfigDedicated,CC_idP,UE_id);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (sCellToAddMod_r10 != NULL) {
|
||||
if (UE_id<0) {
|
||||
LOG_E(MAC,"Configuration received for unknown UE (%x), shouldn't happen\n",rntiP);
|
||||
@@ -855,8 +803,6 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
config_dedicated_scell(Mod_idP, rntiP, sCellToAddMod_r10);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (mbsfn_SubframeConfigList != NULL) {
|
||||
LOG_I(MAC,
|
||||
"[eNB %d][CONFIG] Received %d subframe allocation pattern for MBSFN\n",
|
||||
@@ -873,45 +819,32 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
subframeAllocation.choice.oneFrame.buf[0]);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
RC.mac[Mod_idP]->common_channels[0].MBMS_flag = MBMS_Flag;
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (nonMBSFN_SubframeConfig != NULL){
|
||||
LOG_D(MAC,
|
||||
if (nonMBSFN_SubframeConfig != NULL) {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][CONFIG] Received a non MBSFN subframe allocation pattern (%x,%x):%x for FeMBMS-CAS\n",
|
||||
Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 );
|
||||
//RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
|
||||
RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig;
|
||||
|
||||
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
|
||||
cfg->fembms_config.non_mbsfn_config_flag.value = 1;
|
||||
cfg->fembms_config.non_mbsfn_config_flag.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
cfg->fembms_config.non_mbsfn_subframeconfig.value = (nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
|
||||
cfg->fembms_config.non_mbsfn_subframeconfig.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_SUBFRAMECONFIG_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
cfg->fembms_config.radioframe_allocation_period.value = nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
|
||||
cfg->fembms_config.radioframe_allocation_period.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
cfg->fembms_config.radioframe_allocation_offset.value = nonMBSFN_SubframeConfig->radioFrameAllocationOffset_r14;
|
||||
cfg->fembms_config.radioframe_allocation_offset.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG;
|
||||
cfg->num_tlv++;
|
||||
|
||||
|
||||
|
||||
//We need to reuse current MCH scheduler
|
||||
//TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff
|
||||
Mod_idP, nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0],nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1],
|
||||
nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7 );
|
||||
//RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1) | (int)(nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
|
||||
RC.mac[Mod_idP]->common_channels[0].non_mbsfn_SubframeConfig = nonMBSFN_SubframeConfig;
|
||||
nfapi_config_request_t *cfg = &RC.mac[Mod_idP]->config[CC_idP];
|
||||
cfg->fembms_config.non_mbsfn_config_flag.value = 1;
|
||||
cfg->fembms_config.non_mbsfn_config_flag.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_FLAG_TAG;
|
||||
cfg->num_tlv++;
|
||||
cfg->fembms_config.non_mbsfn_subframeconfig.value = (nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[0]<<1 | nonMBSFN_SubframeConfig->subframeAllocation_r14.buf[1]>>7);
|
||||
cfg->fembms_config.non_mbsfn_subframeconfig.tl.tag = NFAPI_FEMBMS_CONFIG_NON_MBSFN_SUBFRAMECONFIG_TAG;
|
||||
cfg->num_tlv++;
|
||||
cfg->fembms_config.radioframe_allocation_period.value = nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14;
|
||||
cfg->fembms_config.radioframe_allocation_period.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_PERIOD_TAG;
|
||||
cfg->num_tlv++;
|
||||
cfg->fembms_config.radioframe_allocation_offset.value = nonMBSFN_SubframeConfig->radioFrameAllocationOffset_r14;
|
||||
cfg->fembms_config.radioframe_allocation_offset.tl.tag = NFAPI_FEMBMS_CONFIG_RADIOFRAME_ALLOCATION_OFFSET_TAG;
|
||||
cfg->num_tlv++;
|
||||
//We need to reuse current MCH scheduler
|
||||
//TOCHECK whether we can simply reuse current mbsfn_SubframeConfig stuff
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
// One eNB could be part of multiple mbsfn syc area, this could change over time so reset each time
|
||||
@@ -955,7 +888,6 @@ int rrc_mac_config_req_eNB(module_id_t Mod_idP,
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
LOG_D(MAC, "%s() %s:%d RC.mac[Mod_idP]->if_inst->PHY_config_req:%p\n", __FUNCTION__, __FILE__, __LINE__, RC.mac[Mod_idP]->if_inst->PHY_config_req);
|
||||
|
||||
// if in nFAPI mode
|
||||
@@ -1000,17 +932,15 @@ void eNB_Config_Local_DRX(
|
||||
UE_list_t *UE_list_mac = NULL;
|
||||
int UE_id = -1;
|
||||
UE_sched_ctrl_t *UE_scheduling_control = NULL;
|
||||
|
||||
UE_list_mac = &(RC.mac[Mod_id]->UE_list);
|
||||
|
||||
UE_id = find_UE_id(Mod_id, rnti);
|
||||
|
||||
/* Check UE_id */
|
||||
if (UE_id == -1) {
|
||||
LOG_E(MAC, "%s:%d:%s: ERROR, UE_id == -1\n",
|
||||
__FILE__,
|
||||
__LINE__,
|
||||
__FUNCTION__);
|
||||
__FILE__,
|
||||
__LINE__,
|
||||
__FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1020,7 +950,6 @@ void eNB_Config_Local_DRX(
|
||||
/* Check drx_Configuration */
|
||||
if (drx_Configuration == NULL) {
|
||||
LOG_I(MAC, "drx_Configuration parameter is NULL, cannot configure local UE parameters\n");
|
||||
|
||||
UE_scheduling_control->cdrx_configured = FALSE;
|
||||
return;
|
||||
}
|
||||
@@ -1028,7 +957,6 @@ void eNB_Config_Local_DRX(
|
||||
/* Check if drx config present */
|
||||
if (drx_Configuration->present != LTE_DRX_Config_PR_setup) {
|
||||
LOG_I(MAC, "No drx_Configuration present, don't configure local UE parameters\n");
|
||||
|
||||
UE_scheduling_control->cdrx_configured = FALSE;
|
||||
return;
|
||||
}
|
||||
@@ -1038,133 +966,173 @@ void eNB_Config_Local_DRX(
|
||||
UE_scheduling_control->cdrx_waiting_ack = TRUE; // set to true first, waiting for the UE to configure CDRX on its side
|
||||
UE_scheduling_control->in_active_time = FALSE;
|
||||
UE_scheduling_control->dci0_ongoing_timer = 0;
|
||||
|
||||
UE_scheduling_control->on_duration_timer = 0;
|
||||
|
||||
switch (drx_Configuration->choice.setup.onDurationTimer) {
|
||||
case 0:
|
||||
UE_scheduling_control->on_duration_timer_thres = 1;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
UE_scheduling_control->on_duration_timer_thres = 2;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
UE_scheduling_control->on_duration_timer_thres = 3;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
UE_scheduling_control->on_duration_timer_thres = 4;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
UE_scheduling_control->on_duration_timer_thres = 5;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
UE_scheduling_control->on_duration_timer_thres = 6;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
UE_scheduling_control->on_duration_timer_thres = 8;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
UE_scheduling_control->on_duration_timer_thres = 10;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
UE_scheduling_control->on_duration_timer_thres = 20;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
UE_scheduling_control->on_duration_timer_thres = 30;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
UE_scheduling_control->on_duration_timer_thres = 40;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
UE_scheduling_control->on_duration_timer_thres = 50;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
UE_scheduling_control->on_duration_timer_thres = 60;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
UE_scheduling_control->on_duration_timer_thres = 80;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
UE_scheduling_control->on_duration_timer_thres = 100;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
UE_scheduling_control->on_duration_timer_thres = 200;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Error in local DRX configuration, the on duration timer value specified is unknown\n");
|
||||
break;
|
||||
}
|
||||
|
||||
UE_scheduling_control->drx_inactivity_timer = 0;
|
||||
|
||||
switch (drx_Configuration->choice.setup.drx_InactivityTimer) {
|
||||
case 0:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 1;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 2;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 3;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 4;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 5;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 6;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 8;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 10;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 20;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 30;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 40;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 50;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 60;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 80;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 100;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 200;
|
||||
break;
|
||||
|
||||
case 16:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 300;
|
||||
break;
|
||||
|
||||
case 17:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 500;
|
||||
break;
|
||||
|
||||
case 18:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 750;
|
||||
break;
|
||||
|
||||
case 19:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 1280;
|
||||
break;
|
||||
|
||||
case 20:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 1920;
|
||||
break;
|
||||
|
||||
case 21:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 2560;
|
||||
break;
|
||||
|
||||
case 22:
|
||||
UE_scheduling_control->drx_inactivity_timer_thres = 0;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Error in local DRX configuration, the drx inactivity timer value specified is unknown\n");
|
||||
break;
|
||||
@@ -1179,55 +1147,72 @@ void eNB_Config_Local_DRX(
|
||||
} else {
|
||||
UE_scheduling_control->in_short_drx_cycle = FALSE;
|
||||
UE_scheduling_control->drx_shortCycle_timer_value = (uint8_t) drx_Configuration->choice.setup.shortDRX->drxShortCycleTimer;
|
||||
|
||||
switch (drx_Configuration->choice.setup.shortDRX->shortDRX_Cycle) {
|
||||
case 0:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 2;
|
||||
break;
|
||||
|
||||
case 1:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 5;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 8;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 10;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 16;
|
||||
break;
|
||||
|
||||
case 5:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 20;
|
||||
break;
|
||||
|
||||
case 6:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 32;
|
||||
break;
|
||||
|
||||
case 7:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 40;
|
||||
break;
|
||||
|
||||
case 8:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 64;
|
||||
break;
|
||||
|
||||
case 9:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 80;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 128;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 160;
|
||||
break;
|
||||
|
||||
case 12:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 256;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 320;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 512;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
UE_scheduling_control->short_drx_cycle_duration = 640;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Error in local DRX configuration, the short drx timer value specified is unknown\n");
|
||||
break;
|
||||
@@ -1239,102 +1224,128 @@ void eNB_Config_Local_DRX(
|
||||
|
||||
UE_scheduling_control->in_long_drx_cycle = FALSE;
|
||||
UE_scheduling_control->drx_longCycle_timer = 0;
|
||||
|
||||
switch (drx_Configuration->choice.setup.longDRX_CycleStartOffset.present) {
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10:
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf10:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 10;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf10;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf20:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 20;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf20;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf32:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 32;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf32;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf40:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 40;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf40;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf64:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 64;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf64;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf80:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 80;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf80;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf128:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 128;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf128;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf160:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 160;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf160;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf256:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 256;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf256;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf320:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 320;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf320;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf512:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 512;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf512;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf640:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 640;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf640;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1024:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 1024;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf1024;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf1280:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 1280;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf1280;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2048:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 2048;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf2048;
|
||||
break;
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560:
|
||||
|
||||
case LTE_DRX_Config__setup__longDRX_CycleStartOffset_PR_sf2560:
|
||||
UE_scheduling_control->drx_longCycle_timer_thres = 2560;
|
||||
UE_scheduling_control->drx_start_offset = (uint16_t) drx_Configuration->choice.setup.longDRX_CycleStartOffset.choice.sf2560;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Invalid long_DRX value in DRX local configuration\n");
|
||||
break;
|
||||
}
|
||||
|
||||
memset(UE_scheduling_control->drx_retransmission_timer, 0, sizeof(UE_scheduling_control->drx_retransmission_timer));
|
||||
|
||||
switch (drx_Configuration->choice.setup.drx_RetransmissionTimer) {
|
||||
case 0:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 1, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 1:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 2, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 4, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 6, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 4:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 8, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 5:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 16, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 6:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 24, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
case 7:
|
||||
memset(UE_scheduling_control->drx_retransmission_timer_thres, 33, sizeof(UE_scheduling_control->drx_retransmission_timer_thres));
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "Error in local DRX configuration, the drx retransmission timer value specified is unknown\n");
|
||||
break;
|
||||
|
||||
@@ -38,9 +38,7 @@
|
||||
#include "SCHED_UE/sched_UE.h"
|
||||
#include "LTE_SystemInformationBlockType2.h"
|
||||
#include "LTE_RadioResourceConfigDedicated.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
#include "LTE_PRACH-ConfigSIB-v1310.h"
|
||||
#endif
|
||||
#include "LTE_PRACH-ConfigSIB-v1310.h"
|
||||
#include "LTE_MeasGapConfig.h"
|
||||
#include "LTE_MeasObjectToAddModList.h"
|
||||
#include "LTE_TDD-Config.h"
|
||||
@@ -53,12 +51,11 @@
|
||||
#include "PHY/INIT/phy_init.h"
|
||||
|
||||
#include "common/ran_context.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-AreaInfo-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
#include "LTE_MBSFN-AreaInfoList-r9.h"
|
||||
#include "LTE_MBSFN-AreaInfo-r9.h"
|
||||
#include "LTE_MBSFN-SubframeConfigList.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
|
||||
|
||||
extern void mac_init_cell_params(int Mod_idP,int CC_idP);
|
||||
extern void phy_reset_ue(module_id_t Mod_id,uint8_t CC_id,uint8_t eNB_index);
|
||||
@@ -96,14 +93,9 @@ int
|
||||
rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
int CC_idP,
|
||||
uint8_t eNB_index,
|
||||
LTE_RadioResourceConfigCommonSIB_t *
|
||||
radioResourceConfigCommon,
|
||||
struct LTE_PhysicalConfigDedicated
|
||||
*physicalConfigDedicated,
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
|
||||
#endif
|
||||
LTE_RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
|
||||
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated,
|
||||
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
|
||||
LTE_MeasObjectToAddMod_t **measObj,
|
||||
LTE_MAC_MainConfig_t *mac_MainConfig,
|
||||
long logicalChannelIdentity,
|
||||
@@ -115,32 +107,18 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
uint16_t *SIperiod,
|
||||
LTE_ARFCN_ValueEUTRA_t *ul_CarrierFreq,
|
||||
long *ul_Bandwidth,
|
||||
LTE_AdditionalSpectrumEmission_t *
|
||||
additionalSpectrumEmission,
|
||||
struct LTE_MBSFN_SubframeConfigList
|
||||
*mbsfn_SubframeConfigList
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
, uint8_t MBMS_Flag,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t *pmch_InfoList
|
||||
#endif
|
||||
#ifdef CBA
|
||||
, uint8_t num_active_cba_groups, uint16_t cba_rnti
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,config_action_t config_action
|
||||
,const uint32_t *const sourceL2Id
|
||||
,const uint32_t *const destinationL2Id
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,
|
||||
uint8_t FeMBMS_Flag,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 * nonMBSFN_SubframeConfig,
|
||||
LTE_MBSFN_AreaInfoList_r9_t * mbsfn_AreaInfoList_fembms
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
||||
LTE_AdditionalSpectrumEmission_t *additionalSpectrumEmission,
|
||||
struct LTE_MBSFN_SubframeConfigList *mbsfn_SubframeConfigList,
|
||||
uint8_t MBMS_Flag,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList,
|
||||
LTE_PMCH_InfoList_r9_t *pmch_InfoList,
|
||||
config_action_t config_action,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id,
|
||||
uint8_t FeMBMS_Flag,
|
||||
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig,
|
||||
LTE_MBSFN_AreaInfoList_r9_t *mbsfn_AreaInfoList_fembms
|
||||
) {
|
||||
int i;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
|
||||
@@ -212,14 +190,8 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
(uint16_t) *
|
||||
mac_MainConfig->ul_SCH_Config->periodicBSR_Timer;
|
||||
} else {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer =
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(12, 0, 0))
|
||||
(uint16_t)
|
||||
LTE_MAC_MainConfig__ul_SCH_Config__periodicBSR_Timer_infinity
|
||||
#else
|
||||
(uint16_t) LTE_PeriodicBSR_Timer_r12_infinity;
|
||||
#endif
|
||||
;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_Timer = (uint16_t) LTE_PeriodicBSR_Timer_r12_infinity;
|
||||
;
|
||||
}
|
||||
|
||||
if (mac_MainConfig->ul_SCH_Config->maxHARQ_Tx) {
|
||||
@@ -239,19 +211,10 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
(uint16_t) mac_MainConfig->ul_SCH_Config->
|
||||
retxBSR_Timer;
|
||||
} else {
|
||||
#if (LTE_RRC_VERSION < MAKE_VERSION(12, 0, 0))
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t)
|
||||
LTE_MAC_MainConfig__ul_SCH_Config__retxBSR_Timer_sf2560;
|
||||
#else
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer =
|
||||
(uint16_t) LTE_RetxBSR_Timer_r12_sf2560;
|
||||
#endif
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_Timer = (uint16_t) LTE_RetxBSR_Timer_r12_sf2560;
|
||||
}
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mac_MainConfig->ext1
|
||||
&& mac_MainConfig->ext1->sr_ProhibitTimer_r9) {
|
||||
UE_mac_inst[Mod_idP].scheduling_info.sr_ProhibitTimer =
|
||||
@@ -291,7 +254,6 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
(uint16_t) 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
UE_mac_inst[Mod_idP].scheduling_info.periodicBSR_SF =
|
||||
MAC_UE_BSR_TIMER_NOT_RUNNING;
|
||||
UE_mac_inst[Mod_idP].scheduling_info.retxBSR_SF =
|
||||
@@ -356,16 +318,12 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
UE_mac_inst[Mod_idP].physicalConfigDedicated = physicalConfigDedicated; // for SR proc
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (sCellToAddMod_r10 != NULL) {
|
||||
phy_config_dedicated_scell_ue(Mod_idP, eNB_index,
|
||||
sCellToAddMod_r10, 1);
|
||||
UE_mac_inst[Mod_idP].physicalConfigDedicatedSCell_r10 = sCellToAddMod_r10->radioResourceConfigDedicatedSCell_r10->physicalConfigDedicatedSCell_r10; // using SCell index 0
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if (measObj != NULL) {
|
||||
if (measObj[0] != NULL &&
|
||||
measObj[0]->measObject.present == LTE_MeasObjectToAddMod__measObject_PR_measObjectEUTRA &&
|
||||
@@ -528,8 +486,6 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
}
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
if (mbsfn_AreaInfoList != NULL) {
|
||||
LOG_I(MAC, "[UE %d][CONFIG] Received %d MBSFN Area Info\n",
|
||||
Mod_idP, mbsfn_AreaInfoList->list.count);
|
||||
@@ -567,35 +523,15 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
UE_mac_inst[Mod_idP].mcch_status = 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if(nonMBSFN_SubframeConfig!=NULL) {
|
||||
LOG_I(MAC, "[UE %d] Configuring LTE_NonMBSFN \n",
|
||||
Mod_idP);
|
||||
phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, nonMBSFN_SubframeConfig);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CBA
|
||||
|
||||
if (cba_rnti) {
|
||||
UE_mac_inst[Mod_idP].cba_rnti[num_active_cba_groups - 1] =
|
||||
cba_rnti;
|
||||
LOG_D(MAC,
|
||||
"[UE %d] configure CBA group %d RNTI %x for eNB %d (total active cba group %d)\n",
|
||||
Mod_idP, Mod_idP % num_active_cba_groups, cba_rnti,
|
||||
eNB_index, num_active_cba_groups);
|
||||
phy_config_cba_rnti(Mod_idP, CC_idP, eNB_flagP, eNB_index,
|
||||
cba_rnti, num_active_cba_groups - 1,
|
||||
num_active_cba_groups);
|
||||
LOG_I(MAC, "[UE %d] Configuring LTE_NonMBSFN \n",
|
||||
Mod_idP);
|
||||
phy_config_sib1_fembms_ue(Mod_idP, CC_idP, 0, nonMBSFN_SubframeConfig);
|
||||
}
|
||||
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
|
||||
//for D2D
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
switch (config_action) {
|
||||
case CONFIG_ACTION_ADD:
|
||||
@@ -630,6 +566,5 @@ rrc_mac_config_req_ue(module_id_t Mod_idP,
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
|
||||
+18
-42
@@ -40,9 +40,9 @@
|
||||
|
||||
|
||||
#ifdef USER_MODE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
//#include "COMMON/openair_defs.h"
|
||||
@@ -61,15 +61,12 @@
|
||||
#include "RACH-ConfigCommon.h"
|
||||
#include "MeasObjectToAddModList.h"
|
||||
#include "MobilityControlInfo.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
#include "MBSFN-AreaInfoList-r9.h"
|
||||
#include "MBSFN-SubframeConfigList.h"
|
||||
#include "PMCH-InfoList-r9.h"
|
||||
#include "SCellToAddMod-r10.h"
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#include "SystemInformationBlockType1-v1310-IEs.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "nfapi_interface.h"
|
||||
#include "PHY_INTERFACE/IF_Module.h"
|
||||
@@ -87,7 +84,6 @@
|
||||
#define SCH_PAYLOAD_SIZE_MAX 4096
|
||||
/// Logical channel ids from 36-311 (Note BCCH is not specified in 36-311, uses the same as first DRB)
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
// Mask for identifying subframe for MBMS
|
||||
#define MBSFN_TDD_SF3 0x80// for TDD
|
||||
@@ -106,11 +102,10 @@
|
||||
#define MAX_PMCH_perMBSFN 15
|
||||
/*!\brief MAX MCCH payload size */
|
||||
#define MCCH_PAYLOAD_SIZE_MAX 128
|
||||
//#define MCH_PAYLOAD_SIZE_MAX 16384// this value is using in case mcs and TBS index are high
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef USER_MODE
|
||||
#define printk printf
|
||||
#define printk printf
|
||||
#endif //USER_MODE
|
||||
|
||||
/*!\brief Maximum number of logical channl group IDs */
|
||||
@@ -283,7 +278,6 @@ typedef struct {
|
||||
uint8_t payload[PCCH_PAYLOAD_SIZE_MAX] ;
|
||||
} __attribute__((__packed__))PCCH_PDU;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/*! \brief MCCH payload */
|
||||
typedef struct {
|
||||
uint8_t payload[MCCH_PAYLOAD_SIZE_MAX] ;
|
||||
@@ -305,7 +299,6 @@ typedef struct {
|
||||
uint8_t lcid:5; // octet 2 MSB
|
||||
uint8_t stop_sf_LSB:8;
|
||||
} __attribute__((__packed__))MSI_ELEMENT;
|
||||
#endif
|
||||
/*! \brief Values of CCCH LCID for DLSCH */
|
||||
#define CCCH_LCHANID 0
|
||||
/*!\brief Values of BCCH logical channel (fake)*/
|
||||
@@ -340,7 +333,6 @@ typedef struct {
|
||||
/*!\brief LCID of padding LCID for DLSCH */
|
||||
#define SHORT_PADDING 31
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// MCH LCHAN IDs (table6.2.1-4 TS36.321)
|
||||
/*!\brief LCID of MCCH for DL */
|
||||
#define MCCH_LCHANID 0
|
||||
@@ -348,7 +340,6 @@ typedef struct {
|
||||
#define MCH_SCHDL_INFO 3
|
||||
/*!\brief LCID of Carrier component activation/deactivation */
|
||||
#define CC_ACT_DEACT 27
|
||||
#endif
|
||||
|
||||
// ULSCH LCHAN IDs
|
||||
/*!\brief LCID of extended power headroom for ULSCH */
|
||||
@@ -364,10 +355,10 @@ typedef struct {
|
||||
/*!\brief LCID of long BSR for ULSCH */
|
||||
#define LONG_BSR 30
|
||||
/*!\bitmaps for BSR Triggers */
|
||||
#define BSR_TRIGGER_NONE (0) /* No BSR Trigger */
|
||||
#define BSR_TRIGGER_REGULAR (1) /* For Regular and ReTxBSR Expiry Triggers */
|
||||
#define BSR_TRIGGER_PERIODIC (2) /* For BSR Periodic Timer Expiry Trigger */
|
||||
#define BSR_TRIGGER_PADDING (4) /* For Padding BSR Trigger */
|
||||
#define BSR_TRIGGER_NONE (0) /* No BSR Trigger */
|
||||
#define BSR_TRIGGER_REGULAR (1) /* For Regular and ReTxBSR Expiry Triggers */
|
||||
#define BSR_TRIGGER_PERIODIC (2) /* For BSR Periodic Timer Expiry Trigger */
|
||||
#define BSR_TRIGGER_PADDING (4) /* For Padding BSR Trigger */
|
||||
|
||||
|
||||
/*! \brief Downlink SCH PDU Structure */
|
||||
@@ -459,7 +450,7 @@ typedef struct {
|
||||
/// BCCH MCS
|
||||
uint32_t ccch_mcs;
|
||||
|
||||
/// num active users
|
||||
/// num active users
|
||||
uint16_t num_dlactive_UEs;
|
||||
/// available number of PRBs for a give SF
|
||||
uint16_t available_prbs;
|
||||
@@ -537,7 +528,7 @@ typedef struct {
|
||||
// total rb used for retransmission
|
||||
uint32_t total_rbs_used_retx;
|
||||
|
||||
/// TX
|
||||
/// TX
|
||||
/// Num pkt
|
||||
uint32_t num_pdu_tx[NB_RB_MAX];
|
||||
/// num bytes
|
||||
@@ -596,13 +587,13 @@ typedef struct {
|
||||
uint32_t num_retransmission_rx;
|
||||
/// total rb used for a new uplink transmission
|
||||
uint32_t rbs_used_rx;
|
||||
/// total rb used for a new uplink retransmission
|
||||
/// total rb used for a new uplink retransmission
|
||||
uint32_t rbs_used_retx_rx;
|
||||
/// total rb used for a new uplink transmission
|
||||
uint32_t total_rbs_used_rx;
|
||||
/// snr
|
||||
int32_t snr;
|
||||
/// target snr
|
||||
/// target snr
|
||||
int32_t target_snr;
|
||||
|
||||
/// num rx pdu
|
||||
@@ -619,7 +610,7 @@ typedef struct {
|
||||
uint64_t total_overhead_bytes_rx;
|
||||
/// headers+ CE + padding bytes for a MAC PDU
|
||||
uint64_t avg_overhead_bytes_rx;
|
||||
//
|
||||
//
|
||||
uint32_t ulsch_bitrate;
|
||||
//total
|
||||
uint32_t total_ulsch_bitrate;
|
||||
@@ -762,14 +753,14 @@ typedef struct {
|
||||
eNB_UE_estimated_distances distance;
|
||||
#endif
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
uint8_t rach_resource_type;
|
||||
|
||||
uint16_t mpdcch_repetition_cnt;
|
||||
uint16_t mpdcch_repetition_cnt;
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
frame_t Msg2_frame;
|
||||
sub_frame_t Msg2_subframe;
|
||||
#endif
|
||||
|
||||
} UE_TEMPLATE;
|
||||
|
||||
/*! \brief scheduling control information set through an API (not used)*/
|
||||
@@ -925,8 +916,6 @@ typedef struct {
|
||||
/// size off piggybacked RRC SDU
|
||||
uint8_t msg4_rrc_sdu_length;
|
||||
uint32_t msg4_delay;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint8_t rach_resource_type;
|
||||
uint8_t msg2_mpdcch_repetition_cnt;
|
||||
uint8_t msg2_mpdcch_done;
|
||||
@@ -934,7 +923,6 @@ typedef struct {
|
||||
uint8_t msg4_mpdcch_done;
|
||||
uint8_t msg2_narrowband;
|
||||
uint32_t msg34_narrowband;
|
||||
#endif
|
||||
} RA_TEMPLATE;
|
||||
|
||||
|
||||
@@ -988,9 +976,7 @@ typedef struct {
|
||||
uint32_t dl_CarrierFreq;
|
||||
BCCH_BCH_Message_t *mib;
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon_BR;
|
||||
#endif
|
||||
TDD_Config_t *tdd_Config;
|
||||
SchedulingInfoList_t *schedulingInfoList;
|
||||
ARFCN_ValueEUTRA_t ul_CarrierFreq;
|
||||
@@ -1015,7 +1001,6 @@ typedef struct {
|
||||
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8];
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/// MBMS Flag
|
||||
uint8_t MBMS_flag;
|
||||
/// Outgoing MCCH pdu for PHY
|
||||
@@ -1036,15 +1021,12 @@ typedef struct {
|
||||
struct MBMS_SessionInfoList_r9 *mbms_SessionList[MAX_PMCH_perMBSFN];
|
||||
/// Outgoing MCH pdu for PHY
|
||||
MCH_PDU MCH_pdu;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/// Rel13 parameters from SIB1
|
||||
SystemInformationBlockType1_v1310_IEs_t *sib1_v13ext;
|
||||
/// Counter for SIB1-BR scheduling
|
||||
int SIB1_BR_cnt;
|
||||
/// Outgoing BCCH-BR pdu for PHY
|
||||
BCCH_PDU BCCH_BR_pdu[20];
|
||||
#endif
|
||||
} COMMON_channels_t;
|
||||
/*! \brief top level eNB MAC structure */
|
||||
typedef struct eNB_MAC_INST_s {
|
||||
@@ -1225,10 +1207,8 @@ typedef struct {
|
||||
struct RACH_ConfigDedicated *rach_ConfigDedicated;
|
||||
/// pointer to RRC PHY configuration
|
||||
struct PhysicalConfigDedicated *physicalConfigDedicated;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/// pointer to RRC PHY configuration SCEll
|
||||
struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10;
|
||||
#endif
|
||||
/// pointer to TDD Configuration (NULL for FDD)
|
||||
TDD_Config_t *tdd_Config;
|
||||
/// Number of adjacent cells to measure
|
||||
@@ -1301,7 +1281,6 @@ typedef struct {
|
||||
struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; // FIXME replace 8 by MAX_MBSFN_AREA?
|
||||
/// number of subframe allocation pattern available for MBSFN sync area
|
||||
uint8_t num_sf_allocation_pattern;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
/// number of active MBSFN area
|
||||
uint8_t num_active_mbsfn_area;
|
||||
/// MBSFN Area Info
|
||||
@@ -1312,13 +1291,10 @@ typedef struct {
|
||||
uint8_t mcch_status;
|
||||
/// MSI status
|
||||
uint8_t msi_status;// could be an array if there are >1 MCH in one MBSFN area
|
||||
#endif
|
||||
//#ifdef CBA
|
||||
/// CBA RNTI for each group
|
||||
uint16_t cba_rnti[NUM_MAX_CBA_GROUP];
|
||||
/// last SFN for CBA channel access
|
||||
uint8_t cba_last_access[NUM_MAX_CBA_GROUP];
|
||||
//#endif
|
||||
/// total UE scheduler processing time
|
||||
time_stats_t ue_scheduler; // total
|
||||
/// UE ULSCH tx processing time inlcuding RLC interface (rlc_data_req) and mac header generation
|
||||
|
||||
@@ -128,11 +128,11 @@ void schedule_SRS(module_id_t module_idP,
|
||||
continue;
|
||||
}
|
||||
|
||||
if(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated == NULL) {
|
||||
LOG_E(MAC,"physicalConfigDedicated is null for UE %d\n",UE_id);
|
||||
printf("physicalConfigDedicated is null for UE %d\n",UE_id);
|
||||
return;
|
||||
}
|
||||
if(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated == NULL) {
|
||||
LOG_E(MAC,"physicalConfigDedicated is null for UE %d\n",UE_id);
|
||||
printf("physicalConfigDedicated is null for UE %d\n",UE_id);
|
||||
return;
|
||||
}
|
||||
|
||||
/* CDRX condition on Active Time and SRS type-0 report (36.321 5.7) */
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
@@ -170,7 +170,6 @@ void schedule_SRS(module_id_t module_idP,
|
||||
ul_config_pdu->srs_pdu.srs_pdu_rel8.transmission_comb = soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb;
|
||||
ul_config_pdu->srs_pdu.srs_pdu_rel8.i_srs = soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex;
|
||||
ul_config_pdu->srs_pdu.srs_pdu_rel8.sounding_reference_cyclic_shift = soundingRS_UL_ConfigDedicated->choice.setup.cyclicShift;
|
||||
|
||||
eNB->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
|
||||
eNB->UL_req[CC_id].header.message_id = NFAPI_UL_CONFIG_REQUEST;
|
||||
ul_req->number_of_pdus++;
|
||||
@@ -259,32 +258,26 @@ void schedule_CSI(module_id_t module_idP,
|
||||
|
||||
if ((((frameP * 10) + subframeP) % Npd) == N_OFFSET_CQI) { // CQI periodic opportunity
|
||||
UE_scheduling_control->feedback_cnt[CC_id] = (((frameP * 10) + subframeP) / Npd) % H;
|
||||
|
||||
// Program CQI
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
|
||||
memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
|
||||
|
||||
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
|
||||
ul_config_pdu->pdu_size = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_uci_cqi_pdu));
|
||||
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
|
||||
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.rnti = UE_list->UE_template[CC_id][UE_id].rnti;
|
||||
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_CQI_INFORMATION_REL8_TAG;
|
||||
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.pucch_index = cqi_ReportPeriodic->choice.setup.cqi_PUCCH_ResourceIndex;
|
||||
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = get_rel8_dl_cqi_pmi_size(&UE_list->UE_sched_ctrl[UE_id], CC_id, cc, get_tmode(module_idP, CC_id, UE_id), cqi_ReportPeriodic);
|
||||
ul_config_pdu->uci_cqi_pdu.cqi_information.cqi_information_rel8.dl_cqi_pmi_size = get_rel8_dl_cqi_pmi_size(&UE_list->UE_sched_ctrl[UE_id], CC_id, cc, get_tmode(module_idP, CC_id, UE_id),
|
||||
cqi_ReportPeriodic);
|
||||
ul_req->number_of_pdus++;
|
||||
ul_req->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
// PUT rel10-13 UCI options here
|
||||
#endif
|
||||
} else if (cqi_ReportPeriodic->choice.setup.ri_ConfigIndex != NULL) {
|
||||
if ((((frameP * 10) + subframeP) % ((H * Npd) << (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex / 161))) ==
|
||||
N_OFFSET_CQI + (*cqi_ReportPeriodic->choice.setup.ri_ConfigIndex % 161)) { // RI opportunity
|
||||
|
||||
// Program RI
|
||||
nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[ul_req->number_of_pdus];
|
||||
memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
|
||||
|
||||
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_CQI_PDU_TYPE;
|
||||
ul_config_pdu->pdu_size = 2 + (uint8_t) (2 + sizeof(nfapi_ul_config_uci_cqi_pdu));
|
||||
ul_config_pdu->uci_cqi_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
|
||||
@@ -388,22 +381,16 @@ schedule_SR (module_id_t module_idP,
|
||||
is_harq);
|
||||
|
||||
/* Check Rel10 or Rel8 SR */
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
if ((UE_list-> UE_template[CC_id][UE_id].physicalConfigDedicated->ext2) &&
|
||||
(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020) &&
|
||||
(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020)) {
|
||||
sr.sr_information_rel10.tl.tag = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL10_TAG;
|
||||
sr.sr_information_rel10.number_of_pucch_resources = 1;
|
||||
sr.sr_information_rel10.pucch_index_p1 = *UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->ext2->schedulingRequestConfig_v1020->sr_PUCCH_ResourceIndexP1_r10;
|
||||
|
||||
LOG_D(MAC, "REL10 PUCCH INDEX P1:%d \n", sr.sr_information_rel10.pucch_index_p1);
|
||||
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
sr.sr_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_SR_INFORMATION_REL8_TAG;
|
||||
sr.sr_information_rel8.pucch_index = UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->schedulingRequestConfig->choice.setup.sr_PUCCH_ResourceIndex;
|
||||
|
||||
LOG_D(MAC, "REL8 PUCCH INDEX:%d\n", sr.sr_information_rel8.pucch_index);
|
||||
}
|
||||
|
||||
@@ -424,7 +411,6 @@ schedule_SR (module_id_t module_idP,
|
||||
} // if (is_harq)
|
||||
|
||||
ul_req_body->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
|
||||
} // for (int UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++)
|
||||
} // for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++)
|
||||
}
|
||||
@@ -511,12 +497,13 @@ check_ul_failure(module_id_t module_idP, int CC_id, int UE_id,
|
||||
UE_list->UE_sched_ctrl[UE_id].ul_out_of_sync = 1;
|
||||
}
|
||||
} // ul_failure_timer>0
|
||||
|
||||
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer++;
|
||||
if((U_PLANE_INACTIVITY_VALUE != 0) && (UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE * 10))){
|
||||
LOG_D(MAC,"UE %d rnti %x: U-Plane Failure after repeated PDCCH orders: Triggering RRC \n",UE_id,rnti);
|
||||
mac_eNB_rrc_uplane_failure(module_idP,CC_id,frameP,subframeP,rnti);
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
||||
|
||||
if((U_PLANE_INACTIVITY_VALUE != 0) && (UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer > (U_PLANE_INACTIVITY_VALUE * 10))) {
|
||||
LOG_D(MAC,"UE %d rnti %x: U-Plane Failure after repeated PDCCH orders: Triggering RRC \n",UE_id,rnti);
|
||||
mac_eNB_rrc_uplane_failure(module_idP,CC_id,frameP,subframeP,rnti);
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
||||
}// time > 60s
|
||||
}
|
||||
|
||||
@@ -573,8 +560,7 @@ copy_ulreq(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP) {
|
||||
void
|
||||
eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP)
|
||||
{
|
||||
sub_frame_t subframeP) {
|
||||
int mbsfn_status[MAX_NUM_CCs];
|
||||
protocol_ctxt_t ctxt;
|
||||
rnti_t rnti = 0;
|
||||
@@ -584,24 +570,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
UE_list_t *UE_list = &(eNB->UE_list);
|
||||
COMMON_channels_t *cc = eNB->common_channels;
|
||||
UE_sched_ctrl_t *UE_scheduling_control = NULL;
|
||||
|
||||
start_meas(&(eNB->eNB_scheduler));
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER, VCD_FUNCTION_IN);
|
||||
|
||||
eNB->frame = frameP;
|
||||
eNB->subframe = subframeP;
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
mbsfn_status[CC_id] = 0;
|
||||
|
||||
/* Clear vrb_maps */
|
||||
memset(cc[CC_id].vrb_map, 0, 100);
|
||||
memset(cc[CC_id].vrb_map_UL, 0, 100);
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
cc[CC_id].mcch_active = 0;
|
||||
#endif
|
||||
clear_nfapi_information(RC.mac[module_idP], CC_id, frameP, subframeP);
|
||||
}
|
||||
|
||||
@@ -610,7 +589,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
if (UE_list->active[UE_id]) {
|
||||
rnti = UE_RNTI(module_idP, UE_id);
|
||||
CC_id = UE_PCCID(module_idP, UE_id);
|
||||
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
|
||||
if (((frameP & 127) == 0) && (subframeP == 0)) {
|
||||
@@ -633,7 +611,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE) {
|
||||
boolean_t harq_active_time_condition = FALSE;
|
||||
UE_TEMPLATE *UE_template = NULL;
|
||||
|
||||
unsigned long active_time_condition = 0; // variable used only for tracing purpose
|
||||
|
||||
/* (UL and DL) HARQ RTT timers and DRX retransmission timers */
|
||||
@@ -662,7 +639,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
UE_scheduling_control->ul_harq_rtt_timer[CC_id][harq_process_id]++;
|
||||
|
||||
if (UE_scheduling_control->ul_harq_rtt_timer[CC_id][harq_process_id] > 4) {
|
||||
/*
|
||||
/*
|
||||
* TODO: implement the handling of UL asynchronous HARQ
|
||||
* drx_ULRetransmissionTimer should be (re)started here
|
||||
*/
|
||||
@@ -746,13 +723,11 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
if (UE_scheduling_control->in_short_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
|
||||
if (((frameP * 10) + subframeP) % (UE_scheduling_control->short_drx_cycle_duration) ==
|
||||
(UE_scheduling_control->drx_start_offset) % (UE_scheduling_control->short_drx_cycle_duration)) {
|
||||
|
||||
UE_scheduling_control->on_duration_timer = 1;
|
||||
}
|
||||
} else if (UE_scheduling_control->in_long_drx_cycle == TRUE && UE_scheduling_control->on_duration_timer == 0) {
|
||||
if (((frameP * 10) + subframeP) % (UE_scheduling_control->drx_longCycle_timer_thres) ==
|
||||
(UE_scheduling_control->drx_start_offset)) {
|
||||
|
||||
UE_scheduling_control->on_duration_timer = 1;
|
||||
}
|
||||
}
|
||||
@@ -763,6 +738,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
* ONLY here. The variable can then be used for testing the actual state of the UE for scheduling purpose.
|
||||
*/
|
||||
UE_template = &(UE_list->UE_template[CC_id][UE_id]);
|
||||
|
||||
/* (a)synchronous HARQ processes handling for Active Time */
|
||||
for (int harq_process_id = 0; harq_process_id < 8; harq_process_id++) {
|
||||
if (UE_scheduling_control->drx_retransmission_timer[harq_process_id] > 0) {
|
||||
@@ -777,9 +753,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
UE_scheduling_control->drx_inactivity_timer > 1 ||
|
||||
harq_active_time_condition ||
|
||||
UE_template->ul_SR > 0) {
|
||||
|
||||
UE_scheduling_control->in_active_time = TRUE;
|
||||
|
||||
} else {
|
||||
UE_scheduling_control->in_active_time = FALSE;
|
||||
}
|
||||
@@ -804,17 +778,17 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_ACTIVE_TIME_CONDITION, (unsigned long) active_time_condition);
|
||||
}
|
||||
|
||||
/* END VCD */
|
||||
|
||||
/* DCI0 ongoing timer */
|
||||
if (UE_scheduling_control->dci0_ongoing_timer > 0) {
|
||||
if (UE_scheduling_control->dci0_ongoing_timer > 7) {
|
||||
UE_scheduling_control->dci0_ongoing_timer = 0;
|
||||
} else {
|
||||
UE_scheduling_control->dci0_ongoing_timer++;
|
||||
}
|
||||
if (UE_scheduling_control->dci0_ongoing_timer > 7) {
|
||||
UE_scheduling_control->dci0_ongoing_timer = 0;
|
||||
} else {
|
||||
UE_scheduling_control->dci0_ongoing_timer++;
|
||||
}
|
||||
}
|
||||
|
||||
} else { // else: CDRX not configured
|
||||
/* Note: (UL) HARQ RTT timers processing is done here and can be used by other features than CDRX */
|
||||
/* HARQ RTT timers */
|
||||
@@ -840,13 +814,11 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
/* Increment these timers, they are cleared when we receive an sdu */
|
||||
UE_scheduling_control->ul_inactivity_timer++;
|
||||
UE_scheduling_control->cqi_req_timer++;
|
||||
|
||||
LOG_D(MAC, "UE %d/%x : ul_inactivity %d, cqi_req %d\n",
|
||||
UE_id,
|
||||
rnti,
|
||||
UE_scheduling_control->ul_inactivity_timer,
|
||||
UE_scheduling_control->cqi_req_timer);
|
||||
|
||||
check_ul_failure(module_idP, CC_id, UE_id, frameP, subframeP);
|
||||
|
||||
if (UE_scheduling_control->ue_reestablishment_reject_timer > 0) {
|
||||
@@ -877,9 +849,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
if((ulsch != NULL) && (ulsch->rnti == rnti)) {
|
||||
void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch);
|
||||
|
||||
LOG_I(MAC, "clean_eNb_ulsch UE %x \n", rnti);
|
||||
|
||||
clean_eNb_ulsch(ulsch);
|
||||
}
|
||||
}
|
||||
@@ -889,9 +859,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
|
||||
if((dlsch != NULL) && (dlsch->rnti == rnti)) {
|
||||
void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch);
|
||||
|
||||
LOG_I(MAC, "clean_eNb_dlsch UE %x \n", rnti);
|
||||
|
||||
clean_eNb_dlsch(dlsch);
|
||||
}
|
||||
}
|
||||
@@ -913,7 +881,7 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
if (pdu_index < pdu_number -1) {
|
||||
memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index],
|
||||
&ul_req_tmp->ul_config_pdu_list[pdu_index+1],
|
||||
(pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
|
||||
(pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
|
||||
}
|
||||
|
||||
ul_req_tmp->number_of_pdus--;
|
||||
@@ -923,20 +891,16 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
} // end for j
|
||||
|
||||
rrc_mac_remove_ue(module_idP,rnti);
|
||||
|
||||
} // end if (UE_scheduling_control->ue_reestablishment_reject_timer >= UE_scheduling_control->ue_reestablishment_reject_timer_thres)
|
||||
} // end if (UE_scheduling_control->ue_reestablishment_reject_timer > 0)
|
||||
} // end if UE active
|
||||
} // end for loop on UE_id
|
||||
|
||||
#if (!defined(PRE_SCD_THREAD))
|
||||
|
||||
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, NOT_A_RNTI, frameP, subframeP, module_idP);
|
||||
pdcp_run(&ctxt);
|
||||
rrc_rx_tx(&ctxt, CC_id);
|
||||
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
|
||||
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
if (cc[CC_id].MBMS_flag > 0) {
|
||||
@@ -946,8 +910,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static int debug_flag = 0;
|
||||
void (*schedule_ulsch_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe) = NULL;
|
||||
void (*schedule_ue_spec_p)(module_id_t module_idP, frame_t frameP, sub_frame_t subframe, int *mbsfn_flag) = NULL;
|
||||
@@ -961,13 +923,13 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
schedule_ue_spec_p = schedule_ue_spec_fairRR;
|
||||
}
|
||||
|
||||
if(debug_flag == 0){
|
||||
if(debug_flag == 0) {
|
||||
LOG_E(MAC,"SCHED_MODE = %d\n", eNB->scheduler_mode);
|
||||
debug_flag = 1;
|
||||
}
|
||||
|
||||
/* This schedules MIB */
|
||||
if ((subframeP == 0) && (frameP & 3) == 0)
|
||||
if ((subframeP == 0) && (frameP & 3) == 0)
|
||||
schedule_mib(module_idP, frameP, subframeP);
|
||||
|
||||
if (get_softmodem_params()->phy_test == 0) {
|
||||
@@ -995,10 +957,9 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
schedule_SR(module_idP, frameP, subframeP);
|
||||
/* This schedules UCI_CSI in subframeP */
|
||||
schedule_CSI(module_idP, frameP, subframeP);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
/* This schedules DLSCH in subframeP for BR UE*/
|
||||
schedule_ue_spec_br(module_idP, frameP, subframeP);
|
||||
#endif
|
||||
|
||||
/* This schedules DLSCH in subframeP */
|
||||
if (schedule_ue_spec_p != NULL) {
|
||||
schedule_ue_spec_p(module_idP, frameP, subframeP, mbsfn_status);
|
||||
@@ -1007,7 +968,6 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
__FILE__,
|
||||
__LINE__);
|
||||
}
|
||||
|
||||
} else {
|
||||
schedule_ulsch_phy_test(module_idP,frameP,subframeP);
|
||||
schedule_ue_spec_phy_test(module_idP,frameP,subframeP,mbsfn_status);
|
||||
@@ -1025,6 +985,5 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP,
|
||||
}
|
||||
|
||||
stop_meas(&(eNB->eNB_scheduler));
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER, VCD_FUNCTION_OUT);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,6 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
|
||||
ul_req_body = &ul_req->ul_config_request_body;
|
||||
AssertFatal(ra->state != IDLE, "RA is not active for RA %X\n",
|
||||
ra->rnti);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (ra->rach_resource_type > 0) {
|
||||
LOG_D (MAC, "[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d CE level %d is active, Msg3 in (%d,%d)\n",
|
||||
@@ -145,9 +144,7 @@ add_msg3(module_id_t module_idP, int CC_id, RA_t *ra, frame_t frameP,
|
||||
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++;
|
||||
} // if (ra->rach_resource_type>0) {
|
||||
else
|
||||
#endif
|
||||
{
|
||||
else {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA is active, Msg3 in (%d,%d)\n",
|
||||
module_idP, frameP, subframeP, CC_id, ra->Msg3_frame,
|
||||
@@ -249,7 +246,6 @@ void generate_Msg2(module_id_t module_idP,
|
||||
dl_req_body = &mac->DL_req[CC_idP].dl_config_request_body;
|
||||
dl_config_pdu = &dl_req_body->dl_config_pdu_list[dl_req_body->number_pdu];
|
||||
N_RB_DL = to_prb(cc[CC_idP].mib->message.dl_Bandwidth);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
int reps = 0;
|
||||
@@ -329,9 +325,7 @@ void generate_Msg2(module_id_t module_idP,
|
||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.mpdcch_tansmission_type = 1; // imposed (9.1.5 in 213) for Type 2 Common search space
|
||||
AssertFatal (cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 != NULL, "cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13 is null\n");
|
||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol = cc[CC_idP].sib1_v13ext->bandwidthReducedAccessRelatedInfo_r13->startSymbolBR_r13;
|
||||
|
||||
LOG_E(MAC, "start_symbol = %d \n", dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.start_symbol);
|
||||
|
||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.ecce_index = 0; // Note: this should be dynamic
|
||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.aggregation_level = 24; // OK for CEModeA r1-3 (9.1.5-1b) or CEModeB r1-4
|
||||
dl_config_pdu->mpdcch_pdu.mpdcch_pdu_rel13.rnti_type = 2; // RA-RNTI
|
||||
@@ -462,9 +456,7 @@ void generate_Msg2(module_id_t module_idP,
|
||||
mac->TX_req[CC_idP].tx_request_body.number_of_pdus++;
|
||||
}
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
if ((ra->Msg2_frame == frameP) && (ra->Msg2_subframe == subframeP)) {
|
||||
LOG_D(MAC,
|
||||
"[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI, state %d\n",
|
||||
@@ -594,7 +586,6 @@ generate_Msg4(module_id_t module_idP,
|
||||
nfapi_dl_config_request_t *dl_req = NULL;
|
||||
nfapi_dl_config_request_body_t *dl_req_body = NULL;
|
||||
nfapi_ul_config_request_body_t *ul_req_body = NULL;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
int reps = 0;
|
||||
@@ -648,7 +639,6 @@ generate_Msg4(module_id_t module_idP,
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
vrb_map = cc[CC_idP].vrb_map;
|
||||
dl_req = &mac->DL_req[CC_idP];
|
||||
dl_req_body = &dl_req->dl_config_request_body;
|
||||
@@ -679,7 +669,6 @@ generate_Msg4(module_id_t module_idP,
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: UE_id %d, rrc_sdu_length %d\n",
|
||||
module_idP, CC_idP, frameP, subframeP, UE_id, rrc_sdu_length);*/
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (ra->rach_resource_type > 0) {
|
||||
ra->harq_pid = 0;
|
||||
@@ -900,9 +889,7 @@ generate_Msg4(module_id_t module_idP,
|
||||
}
|
||||
} // Msg4 frame/subframe
|
||||
} // rach_resource_type > 0
|
||||
else
|
||||
#endif
|
||||
{
|
||||
else {
|
||||
// This is normal LTE case
|
||||
LOG_I(MAC, "generate_Msg4 ra->Msg4_frame SFN/SF: %d.%d, frameP SFN/SF: %d.%d FOR eNB_Mod: %d \n", ra->Msg4_frame, ra->Msg4_subframe, frameP, subframeP, module_idP);
|
||||
|
||||
@@ -959,12 +946,10 @@ generate_Msg4(module_id_t module_idP,
|
||||
1, // tpc, none
|
||||
getRIV(N_RB_DL, first_rb, 4), // resource_block_coding
|
||||
ra->msg4_mcs, // mcs
|
||||
1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
|
||||
1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
|
||||
0, // rv
|
||||
0); // vrb_flag
|
||||
|
||||
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid] = 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid];
|
||||
|
||||
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid] = 1 - UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid];
|
||||
LOG_D(MAC,
|
||||
"Frame %d, subframe %d: Msg4 DCI pdu_num %d (rnti %x,rnti_type %d,harq_pid %d, resource_block_coding (%p) %d\n",
|
||||
frameP, subframeP, dl_req_body->number_pdu,
|
||||
@@ -1054,7 +1039,7 @@ generate_Msg4(module_id_t module_idP,
|
||||
mac->TX_req[CC_idP].sfn_sf =
|
||||
fill_nfapi_tx_req(&mac->TX_req[CC_idP].tx_request_body,
|
||||
(frameP * 10) + subframeP,
|
||||
rrc_sdu_length+offset,
|
||||
rrc_sdu_length+offset,
|
||||
mac->pdu_index[CC_idP],
|
||||
mac->UE_list.
|
||||
DLSCH_pdu[CC_idP][0][(unsigned char)UE_id].payload[0]);
|
||||
@@ -1126,39 +1111,6 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
nfapi_dl_config_request_t *dl_req;
|
||||
nfapi_dl_config_request_body_t *dl_req_body;
|
||||
int round;
|
||||
/*
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
COMMON_channels_t *cc = mac->common_channels;
|
||||
|
||||
int rmax = 0;
|
||||
int rep = 0;
|
||||
int reps = 0;
|
||||
|
||||
first_rb = 0;
|
||||
struct PRACH_ConfigSIB_v1310 *ext4_prach;
|
||||
PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13;
|
||||
PRACH_ParametersCE_r13_t *p[4];
|
||||
|
||||
if (cc[CC_idP].radioResourceConfigCommon_BR) {
|
||||
|
||||
ext4_prach = cc[CC_idP].radioResourceConfigCommon_BR->ext4->prach_ConfigCommon_v1310;
|
||||
prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
|
||||
|
||||
switch (prach_ParametersListCE_r13->list.count) {
|
||||
case 4:
|
||||
p[3]=prach_ParametersListCE_r13->list.array[3];
|
||||
case 3:
|
||||
p[2]=prach_ParametersListCE_r13->list.array[2];
|
||||
case 2:
|
||||
p[1]=prach_ParametersListCE_r13->list.array[1];
|
||||
case 1:
|
||||
p[0]=prach_ParametersListCE_r13->list.array[0];
|
||||
default:
|
||||
AssertFatal(1==0,"Illegal count for prach_ParametersListCE_r13 %d\n",prach_ParametersListCE_r13->list.count);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
// check HARQ status and retransmit if necessary
|
||||
UE_id = find_UE_id(module_idP, ra->rnti);
|
||||
AssertFatal(UE_id >= 0, "Can't find UE for t-crnti\n");
|
||||
@@ -1173,15 +1125,11 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
module_idP, CC_idP, frameP, subframeP, ra->harq_pid, round, UE_id);
|
||||
|
||||
if (round != 8) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (ra->rach_resource_type > 0 && round > 0) {
|
||||
AssertFatal(1 == 0,
|
||||
"Msg4 Retransmissions not handled yet for BL/CE UEs, Frame %d, subframeP %d harq_pid %d round %d, UE_id: %d \n",
|
||||
frameP, subframeP, ra->harq_pid, round, UE_id);
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
} else {
|
||||
if ((ra->Msg4_frame == frameP)
|
||||
&& (ra->Msg4_subframe == subframeP)) {
|
||||
//ra->wait_ack_Msg4++;
|
||||
@@ -1199,7 +1147,7 @@ check_Msg4_retransmission(module_id_t module_idP, int CC_idP,
|
||||
1, // tpc, none
|
||||
getRIV(N_RB_DL, first_rb, 4), // resource_block_coding
|
||||
ra->msg4_mcs, // mcs
|
||||
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
|
||||
UE_list->UE_template[CC_idP][UE_id].oldNDI[ra->harq_pid],
|
||||
round & 3, // rv
|
||||
0); // vrb_flag
|
||||
|
||||
@@ -1313,15 +1261,12 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
sub_frame_t subframeP,
|
||||
uint16_t preamble_index,
|
||||
int16_t timing_offset,
|
||||
uint16_t ra_rnti
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,uint8_t rach_resource_type
|
||||
#endif
|
||||
uint16_t ra_rnti,
|
||||
uint8_t rach_resource_type
|
||||
) {
|
||||
uint8_t i;
|
||||
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
RA_t *ra = &cc->ra[0];
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
struct LTE_PRACH_ConfigSIB_v1310 *ext4_prach = NULL;
|
||||
LTE_PRACH_ParametersListCE_r13_t *prach_ParametersListCE_r13 = NULL;
|
||||
|
||||
@@ -1333,20 +1278,16 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
prach_ParametersListCE_r13 = &ext4_prach->prach_ParametersListCE_r13;
|
||||
}
|
||||
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d Initiating RA procedure for preamble index %d\n",
|
||||
module_idP, CC_id, frameP, subframeP, preamble_index);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
LOG_D(MAC,
|
||||
"[eNB %d][RAPROC] CC_id %d Frame %d, Subframe %d PRACH resource type %d\n",
|
||||
module_idP, CC_id, frameP, subframeP, rach_resource_type);
|
||||
#endif
|
||||
uint16_t msg2_frame = frameP;
|
||||
uint16_t msg2_subframe = subframeP;
|
||||
int offset;
|
||||
static uint8_t failure_cnt = 0 ;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
|
||||
if (prach_ParametersListCE_r13 &&
|
||||
prach_ParametersListCE_r13->list.count < rach_resource_type) {
|
||||
@@ -1357,7 +1298,6 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
return;
|
||||
}
|
||||
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0)) */
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 1);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_INITIATE_RA_PROC, 0);
|
||||
|
||||
@@ -1370,11 +1310,9 @@ initiate_ra_proc(module_id_t module_idP,
|
||||
ra[i].Msg4_delay_cnt=0;
|
||||
ra[i].timing_offset = timing_offset;
|
||||
ra[i].preamble_subframe = subframeP;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
ra[i].rach_resource_type = rach_resource_type;
|
||||
ra[i].msg2_mpdcch_repetition_cnt = 0;
|
||||
ra[i].msg4_mpdcch_repetition_cnt = 0;
|
||||
#endif
|
||||
|
||||
//TODO Fill in other TDD config. What about nfapi_mode?
|
||||
if(cc->tdd_Config!=NULL) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -566,7 +566,6 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
dl_Bandwidth = cc[CC_id].mib->message.dl_Bandwidth;
|
||||
N_RB_DL[CC_id] = to_prb(dl_Bandwidth);
|
||||
min_rb_unit[CC_id] = get_min_rb_unit(module_idP, CC_id);
|
||||
|
||||
// get number of PRBs less those used by common channels
|
||||
total_nb_available_rb[CC_id] = N_RB_DL[CC_id];
|
||||
|
||||
@@ -623,7 +622,6 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
LOG_D(MAC, "doing schedule_ue_spec for CC_id %d UE %d\n",
|
||||
CC_id,
|
||||
UE_id);
|
||||
|
||||
continue_flag = 0; // reset the flag to allow allocation for the remaining UEs
|
||||
rnti = UE_RNTI(module_idP, UE_id);
|
||||
ue_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
@@ -777,7 +775,8 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
|
||||
if (ue_sched_ctrl->cdrx_configured) {
|
||||
ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
|
||||
/*
|
||||
|
||||
/*
|
||||
* Note: contrary to the spec drx_retransmission_timer[harq_pid] is reset not stop.
|
||||
*/
|
||||
if (harq_pid == 0) {
|
||||
@@ -981,11 +980,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
DCCH,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3, 0, 0
|
||||
);
|
||||
sdu_lengths[0] = 0;
|
||||
|
||||
@@ -1004,17 +999,14 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
MBMS_FLAG_NO,
|
||||
DCCH,
|
||||
TBS, //not used
|
||||
(char *)&dlsch_buffer[0]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
(char *)&dlsch_buffer[0], 0, 0
|
||||
);
|
||||
|
||||
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)) {
|
||||
while(pthread_mutex_trylock(&rrc_release_freelist)){
|
||||
while(pthread_mutex_trylock(&rrc_release_freelist)) {
|
||||
/* spin... */
|
||||
}
|
||||
|
||||
uint16_t release_total = 0;
|
||||
|
||||
for (release_num = 0, release_ctrl = &rrc_release_info.RRC_release_ctrl[0];
|
||||
@@ -1061,10 +1053,10 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
if(release_total >= rrc_release_info.num_UEs)
|
||||
break;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&rrc_release_freelist);
|
||||
}
|
||||
|
||||
|
||||
for (ra_ii = 0, ra = &eNB->common_channels[CC_id].ra[0]; ra_ii < NB_RA_PROC_MAX; ra_ii++, ra++) {
|
||||
if ((ra->rnti == rnti) && (ra->state == MSGCRNTI)) {
|
||||
for (uint16_t mui_num = 0; mui_num < rlc_am_mui.rrc_mui_num; mui_num++) {
|
||||
@@ -1125,11 +1117,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
DCCH + 1,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3, 0, 0
|
||||
);
|
||||
// DCCH SDU
|
||||
sdu_lengths[num_sdus] = 0;
|
||||
@@ -1145,11 +1133,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO, DCCH + 1,
|
||||
TBS, //not used
|
||||
(char *) &dlsch_buffer[sdu_length_total]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
(char *) &dlsch_buffer[sdu_length_total], 0, 0
|
||||
);
|
||||
T(T_ENB_MAC_UE_DL_SDU,
|
||||
T_INT(module_idP),
|
||||
@@ -1204,11 +1188,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
TBS - ta_len - header_length_total - sdu_length_total - 3, 0, 0
|
||||
);
|
||||
|
||||
if (rlc_status.bytes_in_buffer > 0) {
|
||||
@@ -1226,11 +1206,7 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS, //not used
|
||||
(char *) &dlsch_buffer[sdu_length_total]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0
|
||||
, 0
|
||||
#endif
|
||||
(char *) &dlsch_buffer[sdu_length_total], 0, 0
|
||||
);
|
||||
T(T_ENB_MAC_UE_DL_SDU,
|
||||
T_INT(module_idP),
|
||||
@@ -1255,7 +1231,6 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
header_length_total += header_length_last;
|
||||
num_sdus++;
|
||||
ue_sched_ctrl->uplane_inactivity_timer = 0;
|
||||
|
||||
// reset RRC inactivity timer after uplane activity
|
||||
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[module_idP], rnti);
|
||||
|
||||
@@ -1579,17 +1554,17 @@ schedule_ue_spec(module_id_t module_idP,
|
||||
dl_req->tl.tag = NFAPI_DL_CONFIG_REQUEST_BODY_TAG;
|
||||
eNB->DL_req[CC_id].sfn_sf = frameP << 4 | subframeP;
|
||||
eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
|
||||
|
||||
/* CDRX */
|
||||
ue_sched_ctrl->harq_rtt_timer[CC_id][harq_pid] = 1; // restart HARQ RTT timer
|
||||
|
||||
if (ue_sched_ctrl->cdrx_configured) {
|
||||
ue_sched_ctrl->drx_inactivity_timer = 1; // restart drx inactivity timer when new transmission
|
||||
ue_sched_ctrl->drx_retransmission_timer[harq_pid] = 0; // stop drx retransmission
|
||||
/*
|
||||
/*
|
||||
* Note: contrary to the spec drx_retransmission_timer[harq_pid] is reset not stop.
|
||||
*/
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY, (unsigned long) ue_sched_ctrl->drx_inactivity_timer);
|
||||
|
||||
if (harq_pid == 0) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_RETRANSMISSION_HARQ0, (unsigned long) ue_sched_ctrl->drx_retransmission_timer[0]);
|
||||
}
|
||||
@@ -1876,8 +1851,6 @@ void dlsch_scheduler_qos_multiplexing(module_id_t Mod_id, int frameP, sub_frame_
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
* Default DLSCH scheduler for LTE-M
|
||||
@@ -2579,7 +2552,6 @@ schedule_ue_spec_br(module_id_t module_idP,
|
||||
} // end else if ((subframeP == 7) && (round_DL < 8))
|
||||
} // end loop on UE_id
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
@@ -3090,8 +3062,8 @@ schedule_PCH(module_id_t module_idP,
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1A;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = 1; // no TPC
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_1 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = getRIV(n_rb_dl, first_rb, 4);
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0;
|
||||
#endif
|
||||
@@ -3142,7 +3114,6 @@ schedule_PCH(module_id_t module_idP,
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_scheme = (cc->p_eNB==1 ) ? 0 : 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_layers = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.number_of_subbands = 1;
|
||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.codebook_index = ;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.ue_category_capacity = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.pa = 4; // 0 dB
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.delta_power_offset_index = 0;
|
||||
@@ -3151,17 +3122,10 @@ schedule_PCH(module_id_t module_idP,
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.transmission_mode = (cc->p_eNB==1 ) ? 1 : 2;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_prb_per_subband = 1;
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.num_bf_vector = 1;
|
||||
// dl_config_pdu->dlsch_pdu.dlsch_pdu_rel8.bf_vector = ;
|
||||
// Rel10 fields
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel10.pdsch_start = 3;
|
||||
#endif
|
||||
// Rel13 fields
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.ue_type = 0; // regular UE
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.pdsch_payload_type = 2; // not BR
|
||||
dl_config_pdu->dlsch_pdu.dlsch_pdu_rel13.initial_transmission_sf_io = 0xFFFF;
|
||||
#endif
|
||||
dl_req->number_pdu++;
|
||||
eNB->TX_req[CC_id].sfn_sf = (frameP<<4)+subframeP;
|
||||
TX_req = &eNB->TX_req[CC_id].tx_request_body.tx_pdu_list[eNB->TX_req[CC_id].tx_request_body.number_of_pdus];
|
||||
|
||||
@@ -134,10 +134,7 @@ void pre_scd_nb_rbs_required( module_id_t module_idP,
|
||||
for (lc_id = DCCH; lc_id <= DTCH; lc_id++) {
|
||||
rlc_status =
|
||||
mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP,
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, lc_id, 0
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, lc_id, 0,0, 0
|
||||
);
|
||||
UE_template.dl_buffer_total += rlc_status.bytes_in_buffer; //storing the total dlsch buffer
|
||||
}
|
||||
@@ -644,16 +641,18 @@ void dlsch_scheduler_pre_processor_fairRR (module_id_t Mod_id,
|
||||
// Get total available RBS count and total UE count
|
||||
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
|
||||
temp_total_rbs_count = 0;
|
||||
for(uint8_t rbg_i = 0;rbg_i < N_RBG[CC_id];rbg_i++ ){
|
||||
if(rballoc_sub[CC_id][rbg_i] == 0){
|
||||
|
||||
for(uint8_t rbg_i = 0; rbg_i < N_RBG[CC_id]; rbg_i++ ) {
|
||||
if(rballoc_sub[CC_id][rbg_i] == 0) {
|
||||
if((rbg_i == N_RBG[CC_id] -1) &&
|
||||
((N_RB_DL == 25) || (N_RB_DL == 50))){
|
||||
((N_RB_DL == 25) || (N_RB_DL == 50))) {
|
||||
temp_total_rbs_count += (min_rb_unit[CC_id] -1);
|
||||
}else{
|
||||
} else {
|
||||
temp_total_rbs_count += min_rb_unit[CC_id];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
temp_total_ue_count = dlsch_ue_select[CC_id].ue_num;
|
||||
|
||||
for (i = 0; i < dlsch_ue_select[CC_id].ue_num; i++) {
|
||||
@@ -1284,11 +1283,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
header_len_dcch = 2; // 2 bytes DCCH SDU subheader
|
||||
|
||||
if (TBS - ta_len - header_len_dcch > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, (TBS - ta_len - header_len_dcch)
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
); // transport block set size
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, (TBS - ta_len - header_len_dcch),0, 0); // transport block set size
|
||||
sdu_lengths[0] = 0;
|
||||
|
||||
if (rlc_status.bytes_in_buffer > 0) { // There is DCCH to transmit
|
||||
@@ -1297,18 +1292,14 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
module_idP, frameP, subframeP, CC_id,
|
||||
TBS - header_len_dcch);
|
||||
sdu_lengths[0] = mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH, TBS, //not used
|
||||
(char *)
|
||||
&dlsch_buffer
|
||||
[0]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
(char *) &dlsch_buffer[0],0, 0
|
||||
);
|
||||
|
||||
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)){
|
||||
if((rrc_release_info.num_UEs > 0) && (rlc_am_mui.rrc_mui_num > 0)) {
|
||||
while(pthread_mutex_trylock(&rrc_release_freelist)) {
|
||||
/* spin... */
|
||||
}
|
||||
|
||||
uint16_t release_total = 0;
|
||||
|
||||
for(uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
|
||||
@@ -1345,6 +1336,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
if(release_total >= rrc_release_info.num_UEs)
|
||||
break;
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&rrc_release_freelist);
|
||||
}
|
||||
|
||||
@@ -1396,10 +1388,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
|
||||
// check for DCCH1 and update header information (assume 2 byte sub-header)
|
||||
if (TBS - ta_len - header_len_dcch - sdu_length_total > 0) {
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, (TBS - ta_len - header_len_dcch - sdu_length_total)
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
rlc_status = mac_rlc_status_ind(module_idP, rnti, module_idP, frameP, subframeP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, (TBS - ta_len - header_len_dcch - sdu_length_total),0, 0
|
||||
); // transport block set size less allocations for timing advance and
|
||||
// DCCH SDU
|
||||
sdu_lengths[num_sdus] = 0;
|
||||
@@ -1410,12 +1399,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
module_idP, frameP, CC_id,
|
||||
TBS - header_len_dcch - sdu_length_total);
|
||||
sdu_lengths[num_sdus] += mac_rlc_data_req(module_idP, rnti, module_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, DCCH + 1, TBS, //not used
|
||||
(char *)
|
||||
&dlsch_buffer
|
||||
[sdu_length_total]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
(char *) &dlsch_buffer[sdu_length_total],0, 0
|
||||
);
|
||||
T(T_ENB_MAC_UE_DL_SDU, T_INT(module_idP),
|
||||
T_INT(CC_id), T_INT(rnti), T_INT(frameP),
|
||||
@@ -1470,10 +1454,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
ENB_FLAG_YES,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0, 0
|
||||
#endif
|
||||
TBS - ta_len - header_len_dcch - sdu_length_total - header_len_dtch, 0, 0
|
||||
);
|
||||
|
||||
if (rlc_status.bytes_in_buffer > 0) {
|
||||
@@ -1491,10 +1472,7 @@ schedule_ue_spec_fairRR(module_id_t module_idP,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
TBS, //not used
|
||||
(char *)&dlsch_buffer[sdu_length_total]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, 0, 0
|
||||
#endif
|
||||
(char *)&dlsch_buffer[sdu_length_total], 0, 0
|
||||
);
|
||||
T(T_ENB_MAC_UE_DL_SDU,
|
||||
T_INT(module_idP),
|
||||
@@ -2052,6 +2030,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
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;
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
|
||||
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
|
||||
cc_id_flag[CC_id] = 1;
|
||||
continue;
|
||||
@@ -2130,7 +2109,8 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
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;
|
||||
rnti = UE_RNTI(module_idP,first_ue_id[CC_id][temp]);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[first_ue_id[CC_id][temp]].dl_cqi[CC_id],format0);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[first_ue_id[CC_id][temp]].dl_cqi[CC_id],format0);
|
||||
|
||||
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
|
||||
cc_id_flag[CC_id] = 1;
|
||||
break;
|
||||
@@ -2203,6 +2183,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
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;
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
|
||||
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
|
||||
cc_id_flag[CC_id] = 1;
|
||||
continue;
|
||||
@@ -2256,6 +2237,7 @@ void ulsch_scheduler_pre_ue_select_fairRR(
|
||||
format_flag = 2;
|
||||
rnti = UE_RNTI(module_idP,ul_inactivity_id[CC_id][temp]);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_list->UE_sched_ctrl[ul_inactivity_id[CC_id][temp]].dl_cqi[CC_id],format0);
|
||||
|
||||
if (CCE_allocation_infeasible(module_idP,CC_id,format_flag,subframeP,aggregation,rnti) == 1) {
|
||||
cc_id_flag[CC_id] = 1;
|
||||
continue;
|
||||
@@ -2454,20 +2436,20 @@ void ulsch_scheduler_pre_processor_fairRR(module_id_t module_idP,
|
||||
UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = mcs;
|
||||
}
|
||||
} else {
|
||||
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED){
|
||||
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) {
|
||||
// assigne RBS( 6 RBs)
|
||||
first_rb[CC_id] = first_rb[CC_id] + 6;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[0] = 6;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 5;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
|
||||
}else{
|
||||
} else {
|
||||
// assigne RBS( 3 RBs)
|
||||
first_rb[CC_id] = first_rb[CC_id] + 3;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_allocated_nb_rb_ul[0] = 3;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_allocated_rb_table_index_ul = 2;
|
||||
UE_list->UE_template[CC_id][UE_id].pre_assigned_mcs_ul = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if ( ulsch_ue_select[CC_id].list[ulsch_ue_num].ue_priority == SCH_UL_INACTIVE ) {
|
||||
// assigne RBS( 3 RBs)
|
||||
first_rb[CC_id] = first_rb[CC_id] + 3;
|
||||
@@ -2766,7 +2748,7 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
harq_pid = subframe2harqpid(cc,sched_frame,sched_subframeP);
|
||||
rnti = UE_RNTI(CC_id,UE_id);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
aggregation=get_aggregation(get_bw_index(module_idP,CC_id),UE_sched_ctrl[UE_id].dl_cqi[CC_id],format0);
|
||||
LOG_D(MAC,"[eNB %d] frame %d subframe %d,Checking PUSCH %d for UE %d/%x CC %d : aggregation level %d, N_RB_UL %d\n",
|
||||
module_idP,frameP,subframeP,harq_pid,UE_id,rnti,CC_id, aggregation,N_RB_UL);
|
||||
int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes;
|
||||
@@ -2959,7 +2941,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
get_TBS_UL(UE_template->mcs_UL[harq_pid],
|
||||
rb_table[rb_table_index])
|
||||
);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_index],
|
||||
@@ -2969,8 +2950,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
(frameP*10)+subframeP);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if(dlsch_flag == 1) {
|
||||
if(cqi_req == 1) {
|
||||
ul_req_tmp->ul_config_pdu_list[ul_req_index].pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE;
|
||||
@@ -3047,7 +3026,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
LOG_D(MAC,"[eNB %d][PUSCH %d/%x] CC_id %d Frame %d subframeP %d Scheduled UE %d (mcs %d, first rb %d, nb_rb %d, TBS %d, harq_pid %d)\n",
|
||||
module_idP,harq_pid,rnti,CC_id,frameP,subframeP,UE_id,mcs_rv,first_rb[CC_id],ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb,UE_template->TBS_UL[harq_pid],harq_pid);
|
||||
|
||||
|
||||
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
|
||||
//store for possible retransmission
|
||||
UE_template->nb_rb_ul[harq_pid] = ulsch_ue_select[CC_id].list[ulsch_ue_num].nb_rb;
|
||||
@@ -3111,7 +3089,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
0, // n_srs
|
||||
UE_template->TBS_UL[harq_pid]
|
||||
);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp->ul_config_pdu_list[ul_req_index],
|
||||
@@ -3121,8 +3098,6 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
|
||||
(frameP*10)+subframeP);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if(dlsch_flag == 1) {
|
||||
if(cqi_req == 1) {
|
||||
ul_req_tmp->ul_config_pdu_list[ul_req_index].pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_HARQ_RI_PDU_TYPE;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -57,7 +57,7 @@ schedule_ue_spec_phy_test(
|
||||
module_id_t module_idP,
|
||||
frame_t frameP,
|
||||
sub_frame_t subframeP,
|
||||
int* mbsfn_flag
|
||||
int *mbsfn_flag
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
@@ -66,7 +66,6 @@ schedule_ue_spec_phy_test(
|
||||
uint16_t N_RB_DL;
|
||||
uint16_t TBS;
|
||||
uint16_t nb_rb;
|
||||
|
||||
unsigned char harq_pid = (frameP*10+subframeP)%8;
|
||||
uint16_t rnti = 0x1235;
|
||||
uint32_t rb_alloc = 0x1FFFFF;
|
||||
@@ -75,17 +74,14 @@ schedule_ue_spec_phy_test(
|
||||
int32_t cqi = 15;
|
||||
int32_t ndi = (frameP*10+subframeP)/8;
|
||||
int32_t dai = 0;
|
||||
|
||||
eNB_MAC_INST *eNB = RC.mac[module_idP];
|
||||
COMMON_channels_t *cc = eNB->common_channels;
|
||||
nfapi_dl_config_request_body_t *dl_req;
|
||||
nfapi_dl_config_request_pdu_t *dl_config_pdu;
|
||||
|
||||
N_RB_DL = to_prb(cc->mib->message.dl_Bandwidth);
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
LOG_D(MAC, "doing schedule_ue_spec for CC_id %d\n",CC_id);
|
||||
|
||||
dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
|
||||
|
||||
if (mbsfn_flag[CC_id]>0)
|
||||
@@ -93,23 +89,20 @@ schedule_ue_spec_phy_test(
|
||||
|
||||
nb_rb = conv_nprb(0,rb_alloc,N_RB_DL);
|
||||
TBS = get_TBS_DL(mcs,nb_rb);
|
||||
|
||||
LOG_D(MAC,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d harq_pid=%d (rb_alloc=%x, N_RB_DL=%d) pdu_number = %d \n", frameP, subframeP, nb_rb, TBS, mcs, harq_pid, rb_alloc, N_RB_DL, dl_req->number_pdu);
|
||||
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void*)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||
LOG_D(MAC,"schedule_ue_spec_phy_test: subframe %d/%d: nb_rb=%d, TBS=%d, mcs=%d harq_pid=%d (rb_alloc=%x, N_RB_DL=%d) pdu_number = %d \n", frameP, subframeP, nb_rb, TBS, mcs, harq_pid, rb_alloc,
|
||||
N_RB_DL, dl_req->number_pdu);
|
||||
dl_config_pdu = &dl_req->dl_config_pdu_list[dl_req->number_pdu];
|
||||
memset((void *)dl_config_pdu,0,sizeof(nfapi_dl_config_request_pdu_t));
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||
dl_config_pdu->pdu_size = (uint8_t)(2+sizeof(nfapi_dl_config_dci_dl_pdu));
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.dci_format = NFAPI_DL_DCI_FORMAT_1;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level = get_aggregation(get_bw_index(module_idP,CC_id),cqi,format1);
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_allocation_type = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.virtual_resource_block_assignment_flag = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.resource_block_coding = rb_alloc;
|
||||
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti = rnti;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.rnti_type = 1; // CRNTI : see Table 4-10 from SCF082 - nFAPI specifications
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.transmission_power = 6000; // equal to RS power
|
||||
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.harq_process = harq_pid;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tpc = tpc; // dont adjust power when retransmitting
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.new_data_indicator_1 = ndi;
|
||||
@@ -118,80 +111,73 @@ schedule_ue_spec_phy_test(
|
||||
//deactivate second codeword
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.mcs_2 = 0;
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.redundancy_version_2 = 1;
|
||||
|
||||
|
||||
if (cc[CC_id].tdd_Config != NULL) { //TDD
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.downlink_assignment_index = dai;
|
||||
LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, dai %d, mcs %d\n",
|
||||
module_idP,CC_id,harq_pid,dai,mcs);
|
||||
module_idP,CC_id,harq_pid,dai,mcs);
|
||||
} else {
|
||||
LOG_D(MAC,"[eNB %d] Initial transmission CC_id %d : harq_pid %d, mcs %d\n",
|
||||
module_idP,CC_id,harq_pid,mcs);
|
||||
|
||||
module_idP,CC_id,harq_pid,mcs);
|
||||
}
|
||||
|
||||
LOG_D(MAC,"Checking feasibility pdu %d (new sdu)\n",dl_req->number_pdu);
|
||||
|
||||
if (!CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.aggregation_level,rnti)) {
|
||||
|
||||
|
||||
//ue_sched_ctl->round[CC_id][harq_pid] = 0;
|
||||
dl_req->number_dci++;
|
||||
dl_req->number_pdu++;
|
||||
eNB->DL_req[CC_id].sfn_sf = frameP<<4 | subframeP;
|
||||
//eNB->DL_req[CC_id].header.message_id = NFAPI_DL_CONFIG_REQUEST;
|
||||
|
||||
// Toggle NDI for next time
|
||||
/*
|
||||
LOG_D(MAC,"CC_id %d Frame %d, subframeP %d: Toggling Format1 NDI for UE %d (rnti %x/%d) oldNDI %d\n",
|
||||
CC_id, frameP,subframeP,UE_id,
|
||||
rnti,harq_pid,UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]);
|
||||
|
||||
CC_id, frameP,subframeP,UE_id,
|
||||
rnti,harq_pid,UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]);
|
||||
|
||||
UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid]=1-UE_list->UE_template[CC_id][UE_id].oldNDI[harq_pid];
|
||||
UE_list->UE_template[CC_id][UE_id].oldmcs1[harq_pid] = mcs;
|
||||
UE_list->UE_template[CC_id][UE_id].oldmcs2[harq_pid] = 0;
|
||||
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated!=NULL,"physicalConfigDedicated is NULL\n");
|
||||
AssertFatal(UE_list->UE_template[CC_id][UE_id].physicalConfigDedicated->pdsch_ConfigDedicated!=NULL,"physicalConfigDedicated->pdsch_ConfigDedicated is NULL\n");
|
||||
*/
|
||||
|
||||
|
||||
fill_nfapi_dlsch_config(eNB,
|
||||
dl_req,
|
||||
TBS,
|
||||
eNB->pdu_index[CC_id],
|
||||
rnti,
|
||||
0, // type 0 allocation from 7.1.6 in 36.213
|
||||
0, // virtual_resource_block_assignment_flag
|
||||
rb_alloc, // resource_block_coding
|
||||
getQm(mcs),
|
||||
0, // redundancy version
|
||||
1, // transport blocks
|
||||
0, // transport block to codeword swap flag
|
||||
cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme
|
||||
1, // number of layers
|
||||
1, // number of subbands
|
||||
// uint8_t codebook_index,
|
||||
4, // UE category capacity
|
||||
LTE_PDSCH_ConfigDedicated__p_a_dB0,
|
||||
0, // delta_power_offset for TM5
|
||||
0, // ngap
|
||||
0, // nprb
|
||||
cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode
|
||||
0, //number of PRBs treated as one subband, not used here
|
||||
0 // number of beamforming vectors, not used here
|
||||
);
|
||||
|
||||
dl_req,
|
||||
TBS,
|
||||
eNB->pdu_index[CC_id],
|
||||
rnti,
|
||||
0, // type 0 allocation from 7.1.6 in 36.213
|
||||
0, // virtual_resource_block_assignment_flag
|
||||
rb_alloc, // resource_block_coding
|
||||
getQm(mcs),
|
||||
0, // redundancy version
|
||||
1, // transport blocks
|
||||
0, // transport block to codeword swap flag
|
||||
cc[CC_id].p_eNB == 1 ? 0 : 1, // transmission_scheme
|
||||
1, // number of layers
|
||||
1, // number of subbands
|
||||
// uint8_t codebook_index,
|
||||
4, // UE category capacity
|
||||
LTE_PDSCH_ConfigDedicated__p_a_dB0,
|
||||
0, // delta_power_offset for TM5
|
||||
0, // ngap
|
||||
0, // nprb
|
||||
cc[CC_id].p_eNB == 1 ? 1 : 2, // transmission mode
|
||||
0, //number of PRBs treated as one subband, not used here
|
||||
0 // number of beamforming vectors, not used here
|
||||
);
|
||||
eNB->TX_req[CC_id].sfn_sf = fill_nfapi_tx_req(&eNB->TX_req[CC_id].tx_request_body,
|
||||
(frameP*10)+subframeP,
|
||||
TBS,
|
||||
eNB->pdu_index[CC_id],
|
||||
eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0]);
|
||||
}
|
||||
else {
|
||||
(frameP*10)+subframeP,
|
||||
TBS,
|
||||
eNB->pdu_index[CC_id],
|
||||
eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0]);
|
||||
} else {
|
||||
LOG_W(MAC,"[eNB_scheduler_phytest] DCI allocation infeasible!\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
|
||||
{
|
||||
void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP) {
|
||||
uint16_t first_rb[MAX_NUM_CCs];
|
||||
int UE_id = 0;
|
||||
uint8_t aggregation = 2;
|
||||
@@ -218,158 +204,132 @@ void schedule_ulsch_phy_test(module_id_t module_idP,frame_t frameP,sub_frame_t s
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = &mac->HI_DCI0_req[CC_id][subframeP];
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
|
||||
|
||||
//nfapi_ul_config_request_pdu_t *ul_config_pdu = &ul_req->ul_config_pdu_list[0];;
|
||||
nfapi_ul_config_request_body_t *ul_req = &mac->UL_req[CC_id].ul_config_request_body;
|
||||
|
||||
N_RB_UL = to_prb(cc->mib->message.dl_Bandwidth);
|
||||
switch(N_RB_UL){
|
||||
case 100:
|
||||
nb_rb = 96;
|
||||
break;
|
||||
case 50:
|
||||
nb_rb = 48;
|
||||
break;
|
||||
case 25:
|
||||
nb_rb = 24;
|
||||
break;
|
||||
|
||||
switch(N_RB_UL) {
|
||||
case 100:
|
||||
nb_rb = 96;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
nb_rb = 48;
|
||||
break;
|
||||
|
||||
case 25:
|
||||
nb_rb = 24;
|
||||
break;
|
||||
}
|
||||
|
||||
mac->UL_req[CC_id].sfn_sf = (sched_frame<<4) + sched_subframe;
|
||||
hi_dci0_req->sfn_sf = (frameP << 4) + subframeP;
|
||||
|
||||
|
||||
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
//rnti = UE_RNTI(module_idP,UE_id);
|
||||
//leave out first RB for PUCCH
|
||||
first_rb[CC_id] = 1;
|
||||
// loop over all active UEs
|
||||
// loop over all active UEs
|
||||
// if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
|
||||
UE_template = &UE_list->UE_template[CC_id][UE_id];
|
||||
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
harq_pid = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe);
|
||||
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid];
|
||||
//power control
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
// this is the snr and this should be constant (regardless of mcs)
|
||||
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
||||
// new transmission
|
||||
ndi = 1-UE_template->oldNDI_UL[harq_pid];
|
||||
UE_template->oldNDI_UL[harq_pid]=ndi;
|
||||
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 = mcs;
|
||||
UE_template->mcs_UL[harq_pid] = mcs;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
|
||||
// buffer_occupancy = UE_template->ul_total_buffer;
|
||||
UE_template->TBS_UL[harq_pid] = get_TBS_UL(mcs,nb_rb);
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += nb_rb;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,nb_rb);
|
||||
// buffer_occupancy -= TBS;
|
||||
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
|
||||
//store for possible retransmission
|
||||
UE_template->nb_rb_ul[harq_pid] = nb_rb;
|
||||
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
|
||||
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
|
||||
// adjust total UL buffer status by TBS, wait for UL sdus to do final update
|
||||
//UE_template->ul_total_buffer = UE_template->TBS_UL[harq_pid];
|
||||
// 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)
|
||||
// save it for a potential retransmission
|
||||
UE_template->cshift[harq_pid] = cshift;
|
||||
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||
memset((void *)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_dci_pdu);
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = NFAPI_UL_DCI_FORMAT_0;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power = 6000;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start = first_rb[CC_id];
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.number_of_resource_block = nb_rb;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1 = mcs;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cyclic_shift_2_for_drms = cshift;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.frequency_hopping_enabled_flag = 0;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.new_data_indication_1 = ndi;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request = cqi_req;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframe];
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid;
|
||||
hi_dci0_req_body->number_of_dci++;
|
||||
ul_req_index = 0;
|
||||
|
||||
// if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel
|
||||
for(ul_req_index = 0; ul_req_index < ul_req->number_of_pdus; ul_req_index++) {
|
||||
if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE) {
|
||||
LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UE_template = &UE_list->UE_template[CC_id][UE_id];
|
||||
UE_sched_ctrl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
harq_pid = subframe2harqpid(&cc[CC_id],sched_frame,sched_subframe);
|
||||
// Add UL_config PDUs
|
||||
fill_nfapi_ulsch_config_request_rel8(& ul_req->ul_config_pdu_list[ul_req_index],
|
||||
cqi_req,
|
||||
cc,
|
||||
0,//UE_template->physicalConfigDedicated,
|
||||
get_tmode(module_idP,CC_id,UE_id),
|
||||
mac->ul_handle,//eNB->ul_handle,
|
||||
rnti,
|
||||
first_rb[CC_id], // resource_block_start
|
||||
nb_rb, // number_of_resource_blocks
|
||||
mcs,
|
||||
cshift, // cyclic_shift_2_for_drms
|
||||
0, // frequency_hopping_enabled_flag
|
||||
0, // frequency_hopping_bits
|
||||
ndi, // new_data_indication
|
||||
0, // redundancy_version
|
||||
harq_pid, // harq_process_number
|
||||
0, // ul_tx_mode
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
get_TBS_UL(mcs,nb_rb)
|
||||
);
|
||||
|
||||
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req_index],
|
||||
UE_template->rach_resource_type>2 ? 2 : 1,
|
||||
1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
(frameP*10)+subframeP);
|
||||
}
|
||||
|
||||
RC.eNB[module_idP][CC_id]->pusch_stats_BO[UE_id][(frameP*10)+subframeP] = UE_template->TBS_UL[harq_pid];
|
||||
|
||||
|
||||
|
||||
//power control
|
||||
//compute the expected ULSCH RX power (for the stats)
|
||||
|
||||
// this is the snr and this should be constant (regardless of mcs)
|
||||
snr = (5 * UE_sched_ctrl->pusch_snr[CC_id] - 640) / 10;
|
||||
|
||||
// new transmission
|
||||
|
||||
ndi = 1-UE_template->oldNDI_UL[harq_pid];
|
||||
UE_template->oldNDI_UL[harq_pid]=ndi;
|
||||
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 = mcs;
|
||||
UE_template->mcs_UL[harq_pid] = mcs;//cmin (UE_template->pre_assigned_mcs_ul, openair_daq_vars.target_ue_ul_mcs); // adjust, based on user-defined MCS
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_mcs2 = mcs;
|
||||
// buffer_occupancy = UE_template->ul_total_buffer;
|
||||
|
||||
|
||||
|
||||
UE_template->TBS_UL[harq_pid] = get_TBS_UL(mcs,nb_rb);
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_rx += nb_rb;
|
||||
UE_list->eNB_UE_stats[CC_id][UE_id].ulsch_TBS = get_TBS_UL(mcs,nb_rb);
|
||||
// buffer_occupancy -= TBS;
|
||||
|
||||
|
||||
|
||||
// bad indices : 20 (40 PRB), 21 (45 PRB), 22 (48 PRB)
|
||||
//store for possible retransmission
|
||||
UE_template->nb_rb_ul[harq_pid] = nb_rb;
|
||||
UE_template->first_rb_ul[harq_pid] = first_rb[CC_id];
|
||||
|
||||
UE_sched_ctrl->ul_scheduled |= (1<<harq_pid);
|
||||
|
||||
// adjust total UL buffer status by TBS, wait for UL sdus to do final update
|
||||
//UE_template->ul_total_buffer = UE_template->TBS_UL[harq_pid];
|
||||
// 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)
|
||||
// save it for a potential retransmission
|
||||
UE_template->cshift[harq_pid] = cshift;
|
||||
|
||||
hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci + hi_dci0_req_body->number_of_hi];
|
||||
memset((void*)hi_dci0_pdu,0,sizeof(nfapi_hi_dci0_request_pdu_t));
|
||||
hi_dci0_pdu->pdu_type = NFAPI_HI_DCI0_DCI_PDU_TYPE;
|
||||
hi_dci0_pdu->pdu_size = 2+sizeof(nfapi_hi_dci0_dci_pdu);
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dci_format = NFAPI_UL_DCI_FORMAT_0;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.aggregation_level = aggregation;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.rnti = rnti;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.transmission_power = 6000;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.resource_block_start = first_rb[CC_id];
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.number_of_resource_block = nb_rb;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.mcs_1 = mcs;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cyclic_shift_2_for_drms = cshift;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.frequency_hopping_enabled_flag = 0;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.new_data_indication_1 = ndi;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.tpc = tpc;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.cqi_csi_request = cqi_req;
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.dl_assignment_index = UE_template->DAI_ul[sched_subframe];
|
||||
hi_dci0_pdu->dci_pdu.dci_pdu_rel8.harq_pid = harq_pid;
|
||||
|
||||
|
||||
hi_dci0_req_body->number_of_dci++;
|
||||
|
||||
ul_req_index = 0;
|
||||
for(ul_req_index = 0;ul_req_index < ul_req->number_of_pdus;ul_req_index++){
|
||||
if(ul_req->ul_config_pdu_list[ul_req_index].pdu_type == NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE){
|
||||
LOG_D(MAC,"Frame %d, Subframe %d:rnti %x ul_req_index %d Switched UCI HARQ to ULSCH HARQ(first)\n",frameP,subframeP,rnti,ul_req_index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Add UL_config PDUs
|
||||
fill_nfapi_ulsch_config_request_rel8(& ul_req->ul_config_pdu_list[ul_req_index],
|
||||
cqi_req,
|
||||
cc,
|
||||
0,//UE_template->physicalConfigDedicated,
|
||||
get_tmode(module_idP,CC_id,UE_id),
|
||||
mac->ul_handle,//eNB->ul_handle,
|
||||
rnti,
|
||||
first_rb[CC_id], // resource_block_start
|
||||
nb_rb, // number_of_resource_blocks
|
||||
mcs,
|
||||
cshift, // cyclic_shift_2_for_drms
|
||||
0, // frequency_hopping_enabled_flag
|
||||
0, // frequency_hopping_bits
|
||||
ndi, // new_data_indication
|
||||
0, // redundancy_version
|
||||
harq_pid, // harq_process_number
|
||||
0, // ul_tx_mode
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
get_TBS_UL(mcs,nb_rb)
|
||||
);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
if (UE_template->rach_resource_type>0) { // This is a BL/CE UE allocation
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req->ul_config_pdu_list[ul_req_index],
|
||||
UE_template->rach_resource_type>2 ? 2 : 1,
|
||||
1, //total_number_of_repetitions
|
||||
1, //repetition_number
|
||||
(frameP*10)+subframeP);
|
||||
}
|
||||
#endif
|
||||
ul_req->number_of_pdus = 1;
|
||||
mac->ul_handle++;
|
||||
|
||||
|
||||
|
||||
add_ue_ulsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_UL_SCHEDULED);
|
||||
|
||||
// increment first rb for next UE allocation
|
||||
first_rb[CC_id]+= nb_rb;
|
||||
|
||||
|
||||
ul_req->number_of_pdus = 1;
|
||||
mac->ul_handle++;
|
||||
add_ue_ulsch_info(module_idP,
|
||||
CC_id,
|
||||
UE_id,
|
||||
subframeP,
|
||||
S_UL_SCHEDULED);
|
||||
// increment first rb for next UE allocation
|
||||
first_rb[CC_id]+= nb_rb;
|
||||
} // loop of CC_id
|
||||
}
|
||||
|
||||
@@ -351,7 +351,6 @@ subframe2harqpid(COMMON_channels_t *cc,
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
AssertFatal(cc != NULL, "cc is null\n");
|
||||
|
||||
uint8_t ret = 255;
|
||||
|
||||
if (cc->tdd_Config == NULL) { // FDD
|
||||
@@ -892,22 +891,19 @@ get_csi_params(COMMON_channels_t *cc,
|
||||
*Npd = 160;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 157;
|
||||
} else if (cqi_PMI_ConfigIndex > 317) {
|
||||
|
||||
if (cqi_PMI_ConfigIndex <= 349) { // 32 ms CQI_PMI period
|
||||
*Npd = 32;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 318;
|
||||
} else if (cqi_PMI_ConfigIndex <= 413) { // 64 ms CQI_PMI period
|
||||
*Npd = 64;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 350;
|
||||
} else if (cqi_PMI_ConfigIndex <= 541) { // 128 ms CQI_PMI period
|
||||
*Npd = 128;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 414;
|
||||
if (cqi_PMI_ConfigIndex <= 349) { // 32 ms CQI_PMI period
|
||||
*Npd = 32;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 318;
|
||||
} else if (cqi_PMI_ConfigIndex <= 413) { // 64 ms CQI_PMI period
|
||||
*Npd = 64;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 350;
|
||||
} else if (cqi_PMI_ConfigIndex <= 541) { // 128 ms CQI_PMI period
|
||||
*Npd = 128;
|
||||
*N_OFFSET_CQI = cqi_PMI_ConfigIndex - 414;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else { // TDD
|
||||
if (cqi_PMI_ConfigIndex == 0) { // all UL subframes
|
||||
if (cqi_PMI_ConfigIndex == 0) { // all UL subframes
|
||||
*Npd = 1;
|
||||
*N_OFFSET_CQI = 0;
|
||||
} else if (cqi_PMI_ConfigIndex <= 6) { // 5 ms CQI_PMI period
|
||||
@@ -1029,7 +1025,6 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t *cc,
|
||||
return (4 + (N << 1) + 4 + (N << 1) + 4);
|
||||
|
||||
break;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
|
||||
case LTE_CQI_ReportModeAperiodic_rm32_v1250:
|
||||
AssertFatal(tmode == 4 || tmode == 6 || tmode == 8 || tmode == 9 || tmode == 10, "Illegal TM (%d) for CQI_ReportModeAperiodic_rm32\n",
|
||||
@@ -1064,7 +1059,6 @@ get_dl_cqi_pmi_size_pusch(COMMON_channels_t *cc,
|
||||
return (4 + 4 + 4);
|
||||
|
||||
break;
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0)) */
|
||||
}
|
||||
|
||||
AssertFatal(1 == 0, "Shouldn't get here\n");
|
||||
@@ -1147,7 +1141,6 @@ fill_nfapi_dl_dci_1A(nfapi_dl_config_request_pdu_t *dl_config_pdu,
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
memset((void *) dl_config_pdu, 0, sizeof(nfapi_dl_config_request_pdu_t));
|
||||
|
||||
dl_config_pdu->pdu_type = NFAPI_DL_CONFIG_DCI_DL_PDU_TYPE;
|
||||
dl_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_dl_config_dci_dl_pdu));
|
||||
dl_config_pdu->dci_dl_pdu.dci_dl_pdu_rel8.tl.tag = NFAPI_DL_CONFIG_REQUEST_DCI_DL_PDU_REL8_TAG;
|
||||
@@ -1185,7 +1178,6 @@ program_dlsch_acknak(module_id_t module_idP,
|
||||
int use_simultaneous_pucch_pusch = 0;
|
||||
nfapi_ul_config_ulsch_harq_information *ulsch_harq_information = NULL;
|
||||
nfapi_ul_config_harq_information *harq_information = NULL;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 2, 0))
|
||||
struct LTE_PhysicalConfigDedicated__ext2 *ext2 = UE_list->UE_template[CC_idP][UE_idP].physicalConfigDedicated->ext2;
|
||||
|
||||
if (ext2 &&
|
||||
@@ -1194,7 +1186,6 @@ program_dlsch_acknak(module_id_t module_idP,
|
||||
*ext2->pucch_ConfigDedicated_v1020->simultaneousPUCCH_PUSCH_r10 == LTE_PUCCH_ConfigDedicated_v1020__simultaneousPUCCH_PUSCH_r10_true)
|
||||
use_simultaneous_pucch_pusch = 1;
|
||||
|
||||
#endif
|
||||
// pucch1 and pusch feedback is similar, namely in n+k subframes from now
|
||||
// This is used in the following "if/else" condition to check if there isn't or is already an UL grant in n+k
|
||||
int16_t ul_absSF = get_pucch1_absSF(&cc[CC_idP],
|
||||
@@ -1385,17 +1376,6 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
|
||||
struct LTE_PUSCH_ConfigDedicated *puschConfigDedicated = physicalConfigDedicated->pusch_ConfigDedicated;
|
||||
AssertFatal(puschConfigDedicated != NULL, "physicalConfigDedicated->puschConfigDedicated for rnti %x is null\n",
|
||||
rntiP);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 2, 0))
|
||||
/* if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2) puschConfigDedicated_v1020 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext2->pusch_ConfigDedicated_v1020;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(11, 3, 0))
|
||||
if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4) puschConfigDedicated_v1130 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext4->pusch_ConfigDedicated_v1130;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
if (UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5) puschConfigDedicated_v1250 = UE_list->UE_template[CC_idP][UE_id].physicalConfigDedicated->ext5->pusch_ConfigDedicated_v1250;
|
||||
#endif
|
||||
*/
|
||||
#endif
|
||||
harq_information_rel10->delta_offset_harq = puschConfigDedicated->betaOffset_ACK_Index;
|
||||
harq_information_rel10->tl.tag = NFAPI_UL_CONFIG_REQUEST_ULSCH_HARQ_INFORMATION_REL10_TAG;
|
||||
struct LTE_PUCCH_ConfigDedicated *pucch_ConfigDedicated = physicalConfigDedicated->pucch_ConfigDedicated;
|
||||
@@ -1424,6 +1404,7 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
|
||||
else
|
||||
harq_information_rel10->harq_size = 1;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default: // for any other TM we need 2 bits harq
|
||||
@@ -1438,6 +1419,7 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
|
||||
else
|
||||
harq_information_rel10->harq_size = 2;
|
||||
}
|
||||
|
||||
break;
|
||||
} // get Tmode
|
||||
|
||||
@@ -1582,7 +1564,7 @@ fill_nfapi_uci_acknak(module_id_t module_idP,
|
||||
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_UCI_HARQ_PDU_TYPE;
|
||||
ul_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_ul_config_uci_harq_pdu));
|
||||
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.tl.tag = NFAPI_UL_CONFIG_REQUEST_UE_INFORMATION_REL8_TAG;
|
||||
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.handle = 0; // don't know how to use this
|
||||
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.handle = 0; // don't know how to use this
|
||||
ul_config_pdu->uci_harq_pdu.ue_information.ue_information_rel8.rnti = rntiP;
|
||||
fill_nfapi_harq_information(module_idP,
|
||||
CC_idP,
|
||||
@@ -1601,7 +1583,6 @@ fill_nfapi_uci_acknak(module_id_t module_idP,
|
||||
ul_req_body->tl.tag = NFAPI_UL_CONFIG_REQUEST_BODY_TAG;
|
||||
ul_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
|
||||
ul_req->sfn_sf = (ackNAK_absSF/10) << 4 | ackNAK_absSF%10;
|
||||
|
||||
return (((ackNAK_absSF / 10) << 4) + (ackNAK_absSF % 10));
|
||||
}
|
||||
|
||||
@@ -1774,7 +1755,6 @@ fill_nfapi_ulsch_config_request_rel8(nfapi_ul_config_request_pdu_t *ul_config_pd
|
||||
return;
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
fill_nfapi_ulsch_config_request_emtc(nfapi_ul_config_request_pdu_t *ul_config_pdu,
|
||||
@@ -1933,7 +1913,6 @@ narrowband_to_first_rb(COMMON_channels_t *cc,
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
void
|
||||
@@ -2141,10 +2120,8 @@ int
|
||||
add_new_ue(module_id_t mod_idP,
|
||||
int cc_idP,
|
||||
rnti_t rntiP,
|
||||
int harq_pidP
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, uint8_t rach_resource_type
|
||||
#endif
|
||||
int harq_pidP,
|
||||
uint8_t rach_resource_type
|
||||
)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
@@ -2177,9 +2154,7 @@ add_new_ue(module_id_t mod_idP,
|
||||
#if defined(USRP_REC_PLAY) // not specific to record/playback ?
|
||||
UE_list->UE_template[cc_idP][UE_id].pre_assigned_mcs_ul = 0;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
UE_list->UE_template[cc_idP][UE_id].rach_resource_type = rach_resource_type;
|
||||
#endif
|
||||
memset((void *) &UE_list->UE_sched_ctrl[UE_id],
|
||||
0,
|
||||
sizeof(UE_sched_ctrl_t));
|
||||
@@ -2239,14 +2214,11 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
}
|
||||
|
||||
pCC_id = UE_PCCID(mod_idP, UE_id);
|
||||
|
||||
LOG_I(MAC,"Removing UE %d from Primary CC_id %d (rnti %x)\n",
|
||||
UE_id,
|
||||
pCC_id,
|
||||
rntiP);
|
||||
|
||||
dump_ue_list(UE_list, 0); // DL list displayed in LOG_T(MAC)
|
||||
|
||||
UE_list->active[UE_id] = FALSE;
|
||||
UE_list->num_UEs--;
|
||||
|
||||
@@ -2274,8 +2246,8 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
|
||||
/* Clear all remaining pending transmissions */
|
||||
memset(&UE_list->UE_template[pCC_id][UE_id],
|
||||
0,
|
||||
sizeof(UE_TEMPLATE));
|
||||
0,
|
||||
sizeof(UE_TEMPLATE));
|
||||
ue_stats = &UE_list->eNB_UE_stats[pCC_id][UE_id];
|
||||
ue_stats->total_rbs_used = 0;
|
||||
ue_stats->total_rbs_used_retx = 0;
|
||||
@@ -2300,11 +2272,9 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
ue_stats->total_pdu_bytes_rx = 0;
|
||||
ue_stats->total_num_pdus_rx = 0;
|
||||
ue_stats->total_num_errors_rx = 0;
|
||||
|
||||
eNB_ulsch_info[mod_idP][pCC_id][UE_id].rnti = NOT_A_RNTI;
|
||||
eNB_ulsch_info[mod_idP][pCC_id][UE_id].status = S_UL_NONE;
|
||||
eNB_ulsch_info[mod_idP][pCC_id][UE_id].serving_num = 0;
|
||||
|
||||
eNB_dlsch_info[mod_idP][pCC_id][UE_id].rnti = NOT_A_RNTI;
|
||||
eNB_dlsch_info[mod_idP][pCC_id][UE_id].status = S_DL_NONE;
|
||||
eNB_dlsch_info[mod_idP][pCC_id][UE_id].serving_num = 0;
|
||||
@@ -2319,10 +2289,11 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
rntiP);
|
||||
}
|
||||
|
||||
if(rrc_release_info.num_UEs > 0){
|
||||
if(rrc_release_info.num_UEs > 0) {
|
||||
while(pthread_mutex_trylock(&rrc_release_freelist)) {
|
||||
/* spin... */
|
||||
}
|
||||
|
||||
uint16_t release_total = 0;
|
||||
|
||||
for (uint16_t release_num = 0; release_num < NUMBER_OF_UE_MAX; release_num++) {
|
||||
@@ -2342,6 +2313,7 @@ rrc_mac_remove_ue(module_id_t mod_idP,
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&rrc_release_freelist);
|
||||
}
|
||||
|
||||
@@ -2529,7 +2501,6 @@ UE_is_to_be_scheduled(module_id_t module_idP,
|
||||
return 0;
|
||||
|
||||
rnti_t ue_rnti = UE_RNTI(module_idP, UE_id);
|
||||
|
||||
LOG_D(MAC, "[eNB %d][PUSCH] Checking UL requirements UE %d/%x\n",
|
||||
module_idP,
|
||||
UE_id,
|
||||
@@ -2548,7 +2519,6 @@ UE_is_to_be_scheduled(module_id_t module_idP,
|
||||
ue_rnti,
|
||||
UE_template->ul_buffer_info[LCGID0],
|
||||
UE_template->ul_SR);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3945,7 +3915,6 @@ extract_harq(module_id_t mod_idP,
|
||||
sub_frame_t subframe_tx;
|
||||
int frame_tx;
|
||||
uint8_t harq_pid;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 0, 0))
|
||||
LTE_PhysicalConfigDedicated_t *physicalConfigDedicated = UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated;
|
||||
|
||||
if (physicalConfigDedicated != NULL && physicalConfigDedicated->pucch_ConfigDedicated != NULL &&
|
||||
@@ -3955,8 +3924,6 @@ extract_harq(module_id_t mod_idP,
|
||||
spatial_bundling = 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
for (i = 0; i < numCC; i++) {
|
||||
tmode[i] = get_tmode(mod_idP,
|
||||
i,
|
||||
@@ -4058,6 +4025,7 @@ extract_harq(module_id_t mod_idP,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 1: // Channel Selection
|
||||
@@ -4154,17 +4122,14 @@ extract_harq(module_id_t mod_idP,
|
||||
if (pdu[0] == 1) { // ACK
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||
|
||||
/* CDRX: PUCCH gives an ACK, so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
|
||||
} else if (pdu[0] == 2 || pdu[0] == 4) { // NAK (treat DTX as NAK)
|
||||
sched_ctl->round[CC_idP][harq_pid]++; // increment round
|
||||
|
||||
if (sched_ctl->round[CC_idP][harq_pid] == 4) {
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||
|
||||
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
}
|
||||
@@ -4191,7 +4156,6 @@ extract_harq(module_id_t mod_idP,
|
||||
if (num_ack_nak == 2 && sched_ctl->round[CC_idP][harq_pid] < 8 && sched_ctl->tbcnt[CC_idP][harq_pid] == 1 && pdu[0] == 1 && pdu[1] == 1) {
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8;
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||
|
||||
/* CDRX: PUCCH gives an ACK, so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
}
|
||||
@@ -4205,7 +4169,6 @@ extract_harq(module_id_t mod_idP,
|
||||
if (sched_ctl->round[CC_idP][harq_pid] == 4) {
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||
|
||||
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
}
|
||||
@@ -4223,7 +4186,6 @@ extract_harq(module_id_t mod_idP,
|
||||
if (sched_ctl->round[CC_idP][harq_pid] == 4) {
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0; /* TODO: do we have to set it to 0? */
|
||||
|
||||
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
}
|
||||
@@ -4236,7 +4198,6 @@ extract_harq(module_id_t mod_idP,
|
||||
if (sched_ctl->round[CC_idP][harq_pid] == 4) {
|
||||
sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
|
||||
sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
|
||||
|
||||
/* CDRX: PUCCH gives an NACK and max number of repetitions reached so reset corresponding HARQ RTT */
|
||||
sched_ctl->harq_rtt_timer[CC_idP][harq_pid] = 0;
|
||||
}
|
||||
@@ -4933,7 +4894,6 @@ extract_pusch_csi(module_id_t mod_idP,
|
||||
}
|
||||
|
||||
break;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(12, 5, 0))
|
||||
|
||||
case LTE_CQI_ReportModeAperiodic_rm32_v1250:
|
||||
AssertFatal(tmode == 4 || tmode == 5 || tmode == 6 || tmode == 8 || tmode == 9 || tmode == 10,
|
||||
@@ -4941,8 +4901,6 @@ extract_pusch_csi(module_id_t mod_idP,
|
||||
tmode);
|
||||
AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm32 to be done\n");
|
||||
break;
|
||||
#endif
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(13, 1, 0))
|
||||
|
||||
case LTE_CQI_ReportModeAperiodic_rm10_v1310:
|
||||
AssertFatal(tmode == 1 || tmode == 2 || tmode == 3 || tmode == 7, "Illegal transmission mode %d for CQI_ReportModeAperiodic_rm10\n",
|
||||
@@ -4956,7 +4914,6 @@ extract_pusch_csi(module_id_t mod_idP,
|
||||
tmode);
|
||||
AssertFatal(1 == 0, "CQI_ReportModeAperiodic_rm11 to be done\n");
|
||||
break;
|
||||
#endif /* #if (LTE_RRC_VERSION >= MAKE_VERSION(13, 1, 0)) */
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -5054,7 +5011,7 @@ SR_indication(module_id_t mod_idP,
|
||||
if (UE_id != -1) {
|
||||
UE_scheduling_ctrl = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
|
||||
if ((UE_scheduling_ctrl->cdrx_configured == TRUE) &&
|
||||
if ((UE_scheduling_ctrl->cdrx_configured == TRUE) &&
|
||||
(UE_scheduling_ctrl->dci0_ongoing_timer > 0) &&
|
||||
(UE_scheduling_ctrl->dci0_ongoing_timer < 8)) {
|
||||
LOG_D(MAC, "[eNB %d][SR %x] Frame %d subframeP %d Signaling SR for UE %d on CC_id %d. \
|
||||
@@ -5075,6 +5032,7 @@ SR_indication(module_id_t mod_idP,
|
||||
UE_id,
|
||||
cc_idP);
|
||||
}
|
||||
|
||||
UE_list->UE_template[cc_idP][UE_id].ul_SR = 1;
|
||||
UE_list->UE_template[cc_idP][UE_id].ul_active = TRUE;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SR_INDICATION, 1);
|
||||
@@ -5089,7 +5047,7 @@ SR_indication(module_id_t mod_idP,
|
||||
UE_id,
|
||||
cc_idP);
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
rrc_eNB_ue_context_t *ue_contextP = NULL;
|
||||
UE_sched_ctrl_t *UE_scheduling_control = NULL;
|
||||
UE_TEMPLATE *UE_template_ptr = NULL;
|
||||
|
||||
/* Init */
|
||||
current_rnti = rntiP;
|
||||
UE_id = find_UE_id(enb_mod_idP, current_rnti);
|
||||
@@ -148,7 +147,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (UE_id != -1) {
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
|
||||
|
||||
LOG_D(MAC, "[eNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n",
|
||||
enb_mod_idP,
|
||||
harq_pid,
|
||||
@@ -159,7 +157,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
current_rnti,
|
||||
UE_id,
|
||||
ul_cqi);
|
||||
|
||||
AssertFatal(UE_scheduling_control->round_UL[CC_idP][harq_pid] < 8, "round >= 8\n");
|
||||
|
||||
if (sduP != NULL) {
|
||||
@@ -174,7 +171,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_scheduling_control->ta_update = (UE_scheduling_control->ta_update * 3 + timing_advance) / 4;
|
||||
UE_scheduling_control->pusch_snr[CC_idP] = ul_cqi;
|
||||
UE_scheduling_control->ul_consecutive_errors = 0;
|
||||
|
||||
first_rb = UE_template_ptr->first_rb_ul[harq_pid];
|
||||
|
||||
if (UE_scheduling_control->ul_out_of_sync > 0) {
|
||||
@@ -231,7 +227,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE) {
|
||||
/* Synchronous UL HARQ */
|
||||
UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
|
||||
/*
|
||||
/*
|
||||
* The NACK is programmed in n+4 subframes, so UE will have drxRetransmission running.
|
||||
* Setting ul_synchronous_harq_timer = 5 will trigger drxRetransmission timer.
|
||||
* Note: in case of asynchronous UL HARQ process restart here relevant RTT timer.
|
||||
@@ -240,13 +236,11 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
}
|
||||
|
||||
first_rb = UE_template_ptr->first_rb_ul[harq_pid];
|
||||
|
||||
/* Program NACK for PHICH */
|
||||
LOG_D(MAC, "Programming PHICH NACK for rnti %x harq_pid %d (first_rb %d)\n",
|
||||
current_rnti,
|
||||
harq_pid,
|
||||
first_rb);
|
||||
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req = NULL;
|
||||
uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP], subframeP);
|
||||
hi_dci0_req = &mac->HI_DCI0_req[CC_idP][(subframeP + sf_ahead_dl) % 10];
|
||||
@@ -270,13 +264,11 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
// if UE_id == -1
|
||||
} else if ((RA_id = find_RA_id(enb_mod_idP, CC_idP, current_rnti)) != -1) { // Check if this is an RA process for the rnti
|
||||
RA_t *ra = (RA_t *) &(mac->common_channels[CC_idP].ra[RA_id]);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
if (ra->rach_resource_type > 0) {
|
||||
harq_pid = 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
AssertFatal(mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx > 1,
|
||||
"maxHARQ %d should be greater than 1\n",
|
||||
(int) mac->common_channels[CC_idP].radioResourceConfigCommon->rach_ConfigCommon.maxHARQ_Msg3Tx);
|
||||
@@ -386,7 +378,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
CC_idP,
|
||||
rx_ces[i],
|
||||
UE_template_ptr->phr_info);
|
||||
|
||||
UE_template_ptr->phr_info_configured = 1;
|
||||
UE_scheduling_control->phr_received = 1;
|
||||
}
|
||||
@@ -418,13 +409,11 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
CC_idP,
|
||||
old_rnti,
|
||||
old_UE_id);
|
||||
|
||||
UE_id = old_UE_id;
|
||||
current_rnti = old_rnti;
|
||||
/* Clear timer */
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
|
||||
|
||||
UE_scheduling_control->uplane_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_failure_timer = 0;
|
||||
@@ -437,6 +426,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
subframeP,
|
||||
old_rnti);
|
||||
}
|
||||
|
||||
UE_template_ptr->ul_SR = 1;
|
||||
UE_scheduling_control->crnti_reconfigurationcomplete_flag = 1;
|
||||
UE_list->UE_template[UE_PCCID(enb_mod_idP, UE_id)][UE_id].configured = 1;
|
||||
@@ -461,51 +451,49 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (RA_id != -1) {
|
||||
RA_t *ra = &(mac->common_channels[CC_idP].ra[RA_id]);
|
||||
int8_t ret = mac_rrc_data_ind(enb_mod_idP,
|
||||
CC_idP,
|
||||
frameP, subframeP,
|
||||
UE_id,
|
||||
old_rnti,
|
||||
DCCH,
|
||||
(uint8_t *) payload_ptr,
|
||||
rx_lengths[i],
|
||||
0
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,ra->rach_resource_type > 0
|
||||
#endif
|
||||
);
|
||||
CC_idP,
|
||||
frameP, subframeP,
|
||||
UE_id,
|
||||
old_rnti,
|
||||
DCCH,
|
||||
(uint8_t *) payload_ptr,
|
||||
rx_lengths[i],
|
||||
0,ra->rach_resource_type > 0
|
||||
);
|
||||
|
||||
/* Received a new rnti */
|
||||
if (ret == 0) {
|
||||
ra->state = MSGCRNTI;
|
||||
LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n",
|
||||
enb_mod_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
CC_idP,
|
||||
old_rnti,
|
||||
old_UE_id);
|
||||
UE_id = old_UE_id;
|
||||
current_rnti = old_rnti;
|
||||
ra->rnti = old_rnti;
|
||||
ra->crnti_rrc_mui = rrc_eNB_mui-1;
|
||||
ra->crnti_harq_pid = -1;
|
||||
ra->state = MSGCRNTI;
|
||||
LOG_I(MAC, "[eNB %d] Frame %d, Subframe %d CC_id %d : (rnti %x UE_id %d) Received rnti(Msg4)\n",
|
||||
enb_mod_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
CC_idP,
|
||||
old_rnti,
|
||||
old_UE_id);
|
||||
UE_id = old_UE_id;
|
||||
current_rnti = old_rnti;
|
||||
ra->rnti = old_rnti;
|
||||
ra->crnti_rrc_mui = rrc_eNB_mui-1;
|
||||
ra->crnti_harq_pid = -1;
|
||||
/* Clear timer */
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
|
||||
UE_scheduling_control->uplane_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_failure_timer = 0;
|
||||
|
||||
/* Clear timer */
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
|
||||
if (UE_scheduling_control->ul_out_of_sync > 0) {
|
||||
UE_scheduling_control->ul_out_of_sync = 0;
|
||||
mac_eNB_rrc_ul_in_sync(enb_mod_idP, CC_idP, frameP, subframeP, old_rnti);
|
||||
}
|
||||
|
||||
UE_scheduling_control->uplane_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_inactivity_timer = 0;
|
||||
UE_scheduling_control->ul_failure_timer = 0;
|
||||
|
||||
if (UE_scheduling_control->ul_out_of_sync > 0) {
|
||||
UE_scheduling_control->ul_out_of_sync = 0;
|
||||
mac_eNB_rrc_ul_in_sync(enb_mod_idP, CC_idP, frameP, subframeP, old_rnti);
|
||||
}
|
||||
UE_template_ptr->ul_SR = 1;
|
||||
UE_scheduling_control->crnti_reconfigurationcomplete_flag = 1;
|
||||
UE_template_ptr->ul_SR = 1;
|
||||
UE_scheduling_control->crnti_reconfigurationcomplete_flag = 1;
|
||||
} else {
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti);
|
||||
}
|
||||
|
||||
// break;
|
||||
}
|
||||
}
|
||||
@@ -539,7 +527,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_template_ptr->ul_buffer_info[LCGID1] +
|
||||
UE_template_ptr->ul_buffer_info[LCGID2] +
|
||||
UE_template_ptr->ul_buffer_info[LCGID3];
|
||||
|
||||
RC.eNB[enb_mod_idP][CC_idP]->pusch_stats_bsr[UE_id][(frameP * 10) + subframeP] = (payload_ptr[0] & 0x3f);
|
||||
|
||||
if (UE_id == UE_list->head) {
|
||||
@@ -580,21 +567,19 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_template_ptr->ul_buffer_info[LCGID1] = BSR_TABLE[bsr1];
|
||||
UE_template_ptr->ul_buffer_info[LCGID2] = BSR_TABLE[bsr2];
|
||||
UE_template_ptr->ul_buffer_info[LCGID3] = BSR_TABLE[bsr3];
|
||||
|
||||
UE_template_ptr->estimated_ul_buffer =
|
||||
UE_template_ptr->ul_buffer_info[LCGID0] +
|
||||
UE_template_ptr->ul_buffer_info[LCGID1] +
|
||||
UE_template_ptr->ul_buffer_info[LCGID2] +
|
||||
UE_template_ptr->ul_buffer_info[LCGID3];
|
||||
|
||||
LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR. Size is LCGID0 = %u LCGID1 = %u LCGID2 = %u LCGID3 = %u\n",
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
rx_ces[i],
|
||||
UE_template_ptr->ul_buffer_info[LCGID0],
|
||||
UE_template_ptr->ul_buffer_info[LCGID1],
|
||||
UE_template_ptr->ul_buffer_info[LCGID2],
|
||||
UE_template_ptr->ul_buffer_info[LCGID3]);
|
||||
enb_mod_idP,
|
||||
CC_idP,
|
||||
rx_ces[i],
|
||||
UE_template_ptr->ul_buffer_info[LCGID0],
|
||||
UE_template_ptr->ul_buffer_info[LCGID1],
|
||||
UE_template_ptr->ul_buffer_info[LCGID2],
|
||||
UE_template_ptr->ul_buffer_info[LCGID3]);
|
||||
|
||||
if (crnti_rx == 1) {
|
||||
LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d: Received CRNTI.\n",
|
||||
@@ -689,11 +674,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
rx_lengths[i],
|
||||
payload_ptr - sduP);
|
||||
|
||||
if ((UE_id = add_new_ue(enb_mod_idP, CC_idP, ra->rnti, harq_pid
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
, ra->rach_resource_type
|
||||
#endif
|
||||
)) == -1) {
|
||||
if ((UE_id = add_new_ue(enb_mod_idP, CC_idP, ra->rnti, harq_pid, ra->rach_resource_type )) == -1) {
|
||||
LOG_E(MAC,"[MAC][eNB] Max user count reached\n");
|
||||
cancel_ra_proc(enb_mod_idP, CC_idP, frameP, current_rnti); // send Connection Reject ???
|
||||
break;
|
||||
@@ -705,7 +686,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
frameP,
|
||||
ra->rnti,
|
||||
UE_id);
|
||||
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_idP][UE_id]);
|
||||
}
|
||||
@@ -728,10 +708,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
CCCH,
|
||||
(uint8_t *) payload_ptr,
|
||||
rx_lengths[i],
|
||||
0
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,ra->rach_resource_type > 0
|
||||
#endif
|
||||
0,ra->rach_resource_type > 0
|
||||
);
|
||||
|
||||
if (num_ce > 0) { // handle msg3 which is not RRCConnectionRequest
|
||||
@@ -801,7 +778,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
mac_rlc_data_ind(enb_mod_idP, current_rnti, enb_mod_idP, frameP, ENB_FLAG_YES, MBMS_FLAG_NO, rx_lcids[i], (char *) payload_ptr, rx_lengths[i], 1, NULL); //(unsigned int*)crc_status);
|
||||
UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]] += 1;
|
||||
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
|
||||
|
||||
|
||||
if (mac_eNB_get_rrc_status(enb_mod_idP, current_rnti) < RRC_RECONFIGURED) {
|
||||
UE_list->UE_sched_ctrl[UE_id].uplane_inactivity_timer = 0;
|
||||
}
|
||||
@@ -864,7 +841,6 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]] += rx_lengths[i];
|
||||
/* Clear uplane_inactivity_timer */
|
||||
UE_scheduling_control->uplane_inactivity_timer = 0;
|
||||
|
||||
/* Reset RRC inactivity timer after uplane activity */
|
||||
ue_contextP = rrc_eNB_get_ue_context(RC.rrc[enb_mod_idP], current_rnti);
|
||||
|
||||
@@ -906,7 +882,7 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
if (UE_scheduling_control->cdrx_configured == TRUE) {
|
||||
/* Synchronous UL HARQ */
|
||||
UE_scheduling_control->ul_synchronous_harq_timer[CC_idP][harq_pid] = 5;
|
||||
/*
|
||||
/*
|
||||
* The ACK is programmed in n+4 subframes, so UE will have drxRetransmission running.
|
||||
* Setting ul_synchronous_harq_timer = 5 will trigger drxRetransmission timer.
|
||||
* Note: in case of asynchronous UL HARQ process restart here relevant RTT timer
|
||||
@@ -920,11 +896,9 @@ rx_sdu(const module_id_t enb_mod_idP,
|
||||
current_rnti,
|
||||
harq_pid,
|
||||
first_rb);
|
||||
|
||||
nfapi_hi_dci0_request_t *hi_dci0_req;
|
||||
uint8_t sf_ahead_dl = ul_subframe2_k_phich(&mac->common_channels[CC_idP], subframeP);
|
||||
hi_dci0_req = &mac->HI_DCI0_req[CC_idP][(subframeP+sf_ahead_dl)%10];
|
||||
|
||||
nfapi_hi_dci0_request_body_t *hi_dci0_req_body = &hi_dci0_req->hi_dci0_request_body;
|
||||
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu = &hi_dci0_req_body->hi_dci0_pdu_list[hi_dci0_req_body->number_of_dci +
|
||||
hi_dci0_req_body->number_of_hi];
|
||||
@@ -1129,13 +1103,11 @@ schedule_ulsch(module_id_t module_idP,
|
||||
COMMON_channels_t *cc = NULL;
|
||||
int sched_subframe;
|
||||
int sched_frame;
|
||||
|
||||
/* Init */
|
||||
mac = RC.mac[module_idP];
|
||||
sli = &(mac->slice_info);
|
||||
memset(first_rb, 0, NFAPI_CC_MAX * sizeof(uint16_t));
|
||||
start_meas(&(mac->schedule_ulsch));
|
||||
|
||||
sched_subframe = (subframeP + 4) % 10;
|
||||
sched_frame = frameP;
|
||||
cc = mac->common_channels;
|
||||
@@ -1235,25 +1207,13 @@ schedule_ulsch(module_id_t module_idP,
|
||||
sched_frame %= 1024;
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
int emtc_active[5];
|
||||
memset(emtc_active, 0, 5 * sizeof(int));
|
||||
schedule_ulsch_rnti_emtc(module_idP, frameP, subframeP, sched_subframe, emtc_active);
|
||||
#endif
|
||||
|
||||
/* Note: RC.nb_mac_CC[module_idP] should be lower than or equal to NFAPI_CC_MAX */
|
||||
for (int CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++, cc++) {
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
first_rb[CC_id] = (emtc_active[CC_id] == 1) ? 7 : 1;
|
||||
#else
|
||||
/* Note: the size of PUCCH is arbitrary, to be done properly. */
|
||||
switch (RC.eNB[module_idP][CC_id]->frame_parms.N_RB_DL) {
|
||||
case 25: first_rb[CC_id] = 1; break; // leave out first RB for PUCCH
|
||||
case 50: first_rb[CC_id] = 2; break; // leave out first RB for PUCCH
|
||||
case 100: first_rb[CC_id] = 3; break; // leave out first RB for PUCCH
|
||||
default: LOG_E(MAC, "nb RBs not handled, todo.\n"); exit(1);
|
||||
}
|
||||
#endif
|
||||
RA_t *ra_ptr = cc->ra;
|
||||
|
||||
/* From Louis-Adrien to François:
|
||||
@@ -1378,6 +1338,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
/* Note: RC.nb_mac_CC[module_idP] should be lower than or equal to NFAPI_CC_MAX */
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
|
||||
n_rb_ul_tab[CC_id] = to_prb(cc[CC_id].ul_Bandwidth); // return total number of PRB
|
||||
|
||||
/* HACK: let's remove the PUCCH from available RBs
|
||||
* we suppose PUCCH size is:
|
||||
* - for 25 RBs: 1 RB (top and bottom of ressource grid)
|
||||
@@ -1388,15 +1349,27 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
* so we only remove the top part of the resource grid.
|
||||
*/
|
||||
switch (n_rb_ul_tab[CC_id]) {
|
||||
case 25: n_rb_ul_tab[CC_id] -= 1; break;
|
||||
case 50: n_rb_ul_tab[CC_id] -= 2; break;
|
||||
case 100: n_rb_ul_tab[CC_id] -= 3; break;
|
||||
default: LOG_E(MAC, "RBs setting not handled. Todo.\n"); exit(1);
|
||||
case 25:
|
||||
n_rb_ul_tab[CC_id] -= 1;
|
||||
break;
|
||||
|
||||
case 50:
|
||||
n_rb_ul_tab[CC_id] -= 2;
|
||||
break;
|
||||
|
||||
case 100:
|
||||
n_rb_ul_tab[CC_id] -= 3;
|
||||
break;
|
||||
|
||||
default:
|
||||
LOG_E(MAC, "RBs setting not handled. Todo.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
UE_list->first_rb_offset[CC_id][slice_idx] = cmin(n_rb_ul_tab[CC_id], sli->ul[slice_idx].first_rb);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* ULSCH preprocessor: set UE_template->
|
||||
* pre_allocated_nb_rb_ul[slice_idx]
|
||||
* pre_assigned_mcs_ul
|
||||
@@ -1413,7 +1386,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
if (!ue_ul_slice_membership(module_idP, UE_id, slice_idx)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (UE_list->UE_template[UE_PCCID(module_idP, UE_id)][UE_id].rach_resource_type > 0) continue;
|
||||
|
||||
// don't schedule if Msg5 is not received yet
|
||||
@@ -1441,7 +1414,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
for (int n = 0; n < UE_list->numactiveULCCs[UE_id]; n++) {
|
||||
/* This is the actual CC_id in the list */
|
||||
CC_id = UE_list->ordered_ULCCids[n][UE_id];
|
||||
|
||||
UE_template_ptr = &(UE_list->UE_template[CC_id][UE_id]);
|
||||
UE_sched_ctrl_ptr = &(UE_list->UE_sched_ctrl[UE_id]);
|
||||
harq_pid = subframe2harqpid(&cc[CC_id], sched_frame, sched_subframeP);
|
||||
@@ -1483,7 +1455,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
UE_sched_ctrl_ptr->ul_inactivity_timer,
|
||||
UE_sched_ctrl_ptr->ul_failure_timer,
|
||||
UE_sched_ctrl_ptr->cqi_req_timer);
|
||||
|
||||
/* Reset the scheduling request */
|
||||
UE_template_ptr->ul_SR = 0;
|
||||
status = mac_eNB_get_rrc_status(module_idP, rnti);
|
||||
@@ -1493,13 +1464,12 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
/* Be sure that there are some free RBs */
|
||||
if (first_rb_slice[CC_id] >= n_rb_ul_tab[CC_id]) {
|
||||
LOG_W(MAC, "[eNB %d] frame %d, subframe %d, UE %d/%x CC %d: dropping, not enough RBs\n",
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
CC_id);
|
||||
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
CC_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1507,27 +1477,27 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
/* This test seems to be way too long, can we provide an optimization? */
|
||||
if (CCE_allocation_infeasible(module_idP, CC_id, 1, subframeP, aggregation, rnti)) {
|
||||
LOG_W(MAC, "[eNB %d] frame %d, subframe %d, UE %d/%x CC %d: not enough CCE\n",
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
CC_id);
|
||||
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
CC_id);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
/* Handle the aperiodic CQI report */
|
||||
cqi_req = 0;
|
||||
LOG_D(MAC,"RRC Conenction status %d, cqi_timer %d\n",status,UE_sched_ctrl_ptr->cqi_req_timer);
|
||||
|
||||
if (status >= RRC_CONNECTED && UE_sched_ctrl_ptr->cqi_req_timer > 30) {
|
||||
if (UE_sched_ctrl_ptr->cqi_received == 0) {
|
||||
if (NFAPI_MODE != NFAPI_MONOLITHIC) {
|
||||
cqi_req = 0;
|
||||
} else {
|
||||
cqi_req = 1;
|
||||
|
||||
LOG_D(MAC,"Setting CQI_REQ (timer %d)\n",UE_sched_ctrl_ptr->cqi_req_timer);
|
||||
|
||||
/* TDD: to be safe, do not ask CQI in special Subframes:36.213/7.2.3 CQI definition */
|
||||
if (cc[CC_id].tdd_Config) {
|
||||
switch (cc[CC_id].tdd_Config->subframeAssignment) {
|
||||
@@ -1535,12 +1505,14 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
if(subframeP == 1 || subframeP == 6) {
|
||||
cqi_req=0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if(subframeP == 1) {
|
||||
cqi_req=0;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1569,7 +1541,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
*/
|
||||
snr = (5 * UE_sched_ctrl_ptr->pusch_snr[CC_id] - 640) / 10;
|
||||
target_snr = mac->puSch10xSnr / 10;
|
||||
|
||||
/*
|
||||
* This assumes accumulated tpc
|
||||
* Make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out
|
||||
@@ -1578,7 +1549,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
|
||||
if (((framex10psubframe + 10) <= (frameP * 10 + subframeP)) || // normal case
|
||||
((framex10psubframe > (frameP * 10 + subframeP)) && (((10240 - framex10psubframe + frameP * 10 + subframeP) >= 10)))) { //frame wrap-around
|
||||
|
||||
UE_template_ptr->pusch_tpc_tx_frame = frameP;
|
||||
UE_template_ptr->pusch_tpc_tx_subframe = subframeP;
|
||||
|
||||
@@ -1597,14 +1567,14 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
|
||||
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",
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
harq_pid,
|
||||
tpc,
|
||||
tpc_accumulated,
|
||||
snr,
|
||||
target_snr);
|
||||
module_idP,
|
||||
frameP,
|
||||
subframeP,
|
||||
harq_pid,
|
||||
tpc,
|
||||
tpc_accumulated,
|
||||
snr,
|
||||
target_snr);
|
||||
}
|
||||
|
||||
ndi = 1 - UE_template_ptr->oldNDI_UL[harq_pid]; // NDI: new data indicator
|
||||
@@ -1618,8 +1588,8 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
if (UE_sched_ctrl_ptr->cdrx_configured) {
|
||||
UE_sched_ctrl_ptr->drx_inactivity_timer = 1; // reset drx inactivity timer when new transmission
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DRX_INACTIVITY, (unsigned long) UE_sched_ctrl_ptr->drx_inactivity_timer);
|
||||
UE_sched_ctrl_ptr->dci0_ongoing_timer = 1; // when set the UE_template_ptr->ul_SR cannot be set to 1,
|
||||
// see definition for more information
|
||||
UE_sched_ctrl_ptr->dci0_ongoing_timer = 1; // when set the UE_template_ptr->ul_SR cannot be set to 1,
|
||||
// see definition for more information
|
||||
}
|
||||
|
||||
if (UE_template_ptr->pre_allocated_rb_table_index_ul >= 0) {
|
||||
@@ -1747,7 +1717,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
get_TBS_UL(UE_template_ptr->mcs_UL[harq_pid], rb_table[rb_table_index]));
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
/* This is a BL/CE UE allocation */
|
||||
if (UE_template_ptr->rach_resource_type > 0) {
|
||||
@@ -1757,7 +1726,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
1, // repetition_number
|
||||
(frameP * 10) + subframeP);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dlsch_flag == 1) {
|
||||
if (cqi_req == 1) {
|
||||
@@ -1862,7 +1830,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
0, // current_tx_nb
|
||||
0, // n_srs
|
||||
UE_template_ptr->TBS_UL[harq_pid]);
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
/* This is a BL/CE UE allocation */
|
||||
if (UE_template_ptr->rach_resource_type > 0) {
|
||||
fill_nfapi_ulsch_config_request_emtc(&ul_req_tmp_body->ul_config_pdu_list[ul_req_index],
|
||||
@@ -1871,7 +1839,6 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
1, // repetition_number
|
||||
(frameP * 10) + subframeP);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(dlsch_flag == 1) {
|
||||
if(cqi_req == 1) {
|
||||
@@ -1902,14 +1869,14 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
ul_req_tmp->sfn_sf = sched_frame<<4|sched_subframeP;
|
||||
ul_req_tmp->header.message_id = NFAPI_UL_CONFIG_REQUEST;
|
||||
LOG_D(MAC, "[PUSCH %d] Frame %d, Subframe %d: Adding UL CONFIG.Request for UE %d/%x, ulsch_frame %d, ulsch_subframe %d cqi_req %d\n",
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
sched_frame,
|
||||
sched_subframeP,
|
||||
cqi_req);
|
||||
harq_pid,
|
||||
frameP,
|
||||
subframeP,
|
||||
UE_id,
|
||||
rnti,
|
||||
sched_frame,
|
||||
sched_subframeP,
|
||||
cqi_req);
|
||||
|
||||
/* HACK: RBs used by retransmission have to be reserved.
|
||||
* The current mechanism uses the notion of 'first_rb', so
|
||||
@@ -1923,13 +1890,13 @@ schedule_ulsch_rnti(module_id_t module_idP,
|
||||
*/
|
||||
if (first_rb_slice[CC_id] < UE_template_ptr->first_rb_ul[harq_pid] + UE_template_ptr->nb_rb_ul[harq_pid])
|
||||
first_rb_slice[CC_id] = UE_template_ptr->first_rb_ul[harq_pid] + UE_template_ptr->nb_rb_ul[harq_pid];
|
||||
} // end of round > 0
|
||||
} // end of round > 0
|
||||
} // UE_is_to_be_scheduled
|
||||
} // loop over all active CC_ids
|
||||
} // loop over UE_ids
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/*
|
||||
* default ULSCH scheduler for LTE-M
|
||||
@@ -2365,4 +2332,3 @@ void schedule_ulsch_rnti_emtc(module_id_t module_idP,
|
||||
} // ULCCs
|
||||
} // loop over UE_id
|
||||
}
|
||||
#endif
|
||||
|
||||
+901
-945
File diff suppressed because it is too large
Load Diff
+394
-448
File diff suppressed because it is too large
Load Diff
@@ -36,29 +36,29 @@
|
||||
#include "mac.h"
|
||||
#include "COMMON/mac_rrc_primitives.h"
|
||||
|
||||
const uint32_t BSR_TABLE[BSR_TABLE_SIZE] =
|
||||
{ 0, 10, 12, 14, 17, 19, 22, 26, 31, 36, 42, 49, 57, 67, 78, 91,
|
||||
105, 125, 146, 171, 200, 234, 274, 321, 376, 440, 515, 603, 706, 826,
|
||||
967, 1132,
|
||||
1326, 1552, 1817, 2127, 2490, 2915, 3413, 3995, 4677, 5467, 6411, 7505,
|
||||
8787, 10287, 12043, 14099,
|
||||
16507, 19325, 22624, 26487, 31009, 36304, 42502, 49759, 58255, 68201,
|
||||
79846, 93479, 109439, 128125, 150000, 300000
|
||||
const uint32_t BSR_TABLE[BSR_TABLE_SIZE] = {
|
||||
0, 10, 12, 14, 17, 19, 22, 26, 31, 36, 42, 49, 57, 67, 78, 91,
|
||||
105, 125, 146, 171, 200, 234, 274, 321, 376, 440, 515, 603, 706, 826,
|
||||
967, 1132,
|
||||
1326, 1552, 1817, 2127, 2490, 2915, 3413, 3995, 4677, 5467, 6411, 7505,
|
||||
8787, 10287, 12043, 14099,
|
||||
16507, 19325, 22624, 26487, 31009, 36304, 42502, 49759, 58255, 68201,
|
||||
79846, 93479, 109439, 128125, 150000, 300000
|
||||
};
|
||||
|
||||
// extended bsr table--currently not used
|
||||
const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE] =
|
||||
{ 0, 10, 13, 16, 19, 23, 29, 35, 43, 53, 65, 80, 98, 120, 147,
|
||||
181, 223, 274, 337, 414, 509, 625, 769, 945, 1162, 1429,
|
||||
1757, 2161, 2657, 3267, 4017, 4940, 6074, 7469, 9185,
|
||||
11294, 13888, 17077, 20999, 25822, 31752, 39045, 48012,
|
||||
59039, 72598, 89272, 109774, 134986, 165989, 204111,
|
||||
250990, 308634, 379519, 466683, 573866, 705666, 867737,
|
||||
1067031, 1312097, 1613447, 1984009, 2439678, 3000000,
|
||||
6000000
|
||||
// extended bsr table--currently not used
|
||||
const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE] = {
|
||||
0, 10, 13, 16, 19, 23, 29, 35, 43, 53, 65, 80, 98, 120, 147,
|
||||
181, 223, 274, 337, 414, 509, 625, 769, 945, 1162, 1429,
|
||||
1757, 2161, 2657, 3267, 4017, 4940, 6074, 7469, 9185,
|
||||
11294, 13888, 17077, 20999, 25822, 31752, 39045, 48012,
|
||||
59039, 72598, 89272, 109774, 134986, 165989, 204111,
|
||||
250990, 308634, 379519, 466683, 573866, 705666, 867737,
|
||||
1067031, 1312097, 1613447, 1984009, 2439678, 3000000,
|
||||
6000000
|
||||
};
|
||||
|
||||
//#define MAX_SIZE_OF_AGG3 576
|
||||
//#define MAX_SIZE_OF_AGG3 576
|
||||
//#define MAX_SIZE_OF_AGG2 288
|
||||
//#define MAX_SIZE_OF_AGG1 144
|
||||
//#define MAX_SIZE_OF_AGG0 72
|
||||
@@ -69,25 +69,25 @@ const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE] =
|
||||
*/
|
||||
// the follwoing three tables are calibrated for TXMODE 1 and 2
|
||||
const uint8_t cqi2fmt0_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 37 bits
|
||||
//{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE = 44
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 37 bits
|
||||
//{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 41
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE = 44
|
||||
};
|
||||
|
||||
const uint8_t cqi2fmt1x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size < 38 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE < 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE < 47
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE < 55
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size < 38 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE < 43
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE < 47
|
||||
{3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0} // 20_DCI0_CRC_SIZE < 55
|
||||
};
|
||||
|
||||
const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 47 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 55
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 59
|
||||
{3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0} // 20_DCI0_CRC_SIZE = 64
|
||||
{3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0}, // 1.4_DCI0_CRC_Size= 47 bits
|
||||
{3, 3, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0}, // 5_DCI0_CRC_SIZE = 55
|
||||
{3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0}, // 10_DCI0_CRC_SIZE = 59
|
||||
{3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0} // 20_DCI0_CRC_SIZE = 64
|
||||
};
|
||||
|
||||
//uint32_t EBSR_Level[63]={0,10,13,16,19,23,29,35,43,53,65,80,98,120,147,181};
|
||||
@@ -95,7 +95,7 @@ const uint8_t cqi2fmt2x_agg[MAX_SUPPORTED_BW][CQI_VALUE_RANGE] = {
|
||||
|
||||
uint32_t RRC_CONNECTION_FLAG;
|
||||
|
||||
UE_MAC_INST *UE_mac_inst = NULL; //[NB_MODULE_MAX];
|
||||
UE_MAC_INST *UE_mac_inst = NULL; //[NB_MODULE_MAX];
|
||||
MAC_RLC_XFACE *Mac_rlc_xface;
|
||||
|
||||
/// Primary component carrier index of eNB
|
||||
@@ -103,16 +103,16 @@ int pCC_id[NUMBER_OF_eNB_MAX];
|
||||
|
||||
|
||||
|
||||
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
|
||||
|
||||
|
||||
#ifdef OPENAIR2
|
||||
unsigned char NB_eNB_INST = 0;
|
||||
uint16_t NB_UE_INST = 0;
|
||||
uint16_t NB_THREAD_INST = 0;
|
||||
unsigned char NB_RN_INST = 0;
|
||||
unsigned char NB_INST = 0;
|
||||
unsigned char NB_eNB_INST = 0;
|
||||
uint16_t NB_UE_INST = 0;
|
||||
uint16_t NB_THREAD_INST = 0;
|
||||
unsigned char NB_RN_INST = 0;
|
||||
unsigned char NB_INST = 0;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -124,10 +124,8 @@ DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
|
||||
|
||||
DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
|
||||
DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
DCI1C_5MHz_t MCCH_alloc_pdu;
|
||||
#endif
|
||||
|
||||
|
||||
DCI0_5MHz_FDD_t UL_alloc_pdu_fdd;
|
||||
|
||||
|
||||
@@ -127,10 +127,7 @@ store_dlsch_buffer(module_id_t Mod_id,
|
||||
|
||||
for (lcid = 0; lcid < MAX_NUM_LCID; ++lcid) { // loop over all the logical channels
|
||||
rlc_status = mac_rlc_status_ind(Mod_id, rnti, Mod_id, frameP, subframeP,
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
ENB_FLAG_YES, MBMS_FLAG_NO, lcid, 0,0, 0
|
||||
);
|
||||
UE_template->dl_buffer_info[lcid] = rlc_status.bytes_in_buffer; //storing the dlsch buffer for each logical channel
|
||||
UE_template->dl_pdus_in_buffer[lcid] = rlc_status.pdus_in_buffer;
|
||||
@@ -141,8 +138,8 @@ store_dlsch_buffer(module_id_t Mod_id,
|
||||
UE_template->dl_buffer_head_sdu_is_segmented[lcid] = rlc_status.head_sdu_is_segmented;
|
||||
UE_template->dl_buffer_total += UE_template->dl_buffer_info[lcid]; //storing the total dlsch buffer
|
||||
UE_template->dl_pdus_total += UE_template->dl_pdus_in_buffer[lcid];
|
||||
#ifdef DEBUG_eNB_SCHEDULER
|
||||
|
||||
#ifdef DEBUG_eNB_SCHEDULER
|
||||
/* note for dl_buffer_head_sdu_remaining_size_to_send[lcid] :
|
||||
* 0 if head SDU has not been segmented (yet), else remaining size not already segmented and sent
|
||||
*/
|
||||
@@ -155,8 +152,8 @@ store_dlsch_buffer(module_id_t Mod_id,
|
||||
UE_template->dl_buffer_head_sdu_creation_time[lcid],
|
||||
UE_template->dl_buffer_head_sdu_remaining_size_to_send[lcid],
|
||||
UE_template->dl_buffer_head_sdu_is_segmented[lcid]);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
if (UE_template->dl_buffer_total > 0)
|
||||
@@ -280,8 +277,10 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame,
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
|
||||
cc = &RC.mac[Mod_id]->common_channels[CC_id];
|
||||
UE_id = find_UE_id(Mod_id, rnti);
|
||||
|
||||
if(UE_id == -1)
|
||||
continue;
|
||||
continue;
|
||||
|
||||
harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame,subframe);
|
||||
round = UE_list->UE_sched_ctrl[UE_id].round[CC_id][harq_pid];
|
||||
|
||||
@@ -295,7 +294,7 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame,
|
||||
|
||||
int
|
||||
maxround_ul(module_id_t Mod_id, uint16_t rnti, int sched_frame,
|
||||
sub_frame_t sched_subframe) {
|
||||
sub_frame_t sched_subframe) {
|
||||
uint8_t round, round_max = 0, UE_id;
|
||||
int CC_id, harq_pid;
|
||||
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
|
||||
@@ -304,8 +303,10 @@ maxround_ul(module_id_t Mod_id, uint16_t rnti, int sched_frame,
|
||||
for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
|
||||
cc = &RC.mac[Mod_id]->common_channels[CC_id];
|
||||
UE_id = find_UE_id(Mod_id, rnti);
|
||||
|
||||
if(UE_id == -1)
|
||||
continue;
|
||||
|
||||
harq_pid = subframe2harqpid(cc, sched_frame, sched_subframe);
|
||||
round = UE_list->UE_sched_ctrl[UE_id].round_UL[CC_id][harq_pid];
|
||||
|
||||
@@ -508,7 +509,6 @@ void sort_UEs(module_id_t Mod_idP,
|
||||
UE_sched_ctrl_t *UE_scheduling_control = NULL;
|
||||
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
|
||||
|
||||
/* Check CDRX configuration and if UE is in active time for this subframe */
|
||||
@@ -763,11 +763,9 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
|
||||
uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) {
|
||||
int UE_id, CC_id;
|
||||
int i;
|
||||
|
||||
#ifdef TM5
|
||||
#ifdef TM5
|
||||
uint8_t transmission_mode;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
uint8_t slice_allocation_mask[NFAPI_CC_MAX][N_RBG_MAX];
|
||||
int N_RBG[NFAPI_CC_MAX];
|
||||
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
|
||||
@@ -789,10 +787,9 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
|
||||
for (i = 0; i < UE_num_active_CC(UE_list, UE_id); i++) {
|
||||
CC_id = UE_list->ordered_CCids[i][UE_id];
|
||||
nb_rbs_remaining[CC_id][UE_id] = nb_rbs_accounted[CC_id][UE_id];
|
||||
|
||||
#ifdef TM5
|
||||
#ifdef TM5
|
||||
transmission_mode = get_tmode(Mod_id, CC_id, UE_id);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (nb_rbs_required[CC_id][UE_id] > 0)
|
||||
LOG_D(MAC,
|
||||
@@ -817,8 +814,8 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
|
||||
rballoc_sub,
|
||||
slice_allocation_mask,
|
||||
MIMO_mode_indicator);
|
||||
#ifdef TM5
|
||||
|
||||
#ifdef TM5
|
||||
// data chanel TM5: to be revisited
|
||||
if ((round == 0) &&
|
||||
(transmission_mode == 5) &&
|
||||
@@ -962,6 +959,7 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
|
||||
ue_sched_ctl2->pre_nb_available_rbs
|
||||
[CC_id] + 4;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -970,8 +968,8 @@ void dlsch_scheduler_pre_processor_positioning(module_id_t Mod_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -986,11 +984,9 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
|
||||
uint8_t MIMO_mode_indicator[NFAPI_CC_MAX][N_RBG_MAX]) {
|
||||
int UE_id, CC_id;
|
||||
int i;
|
||||
|
||||
#ifdef TM5
|
||||
#ifdef TM5
|
||||
uint8_t transmission_mode;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
|
||||
int N_RBG[NFAPI_CC_MAX];
|
||||
slice_info_t *sli = &RC.mac[Mod_id]->slice_info;
|
||||
@@ -1018,9 +1014,9 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
|
||||
if (nb_rbs_remaining[CC_id][UE_id] < 0)
|
||||
abort();
|
||||
|
||||
#ifdef TM5
|
||||
#ifdef TM5
|
||||
transmission_mode = get_tmode(Mod_id, CC_id, UE_id);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (nb_rbs_required[CC_id][UE_id] > 0)
|
||||
LOG_D(MAC,
|
||||
@@ -1045,8 +1041,8 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
|
||||
rballoc_sub,
|
||||
slice_allocation_mask,
|
||||
MIMO_mode_indicator);
|
||||
#ifdef TM5
|
||||
|
||||
#ifdef TM5
|
||||
// data chanel TM5: to be revisited
|
||||
if ((round == 0) &&
|
||||
(transmission_mode == 5) &&
|
||||
@@ -1199,8 +1195,8 @@ void dlsch_scheduler_pre_processor_intraslice_sharing(module_id_t Mod_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1217,14 +1213,12 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
|
||||
uint8_t CC_id;
|
||||
uint16_t i, j;
|
||||
int min_rb_unit[NFAPI_CC_MAX];
|
||||
|
||||
eNB_MAC_INST *eNB = RC.mac[Mod_id];
|
||||
slice_info_t *sli = &eNB->slice_info;
|
||||
uint16_t (*nb_rbs_required)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_required;
|
||||
uint16_t (*nb_rbs_accounted)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_accounted;
|
||||
uint16_t (*nb_rbs_remaining)[MAX_MOBILES_PER_ENB] = sli->pre_processor_results[slice_idx].nb_rbs_remaining;
|
||||
uint8_t (*MIMO_mode_indicator)[N_RBG_MAX] = sli->pre_processor_results[slice_idx].MIMO_mode_indicator;
|
||||
|
||||
UE_list_t *UE_list = &eNB->UE_list;
|
||||
UE_sched_ctrl_t *ue_sched_ctl;
|
||||
// int rrc_status = RRC_IDLE;
|
||||
@@ -1256,7 +1250,6 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
|
||||
slice_idx,
|
||||
frameP,
|
||||
subframeP);
|
||||
|
||||
// Calculate the number of RBs required by each UE on the basis of logical channel's buffer
|
||||
assign_rbs_required(Mod_id,
|
||||
slice_idx,
|
||||
@@ -1264,44 +1257,42 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
|
||||
subframeP,
|
||||
nb_rbs_required,
|
||||
min_rb_unit);
|
||||
|
||||
// Sorts the user on the basis of dlsch logical channel buffer and CQI
|
||||
sort_UEs(Mod_id,
|
||||
slice_idx,
|
||||
frameP,
|
||||
subframeP);
|
||||
|
||||
// ACCOUNTING
|
||||
// This procedure decides the number of RBs to allocate
|
||||
dlsch_scheduler_pre_processor_accounting(Mod_id,
|
||||
slice_idx,
|
||||
frameP,
|
||||
subframeP,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted);
|
||||
slice_idx,
|
||||
frameP,
|
||||
subframeP,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted);
|
||||
// POSITIONING
|
||||
// This procedure does the main allocation of the RBs
|
||||
dlsch_scheduler_pre_processor_positioning(Mod_id,
|
||||
slice_idx,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted,
|
||||
nb_rbs_remaining,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
slice_idx,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted,
|
||||
nb_rbs_remaining,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
|
||||
// SHARING
|
||||
// If there are available RBs left in the slice, allocate them to the highest priority UEs
|
||||
if (eNB->slice_info.intraslice_share_active) {
|
||||
dlsch_scheduler_pre_processor_intraslice_sharing(Mod_id,
|
||||
slice_idx,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted,
|
||||
nb_rbs_remaining,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
slice_idx,
|
||||
min_rb_unit,
|
||||
nb_rbs_required,
|
||||
nb_rbs_accounted,
|
||||
nb_rbs_remaining,
|
||||
rballoc_sub,
|
||||
MIMO_mode_indicator);
|
||||
}
|
||||
|
||||
#ifdef TM5
|
||||
@@ -1333,8 +1324,8 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
|
||||
} else if (i3 == N_RBG && i1 == 0 && i2 == 0) {
|
||||
PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->FULL_MUMIMO_transmissions + 1;
|
||||
}
|
||||
PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions + 1;
|
||||
|
||||
PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions = PHY_vars_eNB_g[Mod_id][CC_id]->check_for_total_transmissions + 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1689,10 +1680,9 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
int N_RB_UL = 0;
|
||||
uint16_t available_rbs, first_rb_offset;
|
||||
rnti_t rntiTable[MAX_MOBILES_PER_ENB];
|
||||
|
||||
// sort ues
|
||||
LOG_D(MAC, "In ulsch_preprocessor: sort ue \n");
|
||||
sort_ue_ul(module_idP, slice_idx, sched_frameP, sched_subframeP, rntiTable);
|
||||
sort_ue_ul(module_idP, slice_idx, sched_frameP, sched_subframeP, rntiTable);
|
||||
// maximize MCS and then allocate required RB according to the buffer occupancy with the limit of max available UL RB
|
||||
LOG_D(MAC, "In ulsch_preprocessor: assign max mcs min rb\n");
|
||||
assign_max_mcs_min_rb(module_idP, slice_idx, frameP, subframeP, first_rb);
|
||||
@@ -1722,6 +1712,7 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
|
||||
// step 2: calculate the average rb per UE
|
||||
LOG_D(MAC, "In ulsch_preprocessor: step2 \n");
|
||||
|
||||
for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) {
|
||||
if (UE_list->UE_template[CC_id][UE_id].rach_resource_type > 0) continue;
|
||||
|
||||
@@ -1781,7 +1772,6 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
// step 3: assigne RBS
|
||||
for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) {
|
||||
// if (continueTable[UE_id]) continue;
|
||||
|
||||
for (n = 0; n < UE_list->numactiveULCCs[UE_id]; n++) {
|
||||
// This is the actual CC_id in the list
|
||||
CC_id = UE_list->ordered_ULCCids[n][UE_id];
|
||||
@@ -1811,7 +1801,6 @@ void ulsch_scheduler_pre_processor(module_id_t module_idP,
|
||||
// step 4: assigne the remaining RBs and set the pre_allocated rbs accordingly
|
||||
for (UE_id = UE_list->head_ul; UE_id >= 0; UE_id = UE_list->next_ul[UE_id]) {
|
||||
// if (continueTable[UE_id]) continue;
|
||||
|
||||
ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
|
||||
|
||||
for (n = 0; n < UE_list->numactiveULCCs[UE_id]; n++) {
|
||||
@@ -1897,9 +1886,10 @@ assign_max_mcs_min_rb(module_id_t module_idP,
|
||||
Ncp = eNB->common_channels[CC_id].Ncp;
|
||||
N_RB_UL = to_prb(eNB->common_channels[CC_id].ul_Bandwidth);
|
||||
ue_sched_ctl->max_rbs_allowed_slice_uplink[CC_id][slice_idx] = nb_rbs_allowed_slice(sli->ul[slice_idx].pct, N_RB_UL);
|
||||
|
||||
int bytes_to_schedule = UE_template->estimated_ul_buffer - UE_template->scheduled_ul_bytes;
|
||||
|
||||
if (bytes_to_schedule < 0) bytes_to_schedule = 0;
|
||||
|
||||
int bits_to_schedule = bytes_to_schedule * 8;
|
||||
|
||||
// if this UE has UL traffic
|
||||
@@ -2045,7 +2035,6 @@ void sort_ue_ul(module_id_t module_idP,
|
||||
UE_sched_ctrl_t *UE_scheduling_control = NULL;
|
||||
|
||||
for (int i = 0; i < MAX_MOBILES_PER_ENB; i++) {
|
||||
|
||||
UE_scheduling_control = &(UE_list->UE_sched_ctrl[i]);
|
||||
|
||||
/* Check CDRX configuration and if UE is in active time for this subframe */
|
||||
@@ -2056,6 +2045,7 @@ void sort_ue_ul(module_id_t module_idP,
|
||||
}
|
||||
|
||||
rntiTable[i] = UE_RNTI(module_idP, i);
|
||||
|
||||
// Valid element and is not the actual CC_id in the list
|
||||
if (UE_list->active[i] == TRUE &&
|
||||
rntiTable[i] != NOT_A_RNTI &&
|
||||
@@ -2068,14 +2058,12 @@ void sort_ue_ul(module_id_t module_idP,
|
||||
qsort_r(list, list_size, sizeof(int), ue_ul_compare, ¶ms);
|
||||
|
||||
if (list_size) { // At mimimum one list element
|
||||
|
||||
for (int i = 0; i < list_size - 1; i++) {
|
||||
UE_list->next_ul[list[i]] = list[i + 1];
|
||||
}
|
||||
|
||||
UE_list->next_ul[list[list_size - 1]] = -1;
|
||||
UE_list->head_ul = list[0];
|
||||
|
||||
} else { // No element
|
||||
UE_list->head_ul = -1;
|
||||
}
|
||||
|
||||
@@ -404,10 +404,7 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
LOG_USEDINLOG_VAR(mac_rlc_status_resp_t,rlc_status)=mac_rlc_status_ind(module_idP,
|
||||
UE_mac_inst[module_idP].crnti,
|
||||
eNB_indexP, frameP, subframeP,
|
||||
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6,0, 0
|
||||
);
|
||||
|
||||
if (UE_mac_inst[module_idP].crnti_before_ho)
|
||||
@@ -424,11 +421,8 @@ PRACH_RESOURCES_t *ue_get_rach(module_id_t module_idP, int CC_id,
|
||||
dcch_header_len);
|
||||
|
||||
sdu_lengths = mac_rlc_data_req(module_idP, UE_mac_inst[module_idP].crnti, eNB_indexP, frameP, ENB_FLAG_NO, MBMS_FLAG_NO, DCCH, 6, //not used
|
||||
(char *) &ulsch_buff[0]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
(char *) &ulsch_buff[0],0,
|
||||
0
|
||||
#endif
|
||||
);
|
||||
|
||||
if(sdu_lengths > 0)
|
||||
|
||||
@@ -49,66 +49,65 @@ extern RAN_CONTEXT_t RC;
|
||||
//------------------------------------------------------------------------------
|
||||
unsigned short
|
||||
fill_rar(const module_id_t module_idP,
|
||||
const int CC_id,
|
||||
RA_t * ra,
|
||||
const frame_t frameP,
|
||||
uint8_t * const dlsch_buffer,
|
||||
const uint16_t N_RB_UL, const uint8_t input_buffer_length)
|
||||
const int CC_id,
|
||||
RA_t *ra,
|
||||
const frame_t frameP,
|
||||
uint8_t *const dlsch_buffer,
|
||||
const uint16_t N_RB_UL, const uint8_t input_buffer_length)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
|
||||
// subheader fixed
|
||||
rarh->E = 0; // First and last RAR
|
||||
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
|
||||
rarh->RAPID = ra->preamble_index; // Respond to Preamble 0 only for the moment
|
||||
rar[4] = (uint8_t) (ra->rnti >> 8);
|
||||
rar[5] = (uint8_t) (ra->rnti & 0xff);
|
||||
//ra->timing_offset = 0;
|
||||
ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps
|
||||
rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4
|
||||
rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4
|
||||
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||
uint8_t *rar = (uint8_t *) (dlsch_buffer + 1);
|
||||
|
||||
|
||||
// subheader fixed
|
||||
rarh->E = 0; // First and last RAR
|
||||
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
|
||||
rarh->RAPID = ra->preamble_index; // Respond to Preamble 0 only for the moment
|
||||
rar[4] = (uint8_t) (ra->rnti >> 8);
|
||||
rar[5] = (uint8_t) (ra->rnti & 0xff);
|
||||
//ra->timing_offset = 0;
|
||||
ra->timing_offset /= 16; //T_A = N_TA/16, where N_TA should be on a 30.72Msps
|
||||
rar[0] = (uint8_t) (ra->timing_offset >> (2 + 4)); // 7 MSBs of timing advance + divide by 4
|
||||
rar[1] = (uint8_t) (ra->timing_offset << (4 - 2)) & 0xf0; // 4 LSBs of timing advance + divide by 4
|
||||
COMMON_channels_t *cc = &RC.mac[module_idP]->common_channels[CC_id];
|
||||
if(N_RB_UL == 25){
|
||||
ra->msg3_first_rb = 1;
|
||||
}else{
|
||||
if (cc->tdd_Config && N_RB_UL == 100) {
|
||||
ra->msg3_first_rb = 3;
|
||||
} else {
|
||||
ra->msg3_first_rb = 2;
|
||||
}
|
||||
if(N_RB_UL == 25) {
|
||||
ra->msg3_first_rb = 1;
|
||||
} else {
|
||||
if (cc->tdd_Config && N_RB_UL == 100) {
|
||||
ra->msg3_first_rb = 3;
|
||||
} else {
|
||||
ra->msg3_first_rb = 2;
|
||||
}
|
||||
ra->msg3_nb_rb = 1;
|
||||
uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb); // first PRB only for UL Grant
|
||||
rar[1] |= (rballoc >> 7) & 7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
|
||||
rar[2] = ((uint8_t) (rballoc & 0xff)) << 1; // 7 LSBs of rballoc
|
||||
ra->msg3_mcs = 10;
|
||||
ra->msg3_TPC = 3;
|
||||
ra->msg3_ULdelay = 0;
|
||||
ra->msg3_cqireq = 0;
|
||||
ra->msg3_round = 0;
|
||||
rar[2] |= ((ra->msg3_mcs & 0x8) >> 3); // mcs 10
|
||||
rar[3] =
|
||||
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
|
||||
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
|
||||
}
|
||||
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_DOWNLINK , dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI , 1,
|
||||
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);
|
||||
}
|
||||
ra->msg3_nb_rb = 1;
|
||||
uint16_t rballoc = mac_computeRIV(N_RB_UL, ra->msg3_first_rb, ra->msg3_nb_rb); // first PRB only for UL Grant
|
||||
rar[1] |= (rballoc >> 7) & 7; // Hopping = 0 (bit 3), 3 MSBs of rballoc
|
||||
rar[2] = ((uint8_t) (rballoc & 0xff)) << 1; // 7 LSBs of rballoc
|
||||
ra->msg3_mcs = 10;
|
||||
ra->msg3_TPC = 3;
|
||||
ra->msg3_ULdelay = 0;
|
||||
ra->msg3_cqireq = 0;
|
||||
ra->msg3_round = 0;
|
||||
rar[2] |= ((ra->msg3_mcs & 0x8) >> 3); // mcs 10
|
||||
rar[3] =
|
||||
(((ra->msg3_mcs & 0x7) << 5)) | ((ra->msg3_TPC & 7) << 2) |
|
||||
((ra->msg3_ULdelay & 1) << 1) | (ra->msg3_cqireq & 1);
|
||||
|
||||
return (ra->rnti);
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_DOWNLINK, dlsch_buffer, input_buffer_length, module_idP, WS_RA_RNTI, 1,
|
||||
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);
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
* Fill the RAR buffer (header + PDU) for LTE-M devices
|
||||
@@ -118,14 +117,13 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
RA_t *ra,
|
||||
const frame_t frameP,
|
||||
const sub_frame_t subframeP,
|
||||
uint8_t* const dlsch_buffer,
|
||||
uint8_t *const dlsch_buffer,
|
||||
const uint8_t ce_level)
|
||||
//------------------------------------------------------------------------------
|
||||
{
|
||||
RA_HEADER_RAPID *rarh = (RA_HEADER_RAPID *) dlsch_buffer;
|
||||
COMMON_channels_t *cc = &eNB->common_channels[CC_id];
|
||||
uint8_t *rar = (uint8_t *)(dlsch_buffer + 1);
|
||||
|
||||
uint32_t rballoc = 0;
|
||||
uint32_t reps = 0;
|
||||
uint32_t ULdelay = 0;
|
||||
@@ -134,30 +132,24 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
uint32_t TPC = 0;
|
||||
int input_buffer_length = 0;
|
||||
int N_NB_index = 0;
|
||||
|
||||
AssertFatal(ra != NULL, "RA is null \n");
|
||||
|
||||
/* Subheader fixed */
|
||||
rarh->E = 0; // First and last RAR
|
||||
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
|
||||
rarh->RAPID = ra->preamble_index; // Respond to Preamble
|
||||
|
||||
rarh->E = 0; // First and last RAR
|
||||
rarh->T = 1; // 0 for E/T/R/R/BI subheader, 1 for E/T/RAPID subheader
|
||||
rarh->RAPID = ra->preamble_index; // Respond to Preamble
|
||||
/* RAR PDU */
|
||||
/* TA Command */
|
||||
ra->timing_offset /= 16; // T_A = N_TA/16, where N_TA should be on a 30.72Msps
|
||||
rar[0] = (uint8_t) (ra->timing_offset >> 4) & 0x7f; // 7 MSBs of timing advance
|
||||
rar[1] = (uint8_t) (ra->timing_offset & 0x0f) << 4; // 4 LSBs of timing advance
|
||||
|
||||
ra->timing_offset /= 16; // T_A = N_TA/16, where N_TA should be on a 30.72Msps
|
||||
rar[0] = (uint8_t) (ra->timing_offset >> 4) & 0x7f; // 7 MSBs of timing advance
|
||||
rar[1] = (uint8_t) (ra->timing_offset & 0x0f) << 4; // 4 LSBs of timing advance
|
||||
/* Copy the Msg2 narrowband */
|
||||
ra->msg34_narrowband = ra->msg2_narrowband;
|
||||
ra->msg3_first_rb = 0;
|
||||
ra->msg3_nb_rb = 2;
|
||||
|
||||
if (ce_level < 2) { // CE Level 0, 1 (CEmodeA)
|
||||
if (ce_level < 2) { // CE Level 0, 1 (CEmodeA)
|
||||
input_buffer_length = 6;
|
||||
|
||||
N_NB_index = get_numnarrowbandbits(cc->mib->message.dl_Bandwidth);
|
||||
|
||||
/* UL Grant */
|
||||
reps = 0;
|
||||
ra->msg3_mcs = 7;
|
||||
@@ -166,7 +158,6 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
cqireq = 0;
|
||||
mpdcch_nb_index = 0;
|
||||
rballoc = mac_computeRIV(6, ra->msg3_first_rb, ra->msg3_nb_rb);
|
||||
|
||||
uint32_t buffer = 0;
|
||||
buffer |= ra->msg34_narrowband << (16 + (4 - N_NB_index));
|
||||
buffer |= ((rballoc & 0x0F) << (12 + (4 - N_NB_index)));
|
||||
@@ -176,21 +167,15 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
buffer |= ((cqireq & 0x01) << (3 + (4 - N_NB_index)));
|
||||
buffer |= ((ULdelay & 0x01) << (2 + (4 - N_NB_index)));
|
||||
buffer |= (mpdcch_nb_index << (4 - N_NB_index));
|
||||
|
||||
rar[1] |= (uint8_t) (buffer >> 16) & 0x0F;
|
||||
rar[2] = (uint8_t) (buffer >> 8) & 0xFF;
|
||||
rar[3] = (uint8_t) buffer & 0xFF;
|
||||
|
||||
/* RA CRNTI */
|
||||
rar[4] = (uint8_t)(ra->rnti >> 8);
|
||||
rar[5] = (uint8_t)(ra->rnti & 0xff);
|
||||
|
||||
} else { // CE level 2, 3 (CEModeB)
|
||||
|
||||
AssertFatal(1 == 0, "Shouldn't get here ...\n");
|
||||
|
||||
input_buffer_length = 5;
|
||||
|
||||
rar[3] = (uint8_t)(ra->rnti >> 8);
|
||||
rar[4] = (uint8_t)(ra->rnti & 0xff);
|
||||
}
|
||||
@@ -198,7 +183,7 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
LOG_I(MAC, "[RAPROC] Frame %d Subframe %d : Generating RAR BR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for ce_level %d, CRNTI %x, preamble %d/%d, TIMING OFFSET %d\n",
|
||||
frameP,
|
||||
subframeP,
|
||||
*(uint8_t*) rarh,
|
||||
*(uint8_t *) rarh,
|
||||
rar[0],
|
||||
rar[1],
|
||||
rar[2],
|
||||
@@ -212,25 +197,23 @@ unsigned short fill_rar_br(eNB_MAC_INST *eNB,
|
||||
ra->timing_offset);
|
||||
|
||||
if (opt_enabled) {
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
dlsch_buffer,
|
||||
input_buffer_length,
|
||||
eNB->Mod_id,
|
||||
WS_RA_RNTI,
|
||||
1,
|
||||
eNB->frame,
|
||||
eNB->subframe,
|
||||
0,
|
||||
trace_pdu(DIRECTION_DOWNLINK,
|
||||
dlsch_buffer,
|
||||
input_buffer_length,
|
||||
eNB->Mod_id,
|
||||
WS_RA_RNTI,
|
||||
1,
|
||||
eNB->frame,
|
||||
eNB->subframe,
|
||||
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,
|
||||
frameP,
|
||||
ra->rnti,
|
||||
rarh->RAPID,
|
||||
input_buffer_length);
|
||||
}
|
||||
|
||||
return (ra->rnti);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -163,15 +163,6 @@ void ue_init_mac(module_id_t module_idP) {
|
||||
tx_request_pdu_list = NULL;
|
||||
tx_req_num_elems = 0;
|
||||
}
|
||||
|
||||
#ifdef CBA
|
||||
|
||||
for (i = 0; i < NUM_MAX_CBA_GROUP; i++) {
|
||||
UE_mac_inst[module_idP].cba_last_access[i] =
|
||||
round(uniform_rngen(1, 30));
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -595,44 +586,40 @@ ue_send_sdu(module_id_t module_idP,
|
||||
#endif
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
void
|
||||
ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
uint8_t eNB_index, void *pdu, uint16_t len)
|
||||
{
|
||||
void ue_decode_si_mbms(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
uint8_t eNB_index, void *pdu, uint16_t len) {
|
||||
#if UE_TIMING_TRACE
|
||||
start_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
start_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_IN);
|
||||
|
||||
LOG_D(MAC, "[UE %d] Frame %d Sending SI MBMS to RRC (LCID Id %d,len %d)\n",
|
||||
module_idP, frameP, BCCH, len);
|
||||
|
||||
mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe
|
||||
SI_RNTI,
|
||||
BCCH_SI_MBMS, (uint8_t *) pdu, len, eNB_index,
|
||||
0);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_IN);
|
||||
LOG_D(MAC, "[UE %d] Frame %d Sending SI MBMS to RRC (LCID Id %d,len %d)\n",
|
||||
module_idP, frameP, BCCH, len);
|
||||
mac_rrc_data_ind_ue(module_idP, CC_id, frameP, 0, // unknown subframe
|
||||
SI_RNTI,
|
||||
BCCH_SI_MBMS, (uint8_t *) pdu, len, eNB_index,
|
||||
0);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_DECODE_SI, VCD_FUNCTION_OUT);
|
||||
#if UE_TIMING_TRACE
|
||||
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
stop_meas(&UE_mac_inst[module_idP].rx_si);
|
||||
#endif
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
0xffff,
|
||||
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);
|
||||
}
|
||||
|
||||
if (opt_enabled == 1) {
|
||||
trace_pdu(DIRECTION_UPLINK,
|
||||
(uint8_t *) pdu,
|
||||
len,
|
||||
module_idP,
|
||||
WS_SI_RNTI,
|
||||
0xffff,
|
||||
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);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void
|
||||
ue_decode_si(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
@@ -705,7 +692,6 @@ ue_decode_p(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
}
|
||||
}
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
unsigned char *parse_mch_header(unsigned char *mac_header,
|
||||
unsigned char *num_sdu,
|
||||
unsigned char *rx_lcids,
|
||||
@@ -1571,8 +1557,6 @@ int ue_query_mch(module_id_t module_idP, uint8_t CC_id, uint32_t frameP, uint32_
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
unsigned char
|
||||
generate_ulsch_header(uint8_t *mac_header,
|
||||
uint8_t num_sdus,
|
||||
@@ -1894,27 +1878,6 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
#endif
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU, VCD_FUNCTION_IN);
|
||||
#ifdef CBA
|
||||
|
||||
if (*access_mode == CBA_ACCESS) {
|
||||
LOG_D(MAC, "[UE %d] frameP %d subframe %d try CBA transmission\n",
|
||||
module_idP, frameP, subframe);
|
||||
|
||||
//if (UE_mac_inst[module_idP].scheduling_info.LCID_status[DTCH] == LCID_EMPTY)
|
||||
if (cba_access(module_idP, frameP, subframe, eNB_index, buflen) ==
|
||||
0) {
|
||||
*access_mode = POSTPONED_ACCESS;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
|
||||
(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GET_SDU, VCD_FUNCTION_OUT);
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_I(MAC,
|
||||
"[UE %d] frameP %d subframe %d CBA transmission oppurtunity, tbs %d\n",
|
||||
module_idP, frameP, subframe, buflen);
|
||||
}
|
||||
|
||||
#endif
|
||||
bsr_header_len = 0;
|
||||
phr_header_len = 1; //sizeof(SCH_SUBHEADER_FIXED);
|
||||
|
||||
@@ -2067,11 +2030,8 @@ ue_get_sdu(module_id_t module_idP, int CC_id, frame_t frameP,
|
||||
MBMS_FLAG_NO,
|
||||
lcid,
|
||||
buflen_remain,
|
||||
(char *)&ulsch_buff[sdu_length_total]
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0,
|
||||
(char *)&ulsch_buff[sdu_length_total],0,
|
||||
0
|
||||
#endif
|
||||
);
|
||||
AssertFatal(buflen_remain >= sdu_lengths[num_sdus],
|
||||
"LCID=%d RLC has segmented %d bytes but MAC has max=%d\n",
|
||||
@@ -2820,160 +2780,6 @@ ue_scheduler(const module_id_t module_idP,
|
||||
}
|
||||
|
||||
// to be improved
|
||||
#ifdef CBA
|
||||
extern int cba_backoff;
|
||||
double uniform_rngen(int min, int max) {
|
||||
double random = (double) taus() / ((double) 0xffffffff);
|
||||
return (max - min) * random + min;
|
||||
}
|
||||
|
||||
int
|
||||
cba_access(module_id_t module_idP, frame_t frameP,
|
||||
sub_frame_t subframe, uint8_t eNB_index, uint16_t buflen) {
|
||||
mac_rlc_status_resp_t rlc_status;
|
||||
int header_offset = 4;
|
||||
int rv = 0;
|
||||
|
||||
/*
|
||||
if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]<64)) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]<64)) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]<64)) )
|
||||
// && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
|
||||
&& (UE_mac_inst[module_idP].cba_last_access[0] <= 0) ) { // backoff
|
||||
// LOG_D(MAC,"[UE %d] Frame %d Subframe %d: the current CBA backoff is %d \n", module_idP, frameP, subframe,
|
||||
// UE_mac_inst[module_idP].cba_last_access[0] );
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,40));
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff %d UL active state %d \n", module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
|
||||
|
||||
rv=1;
|
||||
} else if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]> 0 )) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]> 0 )) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]> 0 )) )
|
||||
// && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
|
||||
&& (UE_mac_inst[module_idP].cba_last_access[0]> 0) ){
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]-=1;
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: CBA backoff is decreased by one to %d UL active state %d \n",
|
||||
module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
|
||||
|
||||
} else if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1] == 0 )) &&
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2] == 0 )) &&
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3] == 0 )) )
|
||||
&& (UE_mac_inst[module_idP].cba_last_access[0]> 0) ){
|
||||
UE_mac_inst[module_idP].cba_last_access[0]-=1;
|
||||
} */
|
||||
|
||||
if ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID0] > 0)
|
||||
&& (UE_mac_inst[module_idP].scheduling_info.BSR[LCGID0] < 64)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1] <= 0) &&
|
||||
(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2] <= 0) &&
|
||||
(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3] <= 0)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (cba_backoff == 0) { // apply probablisitc method
|
||||
UE_mac_inst[module_idP].cba_last_access[0] = uniform_rngen(0, 1);
|
||||
|
||||
if (uniform_rngen(0, 1) > 0.6) {
|
||||
LOG_I(MAC,
|
||||
"[UE %d] Frame %d Subframe %d: CBA probability-based backoff (%d), UL active state %d \n",
|
||||
module_idP, frameP, subframe, cba_backoff,
|
||||
UE_mac_inst[module_idP].ul_active);
|
||||
rv = 1;
|
||||
}
|
||||
} else {
|
||||
if (UE_mac_inst[module_idP].cba_last_access[0] <= 0) {
|
||||
UE_mac_inst[module_idP].cba_last_access[0] =
|
||||
round(uniform_rngen(1, cba_backoff));
|
||||
LOG_I(MAC,
|
||||
"[UE %d] Frame %d Subframe %d: start a new CBA backoff %d/%d UL active state %d \n",
|
||||
module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], cba_backoff,
|
||||
UE_mac_inst[module_idP].ul_active);
|
||||
rv = 1;
|
||||
/*
|
||||
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,frameP,ENB_FLAG_NO,MBMS_FLAG_NO, // eNB_index
|
||||
DTCH,
|
||||
0);
|
||||
|
||||
if ((
|
||||
// (rlc_status.pdus_in_buffer > 0 ) &&
|
||||
// (UE_mac_inst[module_idP].ul_active == 0) && // check if the ul is acrtive
|
||||
(rlc_status.head_sdu_is_segmented == 0 ) &&
|
||||
((rlc_status.head_sdu_remaining_size_to_send + header_offset ) <= buflen )
|
||||
)){
|
||||
rv = 1;
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,30));
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff %d UL active state %d \n", module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
|
||||
*/
|
||||
} else {
|
||||
UE_mac_inst[module_idP].cba_last_access[0] -= 1;
|
||||
LOG_D(MAC,
|
||||
"[UE %d] Frame %d Subframe %d: wait for backoff to expire (%d) CBA UL active state %d \n",
|
||||
module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0],
|
||||
UE_mac_inst[module_idP].ul_active);
|
||||
}
|
||||
}
|
||||
|
||||
return rv;
|
||||
/*
|
||||
if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]<64)) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]<64)) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]>0)&&(UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]<64)) )
|
||||
// && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
|
||||
&& (UE_mac_inst[module_idP].cba_last_access[0] <= 0) ) {
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,cba_backoff));
|
||||
|
||||
LOG_I(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff %d/%d UL active state %d \n", module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], cba_backoff,UE_mac_inst[module_idP].ul_active);
|
||||
|
||||
rv = 1;
|
||||
|
||||
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,frameP,ENB_FLAG_NO,MBMS_FLAG_NO, // eNB_index
|
||||
DTCH,
|
||||
0);
|
||||
|
||||
if ((
|
||||
// (rlc_status.pdus_in_buffer > 0 ) &&
|
||||
// (UE_mac_inst[module_idP].ul_active == 0) && // check if the ul is acrtive
|
||||
(rlc_status.head_sdu_is_segmented == 0 ) &&
|
||||
((rlc_status.head_sdu_remaining_size_to_send + header_offset ) <= buflen )
|
||||
)){
|
||||
rv = 1;
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,30));
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: start a new CBA backoff %d UL active state %d \n", module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
|
||||
} else
|
||||
UE_mac_inst[module_idP].cba_last_access[0]= round(uniform_rngen(1,5));
|
||||
|
||||
|
||||
} else if (( ((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID1]> 0 )) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID2]> 0 )) ||
|
||||
((UE_mac_inst[module_idP].scheduling_info.BSR[LCGID3]> 0 )) )
|
||||
// && (UE_mac_inst[module_idP].ul_active == 0) // check if the ul is acrtive
|
||||
&& (UE_mac_inst[module_idP].cba_last_access[0]> 0) )
|
||||
{
|
||||
|
||||
UE_mac_inst[module_idP].cba_last_access[0]-=1;
|
||||
LOG_D(MAC,"[UE %d] Frame %d Subframe %d: wait for backoff to expire (%d) CBA UL active state %d \n",
|
||||
module_idP, frameP, subframe,
|
||||
UE_mac_inst[module_idP].cba_last_access[0], UE_mac_inst[module_idP].ul_active);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
boolean_t
|
||||
@@ -3019,10 +2825,8 @@ update_bsr(module_id_t module_idP, frame_t frameP,
|
||||
|
||||
rlc_status = mac_rlc_status_ind(module_idP, UE_mac_inst[module_idP].crnti,eNB_index,frameP,subframeP,ENB_FLAG_NO,MBMS_FLAG_NO,
|
||||
lcid,
|
||||
0xFFFF //TBS is not used in RLC at this step, set a special value for debug
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,0, 0
|
||||
#endif
|
||||
0xFFFF, //TBS is not used in RLC at this step, set a special value for debug
|
||||
0, 0
|
||||
);
|
||||
lcid_bytes_in_buffer[lcid] = rlc_status.bytes_in_buffer;
|
||||
|
||||
@@ -3421,11 +3225,9 @@ SLSCH_t *ue_get_slsch(module_id_t module_idP,int CC_id,frame_t frameP,sub_frame_
|
||||
MBMS_FLAG_NO,
|
||||
ue->slsch_lcid,
|
||||
req,
|
||||
(char *)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG))
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,ue->sourceL2Id,
|
||||
(char *)(ue->slsch_pdu.payload + sizeof(SLSCH_SUBHEADER_24_Bit_DST_LONG)),
|
||||
ue->sourceL2Id,
|
||||
ue->destinationL2Id
|
||||
#endif
|
||||
);
|
||||
|
||||
// Notes: 1. hard-coded to 24-bit destination format for now
|
||||
|
||||
@@ -268,13 +268,8 @@ int8_t nr_ue_decode_mib(
|
||||
|
||||
uint32_t is_condition_A = (ssb_subcarrier_offset == 0); // 38.213 ch.13
|
||||
frequency_range_t frequency_range = FR1;
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero);
|
||||
uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1.searchSpaceZero);
|
||||
#else
|
||||
uint32_t index_4msb = (mac->mib->pdcch_ConfigSIB1 >> 4) & 0xf;
|
||||
uint32_t index_4lsb = (mac->mib->pdcch_ConfigSIB1 & 0xf);
|
||||
#endif
|
||||
int32_t num_rbs = -1;
|
||||
int32_t num_symbols = -1;
|
||||
int32_t rb_offset = -1;
|
||||
@@ -590,11 +585,7 @@ int8_t nr_ue_decode_mib(
|
||||
mac->phy_config.config_req.pbch_config.subcarrier_spacing_common = mac->mib->subCarrierSpacingCommon;
|
||||
mac->phy_config.config_req.pbch_config.ssb_subcarrier_offset = ssb_subcarrier_offset; // after calculation
|
||||
mac->phy_config.config_req.pbch_config.dmrs_type_a_position = mac->mib->dmrs_TypeA_Position;
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
mac->phy_config.config_req.pbch_config.pdcch_config_sib1 = (mac->mib->pdcch_ConfigSIB1.controlResourceSetZero) * 16 + (mac->mib->pdcch_ConfigSIB1.searchSpaceZero);
|
||||
#else
|
||||
mac->phy_config.config_req.pbch_config.pdcch_config_sib1 = mac->mib->pdcch_ConfigSIB1;
|
||||
#endif
|
||||
mac->phy_config.config_req.pbch_config.cell_barred = mac->mib->cellBarred;
|
||||
mac->phy_config.config_req.pbch_config.intra_frequency_reselection = mac->mib->intraFreqReselection;
|
||||
mac->phy_config.config_req.pbch_config.half_frame_bit = half_frame_bit;
|
||||
|
||||
@@ -174,11 +174,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
|
||||
mib->message.choice.mib->subCarrierSpacingCommon,
|
||||
mib->message.choice.mib->ssb_SubcarrierOffset,
|
||||
mib->message.choice.mib->dmrs_TypeA_Position,
|
||||
#if (NR_RRC_VERSION >= MAKE_VERSION(15, 3, 0))
|
||||
mib->message.choice.mib->pdcch_ConfigSIB1.controlResourceSetZero * 16 + mib->message.choice.mib->pdcch_ConfigSIB1.searchSpaceZero,
|
||||
#else
|
||||
mib->message.choice.mib->pdcch_ConfigSIB1,
|
||||
#endif
|
||||
mib->message.choice.mib->cellBarred,
|
||||
mib->message.choice.mib->intraFreqReselection
|
||||
);
|
||||
|
||||
@@ -46,10 +46,9 @@
|
||||
#include "LTE_DRB-ToAddModList.h"
|
||||
#include "LTE_SRB-ToAddMod.h"
|
||||
#include "LTE_SRB-ToAddModList.h"
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
#include "LTE_MBMS-SessionInfoList-r9.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
#endif
|
||||
#include "LTE_MBMS-SessionInfoList-r9.h"
|
||||
#include "LTE_PMCH-InfoList-r9.h"
|
||||
|
||||
|
||||
typedef rlc_op_status_t (*send_rlc_data_req_func_t)(const protocol_ctxt_t *const,
|
||||
const srb_flag_t, const MBMS_flag_t,
|
||||
@@ -220,12 +219,11 @@ typedef struct pdcp_s {
|
||||
|
||||
} pdcp_t;
|
||||
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
typedef struct pdcp_mbms_s {
|
||||
boolean_t instanciated_instance;
|
||||
rb_id_t rb_id;
|
||||
} pdcp_mbms_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Following symbolic constant alters the behaviour of PDCP
|
||||
* and makes it linked to PDCP test code under targets/TEST/PDCP/
|
||||
@@ -256,11 +254,9 @@ boolean_t pdcp_data_req(
|
||||
const confirm_t confirmP, \
|
||||
const sdu_size_t sdu_buffer_size,
|
||||
unsigned char *const sdu_buffer,
|
||||
const pdcp_transmission_mode_t mode
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t *const sourceL2Id
|
||||
,const uint32_t *const destinationL2Id
|
||||
#endif
|
||||
const pdcp_transmission_mode_t mode,
|
||||
const uint32_t *const sourceL2Id,
|
||||
const uint32_t *const destinationL2Id
|
||||
);
|
||||
|
||||
/*! \fn boolean_t pdcp_data_ind(const protocol_ctxt_t* const, srb_flag_t, MBMS_flag_t, rb_id_t, sdu_size_t, mem_block_t*, boolean_t)
|
||||
@@ -323,11 +319,9 @@ boolean_t rrc_pdcp_config_asn1_req (
|
||||
const uint8_t security_modeP,
|
||||
uint8_t *const kRRCenc,
|
||||
uint8_t *const kRRCint,
|
||||
uint8_t *const kUPenc
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(9, 0, 0))
|
||||
,LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9
|
||||
#endif
|
||||
,rb_id_t *const defaultDRB
|
||||
uint8_t *const kUPenc,
|
||||
LTE_PMCH_InfoList_r9_t *pmch_InfoList_r9,
|
||||
rb_id_t *const defaultDRB
|
||||
);
|
||||
|
||||
/*! \fn boolean_t pdcp_config_req_asn1 (const protocol_ctxt_t* const ctxt_pP, srb_flag_t srb_flagP, uint32_t action, rb_id_t rb_id, uint8_t rb_sn, uint8_t rb_report, uint16_t header_compression_profile, uint8_t security_mode)
|
||||
@@ -427,10 +421,8 @@ typedef struct pdcp_data_req_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t traffic_type;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_req_header_t;
|
||||
|
||||
typedef struct pdcp_data_ind_header_s {
|
||||
@@ -438,10 +430,8 @@ typedef struct pdcp_data_ind_header_s {
|
||||
sdu_size_t data_size;
|
||||
signed int inst;
|
||||
ip_traffic_type_t dummy_traffic_type;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
uint32_t sourceL2Id;
|
||||
uint32_t destinationL2Id;
|
||||
#endif
|
||||
} pdcp_data_ind_header_t;
|
||||
|
||||
struct pdcp_netlink_element_s {
|
||||
@@ -452,7 +442,6 @@ struct pdcp_netlink_element_s {
|
||||
};
|
||||
|
||||
//TTN for D2D (PC5S)
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
#define PDCP_SOCKET_PORT_NO 9999 //temporary value
|
||||
#define PC5_SIGNALLING_PAYLOAD_SIZE 100 //should be updated with a correct value
|
||||
int pdcp_pc5_sockfd;
|
||||
@@ -485,8 +474,6 @@ typedef struct {
|
||||
} __attribute__((__packed__)) sidelink_pc5s_element;
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* PDCP limit values
|
||||
*/
|
||||
@@ -511,10 +498,10 @@ pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];
|
||||
rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];
|
||||
rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB]; // for noS1 mode
|
||||
unsigned int pdcp_eNB_UE_instance_to_rnti_index;
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
|
||||
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
#endif
|
||||
|
||||
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][LTE_maxServiceCount][LTE_maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
|
||||
|
||||
sdu_size_t pdcp_output_sdu_bytes_to_write;
|
||||
sdu_size_t pdcp_output_header_bytes_to_write;
|
||||
list_t pdcp_sdu_list;
|
||||
|
||||
@@ -35,34 +35,30 @@
|
||||
# include "mem_block.h"
|
||||
|
||||
#ifdef ROHC
|
||||
extern void pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP);
|
||||
extern void pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
|
||||
extern void pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t *sduP);
|
||||
extern void pdcp_data_req (struct pdcp_entity *pdcpP, mem_block *sduP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block *cprimitiveP);
|
||||
extern void control_pdcp (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_high(struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
|
||||
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block * sduP, uint8_t rb_idP);
|
||||
extern void pdcp_process_output_sdus_high (struct pdcp_entity *pdcpP, mem_block * sduP, uint16_t data_sizeP, uint16_t rb_idP);
|
||||
extern void pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
|
||||
extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
|
||||
extern void pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
|
||||
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block *sduP, uint8_t rb_idP);
|
||||
extern void pdcp_process_output_sdus_high (struct pdcp_entity *pdcpP, mem_block *sduP, uint16_t data_sizeP, uint16_t rb_idP);
|
||||
extern void pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
|
||||
extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
|
||||
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
|
||||
extern void *pdcp_tx (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block * sduP);
|
||||
extern void *pdcp_tx (struct pdcp_entity *pdcpP, uint16_t data_sizeP, mem_block *sduP);
|
||||
extern int reception_from_rohc_mt(void);
|
||||
extern int reception_from_rohc_bs(void);
|
||||
#else
|
||||
extern BOOL pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t * sduP, uint8_t is_data_plane);
|
||||
extern BOOL pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char* sdu_buffer,
|
||||
uint8_t is_data_pdu
|
||||
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
|
||||
,const uint32_t * const sourceL2Id
|
||||
,const uint32_t * const destinationL2Id
|
||||
#endif
|
||||
);
|
||||
extern BOOL pdcp_data_ind (module_id_t module_idP, rb_id_t rab_idP, sdu_size_t data_sizeP, mem_block_t *sduP, uint8_t is_data_plane);
|
||||
extern BOOL pdcp_data_req (module_id_t module_id, uint32_t frame, uint8_t eNB_flag, rb_id_t rab_id, uint32_t muiP, uint32_t confirmP, sdu_size_t sdu_buffer_size, unsigned char *sdu_buffer,
|
||||
uint8_t is_data_pdu,const uint32_t *const sourceL2Id,const uint32_t *const destinationL2Id
|
||||
);
|
||||
//extern BOOL pdcp_data_req (struct pdcp_entity *pdcpP, mem_block * sduP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block * cprimitiveP);
|
||||
extern void send_pdcp_control_primitive (struct pdcp_entity *pdcpP, mem_block *cprimitiveP);
|
||||
extern void control_pdcp (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_am (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block * sduP, uint8_t rb_idP);
|
||||
extern void pdcp_process_output_sdus (struct pdcp_entity *pdcpP, mem_block *sduP, uint8_t rb_idP);
|
||||
extern void pdcp_process_input_sdus_um (struct pdcp_entity *pdcpP);
|
||||
extern void pdcp_process_input_sdus_tr (struct pdcp_entity *pdcpP);
|
||||
extern void init_pdcp (struct pdcp_entity *pdcpP, struct rb_dispatcher *rbP, uint8_t rb_idP);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user