Commit 00173165 authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/develop-nr' into nr-dual-connectivity

 Conflicts:
	openair2/RRC/LTE/MESSAGES/asn1_msg.c
parents dd760540 b3bc216d
...@@ -44,7 +44,7 @@ pipeline { ...@@ -44,7 +44,7 @@ pipeline {
disableConcurrentBuilds() disableConcurrentBuilds()
timestamps() timestamps()
gitLabConnection('OAI GitLab') 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') ansiColor('xterm')
} }
...@@ -615,6 +615,25 @@ pipeline { ...@@ -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 { post {
always { always {
......
...@@ -54,6 +54,10 @@ def eNB_CommitID ...@@ -54,6 +54,10 @@ def eNB_CommitID
def eNB_AllowMergeRequestProcess = false def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch def eNB_TargetBranch
def doEpcLogCollection = true
pipeline { pipeline {
agent { agent {
label pythonExecutor label pythonExecutor
...@@ -61,7 +65,7 @@ pipeline { ...@@ -61,7 +65,7 @@ pipeline {
options { options {
disableConcurrentBuilds() disableConcurrentBuilds()
ansiColor('xterm') ansiColor('xterm')
lock(extra: [[resource: ciSmartPhoneResource]], resource: ciSmartPhoneResource) lock(extra: [[resource: oaiUEResource]], resource: ciSmartPhoneResource)
} }
stages { stages {
...@@ -139,6 +143,11 @@ pipeline { ...@@ -139,6 +143,11 @@ pipeline {
if (params.EPC_IPAddress == null) { if (params.EPC_IPAddress == null) {
allParametersPresent = false allParametersPresent = false
} else {
if (params.EPC_IPAddress == "none") {
doEpcLogCollection = false
echo "No EPC collections (ping/iperf/hss/mme/spgw)"
}
} }
if (params.EPC_Type == null) { if (params.EPC_Type == null) {
allParametersPresent = false allParametersPresent = false
...@@ -167,8 +176,8 @@ pipeline { ...@@ -167,8 +176,8 @@ pipeline {
sh "git checkout -f ${eNB_CommitID}" sh "git checkout -f ${eNB_CommitID}"
} }
} else { } else {
echo "Some parameters are missing" currentBuild.result = 'ABORTED'
sh "./ci-scripts/fail.sh" error('Stopping early because some parameters are missing')
} }
} }
} }
...@@ -299,6 +308,9 @@ pipeline { ...@@ -299,6 +308,9 @@ pipeline {
} }
} }
stage('Log Collection (Ping)') { stage('Log Collection (Ping)') {
when {
expression {doEpcLogCollection}
}
steps { steps {
withCredentials([ withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
...@@ -317,6 +329,9 @@ pipeline { ...@@ -317,6 +329,9 @@ pipeline {
} }
} }
stage('Log Collection (Iperf)') { stage('Log Collection (Iperf)') {
when {
expression {doEpcLogCollection}
}
steps { steps {
withCredentials([ withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
...@@ -335,6 +350,9 @@ pipeline { ...@@ -335,6 +350,9 @@ pipeline {
} }
} }
stage('Log Collection (SPGW)') { stage('Log Collection (SPGW)') {
when {
expression {doEpcLogCollection}
}
steps { steps {
withCredentials([ withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
...@@ -353,6 +371,9 @@ pipeline { ...@@ -353,6 +371,9 @@ pipeline {
} }
} }
stage('Log Collection (MME)') { stage('Log Collection (MME)') {
when {
expression {doEpcLogCollection}
}
steps { steps {
withCredentials([ withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
...@@ -371,6 +392,9 @@ pipeline { ...@@ -371,6 +392,9 @@ pipeline {
} }
} }
stage('Log Collection (HSS)') { stage('Log Collection (HSS)') {
when {
expression {doEpcLogCollection}
}
steps { steps {
withCredentials([ withCredentials([
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password']
......
...@@ -103,6 +103,7 @@ function build_on_vm { ...@@ -103,6 +103,7 @@ function build_on_vm {
echo "############################################################" echo "############################################################"
echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS echo "sudo cp 01proxy /etc/apt/apt.conf.d/" > $VM_CMDS
echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS echo "touch /home/ubuntu/.hushlogin" >> $VM_CMDS
echo "git config --global https.postBuffer 123289600" >> $VM_CMDS
if [[ "$VM_NAME" == *"-cppcheck"* ]] if [[ "$VM_NAME" == *"-cppcheck"* ]]
then then
if [ $DAEMON -eq 0 ] if [ $DAEMON -eq 0 ]
......
...@@ -984,8 +984,14 @@ class SSHConnection(): ...@@ -984,8 +984,14 @@ class SSHConnection():
logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m') logging.debug('\u001B[1m oaitun_ue1 interface is mounted and configured\u001B[0m')
tunnelInterfaceStatus = True tunnelInterfaceStatus = True
else: else:
logging.error('\u001B[1m oaitun_ue1 interface is either NOT mounted or NOT configured\u001B[0m') self.command('ifconfig oaitun_ue1', '\$', 4)
tunnelInterfaceStatus = False 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: else:
tunnelInterfaceStatus = True tunnelInterfaceStatus = True
else: else:
...@@ -1807,7 +1813,6 @@ class SSHConnection(): ...@@ -1807,7 +1813,6 @@ class SSHConnection():
else: else:
self.open(self.UEIPAddress, self.UEUserName, self.UEPassword) self.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
self.command('cd ' + self.UESourceCodePath + '/cmake_targets/', '\$', 5) 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_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) 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 # TIMEOUT CASE
......
...@@ -348,10 +348,11 @@ fi ...@@ -348,10 +348,11 @@ fi
VM_TEMPLATE=ci- 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 # It will be the release used when building
ASN1VEROPT=( `grep "add_list2_option(RRC_ASN1_VERSION" cmake_targets/CMakeLists.txt` ) ASN1VEROPT=( `grep "set (RRC_ASN1_VERSION" cmake_targets/CMakeLists.txt` )
ASN1VER=${ASN1VEROPT[1]//\"} ASN1VER=${ASN1VEROPT[2]//\"}
ASN1VER=${ASN1VER//)}
unset ASN1VEROPT unset ASN1VEROPT
# variable to identify and store the command (build, create ...) # variable to identify and store the command (build, create ...)
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<htmlTabRef>test-10-tm1</htmlTabRef> <htmlTabRef>test-10-tm1</htmlTabRef>
<htmlTabName>Test-10MHz-TM1</htmlTabName> <htmlTabName>Test-10MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040102 040102
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<htmlTabRef>test-20-tm1</htmlTabRef> <htmlTabRef>test-20-tm1</htmlTabRef>
<htmlTabName>Test-20MHz-TM1</htmlTabName> <htmlTabName>Test-20MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
030201 030201
040101 040101
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
--> -->
<testCaseList> <testCaseList>
<htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef> <htmlTabRef>run-oai-gnb-nr-ue</htmlTabRef>
<htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName> <htmlTabName>Run-gNB-and-NR-UE</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>4</repeatCount> <repeatCount>4</repeatCount>
<TestCaseRequestedList> <TestCaseRequestedList>
......
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
--> -->
<testCaseList> <testCaseList>
<htmlTabRef>run-OAI-gNB-NR-UE-USRP</htmlTabRef> <htmlTabRef>terminate-oai-gnb-nr-ue</htmlTabRef>
<htmlTabName>run OAI gNB and OAI NR UE USRP</htmlTabName> <htmlTabName>Terminate-gNB-and-NR-UE</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon> <htmlTabIcon>tasks</htmlTabIcon>
<TestCaseRequestedList> <TestCaseRequestedList>
090108 090109 090108 090109
......
...@@ -285,34 +285,10 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR}) ...@@ -285,34 +285,10 @@ set(protobuf_generated_dir ${OPENAIR_BIN_DIR})
# RRC # 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)
if (${RRC_ASN1_VERSION} STREQUAL "Rel8") set (RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/LTE/MESSAGES/asn1c/ASN1_files/lte-rrc-15.6.0.asn1)
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}) add_definitions(-DLTE_RRC_VERSION=${LTE_RRC_VERSION})
set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION}) set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
...@@ -339,12 +315,9 @@ include_directories ("${RRC_FULL_DIR}") ...@@ -339,12 +315,9 @@ include_directories ("${RRC_FULL_DIR}")
#NR RRC #NR RRC
####### #######
add_list2_option(NR_RRC_ASN1_VERSION "NR_Rel15" "ASN.1 version of NR_RRC interface") set (NR_RRC_ASN1_VERSION "NR_Rel15" )
make_version(NR_RRC_VERSION 15 6 0)
if (${NR_RRC_ASN1_VERSION} STREQUAL "NR_Rel15") set (NR_RRC_GRAMMAR ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.6.0.asn1)
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")
add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION}) add_definitions(-DNR_RRC_VERSION=${NR_RRC_VERSION})
set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION}) set (NR_RRC_FULL_DIR ${asn1_generated_dir}/RRC_${NR_RRC_ASN1_VERSION})
...@@ -373,34 +346,12 @@ include_directories ("${NR_RRC_FULL_DIR}") ...@@ -373,34 +346,12 @@ include_directories ("${NR_RRC_FULL_DIR}")
# Same limitation as described in RRC: unknown generated file list # Same limitation as described in RRC: unknown generated file list
# so we generate it at cmake time # 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) set(S1AP_DIR ${OPENAIR3_DIR}/S1AP)
if (${S1AP_RELEASE} STREQUAL "R8") make_version(S1AP_VERSION 15 6 0)
make_version(S1AP_VERSION 8 10 0) set(S1AP_ASN_FILES "s1ap-15.6.0.asn1")
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")
add_definitions(-DS1AP_VERSION=${S1AP_VERSION}) add_definitions(-DS1AP_VERSION=${S1AP_VERSION})
set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE}) set(S1AP_ASN_DIR ${S1AP_DIR}/MESSAGES/ASN1/${S1AP_RELEASE})
set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE}) set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE})
...@@ -448,25 +399,12 @@ add_dependencies(S1AP_ENB rrc_flag s1ap_flag) ...@@ -448,25 +399,12 @@ add_dependencies(S1AP_ENB rrc_flag s1ap_flag)
# Same limitation as described in RRC/S1AP: unknown generated file list # Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time # 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) set(X2AP_DIR ${OPENAIR2_DIR}/X2AP)
if (${X2AP_RELEASE} STREQUAL "R8") make_version(X2AP_VERSION 15 6 0)
make_version(X2AP_VERSION 8 9 0) set(X2AP_ASN_FILES x2ap-15.6.0.asn1)
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")
add_definitions(-DX2AP_VERSION=${X2AP_VERSION}) add_definitions(-DX2AP_VERSION=${X2AP_VERSION})
set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE}) set(X2AP_ASN_DIR ${X2AP_DIR}/MESSAGES/ASN1/${X2AP_RELEASE})
set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE}) set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE})
......
...@@ -47,7 +47,6 @@ VCD_TIMING="False" ...@@ -47,7 +47,6 @@ VCD_TIMING="False"
DEADLINE_SCHEDULER_FLAG_USER="" DEADLINE_SCHEDULER_FLAG_USER=""
CPU_AFFINITY_FLAG_USER="False" #Only valid when low-latency flag is set to False CPU_AFFINITY_FLAG_USER="False" #Only valid when low-latency flag is set to False
REL="Rel15" REL="Rel15"
NR_REL="NR_Rel15"
HW="None" HW="None"
TP="None" TP="None"
EPC=0 EPC=0
...@@ -107,10 +106,6 @@ Options ...@@ -107,10 +106,6 @@ Options
Makes test program for haw latency tests Makes test program for haw latency tests
-a | --agent -a | --agent
Enables agent for software-defined control of the eNB 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 -w | --hardware
EXMIMO, USRP, BLADERF, LMSSDR, IRIS, ADRV9371_ZC706, SIMU, None (Default) EXMIMO, USRP, BLADERF, LMSSDR, IRIS, ADRV9371_ZC706, SIMU, None (Default)
Adds this RF board support (in external packages installation and in compilation) Adds this RF board support (in external packages installation and in compilation)
...@@ -236,10 +231,6 @@ function main() { ...@@ -236,10 +231,6 @@ function main() {
--UE-gen-nvram) --UE-gen-nvram)
gen_nvram_path=$(readlink -f $2) gen_nvram_path=$(readlink -f $2)
shift 2;; shift 2;;
-r | --3gpp-release)
REL=$2
echo_info "Setting release to: $REL"
shift 2;;
-w | --hardware) -w | --hardware)
# Use OAI_USRP as the key word USRP is used inside UHD driver # Use OAI_USRP as the key word USRP is used inside UHD driver
case "$2" in case "$2" in
...@@ -551,8 +542,6 @@ function main() { ...@@ -551,8 +542,6 @@ function main() {
# echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file # echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
echo "set ( UESIM_EXPANSION $UESIM_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 ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
......
...@@ -11,5 +11,14 @@ if [ "$done_flag" -ot $ASN1_SOURCE_DIR ] ; then ...@@ -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 rm -f "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.c "$GENERATED_FULL_DIR"/${ASN1C_PREFIX}*.h
mkdir -p "$GENERATED_FULL_DIR" 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 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 fi
touch $done_flag touch $done_flag
\ No newline at end of file
...@@ -663,11 +663,7 @@ static void* gNB_thread_prach( void* param ) { ...@@ -663,11 +663,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; 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"); LOG_D(PHY,"Running gNB prach procedures\n");
prach_procedures(gNB prach_procedures(gNB ,0);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0
#endif
);
if (release_thread(&proc->mutex_prach,&proc->instance_cnt_prach,"gNB_prach_thread") < 0) break; if (release_thread(&proc->mutex_prach,&proc->instance_cnt_prach,"gNB_prach_thread") < 0) break;
} }
......
...@@ -854,10 +854,7 @@ static void *ru_thread_prach( void *param ) { ...@@ -854,10 +854,7 @@ static void *ru_thread_prach( void *param ) {
/*if (ru->gNB_list[0]){ /*if (ru->gNB_list[0]){
prach_procedures( prach_procedures(
ru->gNB_list[0] ru->gNB_list[0],0
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0
#endif
); );
} }
else { else {
...@@ -867,10 +864,7 @@ static void *ru_thread_prach( void *param ) { ...@@ -867,10 +864,7 @@ static void *ru_thread_prach( void *param ) {
NULL, NULL,
NULL, NULL,
proc->frame_prach, proc->frame_prach,
0 0,0
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
,0
#endif
); );
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0 ); */ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0 ); */
......
...@@ -63,7 +63,6 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -63,7 +63,6 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "common/utils/LOG/log.h" #include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h" #include "UTIL/OPT/opt.h"
//#include "PHY/TOOLS/time_meas.h" //#include "PHY/TOOLS/time_meas.h"
...@@ -513,17 +512,7 @@ static void get_options(void) { ...@@ -513,17 +512,7 @@ static void get_options(void) {
paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC_NR ; paramdef_t cmdline_logparams[] = CMDLINE_LOGPARAMS_DESC_NR ;
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL); 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); config_process_cmdline( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL);
...@@ -923,10 +912,8 @@ int main( int argc, char **argv ) ...@@ -923,10 +912,8 @@ int main( int argc, char **argv )
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX); MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
#endif #endif
if (opt_type != OPT_NONE) { init_opt();
if (init_opt() == -1)
LOG_E(OPT,"failed to run OPT \n");
}
#ifdef PDCP_USE_NETLINK #ifdef PDCP_USE_NETLINK
netlink_init(); netlink_init();
...@@ -1158,8 +1145,6 @@ int main( int argc, char **argv ) ...@@ -1158,8 +1145,6 @@ int main( int argc, char **argv )
RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice); RC.ru[ru_id]->ifdevice.trx_end_func(&RC.ru[ru_id]->ifdevice);
} }
if (opt_enabled == 1)
terminate_opt();
logClean(); logClean();
printf("Bye.\n"); printf("Bye.\n");
......
...@@ -34,8 +34,6 @@ ...@@ -34,8 +34,6 @@
{"K" , CONFIG_HLP_ITTIL, PARAMFLAG_NOFREE, strptr:&itti_dump_file, defstrval:"/tmp/itti.dump", TYPE_STRING, 0}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
......
...@@ -408,18 +408,6 @@ static void get_options(void) { ...@@ -408,18 +408,6 @@ static void get_options(void) {
paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC_NR ; paramdef_t cmdline_logparams[] =CMDLINE_LOGPARAMS_DESC_NR ;
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL); 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); config_process_cmdline( cmdline_logparams,sizeof(cmdline_logparams)/sizeof(paramdef_t),NULL);
if(config_isparamset(cmdline_logparams,CMDLINE_ONLINELOG_IDX)) { if(config_isparamset(cmdline_logparams,CMDLINE_ONLINELOG_IDX)) {
...@@ -702,10 +690,7 @@ int main( int argc, char **argv ) { ...@@ -702,10 +690,7 @@ int main( int argc, char **argv ) {
cpuf=get_cpu_freq_GHz(); cpuf=get_cpu_freq_GHz();
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info); itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
if (opt_type != OPT_NONE) { init_opt() ;
if (init_opt() == -1)
LOG_E(OPT,"failed to run OPT \n");
}
if (ouput_vcd) { if (ouput_vcd) {
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd"); vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
......
...@@ -74,8 +74,6 @@ ...@@ -74,8 +74,6 @@
{"E" , CONFIG_HLP_TQFS, PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
......
...@@ -24,52 +24,43 @@ ...@@ -24,52 +24,43 @@
#define __INIT_DEFS_NB_IOT__H__ #define __INIT_DEFS_NB_IOT__H__
//#include "PHY/defs_NB_IoT.h" //#include "PHY/defs_NB_IoT.h"
#include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h" #include "openair2/PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "nfapi_interface.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).*/ /*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, void phy_config_mib_eNB_NB_IoT(int Mod_id,
int eutra_band, int eutra_band,
int Nid_cell, int Nid_cell,
int Ncp, int Ncp,
int Ncp_UL, int Ncp_UL,
int p_eNB, int p_eNB,
uint16_t EARFCN, uint16_t EARFCN,
uint16_t prb_index, // NB_IoT_RB_ID, uint16_t prb_index, // NB_IoT_RB_ID,
uint16_t operating_mode, uint16_t operating_mode,
uint16_t control_region_size, uint16_t control_region_size,
uint16_t eutra_NumCRS_ports); uint16_t eutra_NumCRS_ports);
/*NB_phy_config_sib1_eNB is not needed since NB-IoT use only FDD mode*/ /*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).*/ /*brief Configure LTE_DL_FRAME_PARMS with components of SIB2-NB (at eNB).*/
//void NB_phy_config_sib2_eNB(module_id_t Mod_id, //void NB_phy_config_sib2_eNB(module_id_t Mod_id,
// int CC_id, // int CC_id,
// RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon // RadioResourceConfigCommonSIB_NB_r13_t *radioResourceConfigCommon
// ); // );
void phy_config_sib2_eNB_NB_IoT(uint8_t Mod_id, void phy_config_sib2_eNB_NB_IoT(uint8_t Mod_id,
nfapi_nb_iot_config_t *config, nfapi_nb_iot_config_t *config,
nfapi_rf_config_t *rf_config, nfapi_rf_config_t *rf_config,
nfapi_uplink_reference_signal_config_t* ul_nrs_config, nfapi_uplink_reference_signal_config_t *ul_nrs_config,
extra_phyConfig_t* extra_phy_parms); extra_phyConfig_t *extra_phy_parms);
void phy_config_dedicated_eNB_NB_IoT(module_id_t Mod_id, void phy_config_dedicated_eNB_NB_IoT(module_id_t Mod_id,
rnti_t rnti, rnti_t rnti,
extra_phyConfig_t* extra_phy_parms); 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); void phy_init_nb_iot_eNB(PHY_VARS_eNB_NB_IoT *phyvar);
int l1_north_init_NB_IoT(void); int l1_north_init_NB_IoT(void);
......
This diff is collapsed.
This diff is collapsed.
...@@ -165,20 +165,16 @@ void phy_config_sib13_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_A ...@@ -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); 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); 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, void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
uint8_t eNB_id, uint8_t eNB_id,
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig){ struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig) {
PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id]; PHY_VARS_UE *ue = PHY_vars_UE_g[Mod_id][CC_id];
LTE_DL_FRAME_PARMS *fp = &ue->frame_parms; LTE_DL_FRAME_PARMS *fp = &ue->frame_parms;
if (nonMBSFN_SubframeConfig != NULL) { if (nonMBSFN_SubframeConfig != NULL) {
fp->NonMBSFN_config_flag = 0; fp->NonMBSFN_config_flag = 0;
fp->NonMBSFN_config.radioframeAllocationPeriod=nonMBSFN_SubframeConfig->radioFrameAllocationPeriod_r14; 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, ...@@ -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); 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 ...@@ -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)); 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, void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index, uint8_t eNB_index,
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10, LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
int CC_id) { int CC_id) {
} }
#endif
void phy_config_harq_ue(module_id_t Mod_id, void phy_config_harq_ue(module_id_t Mod_id,
int CC_id, int CC_id,
uint8_t eNB_id, uint8_t eNB_id,
uint16_t max_harq_tx) uint16_t max_harq_tx) {
{
PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id]; PHY_VARS_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
phy_vars_ue->ulsch[eNB_id]->Mlimit = max_harq_tx; 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, ...@@ -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 { } else {
LOG_D(PHY,"[PHY][UE %d] Received NULL radioResourceConfigDedicated from eNB %d\n",Mod_id,eNB_id); LOG_D(PHY,"[PHY][UE %d] Received NULL radioResourceConfigDedicated from eNB %d\n",Mod_id,eNB_id);
return; return;
......
...@@ -25,8 +25,7 @@ ...@@ -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_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}; 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; int X = fp->srsX;
fp->ul_symbols_in_S_subframe=(1+X); fp->ul_symbols_in_S_subframe=(1+X);
...@@ -37,8 +36,7 @@ void set_S_config(LTE_DL_FRAME_PARMS *fp) ...@@ -37,8 +36,7 @@ void set_S_config(LTE_DL_FRAME_PARMS *fp)
} }
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms, int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t osf) uint8_t osf) {
{
uint8_t log2_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); 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, ...@@ -128,12 +126,10 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,
frame_parms->nb_prefix_samples0>>=(2-log2_osf); frame_parms->nb_prefix_samples0>>=(2-log2_osf);
frame_parms->N_RBGS = 2; frame_parms->N_RBGS = 2;
frame_parms->N_RBG = 13; 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->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->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_samples_khz_1dot25>>=(2-log2_osf);
frame_parms->nb_prefix_samples0_khz_1dot25>>=(2-log2_osf); frame_parms->nb_prefix_samples0_khz_1dot25>>=(2-log2_osf);
#endif
break; break;
case 15: case 15:
...@@ -170,8 +166,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -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_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->N_RB_UL=%d\n",frame_parms->N_RB_UL);
LOG_I(PHY,"frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell); LOG_I(PHY,"frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell);
......
This diff is collapsed.
...@@ -34,12 +34,9 @@ ...@@ -34,12 +34,9 @@
#include "LTE_PHICH-Config.h" #include "LTE_PHICH-Config.h"
#include "LTE_MBSFN-SubframeConfigList.h" #include "LTE_MBSFN-SubframeConfigList.h"
#include "LTE_MobilityControlInfo.h" #include "LTE_MobilityControlInfo.h"
#if (LTE_RRC_VERSION >= MAKE_VERSION(10, 0, 0))
#include "LTE_SCellToAddMod-r10.h" #include "LTE_SCellToAddMod-r10.h"
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#include "LTE_NonMBSFN-SubframeConfig-r14.h" #include "LTE_NonMBSFN-SubframeConfig-r14.h"
#endif
/** @addtogroup _PHY_STRUCTURES_ /** @addtogroup _PHY_STRUCTURES_
* @{ * @{
*/ */
...@@ -73,8 +70,8 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue); ...@@ -73,8 +70,8 @@ void phy_init_nr_top(PHY_VARS_NR_UE *ue);
@note The current implementation will never return -1, but segfault. @note The current implementation will never return -1, but segfault.
*/ */
int init_lte_ue_signal(PHY_VARS_UE *phy_vars_ue, int init_lte_ue_signal(PHY_VARS_UE *phy_vars_ue,
int nb_connected_eNB, int nb_connected_eNB,
uint8_t abstraction_flag); uint8_t abstraction_flag);
/*! /*!
\brief Allocate and initialize the PHY variables releated to the transport channel buffers (UL/DL) \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); ...@@ -114,15 +111,15 @@ void phy_free_lte_eNB(PHY_VARS_eNB *phy_vars_eNb);
@param phich_config Pointer to PHICH_CONFIG_COMMON @param phich_config Pointer to PHICH_CONFIG_COMMON
*/ */
void phy_config_mib_eNB(int Mod_id, void phy_config_mib_eNB(int Mod_id,
int CC_id, int CC_id,
int eutra_band, int eutra_band,
int N_RB_DL, int N_RB_DL,
LTE_PHICH_Config_t *phich_config, LTE_PHICH_Config_t *phich_config,
int Nid_cell, int Nid_cell,
int Ncp, int Ncp,
int p_eNB, int p_eNB,
uint32_t dl_CarrierFreq, uint32_t dl_CarrierFreq,
uint32_t ul_CarrierFreq); uint32_t ul_CarrierFreq);
...@@ -249,7 +246,7 @@ void phy_config_dedicated_ue(module_id_t Mod_id, ...@@ -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, 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. \brief Configure UE MBSFN common parameters.
\details Invoked upon reception of SIB13 from eNB. \details Invoked upon reception of SIB13 from eNB.
...@@ -265,8 +262,8 @@ void phy_config_sib13_ue(module_id_t Mod_id, ...@@ -265,8 +262,8 @@ void phy_config_sib13_ue(module_id_t Mod_id,
long mbsfn_AreaId_r9); long mbsfn_AreaId_r9);
void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id, void phy_config_sib1_fembms_ue(module_id_t Mod_id,int CC_id,
uint8_t eNB_id, uint8_t eNB_id,
struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig); struct LTE_NonMBSFN_SubframeConfig_r14 *nonMBSFN_SubframeConfig);
/** /**
\brief Configure eNB MBSFN common parameters. \brief Configure eNB MBSFN common parameters.
...@@ -341,25 +338,24 @@ void init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms); ...@@ -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 copy_lte_parms_to_phy_framing(LTE_DL_FRAME_PARMS *frame_parm, PHY_FRAMING *phy_framing);
void lte_param_init(PHY_VARS_eNB **eNBp, void lte_param_init(PHY_VARS_eNB **eNBp,
PHY_VARS_UE **UEp, PHY_VARS_UE **UEp,
RU_t **rup, RU_t **rup,
unsigned char N_tx_port_eNB, unsigned char N_tx_port_eNB,
unsigned char N_tx_phy, unsigned char N_tx_phy,
unsigned char N_rx_ru, unsigned char N_rx_ru,
unsigned char N_rx_ue, unsigned char N_rx_ue,
unsigned char transmission_mode, unsigned char transmission_mode,
uint8_t extended_prefix_flag, uint8_t extended_prefix_flag,
frame_t frame_type, frame_t frame_type,
uint16_t Nid_cell, uint16_t Nid_cell,
uint8_t tdd_config, uint8_t tdd_config,
uint8_t N_RB_DL, uint8_t N_RB_DL,
uint8_t pa, uint8_t pa,
uint8_t threequarter_fs, uint8_t threequarter_fs,
uint8_t osf, 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, void phy_config_dedicated_scell_ue(uint8_t Mod_id,
uint8_t eNB_index, uint8_t eNB_index,
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10, LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
...@@ -370,7 +366,6 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id, ...@@ -370,7 +366,6 @@ void phy_config_dedicated_scell_eNB(uint8_t Mod_id,
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10, LTE_SCellToAddMod_r10_t *sCellToAddMod_r10,
int CC_id); int CC_id);
#endif
...@@ -383,7 +378,7 @@ void phy_config_request(PHY_Config_t *phy_config); ...@@ -383,7 +378,7 @@ void phy_config_request(PHY_Config_t *phy_config);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf); int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms); 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_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_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 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); 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); void init_nr_ue_transport(PHY_VARS_NR_UE *ue,int abstraction_flag);
......
...@@ -131,67 +131,53 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *ue, ...@@ -131,67 +131,53 @@ int lte_dl_mbsfn_rx(PHY_VARS_UE *ue,
return(0); return(0);
} }
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int lte_dl_mbsfn_khz_1dot25(PHY_VARS_eNB *eNB, int32_t *output, int lte_dl_mbsfn_khz_1dot25(PHY_VARS_eNB *eNB, int32_t *output,
short amp, short amp,
int subframe) int subframe) {
{
unsigned int mprime,mprime_dword,mprime_qpsk_symb,m; unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
unsigned short k=0,a; unsigned short k=0,a;
int32_t qpsk[4]; int32_t qpsk[4];
a = (amp*ONE_OVER_SQRT2_Q15)>>15; a = (amp*ONE_OVER_SQRT2_Q15)>>15;
((short *)&qpsk[0])[0] = a; ((short *)&qpsk[0])[0] = a;
((short *)&qpsk[0])[1] = a; ((short *)&qpsk[0])[1] = a;
((short *)&qpsk[1])[0] = -a; ((short *)&qpsk[1])[0] = -a;
((short *)&qpsk[1])[1] = a; ((short *)&qpsk[1])[1] = a;
((short *)&qpsk[2])[0] = a; ((short *)&qpsk[2])[0] = a;
((short *)&qpsk[2])[1] = -a; ((short *)&qpsk[2])[1] = -a;
((short *)&qpsk[3])[0] = -a; ((short *)&qpsk[3])[0] = -a;
((short *)&qpsk[3])[1] = -a; ((short *)&qpsk[3])[1] = -a;
mprime = 3*(110 - eNB->frame_parms.N_RB_DL); 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 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
if ((subframe&0x1)==0) // n_sf mod 2 == 0: even k = 6*m;
k = 6*m; else
else k = 6*m + 3;
k = 6*m + 3;
k+=eNB->frame_parms.first_carrier_offset_khz_1dot25; k+=eNB->frame_parms.first_carrier_offset_khz_1dot25;
mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf;
mprime_dword = mprime>>4; if (k >= eNB->frame_parms.ofdm_symbol_size_khz_1dot25) {
mprime_qpsk_symb = mprime&0xf; k++; // skip DC carrier
k-=eNB->frame_parms.ofdm_symbol_size_khz_1dot25;
}
if (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];
k++; // skip DC carrier mprime++;
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++;
}
return(0); return(0);
} }
int lte_dl_mbsfn_khz_1dot25_rx(PHY_VARS_UE *ue, int lte_dl_mbsfn_khz_1dot25_rx(PHY_VARS_UE *ue,
int *output, int *output,
int subframe) int subframe) {
{
unsigned int mprime,mprime_dword,mprime_qpsk_symb,m; unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
unsigned short k=0; unsigned short k=0;
unsigned int qpsk[4]; unsigned int qpsk[4];
// This includes complex conjugate for channel estimation // This includes complex conjugate for channel estimation
((short *)&qpsk[0])[0] = ONE_OVER_SQRT2_Q15; ((short *)&qpsk[0])[0] = ONE_OVER_SQRT2_Q15;
((short *)&qpsk[0])[1] = -ONE_OVER_SQRT2_Q15; ((short *)&qpsk[0])[1] = -ONE_OVER_SQRT2_Q15;
((short *)&qpsk[1])[0] = -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, ...@@ -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[2])[1] = ONE_OVER_SQRT2_Q15;
((short *)&qpsk[3])[0] = -ONE_OVER_SQRT2_Q15; ((short *)&qpsk[3])[0] = -ONE_OVER_SQRT2_Q15;
((short *)&qpsk[3])[1] = ONE_OVER_SQRT2_Q15; ((short *)&qpsk[3])[1] = ONE_OVER_SQRT2_Q15;
mprime = 3*(110 - ue->frame_parms.N_RB_DL); 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 for (m=0; m<ue->frame_parms.N_RB_DL*24; m++) { // m = 0:24*N_RB_DL-1
{ mprime_dword = mprime>>4; mprime_dword = mprime>>4;
mprime_qpsk_symb = mprime&0xf; mprime_qpsk_symb = mprime&0xf;
// this is r_mprime from 3GPP 36-211 6.10.1.2 // 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]; output[k] = qpsk[(ue->lte_gold_mbsfn_khz_1dot25_table[subframe][mprime_dword]>>(2*mprime_qpsk_symb))&3];
mprime++; mprime++;
k++; k++;
} }
return(0); return(0);
} }
#endif // MAKE Rel14
...@@ -44,15 +44,12 @@ ...@@ -44,15 +44,12 @@
#include "lte_refsig.h" #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 char sfn,l;
unsigned int n,x1,x2;//,x1tmp,x2tmp; unsigned int n,x1,x2;//,x1tmp,x2tmp;
for (sfn=0; sfn<10; sfn++) { for (sfn=0; sfn<10; sfn++) {
for (l=0; l<3; l++) { for (l=0; l<3; l++) {
if (l==0) if (l==0)
x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + 2 + (7*(1+(sfn<<1)))))<<9); //cinit x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + 2 + (7*(1+(sfn<<1)))))<<9); //cinit
else else
...@@ -61,26 +58,21 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl ...@@ -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 //x2 = frame_parms->Ncp + (Nid_cell<<1) + (1+(Nid_cell<<1))*(1 + (3*l) + (7*(1+ns))); //cinit
//n = 0 //n = 0
// printf("cinit (sfn %d, l %d) => %d\n",sfn,l,x2); // printf("cinit (sfn %d, l %d) => %d\n",sfn,l,x2);
// Initializing the Sequence // Initializing the Sequence
x1 = 1+ (1<<31); x1 = 1+ (1<<31);
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31); x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
// skip first 50 double words (1600 bits) // skip first 50 double words (1600 bits)
// printf("n=0 : x1 %x, x2 %x\n",x1,x2); // printf("n=0 : x1 %x, x2 %x\n",x1,x2);
for (n=1; n<50; n++) { for (n=1; n<50; n++) {
x1 = (x1>>1) ^ (x1>>4); x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28); x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4); x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28); x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
// printf("x1 : %x, x2 : %x\n",x1,x2); // printf("x1 : %x, x2 : %x\n",x1,x2);
} }
for (n=0; n<42; n++) { for (n=0; n<42; n++) {
x1 = (x1>>1) ^ (x1>>4); x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28); x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4); 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 ...@@ -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; lte_gold_mbsfn_table[sfn][l][n] = x1^x2;
// printf("n=%d : c %x\n",n,x1^x2); // printf("n=%d : c %x\n",n,x1^x2);
} }
} }
} }
} }
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) {
#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){
unsigned char sfn; unsigned char sfn;
unsigned int n,x1,x2;//,x1tmp,x2tmp; 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 ...@@ -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 x2 = (Nid_mbsfn) + (((1+(Nid_mbsfn<<1))*(1 + (7*(1+sfn))))<<9); //cinit
x1 = 1+ (1<<31); x1 = 1+ (1<<31);
x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31); x2=x2 ^ ((x2 ^ (x2>>1) ^ (x2>>2) ^ (x2>>3))<<31);
for (n=1; n<50; n++) { for (n=1; n<50; n++) {
x1 = (x1>>1) ^ (x1>>4); x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28); x1 = x1 ^ (x1<<31) ^ (x1<<28);
x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4); x2 = (x2>>1) ^ (x2>>2) ^ (x2>>3) ^ (x2>>4);
x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28); x2 = x2 ^ (x2<<31) ^ (x2<<30) ^ (x2<<29) ^ (x2<<28);
} }
for (n=0; n<150; n++) { for (n=0; n<150; n++) {
x1 = (x1>>1) ^ (x1>>4); x1 = (x1>>1) ^ (x1>>4);
x1 = x1 ^ (x1<<31) ^ (x1<<28); 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 ...@@ -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 #ifdef LTE_GOLD_MAIN
main() main() {
{
lte_gold_mbsfn(423,0); lte_gold_mbsfn(423,0);
} }
#endif #endif
This diff is collapsed.
...@@ -48,18 +48,13 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -48,18 +48,13 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int G, int G,
uint8_t q, uint8_t q,
uint16_t frame, uint16_t frame,
uint8_t Ns) uint8_t Ns) {
{
int n; int n;
// uint8_t reset; // uint8_t reset;
uint32_t x1, x2, s=0; uint32_t x1, x2, s=0;
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e; uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e;
uint8_t *e=dlsch_e; uint8_t *e=dlsch_e;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN); 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 // Rule for accumulation of subframes for BL/CE UEs
uint8_t Nacc=4; uint8_t Nacc=4;
uint16_t j0,j,idelta; uint16_t j0,j,idelta;
...@@ -69,122 +64,116 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -69,122 +64,116 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
#else #else
uint16_t i0 = dlsch->i0; uint16_t i0 = dlsch->i0;
#endif #endif
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
if (dlsch->harq_processes[harq_pid]->sib1_br_flag==1) Nacc=1; if (dlsch->harq_processes[harq_pid]->sib1_br_flag==1) Nacc=1;
#else #else
if (dlsch->sib1_br_flag==1) Nacc=1; if (dlsch->sib1_br_flag==1) Nacc=1;
#endif #endif
else if (dlsch->rnti == 0xFFFF || dlsch->rnti == 0xFFFE) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4; else if (dlsch->rnti == 0xFFFF || dlsch->rnti == 0xFFFE) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
// Note: above SC-RNTI will also have to be added when/if implemented // 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 == CEmodeA) Nacc=1;
else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4; else if (dlsch->harq_processes[harq_pid]->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#else #else
// Note: above SC-RNTI will also have to be added when/if implemented // Note: above SC-RNTI will also have to be added when/if implemented
else if (dlsch->CEmode == CEmodeA) Nacc=1; else if (dlsch->CEmode == CEmodeA) Nacc=1;
else if (dlsch->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4; else if (dlsch->CEmode == CEmodeB) Nacc = (frame_parms->frame_type == TDD) ? 10 : 4;
#endif #endif
if (frame_parms->frame_type == FDD || Nacc == 1) idelta = 0; if (frame_parms->frame_type == FDD || Nacc == 1) idelta = 0;
else idelta = Nacc-2; else idelta = Nacc-2;
j0 = (i0+idelta)/Nacc; j0 = (i0+idelta)/Nacc;
j = (i - i0)/Nacc; j = (i - i0)/Nacc;
#endif
// reset = 1; // reset = 1;
// x1 is set in lte_gold_generic // x1 is set in lte_gold_generic
if (mbsfn_flag == 0) { if (mbsfn_flag == 0) {
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) { if (dlsch->harq_processes[harq_pid]->i0 != 0xFFFF) {
#else #else
if (dlsch->i0 != 0xFFFF) { if (dlsch->i0 != 0xFFFF) {
#endif #endif
// rule for BL/CE UEs from Section 6.3.1 in 36.211 // 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; 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); 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
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
#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 { } else {
x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1 for PMCH 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 #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); 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 #endif
s = lte_gold_generic(&x1, &x2, 1); s = lte_gold_generic(&x1, &x2, 1);
for (n=0; n<(1+(G>>5)); n++) { for (n=0; n<(1+(G>>5)); n++) {
#ifdef DEBUG_SCRAMBLING #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
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));
e[0] = (e[0]) ^ (s&1);
e[1] = (e[1]) ^ ((s>>1)&1); #endif
e[2] = (e[2]) ^ ((s>>2)&1); e[0] = (e[0]) ^ (s&1);
e[3] = (e[3]) ^ ((s>>3)&1); e[1] = (e[1]) ^ ((s>>1)&1);
e[4] = (e[4]) ^ ((s>>4)&1); e[2] = (e[2]) ^ ((s>>2)&1);
e[5] = (e[5]) ^ ((s>>5)&1); e[3] = (e[3]) ^ ((s>>3)&1);
e[6] = (e[6]) ^ ((s>>6)&1); e[4] = (e[4]) ^ ((s>>4)&1);
e[7] = (e[7]) ^ ((s>>7)&1); e[5] = (e[5]) ^ ((s>>5)&1);
e[8] = (e[8]) ^ ((s>>8)&1); e[6] = (e[6]) ^ ((s>>6)&1);
e[9] = (e[9]) ^ ((s>>9)&1); e[7] = (e[7]) ^ ((s>>7)&1);
e[10] = (e[10]) ^ ((s>>10)&1); e[8] = (e[8]) ^ ((s>>8)&1);
e[11] = (e[11]) ^ ((s>>11)&1); e[9] = (e[9]) ^ ((s>>9)&1);
e[12] = (e[12]) ^ ((s>>12)&1); e[10] = (e[10]) ^ ((s>>10)&1);
e[13] = (e[13]) ^ ((s>>13)&1); e[11] = (e[11]) ^ ((s>>11)&1);
e[14] = (e[14]) ^ ((s>>14)&1); e[12] = (e[12]) ^ ((s>>12)&1);
e[15] = (e[15]) ^ ((s>>15)&1); e[13] = (e[13]) ^ ((s>>13)&1);
e[16] = (e[16]) ^ ((s>>16)&1); e[14] = (e[14]) ^ ((s>>14)&1);
e[17] = (e[17]) ^ ((s>>17)&1); e[15] = (e[15]) ^ ((s>>15)&1);
e[18] = (e[18]) ^ ((s>>18)&1); e[16] = (e[16]) ^ ((s>>16)&1);
e[19] = (e[19]) ^ ((s>>19)&1); e[17] = (e[17]) ^ ((s>>17)&1);
e[20] = (e[20]) ^ ((s>>20)&1); e[18] = (e[18]) ^ ((s>>18)&1);
e[21] = (e[21]) ^ ((s>>21)&1); e[19] = (e[19]) ^ ((s>>19)&1);
e[22] = (e[22]) ^ ((s>>22)&1); e[20] = (e[20]) ^ ((s>>20)&1);
e[23] = (e[23]) ^ ((s>>23)&1); e[21] = (e[21]) ^ ((s>>21)&1);
e[24] = (e[24]) ^ ((s>>24)&1); e[22] = (e[22]) ^ ((s>>22)&1);
e[25] = (e[25]) ^ ((s>>25)&1); e[23] = (e[23]) ^ ((s>>23)&1);
e[26] = (e[26]) ^ ((s>>26)&1); e[24] = (e[24]) ^ ((s>>24)&1);
e[27] = (e[27]) ^ ((s>>27)&1); e[25] = (e[25]) ^ ((s>>25)&1);
e[28] = (e[28]) ^ ((s>>28)&1); e[26] = (e[26]) ^ ((s>>26)&1);
e[29] = (e[29]) ^ ((s>>29)&1); e[27] = (e[27]) ^ ((s>>27)&1);
e[30] = (e[30]) ^ ((s>>30)&1); e[28] = (e[28]) ^ ((s>>28)&1);
e[31] = (e[31]) ^ ((s>>31)&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 // This is not faster for some unknown reason
// ((__m128i *)e)[0] = _mm_xor_si128(((__m128i *)e)[0],((__m128i *)scrambling_lut)[s&65535]); // ((__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]); // ((__m128i *)e)[1] = _mm_xor_si128(((__m128i *)e)[1],((__m128i *)scrambling_lut)[s>>16]);
s = lte_gold_generic(&x1, &x2, 0); s = lte_gold_generic(&x1, &x2, 0);
e += 32; e += 32;
} }
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT);
} }
void init_scrambling_lut(void) { void init_scrambling_lut(void) {
uint32_t s; uint32_t s;
int i=0,j; int i=0,j;
for (s=0;s<=65535;s++) { for (s=0; s<=65535; s++) {
for (j=0;j<16;j++) { for (j=0; j<16; j++) {
scrambling_lut[i++] = (uint8_t)((s>>j)&1); scrambling_lut[i++] = (uint8_t)((s>>j)&1);
} }
} }
...@@ -194,11 +183,9 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -194,11 +183,9 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
int mbsfn_flag, int mbsfn_flag,
LTE_UE_DLSCH_t *dlsch, LTE_UE_DLSCH_t *dlsch,
int G, int G,
int16_t* llr, int16_t *llr,
uint8_t q, uint8_t q,
uint8_t Ns) uint8_t Ns) {
{
int i,j,k=0; int i,j,k=0;
// uint8_t reset; // uint8_t reset;
uint32_t x1, x2, s=0; uint32_t x1, x2, s=0;
...@@ -212,14 +199,14 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -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 x2 = ((Ns>>1)<<9) + frame_parms->Nid_cell_mbsfn; //this is c_init in 36.211 Sec 6.3.1
#ifdef DEBUG_SCRAMBLING #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 #endif
s = lte_gold_generic(&x1, &x2, 1); s = lte_gold_generic(&x1, &x2, 1);
for (i=0; i<(1+(G>>5)); i++) { for (i=0; i<(1+(G>>5)); i++) {
for (j=0; j<32; j++,k++) { for (j=0; j<32; j++,k++) {
#ifdef DEBUG_SCRAMBLING #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 #endif
llr[k] = ((2*((s>>j)&1))-1)*llr[k]; llr[k] = ((2*((s>>j)&1))-1)*llr[k];
#ifdef DEBUG_SCRAMBLING #ifdef DEBUG_SCRAMBLING
...@@ -232,12 +219,11 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -232,12 +219,11 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
} }
void init_unscrambling_lut(void) { void init_unscrambling_lut(void) {
uint32_t s; uint32_t s;
int i=0,j; int i=0,j;
for (s=0;s<=65535;s++) { for (s=0; s<=65535; s++) {
for (j=0;j<16;j++) { for (j=0; j<16; j++) {
unscrambling_lut[i++] = (int16_t)((((s>>j)&1)<<1)-1); unscrambling_lut[i++] = (int16_t)((((s>>j)&1)<<1)-1);
} }
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -34,33 +34,25 @@ ...@@ -34,33 +34,25 @@
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.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) if (I_MCS < 10)
return(2); return(2);
else if (I_MCS < 17) else if (I_MCS < 17)
return(4); return(4);
else else
return(6); return(6);
} }
unsigned char get_Qm_ul(unsigned char I_MCS) unsigned char get_Qm_ul(unsigned char I_MCS) {
{
if (I_MCS < 11) if (I_MCS < 11)
return(2); return(2);
else if (I_MCS < 21) else if (I_MCS < 21)
return(4); return(4);
else else
return(6); return(6);
} }
unsigned char get_I_TBS(unsigned char I_MCS) unsigned char get_I_TBS(unsigned char I_MCS) {
{
if (I_MCS < 10) if (I_MCS < 10)
return(I_MCS); return(I_MCS);
else if (I_MCS == 10) else if (I_MCS == 10)
...@@ -70,12 +62,9 @@ unsigned char get_I_TBS(unsigned char I_MCS) ...@@ -70,12 +62,9 @@ unsigned char get_I_TBS(unsigned char I_MCS)
else if (I_MCS == 17) else if (I_MCS == 17)
return(15); return(15);
else return(I_MCS-2); 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) if (I_MCS <= 10)
return(I_MCS); return(I_MCS);
else if (I_MCS == 10) else if (I_MCS == 10)
...@@ -83,11 +72,9 @@ unsigned char get_I_TBS_UL(unsigned char I_MCS) ...@@ -83,11 +72,9 @@ unsigned char get_I_TBS_UL(unsigned char I_MCS)
else if (I_MCS < 21) else if (I_MCS < 21)
return(I_MCS-1); return(I_MCS-1);
else return(I_MCS-2); 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; unsigned char I_MCS = -1;
///note: change from <= to < to go from choosing higher modulation rather than high code-rate ///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) ...@@ -107,9 +94,7 @@ unsigned char I_TBS2I_MCS(unsigned char I_TBS)
return I_MCS; 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; uint32_t TBS;
if ((nb_rb > 0) && (mcs < 29)) { if ((nb_rb > 0) && (mcs < 29)) {
...@@ -121,9 +106,7 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb) ...@@ -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; uint32_t TBS = 0;
if ((nb_rb > 0) && (mcs < 29)) { if ((nb_rb > 0) && (mcs < 29)) {
...@@ -136,12 +119,9 @@ uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb) ...@@ -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,re_pbch_sss=0;
int rb_alloc_ind,nsymb; int rb_alloc_ind,nsymb;
nsymb = (frame_parms->Ncp==NORMAL) ? 14 : 12; nsymb = (frame_parms->Ncp==NORMAL) ? 14 : 12;
// printf("adjust_G2 : symbol %d, subframe %d\n",symbol,subframe); // 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 ...@@ -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 if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL
for (rb=((frame_parms->N_RB_DL>>1)-3); for (rb=((frame_parms->N_RB_DL>>1)-3);
rb<=((frame_parms->N_RB_DL>>1)+3); rb<=((frame_parms->N_RB_DL>>1)+3);
rb++) { rb++) {
if (rb < 32) if (rb < 32)
rb_alloc_ind = (rb_alloc[0]>>rb) & 1; rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
else if (rb < 64) 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 ...@@ -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); for (rb=((frame_parms->N_RB_DL>>1)-3);
rb<((frame_parms->N_RB_DL>>1)+3); rb<((frame_parms->N_RB_DL>>1)+3);
rb++) { rb++) {
if (rb < 32) if (rb < 32)
rb_alloc_ind = (rb_alloc[0]>>rb) & 1; rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
else if (rb < 64) 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 ...@@ -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); 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; int rb,re_pbch_sss=0;
uint8_t rb_alloc_ind; uint8_t rb_alloc_ind;
if ((subframe!=0) && (subframe!=5) && (subframe!=6)) // if not PBCH/SSS/PSS or SSS/PSS if ((subframe!=0) && (subframe!=5) && (subframe!=6)) // if not PBCH/SSS/PSS or SSS/PSS
return(0); return(0);
if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL if ((frame_parms->N_RB_DL&1) == 1) { // ODD N_RB_DL
for (rb=((frame_parms->N_RB_DL>>1)-3); for (rb=((frame_parms->N_RB_DL>>1)-3);
rb<=((frame_parms->N_RB_DL>>1)+3); rb<=((frame_parms->N_RB_DL>>1)+3);
rb++) { rb++) {
if (rb < 32) if (rb < 32)
rb_alloc_ind = (rb_alloc[0]>>rb) & 1; rb_alloc_ind = (rb_alloc[0]>>rb) & 1;
else if (rb < 64) 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 ...@@ -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, //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 // 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); return((-frame_parms->Ncp+35)*re_pbch_sss * mod_order/6);
} }
} else if (subframe == 5) // SSS+PSS for FDD, SSS for TDD } 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); 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 ...@@ -315,8 +286,7 @@ int adjust_G(LTE_DL_FRAME_PARMS *frame_parms,uint32_t *rb_alloc,uint8_t mod_orde
return(0); 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; int G_adj;
if (is_pmch_subframe(frame,subframe,frame_parms) == 0) { 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 ...@@ -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 // 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 // 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 // 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); return((((int)nb_rb * mod_order * ((11-num_pdcch_symbols)*12 + 3*8)) - G_adj)*Nl);
else if(beamforming_mode==7) else if(beamforming_mode==7)
return(((int)nb_rb * mod_order * ((7-num_pdcch_symbols)*12 + 3*10 + 4*9)) - G_adj); 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 ...@@ -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) { /*if (is_pmch_subframe(frame,subframe,frame_parms) == 0) {
G_adj= adjust_G(frame_parms,rb_alloc,mod_order,subframe); 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 ...@@ -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 // 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 // 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 // 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); return((((int)nb_rb * mod_order * ((11-num_pdcch_symbols)*12 + 3*8)) - G_adj)*Nl);
else if(beamforming_mode==7) else if(beamforming_mode==7)
return(((int)nb_rb * mod_order * ((7-num_pdcch_symbols)*12 + 3*10 + 4*9)) - G_adj); 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 ...@@ -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); return((int)frame_parms->N_RB_DL * mod_order * 120);
} }
#endif
// following function requires dlsch_tbs_full.h // following function requires dlsch_tbs_full.h
#include "PHY/LTE_TRANSPORT/dlsch_tbs_full.h" #include "PHY/LTE_TRANSPORT/dlsch_tbs_full.h"
unsigned char SE2I_TBS(float SE, unsigned char SE2I_TBS(float SE,
unsigned char N_PRB, unsigned char N_PRB,
unsigned char symbPerRB) unsigned char symbPerRB) {
{
unsigned char I_TBS= -1; unsigned char I_TBS= -1;
int throughPutGoal = 0; int throughPutGoal = 0;
short diffOld = TBStable[0][N_PRB-1] - throughPutGoal; // always positive because of unsigned arithmetic short diffOld = TBStable[0][N_PRB-1] - throughPutGoal; // always positive because of unsigned arithmetic
...@@ -427,9 +394,7 @@ unsigned char SE2I_TBS(float SE, ...@@ -427,9 +394,7 @@ unsigned char SE2I_TBS(float SE,
//added for ALU icic purpose //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) if(n_rb_dl<27)
return 4; return 4;
else if(n_rb_dl<64) else if(n_rb_dl<64)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -477,7 +477,6 @@ int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length ...@@ -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 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 (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]); 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; int i=0;
//len += sprintf(&buffer[len], "[UE PROC] MCH Total %d\n", ue->dlsch_mch_received[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 ...@@ -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]); 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] 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] 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); len += sprintf(&buffer[len], "[UE PROC] IA receiver %d\n",ue->use_ia_receiver);
......
This diff is collapsed.
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "mdci.h" #include "mdci.h"
//#include "uci.h" //#include "uci.h"
#ifndef STANDALONE_COMPILE #ifndef STANDALONE_COMPILE
#include "UTIL/LISTS/list.h" #include "UTIL/LISTS/list.h"
#endif #endif
#define MOD_TABLE_QPSK_OFFSET 1 #define MOD_TABLE_QPSK_OFFSET 1
...@@ -66,19 +66,19 @@ ...@@ -66,19 +66,19 @@
#define MAX_NUM_RE (14*1200) #define MAX_NUM_RE (14*1200)
#if !defined(SI_RNTI) #if !defined(SI_RNTI)
#define SI_RNTI (rnti_t)0xffff #define SI_RNTI (rnti_t)0xffff
#endif #endif
#if !defined(M_RNTI) #if !defined(M_RNTI)
#define M_RNTI (rnti_t)0xfffd #define M_RNTI (rnti_t)0xfffd
#endif #endif
#if !defined(P_RNTI) #if !defined(P_RNTI)
#define P_RNTI (rnti_t)0xfffe #define P_RNTI (rnti_t)0xfffe
#endif #endif
#if !defined(CBA_RNTI) #if !defined(CBA_RNTI)
#define CBA_RNTI (rnti_t)0xfff4 #define CBA_RNTI (rnti_t)0xfff4
#endif #endif
#if !defined(C_RNTI) #if !defined(C_RNTI)
#define C_RNTI (rnti_t)0x1234 #define C_RNTI (rnti_t)0x1234
#endif #endif
// These are the codebook indexes according to Table 6.3.4.2.3-1 of 36.211 // These are the codebook indexes according to Table 6.3.4.2.3-1 of 36.211
//1 layer //1 layer
...@@ -92,7 +92,8 @@ ...@@ -92,7 +92,8 @@
#define PMI_2A_R1_1j 2 #define PMI_2A_R1_1j 2
typedef enum { SEARCH_EXIST=0, typedef enum { SEARCH_EXIST=0,
SEARCH_EXIST_OR_FREE} find_type_t; SEARCH_EXIST_OR_FREE
} find_type_t;
typedef enum { typedef enum {
SCH_IDLE=0, SCH_IDLE=0,
...@@ -102,14 +103,10 @@ typedef enum { ...@@ -102,14 +103,10 @@ typedef enum {
} SCH_status_t; } SCH_status_t;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
typedef enum { typedef enum {
CEmodeA = 0, CEmodeA = 0,
CEmodeB = 1 CEmodeB = 1
} CEmode_t; } CEmode_t;
#endif
#define PUSCH_x 2 #define PUSCH_x 2
#define PUSCH_y 3 #define PUSCH_y 3
...@@ -134,20 +131,14 @@ typedef enum { ...@@ -134,20 +131,14 @@ typedef enum {
HARQ_SR, HARQ_SR,
HARQ_CQI, HARQ_CQI,
SR_CQI, SR_CQI,
HARQ_SR_CQI HARQ_SR_CQI
} UCI_type_t; } UCI_type_t;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
typedef enum { typedef enum {
NOCE, NOCE,
CEMODEA, CEMODEA,
CEMODEB CEMODEB
} UE_type_t; } UE_type_t;
#endif
typedef enum { typedef enum {
SI_PDSCH=0, SI_PDSCH=0,
...@@ -182,8 +173,6 @@ typedef struct { ...@@ -182,8 +173,6 @@ typedef struct {
PRACH_TDD_PREAMBLE_MAP_elem map[6]; PRACH_TDD_PREAMBLE_MAP_elem map[6];
} PRACH_TDD_PREAMBLE_MAP; } PRACH_TDD_PREAMBLE_MAP;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
typedef struct { typedef struct {
uint16_t slss_id; uint16_t slss_id;
uint8_t *slmib; uint8_t *slmib;
...@@ -252,7 +241,7 @@ typedef struct { ...@@ -252,7 +241,7 @@ typedef struct {
typedef struct { typedef struct {
/// payload length /// payload length
int payload_length; int payload_length;
uint8_t payload[100]; uint8_t payload[100];
} SLDCH_t; } SLDCH_t;
#define TTI_SYNC 0 #define TTI_SYNC 0
...@@ -275,7 +264,6 @@ typedef struct UE_tport_s { ...@@ -275,7 +264,6 @@ typedef struct UE_tport_s {
uint8_t payload[1500]; uint8_t payload[1500];
} UE_tport_t; } UE_tport_t;
#endif
/**@}*/ /**@}*/
#endif #endif
This diff is collapsed.
...@@ -357,7 +357,6 @@ int ulsch_decoding_data_2thread0(td_params *tdp) { ...@@ -357,7 +357,6 @@ int ulsch_decoding_data_2thread0(td_params *tdp) {
void *td_thread(void *param) { void *td_thread(void *param) {
PHY_VARS_eNB *eNB = ((td_params *)param)->eNB; PHY_VARS_eNB *eNB = ((td_params *)param)->eNB;
L1_proc_t *proc = &eNB->proc; L1_proc_t *proc = &eNB->proc;
pthread_setname_np( pthread_self(),"td processing"); pthread_setname_np( pthread_self(),"td processing");
LOG_I(PHY,"thread td created id=%ld\n", syscall(__NR_gettid)); LOG_I(PHY,"thread td created id=%ld\n", syscall(__NR_gettid));
//wait_sync("td_thread"); //wait_sync("td_thread");
...@@ -736,18 +735,14 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, ...@@ -736,18 +735,14 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
int frame = proc->frame_rx; int frame = proc->frame_rx;
int subframe = proc->subframe_rx; int subframe = proc->subframe_rx;
LTE_UL_eNB_HARQ_t *ulsch_harq; LTE_UL_eNB_HARQ_t *ulsch_harq;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
LOG_D(PHY,"ue_type %d\n",ulsch->ue_type); LOG_D(PHY,"ue_type %d\n",ulsch->ue_type);
if (ulsch->ue_type>0) harq_pid = 0; if (ulsch->ue_type>0) harq_pid = 0;
else else {
#endif harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
{ }
harq_pid = subframe2harq_pid(frame_parms,proc->frame_rx,subframe);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_ULSCH_DECODING0+harq_pid,1);
// x1 is set in lte_gold_generic // x1 is set in lte_gold_generic
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 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]; ulsch_harq = ulsch->harq_processes[harq_pid];
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -347,14 +347,12 @@ int is_prach_subframe(NR_DL_FRAME_PARMS *frame_parms,uint32_t frame, uint8_t sub ...@@ -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; 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); int prach_mask = is_prach_subframe0(frame_parms,prach_ConfigIndex,frame,subframe);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int i; int i;
for (i=0;i<4;i++) { for (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)); 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); return(prach_mask);
} }
#endif //0 #endif //0
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -174,11 +174,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, ...@@ -174,11 +174,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
mib->message.choice.mib->subCarrierSpacingCommon, mib->message.choice.mib->subCarrierSpacingCommon,
mib->message.choice.mib->ssb_SubcarrierOffset, mib->message.choice.mib->ssb_SubcarrierOffset,
mib->message.choice.mib->dmrs_TypeA_Position, 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, 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->cellBarred,
mib->message.choice.mib->intraFreqReselection mib->message.choice.mib->intraFreqReselection
); );
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment