Commit 93c176f5 authored by Rohit Gupta's avatar Rohit Gupta

Merge branch 'develop' into bugfix-33-RRCConnectionRequest_with_STMSI

parents 79a25fe9 125cb4d4
job1:
script:
- echo $PWD
- echo $USER
- echo $OAI_USER
- echo $OAI_EXTRA_ARGS
- echo $NFS_SHARE_DIR
- echo $EXTERNAL_SHARE_DIR
- echo $SHELL
- git rev-parse --abbrev-ref HEAD
- git_head=`git rev-parse HEAD`
- echo $git_head
- tmp=`git show-ref --head | grep $git_head`
- tmp=(${tmp///// })
- git_branch=${tmp[@]:(-1)}
- echo $git_branch
- source oaienv
- echo $OPENAIR_DIR
- NFS_TEST_RESULTS_DIR=$NFS_SHARE_DIR/$git_branch/$git_head
- EXTERNAL_SHARE_RESULTS_DIR=$EXTERNAL_SHARE_DIR/$git_branch/$git_head
- echo $NFS_TEST_RESULTS_DIR
- echo $EXTERNAL_SHARE_RESULTS_DIR
- mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS $OAI_EXTRA_ARGS -g "$OAI_TEST_CASE_GROUP">& $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g "$OAI_TEST_CASE_GROUP" >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log
- mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest.log
- mv $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest_cleanup.log
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
- sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR
- cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml
...@@ -421,7 +421,7 @@ elseif (${RF_BOARD} STREQUAL "OAI_USRP") ...@@ -421,7 +421,7 @@ elseif (${RF_BOARD} STREQUAL "OAI_USRP")
${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp) ${OPENAIR_TARGETS}/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp)
LINK_DIRECTORIES("/opt/lib") LINK_DIRECTORIES("/opt/lib")
set(option_HW_lib "uhd") set(option_HW_lib "uhd")
set(LOWLATENCY False) #set(LOWLATENCY False)
elseif (${RF_BOARD} STREQUAL "OAI_BLADERF") elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/") include_directories("${OPENAIR_TARGETS}/ARCH/BLADERF/USERSPACE/LIB/")
...@@ -432,14 +432,14 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF") ...@@ -432,14 +432,14 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
) )
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu") LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
set(option_HW_lib "bladeRF") set(option_HW_lib "bladeRF")
#set(LOWLATENCY False) #set(LOWLATENCY False)
elseif (${RF_BOARD} STREQUAL "ETHERNET") elseif (${RF_BOARD} STREQUAL "ETHERNET")
include_directories ("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB") include_directories ("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB")
set(HW_SOURCE ${HW_SOURCE} set(HW_SOURCE ${HW_SOURCE}
${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c ${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.c
) )
set(LOWLATENCY True) #set(LOWLATENCY True)
elseif (${RF_BOARD} STREQUAL "CPRIGW") elseif (${RF_BOARD} STREQUAL "CPRIGW")
set(HW_SOURCE ${HW_SOURCE} set(HW_SOURCE ${HW_SOURCE}
...@@ -451,6 +451,7 @@ endif (${RF_BOARD} STREQUAL "EXMIMO") ...@@ -451,6 +451,7 @@ endif (${RF_BOARD} STREQUAL "EXMIMO")
include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON") include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
Message("LOWLATENCY flag is ${LOWLATENCY}")
############################################################## ##############################################################
# ???!!! TO BE DOCUMENTED OPTIONS !!!??? # ???!!! TO BE DOCUMENTED OPTIONS !!!???
...@@ -843,6 +844,7 @@ set(PHY_SRC ...@@ -843,6 +844,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/CODING/viterbi_lte.c ${OPENAIR1_DIR}/PHY/CODING/viterbi_lte.c
${OPENAIR1_DIR}/PHY/INIT/lte_init.c ${OPENAIR1_DIR}/PHY/INIT/lte_init.c
${OPENAIR1_DIR}/PHY/INIT/lte_parms.c ${OPENAIR1_DIR}/PHY/INIT/lte_parms.c
${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
${OPENAIR1_DIR}/PHY/TOOLS/file_output.c ${OPENAIR1_DIR}/PHY/TOOLS/file_output.c
${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c ${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c
${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c ${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c
......
...@@ -118,8 +118,7 @@ class core: ...@@ -118,8 +118,7 @@ class core:
rsp1 = self.prompt1 rsp1 = self.prompt1
rsp2 = self.prompt2 rsp2 = self.prompt2
if sudo == True: if sudo == True:
command = 'echo \'' + self.password + '\' | sudo -S -E ' + command command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' '
self.wait_quiet() self.wait_quiet()
if self.send_cr: if self.send_cr:
log.stats['cmd'] += 1 log.stats['cmd'] += 1
...@@ -140,7 +139,7 @@ class core: ...@@ -140,7 +139,7 @@ class core:
rsp2 = self.prompt2 rsp2 = self.prompt2
self.wait_quiet() self.wait_quiet()
if sudo == True: if sudo == True:
command = 'echo \'' + self.password + '\' | sudo -S -E ' + command command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' '
if self.send_cr: if self.send_cr:
log.stats['cmd'] += 1 log.stats['cmd'] += 1
self.oai.sendline(command) self.oai.sendline(command)
...@@ -240,8 +239,9 @@ class core: ...@@ -240,8 +239,9 @@ class core:
# print rsp # print rsp
if (rsp.find(expect) == -1): if (rsp.find(expect) == -1):
return 'OK' return 'OK'
else:
raise log.err(self.failed(command, expect,debug)) print "command = " + cmd + "expect = " + expect + "rsp = " + rsp
raise log.err(self.failed(command, expect,debug))
# **************************send_wait************************* # **************************send_wait*************************
......
...@@ -83,10 +83,13 @@ class openair(core): ...@@ -83,10 +83,13 @@ class openair(core):
return (stdout, stderr) return (stdout, stderr)
def connect(self, username, password, prompt='PEXPECT_OAI'): def connect(self, username, password, prompt='PEXPECT_OAI'):
while True: max_retries=100
i=0
while i <= max_retries:
self.prompt1 = prompt self.prompt1 = prompt
self.prompt2 = prompt self.prompt2 = prompt
self.password = '' self.password = ''
i=i+1
# WE do not store the password when sending commands for secuirity reasons. The password might be accidentally logged in such cases. # WE do not store the password when sending commands for secuirity reasons. The password might be accidentally logged in such cases.
#The password is used only to make ssh connections. In case user wants to run programs with sudo, then he/she needs to add following line in /etc/sudoers #The password is used only to make ssh connections. In case user wants to run programs with sudo, then he/she needs to add following line in /etc/sudoers
# your_user_name ALL=(ALL:ALL) NOPASSWD: ALL # your_user_name ALL=(ALL:ALL) NOPASSWD: ALL
...@@ -109,11 +112,14 @@ class openair(core): ...@@ -109,11 +112,14 @@ class openair(core):
except Exception, e: except Exception, e:
error='' error=''
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
error = error + 'address = "'+ self.address +' username = ' + username
error = error + traceback.format_exc() error = error + traceback.format_exc()
print error print error
print "Retrying again in 60 seconds" print "Retrying again in 1 seconds"
time.sleep(60) time.sleep(1)
#sys.exit(1) if i==max_retries:
print "Fatal Error: Terminating the program now..."
sys.exit(1)
def connect2(self, username, password, prompt='$'): def connect2(self, username, password, prompt='$'):
self.prompt1 = prompt self.prompt1 = prompt
......
This diff is collapsed.
This diff is collapsed.
...@@ -10,6 +10,7 @@ import threading ...@@ -10,6 +10,7 @@ import threading
import signal import signal
import traceback import traceback
import os import os
import commands
# configure the serial connections (the parameters differs on the device you are connecting to) # configure the serial connections (the parameters differs on the device you are connecting to)
#First we find an open port to work with #First we find an open port to work with
...@@ -34,8 +35,7 @@ def find_open_port(): ...@@ -34,8 +35,7 @@ def find_open_port():
ser = serial.Serial(port=serial_port) ser = serial.Serial(port=serial_port)
return return
find_open_port()
print 'Using Serial port : ' + serial_port
#serial_port = '/dev/ttyUSB2' #serial_port = '/dev/ttyUSB2'
bandrich_ppd_config = os.environ.get('OPENAIR_DIR') + '/cmake_targets/autotests/tools/wdial.bandrich.conf' bandrich_ppd_config = os.environ.get('OPENAIR_DIR') + '/cmake_targets/autotests/tools/wdial.bandrich.conf'
...@@ -127,7 +127,7 @@ def start_ue () : ...@@ -127,7 +127,7 @@ def start_ue () :
ip = IPRoute() ip = IPRoute()
idx = ip.link_lookup(ifname=iface)[0] idx = ip.link_lookup(ifname=iface)[0]
os.system ('route add 192.172.0.1 ppp0') os.system ('route add 192.172.0.1 ppp0')
os.system ('ping -c 5 192.172.0.1') os.system ('ping 192.172.0.1')
break break
except Exception, e: except Exception, e:
error = ' Interface ' + iface + 'does not exist...' error = ' Interface ' + iface + 'does not exist...'
...@@ -144,11 +144,63 @@ def stop_ue(): ...@@ -144,11 +144,63 @@ def stop_ue():
send_command('AT+CGATT=0' , 'OK|ERROR' , timeout) send_command('AT+CGATT=0' , 'OK|ERROR' , timeout)
send_command('AT+CFUN=4' , 'OK' , timeout) send_command('AT+CFUN=4' , 'OK' , timeout)
#reset the USB BUS of Bandrich UE
def reset_ue():
stringIdBandrich='BandRich, Inc. 4G LTE adapter'
status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'')
if (out == '') :
print "Bandrich 4G LTE Adapter not found. Exiting now..."
sys.exit()
p=re.compile('Bus\s*(\w+)\s*Device\s*(\w+):\s*ID\s*(\w+):(\w+)')
res=p.findall(out)
BusId=res[0][0]
DeviceId=res[0][1]
VendorId=res[0][2]
ProductId=res[0][3]
usb_dir= find_usb_path(VendorId, ProductId)
print usb_dir
cmd = "sudo sh -c \"echo 0 > " + usb_dir + "/authorized\""
os.system(cmd + " ; sleep 5" )
cmd = "sudo sh -c \"echo 1 > " + usb_dir + "/authorized\""
os.system(cmd + " ; sleep 5" )
def read_file(filename):
try:
file = open(filename, 'r')
return file.read()
except Exception, e:
#error = ' Filename ' + filename
#error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
#error = error + traceback.format_exc()
#print error
return ''
def find_usb_path(idVendor, idProduct):
for root, dirs, files in os.walk("/sys/bus/usb/devices", topdown=False):
for name in dirs:
tmpdir= os.path.join(root, name)
tmpidVendor = read_file(tmpdir+'/idVendor').replace("\n","")
tmpidProduct = read_file(tmpdir+'/idProduct').replace("\n","")
#print "tmpdir = " + tmpdir + " tmpidVendor = " + tmpidVendor + " tmpidProduct = " + tmpidProduct
if tmpidVendor == idVendor and tmpidProduct == idProduct:
return tmpdir
return ''
for arg in sys.argv[1:]: for arg in sys.argv[1:]:
if arg == '--start-ue' : if arg == '--start-ue' :
find_open_port()
print 'Using Serial port : ' + serial_port
start_ue() start_ue()
elif arg == '--stop-ue' : elif arg == '--stop-ue' :
find_open_port()
print 'Using Serial port : ' + serial_port
stop_ue() stop_ue()
elif arg == '--reset-ue' :
reset_ue()
else : else :
print " Script called with wrong arguments, arg = " + arg print " Script called with wrong arguments, arg = " + arg
sys.exit() sys.exit()
#!/bin/bash
################################################################################
# OpenAirInterface
# Copyright(c) 1999 - 2015 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 init_nas_nos1
# brief loads the nasmesh module and sets up the radio bearers (used to provide ip interface without S1 interface)
# author Florian Kaltenberger
#
#######################################
load_module()
{
mod_name=${1##*/}
mod_name=${mod_name%.*}
if awk "/$mod_name/ {found=1 ;exit} END {if (found!=1) exit 1}" /proc/modules
then
echo "module $mod_name already loaded: I remove it first"
sudo rmmod $mod_name
fi
echo loading $mod_name
sudo insmod $1
}
function main()
{
PCI=`lspci -m | grep Xilinx`
if [ -z "$PCI" ]; then
echo "No card found. Stopping!"
return
fi
## This part corrects the wrong configuration of the endpoint done by the bios in some machines
echo "$PCI" | while read config_reg; do
SLOT_NUMBER=`echo $config_reg | awk -F\" '{print $1}'`
sudo setpci -s $SLOT_NUMBER 60.b=10
done
load_module $OPENAIR_DIR/targets/bin/openair_rf.ko
sleep 1
if [ ! -e /dev/openair0 ]; then
sudo mknod /dev/openair0 c 127 0
sudo chmod a+rw /dev/openair0
fi
DEVICE=`echo $PCI | awk -F\" '{print $(NF-1)}' | awk '{print $2}'`
DEVICE_SWID=${DEVICE:2:2}
if [ $DEVICE_SWID == '0a' ]; then
echo "Using firware version 10"
$OPENAIR_DIR/targets/bin/updatefw -s 0x43fffff0 -b -f $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10
else
echo 'No corresponding firmware found'
return
fi
}
main "$@"
#!/bin/bash
#arg1 idVendor
#arg2 idProduct
argIdVendor=$1
argIdProduct=$2
echo $1
echo $2
for X in /sys/bus/usb/devices/*; do
#echo "$X"
idVendor=`cat "$X/idVendor" 2>/dev/null`
idProduct=`cat "$X/idProduct" 2>/dev/null`
if [ "$argIdVendor" == "$idVendor" ] && [ "$argIdProduct" == "$idProduct" ]
then
echo "$X"
fi
done
#!/bin/bash
#arg1 timeout to wait before running the script
#arg2 interface
#arg3 iperf arguments
args=($*)
timeout=${args[0]}
iface=${args[1]}
iperf_args=(${args[@]:2})
#array=${1:-1}
echo "args = ${args[@]}"
echo "timeout = $timeout"
echo "iface = $iface"
echo "iperf_args = ${iperf_args[@]}"
sleep $timeout
while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5
iperf ${iperf_args[@]}
...@@ -45,6 +45,8 @@ MSC_GEN="False" ...@@ -45,6 +45,8 @@ MSC_GEN="False"
XFORMS="False" XFORMS="False"
PRINT_STATS="False" PRINT_STATS="False"
VCD_TIMING="False" VCD_TIMING="False"
LOWLATENCY_FLAG_USER="False"
FORCE_LOWLATENCY_FLAG_USER=""
REL="Rel10" REL="Rel10"
HW="EXMIMO" HW="EXMIMO"
NOS1=0 NOS1=0
...@@ -113,7 +115,10 @@ Options ...@@ -113,7 +115,10 @@ Options
Shows detailed compilation instructions in makefile Shows detailed compilation instructions in makefile
--cflags_processor --cflags_processor
Manually Add CFLAGS of processor if they are not detected correctly by script. Only add these flags if you know your processor supports them. Example flags: -msse3 -msse4.1 -msse4.2 -mavx2 Manually Add CFLAGS of processor if they are not detected correctly by script. Only add these flags if you know your processor supports them. Example flags: -msse3 -msse4.1 -msse4.2 -mavx2
--disable-deadline
Disables deadline scheduler of Linux kernel (>=3.14.x).
--enable-deadline
Disables deadline scheduler of Linux kernel (>=3.14.x).
Usage (first build): Usage (first build):
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files
...@@ -225,6 +230,15 @@ function main() { ...@@ -225,6 +230,15 @@ function main() {
CFLAGS_PROCESSOR_USER=$2 CFLAGS_PROCESSOR_USER=$2
echo_info "setting CPU FLAGS from USER to: $CFLAGS_PROCESSOR_USER" echo_info "setting CPU FLAGS from USER to: $CFLAGS_PROCESSOR_USER"
shift 2;; shift 2;;
--disable-deadline)
FORCE_LOWLATENCY_FLAG_USER="False"
echo_info "Disabling the usage of deadline scheduler"
shift 1;;
--enable-deadline)
FORCE_LOWLATENCY_FLAG_USER="True"
echo_info "Enabling the usage of deadline scheduler"
shift 1;;
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
...@@ -235,6 +249,31 @@ function main() { ...@@ -235,6 +249,31 @@ function main() {
esac esac
done done
#Now we set flags to enable deadline scheduler settings
#By default: USRP: disable,
#By default: BLADERF: enable,
#By default: EXMIMO: enable
if [ "$FORCE_LOWLATENCY_FLAG_USER" = "" ]; then
if [ "$HW" = "EXMIMO" ] ; then
LOWLATENCY_FLAG_USER="True"
elif [ "$HW" = "ETHERNET" ] ; then
LOWLATENCY_FLAG_USER="True"
elif [ "$HW" = "OAI_USRP" ] ; then
LOWLATENCY_FLAG_USER="False"
elif [ "$HW" = "OAI_BLADERF" ] ; then
LOWLATENCY_FLAG_USER="False"
elif [ "$HW" = "None" ] ; then
LOWLATENCY_FLAG_USER="False"
else
echo_error "Unknown HW type $HW. Exiting now..."
exit
fi
else
LOWLATENCY_FLAG_USER=$FORCE_LOWLATENCY_FLAG_USER
fi
echo_info "Flags for Deadline scheduler: $LOWLATENCY_FLAG_USER"
############################################ ############################################
# setting and printing OAI envs, we should check here # setting and printing OAI envs, we should check here
############################################ ############################################
...@@ -321,6 +360,7 @@ function main() { ...@@ -321,6 +360,7 @@ function main() {
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(PACKAGE_NAME \"${lte_exec}\")" >> $cmake_file echo "set(PACKAGE_NAME \"${lte_exec}\")" >> $cmake_file
echo "set (LOWLATENCY \"${LOWLATENCY_FLAG_USER}\" )" >>$cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$lte_build_dir/build cd $DIR/$lte_build_dir/build
cmake .. cmake ..
...@@ -539,6 +579,7 @@ function main() { ...@@ -539,6 +579,7 @@ function main() {
echo "set(ENABLE_ITTI False )" >> $cmake_file echo "set(ENABLE_ITTI False )" >> $cmake_file
echo "set(RF_BOARD \"${HW}\")" >> $cmake_file echo "set(RF_BOARD \"${HW}\")" >> $cmake_file
echo 'set(PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file echo 'set(PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file
echo "set(LOWLATENCY \"${LOWLATENCY_FLAG_USER}\")" >>$cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
[ "$CLEAN" = "1" ] && rm -rf $DIR/rrh_gw/build [ "$CLEAN" = "1" ] && rm -rf $DIR/rrh_gw/build
......
...@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators") set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True) set(PHYSIM True)
set(RF_BOARD None) set(RF_BOARD None)
set(XFORMS True) set(XFORMS False)
set(DEBUG_PHY False) set(DEBUG_PHY False)
set(MU_RECIEVER False) set(MU_RECIEVER False)
......
...@@ -163,33 +163,27 @@ install_gnutls_from_source(){ ...@@ -163,33 +163,27 @@ install_gnutls_from_source(){
check_install_usrp_uhd_driver(){ check_install_usrp_uhd_driver(){
log_file=$OPENAIR_DIR/cmake_targets/log/check_install_usrp_uhd_driver_log.txt #first we remove old installation
echo_info "\nIn function: check_install_usrp_uhd_driver(). Installing USRP Drivers : The logfile for the installation is located here: $log_file " $SUDO apt-get remove uhd libuhd-dev libuhd003 uhd-host -y
(
v=$(lsb_release -cs) v=$(lsb_release -cs)
$SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
#The new USRP repository
$SUDO add-apt-repository ppa:ettusresearch/uhd -y
$SUDO apt-get update $SUDO apt-get update
$SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev $SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev
$SUDO apt-get -y install -t `lsb_release -cs` uhd --force-yes $SUDO apt-get -y install libuhd-dev libuhd003 uhd-host
) >& $log_file $SUDO uhd_images_downloader
} }
check_install_bladerf_driver(){ check_install_bladerf_driver(){
log_file=$OPENAIR_DIR/cmake_targets/log/check_install_bladerf_driver_log.txt
echo_info "\nIn function: check_install_bladerf_driver(). Install BLADERF drivers : The logfile for the installation is located here: $log_file "
(
$SUDO add-apt-repository -y ppa:bladerf/bladerf $SUDO add-apt-repository -y ppa:bladerf/bladerf
$SUDO apt-get update $SUDO apt-get update
$SUDO apt-get install -y bladerf libbladerf-dev $SUDO apt-get install -y bladerf libbladerf-dev
$SUDO apt-get install -y bladerf-firmware-fx3 $SUDO apt-get install -y bladerf-firmware-fx3
$SUDO apt-get install -y bladerf-fpga-hostedx40 $SUDO apt-get install -y bladerf-fpga-hostedx40
bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
) >& $log_file
} }
check_install_additional_tools (){ check_install_additional_tools (){
log_file=$OPENAIR_DIR/cmake_targets/log/check_install_additional_tools_log.txt
echo_info "\nIn function: check_install_oai_software(). Installing optional OAI packages : The logfile for the installation is located here: $log_file "
(
$SUDO apt-get update $SUDO apt-get update
$SUDO apt-get install -y \ $SUDO apt-get install -y \
check \ check \
...@@ -199,7 +193,6 @@ check_install_additional_tools (){ ...@@ -199,7 +193,6 @@ check_install_additional_tools (){
libboost-all-dev \ libboost-all-dev \
libpthread-stubs0-dev \ libpthread-stubs0-dev \
openvpn \ openvpn \
phpmyadmin \
pkg-config \ pkg-config \
python-dev \ python-dev \
python-pexpect \ python-pexpect \
...@@ -212,14 +205,9 @@ check_install_additional_tools (){ ...@@ -212,14 +205,9 @@ check_install_additional_tools (){
vlan \ vlan \
ctags \ ctags \
ntpdate ntpdate
) >& $log_file
} }
check_install_oai_software() { check_install_oai_software() {
log_file=$OPENAIR_DIR/cmake_targets/log/check_install_oai_software_log.txt
echo_info "\nIn function: check_install_oai_software(). Installing mandatory OAI packages : The logfile for the installation is located here: $log_file "
(
$SUDO apt-get update $SUDO apt-get update
$SUDO apt-get install -y \ $SUDO apt-get install -y \
autoconf \ autoconf \
...@@ -280,7 +268,8 @@ check_install_oai_software() { ...@@ -280,7 +268,8 @@ check_install_oai_software() {
python-pip \ python-pip \
pydb \ pydb \
wvdial \ wvdial \
python-numpy python-numpy \
sshpass
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
if [ `lsb_release -rs` = '12.04' ] ; then if [ `lsb_release -rs` = '12.04' ] ; then
install_nettle_from_source install_nettle_from_source
...@@ -290,7 +279,6 @@ check_install_oai_software() { ...@@ -290,7 +279,6 @@ check_install_oai_software() {
fi fi
$SUDO pip install paramiko $SUDO pip install paramiko
$SUDO pip install pyroute2 $SUDO pip install pyroute2
) > $log_file 2>&1
install_asn1c_from_source install_asn1c_from_source
$SUDO rm -fr /opt/ssh $SUDO rm -fr /opt/ssh
$SUDO git clone https://gist.github.com/2190472.git /opt/ssh $SUDO git clone https://gist.github.com/2190472.git /opt/ssh
...@@ -309,8 +297,8 @@ install_asn1c_from_source(){ ...@@ -309,8 +297,8 @@ install_asn1c_from_source(){
patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0 patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0
./configure ./configure
make -j`nproc` make -j`nproc`
$SUDO make install $SUDO make install
) > $asn1_install_dir 2>&1 ) > $asn1_install_dir 2>&1
} }
################################################# #################################################
......
#!/bin/bash
echo "This script stops exmimo2 as it might be transmitting signal by itself if lte-softmodem terminates incorrectly"
if [ "$OPENAIR_DIR" == "" ]; then
echo "Is the OPENAIR_DIR path set correctly? Exiting now"
exit
fi
sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches'
#load the module
sudo -E $OPENAIR_DIR/cmake_targets/tools/init_exmimo2
#now we stop the card from transmitting anything
cd $OPENAIR_DIR/targets/bin
sudo -E octave $OPENAIR_DIR/cmake_targets/tools/exmimo_stop_octave.m
#include <string.h>
#include <math.h>
#include <unistd.h>
#include <execinfo.h>
#include <signal.h>
#include "SIMULATION/TOOLS/defs.h"
#include "PHY/types.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
extern PHY_VARS_eNB *PHY_vars_eNB;
extern PHY_VARS_UE *PHY_vars_UE;
void lte_param_init(unsigned char N_tx,
unsigned char N_rx,
unsigned char transmission_mode,
uint8_t extended_prefix_flag,
frame_t frame_type,
uint16_t Nid_cell,
uint8_t tdd_config,
uint8_t N_RB_DL,
uint8_t threequarter_fs,
uint8_t osf,
uint32_t perfect_ce)
{
LTE_DL_FRAME_PARMS *lte_frame_parms;
int i;
printf("Start lte_param_init\n");
PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
//PHY_config = malloc(sizeof(PHY_CONFIG));
mac_xface = malloc(sizeof(MAC_xface));
srand(0);
randominit(0);
set_taus_seed(0);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->threequarter_fs = threequarter_fs;
lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
lte_frame_parms->nb_antennas_tx_eNB = N_tx;
lte_frame_parms->phich_config_common.phich_resource = one;
lte_frame_parms->tdd_config = tdd_config;
lte_frame_parms->frame_type = frame_type;
// lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;44
// lte_frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
init_frame_parms(lte_frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
// phy_init_top(lte_frame_parms); //allocation
PHY_vars_UE->is_secondary_ue = 0;
PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
PHY_vars_eNB->lte_frame_parms = *lte_frame_parms;
phy_init_lte_top(lte_frame_parms);
dump_frame_parms(lte_frame_parms);
PHY_vars_UE->PHY_measurements.n_adj_cells=0;
PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
for (i=0; i<3; i++)
lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
phy_init_lte_ue(PHY_vars_UE,1,0);
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
generate_pcfich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
generate_phich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
// DL power control init
if (transmission_mode == 1) {
PHY_vars_eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB
((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 0;
PHY_vars_UE->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB
((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 0;
} else { // rho_a = rhob
PHY_vars_eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB
((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 1;
PHY_vars_UE->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB
((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 1;
}
PHY_vars_UE->perfect_ce = perfect_ce;
printf("Done lte_param_init\n");
}
...@@ -68,33 +68,57 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) ...@@ -68,33 +68,57 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
break; break;
default: default:
msg("Illegal oversampling %d\n",osf); printf("Illegal oversampling %d\n",osf);
return(-1); return(-1);
} }
switch (frame_parms->N_RB_DL) { switch (frame_parms->N_RB_DL) {
case 100: case 100:
if (osf>1) { if (osf>1) {
msg("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL); printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
return(-1); return(-1);
} }
frame_parms->ofdm_symbol_size = 2048; if (frame_parms->threequarter_fs) {
frame_parms->log2_symbol_size = 11; frame_parms->ofdm_symbol_size = 1536;
frame_parms->samples_per_tti = 30720; frame_parms->samples_per_tti = 23040;
frame_parms->first_carrier_offset = 2048-600; frame_parms->first_carrier_offset = 1536-600;
frame_parms->nb_prefix_samples=(frame_parms->nb_prefix_samples*3)>>2;
frame_parms->nb_prefix_samples0=(frame_parms->nb_prefix_samples0*3)>>2;
}
else {
frame_parms->ofdm_symbol_size = 2048;
frame_parms->samples_per_tti = 30720;
frame_parms->first_carrier_offset = 2048-600;
}
frame_parms->N_RBGS = 4;
frame_parms->N_RBG = 25;
break;
case 75:
if (osf>1) {
printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
return(-1);
}
frame_parms->ofdm_symbol_size = 1536;
frame_parms->samples_per_tti = 23040;
frame_parms->first_carrier_offset = 1536-450;
frame_parms->nb_prefix_samples=(frame_parms->nb_prefix_samples*3)>>2;
frame_parms->nb_prefix_samples0=(frame_parms->nb_prefix_samples0*3)>>2;
frame_parms->N_RBGS = 4; frame_parms->N_RBGS = 4;
frame_parms->N_RBG = 25; frame_parms->N_RBG = 25;
break; break;
case 50: case 50:
if (osf>1) { if (osf>1) {
msg("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL); printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
return(-1); return(-1);
} }
frame_parms->ofdm_symbol_size = 1024*osf; frame_parms->ofdm_symbol_size = 1024*osf;
frame_parms->log2_symbol_size = 10+log2_osf;
frame_parms->samples_per_tti = 15360*osf; frame_parms->samples_per_tti = 15360*osf;
frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 300; frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 300;
frame_parms->nb_prefix_samples>>=(1-log2_osf); frame_parms->nb_prefix_samples>>=(1-log2_osf);
...@@ -105,13 +129,13 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) ...@@ -105,13 +129,13 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
case 25: case 25:
if (osf>2) { if (osf>2) {
msg("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL); printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL);
return(-1); return(-1);
} }
frame_parms->ofdm_symbol_size = 512*osf; frame_parms->ofdm_symbol_size = 512*osf;
frame_parms->log2_symbol_size = 9+log2_osf;
frame_parms->samples_per_tti = 7680*osf; frame_parms->samples_per_tti = 7680*osf;
frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 150; frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 150;
frame_parms->nb_prefix_samples>>=(2-log2_osf); frame_parms->nb_prefix_samples>>=(2-log2_osf);
...@@ -124,7 +148,6 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) ...@@ -124,7 +148,6 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
case 15: case 15:
frame_parms->ofdm_symbol_size = 256*osf; frame_parms->ofdm_symbol_size = 256*osf;
frame_parms->log2_symbol_size = 8+log2_osf;
frame_parms->samples_per_tti = 3840*osf; frame_parms->samples_per_tti = 3840*osf;
frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 90; frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 90;
frame_parms->nb_prefix_samples>>=(3-log2_osf); frame_parms->nb_prefix_samples>>=(3-log2_osf);
...@@ -135,7 +158,6 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) ...@@ -135,7 +158,6 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
case 6: case 6:
frame_parms->ofdm_symbol_size = 128*osf; frame_parms->ofdm_symbol_size = 128*osf;
frame_parms->log2_symbol_size = 7+log2_osf;
frame_parms->samples_per_tti = 1920*osf; frame_parms->samples_per_tti = 1920*osf;
frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 36; frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 36;
frame_parms->nb_prefix_samples>>=(4-log2_osf); frame_parms->nb_prefix_samples>>=(4-log2_osf);
...@@ -145,7 +167,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) ...@@ -145,7 +167,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
break; break;
default: default:
msg("init_frame_parms: Error: Number of resource blocks (N_RB_DL %d) undefined, frame_parms = %p \n",frame_parms->N_RB_DL, frame_parms); printf("init_frame_parms: Error: Number of resource blocks (N_RB_DL %d) undefined, frame_parms = %p \n",frame_parms->N_RB_DL, frame_parms);
return(-1); return(-1);
break; break;
} }
...@@ -159,23 +181,22 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) ...@@ -159,23 +181,22 @@ 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)
{ {
msg("frame_parms->N_RB_DL=%d\n",frame_parms->N_RB_DL); printf("frame_parms->N_RB_DL=%d\n",frame_parms->N_RB_DL);
msg("frame_parms->N_RB_UL=%d\n",frame_parms->N_RB_UL); printf("frame_parms->N_RB_UL=%d\n",frame_parms->N_RB_UL);
msg("frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell); printf("frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell);
msg("frame_parms->Ncp=%d\n",frame_parms->Ncp); printf("frame_parms->Ncp=%d\n",frame_parms->Ncp);
msg("frame_parms->Ncp_UL=%d\n",frame_parms->Ncp_UL); printf("frame_parms->Ncp_UL=%d\n",frame_parms->Ncp_UL);
msg("frame_parms->nushift=%d\n",frame_parms->nushift); printf("frame_parms->nushift=%d\n",frame_parms->nushift);
msg("frame_parms->frame_type=%d\n",frame_parms->frame_type); printf("frame_parms->frame_type=%d\n",frame_parms->frame_type);
msg("frame_parms->tdd_config=%d\n",frame_parms->tdd_config); printf("frame_parms->tdd_config=%d\n",frame_parms->tdd_config);
msg("frame_parms->tdd_config_S=%d\n",frame_parms->tdd_config_S); printf("frame_parms->tdd_config_S=%d\n",frame_parms->tdd_config_S);
msg("frame_parms->mode1_flag=%d\n",frame_parms->mode1_flag); printf("frame_parms->mode1_flag=%d\n",frame_parms->mode1_flag);
msg("frame_parms->nb_antennas_tx=%d\n",frame_parms->nb_antennas_tx); printf("frame_parms->nb_antennas_tx=%d\n",frame_parms->nb_antennas_tx);
msg("frame_parms->nb_antennas_rx=%d\n",frame_parms->nb_antennas_rx); printf("frame_parms->nb_antennas_rx=%d\n",frame_parms->nb_antennas_rx);
msg("frame_parms->ofdm_symbol_size=%d\n",frame_parms->ofdm_symbol_size); printf("frame_parms->ofdm_symbol_size=%d\n",frame_parms->ofdm_symbol_size);
msg("frame_parms->log2_symbol_size=%d\n",frame_parms->log2_symbol_size); printf("frame_parms->nb_prefix_samples=%d\n",frame_parms->nb_prefix_samples);
msg("frame_parms->nb_prefix_samples=%d\n",frame_parms->nb_prefix_samples); printf("frame_parms->nb_prefix_samples0=%d\n",frame_parms->nb_prefix_samples0);
msg("frame_parms->nb_prefix_samples0=%d\n",frame_parms->nb_prefix_samples0); printf("frame_parms->first_carrier_offset=%d\n",frame_parms->first_carrier_offset);
msg("frame_parms->first_carrier_offset=%d\n",frame_parms->first_carrier_offset); printf("frame_parms->samples_per_tti=%d\n",frame_parms->samples_per_tti);
msg("frame_parms->samples_per_tti=%d\n",frame_parms->samples_per_tti); printf("frame_parms->symbols_per_tti=%d\n",frame_parms->symbols_per_tti);
msg("frame_parms->symbols_per_tti=%d\n",frame_parms->symbols_per_tti);
} }
...@@ -703,24 +703,28 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -703,24 +703,28 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
void (*idft)(int16_t *,int16_t *, int); void (*idft)(int16_t *,int16_t *, int);
switch (phy_vars_ue->lte_frame_parms.log2_symbol_size) { switch (phy_vars_ue->lte_frame_parms.ofdm_symbol_size) {
case 7: case 128:
idft = idft128; idft = idft128;
break; break;
case 8: case 256:
idft = idft256; idft = idft256;
break; break;
case 9: case 512:
idft = idft512; idft = idft512;
break; break;
case 10: case 1024:
idft = idft1024; idft = idft1024;
break; break;
case 11: case 1536:
idft = idft1536;
break;
case 2048:
idft = idft2048; idft = idft2048;
break; break;
......
...@@ -61,7 +61,6 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -61,7 +61,6 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
{ {
int i,k; int i,k;
//unsigned short ds = frame_parms->log2_symbol_size - 7;
sync_corr_ue0 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti); sync_corr_ue0 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti);
sync_corr_ue1 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti); sync_corr_ue1 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti);
...@@ -184,13 +183,6 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -184,13 +183,6 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
LOG_E(PHY,"Unsupported N_RB_DL %d\n",frame_parms->N_RB_DL); LOG_E(PHY,"Unsupported N_RB_DL %d\n",frame_parms->N_RB_DL);
break; break;
} }
/*
frame_parms->twiddle_ifft, /// complex twiddle factors
frame_parms->rev, /// bit reversed permutation vector
frame_parms->log2_symbol_size,/// log2(FFT_SIZE)
(frame_parms->log2_symbol_size/2),
0); /// 0 - input is in complex Q1.15 format, 1 - input is in complex redundant Q1.15 format)
*/
for (i=0; i<frame_parms->ofdm_symbol_size; i++) for (i=0; i<frame_parms->ofdm_symbol_size; i++)
((int32_t*)primary_synch0_time)[i] = sync_tmp[i]; ((int32_t*)primary_synch0_time)[i] = sync_tmp[i];
......
...@@ -432,7 +432,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB, ...@@ -432,7 +432,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB,
in_fft_ptr_0 = &temp_in_fft_0[0]; in_fft_ptr_0 = &temp_in_fft_0[0];
in_fft_ptr_1 = &temp_in_fft_1[0]; in_fft_ptr_1 = &temp_in_fft_1[0];
for(j=0; j<(1<<(frame_parms->log2_symbol_size))/12; j++) { for(j=0; j<(frame_parms->ofdm_symbol_size)/12; j++) {
if (j>19) { if (j>19) {
((int16_t*)in_fft_ptr_0)[-40+(2*j)] = ((int16_t*)temp_out_ifft_0)[-80+(2*j)]*rx_power_correction; ((int16_t*)in_fft_ptr_0)[-40+(2*j)] = ((int16_t*)temp_out_ifft_0)[-80+(2*j)]*rx_power_correction;
((int16_t*)in_fft_ptr_0)[-40+(2*j)+1] = ((int16_t*)temp_out_ifft_0)[-80+(2*j+1)]*rx_power_correction; ((int16_t*)in_fft_ptr_0)[-40+(2*j)+1] = ((int16_t*)temp_out_ifft_0)[-80+(2*j+1)]*rx_power_correction;
......
...@@ -72,7 +72,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB, ...@@ -72,7 +72,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
else if ((p==1) && (l>0)) else if ((p==1) && (l>0))
nu = 0; nu = 0;
else { else {
msg("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l); printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
return(-1); return(-1);
} }
...@@ -94,9 +94,9 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB, ...@@ -94,9 +94,9 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
output[k] = qpsk[(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3]; output[k] = qpsk[(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
//output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3; //output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
#ifdef DEBUG_DL_CELL_SPEC #ifdef DEBUG_DL_CELL_SPEC
msg("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb); Ns,l,m,mprime_dword,mprime_qpsk_symb);
msg("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); printf("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
#endif #endif
mprime++; mprime++;
...@@ -151,7 +151,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -151,7 +151,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
else if ((p==1) && (l>0)) else if ((p==1) && (l>0))
nu = 0; nu = 0;
else { else {
msg("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l); printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l);
return(-1); return(-1);
} }
...@@ -177,9 +177,9 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -177,9 +177,9 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
output[k] = qpsk[(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3]; output[k] = qpsk[(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3];
//output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3; //output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3;
#ifdef DEBUG_DL_CELL_SPEC #ifdef DEBUG_DL_CELL_SPEC
msg("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n",
Ns,l,m,mprime_dword,mprime_qpsk_symb); Ns,l,m,mprime_dword,mprime_qpsk_symb);
msg("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); printf("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k);
#endif #endif
mprime++; mprime++;
......
...@@ -336,7 +336,9 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode) ...@@ -336,7 +336,9 @@ int initial_sync(PHY_VARS_UE *phy_vars_ue, runmode_t mode)
#else #else
#ifndef OAI_USRP #ifndef OAI_USRP
#ifndef OAI_BLADERF
phy_adjust_gain(phy_vars_ue,0); phy_adjust_gain(phy_vars_ue,0);
#endif
#endif #endif
#endif #endif
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
#endif #endif
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index); extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
#if defined(OAI_USRP) || defined(EXMIMO) #if defined(OAI_USRP) || defined(EXMIMO) || defined(OAI_BLADERF)
#include "common_lib.h" #include "common_lib.h"
extern openair0_config_t openair0_cfg[]; extern openair0_config_t openair0_cfg[];
#endif #endif
...@@ -67,11 +67,12 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t ...@@ -67,11 +67,12 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
if ((mode == normal_txrx) || (mode == no_L2_connect)) { if ((mode == normal_txrx) || (mode == no_L2_connect)) {
len += sprintf(&buffer[len], "[UE_PROC] UE %d, RNTI %x\n",phy_vars_ue->Mod_id, phy_vars_ue->lte_ue_pdcch_vars[0]->crnti); len += sprintf(&buffer[len], "[UE_PROC] UE %d, RNTI %x\n",phy_vars_ue->Mod_id, phy_vars_ue->lte_ue_pdcch_vars[0]->crnti);
len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE\n", len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE (NF %.1f dB)\n",
10*log10(phy_vars_ue->PHY_measurements.rsrp[0])-phy_vars_ue->rx_total_gain_dB, 10*log10(phy_vars_ue->PHY_measurements.rsrp[0])-phy_vars_ue->rx_total_gain_dB,
10*log10(phy_vars_ue->PHY_measurements.rssi)-phy_vars_ue->rx_total_gain_dB, 10*log10(phy_vars_ue->PHY_measurements.rssi)-phy_vars_ue->rx_total_gain_dB,
10*log10(phy_vars_ue->PHY_measurements.rsrq[0]), 10*log10(phy_vars_ue->PHY_measurements.rsrq[0]),
phy_vars_ue->PHY_measurements.n0_power_tot_dBm); phy_vars_ue->PHY_measurements.n0_power_tot_dBm,
(double)phy_vars_ue->PHY_measurements.n0_power_tot_dBm+132.24);
/* /*
len += sprintf(&buffer[len], len += sprintf(&buffer[len],
...@@ -96,10 +97,10 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t ...@@ -96,10 +97,10 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t
#ifdef EXMIMO #ifdef EXMIMO
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",phy_vars_ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]); len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",phy_vars_ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]);
#endif #endif
#ifdef OAI_USRP #if defined(OAI_USRP) || defined(OAI_BLADERF)
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",phy_vars_ue->rx_total_gain_dB); len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",phy_vars_ue->rx_total_gain_dB);
#endif #endif
#if defined(EXMIMO) || defined(OAI_USRP) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF)
len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz (%d), estimated carrier frequency %f Hz\n",phy_vars_ue->lte_ue_common_vars.freq_offset,openair_daq_vars.freq_offset,openair0_cfg[0].rx_freq[0]-phy_vars_ue->lte_ue_common_vars.freq_offset); len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz (%d), estimated carrier frequency %f Hz\n",phy_vars_ue->lte_ue_common_vars.freq_offset,openair_daq_vars.freq_offset,openair0_cfg[0].rx_freq[0]-phy_vars_ue->lte_ue_common_vars.freq_offset);
#endif #endif
len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[phy_vars_ue->UE_mode[0]],phy_vars_ue->UE_mode[0]); len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[phy_vars_ue->UE_mode[0]],phy_vars_ue->UE_mode[0]);
......
...@@ -34,12 +34,12 @@ ...@@ -34,12 +34,12 @@
*/ */
/** /**
\fn void PHY_ofdm_mod(int *input,int *output,unsigned char log2fftsize,unsigned char nb_symbols,unsigned short nb_prefix_samples,Extension_t etype) \fn void PHY_ofdm_mod(int *input,int *output,int fftsize,unsigned char nb_symbols,unsigned short nb_prefix_samples,Extension_t etype)
This function performs OFDM modulation with cyclic extension or zero-padding. This function performs OFDM modulation with cyclic extension or zero-padding.
@param input The sequence input samples in the frequency-domain. This is a concatenation of the input symbols in SIMD redundant format @param input The sequence input samples in the frequency-domain. This is a concatenation of the input symbols in SIMD redundant format
@param output The time-domain output signal @param output The time-domain output signal
@param log2fftsize Base-2 logarithm of the OFDM symbol size (\f$N_d\f$) @param fftsize size of OFDM symbol size (\f$N_d\f$)
@param nb_symbols The number of OFDM symbols in the block @param nb_symbols The number of OFDM symbols in the block
@param nb_prefix_samples The number of prefix/suffix/zero samples @param nb_prefix_samples The number of prefix/suffix/zero samples
@param etype Type of extension (CYCLIC_PREFIX,CYCLIC_SUFFIX,ZEROS) @param etype Type of extension (CYCLIC_PREFIX,CYCLIC_SUFFIX,ZEROS)
...@@ -47,7 +47,7 @@ This function performs OFDM modulation with cyclic extension or zero-padding. ...@@ -47,7 +47,7 @@ This function performs OFDM modulation with cyclic extension or zero-padding.
*/ */
void PHY_ofdm_mod(int *input, void PHY_ofdm_mod(int *input,
int *output, int *output,
unsigned char log2fftsize, int fftsize,
unsigned char nb_symbols, unsigned char nb_symbols,
unsigned short nb_prefix_samples, unsigned short nb_prefix_samples,
Extension_t etype Extension_t etype
......
...@@ -61,9 +61,9 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA ...@@ -61,9 +61,9 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
txdata+(i*(frame_parms->samples_per_tti>>1))); txdata+(i*(frame_parms->samples_per_tti>>1)));
#endif #endif
PHY_ofdm_mod(txdataF+(i*NUMBER_OF_OFDM_CARRIERS*frame_parms->symbols_per_tti>>1), // input PHY_ofdm_mod(txdataF+(i*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti>>1), // input
txdata+(i*frame_parms->samples_per_tti>>1), // output txdata+(i*frame_parms->samples_per_tti>>1), // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size,
1, // number of symbols 1, // number of symbols
frame_parms->nb_prefix_samples0, // number of prefix samples frame_parms->nb_prefix_samples0, // number of prefix samples
CYCLIC_PREFIX); CYCLIC_PREFIX);
...@@ -71,9 +71,9 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA ...@@ -71,9 +71,9 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
printf("slot i %d (txdata offset %d)\n",i,OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0+(i*frame_parms->samples_per_tti>>1)); printf("slot i %d (txdata offset %d)\n",i,OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0+(i*frame_parms->samples_per_tti>>1));
#endif #endif
PHY_ofdm_mod(txdataF+NUMBER_OF_OFDM_CARRIERS+(i*NUMBER_OF_OFDM_CARRIERS*(frame_parms->symbols_per_tti>>1)), // input PHY_ofdm_mod(txdataF+frame_parms->ofdm_symbol_size+(i*frame_parms->ofdm_symbol_size*(frame_parms->symbols_per_tti>>1)), // input
txdata+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0+(i*(frame_parms->samples_per_tti>>1)), // output txdata+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0+(i*(frame_parms->samples_per_tti>>1)), // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size,
(short_offset==1) ? 1 :(frame_parms->symbols_per_tti>>1)-1,//6, // number of symbols (short_offset==1) ? 1 :(frame_parms->symbols_per_tti>>1)-1,//6, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX); CYCLIC_PREFIX);
...@@ -84,7 +84,7 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA ...@@ -84,7 +84,7 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA
void PHY_ofdm_mod(int *input, /// pointer to complex input void PHY_ofdm_mod(int *input, /// pointer to complex input
int *output, /// pointer to complex output int *output, /// pointer to complex output
unsigned char log2fftsize, /// log2(FFT_SIZE) int fftsize, /// FFT_SIZE
unsigned char nb_symbols, /// number of OFDM symbols unsigned char nb_symbols, /// number of OFDM symbols
unsigned short nb_prefix_samples, /// cyclic prefix length unsigned short nb_prefix_samples, /// cyclic prefix length
Extension_t etype /// type of extension Extension_t etype /// type of extension
...@@ -100,24 +100,28 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input ...@@ -100,24 +100,28 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
int *temp_ptr=(int*)0; int *temp_ptr=(int*)0;
void (*idft)(int16_t *,int16_t *, int); void (*idft)(int16_t *,int16_t *, int);
switch (log2fftsize) { switch (fftsize) {
case 7: case 128:
idft = idft128; idft = idft128;
break; break;
case 8: case 256:
idft = idft256; idft = idft256;
break; break;
case 9: case 512:
idft = idft512; idft = idft512;
break; break;
case 10: case 1024:
idft = idft1024; idft = idft1024;
break; break;
case 11: case 1536:
idft = idft1536;
break;
case 2048:
idft = idft2048; idft = idft2048;
break; break;
...@@ -127,8 +131,8 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input ...@@ -127,8 +131,8 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
} }
#ifdef DEBUG_OFDM_MOD #ifdef DEBUG_OFDM_MOD
msg("[PHY] OFDM mod (size %d,prefix %d) Symbols %d, input %p, output %p\n", printf("[PHY] OFDM mod (size %d,prefix %d) Symbols %d, input %p, output %p\n",
1<<log2fftsize,nb_prefix_samples,nb_symbols,input,output); fftsize,nb_prefix_samples,nb_symbols,input,output);
#endif #endif
...@@ -136,35 +140,31 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input ...@@ -136,35 +140,31 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
for (i=0; i<nb_symbols; i++) { for (i=0; i<nb_symbols; i++) {
#ifdef DEBUG_OFDM_MOD #ifdef DEBUG_OFDM_MOD
msg("[PHY] symbol %d/%d (%p,%p -> %p)\n",i,nb_symbols,input,&input[i<<log2fftsize],&output[(i<<log2fftsize) + ((i)*nb_prefix_samples)]); printf("[PHY] symbol %d/%d offset %d (%p,%p -> %p)\n",i,nb_symbols,i*fftsize+(i*nb_prefix_samples),input,&input[i*fftsize],&output[(i*fftsize) + ((i)*nb_prefix_samples)]);
#endif #endif
idft((int16_t *)&input[i<<log2fftsize], idft((int16_t *)&input[i*fftsize],
(log2fftsize==7) ? (int16_t *)temp : (int16_t *)&output[(i<<log2fftsize) + ((1+i)*nb_prefix_samples)], (fftsize==128) ? (int16_t *)temp : (int16_t *)&output[(i*fftsize) + ((1+i)*nb_prefix_samples)],
1); 1);
// write_output("fft_out.m","fftout",temp,(1<<log2fftsize)*2,1,1);
//memset(temp,0,1<<log2fftsize);
// Copy to frame buffer with Cyclic Extension // Copy to frame buffer with Cyclic Extension
// Note: will have to adjust for synchronization offset! // Note: will have to adjust for synchronization offset!
switch (etype) { switch (etype) {
case CYCLIC_PREFIX: case CYCLIC_PREFIX:
output_ptr = &output[(i<<log2fftsize) + ((1+i)*nb_prefix_samples)]; output_ptr = &output[(i*fftsize) + ((1+i)*nb_prefix_samples)];
temp_ptr = (int *)temp; temp_ptr = (int *)temp;
// msg("Doing cyclic prefix method\n"); // msg("Doing cyclic prefix method\n");
if (log2fftsize==7) { if (fftsize==128) {
for (j=0; j<((1<<log2fftsize)) ; j++) { for (j=0; j<fftsize ; j++) {
output_ptr[j] = temp_ptr[j]; output_ptr[j] = temp_ptr[j];
} }
} }
j=(1<<log2fftsize); j=fftsize;
for (k=-1; k>=-nb_prefix_samples; k--) { for (k=-1; k>=-nb_prefix_samples; k--) {
output_ptr[k] = output_ptr[--j]; output_ptr[k] = output_ptr[--j];
...@@ -175,19 +175,19 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input ...@@ -175,19 +175,19 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
case CYCLIC_SUFFIX: case CYCLIC_SUFFIX:
output_ptr = &output[(i<<log2fftsize)+ (i*nb_prefix_samples)]; output_ptr = &output[(i*fftsize)+ (i*nb_prefix_samples)];
temp_ptr = (int *)temp; temp_ptr = (int *)temp;
// msg("Doing cyclic suffix method\n"); // msg("Doing cyclic suffix method\n");
for (j=0; j<(1<<log2fftsize) ; j++) { for (j=0; j<fftsize ; j++) {
output_ptr[j] = temp_ptr[2*j]; output_ptr[j] = temp_ptr[2*j];
} }
for (j=0; j<nb_prefix_samples; j++) for (j=0; j<nb_prefix_samples; j++)
output_ptr[(1<<log2fftsize)+j] = output_ptr[j]; output_ptr[fftsize+j] = output_ptr[j];
break; break;
...@@ -198,11 +198,11 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input ...@@ -198,11 +198,11 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
case NONE: case NONE:
// msg("NO EXTENSION!\n"); // msg("NO EXTENSION!\n");
output_ptr = &output[(i<<log2fftsize)]; output_ptr = &output[fftsize];
temp_ptr = (int *)temp; temp_ptr = (int *)temp;
for (j=0; j<(1<<log2fftsize) ; j++) { for (j=0; j<fftsize ; j++) {
output_ptr[j] = temp_ptr[2*j]; output_ptr[j] = temp_ptr[2*j];
...@@ -219,14 +219,7 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input ...@@ -219,14 +219,7 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input
} }
/*
printf("input %p, output %p, log2fftsize %d, nsymb %d\n",input,output,log2fftsize,nb_symbols);
for (i=0;i<16;i++)
printf("%d %d\n",((short *)input)[i<<1],((short *)input)[1+(i<<1)]);
printf("------\n");
for (i=0;i<16;i++)
printf("%d %d\n",((short *)output)[i<<1],((short *)output)[1+(i<<1)]);
*/
} }
...@@ -244,7 +237,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ...@@ -244,7 +237,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t
LOG_D(PHY,"Frame %d, subframe %d: Doing MBSFN modulation (slot_offset %d)\n",frame,next_slot>>1,slot_offset); LOG_D(PHY,"Frame %d, subframe %d: Doing MBSFN modulation (slot_offset %d)\n",frame,next_slot>>1,slot_offset);
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
&txdata[aa][slot_offset], // output &txdata[aa][slot_offset], // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size,
12, // number of symbols 12, // number of symbols
frame_parms->ofdm_symbol_size>>2, // number of prefix samples frame_parms->ofdm_symbol_size>>2, // number of prefix samples
CYCLIC_PREFIX); CYCLIC_PREFIX);
...@@ -252,7 +245,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ...@@ -252,7 +245,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t
if (frame_parms->Ncp == EXTENDED) if (frame_parms->Ncp == EXTENDED)
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
&txdata[aa][slot_offset], // output &txdata[aa][slot_offset], // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size,
2, // number of symbols 2, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX); CYCLIC_PREFIX);
...@@ -268,7 +261,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t ...@@ -268,7 +261,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t
if (frame_parms->Ncp == EXTENDED) if (frame_parms->Ncp == EXTENDED)
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
&txdata[aa][slot_offset], // output &txdata[aa][slot_offset], // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size,
6, // number of symbols 6, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX); CYCLIC_PREFIX);
......
...@@ -58,24 +58,28 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, ...@@ -58,24 +58,28 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
void (*dft)(int16_t *,int16_t *, int); void (*dft)(int16_t *,int16_t *, int);
int tmp_dft_in[256]; // This is for misalignment issues for 6 and 15 PRBs int tmp_dft_in[256]; // This is for misalignment issues for 6 and 15 PRBs
switch (frame_parms->log2_symbol_size) { switch (frame_parms->ofdm_symbol_size) {
case 7: case 128:
dft = dft128; dft = dft128;
break; break;
case 8: case 256:
dft = dft256; dft = dft256;
break; break;
case 9: case 512:
dft = dft512; dft = dft512;
break; break;
case 10: case 1024:
dft = dft1024; dft = dft1024;
break; break;
case 11: case 1536:
dft = dft1536;
break;
case 2048:
dft = dft2048; dft = dft2048;
break; break;
...@@ -96,12 +100,12 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, ...@@ -96,12 +100,12 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
if (l<0 || l>=7-frame_parms->Ncp) { if (l<0 || l>=7-frame_parms->Ncp) {
msg("slot_fep: l must be between 0 and %d\n",7-frame_parms->Ncp); printf("slot_fep: l must be between 0 and %d\n",7-frame_parms->Ncp);
return(-1); return(-1);
} }
if (Ns<0 || Ns>=20) { if (Ns<0 || Ns>=20) {
msg("slot_fep: Ns must be between 0 and 19\n"); printf("slot_fep: Ns must be between 0 and 19\n");
return(-1); return(-1);
} }
...@@ -116,7 +120,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, ...@@ -116,7 +120,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
// if (phy_vars_ue->frame <100) // if (phy_vars_ue->frame <100)
msg("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol, printf("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol,
nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset); nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset);
#endif #endif
...@@ -147,7 +151,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, ...@@ -147,7 +151,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
// if (phy_vars_ue->frame <100) // if (phy_vars_ue->frame <100)
msg("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol, printf("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol,
nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset); nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset);
#endif #endif
...@@ -182,7 +186,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, ...@@ -182,7 +186,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
for (aa=0; aa<frame_parms->nb_antennas_tx_eNB; aa++) { for (aa=0; aa<frame_parms->nb_antennas_tx_eNB; aa++) {
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
msg("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l); printf("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l);
#endif #endif
start_meas(&phy_vars_ue->dlsch_channel_estimation_stats); start_meas(&phy_vars_ue->dlsch_channel_estimation_stats);
lte_dl_channel_estimation(phy_vars_ue,eNB_id,0, lte_dl_channel_estimation(phy_vars_ue,eNB_id,0,
...@@ -205,7 +209,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, ...@@ -205,7 +209,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
// do frequency offset estimation here! // do frequency offset estimation here!
// use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1}) // use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1})
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
msg("Frequency offset estimation\n"); printf("Frequency offset estimation\n");
#endif #endif
if (l==(4-frame_parms->Ncp)) { if (l==(4-frame_parms->Ncp)) {
...@@ -222,7 +226,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, ...@@ -222,7 +226,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue,
} }
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
msg("slot_fep: done\n"); printf("slot_fep: done\n");
#endif #endif
return(0); return(0);
} }
...@@ -54,25 +54,29 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue, ...@@ -54,25 +54,29 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10; unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
void (*dft)(int16_t *,int16_t *, int); void (*dft)(int16_t *,int16_t *, int);
switch (frame_parms->log2_symbol_size) { switch (frame_parms->ofdm_symbol_size) {
case 7: case 128:
dft = dft128; dft = dft128;
break; break;
case 8: case 256:
dft = dft256; dft = dft256;
break; break;
case 9: case 512:
dft = dft512; dft = dft512;
break; break;
case 10: case 1024:
dft = dft1024; dft = dft1024;
break; break;
case 11: case 1536:
dft = dft1536;
break;
case 2048:
dft = dft2048; dft = dft2048;
break; break;
......
...@@ -50,24 +50,28 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -50,24 +50,28 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms,
void (*dft)(int16_t *,int16_t *, int); void (*dft)(int16_t *,int16_t *, int);
switch (frame_parms->log2_symbol_size) { switch (frame_parms->ofdm_symbol_size) {
case 7: case 128:
dft = dft128; dft = dft128;
break; break;
case 8: case 256:
dft = dft256; dft = dft256;
break; break;
case 9: case 512:
dft = dft512; dft = dft512;
break; break;
case 10: case 1024:
dft = dft1024; dft = dft1024;
break; break;
case 11: case 1536:
dft = dft1536;
break;
case 2048:
dft = dft2048; dft = dft2048;
break; break;
......
...@@ -45,8 +45,10 @@ ...@@ -45,8 +45,10 @@
#define debug_msg #define debug_msg
#define ONE_OVER_SQRT2_Q15 23170 #define ONE_OVER_SQRT2_Q15 23170
#endif #endif
#define ONE_OVER_SQRT3_Q15 18919
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
...@@ -3180,6 +3182,8 @@ void idft1536(int16_t *input, int16_t *output) ...@@ -3180,6 +3182,8 @@ void idft1536(int16_t *input, int16_t *output)
int i,i2,j; int i,i2,j;
uint32_t tmp[3][512 ]__attribute__((aligned(16))); uint32_t tmp[3][512 ]__attribute__((aligned(16)));
uint32_t tmpo[3][512] __attribute__((aligned(16))); uint32_t tmpo[3][512] __attribute__((aligned(16)));
simd_q15_t *y128p=(simd_q15_t*)output;
simd_q15_t ONE_OVER_SQRT3_Q15_128 = set1_int16(ONE_OVER_SQRT3_Q15);
for (i=0,j=0; i<512; i++) { for (i=0,j=0; i<512; i++) {
tmp[0][i] = ((uint32_t *)input)[j++]; tmp[0][i] = ((uint32_t *)input)[j++];
...@@ -3190,17 +3194,6 @@ void idft1536(int16_t *input, int16_t *output) ...@@ -3190,17 +3194,6 @@ void idft1536(int16_t *input, int16_t *output)
idft512((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),1); idft512((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),1);
idft512((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1); idft512((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1);
idft512((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1); idft512((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1);
/*
for (i=1; i<512; i++) {
tmpo[0][i] = tmpo[0][i<<1];
tmpo[1][i] = tmpo[1][i<<1];
tmpo[2][i] = tmpo[2][i<<1];
}*/
// write_output("in.m","in",input,6144,1,1);
// write_output("out0.m","o0",tmpo[0],2048,1,1);
// write_output("out1.m","o1",tmpo[1],2048,1,1);
// write_output("out2.m","o2",tmpo[2],2048,1,1);
for (i=0,i2=0; i<1024; i+=8,i2+=4) { for (i=0,i2=0; i<1024; i+=8,i2+=4) {
ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]), ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]),
...@@ -3209,6 +3202,26 @@ void idft1536(int16_t *input, int16_t *output) ...@@ -3209,6 +3202,26 @@ void idft1536(int16_t *input, int16_t *output)
} }
for (i=0; i<24; i++) {
y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128);
y128p[1] = mulhi_int16(y128p[1],ONE_OVER_SQRT3_Q15_128);
y128p[2] = mulhi_int16(y128p[2],ONE_OVER_SQRT3_Q15_128);
y128p[3] = mulhi_int16(y128p[3],ONE_OVER_SQRT3_Q15_128);
y128p[4] = mulhi_int16(y128p[4],ONE_OVER_SQRT3_Q15_128);
y128p[5] = mulhi_int16(y128p[5],ONE_OVER_SQRT3_Q15_128);
y128p[6] = mulhi_int16(y128p[6],ONE_OVER_SQRT3_Q15_128);
y128p[7] = mulhi_int16(y128p[7],ONE_OVER_SQRT3_Q15_128);
y128p[8] = mulhi_int16(y128p[8],ONE_OVER_SQRT3_Q15_128);
y128p[9] = mulhi_int16(y128p[9],ONE_OVER_SQRT3_Q15_128);
y128p[10] = mulhi_int16(y128p[10],ONE_OVER_SQRT3_Q15_128);
y128p[11] = mulhi_int16(y128p[11],ONE_OVER_SQRT3_Q15_128);
y128p[12] = mulhi_int16(y128p[12],ONE_OVER_SQRT3_Q15_128);
y128p[13] = mulhi_int16(y128p[13],ONE_OVER_SQRT3_Q15_128);
y128p[14] = mulhi_int16(y128p[14],ONE_OVER_SQRT3_Q15_128);
y128p[15] = mulhi_int16(y128p[15],ONE_OVER_SQRT3_Q15_128);
y128p+=16;
}
_mm_empty(); _mm_empty();
_m_empty(); _m_empty();
...@@ -197,7 +197,7 @@ int32_t signal_energy(int32_t *input,uint32_t length) ...@@ -197,7 +197,7 @@ int32_t signal_energy(int32_t *input,uint32_t length)
for (i=0; i<length>>1; i++) { for (i=0; i<length>>1; i++) {
tmpE = vqaddq_s32(tmpE,vshrq_n_s32(vmull_s16(*in,*in),shift)); tmpE = vqaddq_s32(tmpE,vshrq_n_s32(vmull_s16(*in,*in),shift));
tmpDC = vaddw_s16(tmpDC,vshr_n_s16(*in++,shift_DC)); //tmpDC = vaddw_s16(tmpDC,vshr_n_s16(*in++,shift_DC));
} }
......
...@@ -516,10 +516,10 @@ typedef struct { ...@@ -516,10 +516,10 @@ typedef struct {
uint8_t dual_tx; uint8_t dual_tx;
/// flag to indicate SISO transmission /// flag to indicate SISO transmission
uint8_t mode1_flag; uint8_t mode1_flag;
/// Indicator that 20 MHz channel uses 3/4 sampling frequency
uint8_t threequarter_fs;
/// Size of FFT /// Size of FFT
uint16_t ofdm_symbol_size; uint16_t ofdm_symbol_size;
/// log2(Size of FFT)
uint8_t log2_symbol_size;
/// Number of prefix samples in all but first symbol of slot /// Number of prefix samples in all but first symbol of slot
uint16_t nb_prefix_samples; uint16_t nb_prefix_samples;
/// Number of prefix samples in first symbol of slot /// Number of prefix samples in first symbol of slot
......
...@@ -117,7 +117,6 @@ ...@@ -117,7 +117,6 @@
*/ */
#define NUMBER_OF_OFDM_CARRIERS (frame_parms->ofdm_symbol_size) #define NUMBER_OF_OFDM_CARRIERS (frame_parms->ofdm_symbol_size)
#define NUMBER_OF_SYMBOLS_PER_FRAME (frame_parms->symbols_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME) #define NUMBER_OF_SYMBOLS_PER_FRAME (frame_parms->symbols_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME)
#define LOG2_NUMBER_OF_OFDM_CARRIERS (frame_parms->log2_symbol_size)
#define NUMBER_OF_USEFUL_CARRIERS (12*frame_parms->N_RB_DL) #define NUMBER_OF_USEFUL_CARRIERS (12*frame_parms->N_RB_DL)
#define NUMBER_OF_ZERO_CARRIERS (NUMBER_OF_OFDM_CARRIERS-NUMBER_OF_USEFUL_CARRIERS) #define NUMBER_OF_ZERO_CARRIERS (NUMBER_OF_OFDM_CARRIERS-NUMBER_OF_USEFUL_CARRIERS)
#define NUMBER_OF_USEFUL_CARRIERS_BYTES (NUMBER_OF_USEFUL_CARRIERS>>2) #define NUMBER_OF_USEFUL_CARRIERS_BYTES (NUMBER_OF_USEFUL_CARRIERS>>2)
......
...@@ -1262,7 +1262,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra ...@@ -1262,7 +1262,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra
#else #else
&phy_vars_ue->lte_ue_common_vars.txdata[aa][ulsch_start], &phy_vars_ue->lte_ue_common_vars.txdata[aa][ulsch_start],
#endif #endif
frame_parms->log2_symbol_size, frame_parms->ofdm_symbol_size,
nsymb, nsymb,
frame_parms->nb_prefix_samples, frame_parms->nb_prefix_samples,
CYCLIC_PREFIX); CYCLIC_PREFIX);
...@@ -1553,7 +1553,9 @@ void lte_ue_measurement_procedures(uint16_t l, PHY_VARS_UE *phy_vars_ue,uint8_t ...@@ -1553,7 +1553,9 @@ void lte_ue_measurement_procedures(uint16_t l, PHY_VARS_UE *phy_vars_ue,uint8_t
#else #else
#ifndef OAI_USRP #ifndef OAI_USRP
#ifndef OAI_BLADERF
phy_adjust_gain (phy_vars_ue,0); phy_adjust_gain (phy_vars_ue,0);
#endif
#endif #endif
#endif #endif
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT);
......
This diff is collapsed.
...@@ -47,8 +47,7 @@ ...@@ -47,8 +47,7 @@
#include "LAYER2/MAC/vars.h" #include "LAYER2/MAC/vars.h"
#ifdef XFORMS #ifdef XFORMS
#include <forms.h> #include "PHY/TOOLS/lte_phy_scope.h"
#include "../../USERSPACE_TOOLS/SCOPE/lte_scope.h"
#endif //XFORMS #endif //XFORMS
...@@ -176,13 +175,13 @@ int main(int argc, char **argv) ...@@ -176,13 +175,13 @@ int main(int argc, char **argv)
#ifdef XFORMS #ifdef XFORMS
FD_lte_scope *form_dl; FD_lte_phy_scope_ue *form_ue;
char title[255]; char title[255];
fl_initialize (&argc, argv, NULL, 0, 0); fl_initialize (&argc, argv, NULL, 0, 0);
form_dl = create_form_lte_scope(); form_ue = create_lte_phy_scope_ue();
sprintf (title, "LTE DL SCOPE UE"); sprintf (title, "LTE DL SCOPE UE");
fl_show_form (form_dl->lte_scope, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); fl_show_form (form_ue->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
#endif #endif
logInit(); logInit();
...@@ -457,7 +456,7 @@ int main(int argc, char **argv) ...@@ -457,7 +456,7 @@ int main(int argc, char **argv)
PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][0], // input, PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][0], // input,
txdata[0], // output txdata[0], // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size,
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX); CYCLIC_PREFIX);
......
This diff is collapsed.
...@@ -58,98 +58,6 @@ PHY_VARS_UE *PHY_vars_UE; ...@@ -58,98 +58,6 @@ PHY_VARS_UE *PHY_vars_UE;
#define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2) #define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2)
#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13 #define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL,
lte_frame_type_t frame_type,uint8_t osf,uint32_t perfect_ce)
{
unsigned int i;
LTE_DL_FRAME_PARMS *lte_frame_parms;
printf("Start lte_param_init (Nid_cell %d, extended_prefix %d, transmission_mode %d, N_tx %d, N_rx %d)\n",
Nid_cell, extended_prefix_flag,transmission_mode,N_tx,N_rx);
PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_eNB1 = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_eNB2 = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
//PHY_config = malloc(sizeof(PHY_CONFIG));
mac_xface = malloc(sizeof(MAC_xface));
randominit(0);
set_taus_seed(0);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx_eNB = N_tx;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
lte_frame_parms->phich_config_common.phich_resource = one; //half
lte_frame_parms->tdd_config = tdd_config;
lte_frame_parms->frame_type = frame_type;
// lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;
// lte_frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
init_frame_parms(lte_frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
memcpy(&PHY_vars_UE->lte_frame_parms,lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
phy_init_lte_top(lte_frame_parms);
phy_init_lte_ue(PHY_vars_UE,1,0);
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
memcpy((void*)&PHY_vars_eNB1->lte_frame_parms,(void*)&PHY_vars_eNB->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
PHY_vars_eNB1->lte_frame_parms.nushift=(Nid_cell+1)%6;
PHY_vars_eNB1->lte_frame_parms.Nid_cell=Nid_cell+1;
memcpy((void*)&PHY_vars_eNB2->lte_frame_parms,(void*)&PHY_vars_eNB->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS));
PHY_vars_eNB2->lte_frame_parms.nushift=(Nid_cell+2)%6;
PHY_vars_eNB2->lte_frame_parms.Nid_cell=Nid_cell+2;
phy_init_lte_eNB(PHY_vars_eNB1,0,0,0);
phy_init_lte_eNB(PHY_vars_eNB2,0,0,0);
phy_init_lte_top(lte_frame_parms);
PHY_vars_UE->PHY_measurements.n_adj_cells=2;
PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1;
PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2;
PHY_vars_UE->perfect_ce = perfect_ce;
for (i=0; i<3; i++)
lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i);
generate_pcfich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
generate_phich_reg_mapping(&PHY_vars_UE->lte_frame_parms);
printf("Done lte_param_init\n");
CCCH_alloc_pdu.type = 1;
CCCH_alloc_pdu.vrb_type = 0;
CCCH_alloc_pdu.rballoc = CCCH_RB_ALLOC;
CCCH_alloc_pdu.ndi = 1;
CCCH_alloc_pdu.mcs = 1;
CCCH_alloc_pdu.harq_pid = 0;
}
DCI_PDU DCI_pdu; DCI_PDU DCI_pdu;
DCI_PDU *get_dci(LTE_DL_FRAME_PARMS *lte_frame_parms,uint8_t log2L, uint8_t log2Lcommon, uint8_t format_selector, uint32_t rnti) DCI_PDU *get_dci(LTE_DL_FRAME_PARMS *lte_frame_parms,uint8_t log2L, uint8_t log2Lcommon, uint8_t format_selector, uint32_t rnti)
...@@ -798,9 +706,10 @@ int main(int argc, char **argv) ...@@ -798,9 +706,10 @@ int main(int argc, char **argv)
n_rx, n_rx,
transmission_mode, transmission_mode,
extended_prefix_flag, extended_prefix_flag,
frame_type,
Nid_cell, Nid_cell,
tdd_config, tdd_config,
N_RB_DL,frame_type, N_RB_DL,
osf, osf,
perfect_ce); perfect_ce);
...@@ -1084,7 +993,7 @@ int main(int argc, char **argv) ...@@ -1084,7 +993,7 @@ int main(int argc, char **argv)
if (PHY_vars_eNB->lte_frame_parms.Ncp == 1) if (PHY_vars_eNB->lte_frame_parms.Ncp == 1)
PHY_ofdm_mod(&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][subframe*nsymb*PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size], // input, PHY_ofdm_mod(&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][subframe*nsymb*PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size], // input,
&txdata[aa][subframe*PHY_vars_eNB->lte_frame_parms.samples_per_tti], // output &txdata[aa][subframe*PHY_vars_eNB->lte_frame_parms.samples_per_tti], // output
PHY_vars_eNB->lte_frame_parms.log2_symbol_size, // log2_fft_size PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size,
2*nsymb, // number of symbols 2*nsymb, // number of symbols
PHY_vars_eNB->lte_frame_parms.nb_prefix_samples, // number of prefix samples PHY_vars_eNB->lte_frame_parms.nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX); CYCLIC_PREFIX);
......
...@@ -56,58 +56,6 @@ PHY_VARS_UE *PHY_vars_UE; ...@@ -56,58 +56,6 @@ PHY_VARS_UE *PHY_vars_UE;
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t N_RB_DL,uint8_t osf)
{
LTE_DL_FRAME_PARMS *lte_frame_parms;
printf("Start lte_param_init\n");
PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
//PHY_config = malloc(sizeof(PHY_CONFIG));
mac_xface = malloc(sizeof(MAC_xface));
randominit(0);
set_taus_seed(0);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = 0;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
// lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;
// lte_frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
lte_frame_parms->tdd_config = 1;
lte_frame_parms->frame_type = 1;
init_frame_parms(lte_frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
phy_init_lte_top(lte_frame_parms);
phy_init_lte_ue(PHY_vars_UE,1,0);
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
printf("Done lte_param_init\n");
}
extern uint16_t prach_root_sequence_map0_3[838]; extern uint16_t prach_root_sequence_map0_3[838];
int main(int argc, char **argv) int main(int argc, char **argv)
...@@ -370,7 +318,16 @@ int main(int argc, char **argv) ...@@ -370,7 +318,16 @@ int main(int argc, char **argv)
if (transmission_mode==2) if (transmission_mode==2)
n_tx=2; n_tx=2;
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,Nid_cell,N_RB_DL,osf); lte_param_init(n_tx,
n_rx,
transmission_mode,
extended_prefix_flag,
FDD,
Nid_cell,
3,
N_RB_DL,
osf,
0);
if (snr1set==0) { if (snr1set==0) {
......
...@@ -58,60 +58,6 @@ PHY_VARS_UE *PHY_vars_UE; ...@@ -58,60 +58,6 @@ PHY_VARS_UE *PHY_vars_UE;
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t N_RB_DL,uint8_t osf)
{
LTE_DL_FRAME_PARMS *lte_frame_parms;
printf("Start lte_param_init\n");
PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
//PHY_config = malloc(sizeof(PHY_CONFIG));
mac_xface = malloc(sizeof(MAC_xface));
randominit(0);
set_taus_seed(0);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = 0;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
// lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;
// lte_frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
lte_frame_parms->tdd_config = 3;
lte_frame_parms->frame_type = 0;
init_frame_parms(lte_frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
// phy_init_top(lte_frame_parms); //allocation
PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
phy_init_lte_ue(PHY_vars_UE,1,0);
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
phy_init_lte_top(lte_frame_parms);
printf("Done lte_param_init\n");
}
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
...@@ -368,7 +314,16 @@ int main(int argc, char **argv) ...@@ -368,7 +314,16 @@ int main(int argc, char **argv)
if (transmission_mode==2) if (transmission_mode==2)
n_tx=2; n_tx=2;
lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,Nid_cell,N_RB_DL,osf); lte_param_init(n_tx,
n_rx,
transmission_mode,
extended_prefix_flag,
Nid_cell,
FDD,
3,
N_RB_DL,
osf,
0);
if (snr1set==0) { if (snr1set==0) {
...@@ -473,7 +428,7 @@ int main(int argc, char **argv) ...@@ -473,7 +428,7 @@ int main(int argc, char **argv)
if (frame_parms->Ncp == 1) if (frame_parms->Ncp == 1)
PHY_ofdm_mod(txdataF2[aa], // input PHY_ofdm_mod(txdataF2[aa], // input
txdata[aa], // output txdata[aa], // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size,
2*nsymb, // number of symbols 2*nsymb, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX); CYCLIC_PREFIX);
...@@ -496,7 +451,7 @@ int main(int argc, char **argv) ...@@ -496,7 +451,7 @@ int main(int argc, char **argv)
if (frame_parms->Ncp == 1) if (frame_parms->Ncp == 1)
PHY_ofdm_mod(&PHY_vars_UE->lte_ue_common_vars.txdataF[aa][2*subframe*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX], // input, PHY_ofdm_mod(&PHY_vars_UE->lte_ue_common_vars.txdataF[aa][2*subframe*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX], // input,
&txdata[aa][PHY_vars_eNB->lte_frame_parms.samples_per_tti*subframe], // output &txdata[aa][PHY_vars_eNB->lte_frame_parms.samples_per_tti*subframe], // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size,
nsymb, // number of symbols nsymb, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX); CYCLIC_PREFIX);
......
This diff is collapsed.
...@@ -1189,7 +1189,7 @@ int main(int argc, char **argv) ...@@ -1189,7 +1189,7 @@ int main(int argc, char **argv)
if (frame_parms->Ncp == 1) if (frame_parms->Ncp == 1)
PHY_ofdm_mod(txdataF2[aa], // input PHY_ofdm_mod(txdataF2[aa], // input
txdata[aa], // output txdata[aa], // output
PHY_vars_eNB->lte_frame_parms.log2_symbol_size, // log2_fft_size PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size, // log2_fft_size
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols
PHY_vars_eNB->lte_frame_parms.nb_prefix_samples, // number of prefix samples PHY_vars_eNB->lte_frame_parms.nb_prefix_samples, // number of prefix samples
PHY_vars_eNB->lte_frame_parms.twiddle_ifft, // IFFT twiddle factors PHY_vars_eNB->lte_frame_parms.twiddle_ifft, // IFFT twiddle factors
...@@ -1218,7 +1218,7 @@ int main(int argc, char **argv) ...@@ -1218,7 +1218,7 @@ int main(int argc, char **argv)
if (frame_parms->Ncp == 1) if (frame_parms->Ncp == 1)
PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa], // input, PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa], // input,
txdata[aa], // output txdata[aa], // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size, // log2_fft_size
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->nb_prefix_samples, // number of prefix samples
frame_parms->twiddle_ifft, // IFFT twiddle factors frame_parms->twiddle_ifft, // IFFT twiddle factors
...@@ -1240,7 +1240,7 @@ int main(int argc, char **argv) ...@@ -1240,7 +1240,7 @@ int main(int argc, char **argv)
if (frame_parms->Ncp == 1) if (frame_parms->Ncp == 1)
PHY_ofdm_mod(PHY_vars_eNB1->lte_eNB_common_vars.txdataF[eNb_id][aa], // input, PHY_ofdm_mod(PHY_vars_eNB1->lte_eNB_common_vars.txdataF[eNb_id][aa], // input,
PHY_vars_eNB1->lte_eNB_common_vars.txdata[eNb_id][aa], // output PHY_vars_eNB1->lte_eNB_common_vars.txdata[eNb_id][aa], // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size, // log2_fft_size
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->nb_prefix_samples, // number of prefix samples
frame_parms->twiddle_ifft, // IFFT twiddle factors frame_parms->twiddle_ifft, // IFFT twiddle factors
...@@ -1260,7 +1260,7 @@ int main(int argc, char **argv) ...@@ -1260,7 +1260,7 @@ int main(int argc, char **argv)
if (frame_parms->Ncp == 1) if (frame_parms->Ncp == 1)
PHY_ofdm_mod(PHY_vars_eNB2->lte_eNB_common_vars.txdataF[eNb_id][aa], // input, PHY_ofdm_mod(PHY_vars_eNB2->lte_eNB_common_vars.txdataF[eNb_id][aa], // input,
PHY_vars_eNB2->lte_eNB_common_vars.txdata[eNb_id][aa], // output PHY_vars_eNB2->lte_eNB_common_vars.txdata[eNb_id][aa], // output
frame_parms->log2_symbol_size, // log2_fft_size frame_parms->ofdm_symbol_size, // log2_fft_size
LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->nb_prefix_samples, // number of prefix samples
frame_parms->twiddle_ifft, // IFFT twiddle factors frame_parms->twiddle_ifft, // IFFT twiddle factors
......
...@@ -89,60 +89,6 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for tx */ ...@@ -89,60 +89,6 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for tx */
int n_tx_dropped = 0; /*!< \brief initial max process time for tx */ int n_tx_dropped = 0; /*!< \brief initial max process time for tx */
int n_rx_dropped = 0; /*!< \brief initial max process time for rx */ int n_rx_dropped = 0; /*!< \brief initial max process time for rx */
void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,uint8_t N_RB_DL,uint8_t frame_type,uint8_t tdd_config,uint8_t osf)
{
LTE_DL_FRAME_PARMS *lte_frame_parms;
printf("Start lte_param_init\n");
PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
PHY_vars_UE = malloc(sizeof(PHY_VARS_UE));
//PHY_config = malloc(sizeof(PHY_CONFIG));
mac_xface = malloc(sizeof(MAC_xface));
randominit(0);
set_taus_seed(0);
lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms);
lte_frame_parms->frame_type = frame_type;
lte_frame_parms->tdd_config = tdd_config;
lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz
lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Ncp_UL = extended_prefix_flag;
lte_frame_parms->Nid_cell = 10;
lte_frame_parms->nushift = 0;
lte_frame_parms->nb_antennas_tx = N_tx;
lte_frame_parms->nb_antennas_rx = N_rx;
// lte_frame_parms->Csrs = 2;
// lte_frame_parms->Bsrs = 0;
// lte_frame_parms->kTC = 0;
// lte_frame_parms->n_RRC = 0;
lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0;
lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 0;//n_DMRS1 set to 0
init_frame_parms(lte_frame_parms,osf);
//copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing));
PHY_vars_UE->lte_frame_parms = *lte_frame_parms;
phy_init_lte_top(lte_frame_parms);
phy_init_lte_ue(PHY_vars_UE,1,0);
phy_init_lte_eNB(PHY_vars_eNB,0,0,0);
printf("Done lte_param_init\n");
}
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
...@@ -520,7 +466,16 @@ int main(int argc, char **argv) ...@@ -520,7 +466,16 @@ int main(int argc, char **argv)
} }
} }
lte_param_init(1,n_rx,1,extended_prefix_flag,N_RB_DL,frame_type,tdd_config,osf); lte_param_init(1,
n_rx,
1,
extended_prefix_flag,
frame_type,
0,
tdd_config,
N_RB_DL,
osf,
0);
if (nb_rb_set == 0) if (nb_rb_set == 0)
nb_rb = PHY_vars_eNB->lte_frame_parms.N_RB_UL; nb_rb = PHY_vars_eNB->lte_frame_parms.N_RB_UL;
...@@ -1109,7 +1064,7 @@ int main(int argc, char **argv) ...@@ -1109,7 +1064,7 @@ int main(int argc, char **argv)
if (frame_parms->Ncp == 1) if (frame_parms->Ncp == 1)
PHY_ofdm_mod(&PHY_vars_UE->lte_ue_common_vars.txdataF[aa][subframe*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX], // input PHY_ofdm_mod(&PHY_vars_UE->lte_ue_common_vars.txdataF[aa][subframe*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX], // input
&txdata[aa][PHY_vars_eNB->lte_frame_parms.samples_per_tti*subframe], // output &txdata[aa][PHY_vars_eNB->lte_frame_parms.samples_per_tti*subframe], // output
PHY_vars_UE->lte_frame_parms.log2_symbol_size, // log2_fft_size PHY_vars_UE->lte_frame_parms.ofdm_symbol_size,
nsymb, // number of symbols nsymb, // number of symbols
PHY_vars_UE->lte_frame_parms.nb_prefix_samples, // number of prefix samples PHY_vars_UE->lte_frame_parms.nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX); CYCLIC_PREFIX);
......
...@@ -193,7 +193,7 @@ struct openair0_device_t { ...@@ -193,7 +193,7 @@ struct openair0_device_t {
func_type_t func_type; func_type_t func_type;
/* RF frontend parameters set by application */ /* RF frontend parameters set by application */
openair0_config_t openair0_cfg; openair0_config_t *openair0_cfg;
/* Can be used by driver to hold internal structure*/ /* Can be used by driver to hold internal structure*/
void *priv; void *priv;
......
...@@ -28,7 +28,7 @@ eNBs = ...@@ -28,7 +28,7 @@ eNBs =
tdd_config_s = 0; tdd_config_s = 0;
prefix_type = "NORMAL"; prefix_type = "NORMAL";
eutra_band = 7; eutra_band = 7;
downlink_frequency = 2660000000L; downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 100; N_RB_DL = 100;
...@@ -36,7 +36,7 @@ eNBs = ...@@ -36,7 +36,7 @@ eNBs =
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 90; tx_gain = 90;
rx_gain = 120; rx_gain = 127;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
......
...@@ -28,7 +28,7 @@ eNBs = ...@@ -28,7 +28,7 @@ eNBs =
tdd_config_s = 0; tdd_config_s = 0;
prefix_type = "NORMAL"; prefix_type = "NORMAL";
eutra_band = 7; eutra_band = 7;
downlink_frequency = 2660000000L; downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000; uplink_frequency_offset = -120000000;
Nid_cell = 0; Nid_cell = 0;
N_RB_DL = 50; N_RB_DL = 50;
...@@ -36,7 +36,7 @@ eNBs = ...@@ -36,7 +36,7 @@ eNBs =
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 90; tx_gain = 90;
rx_gain = 118; rx_gain = 125;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
...@@ -140,10 +140,10 @@ eNBs = ...@@ -140,10 +140,10 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
...@@ -35,7 +35,7 @@ eNBs = ...@@ -35,7 +35,7 @@ eNBs =
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 32; tx_gain = 32;
rx_gain = 120; rx_gain = 118;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
......
...@@ -36,7 +36,7 @@ eNBs = ...@@ -36,7 +36,7 @@ eNBs =
nb_antennas_tx = 1; nb_antennas_tx = 1;
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 90; tx_gain = 90;
rx_gain = 132; rx_gain = 125;
prach_root = 0; prach_root = 0;
prach_config_index = 0; prach_config_index = 0;
prach_high_speed = "DISABLE"; prach_high_speed = "DISABLE";
...@@ -143,10 +143,10 @@ eNBs = ...@@ -143,10 +143,10 @@ eNBs =
NETWORK_INTERFACES : NETWORK_INTERFACES :
{ {
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24"; ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0"; ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24"; ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152 ENB_PORT_FOR_S1U = 2152; # Spec 2152
}; };
......
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