Commit 51c20a59 authored by laurent's avatar laurent

merge with harmony

parents e1d57b53 4b022799
...@@ -8,6 +8,8 @@ job1: ...@@ -8,6 +8,8 @@ job1:
- echo $EXTERNAL_SHARE_DIR - echo $EXTERNAL_SHARE_DIR
- echo $SHELL - echo $SHELL
- echo $OAI_TEST_CASE_GROUP - echo $OAI_TEST_CASE_GROUP
- echo $MACHINELIST
- echo $MACHINELISTGENERIC
- git rev-parse --abbrev-ref HEAD - git rev-parse --abbrev-ref HEAD
- git_repo=`git config --get remote.origin.url` - git_repo=`git config --get remote.origin.url`
- git_head=`git rev-parse HEAD` - git_head=`git rev-parse HEAD`
...@@ -25,8 +27,8 @@ job1: ...@@ -25,8 +27,8 @@ job1:
- echo $NRUNS_LTE_SOFTMODEM - echo $NRUNS_LTE_SOFTMODEM
- echo $TIMEOUT_CMD - echo $TIMEOUT_CMD
- mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log - mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
- python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepo $git_repo -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 -c -5GRepo $git_repo -MachineList "$MACHINELIST" -MachineListGeneric "$MACHINELISTGENERIC" -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 -5GRepo $git_repo -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g "$OAI_TEST_CASE_GROUP" --nrun_lte_softmodem $NRUNS_LTE_SOFTMODEM --timeout_cmd $TIMEOUT_CMD >& $OPENAIR_DIR/cmake_targets/autotests/python_autotest.log - python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepo $git_repo -MachineList "$MACHINELIST" -MachineListGeneric "$MACHINELISTGENERIC" -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g "$OAI_TEST_CASE_GROUP" --nrun_lte_softmodem $NRUNS_LTE_SOFTMODEM --timeout_cmd $TIMEOUT_CMD >& $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.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 - 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 $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR
......
...@@ -126,6 +126,7 @@ endmacro(add_list_string_option) ...@@ -126,6 +126,7 @@ endmacro(add_list_string_option)
if (CMAKE_BUILD_TYPE STREQUAL "") if (CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "RelWithDebInfo") set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif() endif()
message("CMAKE_BUILD_TYPE is ${CMAKE_BUILD_TYPE}")
add_list_string_option(CMAKE_BUILD_TYPE "RelWithDebInfo" "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." Debug Release RelWithDebInfo MinSizeRel) add_list_string_option(CMAKE_BUILD_TYPE "RelWithDebInfo" "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." Debug Release RelWithDebInfo MinSizeRel)
Message("Architecture is ${CMAKE_SYSTEM_PROCESSOR}") Message("Architecture is ${CMAKE_SYSTEM_PROCESSOR}")
...@@ -922,7 +923,14 @@ add_library(SECU_CN ${SECU_CN_SRC}) ...@@ -922,7 +923,14 @@ add_library(SECU_CN ${SECU_CN_SRC})
# Scheduler # Scheduler
################################" ################################"
file(GLOB SCHED_SRC ${OPENAIR1_DIR}/SCHED/*.c) set(SCHED_SRC
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_eNb.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_ue.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
${OPENAIR1_DIR}/SCHED/phy_mac_stub.c
${OPENAIR1_DIR}/SCHED/pucch_pc.c
${OPENAIR1_DIR}/SCHED/pusch_pc.c
)
add_library(SCHED_LIB ${SCHED_SRC}) add_library(SCHED_LIB ${SCHED_SRC})
# Layer 1 # Layer 1
...@@ -952,6 +960,7 @@ set(PHY_SRC ...@@ -952,6 +960,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/group_hopping.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/srs_modulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/srs_modulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/drs_modulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/drs_modulation.c
...@@ -1624,10 +1633,9 @@ target_link_libraries (lte-softmodem -ldl ...@@ -1624,10 +1633,9 @@ target_link_libraries (lte-softmodem -ldl
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB} RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group ) -Wl,--end-group )
target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ) target_link_libraries (lte-softmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES}) target_link_libraries (lte-softmodem ${LIBBOOST_LIBRARIES} -lboost_system) #Added manually as it is not found for some reason for USRP
target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES}) target_link_libraries (lte-softmodem ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem ${T_LIB}) target_link_libraries (lte-softmodem ${T_LIB})
...@@ -1662,7 +1670,7 @@ target_link_libraries (lte-softmodem-nos1 ...@@ -1662,7 +1670,7 @@ target_link_libraries (lte-softmodem-nos1
target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIBXML2_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} ) target_link_libraries (lte-softmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${option_HW_lib} ${option_TP_lib} ${XFORMS_LIBRARIES} )
target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIBBOOST_LIBRARIES} -lboost_system) #Added manually as it is not found for some reason for USRP
target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES}) target_link_libraries (lte-softmodem-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-softmodem-nos1 ${T_LIB}) target_link_libraries (lte-softmodem-nos1 ${T_LIB})
...@@ -1685,7 +1693,7 @@ target_link_libraries(rrh_gw ...@@ -1685,7 +1693,7 @@ target_link_libraries(rrh_gw
UTIL LFDS UTIL LFDS
-Wl,--end-group ) -Wl,--end-group )
target_link_libraries (rrh_gw rt pthread m ) target_link_libraries (rrh_gw rt pthread m )
target_link_libraries (rrh_gw ${option_HW_lib} ${option_TP_lib} ${LIBBOOST_LIBRARIES} ) target_link_libraries (rrh_gw ${option_HW_lib} ${option_TP_lib} ${LIBBOOST_LIBRARIES} -lboost_system ) #Added manually as it is not found for some reason for USRP
target_link_libraries (rrh_gw ${LIB_LMS_LIBRARIES}) target_link_libraries (rrh_gw ${LIB_LMS_LIBRARIES})
target_link_libraries (rrh_gw ${T_LIB}) target_link_libraries (rrh_gw ${T_LIB})
......
...@@ -16,17 +16,22 @@ Obj.# Case# Test# Description ...@@ -16,17 +16,22 @@ Obj.# Case# Test# Description
01 01 20 Build lte-softmodem.USRP.Rel10 01 01 20 Build lte-softmodem.USRP.Rel10
01 01 21 Build lte-softmodem.EXMIMO.Rel10 01 01 21 Build lte-softmodem.EXMIMO.Rel10
01 01 22 Build lte-softmodem.BLADERF.Rel10 01 01 22 Build lte-softmodem.BLADERF.Rel10
01 01 23 Build lte-softmodem.ETHERNET.Rel10 01 01 23 Build lte-softmodem.ETHERNET.Rel10 (RCC)
01 01 24 Build lte-softmodem.LMSSDR.Rel10 01 01 24 Build lte-softmodem.LMSSDR.Rel10
01 01 30 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.Rel10 01 01 30 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.Rel10
secu_knas_encrypt_eia1.Rel10 secu_kenb.Rel10 aes128_ctr_encrypt.Rel10 aes128_ctr_decrypt.Rel10 secu_knas_encrypt_eea2.Rel10 secu_knas_encrypt_eia1.Rel10 secu_kenb.Rel10 aes128_ctr_encrypt.Rel10 aes128_ctr_decrypt.Rel10 secu_knas_encrypt_eea2.Rel10
secu_knas.Rel10 secu_knas_encrypt_eea1.Rel10 kdf.Rel10 aes128_cmac_encrypt.Rel10 secu_knas_encrypt_eia2.Rel10) secu_knas.Rel10 secu_knas_encrypt_eea1.Rel10 kdf.Rel10 aes128_cmac_encrypt.Rel10 secu_knas_encrypt_eia2.Rel10)
01 01 40 Build RRH Gateway for USRP (Rel 10) 01 01 40 Build RRH Gateway (time domain) for USRP (Rel 10)
01 01 41 Build RRH Gateway for EXMIMO (Rel 10) 01 01 41 Build RRH Gateway (time domain) for EXMIMO (Rel 10)
01 01 42 Build RRH Gateway for BLADERF (Rel 10) 01 01 42 Build RRH Gateway (time domain) for BLADERF (Rel 10)
01 01 43 Build RRH Gateway for LMSSDR (Rel 10) 01 01 43 Build RRH Gateway (time domain) for LMSSDR (Rel 10)
01 01 50 Build RRU (NGFI) for USRP (Rel 10) w/ ETHERNET transport
01 01 51 Build RRU (NGFI) for EXMIMO (Rel 10) w/ ETHERNET transport
01 01 52 Build RRU (NGFI) for BLADERF (Rel 10) w/ ETHERNET transport
01 01 53 Build RRU (NGFI) for LMSSDR (Rel 10) w/ ETHERNET transport
01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation 01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation
......
...@@ -313,7 +313,7 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd ...@@ -313,7 +313,7 @@ def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logd
# \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box # \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box
# \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml) # \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml)
def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop, logdir, logdirOAI5GRepo): def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop, logdir, logdirOAI5GRepo):
cmd = 'killall -9 -q -r ' + programList cmd = 'sudo -E killall -9 -q -r ' + programList
result = oai.send(cmd, True) result = oai.send(cmd, True)
print "Killing old programs..." + result print "Killing old programs..." + result
programArray = programList.split() programArray = programList.split()
...@@ -1020,6 +1020,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , ...@@ -1020,6 +1020,13 @@ def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo ,
run_result=0 run_result=0
run_result_string = ' RUN_'+str(run) + ' = FAIL(Thread_Busy)' run_result_string = ' RUN_'+str(run) + ' = FAIL(Thread_Busy)'
#If there is Segmentation fault, we mark the test case as failure as most likely eNB crashed
cmd = "grep -ilr \"segmentation fault\" " + logdir_local_testcase + " | cat "
cmd_out = subprocess.check_output ([cmd], shell=True)
if len(cmd_out) !=0:
run_result=0
run_result_string = ' RUN_'+str(run) + ' = FAIL(SEGFAULT)'
run_result_string = run_result_string + tput_run_string run_result_string = run_result_string + tput_run_string
test_result=test_result & run_result test_result=test_result & run_result
...@@ -1261,7 +1268,8 @@ except KeyError: ...@@ -1261,7 +1268,8 @@ except KeyError:
sys.exit(1) sys.exit(1)
print "Killing zombie ssh sessions from earlier sessions..." print "Killing zombie ssh sessions from earlier sessions..."
cmd='ps aux |grep \"/usr/bin/ssh -q -l guptar\"|tr -s \" \" :|cut -f 2 -d :|xargs kill -9 ' cmd='ps aux |grep \"/usr/bin/ssh -q -l guptar\"| awk \'{print $2}\' | sudo xargs kill -9 '
os.system(cmd) os.system(cmd)
if flag_start_testcase == False: if flag_start_testcase == False:
...@@ -1426,13 +1434,25 @@ for oai in oai_list: ...@@ -1426,13 +1434,25 @@ for oai in oai_list:
setuplogfile = logdir + '/setup_log_' + MachineList[index] + '_.txt' setuplogfile = logdir + '/setup_log_' + MachineList[index] + '_.txt'
setup_script = locallogdir + '/setup_script_' + MachineList[index] + '_.txt' setup_script = locallogdir + '/setup_script_' + MachineList[index] + '_.txt'
#Sometimes git fails so the script below retries in that case
localfile = os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/tools/git-retry.sh')
remotefile = logdir + '/git-retry.sh'
paramList=[]
port=22
paramList.append ( {"operation":'put', "localfile":localfile, "remotefile":remotefile} )
sftp_log = os.path.expandvars(locallogdir + '/sftp_module.log')
sftp_module (user, pw, MachineList[index], port, paramList, sftp_log)
cmd = ' ( \n' cmd = ' ( \n'
#cmd = cmd + 'rm -fR ' + logdir + '\n' #cmd = cmd + 'rm -fR ' + logdir + '\n'
#cmd = cmd + 'mkdir -p ' + logdir + '\n' #cmd = cmd + 'mkdir -p ' + logdir + '\n'
cmd = cmd + 'cd '+ logdir + '\n' cmd = cmd + 'cd '+ logdir + '\n'
cmd = cmd + 'git config --global http.sslVerify false \n' cmd = cmd + 'sudo apt-get install -y git \n'
cmd = cmd + 'git clone '+ GitOAI5GRepo +' \n' cmd = cmd + 'chmod 700 ' + logdir + '/git-retry.sh \n'
cmd = cmd + 'git clone '+ GitOpenaircnRepo + ' \n' cmd = cmd + logdir + '/git-retry.sh clone '+ GitOAI5GRepo +' \n'
cmd = cmd + logdir + '/git-retry.sh clone '+ GitOpenaircnRepo + ' \n'
cmd = cmd + 'cd ' + logdirOAI5GRepo + '\n' cmd = cmd + 'cd ' + logdirOAI5GRepo + '\n'
cmd = cmd + 'git checkout ' + GitOAI5GRepoBranch + '\n' cmd = cmd + 'git checkout ' + GitOAI5GRepoBranch + '\n'
#cmd = cmd + 'git checkout ' + GitOAI5GHeadVersion + '\n' #cmd = cmd + 'git checkout ' + GitOAI5GHeadVersion + '\n'
......
This diff is collapsed.
#!/bin/bash
#Simple script to retry git clone in case of failure
REALGIT=/usr/bin/git
RETRIES=10
DELAY=10
COUNT=1
while [ $COUNT -lt $RETRIES ]; do
$REALGIT $* >> git-clone-`hostname`-log.txt 2>&1
if [ $? -eq 0 ]; then
RETRIES=0
break
fi
let COUNT=$COUNT+1
sleep $DELAY
done
#!/bin/bash #!/bin/bash
#$1 programs to be killed and checked #$1 programs to be killed and checked
var=`ps -A |grep -E -i $1` echo "removing old programs..."
echo "args = $1"
echo "script name = $0"
filename=$(basename "$0")
echo "filename = $filename"
echo "programs to be killed...$1"
echo "bash PID = $$"
pid="$$"
echo "pid = $pid"
echo "Killing programs now..."
ps -aux |grep -E -i -w "$1"
var=`ps -aux |grep -E -i -w "$1" |awk '{print $2}'| tr '\n' ' ' | sed "s/$pid/ /"`
echo "Killing processes...$var"
#var=`ps -aux |grep -E -i '$1' |awk '{print $2}'| tr '\n' ' ' | sed "s/$pid/ /"`
#echo $var
if [ -n "$var" ] ; then sudo kill -9 $var ; fi
#| sudo xargs kill -9
echo "checking for old programs..."
var=`ps -aux |grep -E -i -w '$1' |grep -Ev 'grep' | grep -Ev '$filename'`
echo $var echo $var
if [ -n "$var" ]; then echo 'Match found'; else echo 'Match not found' ;fi if [ -n "$var" ]; then echo 'Match found'; else echo 'Match not found' ;fi
#!/bin/bash
#arg0 -> Name of executable
#args[1...N] -> arguments to be passed to executable
if [ -z "$OPENAIR_DIR" ]
then
echo "OPENAIR_DIR environment not set. Exiting.."
exit
fi
source $OPENAIR_DIR/cmake_targets/tools/build_helper
args=($*)
exec_name=${args[0]}
exe_args=(${args[@]:1})
gdb_file=$OPENAIR_DIR/targets/bin/gdb_file
gdb_log=$OPENAIR_DIR/targets/bin/gdb_log.bt
echo "args = ${args[@]}"
echo "exec_name = $exec_name"
echo "exe_args = ${exe_args[@]}"
echo "gdb log file = $gdb_log"
$SUDO rm -fr $gdb_file $gdb_log
$SUDO touch $gdb_file $gdb_log
$SUDO chmod 777 $gdb_file $gdb_log
$SUDO echo "file $exec_name" >> $gdb_file
$SUDO echo "set args ${exe_args[@]}" >> $gdb_file
$SUDO echo "run" >> $gdb_file
$SUDO echo "set logging overwrite on" >> $gdb_file
$SUDO echo "set logging file $gdb_log" >> $gdb_file
$SUDO echo "set logging on" >> $gdb_file
$SUDO echo "set pagination off" >> $gdb_file
$SUDO echo "handle SIG33 pass nostop noprint" >> $gdb_file
$SUDO echo "echo backtrace:\n" >> $gdb_file
$SUDO echo "backtrace full" >> $gdb_file
$SUDO echo "echo \n\nVariables:\n" >> $gdb_file
$SUDO echo "info variables" >> $gdb_file
$SUDO echo "echo \n\nlocals:\n" >> $gdb_file
$SUDO echo "info locals" >> $gdb_file
$SUDO echo "echo \n\nregisters:\n" >> $gdb_file
$SUDO echo "info registers" >> $gdb_file
$SUDO echo "echo \n\ncurrent instructions:\n" >> $gdb_file
$SUDO echo "x/16i \$pc" >> $gdb_file
$SUDO echo "echo \n\nthreads backtrace:\n" >> $gdb_file
$SUDO echo "thread apply all backtrace" >> $gdb_file
$SUDO echo "set logging off" >> $gdb_file
$SUDO echo "quit" >> $gdb_file
echo "Contents of gdb_file...start"
$SUDO cat $gdb_file
echo "Contents of gdb_file...finish"
$SUDO gdb -n -x $gdb_file 2>&1
...@@ -61,6 +61,7 @@ TEST_CASE_GROUP="" ...@@ -61,6 +61,7 @@ TEST_CASE_GROUP=""
BUILD_DOXYGEN=0 BUILD_DOXYGEN=0
T_TRACER="False" T_TRACER="False"
DISABLE_HARDWARE_DEPENDENCY="False" DISABLE_HARDWARE_DEPENDENCY="False"
CMAKE_BUILD_TYPE=""
trap handle_ctrl_c INT trap handle_ctrl_c INT
function print_help() { function print_help() {
...@@ -82,7 +83,7 @@ Options ...@@ -82,7 +83,7 @@ Options
--install-optional-packages --install-optional-packages
Install useful but not mandatory packages such as valgrind Install useful but not mandatory packages such as valgrind
-g | --run-with-gdb -g | --run-with-gdb
Add debugging symbols to compilation directives Add debugging symbols to compilation directives. It also disables any compiler optimization.
-h | --help -h | --help
Print this help Print this help
--eNB --eNB
...@@ -170,7 +171,8 @@ function main() { ...@@ -170,7 +171,8 @@ function main() {
shift;; shift;;
-g | --run-with-gdb) -g | --run-with-gdb)
GDB=1 GDB=1
echo_info "Will Compile with gdb symbols" CMAKE_BUILD_TYPE="Debug"
echo_info "Will Compile with gdb symbols and disable compiler optimization"
shift;; shift;;
--eNB) --eNB)
eNB=1 eNB=1
...@@ -443,6 +445,7 @@ function main() { ...@@ -443,6 +445,7 @@ function main() {
if [ "$NOS1" = "1" ] ; then if [ "$NOS1" = "1" ] ; then
cat $DIR/$lte_build_dir/CMakeLists.template >> $cmake_file cat $DIR/$lte_build_dir/CMakeLists.template >> $cmake_file
fi fi
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
...@@ -568,6 +571,8 @@ function main() { ...@@ -568,6 +571,8 @@ function main() {
cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin
fi fi
# oaisim compilation
###############
if [ "$oaisim" = "1" ] ; then if [ "$oaisim" = "1" ] ; then
dconf=$OPENAIR_DIR/targets/bin dconf=$OPENAIR_DIR/targets/bin
if [ "$NOS1" = "1" ] ; then if [ "$NOS1" = "1" ] ; then
...@@ -581,6 +586,7 @@ function main() { ...@@ -581,6 +586,7 @@ function main() {
echo_info "Compiling $oaisim_exec ($oaisim_build_dir)" echo_info "Compiling $oaisim_exec ($oaisim_build_dir)"
cmake_file=$DIR/$oaisim_build_dir/CMakeLists.txt cmake_file=$DIR/$oaisim_build_dir/CMakeLists.txt
cp $DIR/$oaisim_build_dir/CMakeLists.template $cmake_file cp $DIR/$oaisim_build_dir/CMakeLists.template $cmake_file
echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
echo "set ( XFORMS $XFORMS )" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
...@@ -649,9 +655,10 @@ function main() { ...@@ -649,9 +655,10 @@ function main() {
cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt
cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file
echo "set(XFORMS $XFORMS )" >> $cmake_file echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set(RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file echo "set ( XFORMS $XFORMS )" >> $cmake_file
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file echo "set ( T_TRACER $T_TRACER )" >> $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/oaisim_mme_build_oai/build #[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_mme_build_oai/build
...@@ -676,13 +683,14 @@ function main() { ...@@ -676,13 +683,14 @@ function main() {
mkdir -p $DIR/$rrh_build_dir/build mkdir -p $DIR/$rrh_build_dir/build
cmake_file=$DIR/$rrh_build_dir/CMakeLists.txt cmake_file=$DIR/$rrh_build_dir/CMakeLists.txt
echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file echo "cmake_minimum_required(VERSION 2.8)" > $cmake_file
echo "set(ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
echo "set(ENABLE_ITTI False )" >> $cmake_file echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
echo "set(RF_BOARD \"${HW}\")" >> $cmake_file echo "set ( ENABLE_ITTI False )" >> $cmake_file
echo "set(TRANSP_PRO \"${TP}\")" >> $cmake_file echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file
echo 'set(PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
echo "set (DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >>$cmake_file echo 'set ( PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file
echo "set (CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file echo "set ( DEADLINE_SCHEDULER \"${DEADLINE_SCHEDULER_FLAG_USER}\" )" >>$cmake_file
echo "set ( CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo "set ( T_TRACER $T_TRACER )" >> $cmake_file echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$rrh_build_dir/build cd $DIR/$rrh_build_dir/build
......
...@@ -318,7 +318,6 @@ check_install_oai_software() { ...@@ -318,7 +318,6 @@ check_install_oai_software() {
libxml2 \ libxml2 \
libxml2-dev \ libxml2-dev \
libxslt1-dev \ libxslt1-dev \
linux-headers-`uname -r` \
mscgen \ mscgen \
octave \ octave \
octave-signal \ octave-signal \
...@@ -334,6 +333,7 @@ check_install_oai_software() { ...@@ -334,6 +333,7 @@ check_install_oai_software() {
$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
$SUDO apt-get install libgnutls-dev nettle-dev nettle-bin $SUDO apt-get install libgnutls-dev nettle-dev nettle-bin
install_asn1c_from_source install_asn1c_from_source
} }
...@@ -341,13 +341,9 @@ install_asn1c_from_source(){ ...@@ -341,13 +341,9 @@ install_asn1c_from_source(){
asn1_install_log=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt asn1_install_log=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log " echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log "
( (
$SUDO rm -rf /tmp/asn1c-r1516 $SUDO rm -rf /tmp/asn1c
svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516 git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
cd /tmp/asn1c-r1516 cd /tmp/asn1c
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0
patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_3.p0
./configure ./configure
make -j`nproc` make -j`nproc`
$SUDO make install $SUDO make install
......
...@@ -252,7 +252,7 @@ function main() ...@@ -252,7 +252,7 @@ function main()
# Check table 200 lte in /etc/iproute2/rt_tables # Check table 200 lte in /etc/iproute2/rt_tables
fgrep lte /etc/iproute2/rt_tables > /dev/null fgrep lte /etc/iproute2/rt_tables > /dev/null
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
bash -c echo "200 lte " >> /etc/iproute2/rt_tables echo "200 lte " >> /etc/iproute2/rt_tables
fi fi
ip rule add fwmark 1 table lte ip rule add fwmark 1 table lte
ifconfig oip1 up ifconfig oip1 up
......
...@@ -9,4 +9,5 @@ tracer/record ...@@ -9,4 +9,5 @@ tracer/record
tracer/replay tracer/replay
tracer/textlog tracer/textlog
tracer/vcd tracer/vcd
tracer/macpdu2wireshark
tracee/tracee tracee/tracee
...@@ -5,7 +5,7 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I. ...@@ -5,7 +5,7 @@ CFLAGS=-Wall -g -pthread -DT_TRACER -I.
LIBS=-lX11 -lm -lpng -lXft LIBS=-lX11 -lm -lpng -lXft
all: record replay extract_config textlog enb vcd all: record replay extract_config textlog enb vcd macpdu2wireshark
record: utils.o record.o database.o config.o record: utils.o record.o database.o config.o
$(CC) $(CFLAGS) -o record $^ $(LIBS) $(CC) $(CFLAGS) -o record $^ $(LIBS)
...@@ -31,6 +31,10 @@ vcd: utils.o vcd.o database.o event.o handler.o config.o \ ...@@ -31,6 +31,10 @@ vcd: utils.o vcd.o database.o event.o handler.o config.o \
filter/filter.a filter/filter.a
$(CC) $(CFLAGS) -o vcd $^ $(LIBS) $(CC) $(CFLAGS) -o vcd $^ $(LIBS)
macpdu2wireshark: macpdu2wireshark.o database.o utils.o handler.o event.o \
config.o
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
.PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a .PHONY: all gui/gui.a view/view.a logger/logger.a filter/filter.a
gui/gui.a: gui/gui.a:
...@@ -50,7 +54,7 @@ filter/filter.a: ...@@ -50,7 +54,7 @@ filter/filter.a:
clean: clean:
rm -f *.o core tracer_remote textlog enb vcd record replay rm -f *.o core tracer_remote textlog enb vcd record replay
rm -f extract_config rm -f extract_config macpdu2wireshark
cd gui && make clean cd gui && make clean
cd view && make clean cd view && make clean
cd logger && make clean cd logger && make clean
......
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "database.h"
#include "event.h"
#include "handler.h"
#include "config.h"
#include "utils.h"
#include "packet-mac-lte.h"
#define DEFAULT_IP "127.0.0.1"
#define DEFAULT_PORT 9999
typedef struct {
int socket;
struct sockaddr_in to;
OBUF buf;
/* ul */
int ul_rnti;
int ul_frame;
int ul_subframe;
int ul_data;
/* dl */
int dl_rnti;
int dl_frame;
int dl_subframe;
int dl_data;
} ev_data;
void ul(void *_d, event e)
{
ev_data *d = _d;
ssize_t ret;
int fsf;
int i;
d->buf.osize = 0;
PUTS(&d->buf, MAC_LTE_START_STRING);
PUTC(&d->buf, FDD_RADIO);
PUTC(&d->buf, DIRECTION_UPLINK);
PUTC(&d->buf, C_RNTI);
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
PUTC(&d->buf, (e.e[d->ul_rnti].i>>8) & 255);
PUTC(&d->buf, e.e[d->ul_rnti].i & 255);
/* for newer version of wireshark? */
fsf = (e.e[d->ul_frame].i << 4) + e.e[d->ul_subframe].i;
/* for older version? */
fsf = e.e[d->ul_subframe].i;
PUTC(&d->buf, MAC_LTE_FRAME_SUBFRAME_TAG);
PUTC(&d->buf, (fsf>>8) & 255);
PUTC(&d->buf, fsf & 255);
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
for (i = 0; i < e.e[d->ul_data].bsize; i++)
PUTC(&d->buf, ((char*)e.e[d->ul_data].b)[i]);
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
if (ret != d->buf.osize) abort();
}
void dl(void *_d, event e)
{
ev_data *d = _d;
ssize_t ret;
int fsf;
int i;
d->buf.osize = 0;
PUTS(&d->buf, MAC_LTE_START_STRING);
PUTC(&d->buf, FDD_RADIO);
PUTC(&d->buf, DIRECTION_DOWNLINK);
PUTC(&d->buf, C_RNTI);
PUTC(&d->buf, MAC_LTE_RNTI_TAG);
PUTC(&d->buf, (e.e[d->dl_rnti].i>>8) & 255);
PUTC(&d->buf, e.e[d->dl_rnti].i & 255);
/* for newer version of wireshark? */
fsf = (e.e[d->dl_frame].i << 4) + e.e[d->dl_subframe].i;
/* for older version? */
fsf = e.e[d->dl_subframe].i;
PUTC(&d->buf, MAC_LTE_FRAME_SUBFRAME_TAG);
PUTC(&d->buf, (fsf>>8) & 255);
PUTC(&d->buf, fsf & 255);
PUTC(&d->buf, MAC_LTE_PAYLOAD_TAG);
for (i = 0; i < e.e[d->dl_data].bsize; i++)
PUTC(&d->buf, ((char*)e.e[d->dl_data].b)[i]);
ret = sendto(d->socket, d->buf.obuf, d->buf.osize, 0,
(struct sockaddr *)&d->to, sizeof(struct sockaddr_in));
if (ret != d->buf.osize) abort();
}
void setup_data(ev_data *d, void *database, int ul_id, int dl_id)
{
database_event_format f;
int i;
d->ul_rnti = -1;
d->ul_frame = -1;
d->ul_subframe = -1;
d->ul_data = -1;
d->dl_rnti = -1;
d->dl_frame = -1;
d->dl_subframe = -1;
d->dl_data = -1;
#define G(var_name, var_type, var) \
if (!strcmp(f.name[i], var_name)) { \
if (strcmp(f.type[i], var_type)) goto error; \
var = i; \
continue; \
}
/* ul: rnti, frame, subframe, data */
f = get_format(database, ul_id);
for (i = 0; i < f.count; i++) {
G("rnti", "int", d->ul_rnti);
G("frame", "int", d->ul_frame);
G("subframe", "int", d->ul_subframe);
G("data", "buffer", d->ul_data);
}
if (d->ul_rnti == -1 || d->ul_frame == -1 || d->ul_subframe == -1 ||
d->ul_data == -1) goto error;
/* dl: rnti, frame, subframe, data */
f = get_format(database, dl_id);
for (i = 0; i < f.count; i++) {
G("rnti", "int", d->dl_rnti);
G("frame", "int", d->dl_frame);
G("subframe", "int", d->dl_subframe);
G("data", "buffer", d->dl_data);
}
if (d->dl_rnti == -1 || d->dl_frame == -1 || d->dl_subframe == -1 ||
d->dl_data == -1) goto error;
#undef G
return;
error:
printf("bad T_messages.txt\n");
abort();
}
void *receiver(void *_d)
{
ev_data *d = _d;
int s;
char buf[100000];
s = socket(AF_INET, SOCK_DGRAM, 0);
if (s == -1) { perror("socket"); abort(); }
if (bind(s, (struct sockaddr *)&d->to, sizeof(struct sockaddr_in)) == -1)
{ perror("bind"); abort(); }
while (1) {
if (recv(s, buf, 100000, 0) <= 0) abort();
}
return 0;
}
void usage(void)
{
printf(
"options:\n"
" -d <database file> this option is mandatory\n"
" -in <dump file> read events from this dump file\n"
" -ip <IP address> send packets to this IP address (default %s)\n"
" -p <port> send packets to this port (default %d)\n",
DEFAULT_IP,
DEFAULT_PORT
);
exit(1);
}
int main(int n, char **v)
{
char *database_filename = NULL;
char *input_filename = NULL;
void *database;
event_handler *h;
int in;
int i;
int ul_id, dl_id;
ev_data d;
char *ip = DEFAULT_IP;
int port = DEFAULT_PORT;
memset(&d, 0, sizeof(ev_data));
for (i = 1; i < n; i++) {
if (!strcmp(v[i], "-h") || !strcmp(v[i], "--help")) usage();
if (!strcmp(v[i], "-d"))
{ if (i > n-2) usage(); database_filename = v[++i]; continue; }
if (!strcmp(v[i], "-in"))
{ if (i > n-2) usage(); input_filename = v[++i]; continue; }
if (!strcmp(v[i], "-ip")) { if (i > n-2) usage(); ip = v[++i]; continue; }
if (!strcmp(v[i], "-p")) {if(i>n-2)usage(); port=atoi(v[++i]); continue; }
usage();
}
if (database_filename == NULL) {
printf("ERROR: provide a database file (-d)\n");
exit(1);
}
if (input_filename == NULL) {
printf("ERROR: provide an input file (-i)\n");
exit(1);
}
in = open(input_filename, O_RDONLY);
if (in == -1) { perror(input_filename); return 1; }
database = parse_database(database_filename);
load_config_file(database_filename);
h = new_handler(database);
ul_id = event_id_from_name(database, "ENB_MAC_UE_UL_PDU_WITH_DATA");
dl_id = event_id_from_name(database, "ENB_MAC_UE_DL_PDU_WITH_DATA");
setup_data(&d, database, ul_id, dl_id);
register_handler_function(h, ul_id, ul, &d);
register_handler_function(h, dl_id, dl, &d);
d.socket = socket(AF_INET, SOCK_DGRAM, 0);
if (d.socket == -1) { perror("socket"); exit(1); }
d.to.sin_family = AF_INET;
d.to.sin_port = htons(port);
d.to.sin_addr.s_addr = inet_addr(ip);
new_thread(receiver, &d);
/* read messages */
while (1) {
char v[T_BUFFER_MAX];
event e;
e = get_event(in, v, database);
if (e.type == -1) break;
if (!(e.type == ul_id || e.type == dl_id)) continue;
handle_event(h, e);
}
return 0;
}
This diff is collapsed.
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include <platform_types.h> #include <platform_types.h>
#endif #endif
#if defined(ENB_MODE) #if defined(ENB_MODE2)
# define display_backtrace() # define display_backtrace()
#else #else
# include "backtrace.h" # include "backtrace.h"
......
...@@ -44,7 +44,8 @@ void display_backtrace(void) ...@@ -44,7 +44,8 @@ void display_backtrace(void)
size_t size; size_t size;
char **strings; char **strings;
size_t i; size_t i;
char* test=getenv("NO_BACKTRACE");
if (test!=0) *((int*)0)=0;
size = backtrace(array, 10); size = backtrace(array, 10);
strings = backtrace_symbols(array, size); strings = backtrace_symbols(array, size);
......
This diff is collapsed.
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "UTIL/LOG/vcd_signal_dumper.h"
#define DEBUG_PHY #define DEBUG_PHY
// Adjust location synchronization point to account for drift // Adjust location synchronization point to account for drift
...@@ -48,6 +50,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -48,6 +50,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
int diff; int diff;
short Re,Im,ncoef; short Re,Im,ncoef;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_IN);
ncoef = 32767 - coef; ncoef = 32767 - coef;
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
...@@ -98,6 +102,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -98,6 +102,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
ue->proc.proc_rxtx[0].frame_rx,ue->rx_offset,max_pos,max_pos_fil,temp); ue->proc.proc_rxtx[0].frame_rx,ue->rx_offset,max_pos,max_pos_fil,temp);
#endif //DEBUG_PHY #endif //DEBUG_PHY
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT);
} }
......
This diff is collapsed.
...@@ -729,6 +729,7 @@ typedef enum {format0, ...@@ -729,6 +729,7 @@ typedef enum {format0,
typedef enum { typedef enum {
SI_PDSCH=0, SI_PDSCH=0,
RA_PDSCH, RA_PDSCH,
P_PDSCH,
PDSCH, PDSCH,
PDSCH1, PDSCH1,
PMCH PMCH
......
...@@ -328,7 +328,7 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -328,7 +328,7 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(LTE_DL_FRAME_PARMS *frame_parms,
for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0; for (x0p=&x0[*jj],tti_offset=symbol_offset+re_offset,re=0;
re<12; re<12;
re++,x0p+=6,tti_offset++) { re+=4,x0p+=24,tti_offset+=4) {
qam64_table_offset_re=FOUR[x0p[0]]; qam64_table_offset_re=FOUR[x0p[0]];
qam64_table_offset_im=FOUR[x0p[1]]; qam64_table_offset_im=FOUR[x0p[1]];
...@@ -338,6 +338,33 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -338,6 +338,33 @@ int allocate_REs_in_RB_no_pilots_64QAM_siso(LTE_DL_FRAME_PARMS *frame_parms,
qam64_table_offset_im+=x0p[5]; qam64_table_offset_im+=x0p[5];
((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s0[qam64_table_offset_re]; ((int16_t *)&txdataF[0][tti_offset])[0]=qam_table_s0[qam64_table_offset_re];
((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qam64_table_offset_im]; ((int16_t *)&txdataF[0][tti_offset])[1]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_re=FOUR[x0p[6]];
qam64_table_offset_im=FOUR[x0p[7]];
qam64_table_offset_re+=TWO[x0p[8]];
qam64_table_offset_im+=TWO[x0p[9]];
qam64_table_offset_re+=x0p[10];
qam64_table_offset_im+=x0p[11];
((int16_t *)&txdataF[0][tti_offset])[2]=qam_table_s0[qam64_table_offset_re];
((int16_t *)&txdataF[0][tti_offset])[3]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_re=FOUR[x0p[12]];
qam64_table_offset_im=FOUR[x0p[13]];
qam64_table_offset_re+=TWO[x0p[14]];
qam64_table_offset_im+=TWO[x0p[15]];
qam64_table_offset_re+=x0p[16];
qam64_table_offset_im+=x0p[17];
((int16_t *)&txdataF[0][tti_offset])[4]=qam_table_s0[qam64_table_offset_re];
((int16_t *)&txdataF[0][tti_offset])[5]=qam_table_s0[qam64_table_offset_im];
qam64_table_offset_re=FOUR[x0p[18]];
qam64_table_offset_im=FOUR[x0p[19]];
qam64_table_offset_re+=TWO[x0p[20]];
qam64_table_offset_im+=TWO[x0p[21]];
qam64_table_offset_re+=x0p[22];
qam64_table_offset_im+=x0p[23];
((int16_t *)&txdataF[0][tti_offset])[6]=qam_table_s0[qam64_table_offset_re];
((int16_t *)&txdataF[0][tti_offset])[7]=qam_table_s0[qam64_table_offset_im];
} }
} }
else { else {
......
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "assertions.h"
const unsigned int Ttab[4] = {32,64,128,256};
// This function implements the initialization of paging parameters for UE (See Section 7, 36.304)
// It must be called after setting IMSImod1024 during UE startup and after receiving SIB2
int init_ue_paging_info(PHY_VARS_UE *ue, long defaultPagingCycle, long nB) {
LTE_DL_FRAME_PARMS *fp = &ue->frame_parms;
unsigned int T = Ttab[defaultPagingCycle];
unsigned int N = (nB<=2) ? T : (T>>(nB-2));
unsigned int Ns = (nB<2) ? (1<<(2-nB)) : 1;
unsigned int UE_ID = ue->IMSImod1024;
unsigned int i_s = (UE_ID/N)%Ns;
ue->PF = (T/N) * (UE_ID % N);
// This implements Section 7.2 from 36.304
if (Ns==1)
ue->PO = (fp->frame_type==FDD) ? 9 : 0;
else if (Ns==2)
ue->PO = (fp->frame_type==FDD) ? (4+(5*i_s)) : (5*i_s);
else if (Ns==4)
ue->PO = (fp->frame_type==FDD) ? (4*(i_s&1)+(5*(i_s>>1))) : ((i_s&1)+(5*(i_s>>1)));
else
AssertFatal(1==0,"init_ue_paging_info: Ns is %d\n",Ns);
return(0);
}
...@@ -1339,6 +1339,14 @@ int32_t generate_drs_pusch(PHY_VARS_UE *phy_vars_ue, ...@@ -1339,6 +1339,14 @@ int32_t generate_drs_pusch(PHY_VARS_UE *phy_vars_ue,
@param frame_parms Pointer to a LTE_DL_FRAME_PARMS structure (eNB or UE)*/ @param frame_parms Pointer to a LTE_DL_FRAME_PARMS structure (eNB or UE)*/
void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms); void init_ul_hopping(LTE_DL_FRAME_PARMS *frame_parms);
/*!
\brief This function implements the initialization of paging parameters for UE (See Section 7, 36.304).It must be called after setting IMSImod1024 during UE startup and after receiving SIB2
@param ue Pointer to UE context
@param defaultPagingCycle T from 36.304 (0=32,1=64,2=128,3=256)
@param nB nB from 36.304 (0=4T,1=2T,2=T,3=T/2,4=T/4,5=T/8,6=T/16,7=T/32*/
int init_ue_paging_info(PHY_VARS_UE *ue, long defaultPagingCycle, long nB);
int32_t compareints (const void * a, const void * b); int32_t compareints (const void * a, const void * b);
......
...@@ -127,7 +127,7 @@ LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uin ...@@ -127,7 +127,7 @@ LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t max_turbo_iterations,uint8_t N_RB_UL, uin
ulsch->Mlimit = 4; ulsch->Mlimit = 4;
for (i=0; i<8; i++) { for (i=0; i<8; i++) {
// msg("new_ue_ulsch: Harq process %d\n",i); // printf("new_ue_ulsch: Harq process %d\n",i);
ulsch->harq_processes[i] = (LTE_UL_eNB_HARQ_t *)malloc16(sizeof(LTE_UL_eNB_HARQ_t)); ulsch->harq_processes[i] = (LTE_UL_eNB_HARQ_t *)malloc16(sizeof(LTE_UL_eNB_HARQ_t));
if (ulsch->harq_processes[i]) { if (ulsch->harq_processes[i]) {
...@@ -202,11 +202,11 @@ uint8_t extract_cqi_crc(uint8_t *cqi,uint8_t CQI_LENGTH) ...@@ -202,11 +202,11 @@ uint8_t extract_cqi_crc(uint8_t *cqi,uint8_t CQI_LENGTH)
uint8_t crc; uint8_t crc;
crc = cqi[CQI_LENGTH>>3]; crc = cqi[CQI_LENGTH>>3];
// msg("crc1: %x, shift %d\n",crc,CQI_LENGTH&0x7); // printf("crc1: %x, shift %d\n",crc,CQI_LENGTH&0x7);
crc = (crc<<(CQI_LENGTH&0x7)); crc = (crc<<(CQI_LENGTH&0x7));
// clear crc bits // clear crc bits
// ((char *)cqi)[CQI_LENGTH>>3] &= 0xff>>(8-(CQI_LENGTH&0x7)); // ((char *)cqi)[CQI_LENGTH>>3] &= 0xff>>(8-(CQI_LENGTH&0x7));
// msg("crc2: %x, cqi0 %x\n",crc,cqi[1+(CQI_LENGTH>>3)]); // printf("crc2: %x, cqi0 %x\n",crc,cqi[1+(CQI_LENGTH>>3)]);
crc |= (cqi[1+(CQI_LENGTH>>3)])>>(8-(CQI_LENGTH&0x7)); crc |= (cqi[1+(CQI_LENGTH>>3)])>>(8-(CQI_LENGTH&0x7));
// clear crc bits // clear crc bits
//(((char *)cqi)[1+(CQI_LENGTH>>3)]) = 0; //(((char *)cqi)[1+(CQI_LENGTH>>3)]) = 0;
...@@ -258,7 +258,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -258,7 +258,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
// uint8_t ytag2[6*14*1200],*ytag2_ptr; // uint8_t ytag2[6*14*1200],*ytag2_ptr;
int16_t cseq[6*14*1200]; int16_t cseq[6*14*1200];
int off; int off;
int status[20];
int subframe = proc->subframe_rx; int subframe = proc->subframe_rx;
LTE_UL_eNB_HARQ_t *ulsch_harq; LTE_UL_eNB_HARQ_t *ulsch_harq;
...@@ -312,7 +312,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -312,7 +312,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
msg("ulsch_decoding (Nid_cell %d, rnti %x, x2 %x): round %d, RV %d, mcs %d, O_RI %d, O_ACK %d, G %d, subframe %d\n", printf("ulsch_decoding (Nid_cell %d, rnti %x, x2 %x): round %d, RV %d, mcs %d, O_RI %d, O_ACK %d, G %d, subframe %d\n",
frame_parms->Nid_cell,ulsch->rnti,x2, frame_parms->Nid_cell,ulsch->rnti,x2,
ulsch_harq->round, ulsch_harq->round,
ulsch_harq->rvidx, ulsch_harq->rvidx,
...@@ -401,7 +401,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -401,7 +401,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
// Q_ACK = Qprime * Q_m; // Q_ACK = Qprime * Q_m;
Qprime_ACK = Qprime; Qprime_ACK = Qprime;
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
msg("ulsch_decoding.c: Qprime_ACK %d, Msc_initial %d, Nsymb_initial %d, sumKr %d\n", printf("ulsch_decoding.c: Qprime_ACK %d, Msc_initial %d, Nsymb_initial %d, sumKr %d\n",
Qprime_ACK,ulsch_harq->Msc_initial,ulsch_harq->Nsymb_initial,sumKr); Qprime_ACK,ulsch_harq->Msc_initial,ulsch_harq->Nsymb_initial,sumKr);
#endif #endif
...@@ -430,7 +430,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -430,7 +430,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
Q_CQI = Q_m * Qprime; Q_CQI = Q_m * Qprime;
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
msg("ulsch_decoding: G %d, Q_RI %d, Q_CQI %d (L %d, Or1 %d) O_ACK %d\n",G,Q_RI,Q_CQI,L,ulsch_harq->Or1,ulsch_harq->O_ACK); printf("ulsch_decoding: G %d, Q_RI %d, Q_CQI %d (L %d, Or1 %d) O_ACK %d\n",G,Q_RI,Q_CQI,L,ulsch_harq->Or1,ulsch_harq->O_ACK);
#endif #endif
G = G - Q_RI - Q_CQI; G = G - Q_RI - Q_CQI;
...@@ -531,7 +531,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -531,7 +531,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
} }
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
msg("ulsch_decoding.c: ACK i %d, r %d, j %d, ColumnSet[j] %d\n",i,r,j,columnset[j]); printf("ulsch_decoding.c: ACK i %d, r %d, j %d, ColumnSet[j] %d\n",i,r,j,columnset[j]);
#endif #endif
j=(j+3)&3; j=(j+3)&3;
} }
...@@ -964,15 +964,15 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -964,15 +964,15 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
} }
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
msg("ulsch_decoding: Or1=%d\n",ulsch_harq->Or1); printf("ulsch_decoding: Or1=%d\n",ulsch_harq->Or1);
for (i=0; i<1+((8+ulsch_harq->Or1)/8); i++) for (i=0; i<1+((8+ulsch_harq->Or1)/8); i++)
msg("ulsch_decoding: O[%d] %d\n",i,ulsch_harq->o[i]); printf("ulsch_decoding: O[%d] %d\n",i,ulsch_harq->o[i]);
if (ulsch_harq->cqi_crc_status == 1) if (ulsch_harq->cqi_crc_status == 1)
msg("RX CQI CRC OK (%x)\n",extract_cqi_crc(o_flip,ulsch_harq->Or1)); printf("RX CQI CRC OK (%x)\n",extract_cqi_crc(o_flip,ulsch_harq->Or1));
else else
msg("RX CQI CRC NOT OK (%x)\n",extract_cqi_crc(o_flip,ulsch_harq->Or1)); printf("RX CQI CRC NOT OK (%x)\n",extract_cqi_crc(o_flip,ulsch_harq->Or1));
#endif #endif
} }
...@@ -985,6 +985,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -985,6 +985,10 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
r_offset = 0; r_offset = 0;
offset = 0;
ret = 1;
for (r=0; r<ulsch_harq->C; r++) { for (r=0; r<ulsch_harq->C; r++) {
// printf("before subblock deinterleaving c[%d] = %p\n",r,ulsch_harq->c[r]); // printf("before subblock deinterleaving c[%d] = %p\n",r,ulsch_harq->c[r]);
...@@ -1010,7 +1014,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1010,7 +1014,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
} }
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
msg("f1 %d, f2 %d, F %d\n",f1f2mat_old[2*iind],f1f2mat_old[1+(2*iind)],(r==0) ? ulsch_harq->F : 0); printf("f1 %d, f2 %d, F %d\n",f1f2mat_old[2*iind],f1f2mat_old[1+(2*iind)],(r==0) ? ulsch_harq->F : 0);
#endif #endif
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short)); memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
...@@ -1019,7 +1023,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1019,7 +1023,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
(r==0) ? ulsch_harq->F : 0); (r==0) ? ulsch_harq->F : 0);
#ifdef DEBUG_ULSCH_DECODING #ifdef DEBUG_ULSCH_DECODING
msg("Rate Matching Segment %d (coded bits (G) %d,unpunctured/repeated bits %d, Q_m %d, nb_rb %d, Nl %d)...\n", printf("Rate Matching Segment %d (coded bits (G) %d,unpunctured/repeated bits %d, Q_m %d, nb_rb %d, Nl %d)...\n",
r, G, r, G,
Kr*3, Kr*3,
Q_m, Q_m,
...@@ -1056,13 +1060,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1056,13 +1060,7 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
&ulsch_harq->d[r][96], &ulsch_harq->d[r][96],
ulsch_harq->w[r]); ulsch_harq->w[r]);
stop_meas(&eNB->ulsch_deinterleaving_stats); stop_meas(&eNB->ulsch_deinterleaving_stats);
}
for (r=0; r<ulsch_harq->C; r++) {
/* printf("c[%d] : %p\n",r,
ulsch_harq->c[r]);
*/
if (ulsch_harq->C == 1) if (ulsch_harq->C == 1)
crc_type = CRC24_A; crc_type = CRC24_A;
...@@ -1089,17 +1087,13 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1089,17 +1087,13 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
stop_meas(&eNB->ulsch_turbo_decoding_stats); stop_meas(&eNB->ulsch_turbo_decoding_stats);
status[r] = ret;
}
// Reassembly of Transport block here
offset = 0;
ret = 1;
for (r=0; r<ulsch_harq->C; r++) { // Reassembly of Transport block here
if (status[r] != (1+ulsch->max_turbo_iterations)) {
if (ret != (1+ulsch->max_turbo_iterations)) {
if (r<ulsch_harq->Cminus) if (r<ulsch_harq->Cminus)
Kr = ulsch_harq->Kminus; Kr = ulsch_harq->Kminus;
else else
...@@ -1119,10 +1113,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, ...@@ -1119,10 +1113,8 @@ unsigned int ulsch_decoding(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc,
offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0)); offset += (Kr_bytes- ((ulsch_harq->C>1)?3:0));
} }
if (ret != (1+ulsch->max_turbo_iterations))
ret = status[r];
} else { } else {
ret = 1+ulsch->max_turbo_iterations; break;
} }
} }
...@@ -1208,7 +1200,7 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb ...@@ -1208,7 +1200,7 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb
sinr_db1 = sinr_dB[offset*2]; sinr_db1 = sinr_dB[offset*2];
sinr_db2 = sinr_dB[offset*2+1]; sinr_db2 = sinr_dB[offset*2+1];
msg("sinr_db1=%f\n,sinr_db2=%f\n",sinr_db1,sinr_db2); printf("sinr_db1=%f\n,sinr_db2=%f\n",sinr_db1,sinr_db2);
//rounding up for the table lookup //rounding up for the table lookup
sinr_db1 *= 10; sinr_db1 *= 10;
...@@ -1462,7 +1454,7 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb ...@@ -1462,7 +1454,7 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb
sinr_eff = sinr_eff * beta2_dlsch_MI[TM][mcs]; sinr_eff = sinr_eff * beta2_dlsch_MI[TM][mcs];
} }
msg("SINR_Eff = %e\n",sinr_eff); printf("SINR_Eff = %e\n",sinr_eff);
sinr_eff *= 10; sinr_eff *= 10;
sinr_eff = floor(sinr_eff); sinr_eff = floor(sinr_eff);
...@@ -1470,7 +1462,7 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb ...@@ -1470,7 +1462,7 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb
// sinr_eff += 1; // sinr_eff += 1;
// } // }
sinr_eff /= 10; sinr_eff /= 10;
msg("sinr_eff after rounding = %f\n",sinr_eff); printf("sinr_eff after rounding = %f\n",sinr_eff);
for (index = 0; index < 16; index++) { for (index = 0; index < 16; index++) {
if(index == 0) { if(index == 0) {
...@@ -1488,10 +1480,10 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb ...@@ -1488,10 +1480,10 @@ int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nrb
#ifdef USER_MODE // need to be adapted for the emulation in the kernel space #ifdef USER_MODE // need to be adapted for the emulation in the kernel space
if (uniformrandom() < bler) { if (uniformrandom() < bler) {
msg("abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler); printf("abstraction_decoding failed (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
return(0); return(0);
} else { } else {
msg("abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler); printf("abstraction_decoding successful (mcs=%d, sinr_eff=%f, bler=%f)\n",mcs,sinr_eff,bler);
return(1); return(1);
} }
......
...@@ -296,10 +296,10 @@ int32_t subcarrier_energy(int32_t *,uint32_t, int32_t* subcarrier_energy, uint16 ...@@ -296,10 +296,10 @@ int32_t subcarrier_energy(int32_t *,uint32_t, int32_t* subcarrier_energy, uint16
*/ */
int32_t signal_energy_nodc(int32_t *,uint32_t); int32_t signal_energy_nodc(int32_t *,uint32_t);
/*!\fn double signal_energy_fp(double **, double **,uint32_t, uint32_t,uint32_t); /*!\fn double signal_energy_fp(double s_re[2][30720], double s_im[2][30720],uint32_t, uint32_t,uint32_t);
\brief Computes the signal energy per subcarrier \brief Computes the signal energy per subcarrier
*/ */
double signal_energy_fp(double **s_re, double **s_im, uint32_t nb_antennas, uint32_t length,uint32_t offset); double signal_energy_fp(double s_re[2][30720], double s_im[2][30720], uint32_t nb_antennas, uint32_t length,uint32_t offset);
/*!\fn double signal_energy_fp2(struct complex *, uint32_t); /*!\fn double signal_energy_fp2(struct complex *, uint32_t);
\brief Computes the signal energy per subcarrier \brief Computes the signal energy per subcarrier
......
This diff is collapsed.
...@@ -255,7 +255,7 @@ int32_t signal_energy_nodc(int32_t *input,uint32_t length) ...@@ -255,7 +255,7 @@ int32_t signal_energy_nodc(int32_t *input,uint32_t length)
} }
#endif #endif
double signal_energy_fp(double **s_re,double **s_im,uint32_t nb_antennas,uint32_t length,uint32_t offset) double signal_energy_fp(double s_re[2][30720],double s_im[2][30720],uint32_t nb_antennas,uint32_t length,uint32_t offset)
{ {
int32_t aa,i; int32_t aa,i;
......
...@@ -53,11 +53,6 @@ ...@@ -53,11 +53,6 @@
# define msg mexPrintf # define msg mexPrintf
#else #else
# ifdef OPENAIR2 # ifdef OPENAIR2
# if ENABLE_RAL
# include "collection/hashtable/hashtable.h"
# include "COMMON/ral_messages_types.h"
# include "UTIL/queue.h"
# endif
# include "log.h" # include "log.h"
# define msg(aRGS...) LOG_D(PHY, ##aRGS) # define msg(aRGS...) LOG_D(PHY, ##aRGS)
# else # else
...@@ -132,10 +127,6 @@ static inline void* malloc16_clear( size_t size ) ...@@ -132,10 +127,6 @@ static inline void* malloc16_clear( size_t size )
#include "PHY/TOOLS/defs.h" #include "PHY/TOOLS/defs.h"
#include "platform_types.h" #include "platform_types.h"
#ifdef OPENAIR_LTE
//#include "PHY/LTE_ESTIMATION/defs.h"
#include "PHY/LTE_TRANSPORT/defs.h" #include "PHY/LTE_TRANSPORT/defs.h"
#include <pthread.h> #include <pthread.h>
...@@ -178,16 +169,6 @@ typedef struct UE_SCAN_INFO_s { ...@@ -178,16 +169,6 @@ typedef struct UE_SCAN_INFO_s {
int32_t freq_offset_Hz[3][10]; int32_t freq_offset_Hz[3][10];
} UE_SCAN_INFO_t; } UE_SCAN_INFO_t;
#if ENABLE_RAL
typedef struct ral_threshold_phy_s {
SLIST_ENTRY(ral_threshold_phy_s) ral_thresholds;
ral_threshold_t threshold;
ral_th_action_t th_action;
ral_link_param_t link_param;
long timer_id;
} ral_threshold_phy_t;
#endif
/// Top-level PHY Data Structure for RN /// Top-level PHY Data Structure for RN
typedef struct { typedef struct {
/// Module ID indicator for this instance /// Module ID indicator for this instance
...@@ -612,6 +593,8 @@ typedef struct { ...@@ -612,6 +593,8 @@ typedef struct {
int is_synchronized; int is_synchronized;
/// Data structure for UE process scheduling /// Data structure for UE process scheduling
UE_proc_t proc; UE_proc_t proc;
/// Flag to indicate the UE shouldn't do timing correction at all
int no_timing_correction;
/// \brief Total gain of the TX chain (16-bit baseband I/Q to antenna) /// \brief Total gain of the TX chain (16-bit baseband I/Q to antenna)
uint32_t tx_total_gain_dB; uint32_t tx_total_gain_dB;
/// \brief Total gain of the RX chain (antenna to baseband I/Q) This is a function of rx_gain_mode (and the corresponding gain) and the rx_gain of the card. /// \brief Total gain of the RX chain (antenna to baseband I/Q) This is a function of rx_gain_mode (and the corresponding gain) and the rx_gain of the card.
...@@ -623,9 +606,9 @@ typedef struct { ...@@ -623,9 +606,9 @@ typedef struct {
/// \brief Total gains with bypassed RF gain stage (ExpressMIMO2/Lime) /// \brief Total gains with bypassed RF gain stage (ExpressMIMO2/Lime)
uint32_t rx_gain_byp[4]; uint32_t rx_gain_byp[4];
/// \brief Current transmit power /// \brief Current transmit power
int8_t tx_power_dBm; int8_t tx_power_dBm[10];
/// \brief Total number of REs in current transmission /// \brief Total number of REs in current transmission
int tx_total_RE; int tx_total_RE[10];
/// \brief Maximum transmit power /// \brief Maximum transmit power
int8_t tx_power_max_dBm; int8_t tx_power_max_dBm;
/// \brief Number of eNB seen by UE /// \brief Number of eNB seen by UE
...@@ -645,17 +628,25 @@ typedef struct { ...@@ -645,17 +628,25 @@ typedef struct {
LTE_UE_PDSCH_FLP *pdsch_vars_flp[NUMBER_OF_CONNECTED_eNB_MAX+1]; LTE_UE_PDSCH_FLP *pdsch_vars_flp[NUMBER_OF_CONNECTED_eNB_MAX+1];
LTE_UE_PDSCH *pdsch_vars_SI[NUMBER_OF_CONNECTED_eNB_MAX+1]; LTE_UE_PDSCH *pdsch_vars_SI[NUMBER_OF_CONNECTED_eNB_MAX+1];
LTE_UE_PDSCH *pdsch_vars_ra[NUMBER_OF_CONNECTED_eNB_MAX+1]; LTE_UE_PDSCH *pdsch_vars_ra[NUMBER_OF_CONNECTED_eNB_MAX+1];
LTE_UE_PDSCH *pdsch_vars_p[NUMBER_OF_CONNECTED_eNB_MAX+1];
LTE_UE_PDSCH *pdsch_vars_MCH[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PDSCH *pdsch_vars_MCH[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PBCH *pbch_vars[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PBCH *pbch_vars[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PDCCH *pdcch_vars[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PDCCH *pdcch_vars[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch[NUMBER_OF_CONNECTED_eNB_MAX][2]; LTE_UE_DLSCH_t *dlsch[NUMBER_OF_CONNECTED_eNB_MAX][2];
LTE_UE_ULSCH_t *ulsch[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_ULSCH_t *ulsch[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch_SI[NUMBER_OF_CONNECTED_eNB_MAX],*dlsch_ra[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_DLSCH_t *dlsch_SI[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch_ra[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch_p[NUMBER_OF_CONNECTED_eNB_MAX];
LTE_UE_DLSCH_t *dlsch_MCH[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_UE_DLSCH_t *dlsch_MCH[NUMBER_OF_CONNECTED_eNB_MAX];
// This is for SIC in the UE, to store the reencoded data // This is for SIC in the UE, to store the reencoded data
LTE_eNB_DLSCH_t *dlsch_eNB[NUMBER_OF_CONNECTED_eNB_MAX]; LTE_eNB_DLSCH_t *dlsch_eNB[NUMBER_OF_CONNECTED_eNB_MAX];
//Paging parameters
uint32_t IMSImod1024;
uint32_t PF;
uint32_t PO;
// For abstraction-purposes only // For abstraction-purposes only
uint8_t sr[10]; uint8_t sr[10];
uint8_t pucch_sel[10]; uint8_t pucch_sel[10];
...@@ -710,6 +701,8 @@ typedef struct { ...@@ -710,6 +701,8 @@ typedef struct {
int dlsch_SI_errors[NUMBER_OF_CONNECTED_eNB_MAX]; int dlsch_SI_errors[NUMBER_OF_CONNECTED_eNB_MAX];
int dlsch_ra_received[NUMBER_OF_CONNECTED_eNB_MAX]; int dlsch_ra_received[NUMBER_OF_CONNECTED_eNB_MAX];
int dlsch_ra_errors[NUMBER_OF_CONNECTED_eNB_MAX]; int dlsch_ra_errors[NUMBER_OF_CONNECTED_eNB_MAX];
int dlsch_p_received[NUMBER_OF_CONNECTED_eNB_MAX];
int dlsch_p_errors[NUMBER_OF_CONNECTED_eNB_MAX];
int dlsch_mch_received_sf[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX]; int dlsch_mch_received_sf[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
int dlsch_mch_received[NUMBER_OF_CONNECTED_eNB_MAX]; int dlsch_mch_received[NUMBER_OF_CONNECTED_eNB_MAX];
int dlsch_mcch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX]; int dlsch_mcch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_eNB_MAX];
...@@ -833,11 +826,6 @@ typedef struct { ...@@ -833,11 +826,6 @@ typedef struct {
/// RF and Interface devices per CC /// RF and Interface devices per CC
openair0_device rfdevice; openair0_device rfdevice;
#if ENABLE_RAL
hash_table_t *ral_thresholds_timed;
SLIST_HEAD(ral_thresholds_gen_poll_s, ral_threshold_phy_t) ral_thresholds_gen_polled[RAL_LINK_PARAM_GEN_MAX];
SLIST_HEAD(ral_thresholds_lte_poll_s, ral_threshold_phy_t) ral_thresholds_lte_polled[RAL_LINK_PARAM_LTE_MAX];
#endif
} PHY_VARS_UE; } PHY_VARS_UE;
...@@ -849,6 +837,5 @@ typedef struct { ...@@ -849,6 +837,5 @@ typedef struct {
#include "PHY/LTE_ESTIMATION/defs.h" #include "PHY/LTE_ESTIMATION/defs.h"
#include "SIMULATION/ETH_TRANSPORT/defs.h" #include "SIMULATION/ETH_TRANSPORT/defs.h"
#endif //OPENAIR_LTE
#endif // __PHY_DEFS__H__ #endif // __PHY_DEFS__H__
...@@ -111,7 +111,7 @@ extern double p_qam64[8]; ...@@ -111,7 +111,7 @@ extern double p_qam64[8];
extern double beta1_dlsch[6][MCS_COUNT]; extern double beta1_dlsch[6][MCS_COUNT];
extern double beta2_dlsch[6][MCS_COUNT]; extern double beta2_dlsch[6][MCS_COUNT];
extern char eNB_functions[5][20]; extern char eNB_functions[6][20];
extern char eNB_timing[2][20]; extern char eNB_timing[2][20];
......
...@@ -607,34 +607,34 @@ typedef struct { ...@@ -607,34 +607,34 @@ typedef struct {
int32_t **txdataF[3]; int32_t **txdataF[3];
/// \brief Holds the received data in time domain. /// \brief Holds the received data in time domain.
/// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. /// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna [0..nb_antennas_rx[ /// - second index: rx antenna [0..nb_antennas_rx[
/// - third index: sample [0..] /// - third index: sample [0..]
int32_t **rxdata[3]; int32_t **rxdata[3];
/// \brief Holds the last subframe of received data in time domain after removal of 7.5kHz frequency offset. /// \brief Holds the last subframe of received data in time domain after removal of 7.5kHz frequency offset.
/// - first index: eNB id [0..2] (hard coded) /// - first index: secotr id [0..2] (hard coded)
/// - second index: rx antenna [0..nb_antennas_rx[ /// - second index: rx antenna [0..nb_antennas_rx[
/// - third index: sample [0..samples_per_tti[ /// - third index: sample [0..samples_per_tti[
int32_t **rxdata_7_5kHz[3]; int32_t **rxdata_7_5kHz[3];
/// \brief Holds the received data in the frequency domain. /// \brief Holds the received data in the frequency domain.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna [0..nb_antennas_rx[ /// - second index: rx antenna [0..nb_antennas_rx[
/// - third index: ? [0..2*ofdm_symbol_size*frame_parms->symbols_per_tti[ /// - third index: ? [0..2*ofdm_symbol_size*frame_parms->symbols_per_tti[
int32_t **rxdataF[3]; int32_t **rxdataF[3];
/// \brief Holds output of the sync correlator. /// \brief Holds output of the sync correlator.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: sample [0..samples_per_tti*10[ /// - second index: sample [0..samples_per_tti*10[
uint32_t *sync_corr[3]; uint32_t *sync_corr[3];
} LTE_eNB_COMMON; } LTE_eNB_COMMON;
typedef struct { typedef struct {
/// \brief Hold the channel estimates in frequency domain based on SRS. /// \brief Hold the channel estimates in frequency domain based on SRS.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..ofdm_symbol_size[ /// - third index: ? [0..ofdm_symbol_size[
int32_t **srs_ch_estimates[3]; int32_t **srs_ch_estimates[3];
/// \brief Hold the channel estimates in time domain based on SRS. /// \brief Hold the channel estimates in time domain based on SRS.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..2*ofdm_symbol_size[ /// - third index: ? [0..2*ofdm_symbol_size[
int32_t **srs_ch_estimates_time[3]; int32_t **srs_ch_estimates_time[3];
...@@ -645,54 +645,54 @@ typedef struct { ...@@ -645,54 +645,54 @@ typedef struct {
typedef struct { typedef struct {
/// \brief Holds the received data in the frequency domain for the allocated RBs in repeated format. /// \brief Holds the received data in the frequency domain for the allocated RBs in repeated format.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..2*ofdm_symbol_size[ /// - third index: ? [0..2*ofdm_symbol_size[
/// - third index (definition from phy_init_lte_eNB()): ? [0..24*N_RB_UL*frame_parms->symbols_per_tti[ /// - third index (definition from phy_init_lte_eNB()): ? [0..24*N_RB_UL*frame_parms->symbols_per_tti[
/// \warning inconsistent third index definition /// \warning inconsistent third index definition
int32_t **rxdataF_ext[3]; int32_t **rxdataF_ext[3];
/// \brief Holds the received data in the frequency domain for the allocated RBs in normal format. /// \brief Holds the received data in the frequency domain for the allocated RBs in normal format.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index (definition from phy_init_lte_eNB()): ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[ /// - third index (definition from phy_init_lte_eNB()): ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t **rxdataF_ext2[3]; int32_t **rxdataF_ext2[3];
/// \brief Hold the channel estimates in time domain based on DRS. /// \brief Hold the channel estimates in time domain based on DRS.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..4*ofdm_symbol_size[ /// - third index: ? [0..4*ofdm_symbol_size[
int32_t **drs_ch_estimates_time[3]; int32_t **drs_ch_estimates_time[3];
/// \brief Hold the channel estimates in frequency domain based on DRS. /// \brief Hold the channel estimates in frequency domain based on DRS.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[ /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t **drs_ch_estimates[3]; int32_t **drs_ch_estimates[3];
/// \brief Hold the channel estimates for UE0 in case of Distributed Alamouti Scheme. /// \brief Hold the channel estimates for UE0 in case of Distributed Alamouti Scheme.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[ /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t **drs_ch_estimates_0[3]; int32_t **drs_ch_estimates_0[3];
/// \brief Hold the channel estimates for UE1 in case of Distributed Almouti Scheme. /// \brief Hold the channel estimates for UE1 in case of Distributed Almouti Scheme.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[ /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t **drs_ch_estimates_1[3]; int32_t **drs_ch_estimates_1[3];
/// \brief Holds the compensated signal. /// \brief Holds the compensated signal.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[ /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t **rxdataF_comp[3]; int32_t **rxdataF_comp[3];
/// \brief Hold the compensated data (y)*(h0*) in case of Distributed Alamouti Scheme. /// \brief Hold the compensated data (y)*(h0*) in case of Distributed Alamouti Scheme.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[ /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t **rxdataF_comp_0[3]; int32_t **rxdataF_comp_0[3];
/// \brief Hold the compensated data (y*)*(h1) in case of Distributed Alamouti Scheme. /// \brief Hold the compensated data (y*)*(h1) in case of Distributed Alamouti Scheme.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[ /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t **rxdataF_comp_1[3]; int32_t **rxdataF_comp_1[3];
/// \brief ?. /// \brief ?.
/// - first index: eNB id [0..2] (hard coded) /// - first index: sector id [0..2] (hard coded)
/// - second index: rx antenna id [0..nb_antennas_rx[ /// - second index: rx antenna id [0..nb_antennas_rx[
/// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[ /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
int32_t **ul_ch_mag[3]; int32_t **ul_ch_mag[3];
......
...@@ -52,10 +52,15 @@ int16_t *primary_synch2_time; ...@@ -52,10 +52,15 @@ int16_t *primary_synch2_time;
#include "PHY/CODING/vars.h" #include "PHY/CODING/vars.h"
//PHY_VARS *PHY_vars; //PHY_VARS *PHY_vars;
#ifndef OCP_FRAMEWORK
PHY_VARS_UE ***PHY_vars_UE_g; PHY_VARS_UE ***PHY_vars_UE_g;
PHY_VARS_eNB ***PHY_vars_eNB_g; PHY_VARS_eNB ***PHY_vars_eNB_g;
PHY_VARS_RN **PHY_vars_RN_g; PHY_VARS_RN **PHY_vars_RN_g;
LTE_DL_FRAME_PARMS *lte_frame_parms_g; LTE_DL_FRAME_PARMS *lte_frame_parms_g;
#else
PHY_VARS_UE * PHY_vars_UE_g[MAX_UE][MAX_NUM_CCs]={NULL};
PHY_VARS_eNB * PHY_vars_eNB_g[MAX_eNB][MAX_NUM_CCs]={NULL};
#endif
unsigned short rev[2048],rev_times4[8192],rev_half[1024]; unsigned short rev[2048],rev_times4[8192],rev_half[1024];
...@@ -139,8 +144,12 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682 ...@@ -139,8 +144,12 @@ double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.1682
*/ */
#ifdef OCP_FRAMEWORK
#include <enums.h>
#else
char eNB_functions[6][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RCC_IF4p5","NGFI_RAI_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5",}; char eNB_functions[6][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RCC_IF4p5","NGFI_RAI_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5",};
char eNB_timing[2][20]={"synch_to_ext_device","synch_to_other"}; char eNB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
#endif
......
...@@ -718,7 +718,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -718,7 +718,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
frame_tx, frame_tx,
eNB_id, eNB_id,
subframe_tx); subframe_tx);
// LOG_I(PHY,"Got prach_resources for eNB %d address %d, RRCCommon %d\n",eNB_id,ue->prach_resources[eNB_id],UE_mac_inst[Mod_id].radioResourceConfigCommon); LOG_D(PHY,"Got prach_resources for eNB %d address %d, RRCCommon %d\n",eNB_id,ue->prach_resources[eNB_id],UE_mac_inst[ue->Mod_id].radioResourceConfigCommon);
} }
} }
...@@ -744,17 +744,17 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -744,17 +744,17 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->prach_resources[eNB_id]->ra_RNTI); ue->prach_resources[eNB_id]->ra_RNTI);
if ((ue->mac_enabled==1) && (mode != calib_prach_tx)) { if ((ue->mac_enabled==1) && (mode != calib_prach_tx)) {
ue->tx_power_dBm = ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER+get_PL(ue->Mod_id,ue->CC_id,eNB_id); ue->tx_power_dBm[subframe_tx] = ue->prach_resources[eNB_id]->ra_PREAMBLE_RECEIVED_TARGET_POWER+get_PL(ue->Mod_id,ue->CC_id,eNB_id);
} }
else { else {
ue->tx_power_dBm = ue->tx_power_max_dBm; ue->tx_power_dBm[subframe_tx] = ue->tx_power_max_dBm;
ue->prach_resources[eNB_id]->ra_PreambleIndex = 19; ue->prach_resources[eNB_id]->ra_PreambleIndex = 19;
} }
ue->tx_total_RE = 96; ue->tx_total_RE[subframe_tx] = 96;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
ue->prach_vars[eNB_id]->amp = get_tx_amp(ue->tx_power_dBm, ue->prach_vars[eNB_id]->amp = get_tx_amp(ue->tx_power_dBm[subframe_tx],
ue->tx_power_max_dBm, ue->tx_power_max_dBm,
ue->frame_parms.N_RB_UL, ue->frame_parms.N_RB_UL,
6); 6);
...@@ -766,7 +766,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -766,7 +766,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->Mod_id, ue->Mod_id,
proc->frame_rx, proc->frame_rx,
proc->subframe_tx, proc->subframe_tx,
ue->tx_power_dBm, ue->tx_power_dBm[subframe_tx],
ue->prach_vars[eNB_id]->amp); ue->prach_vars[eNB_id]->amp);
...@@ -778,7 +778,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -778,7 +778,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
LOG_D(PHY,"[UE %d][RAPROC] PRACH PL %d dB, power %d dBm, digital power %d dB (amp %d)\n", LOG_D(PHY,"[UE %d][RAPROC] PRACH PL %d dB, power %d dBm, digital power %d dB (amp %d)\n",
ue->Mod_id, ue->Mod_id,
get_PL(ue->Mod_id,ue->CC_id,eNB_id), get_PL(ue->Mod_id,ue->CC_id,eNB_id),
ue->tx_power_dBm, ue->tx_power_dBm[subframe_tx],
dB_fixed(prach_power), dB_fixed(prach_power),
ue->prach_vars[eNB_id]->amp); ue->prach_vars[eNB_id]->amp);
} else { } else {
...@@ -1036,12 +1036,12 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ...@@ -1036,12 +1036,12 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
if (ue->mac_enabled==1) { if (ue->mac_enabled==1) {
pusch_power_cntl(ue,proc,eNB_id,1, abstraction_flag); pusch_power_cntl(ue,proc,eNB_id,1, abstraction_flag);
ue->tx_power_dBm = ue->ulsch[eNB_id]->Po_PUSCH; ue->tx_power_dBm[subframe_tx] = ue->ulsch[eNB_id]->Po_PUSCH;
} }
else { else {
ue->tx_power_dBm = ue->tx_power_max_dBm; ue->tx_power_dBm[subframe_tx] = ue->tx_power_max_dBm;
} }
ue->tx_total_RE = nb_rb*12; ue->tx_total_RE[subframe_tx] = nb_rb*12;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
tx_amp = get_tx_amp(ue->tx_power_dBm, tx_amp = get_tx_amp(ue->tx_power_dBm,
...@@ -1052,7 +1052,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB ...@@ -1052,7 +1052,7 @@ void ue_ulsch_uespec_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB
tx_amp = AMP; tx_amp = AMP;
#endif #endif
LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d, generating PUSCH, Po_PUSCH: %d dBm (max %d dBm), amp %d\n", LOG_D(PHY,"[UE %d][PUSCH %d] Frame %d subframe %d, generating PUSCH, Po_PUSCH: %d dBm (max %d dBm), amp %d\n",
Mod_id,harq_pid,frame_tx,subframe_tx,ue->tx_power_dBm,ue->tx_power_max_dBm, tx_amp); Mod_id,harq_pid,frame_tx,subframe_tx,ue->tx_power_dBm[subframe_tx],ue->tx_power_max_dBm, tx_amp);
start_meas(&ue->ulsch_modulation_stats); start_meas(&ue->ulsch_modulation_stats);
ulsch_modulation(ue->common_vars.txdataF, ulsch_modulation(ue->common_vars.txdataF,
tx_amp, tx_amp,
...@@ -1156,8 +1156,8 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -1156,8 +1156,8 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
else { else {
Po_PUCCH = ue->tx_power_max_dBm; Po_PUCCH = ue->tx_power_max_dBm;
} }
ue->tx_power_dBm = Po_PUCCH; ue->tx_power_dBm[subframe_tx] = Po_PUCCH;
ue->tx_total_RE = 12; ue->tx_total_RE[subframe_tx] = 12;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
tx_amp = get_tx_amp(Po_PUCCH, tx_amp = get_tx_amp(Po_PUCCH,
...@@ -1220,8 +1220,8 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -1220,8 +1220,8 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
else { else {
Po_PUCCH = ue->tx_power_max_dBm; Po_PUCCH = ue->tx_power_max_dBm;
} }
ue->tx_power_dBm = Po_PUCCH; ue->tx_power_dBm[subframe_tx] = Po_PUCCH;
ue->tx_total_RE = 12; ue->tx_total_RE[subframe_tx] = 12;
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR) #if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
tx_amp = get_tx_amp(Po_PUCCH, tx_amp = get_tx_amp(Po_PUCCH,
...@@ -1286,7 +1286,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui ...@@ -1286,7 +1286,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
//phy_procedures_emos_UE_TX(next_slot); //phy_procedures_emos_UE_TX(next_slot);
#endif #endif
ue->tx_power_dBm=-127; ue->tx_power_dBm[subframe_tx]=-127;
if (abstraction_flag==0) { if (abstraction_flag==0) {
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) { for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
...@@ -1391,6 +1391,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui ...@@ -1391,6 +1391,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
(ue->frame_parms.prach_config_common.prach_Config_enabled==1)) { (ue->frame_parms.prach_config_common.prach_Config_enabled==1)) {
// check if we have PRACH opportunity // check if we have PRACH opportunity
if (is_prach_subframe(&ue->frame_parms,frame_tx,subframe_tx)) { if (is_prach_subframe(&ue->frame_parms,frame_tx,subframe_tx)) {
ue_prach_procedures(ue,proc,eNB_id,abstraction_flag,mode); ue_prach_procedures(ue,proc,eNB_id,abstraction_flag,mode);
...@@ -1484,17 +1485,17 @@ void ue_measurement_procedures(uint16_t l, PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, ...@@ -1484,17 +1485,17 @@ void ue_measurement_procedures(uint16_t l, PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,
#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);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_IN);
eNB_id = 0; eNB_id = 0;
if (abstraction_flag == 0) if (abstraction_flag == 0) {
if (ue->no_timing_correction==0)
lte_adjust_synch(&ue->frame_parms, lte_adjust_synch(&ue->frame_parms,
ue, ue,
eNB_id, eNB_id,
0, 0,
16384); 16384);
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT);
} }
...@@ -1626,8 +1627,10 @@ void restart_phy(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uint8_t eNB_id,uint8_t ab ...@@ -1626,8 +1627,10 @@ void restart_phy(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uint8_t eNB_id,uint8_t ab
ue->dlsch_fer[eNB_id] = 0; ue->dlsch_fer[eNB_id] = 0;
ue->dlsch_SI_received[eNB_id] = 0; ue->dlsch_SI_received[eNB_id] = 0;
ue->dlsch_ra_received[eNB_id] = 0; ue->dlsch_ra_received[eNB_id] = 0;
ue->dlsch_p_received[eNB_id] = 0;
ue->dlsch_SI_errors[eNB_id] = 0; ue->dlsch_SI_errors[eNB_id] = 0;
ue->dlsch_ra_errors[eNB_id] = 0; ue->dlsch_ra_errors[eNB_id] = 0;
ue->dlsch_p_errors[eNB_id] = 0;
ue->dlsch_mch_received[eNB_id] = 0; ue->dlsch_mch_received[eNB_id] = 0;
...@@ -2026,6 +2029,35 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ...@@ -2026,6 +2029,35 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
} }
} }
else if ((dci_alloc_rx[i].rnti == P_RNTI) &&
((dci_alloc_rx[i].format == format1A) || (dci_alloc_rx[i].format == format1C))) {
#ifdef DEBUG_PHY_PROC
LOG_D(PHY,"[UE %d] subframe %d: Found rnti %x, format 1%s, dci_cnt %d\n",ue->Mod_id,subframe_rx,dci_alloc_rx[i].rnti,dci_alloc_rx[i].format==format1A?"A":"C",i);
#endif
if (generate_ue_dlsch_params_from_dci(frame_rx,
subframe_rx,
(void *)&dci_alloc_rx[i].dci_pdu,
SI_RNTI,
dci_alloc_rx[i].format,
&ue->dlsch_SI[eNB_id],
&ue->frame_parms,
ue->pdsch_config_dedicated,
SI_RNTI,
0,
P_RNTI)==0) {
ue->dlsch_p_received[eNB_id]++;
LOG_D(PHY,"[UE %d] Frame %d, subframe %d : Generate UE DLSCH P_RNTI format 1%s\n",ue->Mod_id,frame_rx,subframe_rx,dci_alloc_rx[i].format==format1A?"A":"C");
//dump_dci(&ue->frame_parms, &dci_alloc_rx[i]);
}
}
else if ((ue->prach_resources[eNB_id]) && else if ((ue->prach_resources[eNB_id]) &&
(dci_alloc_rx[i].rnti == ue->prach_resources[eNB_id]->ra_RNTI) && (dci_alloc_rx[i].rnti == ue->prach_resources[eNB_id]->ra_RNTI) &&
(dci_alloc_rx[i].format == format1A)) { (dci_alloc_rx[i].format == format1A)) {
...@@ -2439,6 +2471,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -2439,6 +2471,9 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
case RA_PDSCH: case RA_PDSCH:
pdsch_vars = ue->pdsch_vars_ra[eNB_id]; pdsch_vars = ue->pdsch_vars_ra[eNB_id];
break; break;
case P_PDSCH:
pdsch_vars = ue->pdsch_vars_p[eNB_id];
break;
case PDSCH: case PDSCH:
pdsch_vars = ue->pdsch_vars[eNB_id]; pdsch_vars = ue->pdsch_vars[eNB_id];
break; break;
...@@ -2556,6 +2591,14 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -2556,6 +2591,14 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
ue->dlsch_SI[eNB_id]->harq_processes[0]->b, ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3); ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
break; break;
case P_PDSCH:
mac_xface->ue_decode_p(ue->Mod_id,
CC_id,
frame_rx,
eNB_id,
ue->dlsch_SI[eNB_id]->harq_processes[0]->b,
ue->dlsch_SI[eNB_id]->harq_processes[0]->TBS>>3);
break;
case RA_PDSCH: case RA_PDSCH:
process_rar(ue,proc,eNB_id,mode,abstraction_flag); process_rar(ue,proc,eNB_id,mode,abstraction_flag);
break; break;
...@@ -2629,6 +2672,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -2629,6 +2672,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
if (ue->dlsch_SI[eNB_id]) if (ue->dlsch_SI[eNB_id])
ue->dlsch_SI[eNB_id]->active = 0; ue->dlsch_SI[eNB_id]->active = 0;
if (ue->dlsch_p[eNB_id])
ue->dlsch_p[eNB_id]->active = 0;
if (ue->dlsch_ra[eNB_id]) if (ue->dlsch_ra[eNB_id])
ue->dlsch_ra[eNB_id]->active = 0; ue->dlsch_ra[eNB_id]->active = 0;
...@@ -2725,6 +2770,20 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -2725,6 +2770,20 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->frame_parms.symbols_per_tti>>1, ue->frame_parms.symbols_per_tti>>1,
abstraction_flag); abstraction_flag);
} }
// do procedures for SI-RNTI
if ((ue->dlsch_p[eNB_id]) && (ue->dlsch_p[eNB_id]->active == 1)) {
ue_pdsch_procedures(ue,
proc,
eNB_id,
P_PDSCH,
ue->dlsch_p[eNB_id],
NULL,
ue->pdcch_vars[eNB_id]->num_pdcch_symbols,
ue->frame_parms.symbols_per_tti>>1,
abstraction_flag);
}
// do procedures for RA-RNTI // do procedures for RA-RNTI
if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1)) { if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1)) {
ue_pdsch_procedures(ue, ue_pdsch_procedures(ue,
...@@ -2820,6 +2879,30 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin ...@@ -2820,6 +2879,30 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
abstraction_flag); abstraction_flag);
ue->dlsch_SI[eNB_id]->active = 0; ue->dlsch_SI[eNB_id]->active = 0;
} }
// do procedures for P-RNTI
if ((ue->dlsch_p[eNB_id]) && (ue->dlsch_p[eNB_id]->active == 1)) {
ue_pdsch_procedures(ue,
proc,
eNB_id,
P_PDSCH,
ue->dlsch_p[eNB_id],
NULL,
1+(ue->frame_parms.symbols_per_tti>>1),
ue->frame_parms.symbols_per_tti-1,
abstraction_flag);
ue_dlsch_procedures(ue,
proc,
eNB_id,
P_PDSCH,
ue->dlsch_p[eNB_id],
NULL,
&ue->dlsch_p_errors[eNB_id],
mode,
abstraction_flag);
ue->dlsch_p[eNB_id]->active = 0;
}
// do procedures for RA-RNTI // do procedures for RA-RNTI
if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1)) { if ((ue->dlsch_ra[eNB_id]) && (ue->dlsch_ra[eNB_id]->active == 1)) {
ue_pdsch_procedures(ue, ue_pdsch_procedures(ue,
......
This diff is collapsed.
...@@ -188,7 +188,7 @@ int main(int argc, char **argv) ...@@ -188,7 +188,7 @@ int main(int argc, char **argv)
int **txdata; int **txdata;
LTE_DL_FRAME_PARMS *frame_parms; LTE_DL_FRAME_PARMS *frame_parms;
double **s_re,**s_im,**r_re,**r_im; double s_re[2][30720],s_im[2][30720],r_re[2][30720],r_im[2][30720];
double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel double forgetting_factor=0.0; //in [0,1] 0 means a new channel every time, 1 means keep the same channel
double iqim=0.0; double iqim=0.0;
uint8_t extended_prefix_flag=0; uint8_t extended_prefix_flag=0;
...@@ -583,12 +583,6 @@ int main(int argc, char **argv) ...@@ -583,12 +583,6 @@ int main(int argc, char **argv)
txdata = UE->common_vars.txdata; txdata = UE->common_vars.txdata;
s_re = malloc(2*sizeof(double*));
s_im = malloc(2*sizeof(double*));
r_re = malloc(2*sizeof(double*));
r_im = malloc(2*sizeof(double*));
// r_re0 = malloc(2*sizeof(double*));
// r_im0 = malloc(2*sizeof(double*));
nsymb = (eNB->frame_parms.Ncp == NORMAL) ? 14 : 12; nsymb = (eNB->frame_parms.Ncp == NORMAL) ? 14 : 12;
...@@ -630,13 +624,6 @@ int main(int argc, char **argv) ...@@ -630,13 +624,6 @@ int main(int argc, char **argv)
fprintf(csv_fdUL,"data_all%d=[",mcs); fprintf(csv_fdUL,"data_all%d=[",mcs);
} }
for (i=0; i<2; i++) {
s_re[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
s_im[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
r_re[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
r_im[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
}
if (xforms==1) { if (xforms==1) {
fl_initialize (&argc, argv, NULL, 0, 0); fl_initialize (&argc, argv, NULL, 0, 0);
...@@ -1716,22 +1703,6 @@ int main(int argc, char **argv) ...@@ -1716,22 +1703,6 @@ int main(int argc, char **argv)
if (test_perf !=0) if (test_perf !=0)
fclose (time_meas_fd); fclose (time_meas_fd);
printf("Freeing channel I/O\n");
for (i=0; i<2; i++) {
free(s_re[i]);
free(s_im[i]);
free(r_re[i]);
free(r_im[i]);
}
free(s_re);
free(s_im);
free(r_re);
free(r_im);
// lte_sync_time_free();
return(0); return(0);
} }
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/ *******************************************************************************/
void adc(double **r_re, void adc(double r_re[2][30720],
double **r_im, double r_im[2][30720],
unsigned int input_offset, unsigned int input_offset,
unsigned int output_offset, unsigned int output_offset,
unsigned int **output, unsigned int **output,
......
...@@ -31,8 +31,8 @@ ...@@ -31,8 +31,8 @@
#include <stdio.h> #include <stdio.h>
#include "PHY/TOOLS/defs.h" #include "PHY/TOOLS/defs.h"
void dac(double **s_re, void dac(double s_re[2][30720],
double **s_im, double s_im[2][30720],
uint32_t **input, uint32_t **input,
uint32_t input_offset, uint32_t input_offset,
uint32_t nb_tx_antennas, uint32_t nb_tx_antennas,
...@@ -81,8 +81,8 @@ void dac(double **s_re, ...@@ -81,8 +81,8 @@ void dac(double **s_re,
} }
} }
double dac_fixed_gain(double **s_re, double dac_fixed_gain(double s_re[2][30720],
double **s_im, double s_im[2][30720],
uint32_t **input, uint32_t **input,
uint32_t input_offset, uint32_t input_offset,
uint32_t nb_tx_antennas, uint32_t nb_tx_antennas,
......
...@@ -64,16 +64,16 @@ void rf_rx(double **r_re, ...@@ -64,16 +64,16 @@ void rf_rx(double **r_re,
double IQ_imb_dB, double IQ_imb_dB,
double IQ_phase); double IQ_phase);
void rf_rx_simple(double **r_re, void rf_rx_simple(double r_re[2][30720],
double **r_im, double r_im[2][30720],
unsigned int nb_rx_antennas, unsigned int nb_rx_antennas,
unsigned int length, unsigned int length,
double s_time, double s_time,
double rx_gain_dB); double rx_gain_dB);
void adc(double **r_re, void adc(double r_re[2][30720],
double **r_im, double r_im[2][30720],
unsigned int input_offset, unsigned int input_offset,
unsigned int output_offset, unsigned int output_offset,
int **output, int **output,
...@@ -81,8 +81,8 @@ void adc(double **r_re, ...@@ -81,8 +81,8 @@ void adc(double **r_re,
unsigned int length, unsigned int length,
unsigned char B); unsigned char B);
void dac(double **s_re, void dac(double s_re[2][30720],
double **s_im, double s_im[2][30720],
int **input, int **input,
unsigned int input_offset, unsigned int input_offset,
unsigned int nb_tx_antennas, unsigned int nb_tx_antennas,
...@@ -92,8 +92,8 @@ void dac(double **s_re, ...@@ -92,8 +92,8 @@ void dac(double **s_re,
unsigned int meas_length, unsigned int meas_length,
unsigned int meas_offset); unsigned int meas_offset);
double dac_fixed_gain(double **s_re, double dac_fixed_gain(double s_re[2][30720],
double **s_im, double s_im[2][30720],
int **input, int **input,
unsigned int input_offset, unsigned int input_offset,
unsigned int nb_tx_antennas, unsigned int nb_tx_antennas,
......
...@@ -206,8 +206,8 @@ void rf_rx(double **r_re, ...@@ -206,8 +206,8 @@ void rf_rx(double **r_re,
} }
} }
void rf_rx_simple(double **r_re, void rf_rx_simple(double r_re[2][30720],
double **r_im, double r_im[2][30720],
unsigned int nb_rx_antennas, unsigned int nb_rx_antennas,
unsigned int length, unsigned int length,
double s_time, double s_time,
......
...@@ -219,10 +219,10 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, ...@@ -219,10 +219,10 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx,
int random_channel(channel_desc_t *desc, uint8_t abstraction_flag); int random_channel(channel_desc_t *desc, uint8_t abstraction_flag);
/**\fn void multipath_channel(channel_desc_t *desc, /**\fn void multipath_channel(channel_desc_t *desc,
double **tx_sig_re, double tx_sig_re[2][30720],
double **tx_sig_im, double tx_sig_im[2][30720],
double **rx_sig_re, double rx_sig_re[2][30720],
double **rx_sig_im, double rx_sig_im[2][30720],
uint32_t length, uint32_t length,
uint8_t keep_channel) uint8_t keep_channel)
...@@ -237,10 +237,10 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag); ...@@ -237,10 +237,10 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag);
*/ */
void multipath_channel(channel_desc_t *desc, void multipath_channel(channel_desc_t *desc,
double **tx_sig_re, double tx_sig_re[2][30720],
double **tx_sig_im, double tx_sig_im[2][30720],
double **rx_sig_re, double rx_sig_re[2][30720],
double **rx_sig_im, double rx_sig_im[2][30720],
uint32_t length, uint32_t length,
uint8_t keep_channel); uint8_t keep_channel);
/* /*
......
...@@ -44,10 +44,10 @@ uint8_t multipath_channel_nosigconv(channel_desc_t *desc) ...@@ -44,10 +44,10 @@ uint8_t multipath_channel_nosigconv(channel_desc_t *desc)
//#define CHANNEL_SSE //#define CHANNEL_SSE
#ifdef CHANNEL_SSE #ifdef CHANNEL_SSE
void multipath_channel(channel_desc_t *desc, void multipath_channel(channel_desc_t *desc,
double **tx_sig_re, double tx_sig_re[2][30720],
double **tx_sig_im, double tx_sig_im[2][30720],
double **rx_sig_re, double rx_sig_re[2][30720],
double **rx_sig_im, double rx_sig_im[2][30720],
uint32_t length, uint32_t length,
uint8_t keep_channel) uint8_t keep_channel)
{ {
...@@ -150,10 +150,10 @@ void multipath_channel(channel_desc_t *desc, ...@@ -150,10 +150,10 @@ void multipath_channel(channel_desc_t *desc,
#else #else
void multipath_channel(channel_desc_t *desc, void multipath_channel(channel_desc_t *desc,
double **tx_sig_re, double tx_sig_re[2][30720],
double **tx_sig_im, double tx_sig_im[2][30720],
double **rx_sig_re, double rx_sig_re[2][30720],
double **rx_sig_im, double rx_sig_im[2][30720],
uint32_t length, uint32_t length,
uint8_t keep_channel) uint8_t keep_channel)
{ {
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
* the key length is 32 bytes (256 bits) * the key length is 32 bytes (256 bits)
*/ */
#define SECURITY_KEY_LENGTH 32 #define SECURITY_KEY_LENGTH 32
#ifndef OCP_FRAMEWORK
typedef enum cell_type_e { typedef enum cell_type_e {
CELL_MACRO_ENB, CELL_MACRO_ENB,
CELL_HOME_ENB CELL_HOME_ENB
...@@ -107,6 +107,7 @@ typedef enum cn_domain_s { ...@@ -107,6 +107,7 @@ typedef enum cn_domain_s {
CN_DOMAIN_PS = 1, CN_DOMAIN_PS = 1,
CN_DOMAIN_CS = 2 CN_DOMAIN_CS = 2
} cn_domain_t; } cn_domain_t;
#endif
typedef struct net_ip_address_s { typedef struct net_ip_address_s {
unsigned ipv4:1; unsigned ipv4:1;
...@@ -122,6 +123,7 @@ typedef struct ambr_s { ...@@ -122,6 +123,7 @@ typedef struct ambr_s {
bitrate_t br_dl; bitrate_t br_dl;
} ambr_t; } ambr_t;
#ifndef OCP_FRAMEWORK
typedef enum priority_level_s { typedef enum priority_level_s {
PRIORITY_LEVEL_SPARE = 0, PRIORITY_LEVEL_SPARE = 0,
PRIORITY_LEVEL_HIGHEST = 1, PRIORITY_LEVEL_HIGHEST = 1,
...@@ -140,6 +142,7 @@ typedef enum pre_emp_vulnerability_e { ...@@ -140,6 +142,7 @@ typedef enum pre_emp_vulnerability_e {
PRE_EMPTION_VULNERABILITY_DISABLED = 1, PRE_EMPTION_VULNERABILITY_DISABLED = 1,
PRE_EMPTION_VULNERABILITY_MAX, PRE_EMPTION_VULNERABILITY_MAX,
} pre_emp_vulnerability_t; } pre_emp_vulnerability_t;
#endif
typedef struct allocation_retention_priority_s { typedef struct allocation_retention_priority_s {
priority_level_t priority_level; priority_level_t priority_level;
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <libconfig.h>
#include "commonDef.h" #include "commonDef.h"
#include "platform_types.h" #include "platform_types.h"
...@@ -49,6 +50,7 @@ ...@@ -49,6 +50,7 @@
#include "s1ap_messages_types.h" #include "s1ap_messages_types.h"
#ifdef CMAKER #ifdef CMAKER
#include "SystemInformationBlockType2.h" #include "SystemInformationBlockType2.h"
#include "rrc_messages_types.h"
#else #else
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h" #include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
#endif #endif
...@@ -116,6 +118,7 @@ typedef struct Enb_properties_s { ...@@ -116,6 +118,7 @@ typedef struct Enb_properties_s {
*/ */
char *eNB_name; char *eNB_name;
/* Tracking area code */ /* Tracking area code */
uint16_t tac; uint16_t tac;
...@@ -130,6 +133,7 @@ typedef struct Enb_properties_s { ...@@ -130,6 +133,7 @@ typedef struct Enb_properties_s {
/* Physical parameters */ /* Physical parameters */
int16_t nb_cc; int16_t nb_cc;
#ifndef OCP_FRAMEWORK
eNB_func_t cc_node_function[1+MAX_NUM_CCs]; eNB_func_t cc_node_function[1+MAX_NUM_CCs];
eNB_timing_t cc_node_timing[1+MAX_NUM_CCs]; eNB_timing_t cc_node_timing[1+MAX_NUM_CCs];
int16_t cc_node_synch_ref[1+MAX_NUM_CCs]; int16_t cc_node_synch_ref[1+MAX_NUM_CCs];
...@@ -205,6 +209,9 @@ typedef struct Enb_properties_s { ...@@ -205,6 +209,9 @@ typedef struct Enb_properties_s {
long ue_TimersAndConstants_t311[1+MAX_NUM_CCs]; long ue_TimersAndConstants_t311[1+MAX_NUM_CCs];
long ue_TimersAndConstants_n310[1+MAX_NUM_CCs]; long ue_TimersAndConstants_n310[1+MAX_NUM_CCs];
long ue_TimersAndConstants_n311[1+MAX_NUM_CCs]; long ue_TimersAndConstants_n311[1+MAX_NUM_CCs];
#else
RrcConfigurationReq RrcReq;
#endif
long srb1_timer_poll_retransmit; long srb1_timer_poll_retransmit;
long srb1_timer_reordering; long srb1_timer_reordering;
...@@ -234,6 +241,7 @@ typedef struct Enb_properties_s { ...@@ -234,6 +241,7 @@ typedef struct Enb_properties_s {
/* List of MME to connect to */ /* List of MME to connect to */
rrh_gw_config_t rrh_gw_config[4]; rrh_gw_config_t rrh_gw_config[4];
#ifndef OCP_FRAMEWORK
// otg config // otg config
/* Nb of OTG elements */ /* Nb of OTG elements */
uint8_t num_otg_elements; uint8_t num_otg_elements;
...@@ -262,7 +270,7 @@ typedef struct Enb_properties_s { ...@@ -262,7 +270,7 @@ typedef struct Enb_properties_s {
int16_t udp_log_verbosity; int16_t udp_log_verbosity;
int16_t osa_log_level; int16_t osa_log_level;
int16_t osa_log_verbosity; int16_t osa_log_verbosity;
#endif
} Enb_properties_t; } Enb_properties_t;
typedef struct Enb_properties_array_s { typedef struct Enb_properties_array_s {
......
This diff is collapsed.
This diff is collapsed.
...@@ -480,6 +480,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui ...@@ -480,6 +480,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui
LOG_I(MAC,"[MAIN] init UE MAC functions \n"); LOG_I(MAC,"[MAIN] init UE MAC functions \n");
mac_xface->ue_decode_si = ue_decode_si; mac_xface->ue_decode_si = ue_decode_si;
mac_xface->ue_decode_p = ue_decode_p;
mac_xface->ue_send_sdu = ue_send_sdu; mac_xface->ue_send_sdu = ue_send_sdu;
#ifdef Rel10 #ifdef Rel10
mac_xface->ue_send_mch_sdu = ue_send_mch_sdu; mac_xface->ue_send_mch_sdu = ue_send_mch_sdu;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment