Commit 5a5f5039 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Merge branch 'develop' into NR_RRC_harq_b

parents 54ca9ea5 cd82d94c
......@@ -4,7 +4,7 @@ For more details of the license, refer to [LICENSE](LICENSE) file in the same di
However, the source code also contains third party software that is acknowledged here for reference.
## Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/liblfds6.1.1/ ##
## Credits for LFDS user space source code located in folder openair2/UTILS/LFDS/ ##
See on [liblfds website](https://liblfds.org/) the license section.
......
......@@ -5,3 +5,5 @@ iperf_*.*
phones_list.txt
modules_list.txt
test_results*.html
pMain*
__pycache__
......@@ -142,13 +142,39 @@ pipeline {
stage ("Load Images") {
steps {
script {
// Adding a tempo after booking leases
sh "sleep 10"
sh "ssh -t inria_oaici@faraday.inria.fr 'rleases --check'"
sh "ssh -t inria_oaici@faraday.inria.fr 'all-off'"
sh "sleep 10"
echo '\u2705 \u001B[32mLoad Image for Python Executor\u001B[0m'
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labPythonExeIdx} > /dev/null 2>&1'"
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labPythonExeIdx}'"
try {
//sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labPythonExeIdx} > /dev/null 2>&1'"
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labPythonExeIdx}'"
} catch (Exception e) {
echo "Why is it wrong?"
}
try {
//sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labPythonExeIdx}'"
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait ${r2labPythonExeIdx}'"
} catch (Exception e) {
echo "Why is it wrong?"
}
echo '\u2705 \u001B[32mLoad Image for two (2) eNBs\u001B[0m'
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labENB0Idx},${r2labENB1Idx} > /dev/null 2>&1'"
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labENB0Idx},${r2labENB1Idx}'"
try {
//sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labENB0Idx},${r2labENB1Idx} > /dev/null 2>&1'"
sh "ssh -t inria_oaici@faraday.inria.fr 'rload -i oai-ci-cd-u18-lowlatency-enb-ue ${r2labENB0Idx},${r2labENB1Idx}"
} catch (Exception e) {
echo "Why is it wrong?"
}
try {
//sh "ssh -t inria_oaici@faraday.inria.fr 'rwait --silent ${r2labENB0Idx},${r2labENB1Idx}'"
sh "ssh -t inria_oaici@faraday.inria.fr 'rwait ${r2labENB0Idx},${r2labENB1Idx}'"
} catch (Exception e) {
echo "Why is it wrong?"
}
sh "ssh -t inria_oaici@faraday.inria.fr 'uon ${r2labENB0Idx},${r2labENB1Idx}'"
sh "sleep 5"
sh "ssh -t inria_oaici@faraday.inria.fr 'uon ${r2labENB0Idx},${r2labENB1Idx}'"
......
......@@ -288,7 +288,7 @@ MCEs = (
mnc_length = 2;
}
service_id=0;
lcid=8; #this must be properly defined lcid:8+service:0 -> rab_id:8
lcid=5; #this must be properly defined lcid:8+service:0 -> rab_id:5
}
);
}
......
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE
#
# Required Python Version
# Python 3.x
#
# Required Python Package
# pexpect
#---------------------------------------------------------------------
#-----------------------------------------------------------
# Version
#-----------------------------------------------------------
Version = '0.2'
#-----------------------------------------------------------
# Constants
#-----------------------------------------------------------
ALL_PROCESSES_OK = 0
ENB_PROCESS_FAILED = -1
ENB_PROCESS_OK = +1
ENB_PROCESS_SEG_FAULT = -11
ENB_PROCESS_ASSERTION = -12
ENB_PROCESS_REALTIME_ISSUE = -13
ENB_PROCESS_NOLOGFILE_TO_ANALYZE = -14
ENB_PROCESS_SLAVE_RRU_NOT_SYNCED = -15
HSS_PROCESS_FAILED = -2
HSS_PROCESS_OK = +2
MME_PROCESS_FAILED = -3
MME_PROCESS_OK = +3
SPGW_PROCESS_FAILED = -4
SPGW_PROCESS_OK = +4
UE_IP_ADDRESS_ISSUE = -5
OAI_UE_PROCESS_NOLOGFILE_TO_ANALYZE = -20
OAI_UE_PROCESS_COULD_NOT_SYNC = -21
OAI_UE_PROCESS_ASSERTION = -22
OAI_UE_PROCESS_FAILED = -23
OAI_UE_PROCESS_NO_TUNNEL_INTERFACE = -24
OAI_UE_PROCESS_SEG_FAULT = -25
OAI_UE_PROCESS_OK = +6
UE_STATUS_DETACHED = 0
UE_STATUS_DETACHING = 1
UE_STATUS_ATTACHING = 2
UE_STATUS_ATTACHED = 3
X2_HO_REQ_STATE__IDLE = 0
X2_HO_REQ_STATE__TARGET_RECEIVES_REQ = 1
X2_HO_REQ_STATE__TARGET_RRC_RECFG_COMPLETE = 2
X2_HO_REQ_STATE__TARGET_SENDS_SWITCH_REQ = 3
X2_HO_REQ_STATE__SOURCE_RECEIVES_REQ_ACK = 10
......@@ -76,6 +76,11 @@ nullPointer:common/utils/T/local_tracer.c:243
// first iteration of the loop
nullPointer:common/utils/T/tracer/multi.c:264
nullPointer:common/utils/T/tracer/multi.c:265
//-----------------------------------------------------------------------------
// this file is used for testing the RLC V2 implementation, this error is
// not a problem, the programmer has to know what she does when writing
// the tests
arrayIndexOutOfBounds:openair2/LAYER2/rlc_v2/tests/test.c:401
//
//*****************************************************************************
//
......
This diff is collapsed.
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE
#
# Required Python Version
# Python 3.x
#
# Required Python Package
# pexpect
#---------------------------------------------------------------------
#-----------------------------------------------------------
# Functions Declaration
#-----------------------------------------------------------
def GenericHelp(vers):
print('----------------------------------------------------------------------------------------------------------------------')
print('main.py Ver: ' + vers)
print('----------------------------------------------------------------------------------------------------------------------')
print('python main.py [options]')
print(' --help Show this help.')
print(' --mode=[Mode]')
print(' TesteNB')
print(' InitiateHtml, FinalizeHtml')
print(' TerminateeNB, TerminateUE, TerminateHSS, TerminateMME, TerminateSPGW')
print(' LogCollectBuild, LogCollecteNB, LogCollectHSS, LogCollectMME, LogCollectSPGW, LogCollectPing, LogCollectIperf')
def GitSrvHelp(repository,branch,commit,mergeallow,targetbranch):
print(' --ranRepository=[OAI RAN Repository URL] -- ' + repository)
print(' --ranBranch=[OAI RAN Repository Branch] -- ' + branch)
print(' --ranCommitID=[OAI RAN Repository Commit SHA-1] -- ' + commit)
print(' --ranAllowMerge=[Allow Merge Request (with target branch) (true or false)] -- ' + mergeallow)
print(' --ranTargetBranch=[Target Branch in case of a Merge Request] -- ' + targetbranch)
def eNBSrvHelp(ipaddr, username, password, sourcepath):
print(' --eNBIPAddress=[eNB\'s IP Address] -- ' + ipaddr)
print(' --eNBUserName=[eNB\'s Login User Name] -- ' + username)
print(' --eNBPassword=[eNB\'s Login Password] -- ' + password)
print(' --eNBSourceCodePath=[eNB\'s Source Code Path] -- ' + sourcepath)
def OAIUESrvHelp(ipaddr, username, password, sourcepath):
print(' --UEIPAddress=[UE\'s IP Address] -- ' + ipaddr)
print(' --UEUserName=[UE\'s Login User Name] -- ' + username)
print(' --UEPassword=[UE\'s Login Password] -- ' + password)
print(' --UESourceCodePath=[UE\'s Source Code Path] -- ' + sourcepath)
def EPCSrvHelp(ipaddr, username, password, sourcepath, epctype):
print(' --EPCIPAddress=[EPC\'s IP Address] -- ' + ipaddr)
print(' --EPCUserName=[EPC\'s Login User Name] -- ' + username)
print(' --EPCPassword=[EPC\'s Login Password] -- ' + password)
print(' --EPCSourceCodePath=[EPC\'s Source Code Path] -- ' + sourcepath)
print(' --EPCType=[EPC\'s Type: OAI or ltebox or OAI-Rel14-CUPS] -- ' + epctype)
def ADBSrvHelp(ipaddr, username, password):
print(' --ADBIPAddress=[ADB\'s IP Address] -- ' + ipaddr)
print(' --ADBUserName=[ADB\'s Login User Name] -- ' + username)
print(' --ADBPassword=[ADB\'s Login Password] -- ' + password)
def XmlHelp(filename):
print(' --XMLTestFile=[XML Test File to be run] -- ' + filename)
print(' Note: multiple xml files can be specified (--XMLFile=File1 ... --XMLTestFile=FileN) when HTML headers are created ("InitiateHtml" mode)')
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#/*
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# * contributor license agreements. See the NOTICE file distributed with
# * this work for additional information regarding copyright ownership.
# * The OpenAirInterface Software Alliance licenses this file to You under
# * the OAI Public License, Version 1.1 (the "License"); you may not use this file
# * except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.openairinterface.org/?page_id=698
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *-------------------------------------------------------------------------------
# * For more information about the OpenAirInterface (OAI) Software Alliance:
# * contact@openairinterface.org
# */
#---------------------------------------------------------------------
# Python for CI of OAI-eNB + COTS-UE
#
# Required Python Version
# Python 3.x
#
# Required Python Package
# pexpect
#---------------------------------------------------------------------
#-----------------------------------------------------------
# Import
#-----------------------------------------------------------
import pexpect # pexpect
import logging
import time # sleep
import re
import sys
#-----------------------------------------------------------
# Class Declaration
#-----------------------------------------------------------
class SSHConnection():
def __init__(self):
self.ssh = ''
self.picocom_closure = False
def disablePicocomClosure(self):
self.picocom_closure = False
def enablePicocomClosure(self):
self.picocom_closure = True
def open(self, ipaddress, username, password):
count = 0
connect_status = False
while count < 4:
self.ssh = pexpect.spawn('ssh', [username + '@' + ipaddress], timeout = 5)
self.sshresponse = self.ssh.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', 'Last login', pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0:
self.ssh.sendline('yes')
self.ssh.expect('password:')
self.ssh.sendline(password)
self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0:
count = 10
connect_status = True
else:
logging.debug('self.sshresponse = ' + str(self.sshresponse))
elif self.sshresponse == 1:
self.ssh.sendline(password)
self.sshresponse = self.ssh.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0:
count = 10
connect_status = True
else:
logging.debug('self.sshresponse = ' + str(self.sshresponse))
elif self.sshresponse == 2:
# Checking if we are really on the remote client defined by its IP address
self.command('stdbuf -o0 ifconfig | egrep --color=never "inet addr:|inet "', '\$', 5)
result = re.search(str(ipaddress), str(self.ssh.before))
if result is None:
self.close()
else:
count = 10
connect_status = True
else:
# debug output
logging.debug(str(self.ssh.before))
logging.debug('self.sshresponse = ' + str(self.sshresponse))
# adding a tempo when failure
if not connect_status:
time.sleep(1)
count += 1
if connect_status:
pass
else:
sys.exit('SSH Connection Failed')
def command(self, commandline, expectedline, timeout):
logging.debug(commandline)
self.ssh.timeout = timeout
self.ssh.sendline(commandline)
self.sshresponse = self.ssh.expect([expectedline, pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0:
return 0
elif self.sshresponse == 1:
logging.debug('\u001B[1;37;41m Unexpected EOF \u001B[0m')
logging.debug('Expected Line : ' + expectedline)
logging.debug(str(self.ssh.before))
sys.exit(self.sshresponse)
elif self.sshresponse == 2:
logging.debug('\u001B[1;37;41m Unexpected TIMEOUT \u001B[0m')
logging.debug('Expected Line : ' + expectedline)
result = re.search('ping |iperf |picocom', str(commandline))
if result is None:
logging.debug(str(self.ssh.before))
sys.exit(self.sshresponse)
else:
return -1
else:
logging.debug('\u001B[1;37;41m Unexpected Others \u001B[0m')
logging.debug('Expected Line : ' + expectedline)
sys.exit(self.sshresponse)
def close(self):
self.ssh.timeout = 5
self.ssh.sendline('exit')
self.sshresponse = self.ssh.expect([pexpect.EOF, pexpect.TIMEOUT])
if self.sshresponse == 0:
pass
elif self.sshresponse == 1:
if not self.picocom_closure:
logging.debug('\u001B[1;37;41m Unexpected TIMEOUT during closing\u001B[0m')
else:
logging.debug('\u001B[1;37;41m Unexpected Others during closing\u001B[0m')
def copyin(self, ipaddress, username, password, source, destination):
count = 0
copy_status = False
logging.debug('scp '+ username + '@' + ipaddress + ':' + source + ' ' + destination)
while count < 10:
scp_spawn = pexpect.spawn('scp '+ username + '@' + ipaddress + ':' + source + ' ' + destination, timeout = 100)
scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if scp_response == 0:
scp_spawn.sendline('yes')
scp_spawn.expect('password:')
scp_spawn.sendline(password)
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if scp_response == 0:
count = 10
copy_status = True
else:
logging.debug('1 - scp_response = ' + str(scp_response))
elif scp_response == 1:
scp_spawn.sendline(password)
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if scp_response == 0 or scp_response == 3:
count = 10
copy_status = True
else:
logging.debug('2 - scp_response = ' + str(scp_response))
elif scp_response == 2:
count = 10
copy_status = True
else:
logging.debug('3 - scp_response = ' + str(scp_response))
# adding a tempo when failure
if not copy_status:
time.sleep(1)
count += 1
if copy_status:
return 0
else:
return -1
def copyout(self, ipaddress, username, password, source, destination):
count = 0
copy_status = False
logging.debug('scp ' + source + ' ' + username + '@' + ipaddress + ':' + destination)
while count < 4:
scp_spawn = pexpect.spawn('scp ' + source + ' ' + username + '@' + ipaddress + ':' + destination, timeout = 100)
scp_response = scp_spawn.expect(['Are you sure you want to continue connecting (yes/no)?', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if scp_response == 0:
scp_spawn.sendline('yes')
scp_spawn.expect('password:')
scp_spawn.sendline(password)
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if scp_response == 0:
count = 10
copy_status = True
else:
logging.debug('1 - scp_response = ' + str(scp_response))
elif scp_response == 1:
scp_spawn.sendline(password)
scp_response = scp_spawn.expect(['\$', 'Permission denied', 'password:', pexpect.EOF, pexpect.TIMEOUT])
if scp_response == 0 or scp_response == 3:
count = 10
copy_status = True
else:
logging.debug('2 - scp_response = ' + str(scp_response))
elif scp_response == 2:
count = 10
copy_status = True
else:
logging.debug('3 - scp_response = ' + str(scp_response))
# adding a tempo when failure
if not copy_status:
time.sleep(1)
count += 1
if copy_status:
pass
else:
sys.exit('SCP failed')
def getBefore(self):
return str(self.ssh.before)
......@@ -24,7 +24,7 @@
<htmlTabRef>test-lte-m-10-tm1</htmlTabRef>
<htmlTabName>Test-LTE-M-10MHz-TM1</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>2</repeatCount>
<repeatCount>1</repeatCount>
<TestCaseRequestedList>
030201
040102
......
......@@ -25,7 +25,7 @@
<htmlTabRef>test-05-tm2</htmlTabRef>
<htmlTabName>Test-05MHz-TM2</htmlTabName>
<htmlTabIcon>tasks</htmlTabIcon>
<repeatCount>3</repeatCount>
<repeatCount>2</repeatCount>
<TestCaseRequestedList>
030201
040101
......
......@@ -72,7 +72,11 @@
<testCase id="030105">
<class>Initialize_eNB</class>
<desc>Initialize eNB #1 (FDD/Band7/5MHz)</desc>
<<<<<<< HEAD
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT --eNBs.[0].enable_measurement_reports yes --eNBs.[0].enable_x2 yes --eNBs.[0].target_enb_x2_ip_address.[0].ipv4 CI_RCC_IP_ADDR --eNBs.[0].target_enb_x2_ip_address.[0].preference ipv4 --eNBs.[0].eNB_ID 0xe01 --eNBs.[0].component_carriers.[0].Nid_cell 1 --eNBs.[0].nr_cellid 98765</Initialize_eNB_args>
=======
<Initialize_eNB_args>-O ci-scripts/conf_files/enb.band7.tm1.25PRB.slave.usrpb210.conf --eNBs.[0].rrc_inactivity_threshold 0 --RUs.[0].max_rxgain 120 --eNBs.[0].component_carriers.[0].pusch_p0_Nominal -90 --eNBs.[0].component_carriers.[0].pucch_p0_Nominal -96 --eNBs.[0].tracking_area_code 600 --eNBs.[0].plmn_list.[0].mnc 95 --THREAD_STRUCT.[0].parallel_config PARALLEL_RU_L1_TRX_SPLIT --eNBs.[0].enable_measurement_reports yes --eNBs.[0].enable_x2 yes --eNBs.[0].nr_cellid 98765</Initialize_eNB_args>
>>>>>>> origin/develop_inria_ci_deployment
<eNB_instance>1</eNB_instance>
<eNB_serverId>1</eNB_serverId>
</testCase>
......
......@@ -727,7 +727,6 @@ Message("CPU_Affinity flag is ${CPU_AFFINITY}")
##############################################################
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the default bearer")
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
add_boolean_option(DEADLINE_SCHEDULER True "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
......@@ -828,7 +827,7 @@ add_boolean_option(TRACE_RLC_UM_TX_STATUS False "TRACE for RLC UM, TO BE CHANGE
##########################
# RRC LAYER OPTIONS
##########################
add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "Otherwise it is UM, configure params are actually set in rrc_eNB.c:rrc_eNB_generate_defaultRRCConnectionReconfiguration(...)")
add_boolean_option(RRC_DEFAULT_RAB_IS_AM True "set the RLC mode to AM for the default bearer, otherwise it is UM.")
##########################
......@@ -884,6 +883,7 @@ include_directories("${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0")
include_directories("${OPENAIR2_DIR}/RRC/LTE/MESSAGES")
include_directories("${OPENAIR2_DIR}/RRC/LTE")
include_directories("${OPENAIR_DIR}/common/utils")
include_directories("${OPENAIR_DIR}/common/utils/collection")
include_directories("${OPENAIR_DIR}/common/utils/ocp_itti")
include_directories("${OPENAIR3_DIR}/NAS/COMMON")
include_directories("${OPENAIR3_DIR}/NAS/COMMON/API/NETWORK")
......@@ -1592,6 +1592,7 @@ add_library(PHY_COMMON ${PHY_SRC_COMMON})
add_dependencies(PHY_COMMON rrc_flag)
add_dependencies(PHY_COMMON dfts)
add_library(PHY ${PHY_SRC})
add_dependencies(PHY rrc_flag)
add_library(PHY_UE ${PHY_SRC_UE})
add_dependencies(PHY_UE rrc_flag)
......@@ -1642,7 +1643,7 @@ set(NR_RRC_DIR ${OPENAIR2_DIR}/RRC/NR)
set(NR_UE_RRC_DIR ${OPENAIR2_DIR}/RRC/NR_UE)
set(PDCP_DIR ${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0)
set(LTE_RLC_SRC
set(RLC_V1
${RLC_AM_DIR}/rlc_am.c
${RLC_AM_DIR}/rlc_am_init.c
${RLC_AM_DIR}/rlc_am_timer_poll_retransmit.c
......@@ -1672,6 +1673,17 @@ set(LTE_RLC_SRC
${RLC_DIR}/rlc_mpls.c
)
set(RLC_V2
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_oai_api.c
${OPENAIR2_DIR}/LAYER2/rlc_v2/asn1_utils.c
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_ue_manager.c
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_entity.c
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_entity_am.c
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_entity_um.c
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_pdu.c
${OPENAIR2_DIR}/LAYER2/rlc_v2/rlc_sdu.c
)
set(NR_RLC_SRC
${OPENAIR2_DIR}/LAYER2/nr_rlc/asn1_utils.c
${OPENAIR2_DIR}/LAYER2/nr_rlc/nr_rlc_entity.c
......@@ -1706,7 +1718,7 @@ set(L2_SRC
)
set(L2_LTE_SRC
${LTE_RLC_SRC}
${RLC_V2}
)
set(L2_NR_SRC
......@@ -1743,7 +1755,7 @@ set(LTE_NR_L2_SRC_UE
${PDCP_DIR}/pdcp_util.c
${PDCP_DIR}/pdcp_security.c
${PDCP_DIR}/pdcp_netlink.c
${LTE_RLC_SRC}
${RLC_V2}
)
set(NR_L2_SRC_UE
......@@ -2483,6 +2495,7 @@ add_executable(lte-softmodem
${OPENAIR_TARGETS}/RT/USER/lte-ru.c
${OPENAIR_TARGETS}/RT/USER/ru_control.c
${OPENAIR_TARGETS}/RT/USER/lte-softmodem.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
......@@ -2518,6 +2531,43 @@ target_link_libraries (lte-softmodem pthread m ${CONFIG_LIB} rt crypt ${CRYPTO_L
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem ${T_LIB})
add_executable(ocp-enb
${OPENAIR_DIR}/executables/main-ocp.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR_DIR}/executables/main-fs6.c
${OPENAIR_DIR}/executables/transport_split.c
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/COMMON/create_tasks.c
${OPENAIR_TARGETS}/COMMON/create_tasks_mbms.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
${OPENAIR_TARGETS}/ARCH/COMMON/record_player.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/utils.c
${OPENAIR_DIR}/common/utils/system.c
${GTPU_need_ITTI}
${XFORMSINTERFACE_SOURCE}
${T_SOURCE}
${CONFIG_SOURCES}
${SHLIB_LOADER_SOURCES}
)
add_dependencies(ocp-enb rrc_flag s1ap_flag x2_flag oai_iqplayer)
target_link_libraries (ocp-enb
-Wl,--start-group
RRC_LIB NR_RRC_LIB S1AP_LIB S1AP_ENB F1AP_LIB F1AP M2AP_LIB M2AP_ENB X2AP_LIB X2AP_ENB M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP UDP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU LFDS L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB LFDS7
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} ${FSPT_MSG_LIB} ${PROTO_AGENT_LIB}
-Wl,--end-group z dl)
target_link_libraries (ocp-enb ${LIBXML2_LIBRARIES} pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${LIB_LMS_LIBRARIES} ${T_LIB})
add_executable(cu_test
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/cu_test.c
${OPENAIR2_DIR}/LAYER2/PROTO_AGENT/proto_agent_handler.c
......@@ -2861,6 +2911,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
add_executable(${myExe}
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
${OPENAIR_DIR}/common/utils/threadPool/thread-pool.c
${OPENAIR_DIR}/common/utils/backtrace.c
${OPENAIR_DIR}/common/utils/system.c
${XFORMS_SOURCE}
......
......@@ -14,6 +14,7 @@ set(CMAKE_C_FLAGS
set(OPENAIR_DIR $ENV{OPENAIR_DIR})
set(OPENAIR3_DIR $ENV{OPENAIR_DIR}/openair3)
include_directories (${OPENAIR_DIR}/openair2/COMMON)
set(CONF2UEDATA_LIB_SRC
${OPENAIR_DIR}/openair3/NAS/TOOLS/conf_emm.c
......
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS True)
set(ENABLE_ITTI True)
set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
set(RRC_ASN1_VERSION "Rel15")
set(T_TRACER True)
set ( CMAKE_BUILD_TYPE )
set ( CFLAGS_PROCESSOR_USER "" )
set ( UE_EXPANSION False )
set ( PRE_SCD_THREAD False )
set ( UESIM_EXPANSION False )
set ( ENABLE_VCD_FIFO False )
set ( RF_BOARD "OAI_USRP")
set ( TRANSP_PRO "None")
set ( PACKAGE_NAME "")
set ( DEADLINE_SCHEDULER "False" )
set ( CPU_AFFINITY "False" )
set ( T_TRACER True )
set ( UE_AUTOTEST_TRACE False )
set ( UE_DEBUG_TRACE False )
set ( UE_TIMING_TRACE False )
set ( USRP_REC_PLAY False )
set ( SKIP_SHARED_LIB_FLAG False )
include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)
#!/bin/bash
# use UP and DOWN arrow keys to scroll the view displayed by timeplot
while read -n 1 key
do
case "$key" in
'B' )
kill -SIGUSR1 `ps aux|grep timeplot|grep -v grep|grep -v sh|tr -s ' ' :|cut -f 2 -d :`
;;
'A' )
kill -SIGUSR2 `ps aux|grep timeplot|grep -v grep|grep -v sh|tr -s ' ' :|cut -f 2 -d :`
;;
esac
done
......@@ -13,7 +13,8 @@ void usage(void)
"options:\n"
" -d <database file> this option is mandatory\n"
" -ip <host> connect to given IP address (default %s)\n"
" -p <port> connect to given port (default %d)\n",
" -p <port> connect to given port (default %d)\n"
" -e <event> event to trace (default VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER)\n",
DEFAULT_REMOTE_IP,
DEFAULT_REMOTE_PORT
);
......@@ -47,6 +48,7 @@ int main(int n, char **v)
int ev_fun;
int start_valid = 0;
struct timespec start_time, stop_time, delta_time;
char *name = "VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER";
for (i = 1; i < n; i++) {
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
......@@ -55,6 +57,7 @@ int main(int n, char **v)
if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
if (!strcmp(v[i], "-p"))
{ if (i > n-2) usage(); port = atoi(v[++i]); continue; }
if (!strcmp(v[i], "-e")) { if (i > n-2) usage(); name = v[++i]; continue; }
usage();
}
......@@ -71,10 +74,9 @@ int main(int n, char **v)
is_on = calloc(number_of_events, sizeof(int));
if (is_on == NULL) abort();
on_off(database, "VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER", is_on, 1);
on_off(database, name, is_on, 1);
ev_fun = event_id_from_name(database,
"VCD_FUNCTION_ENB_DLSCH_ULSCH_SCHEDULER");
ev_fun = event_id_from_name(database, name);
socket = connect_to(ip, port);
......
......@@ -28,6 +28,7 @@ int bins[50];
#define N 1000
int data[N];
long start = 100;
void plot(void)
{
......@@ -45,7 +46,8 @@ void plot(void)
if (data[i] < vmin) vmin = data[i];
if (data[i] > vmax) vmax = data[i];
vavg += data[i];
int ms2 = data[i]/binsize_ns;
int ms2 = (data[i] - start * 1000)/binsize_ns;
if (ms2 < 0) ms2 = 0;
if (ms2 > 49) ms2 = 49;
bins[ms2]++;
if (bins[ms2] > max) max = bins[ms2];
......@@ -55,7 +57,7 @@ void plot(void)
GOTO(1,1);
for (i = 0; i < 50; i++) {
double binend = (i+1) * binsize_ns / 1000.;
double binend = (i+1) * binsize_ns / 1000. + start;
int k;
int width = bins[i] * 70 / max;
/* force at least width of 1 if some point is there */
......@@ -68,11 +70,23 @@ void plot(void)
printf("min %d ns max %d ns avg %ld ns\n", vmin, vmax, vavg);
}
void up(int x)
{
start += 5;
}
void down(int x)
{
start -= 5;
}
int main(void)
{
int i;
int pos = 0;
signal(SIGINT, sig);
signal(SIGUSR1, up);
signal(SIGUSR2, down);
RESET();
HIDE_CURSOR();
while (!feof(stdin)) {
......
/*
Author: Laurent THOMAS, Open Cells
copyleft: OpenAirInterface Software Alliance and it's licence
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <vector>
#include <map>
#include <sys/eventfd.h>
extern "C" {
#include <intertask_interface.h>
#include <common/utils/system.h>
......@@ -35,7 +55,6 @@ typedef struct task_list_s {
int timer_expired(int fd);
task_list_t tasks[TASK_MAX];
extern "C" {
void *pool_buffer_init (void) {
return 0;
}
......@@ -86,6 +105,9 @@ extern "C" {
temp->ittiMsgHeader.messageId = message_id;
temp->ittiMsgHeader.originTaskId = origin_task_id;
temp->ittiMsgHeader.ittiMsgSize = size;
temp->ittiMsgHeader.destinationTaskId=TASK_UNKNOWN;
temp->ittiMsgHeader.instance=0;
temp->ittiMsgHeader.lte_time={0};
return temp;
//return itti_alloc_new_message_sized(origin_task_id, message_id, messages_info[message_id].size);
}
......
/*
Author: Laurent THOMAS, Open Cells
Copyleft: OpenAirInterface software alliance and it's license
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef INTERTASK_INTERFACE_H_
#define INTERTASK_INTERFACE_H_
#include <stdint.h>
......@@ -275,7 +294,7 @@ typedef struct {
//TASK_DEF(TASK_RRC_ENB, TASK_PRIORITY_MED, 200, NULL, NULL)
//TASK_DEF(TASK_GTPV1_U, TASK_PRIORITY_MED, 1000,NULL, NULL)
//TASK_DEF(TASK_UDP, TASK_PRIORITY_MED, 1000, NULL, NULL)
void * rrc_enb_process_msg(void*);
#define FOREACH_TASK(TASK_DEF) \
TASK_DEF(TASK_UNKNOWN, TASK_PRIORITY_MED, 50, NULL, NULL) \
TASK_DEF(TASK_TIMER, TASK_PRIORITY_MED, 10, NULL, NULL) \
......
......@@ -243,6 +243,8 @@ void configure_linux(void) {
// Set CPU frequency to it's maximum
if ( 0 != system("for d in /sys/devices/system/cpu/cpu[0-9]*; do cat $d/cpufreq/cpuinfo_max_freq > $d/cpufreq/scaling_min_freq; done"))
LOG_W(HW,"Can't set cpu frequency\n");
LOG_E(HW,"Can't set cpu frequency\n");
mlockall(MCL_CURRENT | MCL_FUTURE);
}
/*
Author: Laurent THOMAS, Open Cells
copyleft: OpenAirInterface Software Alliance and it's licence
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <common/utils/simple_executable.h>
#include "thread-pool.h"
......
/*
Author: Laurent THOMAS, Open Cells
copyleft: OpenAirInterface Software Alliance and it's licence
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#define _GNU_SOURCE
#include <sched.h>
#include <sys/types.h>
......
/*
Author: Laurent THOMAS, Open Cells
copyleft: OpenAirInterface Software Alliance and it's licence
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef THREAD_POOL_H
#define THREAD_POOL_H
#include <stdbool.h>
......@@ -217,11 +236,11 @@ static inline void pushTpool(tpool_t *t, notifiedFIFO_elt_t *msg) {
static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
notifiedFIFO_elt_t *msg= pullNotifiedFIFO(responseFifo);
AssertFatal(t->traceFd, "Thread pool used while not initialized");
if (t->measurePerf)
msg->returnTime=rdtsc();
if (t->traceFd >= 0)
if (t->traceFd > 0)
if(write(t->traceFd, msg, sizeof(*msg)));
return msg;
......@@ -229,7 +248,7 @@ static inline notifiedFIFO_elt_t *pullTpool(notifiedFIFO_t *responseFifo, tpool_
static inline notifiedFIFO_elt_t *tryPullTpool(notifiedFIFO_t *responseFifo, tpool_t *t) {
notifiedFIFO_elt_t *msg= pollNotifiedFIFO(responseFifo);
AssertFatal(t->traceFd, "Thread pool used while not initialized");
if (msg == NULL)
return NULL;
......
......@@ -14,19 +14,24 @@
This simulator allows to test L2 and above Layers using the nFAPI interface.
**This simulator is available starting the `v1.0.0` release on the `master` branch.**
Currently the only validated deployment by CI and developers is *with S1 interface and eNB / UEs are on the same machine*.
Others deployments will be supported later after bug fixes and validation in the CI process.
1. [With S1 -- eNB and UE on same machine](L2NFAPI_S1.md)
The UE executable is able to "simulate" multiple UEs in order to stimulate the scheduler in the eNB.
**This simulator is available starting the `v1.0.0` release on the `master` branch.**
Currently the Continuous Integration process is validating this simulator the following way:
* the LTE modem executable is run on one host (in our CI deployment it is a **Xenial Virtual Machine**)
* the UE(s) modem executable is run on another host (in our CI deployment it is also a **Xenial Virtual Machine**)
* We are testing:
* in S1 mode (ie we are connected to a 3rd-party EPC)
* in noS1 mode (no need for an EPC)
Normally it should be fine to run both executables on the same host using the `loopback` interface to communicate. **But we are not guaranting it**
1. [With S1 -- eNB and UE on 2 hosts](L2NFAPI_S1.md)
2. [No S1 -- eNB and UE on 2 hosts](L2NFAPI_NOS1.md)
----
[oai wiki home](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/home)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -185,8 +185,8 @@ static inline int rxtx(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int frame_t
wakeup_prach_gNB(gNB,NULL,proc->frame_rx,proc->slot_rx);
}
*/
// Call the scheduler
pthread_mutex_lock(&gNB->UL_INFO_mutex);
gNB->UL_INFO.frame = frame_rx;
gNB->UL_INFO.slot = slot_rx;
......@@ -324,7 +324,7 @@ static void *gNB_L1_thread( void *param ) {
gNB_L1_rxtx_proc_t *L1_proc = &gNB_proc->L1_proc;
//PHY_VARS_gNB *gNB = RC.gNB[0][proc->CC_id];
char thread_name[100];
// set default return value
// set default return value
gNB_thread_rxtx_status = 0;
......@@ -421,7 +421,7 @@ int wakeup_txfh(PHY_VARS_gNB *gNB,gNB_L1_rxtx_proc_t *proc,int frame_tx,int slot
int waitret = 0, ret = 0, time_ns = 1000*1000;
struct timespec now, abstime;
// note this should depend on the numerology used by the TX L1 thread, set here for 500us slot time
// note this should depend on the numerology used by the TX L1 thread, set here for 500us slot time
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL,1);
time_ns = time_ns/gNB->frame_parms.slots_per_subframe;
......@@ -505,7 +505,7 @@ int wakeup_tx(PHY_VARS_gNB *gNB,int frame_rx,int slot_rx,int frame_tx,int slot_t
AssertFatal((ret = pthread_mutex_lock(&L1_proc_tx->mutex))==0,"mutex_lock returns %d\n",ret);
while(L1_proc_tx->instance_cnt == 0){
while(L1_proc_tx->instance_cnt == 0) {
pthread_cond_wait(&L1_proc_tx->cond,&L1_proc_tx->mutex);
}
......@@ -521,7 +521,7 @@ int wakeup_tx(PHY_VARS_gNB *gNB,int frame_rx,int slot_rx,int frame_tx,int slot_t
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_UE,1);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX1_UE,0);
// the thread can now be woken up
// the thread can now be woken up
AssertFatal(pthread_cond_signal(&L1_proc_tx->cond) == 0, "ERROR pthread_cond_signal for gNB L1 thread\n");
......@@ -541,7 +541,7 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
int time_ns = 50000;
AssertFatal((ret=pthread_mutex_lock(&proc->mutex_RU))==0,"mutex_lock returns %d\n",ret);
for (i=0;i<gNB->num_RU;i++) {
for (i=0; i<gNB->num_RU; i++) {
if (ru == gNB->RU_list[i]) {
if ((proc->RU_mask&(1<<i)) > 0)
LOG_E(PHY,"gNB %d frame %d, subframe %d : previous information from RU %d (num_RU %d,mask %x) has not been served yet!\n",
......@@ -578,10 +578,10 @@ int wakeup_rxtx(PHY_VARS_gNB *gNB,RU_t *ru) {
}
++L1_proc->instance_cnt;
// We have just received and processed the common part of a subframe, say n.
// TS_rx is the last received timestamp (start of 1st slot), TS_tx is the desired
// transmitted timestamp of the next TX slot (first).
// The last (TS_rx mod samples_per_frame) was n*samples_per_tti,
// we want to generate subframe (n+sf_ahead), so TS_tx = TX_rx+sf_ahead*samples_per_tti,
// and proc->slot_tx = proc->slot_rx+sf_ahead
......@@ -705,9 +705,9 @@ static void* gNB_thread_prach( void* param ) {
extern void init_td_thread(PHY_VARS_gNB *);
extern void init_te_thread(PHY_VARS_gNB *);
static void* process_stats_thread(void* param) {
static void *process_stats_thread(void *param) {
PHY_VARS_gNB *gNB = (PHY_VARS_gNB*)param;
PHY_VARS_gNB *gNB = (PHY_VARS_gNB *)param;
reset_meas(&gNB->dlsch_encoding_stats);
reset_meas(&gNB->dlsch_scrambling_stats);
......
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*! \file lte-enb.c
* \brief Top-level threads for eNodeB
* \author R. Knopp, F. Kaltenberger, Navid Nikaein
* \date 2012
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr
* \note
* \warning
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
......@@ -1240,7 +1223,7 @@ void *ru_stats_thread(void *param) {
if (ru->feprx) print_meas(&ru->ofdm_demod_stats,"feprx",NULL,NULL);
if (ru->feptx_ofdm){
if (ru->feptx_ofdm) {
print_meas(&ru->precoding_stats,"feptx_prec",NULL,NULL);
print_meas(&ru->txdataF_copy_stats,"txdataF_copy",NULL,NULL);
print_meas(&ru->ofdm_mod_stats,"feptx_ofdm",NULL,NULL);
......
......@@ -106,7 +106,7 @@ static int wait_for_sync = 0;
unsigned int mmapped_dma=0;
int single_thread_flag=1;
static int8_t threequarter_fs=0;
int8_t threequarter_fs=0;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
......@@ -169,6 +169,10 @@ uint32_t target_ul_mcs = 20;
uint32_t timing_advance = 0;
uint64_t num_missed_slots=0; // counter for the number of missed slots
int split73=0;
void sendFs6Ul(PHY_VARS_eNB *eNB, int UE_id, int harq_pid, int segmentID, int16_t *data, int dataLen, int r_offset) {
AssertFatal(false, "Must not be called in this context\n");
}
extern void reset_opp_meas(void);
extern void print_opp_meas(void);
......@@ -719,13 +723,9 @@ int restart_L1L2(module_id_t gnb_id) {
memcpy(&ru->nr_frame_parms, &RC.gNB[gnb_id]->frame_parms, sizeof(NR_DL_FRAME_PARMS));
set_function_spec_param(RC.ru[gnb_id]);
LOG_I(GNB_APP, "attempting to create ITTI tasks\n");
if (itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL) < 0) {
LOG_E(RRC, "Create task for RRC eNB failed\n");
return -1;
} else {
LOG_I(RRC, "Re-created task for RRC gNB successfully\n");
}
// No more rrc thread, as many race conditions are hidden behind
rrc_enb_init();
itti_mark_task_ready(TASK_RRC_ENB);
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
LOG_E(PDCP, "Create task for L2L1 failed\n");
......@@ -772,7 +772,7 @@ void init_pdcp(void) {
uint32_t pdcp_initmask = (IS_SOFTMODEM_NOS1) ?
(PDCP_USE_NETLINK_BIT | LINK_ENB_PDCP_TO_IP_DRIVER_BIT) : LINK_ENB_PDCP_TO_GTPV1U_BIT;
if (IS_SOFTMODEM_NOS1){
if (IS_SOFTMODEM_NOS1) {
printf("IS_SOFTMODEM_NOS1 option enabled \n");
pdcp_initmask = pdcp_initmask | ENB_NAS_USE_TUN_BIT | SOFTMODEM_NOKRNMOD_BIT ;
}
......@@ -838,7 +838,7 @@ int main( int argc, char **argv )
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
init_opt();
init_opt();
#ifdef PDCP_USE_NETLINK
......@@ -985,7 +985,7 @@ if(!IS_SOFTMODEM_NOS1)
printf("oai_exit=%d\n",oai_exit);
// stop threads
/*#ifdef XFORMS
/*#ifdef XFORMS
printf("waiting for XFORMS thread\n");
......@@ -1005,7 +1005,7 @@ if(!IS_SOFTMODEM_NOS1)
}
}
#endif*/
#endif*/
printf("stopping MODEM threads\n");
// cleanup
stop_gNB(NB_gNB_INST);
......
......@@ -146,7 +146,7 @@ void init_nr_ue_vars(PHY_VARS_NR_UE *ue,
ue->Mod_id = UE_id;
ue->mac_enabled = 1;
// initialize all signal buffers
// initialize all signal buffers
init_nr_ue_signal(ue,1,abstraction_flag);
// intialize transport
......@@ -471,7 +471,7 @@ void processSlotRX( PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc) {
}
}
// no UL for now
// no UL for now
/*
if (UE->mac_enabled==1) {
......@@ -508,7 +508,7 @@ void UE_processing(void *arg) {
PHY_VARS_NR_UE *UE = rxtxD->UE;
uint8_t gNB_id = 0;
// params for UL time alignment procedure
// params for UL time alignment procedure
NR_UL_TIME_ALIGNMENT_t *ul_time_alignment = &UE->ul_time_alignment[gNB_id];
uint8_t numerology = UE->frame_parms.numerology_index;
......@@ -521,9 +521,9 @@ void UE_processing(void *arg) {
// then timing advance is processed and set to be applied in the next UL transmission */
if (UE->mac_enabled == 1) {
if (frame_tx == ul_time_alignment->ta_frame && slot_tx == ul_time_alignment->ta_slot){
if (frame_tx == ul_time_alignment->ta_frame && slot_tx == ul_time_alignment->ta_slot) {
LOG_D(PHY,"Applying timing advance -- frame %d -- slot %d\n", frame_tx, slot_tx);
//if (nfapi_mode!=3){
//if (nfapi_mode!=3){
nr_process_timing_advance(UE->Mod_id, UE->CC_id, ul_time_alignment->ta_command, numerology, bwp_ul_NB_RB);
ul_time_alignment->ta_frame = -1;
......
......@@ -213,7 +213,7 @@ int emulate_rf = 0;
tpool_t *Tpool;
#ifdef UE_DLSCH_PARALLELISATION
tpool_t *Tpool_dl;
tpool_t *Tpool_dl;
#endif
......@@ -381,9 +381,9 @@ static void get_options(void) {
int tddflag=0, nonbiotflag, vcdflag=0;
char *loopfile=NULL;
int dumpframe=0;
//uint32_t noS1;
//uint32_t nokrnmod;
//uint32_t nokrnmod;
paramdef_t cmdline_params[] =CMDLINE_PARAMS_DESC_UE ;
config_process_cmdline( cmdline_params,sizeof(cmdline_params)/sizeof(paramdef_t),NULL);
......@@ -532,7 +532,7 @@ void init_openair0(void) {
LOG_E(PHY,"Unsupported numerology!\n");
exit(-1);
}
}else if(frame_parms[0]->N_RB_DL == 273) {
} else if(frame_parms[0]->N_RB_DL == 273) {
if (numerology==1) {
if (frame_parms[0]->threequarter_fs) {
AssertFatal(0 == 1,"three quarter sampling not supported for N_RB 273\n");
......@@ -545,7 +545,7 @@ void init_openair0(void) {
LOG_E(PHY,"Unsupported numerology!\n");
exit(-1);
}
}else if(frame_parms[0]->N_RB_DL == 106) {
} else if(frame_parms[0]->N_RB_DL == 106) {
if (numerology==0) {
if (frame_parms[0]->threequarter_fs) {
openair0_cfg[card].sample_rate=23.04e6;
......@@ -648,6 +648,11 @@ void init_pdcp(void) {
LOG_I(PDCP, "Before getting out from init_pdcp() \n");
}
// Stupid function addition because UE itti messages queues definition is common with eNB
void *rrc_enb_process_msg(void *notUsed) {
return NULL;
}
int main( int argc, char **argv ) {
//uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
......@@ -680,7 +685,7 @@ int main( int argc, char **argv ) {
#ifdef UE_DLSCH_PARALLELISATION
tpool_t pool_dl;
Tpool_dl = &pool_dl;
char params_dl[]="-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1";
char params_dl[]="-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1";
initTpool(params_dl, Tpool_dl, false);
#endif
cpuf=get_cpu_freq_GHz();
......
......@@ -81,8 +81,8 @@ char *get_softmodem_function(uint64_t *sofmodemfunc_mask_ptr) {
}
void get_common_options(uint32_t execmask) {
uint32_t online_log_messages;
uint32_t glog_level ;
uint32_t online_log_messages=0;
uint32_t glog_level=0 ;
uint32_t start_telnetsrv = 0;
uint32_t noS1 = 0, nokrnmod = 0, nonbiot = 0;
uint32_t rfsim = 0, basicsim = 0, do_forms = 0;
......
......@@ -38,6 +38,11 @@ extern "C"
#endif
/* help strings definition for command line options, used in CMDLINE_XXX_DESC macros and printed when -h option is used */
#define CONFIG_HLP_RFCFGF "Configuration file for front-end (e.g. LMS7002M)\n"
#define CONFIG_HLP_SPLIT73 "Split 7.3 (below rate matching) option: <cu|du>:<remote ip address>:<remote port>"
#define CONFIG_HLP_TPOOL "Thread pool configuration: \n\
default no pool (runs in calling thread),\n\
list of cores, comma separated (negative value is no core affinity)\n\
example: -1,3 launches two working threads one floating, the second set on core 3"
#define CONFIG_HLP_ULMAXE "set the eNodeB max ULSCH erros\n"
#define CONFIG_HLP_CALUER "set UE RX calibration\n"
#define CONFIG_HLP_CALUERM ""
......@@ -89,6 +94,8 @@ extern "C"
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
#define RF_CONFIG_FILE softmodem_params.rf_config_file
#define SPLIT73 softmodem_params.split73
#define TP_CONFIG softmodem_params.threadPoolConfig
#define PHY_TEST softmodem_params.phy_test
#define WAIT_FOR_SYNC softmodem_params.wait_for_sync
#define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag
......@@ -104,6 +111,8 @@ extern "C"
#define CMDLINE_PARAMS_DESC { \
{"rf-config-file", CONFIG_HLP_RFCFGF, 0, strptr:(char **)&RF_CONFIG_FILE, defstrval:NULL, TYPE_STRING, sizeof(RF_CONFIG_FILE)},\
{"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)},\
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:(char **)&TP_CONFIG, defstrval:"n", TYPE_STRING, sizeof(TP_CONFIG)}, \
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \
{"clock-source", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \
......@@ -193,6 +202,8 @@ typedef struct {
uint64_t optmask;
//THREAD_STRUCT thread_struct;
char rf_config_file[1024];
char split73[1024];
char threadPoolConfig[1024];
int phy_test;
uint8_t usim_test;
int emulate_rf;
......
This diff is collapsed.
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <executables/split_headers.h>
#include <sys/types.h> /* See NOTES */
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/udp.h>
#include <netdb.h>
#include <targets/RT/USER/lte-softmodem.h>
bool createUDPsock (char *sourceIP, char *sourcePort, char *destIP, char *destPort, UDPsock_t *result) {
struct addrinfo hints= {0}, *servinfo, *p;
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_flags = AI_PASSIVE;
int status;
if ((status = getaddrinfo(sourceIP, sourcePort, &hints, &servinfo)) != 0) {
LOG_E(GTPU,"getaddrinfo error: %s\n", gai_strerror(status));
return false;
}
// loop through all the results and bind to the first we can
for(p = servinfo; p != NULL; p = p->ai_next) {
if ((result->sockHandler = socket(p->ai_family, p->ai_socktype,
p->ai_protocol)) == -1) {
LOG_W(GTPU,"socket: %s\n", strerror(errno));
continue;
}
if (bind(result->sockHandler, p->ai_addr, p->ai_addrlen) == -1) {
close(result->sockHandler);
LOG_W(GTPU,"bind: %s\n", strerror(errno));
continue;
}
break; // if we get here, we must have connected successfully
}
if (p == NULL) {
// looped off the end of the list with no successful bind
LOG_E(GTPU,"failed to bind socket: %s %s \n",sourceIP,sourcePort);
return false;
}
freeaddrinfo(servinfo); // all done with this structure
if ((status = getaddrinfo(destIP, destPort, &hints, &servinfo)) != 0) {
LOG_E(GTPU,"getaddrinfo error: %s\n", gai_strerror(status));
return false;
}
if (servinfo) {
result->destAddr=servinfo;
} else {
LOG_E(PHY,"No valid UDP addr: %s:%s\n",destIP, destPort);
return false;
}
int enable=1;
AssertFatal(setsockopt(result->sockHandler, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(enable))==0,"");
struct timeval tv= {0,UDP_TIMEOUT};
if (IS_SOFTMODEM_RFSIM)
tv.tv_sec=2; //debug: wait 2 seconds for human understanding
AssertFatal(setsockopt(result->sockHandler, SOL_SOCKET, SO_RCVTIMEO,&tv,sizeof(tv)) ==0,"");
// Make a send/recv buffer larger than a a couple of subframe
// so the kernel will store for us in and out paquets
int buff=1000*1000*10;
AssertFatal ( setsockopt(result->sockHandler, SOL_SOCKET, SO_SNDBUF, &buff, sizeof(buff)) == 0, "");
AssertFatal ( setsockopt(result->sockHandler, SOL_SOCKET, SO_RCVBUF, &buff, sizeof(buff)) == 0, "");
return true;
}
// sock: udp socket
// bufferZone: a reception area of bufferSize
int receiveSubFrame(UDPsock_t *sock, void *bufferZone, int bufferSize, uint16_t contentType) {
int rcved=0;
commonUDP_t *bufOrigin=(commonUDP_t *)bufferZone;
static uint8_t crossData[65536];
static int crossDataSize=0;
if (crossDataSize) {
LOG_D(HW,"copy a block received in previous subframe\n");
memcpy(bufferZone, crossData, crossDataSize);
rcved=1;
bufferZone+=crossDataSize;
crossDataSize=0;
}
do {
//read all subframe data from the control unit
int ret=recv(sock->sockHandler, bufferZone, bufferSize, 0);
if ( ret==-1) {
if ( errno == EWOULDBLOCK || errno== EINTR ) {
LOG_I(HW,"Received: Timeout, subframe incomplete\n");
return rcved;
} else {
LOG_E(HW,"Critical issue in socket: %s\n", strerror(errno));
return -1;
}
} else {
if (hUDP(bufferZone)->contentType != contentType)
abort();
if (rcved && bufOrigin->timestamp != hUDP(bufferZone)->timestamp ) {
if ( hUDP(bufferZone)->timestamp > bufOrigin->timestamp ) {
LOG_W(HW,"Received data for TS: %lu before end of TS : %lu completion\n",
hUDP(bufferZone)->timestamp,
bufOrigin->timestamp);
memcpy(crossData, bufferZone, ret );
crossDataSize=ret;
return rcved;
} else {
LOG_W(HW,"Dropping late packet\n");
continue;
}
}
rcved++;
bufferZone+=ret;
}
LOG_D(HW,"Received: blocks: %d/%d, size %d, TS: %lu\n",
rcved, bufOrigin->nbBlocks, ret, bufOrigin->timestamp);
} while ( rcved == 0 || rcved < bufOrigin->nbBlocks );
return rcved;
}
int sendSubFrame(UDPsock_t *sock, void *bufferZone, ssize_t secondHeaderSize, uint16_t contentType) {
commonUDP_t *UDPheader=(commonUDP_t *)bufferZone ;
UDPheader->contentType=contentType;
UDPheader->senderClock=rdtsc();
int nbBlocks=UDPheader->nbBlocks;
int blockId=0;
if (nbBlocks <= 0 ) {
LOG_E(PHY,"FS6: can't send blocks: %d\n", nbBlocks);
return 0;
}
do {
if (blockId > 0 ) {
commonUDP_t *currentHeader=(commonUDP_t *)bufferZone;
currentHeader->timestamp=UDPheader->timestamp;
currentHeader->nbBlocks=UDPheader->nbBlocks;
currentHeader->blockID=blockId;
currentHeader->contentType=UDPheader->contentType;
memcpy(commonUDPdata((void *)currentHeader), commonUDPdata(bufferZone), secondHeaderSize);
}
blockId++;
int sz=alignedSize(bufferZone);
// Let's use the first address returned by getaddrinfo()
int ret=sendto(sock->sockHandler, bufferZone, sz, 0,
sock->destAddr->ai_addr, sock->destAddr->ai_addrlen);
if ( ret != sz )
LOG_W(HW,"Wrote socket doesn't return size %d (val: %d, errno:%d, %s)\n",
sz, ret, errno, strerror(errno));
LOG_D(HW,"Sent: TS: %lu, blocks %d/%d, block size : %d \n",
UDPheader->timestamp, UDPheader->nbBlocks-nbBlocks, UDPheader->nbBlocks, sz);
bufferZone+=sz;
nbBlocks--;
} while (nbBlocks);
return 0;
}
......@@ -29,7 +29,7 @@ typedef struct {
nfapi_mode_t nfapi_mode;
} nfapi_params_t;
static nfapi_params_t nfapi_params;
static nfapi_params_t nfapi_params = {0};
void set_thread_priority(int priority) {
//printf("%s(priority:%d)\n", __FUNCTION__, priority);
......
......@@ -691,13 +691,14 @@ void pnf_phy_deallocate_p7_vendor_ext(nfapi_p7_message_header_t *header) {
free(header);
}
int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *req) {
int pnf_phy_hi_dci0_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *req) {
if (req->hi_dci0_request_body.number_of_dci == 0 && req->hi_dci0_request_body.number_of_hi == 0)
LOG_D(PHY,"[PNF] HI_DCI0_REQUEST SFN/SF:%05d dci:%d hi:%d\n", NFAPI_SFNSF2DEC(req->sfn_sf), req->hi_dci0_request_body.number_of_dci, req->hi_dci0_request_body.number_of_hi);
//phy_info* phy = (phy_info*)(pnf_p7->user_data);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc;
if (proc ==NULL)
proc = &eNB->proc.L1_proc;
for (int i=0; i<req->hi_dci0_request_body.number_of_dci + req->hi_dci0_request_body.number_of_hi; i++) {
//LOG_D(PHY,"[PNF] HI_DCI0_REQ sfn_sf:%d PDU[%d]\n", NFAPI_SFNSF2DEC(req->sfn_sf), i);
......@@ -718,7 +719,7 @@ int pnf_phy_hi_dci0_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_hi_dci0_request_t *
return 0;
}
int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request_t *req) {
int pnf_phy_dl_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request_t *req) {
if (RC.ru == 0) {
return -1;
}
......@@ -739,7 +740,8 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request
int sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
int sf = NFAPI_SFNSF2SF(req->sfn_sf);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc;
if (proc==NULL)
proc = &eNB->proc.L1_proc;
nfapi_dl_config_request_pdu_t *dl_config_pdu_list = req->dl_config_request_body.dl_config_pdu_list;
LTE_eNB_PDCCH *pdcch_vars = &eNB->pdcch_vars[sf&1];
pdcch_vars->num_pdcch_symbols = req->dl_config_request_body.number_pdcch_ofdm_symbols;
......@@ -796,7 +798,7 @@ int pnf_phy_dl_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_dl_config_request
uint8_t *dlsch_sdu = tx_pdus[UE_id][harq_pid];
memcpy(dlsch_sdu, tx_pdu->segments[0].segment_data, tx_pdu->segments[0].segment_length);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() DLSCH:pdu_index:%d handle_nfapi_dlsch_pdu(eNB, proc_rxtx, dlsch_pdu, transport_blocks:%d sdu:%p) eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols:%d\n", __FUNCTION__, rel8_pdu->pdu_index, rel8_pdu->transport_blocks, dlsch_sdu, eNB->pdcch_vars[proc->subframe_tx & 1].num_pdcch_symbols);
handle_nfapi_dlsch_pdu( eNB, sfn,sf, &eNB->proc.L1_proc, &dl_config_pdu_list[i], rel8_pdu->transport_blocks-1, dlsch_sdu);
handle_nfapi_dlsch_pdu( eNB, sfn,sf, proc, &dl_config_pdu_list[i], rel8_pdu->transport_blocks-1, dlsch_sdu);
} else {
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s() DLSCH NULL TX PDU SFN/SF:%d PDU_INDEX:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(req->sfn_sf), rel8_pdu->pdu_index);
}
......@@ -836,7 +838,7 @@ int pnf_phy_tx_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_tx_request_t *req) {
return 0;
}
int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request_t *req) {
int pnf_phy_ul_config_req(L1_rxtx_proc_t *proc, nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request_t *req) {
if (0)LOG_D(PHY,"[PNF] UL_CONFIG_REQ %s() sfn_sf:%d pdu:%d rach_prach_frequency_resources:%d srs_present:%u\n",
__FUNCTION__,
NFAPI_SFNSF2DEC(req->sfn_sf),
......@@ -865,7 +867,8 @@ int pnf_phy_ul_config_req(nfapi_pnf_p7_config_t *pnf_p7, nfapi_ul_config_request
uint16_t curr_sfn = NFAPI_SFNSF2SFN(req->sfn_sf);
uint16_t curr_sf = NFAPI_SFNSF2SF(req->sfn_sf);
struct PHY_VARS_eNB_s *eNB = RC.eNB[0][0];
L1_rxtx_proc_t *proc = &eNB->proc.L1_proc;
if (proc==NULL)
proc = &eNB->proc.L1_proc;
nfapi_ul_config_request_pdu_t *ul_config_pdu_list = req->ul_config_request_body.ul_config_pdu_list;
for (int i=0; i<req->ul_config_request_body.number_of_pdus; i++) {
......
......@@ -23,5 +23,5 @@
#define NFAPI_PNF_H__
int oai_nfapi_rach_ind(nfapi_rach_indication_t *rach_ind);
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port);
void oai_subframe_ind(uint16_t sfn, uint16_t sf);
#endif
......@@ -10,6 +10,7 @@
#define _NFAPI_NR_INTERFACE_H_
#include "nfapi_interface.h"
#include <nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h>
#define NFAPI_NR_MAX_NB_CCE_AGGREGATION_LEVELS 5
#define NFAPI_NR_MAX_NB_TCI_STATES_PDCCH 64
......
......@@ -24,6 +24,7 @@ extern "C" {
#include "nfapi_interface.h"
#include "debug.h"
#include <openair2/PHY_INTERFACE/IF_Module.h>
#include <sys/types.h>
......@@ -619,21 +620,21 @@ typedef struct nfapi_pnf_p7_config
* \param req A pointer to the dl config request message structure
* \return not currently used
*/
int (*dl_config_req)(nfapi_pnf_p7_config_t* config, nfapi_dl_config_request_t* req);
int (*dl_config_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_dl_config_request_t* req);
/*! A callback for the UL_CONFIG.request
* \param config A poiner to the PNF P7 config
* \param req A pointer to the ul config request message structure
* \return not currently used
*/
int (*ul_config_req)(nfapi_pnf_p7_config_t* config, nfapi_ul_config_request_t* req);
int (*ul_config_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_ul_config_request_t* req);
/*! A callback for the HI_DCI0.request
* \param config A poiner to the PNF P7 config
* \param req A pointer to the hi dci0 request message structure
* \return not currently used
*/
int (*hi_dci0_req)(nfapi_pnf_p7_config_t* config, nfapi_hi_dci0_request_t* req);
int (*hi_dci0_req)(L1_rxtx_proc_t *proc,nfapi_pnf_p7_config_t* config, nfapi_hi_dci0_request_t* req);
/*! A callback for the TX_REQ.request
* \param config A poiner to the PNF P7 config
......
......@@ -39,7 +39,7 @@ nfapi_pnf_config_t* nfapi_pnf_config_create()
_this->_public.codec_config.allocate = &malloc;
_this->_public.codec_config.deallocate = &free;
return &(_this->_public);
return (nfapi_pnf_config_t* )_this;
}
void nfapi_pnf_config_destory(nfapi_pnf_config_t* config)
......
......@@ -576,20 +576,20 @@ void send_dummy_subframe(pnf_p7_t* pnf_p7, uint16_t sfn_sf)
{
pnf_p7->_public.dummy_subframe.dl_config_req->sfn_sf = sfn_sf;
//NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy dl_config_req - enter\n");
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
(pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
//NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy dl_config_req - exit\n");
}
if(pnf_p7->_public.ul_config_req && pnf_p7->_public.dummy_subframe.ul_config_req)
{
pnf_p7->_public.dummy_subframe.ul_config_req->sfn_sf = sfn_sf;
NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy ul_config_req - enter\n");
(pnf_p7->_public.ul_config_req)(&pnf_p7->_public, pnf_p7->_public.dummy_subframe.ul_config_req);
(pnf_p7->_public.ul_config_req)(NULL, &pnf_p7->_public, pnf_p7->_public.dummy_subframe.ul_config_req);
}
if(pnf_p7->_public.hi_dci0_req && pnf_p7->_public.dummy_subframe.hi_dci0_req)
{
pnf_p7->_public.dummy_subframe.hi_dci0_req->sfn_sf = sfn_sf;
NFAPI_TRACE(NFAPI_TRACE_INFO, "Dummy hi_dci0 - enter\n");
(pnf_p7->_public.hi_dci0_req)(&pnf_p7->_public, pnf_p7->_public.dummy_subframe.hi_dci0_req);
(pnf_p7->_public.hi_dci0_req)(NULL, &pnf_p7->_public, pnf_p7->_public.dummy_subframe.hi_dci0_req);
}
if(pnf_p7->_public.lbt_dl_config_req && pnf_p7->_public.dummy_subframe.lbt_dl_config_req)
{
......@@ -699,7 +699,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(tx_subframe_buffer->dl_config_req != 0)
{
if(pnf_p7->_public.dl_config_req)
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), tx_subframe_buffer->dl_config_req);
(pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), tx_subframe_buffer->dl_config_req);
//deallocate_nfapi_dl_config_request(subframe_buffer->dl_config_req, pnf_p7);
}
......@@ -709,14 +709,14 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(pnf_p7->_public.dl_config_req && pnf_p7->_public.dummy_subframe.dl_config_req)
{
pnf_p7->_public.dummy_subframe.dl_config_req->sfn_sf = sfn_sf_tx;
(pnf_p7->_public.dl_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
(pnf_p7->_public.dl_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.dl_config_req);
}
}
if(tx_subframe_buffer->hi_dci0_req != 0)
{
if(pnf_p7->_public.hi_dci0_req)
(pnf_p7->_public.hi_dci0_req)(&(pnf_p7->_public), tx_subframe_buffer->hi_dci0_req);
(pnf_p7->_public.hi_dci0_req)(NULL, &(pnf_p7->_public), tx_subframe_buffer->hi_dci0_req);
//deallocate_nfapi_hi_dci0_request(subframe_buffer->hi_dci0_req, pnf_p7);
}
......@@ -726,7 +726,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(pnf_p7->_public.hi_dci0_req && pnf_p7->_public.dummy_subframe.hi_dci0_req)
{
pnf_p7->_public.dummy_subframe.hi_dci0_req->sfn_sf = sfn_sf_tx;
(pnf_p7->_public.hi_dci0_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.hi_dci0_req);
(pnf_p7->_public.hi_dci0_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.hi_dci0_req);
}
}
......@@ -777,7 +777,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(subframe_buffer->ul_config_req != 0)
{
if(pnf_p7->_public.ul_config_req)
(pnf_p7->_public.ul_config_req)(&(pnf_p7->_public), subframe_buffer->ul_config_req);
(pnf_p7->_public.ul_config_req)(NULL, &(pnf_p7->_public), subframe_buffer->ul_config_req);
//deallocate_nfapi_ul_config_request(subframe_buffer->ul_config_req, pnf_p7);
}
......@@ -787,7 +787,7 @@ int pnf_p7_subframe_ind(pnf_p7_t* pnf_p7, uint16_t phy_id, uint16_t sfn_sf)
if(pnf_p7->_public.ul_config_req && pnf_p7->_public.dummy_subframe.ul_config_req)
{
pnf_p7->_public.dummy_subframe.ul_config_req->sfn_sf = sfn_sf;
(pnf_p7->_public.ul_config_req)(&(pnf_p7->_public), pnf_p7->_public.dummy_subframe.ul_config_req);
(pnf_p7->_public.ul_config_req)(NULL, &(pnf_p7->_public), pnf_p7->_public.dummy_subframe.ul_config_req);
}
}
......
......@@ -55,7 +55,7 @@ nfapi_vnf_config_t* nfapi_vnf_config_create()
_this->_public.codec_config.deallocate = &free;
return &(_this->_public);
return (nfapi_vnf_config_t* )_this;
}
void nfapi_vnf_config_destory(nfapi_vnf_config_t* config)
......
......@@ -47,7 +47,7 @@ nfapi_vnf_p7_config_t* nfapi_vnf_p7_config_create()
_this->_public.codec_config.deallocate = &free;
return &(_this->_public);
return (nfapi_vnf_p7_config_t*)_this;
}
void nfapi_vnf_p7_config_destory(nfapi_vnf_p7_config_t* config)
......
......@@ -529,7 +529,7 @@ int main(int argc, char *argv[])
time_stats_t time_optim[10], time_decoder[10];
n_iter_stats_t dec_iter[3];
short BG=0,Zc,Kb;
short BG=0,Zc,Kb=0;
while ((c = getopt (argc, argv, "q:r:s:S:l:n:d:i:t:u:h")) != -1)
switch (c)
......
......@@ -43,7 +43,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
uint8_t pilot0,pilot1,pilot2,pilot3;
short ch[2], *pil, *rxF, *dl_bf_ch, *dl_bf_ch_prev;
short *fl, *fm, *fr, *fl_dc, *fm_dc, *fr_dc, *f1, *f2l, *f2r;
short *fl=NULL, *fm=NULL, *fr=NULL, *fl_dc=NULL, *fm_dc=NULL, *fr_dc=NULL, *f1, *f2l=NULL, *f2r=NULL;
unsigned int *rballoc;
int **rxdataF;
......
......@@ -1029,7 +1029,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
int N_RB_DL = frame_parms->N_RB_DL;
int rank_tm3_tm4;
int rank_tm3_tm4=-1;
ue->measurements.nb_antennas_rx = frame_parms->nb_antennas_rx;
......
......@@ -50,8 +50,11 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *eNB,
int32_t **ul_ch_estimates_time = (eNB!=NULL) ? pusch_vars->drs_ch_estimates_time : calibration->drs_ch_estimates_time;
AssertFatal(ul_ch_estimates_time != NULL, "ul_ch_estimates_time is null\n");
int32_t **rxdataF_ext = (eNB!=NULL) ? pusch_vars->rxdataF_ext : calibration->rxdataF_ext;
int subframe = (eNB!=NULL) ? proc->subframe_rx : ru->proc.tti_rx;
int subframe = proc->subframe_rx;
uint8_t harq_pid;
int16_t delta_phase = 0;
int16_t *ru1 = ru_90;
int16_t *ru2 = ru_90;
......
This diff is collapsed.
......@@ -52,7 +52,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int n;
// uint8_t reset;
uint32_t x1, x2, s=0;
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->e;
uint8_t *dlsch_e=dlsch->harq_processes[harq_pid]->eDL;
uint8_t *e=dlsch_e;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_IN);
// Rule for accumulation of subframes for BL/CE UEs
......
......@@ -61,7 +61,8 @@ typedef struct IF5_mobipass_header IF5_mobipass_header_t;
void send_IF5(RU_t *, openair0_timestamp, int, uint8_t*, uint16_t);
void recv_IF5(RU_t *, openair0_timestamp*, int, uint16_t);
void recv_IF5(RU_t *ru, openair0_timestamp *proc_timestamp, int subframe, uint16_t packet_type);
void malloc_IF5_buffer(RU_t *ru);
......
......@@ -714,7 +714,7 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
int32_t **txdataF = eNB->common_vars.txdataF;
uint8_t Ngroup_PHICH,ngroup_PHICH,nseq_PHICH;
uint8_t NSF_PHICH = 4;
uint8_t pusch_subframe;
uint8_t pusch_subframe=-1;
uint8_t i;
int subframe = proc->subframe_tx;
phich_config_t *phich;
......
......@@ -105,6 +105,7 @@ void generate_mch(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,uint8_t *a)
AssertFatal(eNB->dlsch_MCH->harq_processes[0]->pdu != NULL, "attempt to encode a NULL harq PDU\n");
AssertFatal(dlsch_encoding(eNB,
proc,
// a,
eNB->dlsch_MCH->harq_processes[0]->pdu,
1,
......
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.
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.
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.
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