Commit 3430dbc4 authored by Navid Nikaein's avatar Navid Nikaein

merge with the develop branch

parents f723937a 3a29458b
...@@ -7,6 +7,7 @@ job1: ...@@ -7,6 +7,7 @@ job1:
- echo $NFS_SHARE_DIR - echo $NFS_SHARE_DIR
- echo $EXTERNAL_SHARE_DIR - echo $EXTERNAL_SHARE_DIR
- echo $SHELL - echo $SHELL
- echo $OAI_TEST_CASE_GROUP
- 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`
......
...@@ -262,6 +262,7 @@ endif (${ENABLE_ITTI}) ...@@ -262,6 +262,7 @@ endif (${ENABLE_ITTI})
add_boolean_option(RTAI False "Use RTAI") add_boolean_option(RTAI False "Use RTAI")
if (${RTAI}) if (${RTAI})
set(LOWLATENCY False) set(LOWLATENCY False)
set(CPU_AFFINITY False)
add_definitions("-DENABLE_RTAI_CLOCK") add_definitions("-DENABLE_RTAI_CLOCK")
add_definitions("-DCONFIG_RTAI_LXRT_INLINE") add_definitions("-DCONFIG_RTAI_LXRT_INLINE")
include_directories ("/usr/realtime/include") include_directories ("/usr/realtime/include")
...@@ -565,7 +566,6 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF") ...@@ -565,7 +566,6 @@ elseif (${RF_BOARD} STREQUAL "OAI_BLADERF")
LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu") LINK_DIRECTORIES("/usr/lib/x86_64-linux-gnu")
set(option_HW_lib "bladeRF -rdynamic -ldl") set(option_HW_lib "bladeRF -rdynamic -ldl")
#set(LOWLATENCY False)
elseif (${RF_BOARD} STREQUAL "OAI_LMSSDR") elseif (${RF_BOARD} STREQUAL "OAI_LMSSDR")
include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB") include_directories("${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB")
...@@ -578,7 +578,6 @@ elseif (${RF_BOARD} STREQUAL "OAI_LMSSDR") ...@@ -578,7 +578,6 @@ elseif (${RF_BOARD} STREQUAL "OAI_LMSSDR")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lms7002m") LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/lms7002m")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/Si5351C") LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/Si5351C")
set(HW_SOURCE ${HW_SOURCE} ${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp) set(HW_SOURCE ${HW_SOURCE} ${OPENAIR_TARGETS}/ARCH/LMSSDR/USERSPACE/LIB/lms_lib.cpp)
set(LOWLATENCY False)
set(option_HW_lib "-lLMS_SDR -lLMS7002M -lSi5351C -rdynamic -ldl") set(option_HW_lib "-lLMS_SDR -lLMS7002M -lSi5351C -rdynamic -ldl")
elseif (${RF_BOARD} STREQUAL "CPRIGW") elseif (${RF_BOARD} STREQUAL "CPRIGW")
...@@ -608,6 +607,7 @@ endif (${TRANSP_PRO} STREQUAL "ETHERNET") ...@@ -608,6 +607,7 @@ endif (${TRANSP_PRO} STREQUAL "ETHERNET")
include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON") include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON")
Message("LOWLATENCY flag is ${LOWLATENCY}") Message("LOWLATENCY flag is ${LOWLATENCY}")
Message("CPU_Affinity flag is ${CPU_AFFINITY}")
############################################################## ##############################################################
# ???!!! TO BE DOCUMENTED OPTIONS !!!??? # ???!!! TO BE DOCUMENTED OPTIONS !!!???
...@@ -621,6 +621,7 @@ add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the d ...@@ -621,6 +621,7 @@ add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the d
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????") add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
add_boolean_option(DISABLE_USE_NAS False "???") add_boolean_option(DISABLE_USE_NAS False "???")
add_boolean_option(LOWLATENCY True "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14") add_boolean_option(LOWLATENCY True "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs")
add_boolean_option(NAS_ADDRESS_FIX False "specific to oaisim: for nasmesh driver") add_boolean_option(NAS_ADDRESS_FIX False "specific to oaisim: for nasmesh driver")
add_boolean_option(NAS_NETLINK False "???? Must be True to compile nasmesh driver without rtai") add_boolean_option(NAS_NETLINK False "???? Must be True to compile nasmesh driver without rtai")
add_boolean_option(OAISIM False "specific to oaisim") add_boolean_option(OAISIM False "specific to oaisim")
...@@ -997,6 +998,7 @@ set(PHY_SRC ...@@ -997,6 +998,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/CODING/crc_byte.c ${OPENAIR1_DIR}/PHY/CODING/crc_byte.c
${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c ${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c ${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_sse_16bit.c
${OPENAIR1_DIR}/PHY/CODING/3gpplte_turbo_decoder_avx2_16bit.c
${OPENAIR1_DIR}/PHY/CODING/lte_rate_matching.c ${OPENAIR1_DIR}/PHY/CODING/lte_rate_matching.c
${OPENAIR1_DIR}/PHY/CODING/rate_matching.c ${OPENAIR1_DIR}/PHY/CODING/rate_matching.c
${OPENAIR1_DIR}/PHY/CODING/viterbi.c ${OPENAIR1_DIR}/PHY/CODING/viterbi.c
...@@ -1099,8 +1101,8 @@ set (ENB_APP_SRC ...@@ -1099,8 +1101,8 @@ set (ENB_APP_SRC
add_library(L2 add_library(L2
${L2_SRC} ${L2_SRC}
${MAC_SRC} ${MAC_SRC}
${ENB_APP_SRC} ${ENB_APP_SRC})
${OPENAIR2_DIR}/RRC/L2_INTERFACE/openair_rrc_L2_interface.c) # ${OPENAIR2_DIR}/RRC/L2_INTERFACE/openair_rrc_L2_interface.c)
# L3 Libs # L3 Libs
########################## ##########################
...@@ -2014,38 +2016,4 @@ endforeach(file) ...@@ -2014,38 +2016,4 @@ endforeach(file)
ADD_CUSTOM_TARGET(oarf ADD_CUSTOM_TARGET(oarf
DEPENDS ${OCT_FILES} DEPENDS ${OCT_FILES}
) )
#CMAKE INSTALL and CPACK
#INSTALL(PROGRAMS lte-softmodem ${OPENAIR_DIR}/targets DESTINATION bin)
#INSTALL(PROGRAMS oaisim ${OPENAIR_DIR}/targets DESTINATION bin)
#SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "OpenAirInterface")
#SET(CPACK_PACKAGE_VENDOR "Eurecom")
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${OPENAIR_DIR}/README.txt")
#SET(CPACK_RESOURCE_FILE_LICENSE "${OPENAIR_DIR}/COPYING")
#SET(CPACK_PACKAGE_VERSION_MAJOR "1")
#SET(CPACK_PACKAGE_VERSION_MINOR "1")
#SET(CPACK_PACKAGE_VERSION_PATCH "1")
#SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
#SET(CPACK_STRIP_FILES "${OPENAIR_TARGETS}/bin")
#SET(CPACK_SOURCE_STRIP_FILES "")
##debian specific
#SET(CPACK_DEBIAN_PACKAGE_NAME "OAI")
#SET(CPACK_DEBIAN_PACKAGE_VERSION "${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}")
##dpkg --print-architecture (do not use i686
#SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
#SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.1-6), libgcc1 (>= 1:3.4.2-12)")
#SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libpthread.so.0 libm.so.6 libconfig.so.9 librt.so.1 libcrypt.so.1 libcrypto.so.1.0.0 libnettle.so.4 libsctp.so.1 libc.so.6")
#SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "EURECOM-OSA")
#SET(CPACK_PACKAGE_EXECUTABLES "lte-softmodem" "mme_gw.Rel10" "openair-hss")
#SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "OpenAirInterface")
#SET(CPACK_DEBIAN_PACKAGE_Section "Beta-Release")
#INCLUDE(CPack)
...@@ -321,13 +321,19 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop): ...@@ -321,13 +321,19 @@ def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop):
print "Killing old programs..." + result print "Killing old programs..." + result
programArray = programList.split() programArray = programList.split()
programListJoin = '|'.join(programArray) programListJoin = '|'.join(programArray)
cmd = " ( date ;echo \"Starting cleaning old programs.. \" ; dmesg|tail )>& $HOME/.oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync"
result=oai.send_recv(cmd)
cmd = cleanupOldProgramsScript + ' ' + '\''+programListJoin+'\'' cmd = cleanupOldProgramsScript + ' ' + '\''+programListJoin+'\''
#result = oai.send_recv(cmd) #result = oai.send_recv(cmd)
#print result #print result
result = oai.send_expect_false(cmd, 'Match found', False) result = oai.send_expect_false(cmd, 'Match found', False)
print "Looking for old programs..." + result print "Looking for old programs..." + result
res=oai.send_recv(CleanUpAluLteBox, True) res=oai.send_recv(CleanUpAluLteBox, True)
res = oai.send_recv(ExmimoRfStop, False) cmd = "( " + ExmimoRfStop + " ) >> $HOME/.oai_test_setup_cleanup.log.`hostname` ; sync "
res=oai.send_recv(cmd, False)
#res = oai.send_recv(ExmimoRfStop, False)
cmd = " ( date ;echo \"Finished cleaning old programs.. \" ; dmesg | tail)>> $HOME/.oai_test_setup_cleanup.log.`hostname` 2>&1 ; sync"
res=oai.send_recv(cmd)
# \brief Class thread to launch a generic command on remote machine # \brief Class thread to launch a generic command on remote machine
# \param threadID number of thread (for book keeping) # \param threadID number of thread (for book keeping)
...@@ -1514,6 +1520,23 @@ for testcase in testcaseList: ...@@ -1514,6 +1520,23 @@ for testcase in testcaseList:
threadListGlobal = wait_testcaseclass_generic_threads(threadListGlobal, Timeout_execution) threadListGlobal = wait_testcaseclass_generic_threads(threadListGlobal, Timeout_execution)
#cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) #cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop)
handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, user, pw, CleanUpAluLteBox, ExmimoRfStop, nruns_lte_softmodem, Timeout_cmd ) handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, user, pw, CleanUpAluLteBox, ExmimoRfStop, nruns_lte_softmodem, Timeout_cmd )
#The lines below are copied from below to trace the failure of some of the machines in test setup. These lines below need to be removed in long term
print "Creating xml file for overall results..."
cmd = "cat $OPENAIR_DIR/cmake_targets/autotests/log/*/*.xml > $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml "
res=os.system(cmd)
os.system('sync')
print "Now copying files to NFS Share"
oai_localhost = openair('localdomain','localhost')
oai_localhost.connect(user,pw)
cmd = ' rm -fr ' + NFSTestsResultsDir + ' ; mkdir -p ' + NFSTestsResultsDir
res = oai_localhost.send_recv(cmd)
print "Deleting NFSTestResults Dir..." + res
print "Copying files from GilabCI Runner Machine : " + host + " .locallogdir = " + locallogdir + ", NFSTestsResultsDir = " + NFSTestsResultsDir
SSHSessionWrapper('localhost', user, None, pw , NFSTestsResultsDir , locallogdir, "put_all")
oai_localhost.disconnect()
elif (testcaseclass == 'compilation'): elif (testcaseclass == 'compilation'):
threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, user, pw, CleanUpAluLteBox,Timeout_execution, ExmimoRfStop) threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, user, pw, CleanUpAluLteBox,Timeout_execution, ExmimoRfStop)
elif (testcaseclass == 'execution'): elif (testcaseclass == 'execution'):
...@@ -1551,5 +1574,6 @@ print "Deleting NFSTestResults Dir..." + res ...@@ -1551,5 +1574,6 @@ print "Deleting NFSTestResults Dir..." + res
print "Copying files from GilabCI Runner Machine : " + host + " .locallogdir = " + locallogdir + ", NFSTestsResultsDir = " + NFSTestsResultsDir print "Copying files from GilabCI Runner Machine : " + host + " .locallogdir = " + locallogdir + ", NFSTestsResultsDir = " + NFSTestsResultsDir
SSHSessionWrapper('localhost', user, None, pw , NFSTestsResultsDir , locallogdir, "put_all") SSHSessionWrapper('localhost', user, None, pw , NFSTestsResultsDir , locallogdir, "put_all")
oai_localhost.disconnect()
sys.exit() sys.exit()
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
<GitOpenair-cnRepoBranch>develop</GitOpenair-cnRepoBranch> <GitOpenair-cnRepoBranch>develop</GitOpenair-cnRepoBranch>
<CleanUpOldProgs>oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* hss hss_sim configure_cots* wvdial* iperf iperf_script ping tshark rrh_gw</CleanUpOldProgs> <CleanUpOldProgs>oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* hss hss_sim configure_cots* wvdial* iperf iperf_script ping tshark rrh_gw</CleanUpOldProgs>
<CleanUpAluLteBox>sudo -S -E /opt/ltebox/tools/stop_ltebox</CleanUpAluLteBox> <CleanUpAluLteBox>sudo -S -E /opt/ltebox/tools/stop_ltebox</CleanUpAluLteBox>
<ExmimoRfStop>$OPENAIR_DIR/cmake_targets/build_oai -w EXMIMO -c; sudo -S -E $OPENAIR_DIR/cmake_targets/tools/stop_exmimo2; uname -a; dmesg|tail</ExmimoRfStop> <ExmimoRfStop>$OPENAIR_DIR/cmake_targets/build_oai -w EXMIMO -c; sudo -S -E $OPENAIR_DIR/cmake_targets/tools/stop_exmimo2; sudo -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_huaweiE398_ue.py --stop-ue; sudo -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue; sudo -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_sony_experia_m4_ue.py --stop-ue; uname -a; sudo -E dmesg|tail</ExmimoRfStop>
<Timeout_execution>36000</Timeout_execution> <Timeout_execution>36000</Timeout_execution>
<TestCaseExclusionList>0102+ 010304 010305 0104+ 015502 015505 015506 015507 015508 015509 015510 015511 015602 015605 015702 015705 015802 015805 016102 016105 016502 016505 0170+ 017502 017505 018002 018005 018502 018505 025502 025505</TestCaseExclusionList> <TestCaseExclusionList>0102+ 010304 010305 0104+ 015502 015505 015506 015507 015508 015509 015510 015511 015602 015605 015702 015705 015802 015805 016102 016105 016502 016505 017002 017005 017502 017505 018002 018005 018502 018505 025502 025505</TestCaseExclusionList>
<nruns_lte-softmodem>3</nruns_lte-softmodem> <nruns_lte-softmodem>3</nruns_lte-softmodem>
<MachineListGeneric>mozart calisson stevens nano amerique</MachineListGeneric> <MachineListGeneric>mozart calisson stevens nano amerique</MachineListGeneric>
<testCase id="010101" > <testCase id="010101" >
...@@ -5090,7 +5090,7 @@ ...@@ -5090,7 +5090,7 @@
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec> <eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
<eNB_pre_exec_args></eNB_pre_exec_args> <eNB_pre_exec_args></eNB_pre_exec_args>
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec> <eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W </eNB_main_exec_args> <eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_5MHz_rx19dB_txfull.ini -W </eNB_main_exec_args>
<eNB_traffic_exec></eNB_traffic_exec> <eNB_traffic_exec></eNB_traffic_exec>
<eNB_traffic_exec_args></eNB_traffic_exec_args> <eNB_traffic_exec_args></eNB_traffic_exec_args>
<eNB_search_expr_true></eNB_search_expr_true> <eNB_search_expr_true></eNB_search_expr_true>
...@@ -5130,7 +5130,7 @@ ...@@ -5130,7 +5130,7 @@
<EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec </EPC_search_expr_true> <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec </EPC_search_expr_true>
<EPC_search_expr_false></EPC_search_expr_false> <EPC_search_expr_false></EPC_search_expr_false>
<EPC_terminate_missing_procs>False</EPC_terminate_missing_procs> <EPC_terminate_missing_procs>False</EPC_terminate_missing_procs>
<tags>SoDeRa.ALU_EPC.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX</tags> <tags>LMSSDR.ALU_EPC.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX</tags>
<nruns>10</nruns> <nruns>10</nruns>
</testCase> </testCase>
...@@ -5166,7 +5166,7 @@ ...@@ -5166,7 +5166,7 @@
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec> <eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
<eNB_pre_exec_args></eNB_pre_exec_args> <eNB_pre_exec_args></eNB_pre_exec_args>
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec> <eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W </eNB_main_exec_args> <eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_10MHz_rx19dB_txfull.ini -W </eNB_main_exec_args>
<eNB_traffic_exec></eNB_traffic_exec> <eNB_traffic_exec></eNB_traffic_exec>
<eNB_traffic_exec_args></eNB_traffic_exec_args> <eNB_traffic_exec_args></eNB_traffic_exec_args>
<eNB_search_expr_true></eNB_search_expr_true> <eNB_search_expr_true></eNB_search_expr_true>
...@@ -5206,7 +5206,7 @@ ...@@ -5206,7 +5206,7 @@
<EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec </EPC_search_expr_true> <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec </EPC_search_expr_true>
<EPC_search_expr_false></EPC_search_expr_false> <EPC_search_expr_false></EPC_search_expr_false>
<EPC_terminate_missing_procs>False</EPC_terminate_missing_procs> <EPC_terminate_missing_procs>False</EPC_terminate_missing_procs>
<tags>SoDeRa.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX</tags> <tags>LMSSDR.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX</tags>
<nruns>10</nruns> <nruns>10</nruns>
</testCase> </testCase>
...@@ -5241,7 +5241,7 @@ ...@@ -5241,7 +5241,7 @@
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec> <eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
<eNB_pre_exec_args></eNB_pre_exec_args> <eNB_pre_exec_args></eNB_pre_exec_args>
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec> <eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W </eNB_main_exec_args> <eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_20MHz_rx19dB_txfull.ini </eNB_main_exec_args>
<eNB_traffic_exec></eNB_traffic_exec> <eNB_traffic_exec></eNB_traffic_exec>
<eNB_traffic_exec_args></eNB_traffic_exec_args> <eNB_traffic_exec_args></eNB_traffic_exec_args>
<eNB_search_expr_true></eNB_search_expr_true> <eNB_search_expr_true></eNB_search_expr_true>
...@@ -5281,7 +5281,7 @@ ...@@ -5281,7 +5281,7 @@
<EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec </EPC_search_expr_true> <EPC_search_expr_true>throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec </EPC_search_expr_true>
<EPC_search_expr_false></EPC_search_expr_false> <EPC_search_expr_false></EPC_search_expr_false>
<EPC_terminate_missing_procs>False</EPC_terminate_missing_procs> <EPC_terminate_missing_procs>False</EPC_terminate_missing_procs>
<tags>SoDeRa.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX</tags> <tags>LMSSDR.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX</tags>
<nruns>10</nruns> <nruns>10</nruns>
</testCase> </testCase>
...@@ -5316,7 +5316,7 @@ ...@@ -5316,7 +5316,7 @@
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec> <eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
<eNB_pre_exec_args></eNB_pre_exec_args> <eNB_pre_exec_args></eNB_pre_exec_args>
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec> <eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W </eNB_main_exec_args> <eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_5MHz_rx19dB_txfull.ini </eNB_main_exec_args>
<eNB_traffic_exec></eNB_traffic_exec> <eNB_traffic_exec></eNB_traffic_exec>
<eNB_traffic_exec_args></eNB_traffic_exec_args> <eNB_traffic_exec_args></eNB_traffic_exec_args>
<eNB_search_expr_true></eNB_search_expr_true> <eNB_search_expr_true></eNB_search_expr_true>
...@@ -5355,7 +5355,7 @@ ...@@ -5355,7 +5355,7 @@
<EPC_traffic_exec_args></EPC_traffic_exec_args> <EPC_traffic_exec_args></EPC_traffic_exec_args>
<EPC_search_expr_false></EPC_search_expr_false> <EPC_search_expr_false></EPC_search_expr_false>
<EPC_terminate_missing_procs>False</EPC_terminate_missing_procs> <EPC_terminate_missing_procs>False</EPC_terminate_missing_procs>
<tags>BladeRF.ALU_EPC.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX</tags> <tags>LMSSDR.ALU_EPC.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX</tags>
<nruns>10</nruns> <nruns>10</nruns>
</testCase> </testCase>
...@@ -5390,7 +5390,7 @@ ...@@ -5390,7 +5390,7 @@
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec> <eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
<eNB_pre_exec_args></eNB_pre_exec_args> <eNB_pre_exec_args></eNB_pre_exec_args>
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec> <eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W </eNB_main_exec_args> <eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_10MHz_rx19dB_txfull.ini</eNB_main_exec_args>
<eNB_traffic_exec></eNB_traffic_exec> <eNB_traffic_exec></eNB_traffic_exec>
<eNB_traffic_exec_args></eNB_traffic_exec_args> <eNB_traffic_exec_args></eNB_traffic_exec_args>
<eNB_search_expr_true></eNB_search_expr_true> <eNB_search_expr_true></eNB_search_expr_true>
...@@ -5464,7 +5464,7 @@ ...@@ -5464,7 +5464,7 @@
<eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec> <eNB_pre_exec>$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash</eNB_pre_exec>
<eNB_pre_exec_args></eNB_pre_exec_args> <eNB_pre_exec_args></eNB_pre_exec_args>
<eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec> <eNB_main_exec>sudo -E chrt -f 99 $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem</eNB_main_exec>
<eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W </eNB_main_exec_args> <eNB_main_exec_args> -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.lmssdr.conf -W --rf-config-file $OPENAIR_DIR/targets/ARCH/LMSSDR/enb_sodera_highband_20MHz_rx19dB_txfull.ini</eNB_main_exec_args>
<eNB_traffic_exec></eNB_traffic_exec> <eNB_traffic_exec></eNB_traffic_exec>
<eNB_traffic_exec_args></eNB_traffic_exec_args> <eNB_traffic_exec_args></eNB_traffic_exec_args>
<eNB_search_expr_true></eNB_search_expr_true> <eNB_search_expr_true></eNB_search_expr_true>
......
...@@ -180,11 +180,16 @@ def start_ue () : ...@@ -180,11 +180,16 @@ def start_ue () :
thread_ppp.join() thread_ppp.join()
def stop_ue(): def stop_ue():
timeout=60 stringIdBandrich='Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard'
os.system('killall wvdial') status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'')
send_command('AT', 'OK' , timeout) if (out == '') :
send_command('AT+CGATT=0' , 'OK|ERROR' , timeout) print "Huawei E398 Adapter not found. Exiting now..."
#send_command('AT+CFUN=4' , 'OK' , timeout) sys.exit()
timeout=60
os.system('killall wvdial')
send_command('AT', 'OK' , timeout)
send_command('AT+CGATT=0' , 'OK|ERROR' , timeout)
#send_command('AT+CFUN=4' , 'OK' , timeout)
#reset the USB BUS of Bandrich UE #reset the USB BUS of Bandrich UE
...@@ -192,7 +197,7 @@ def reset_ue(): ...@@ -192,7 +197,7 @@ def reset_ue():
stringIdBandrich='Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard' stringIdBandrich='Huawei Technologies Co., Ltd. E398 LTE/UMTS/GSM Modem/Networkcard'
status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'') status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'')
if (out == '') : if (out == '') :
print "Bandrich 4G LTE Adapter not found. Exiting now..." print "Huawei E398 Adapter not found. Exiting now..."
sys.exit() sys.exit()
p=re.compile('Bus\s*(\w+)\s*Device\s*(\w+):\s*ID\s*(\w+):(\w+)') p=re.compile('Bus\s*(\w+)\s*Device\s*(\w+):\s*ID\s*(\w+):(\w+)')
res=p.findall(out) res=p.findall(out)
......
...@@ -47,6 +47,7 @@ PRINT_STATS="False" ...@@ -47,6 +47,7 @@ PRINT_STATS="False"
VCD_TIMING="False" VCD_TIMING="False"
LOWLATENCY_FLAG_USER="False" LOWLATENCY_FLAG_USER="False"
FORCE_LOWLATENCY_FLAG_USER="" FORCE_LOWLATENCY_FLAG_USER=""
CPU_AFFINITY_FLAG_USER="True" #Only valid when lowlatecy flag is set to False
REL="Rel10" REL="Rel10"
HW="None" HW="None"
TP="None" TP="None"
...@@ -125,6 +126,8 @@ Options ...@@ -125,6 +126,8 @@ Options
Disables deadline scheduler of Linux kernel (>=3.14.x). Disables deadline scheduler of Linux kernel (>=3.14.x).
--enable-deadline --enable-deadline
Disables deadline scheduler of Linux kernel (>=3.14.x). Disables deadline scheduler of Linux kernel (>=3.14.x).
--disable-cpu-affinity
Disables CPU Affinity between UHD/TX/RX Threads (Valid only when deadline scheduler is disabled). By defaulT, CPU Affinity is enabled when not using deadline scheduler. It is enabled only with >2 CPUs. For eNB, CPU_0-> Device library (UHD), CPU_1->TX Threads, CPU_2...CPU_MAX->Rx Threads. For UE, CPU_0->Device Library(UHD), CPU_1..CPU_MAX -> All the UE threads
Usage (first build): Usage (first build):
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files
...@@ -263,6 +266,10 @@ function main() { ...@@ -263,6 +266,10 @@ function main() {
FORCE_LOWLATENCY_FLAG_USER="True" FORCE_LOWLATENCY_FLAG_USER="True"
echo_info "Enabling the usage of deadline scheduler" echo_info "Enabling the usage of deadline scheduler"
shift 1;; shift 1;;
--disable-cpu-affinity)
CPU_AFFINITY_FLAG_USER="False"
echo_info "Disabling CPU Affinity (only valid when not using deadline scheduler)"
shift 1;;
-h | --help) -h | --help)
print_help print_help
exit 1;; exit 1;;
...@@ -309,7 +316,7 @@ function main() { ...@@ -309,7 +316,7 @@ function main() {
#By default: EXMIMO: enable #By default: EXMIMO: enable
if [ "$FORCE_LOWLATENCY_FLAG_USER" = "" ]; then if [ "$FORCE_LOWLATENCY_FLAG_USER" = "" ]; then
if [ "$HW" = "EXMIMO" ] ; then if [ "$HW" = "EXMIMO" ] ; then
LOWLATENCY_FLAG_USER="True" LOWLATENCY_FLAG_USER="False"
elif [ "$HW" = "ETHERNET" ] ; then elif [ "$HW" = "ETHERNET" ] ; then
LOWLATENCY_FLAG_USER="True" LOWLATENCY_FLAG_USER="True"
elif [ "$HW" = "OAI_USRP" ] ; then elif [ "$HW" = "OAI_USRP" ] ; then
...@@ -328,8 +335,13 @@ function main() { ...@@ -328,8 +335,13 @@ function main() {
LOWLATENCY_FLAG_USER=$FORCE_LOWLATENCY_FLAG_USER LOWLATENCY_FLAG_USER=$FORCE_LOWLATENCY_FLAG_USER
fi fi
echo_info "Flags for Deadline scheduler: $LOWLATENCY_FLAG_USER" #Disable CPU Affinity for deadline scheduler
if [ "$LOWLATENCY_FLAG_USER" = "True" ] ; then
CPU_AFFINITY_FLAG_USER="False"
fi
echo_info "Flags for Deadline scheduler: $LOWLATENCY_FLAG_USER"
echo_info "Flags for CPU Affinity: $CPU_AFFINITY_FLAG_USER"
############################################ ############################################
# setting and printing OAI envs, we should check here # setting and printing OAI envs, we should check here
...@@ -421,6 +433,7 @@ function main() { ...@@ -421,6 +433,7 @@ function main() {
echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file
echo "set(PACKAGE_NAME \"${lte_exec}\")" >> $cmake_file echo "set(PACKAGE_NAME \"${lte_exec}\")" >> $cmake_file
echo "set (LOWLATENCY \"${LOWLATENCY_FLAG_USER}\" )" >>$cmake_file echo "set (LOWLATENCY \"${LOWLATENCY_FLAG_USER}\" )" >>$cmake_file
echo "set (CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$lte_build_dir/build cd $DIR/$lte_build_dir/build
cmake .. cmake ..
...@@ -449,7 +462,7 @@ function main() { ...@@ -449,7 +462,7 @@ function main() {
compilations \ compilations \
$lte_build_dir ue_ip \ $lte_build_dir ue_ip \
CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
# mkdir -p $DIR/at_commands/build # mkdir -p $DIR/at_commands/build
# cd $DIR/at_commands/build # cd $DIR/at_commands/build
# cmake .. # cmake ..
...@@ -472,6 +485,11 @@ function main() { ...@@ -472,6 +485,11 @@ function main() {
# generate USIM data # generate USIM data
if [ -f $dbin/nvram ]; then if [ -f $dbin/nvram ]; then
install_nas_tools $dbin $dconf install_nas_tools $dbin $dconf
echo_info "Copying UE specific part to $DIR/$lte_build_dir/build"
cp -Rvf $dbin/.ue_emm.nvram $DIR/$lte_build_dir/build
cp -Rvf $dbin/.ue.nvram $DIR/$lte_build_dir/build
cp -Rvf $dbin/.usim.nvram $DIR/$lte_build_dir/build
else else
echo_warning "not generated UE NAS files: binaries not found" echo_warning "not generated UE NAS files: binaries not found"
fi fi
...@@ -643,6 +661,7 @@ function main() { ...@@ -643,6 +661,7 @@ function main() {
echo "set(TRANSP_PRO \"${TP}\")" >> $cmake_file echo "set(TRANSP_PRO \"${TP}\")" >> $cmake_file
echo 'set(PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file echo 'set(PACKAGE_NAME "\"rrh_gw\"")' >> $cmake_file
echo "set (LOWLATENCY \"${LOWLATENCY_FLAG_USER}\" )" >>$cmake_file echo "set (LOWLATENCY \"${LOWLATENCY_FLAG_USER}\" )" >>$cmake_file
echo "set (CPU_AFFINITY \"${CPU_AFFINITY_FLAG_USER}\" )" >>$cmake_file
echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
cd $DIR/$rrh_build_dir/build cd $DIR/$rrh_build_dir/build
cmake .. cmake ..
......
...@@ -132,10 +132,21 @@ compilations() { ...@@ -132,10 +132,21 @@ compilations() {
############################################ ############################################
install_nettle_from_source() { install_nettle_from_source() {
nettle_install_log=$OPENAIR_DIR/cmake_targets/log/nettle_install_log.txt
echo_info "\nInstalling Nettle. The log file for nettle installation is here: $nettle_install_log "
(
cd /tmp cd /tmp
echo "Downloading nettle archive" echo "Downloading nettle archive"
rm -rf /tmp/nettle-2.5.tar.gz* /tmp/nettle-2.5 $SUDO rm -rf /tmp/nettle-2.5.tar.gz* /tmp/nettle-2.5
wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz wget https://ftp.gnu.org/gnu/nettle/nettle-2.5.tar.gz
if [ $? -ne 0 ]; then
wget ftp://ftp.lysator.liu.se/pub/security/lsh/nettle-2.5.tar.gz
fi
if [ ! -f nettle-2.5.tar.gz ]; then
echo_error "Could not download nettle source files"
cd -
return
fi
tar -xzf nettle-2.5.tar.gz tar -xzf nettle-2.5.tar.gz
cd nettle-2.5/ cd nettle-2.5/
./configure --disable-openssl --enable-shared --prefix=/usr ./configure --disable-openssl --enable-shared --prefix=/usr
...@@ -143,21 +154,32 @@ install_nettle_from_source() { ...@@ -143,21 +154,32 @@ install_nettle_from_source() {
make -j`nproc` make -j`nproc`
make check make check
$SUDO make install $SUDO make install
rm -rf /tmp/nettle-2.5.tar.gz /tmp/nettle-2.5 ) >& $nettle_install_log
} }
install_gnutls_from_source(){ install_gnutls_from_source(){
gnutls_install_log=$OPENAIR_DIR/cmake_targets/log/gnutls_install_log.txt
echo_info "\nInstalling Gnutls. The log file for Gnutls installation is here: $gnutls_install_log "
(
cd /tmp cd /tmp
echo "Downloading gnutls archive" echo "Downloading gnutls archive"
rm -rf /tmp/gnutls-3.1.23.tar.xz* /tmp/gnutls-3.1.23 $SUDO rm -rf /tmp/gnutls-3.1.23.tar.xz* /tmp/gnutls-3.1.23
wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz wget http://mirrors.dotsrc.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz
tar -xzf gnutls-3.1.23.tar.xz if [ $? -ne 0 ]; then
wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.23.tar.xz
fi
if [ ! -f gnutls-3.1.23.tar.xz ]; then
echo_error "Could not download gnutls source files"
cd -
return
fi
tar -xJf gnutls-3.1.23.tar.xz
cd gnutls-3.1.23/ cd gnutls-3.1.23/
./configure --prefix=/usr ./configure --prefix=/usr
echo "Compiling gnutls" echo "Compiling gnutls"
make -j`nproc` make -j`nproc`
$SUDO make install $SUDO make install
rm -rf /tmp/gnutls-3.1.23.tar.xz /tmp/gnutls-3.1.23 )>& $gnutls_install_log
} }
...@@ -274,12 +296,12 @@ check_install_oai_software() { ...@@ -274,12 +296,12 @@ check_install_oai_software() {
android-tools-adb android-tools-adb
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
if [ `lsb_release -rs` = '12.04' ] ; then
install_nettle_from_source # First we remove gnutls/nettle installation and then install from sources
install_gnutls_from_source $SUDO apt-get remove -y libgnutls-dev nettle-dev nettle-bin
else install_nettle_from_source
$SUDO apt-get install -y libgnutls-dev nettle-dev nettle-bin install_gnutls_from_source
fi
$SUDO pip install paramiko $SUDO pip install paramiko
$SUDO pip install pyroute2 $SUDO pip install pyroute2
install_asn1c_from_source install_asn1c_from_source
...@@ -288,8 +310,8 @@ check_install_oai_software() { ...@@ -288,8 +310,8 @@ check_install_oai_software() {
} }
install_asn1c_from_source(){ install_asn1c_from_source(){
asn1_install_dir=$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_dir " 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-r1516
mkdir -p /tmp/asn1c-r1516 mkdir -p /tmp/asn1c-r1516
...@@ -303,7 +325,7 @@ install_asn1c_from_source(){ ...@@ -303,7 +325,7 @@ install_asn1c_from_source(){
./configure ./configure
make -j`nproc` make -j`nproc`
$SUDO make install $SUDO make install
) > $asn1_install_dir 2>&1 ) > $asn1_install_log 2>&1
} }
################################################# #################################################
......
...@@ -81,8 +81,10 @@ function help() ...@@ -81,8 +81,10 @@ function help()
echo_error " " echo_error " "
echo_error "Options:" echo_error "Options:"
echo_error "Mandatory arguments to long options are mandatory for short options too." echo_error "Mandatory arguments to long options are mandatory for short options too."
echo_error " -a, --abstraction enable phy abstraction mode"
echo_error " -c, -C, --config-file eNB_config_file eNB config file, (see $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF)" echo_error " -c, -C, --config-file eNB_config_file eNB config file, (see $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF)"
echo_error " Default eNB config file if not set is $1" echo_error " Default eNB config file if not set is $1"
echo_error " -l, --log-level set the global log level (8:trace, 7:debug, 6:info, 4:warn, 3:error). Note that the log configuration is eNB config file is ignored for oaisim."
echo_error " -g, --gdb Run with GDB." echo_error " -g, --gdb Run with GDB."
echo_error " -h, --help Print this help." echo_error " -h, --help Print this help."
echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)" echo_error " -K, --itti-dump-file filename ITTI dump file containing all ITTI events occuring during EPC runtime.(can omit file name if last argument)"
...@@ -114,8 +116,14 @@ function main() ...@@ -114,8 +116,14 @@ function main()
until [ -z "$1" ] until [ -z "$1" ]
do do
case "$1" in case "$1" in
-a | --abstraction )
abstraction_flag=1
echo "enabling abstraction mode"
exe_arguments="$exe_arguments -a"
shift;
;;
-c | -C | --config-file) -c | -C | --config-file)
CONFIG_FILE_ENB=$2 CONFIG_FILE_ENB=$2
# may be relative path # may be relative path
if [ -f $(dirname $(readlink -f $0))/$CONFIG_FILE ]; then if [ -f $(dirname $(readlink -f $0))/$CONFIG_FILE ]; then
CONFIG_FILE_ENB=$(dirname $(readlink -f $0))/$CONFIG_FILE CONFIG_FILE_ENB=$(dirname $(readlink -f $0))/$CONFIG_FILE
...@@ -131,6 +139,11 @@ function main() ...@@ -131,6 +139,11 @@ function main()
fi fi
shift 2; shift 2;
;; ;;
-l | --log-level)
echo "setting the log level to $2"
exe_arguments="$exe_arguments -l $2"
shift 2;
;;
-g | --gdb) -g | --gdb)
run_gdb=1 run_gdb=1
echo "setting GDB flag to: $GDB" echo "setting GDB flag to: $GDB"
...@@ -241,7 +254,8 @@ function main() ...@@ -241,7 +254,8 @@ function main()
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
bash -c echo "200 lte " >> /etc/iproute2/rt_tables bash -c 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
ip route add default dev oip1 table lte ip route add default dev oip1 table lte
exe_arguments="$exe_arguments -s15 -AAWGN -y1 -b1 -u1 -Q0" exe_arguments="$exe_arguments -s15 -AAWGN -y1 -b1 -u1 -Q0"
......
This diff is collapsed.
#MAC_XFACE_OBJS = $(OPENAIR1_TOP)/MAC_INTERFACE/register.o
MAC_XFACE_OBJS += $(OPENAIR1_TOP)/MAC_INTERFACE/init.o
/*******************************************************************************
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
*******************************************************************************/
/*________________________mac_defs.h________________________
Authors : Hicham Anouar, Raymond Knopp
Company : EURECOM
Emails : anouar@eurecom.fr, knopp@eurecom.fr
________________________________________________________________*/
#ifndef __MAC_INTERFACE_DEFS_H__
#define __MAC_INTERFACE_DEFS_H__
#include "PHY_INTERFACE/defs.h"
#endif
/*******************************************************************************
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
*******************************************************************************/
/*________________________mac_extern.h________________________
Authors : Hicham Anouar, Raymond Knopp
Company : EURECOM
Emails : anouar@eurecom.fr, knopp@eurecom.fr
________________________________________________________________*/
/*! \file mac_extern.h
* \brief Generic mac interface external variable definitions
* \author R. Knopp
* \date March 2006
* \note
* \warning
* @ingroup macxface
*/
#ifndef __MAC_INTERFACE_EXTERN_H__
#define __MAC_INTERFACE_EXTERN_H__
#include "defs.h"
extern MAC_xface *mac_xface;
#endif /*__MAC_INTERFACE_EXTERN_H__ */
/*******************************************************************************
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
*******************************************************************************/
/*________________________mac_init.c________________________
Authors : Hicham Anouar, Raymond Knopp
Company : EURECOM
Emails : anouar@eurecom.fr, knopp@eurecom.fr
________________________________________________________________*/
/*!\brief Initilization and reconfiguration routines for generic MAC interface */
#include "defs.h"
#include "extern.h"
#include "SCHED/defs.h"
int mac_init(void)
{
int i;
#ifndef USER_MODE
// mac_xface->macphy_init();
mac_xface->macphy_exit = openair_sched_exit;
#else
mac_xface->macphy_exit=(void (*)(void)) exit;
#endif
/* this is done in cbmimo1_fileops
#ifdef OPENAIR2
mac_xface->macphy_init();
#endif //OPENAIR2
*/
return(1);
}
void mac_cleanup(void)
{
}
void mac_resynch(void)
{
}
/*
#ifdef OPENAIR2
EXPORT_SYMBOL(frame);
#endif //OPENAIR2
*/
/*******************************************************************************
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
*******************************************************************************/
/*________________________mac_register.c________________________
Authors : Hicham Anouar, Raymond Knopp
Company : EURECOM
Emails : anouar@eurecom.fr, knopp@eurecom.fr
________________________________________________________________*/
/*!\brief Registration routines for generic MAC interface. Register/unregister a MAC.
Upon registration, the MAC retrieves the transport channel (MAC_tch) data structure and provides the
pointer to the macphy_scheduler() routine*/
#define __NO_VERSION__
#undef __PHY_IMPLEMENTATION_DEFS_H__
#include "ARCH/CBMIMO1/DEVICE_DRIVER/defs.h"
#include "defs.h"
#include "extern.h"
#include "SCHED/extern.h"
#ifndef USER_MODE
void dummy_macphy_scheduler(uint8_t last_slot)
{
//if (last_slot == 0)
// mac_xface->frame++;
msg("[OPENAIR][MAC XFACE] in dummy_macphy_scheduler(): MAC no yet registered!\n");
//#ifdef EMOS
// phy_procedures(last_slot);
//#endif
}
void dummy_macphy_setparams(void *params)
{
msg("[OPENAIR][MAC XFACE] dummy_macphy_setparams(): no MAC registered!\n");
}
void dummy_macphy_init(void )
{
msg("[OPENAIR][MAC XFACE] dummy_macphy_init(): no MAC registered!\n");
}
MAC_xface *mac_register(void macphy_scheduler(uint8_t last_slot), void macphy_setparams(void *),void macphy_init(void ),void mrbch_phy_sync_failure(unsigned char,unsigned char),
void chbch_phy_sync_success(unsigned char,unsigned char))
{
if (openair_daq_vars.mac_registered == 0) {
msg("[OPENAIR][MAC XFACE] Registering new MAC interface at %p, scheduler %p, setparams at %p, init at %p\n",
mac_xface,macphy_scheduler,macphy_setparams,macphy_init);
mac_xface->macphy_scheduler = macphy_scheduler;
mac_xface->macphy_setparams = macphy_setparams;
mac_xface->macphy_init = macphy_init;
#ifndef PC_TARGET
// mac_xface->ublaze_mac_xface = ublaze_mac_xface;
#endif
openair_daq_vars.mac_registered=1;
return(mac_xface);
} else {
msg("[OPENAIR][MAC XFACE] MAC interface already registered, aborting ...\n");
return NULL;
}
}
int mac_unregister(MAC_xface *mac_xface_rx)
{
if (mac_xface_rx == mac_xface) {
msg("[OPENAIR][MAC XFACE] Unregistering MAC interface\n");
mac_xface->macphy_scheduler = dummy_macphy_scheduler;
mac_xface->macphy_setparams = dummy_macphy_setparams;
mac_xface->macphy_init = dummy_macphy_init;
openair_daq_vars.mac_registered=0;
return(0);
} else {
msg("[OPENAIR][MAC XFACE] Not the right interface descriptor pointer!!!, aborting ...\n");
return (-1);
}
}
EXPORT_SYMBOL(mac_register);
EXPORT_SYMBOL(mac_unregister);
#endif //USER_MODE
/*******************************************************************************
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
*******************************************************************************/
/*________________________mac_vars.h________________________
Authors : Hicham Anouar, Raymond Knopp
Company : EURECOM
Emails : anouar@eurecom.fr, knopp@eurecom.fr
________________________________________________________________*/
/*! \file mac_vars.h
* \brief generic mac interface variable definitions
* \author R. Knopp
* \version 1
* \date March 2006
* @ingroup macxface
*/
#ifndef __MAC_INTERFACE_VARS_H__
#define __MAC_INTERFACE_VARS_H__
#include "defs.h"
MAC_xface *mac_xface;
#endif //__MAC_INTERFACE_VARS_H__
This diff is collapsed.
This diff is collapsed.
...@@ -1000,6 +1000,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y, ...@@ -1000,6 +1000,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
// note: this makes valgrind freak
__m128i avg=_mm_set1_epi32(0); __m128i avg=_mm_set1_epi32(0);
for (i=0; i<(3*(n>>4))+1; i++) { for (i=0; i<(3*(n>>4))+1; i++) {
...@@ -1503,6 +1504,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y, ...@@ -1503,6 +1504,7 @@ unsigned char phy_threegpplte_turbo_decoder8(short *y,
tmp2=_mm_and_si128(tmp,mask); tmp2=_mm_and_si128(tmp,mask);
tmp2=_mm_cmpeq_epi16(tmp2,mask); tmp2=_mm_cmpeq_epi16(tmp2,mask);
// printf("decoded_bytes %p\n",decoded_bytes);
decoded_bytes[n_128*0+i]=(uint8_t) _mm_movemask_epi8(_mm_packs_epi16(tmp2,zeros)); decoded_bytes[n_128*0+i]=(uint8_t) _mm_movemask_epi8(_mm_packs_epi16(tmp2,zeros));
int j; int j;
......
...@@ -5,7 +5,7 @@ RATE12CC_SRC = ccoding_byte.c viterbi.c crc_byte.c ...@@ -5,7 +5,7 @@ RATE12CC_SRC = ccoding_byte.c viterbi.c crc_byte.c
all: 3gpplte_sse all: 3gpplte_sse
3gpplte_sse: $(TURBO_SRC) 3gpplte_sse: $(TURBO_SRC)
gcc -o 3gpplte_sse 3gpplte_sse.c -msse4 -Wall -g -ggdb -DMAIN gcc -o 3gpplte_sse 3gpplte_sse.c -msse4 -Wall -g -ggdb -DTC_MAIN -I../..
......
...@@ -303,6 +303,10 @@ void ccodedot11_init(void); ...@@ -303,6 +303,10 @@ void ccodedot11_init(void);
\brief This function initializes the trellis structure for decoding an 802.11 convolutional code.*/ \brief This function initializes the trellis structure for decoding an 802.11 convolutional code.*/
void ccodedot11_init_inv(void); void ccodedot11_init_inv(void);
/*!\fn void teillis_table_init(void)
\brief This function initializes the trellis structure for 3GPP LTE Turbo code.*/
void treillis_table_init(void);
/*\fn void threegpplte_turbo_encoder(uint8_t *input,uint16_t input_length_bytes,uint8_t *output,uint8_t F,uint16_t interleaver_f1,uint16_t interleaver_f2) /*\fn void threegpplte_turbo_encoder(uint8_t *input,uint16_t input_length_bytes,uint8_t *output,uint8_t F,uint16_t interleaver_f1,uint16_t interleaver_f2)
\brief This function implements a rate 1/3 8-state parralel concatenated turbo code (3GPP-LTE). \brief This function implements a rate 1/3 8-state parralel concatenated turbo code (3GPP-LTE).
@param input Pointer to input buffer @param input Pointer to input buffer
...@@ -353,6 +357,8 @@ void ccodedab_init(void); ...@@ -353,6 +357,8 @@ void ccodedab_init(void);
\brief This function initializes the trellis structure for decoding an DAB convolutional code (first 3 bits).*/ \brief This function initializes the trellis structure for decoding an DAB convolutional code (first 3 bits).*/
void ccodedab_init_inv(void); void ccodedab_init_inv(void);
/*!\fn void crcTableInit(void) /*!\fn void crcTableInit(void)
\brief This function initializes the different crc tables.*/ \brief This function initializes the different crc tables.*/
void crcTableInit (void); void crcTableInit (void);
...@@ -366,6 +372,17 @@ void init_td8 (void); ...@@ -366,6 +372,17 @@ void init_td8 (void);
\brief This function initializes the tables for 16-bit LLR Turbo decoder.*/ \brief This function initializes the tables for 16-bit LLR Turbo decoder.*/
void init_td16 (void); void init_td16 (void);
#ifdef __AVX2__
/*!\fn void init_td8(void)
\brief This function initializes the tables for 8-bit LLR Turbo decoder (AVX2).*/
void init_td8avx2 (void);
/*!\fn void init_td16(void)
\brief This function initializes the tables for 16-bit LLR Turbo decoder (AVX2).*/
void init_td16avx2 (void);
#endif
/*!\fn uint32_t crc24a(uint8_t *inPtr, int32_t bitlen) /*!\fn uint32_t crc24a(uint8_t *inPtr, int32_t bitlen)
\brief This computes a 24-bit crc ('a' variant for overall transport block) \brief This computes a 24-bit crc ('a' variant for overall transport block)
based on 3GPP UMTS/LTE specifications. based on 3GPP UMTS/LTE specifications.
...@@ -483,6 +500,24 @@ uint8_t phy_threegpplte_turbo_decoder16(int16_t *y, ...@@ -483,6 +500,24 @@ uint8_t phy_threegpplte_turbo_decoder16(int16_t *y,
time_stats_t *intl1_stats, time_stats_t *intl1_stats,
time_stats_t *intl2_stats); time_stats_t *intl2_stats);
uint8_t phy_threegpplte_turbo_decoder16avx2(int16_t *y,
int16_t *y2,
uint8_t *decoded_bytes,
uint8_t *decoded_bytes2,
uint16_t n,
uint16_t interleaver_f1,
uint16_t interleaver_f2,
uint8_t max_iterations,
uint8_t crc_type,
uint8_t F,
time_stats_t *init_stats,
time_stats_t *alpha_stats,
time_stats_t *beta_stats,
time_stats_t *gamma_stats,
time_stats_t *ext_stats,
time_stats_t *intl1_stats,
time_stats_t *intl2_stats);
/*! /*!
\brief This routine performs max-logmap detection for the 3GPP turbo code (with termination). It is optimized for SIMD processing and 8-bit \brief This routine performs max-logmap detection for the 3GPP turbo code (with termination). It is optimized for SIMD processing and 8-bit
LLR arithmetic, and requires SSE2,SSSE3 and SSE4.1 (gcc >=4.3 and appropriate CPU) LLR arithmetic, and requires SSE2,SSSE3 and SSE4.1 (gcc >=4.3 and appropriate CPU)
......
...@@ -495,8 +495,14 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC, ...@@ -495,8 +495,14 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC,
char fname[512]; char fname[512];
#endif #endif
Nir = Nsoft/Kmimo/cmin(8,Mdlharq); if (Mdlharq>0) { // Downlink
Ncb = cmin(Nir/C,3*(RTC<<5)); Nir = Nsoft/Kmimo/cmin(8,Mdlharq);
Ncb = cmin(Nir/C,3*(RTC<<5));
}
else { // Uplink
Nir=0;
Ncb = 3*(RTC<<5); // Kw
}
#ifdef RM_DEBUG_TX #ifdef RM_DEBUG_TX
if (rvidx==0 && r==0) { if (rvidx==0 && r==0) {
...@@ -709,15 +715,20 @@ int lte_rate_matching_turbo_rx(uint32_t RTC, ...@@ -709,15 +715,20 @@ int lte_rate_matching_turbo_rx(uint32_t RTC,
int nulled=0; int nulled=0;
#endif #endif
if (Kmimo==0 || Mdlharq==0 || C==0 || Qm==0 || Nl==0) { if (Kmimo==0 || C==0 || Qm==0 || Nl==0) {
printf("lte_rate_matching.c: invalid parameters (Kmimo %d, Mdlharq %d, C %d, Qm %d, Nl %d\n", printf("lte_rate_matching.c: invalid parameters (Kmimo %d, Mdlharq %d, C %d, Qm %d, Nl %d\n",
Kmimo,Mdlharq,C,Qm,Nl); Kmimo,Mdlharq,C,Qm,Nl);
return(-1); return(-1);
} }
Nir = Nsoft/Kmimo/cmin(8,Mdlharq); if (Mdlharq>0) { // Downlink
Ncb = cmin(Nir/C,3*(RTC<<5)); Nir = Nsoft/Kmimo/cmin(8,Mdlharq);
Ncb = cmin(Nir/C,3*(RTC<<5));
}
else { // Uplink
Nir=0;
Ncb = 3*(RTC<<5);
}
Gp = G/Nl/Qm; Gp = G/Nl/Qm;
GpmodC = Gp%C; GpmodC = Gp%C;
......
...@@ -26,17 +26,6 @@ ...@@ -26,17 +26,6 @@
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
*******************************************************************************/ *******************************************************************************/
/*
#ifdef CBMIMO1
#include "ARCH/COMMON/defs.h"
#include "ARCH/CBMIMO1/DEVICE_DRIVER/from_grlib_softconfig.h"
#include "ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_device.h"
#include "ARCH/CBMIMO1/DEVICE_DRIVER/defs.h"
#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h"
#include "ARCH/CBMIMO1/DEVICE_DRIVER/cbmimo1_pci.h"
//#include "pci_commands.h"
#endif //CBMIMO1
*/
#ifdef EXMIMO #ifdef EXMIMO
#include "openair0_lib.h" #include "openair0_lib.h"
#endif #endif
...@@ -888,12 +877,16 @@ void phy_init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms) ...@@ -888,12 +877,16 @@ void phy_init_lte_top(LTE_DL_FRAME_PARMS *lte_frame_parms)
ccodelte_init(); ccodelte_init();
ccodelte_init_inv(); ccodelte_init_inv();
treillis_table_init();
phy_generate_viterbi_tables(); phy_generate_viterbi_tables();
phy_generate_viterbi_tables_lte(); phy_generate_viterbi_tables_lte();
init_td8(); init_td8();
init_td16(); init_td16();
#ifdef __AVX2__
init_td16avx2();
#endif
lte_sync_time_init(lte_frame_parms); lte_sync_time_init(lte_frame_parms);
...@@ -1049,7 +1042,7 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue, ...@@ -1049,7 +1042,7 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue,
// init TX buffers // init TX buffers
ue_common_vars->txdata = (int32_t**)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) ); ue_common_vars->txdata = (int32_t**)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) );
ue_common_vars->txdataF = (mod_sym_t **)malloc16( frame_parms->nb_antennas_tx*sizeof(mod_sym_t*) ); ue_common_vars->txdataF = (int32_t **)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) );
for (i=0; i<frame_parms->nb_antennas_tx; i++) { for (i=0; i<frame_parms->nb_antennas_tx; i++) {
#ifdef USER_MODE #ifdef USER_MODE
...@@ -1057,7 +1050,7 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue, ...@@ -1057,7 +1050,7 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue,
#else //USER_MODE #else //USER_MODE
ue_common_vars->txdata[i] = TX_DMA_BUFFER[0][i]; ue_common_vars->txdata[i] = TX_DMA_BUFFER[0][i];
#endif //USER_MODE #endif //USER_MODE
ue_common_vars->txdataF[i] = (mod_sym_t *)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t) ); ue_common_vars->txdataF[i] = (int32_t *)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(int32_t) );
} }
// init RX buffers // init RX buffers
...@@ -1270,21 +1263,21 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB, ...@@ -1270,21 +1263,21 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
// TX vars // TX vars
eNB_common_vars->txdata[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) ); eNB_common_vars->txdata[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) );
eNB_common_vars->txdataF[eNB_id] = (mod_sym_t **)malloc16( frame_parms->nb_antennas_tx*sizeof(mod_sym_t*) ); eNB_common_vars->txdataF[eNB_id] = (int32_t **)malloc16( frame_parms->nb_antennas_tx*sizeof(int32_t*) );
for (i=0; i<frame_parms->nb_antennas_tx; i++) { for (i=0; i<frame_parms->nb_antennas_tx; i++) {
#ifdef USER_MODE #ifdef USER_MODE
eNB_common_vars->txdata[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(int32_t) ); eNB_common_vars->txdata[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(int32_t) );
eNB_common_vars->txdataF[eNB_id][i] = (mod_sym_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t) ); eNB_common_vars->txdataF[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(int32_t) );
#else // USER_MODE #else // USER_MODE
eNB_common_vars->txdata[eNB_id][i] = TX_DMA_BUFFER[eNB_id][i]; eNB_common_vars->txdata[eNB_id][i] = TX_DMA_BUFFER[eNB_id][i];
eNB_common_vars->txdataF[eNB_id][i] = (mod_sym_t *)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t) ); eNB_common_vars->txdataF[eNB_id][i] = (int32_t *)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(int32_t) );
#endif //USER_MODE #endif //USER_MODE
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->txdata[%d][%d] = %p\n",eNB_id,i,eNB_common_vars->txdata[eNB_id][i]); msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->txdata[%d][%d] = %p\n",eNB_id,i,eNB_common_vars->txdata[eNB_id][i]);
msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->txdataF[%d][%d] = %p (%d bytes)\n", msg("[openair][LTE_PHY][INIT] lte_eNB_common_vars->txdataF[%d][%d] = %p (%d bytes)\n",
eNB_id,i,eNB_common_vars->txdataF[eNB_id][i], eNB_id,i,eNB_common_vars->txdataF[eNB_id][i],
FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t)); FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(int32_t));
#endif #endif
} }
......
...@@ -45,6 +45,7 @@ void lte_param_init(unsigned char N_tx, ...@@ -45,6 +45,7 @@ void lte_param_init(unsigned char N_tx,
lte_frame_parms->N_RB_UL = N_RB_DL; lte_frame_parms->N_RB_UL = N_RB_DL;
lte_frame_parms->threequarter_fs = threequarter_fs; lte_frame_parms->threequarter_fs = threequarter_fs;
lte_frame_parms->Ncp = extended_prefix_flag; lte_frame_parms->Ncp = extended_prefix_flag;
lte_frame_parms->Ncp_UL = extended_prefix_flag;
lte_frame_parms->Nid_cell = Nid_cell; lte_frame_parms->Nid_cell = Nid_cell;
lte_frame_parms->nushift = Nid_cell%6; lte_frame_parms->nushift = Nid_cell%6;
lte_frame_parms->nb_antennas_tx = N_tx; lte_frame_parms->nb_antennas_tx = N_tx;
......
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "MAC_INTERFACE/defs.h"
#include "MAC_INTERFACE/extern.h"
#ifdef EXMIMO #ifdef EXMIMO
#include "openair0_lib.h" #include "openair0_lib.h"
......
This diff is collapsed.
...@@ -29,8 +29,6 @@ ...@@ -29,8 +29,6 @@
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "MAC_INTERFACE/defs.h"
#include "MAC_INTERFACE/extern.h"
#define DEBUG_PHY #define DEBUG_PHY
......
...@@ -203,8 +203,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -203,8 +203,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
multadd_complex_vector_real_scalar(dl_ch-(phy_vars_ue->lte_frame_parms.ofdm_symbol_size<<1), multadd_complex_vector_real_scalar(dl_ch-(phy_vars_ue->lte_frame_parms.ofdm_symbol_size<<1),
phy_vars_ue->ch_est_alpha,dl_ch-(phy_vars_ue->lte_frame_parms.ofdm_symbol_size<<1), phy_vars_ue->ch_est_alpha,dl_ch-(phy_vars_ue->lte_frame_parms.ofdm_symbol_size<<1),
1,phy_vars_ue->lte_frame_parms.ofdm_symbol_size); 1,phy_vars_ue->lte_frame_parms.ofdm_symbol_size);
#ifdef DEBUG_CH
printf("k %d, first_carrier %d\n",k,phy_vars_ue->lte_frame_parms.first_carrier_offset);
#endif
if ((phy_vars_ue->lte_frame_parms.N_RB_DL==6) || if ((phy_vars_ue->lte_frame_parms.N_RB_DL==6) ||
(phy_vars_ue->lte_frame_parms.N_RB_DL==50) || (phy_vars_ue->lte_frame_parms.N_RB_DL==50) ||
(phy_vars_ue->lte_frame_parms.N_RB_DL==100)) { (phy_vars_ue->lte_frame_parms.N_RB_DL==100)) {
...@@ -213,7 +214,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -213,7 +214,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
// Treat first 2 pilots specially (left edge) // Treat first 2 pilots specially (left edge)
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
// printf("pilot 0 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]); #ifdef DEBUG_CH
printf("pilot 0 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
#endif
multadd_real_vector_complex_scalar(fl, multadd_real_vector_complex_scalar(fl,
ch, ch,
dl_ch, dl_ch,
...@@ -224,7 +227,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -224,7 +227,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
// printf("pilot 1 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]); #ifdef DEBUG_CH
printf("pilot 1 : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
#endif
multadd_real_vector_complex_scalar(f2l2, multadd_real_vector_complex_scalar(f2l2,
ch, ch,
dl_ch, dl_ch,
...@@ -235,15 +240,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -235,15 +240,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
for (pilot_cnt=2; pilot_cnt<((phy_vars_ue->lte_frame_parms.N_RB_DL)-1); pilot_cnt+=2) { for (pilot_cnt=2; pilot_cnt<((phy_vars_ue->lte_frame_parms.N_RB_DL)-1); pilot_cnt+=2) {
// printf("%d\n",dl_ch-(int16_t *)&dl_ch_estimates[(p<<1)+aarx][ch_offset]);
// printf("pilot[%d][%d] (%d,%d)\n",p,pilot_cnt,pil[0],pil[1]);
// printf("rx[%d] -> (%d,%d)\n", k, rxF[0], rxF[1]);
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); //Re ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); //Re
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); //Im ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); //Im
// printf("**rb %d %d\n",rb,dl_ch-(int16_t *)&dl_ch_estimates[(p<<1)+aarx][ch_offset]); #ifdef DEBUG_CH
printf("pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
#endif
multadd_real_vector_complex_scalar(f, multadd_real_vector_complex_scalar(f,
ch, ch,
dl_ch, dl_ch,
...@@ -254,13 +257,11 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -254,13 +257,11 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
rxF+=12; rxF+=12;
dl_ch+=8; dl_ch+=8;
// printf("pilot[%d][%d] (%d,%d)\n",p,rb,pil[0],pil[1]);
// printf("rx[%d] -> (%d,%d)\n", k+6, rxF[0], rxF[1]);
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
// printf("**rb %d %d\n",rb,dl_ch-(int16_t *)&dl_ch_estimates[(p<<1)+aarx][ch_offset]); #ifdef DEBUG_CH
printf("pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt+1,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
#endif
multadd_real_vector_complex_scalar(f2, multadd_real_vector_complex_scalar(f2,
ch, ch,
dl_ch, dl_ch,
...@@ -281,15 +282,17 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -281,15 +282,17 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
rxF = (int16_t *)&rxdataF[aarx][((symbol_offset+1+k))]; rxF = (int16_t *)&rxdataF[aarx][((symbol_offset+1+k))];
#ifdef DEBUG_CH
printf("second half k %d\n",k);
#endif
for (pilot_cnt=0; pilot_cnt<((phy_vars_ue->lte_frame_parms.N_RB_DL)-3); pilot_cnt+=2) { for (pilot_cnt=0; pilot_cnt<((phy_vars_ue->lte_frame_parms.N_RB_DL)-3); pilot_cnt+=2) {
// printf("pilot[%d][%d] (%d,%d)\n",p,pilot_cnt,pil[0],pil[1]);
// printf("rx[%d] -> (%d,%d)\n", k+6, rxF[0], rxF[1]);
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
#ifdef DEBUG_CH
// printf("**rb %d %d\n",rb,dl_ch-(int16_t *)&dl_ch_estimates[(p<<1)+aarx][ch_offset]); printf("pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
#endif
multadd_real_vector_complex_scalar(f, multadd_real_vector_complex_scalar(f,
ch, ch,
dl_ch, dl_ch,
...@@ -300,8 +303,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -300,8 +303,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
#ifdef DEBUG_CH
// printf("**rb %d %d\n",rb,dl_ch-(int16_T *)&dl_ch_estimates[(p<<1)+aarx][ch_offset]); printf("pilot %d : rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt+1,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
#endif
multadd_real_vector_complex_scalar(f2, multadd_real_vector_complex_scalar(f2,
ch, ch,
dl_ch, dl_ch,
...@@ -314,8 +318,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -314,8 +318,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
// printf("pilot 49: rxF -> (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]); #ifdef DEBUG_CH
printf("pilot %d: rxF -> (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
#endif
multadd_real_vector_complex_scalar(fr, multadd_real_vector_complex_scalar(fr,
ch, ch,
dl_ch, dl_ch,
...@@ -326,7 +331,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -326,7 +331,9 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue,
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
// printf("pilot 50: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]); #ifdef DEBUG_CH
printf("pilot %d: rxF - > (%d,%d) ch -> (%d,%d), pil -> (%d,%d) \n",pilot_cnt+1,rxF[0],rxF[1],ch[0],ch[1],pil[0],pil[1]);
#endif
multadd_real_vector_complex_scalar(f2r2, multadd_real_vector_complex_scalar(f2r2,
ch, ch,
dl_ch, dl_ch,
......
...@@ -771,7 +771,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -771,7 +771,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *phy_vars_ue,
break; break;
case 75: case 75:
idft1536((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][8], idft1536((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][aa]); (int16_t*) phy_vars_ue->lte_ue_common_vars.dl_ch_estimates_time[eNB_offset][aa],
1);
break; break;
case 100: case 100:
idft2048((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][8], idft2048((int16_t*) &phy_vars_ue->lte_ue_common_vars.dl_ch_estimates[eNB_offset][aa][8],
......
...@@ -56,7 +56,6 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB, ...@@ -56,7 +56,6 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
int32_t n0_power_tot; int32_t n0_power_tot;
int len; int len;
int offset; int offset;
//int Nsymb = (frame_parms->Ncp==NORMAL)?14:12;
// noise measurements // noise measurements
// for the moment we measure the noise on the 7th OFDM symbol (in S subframe) // for the moment we measure the noise on the 7th OFDM symbol (in S subframe)
...@@ -68,8 +67,8 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB, ...@@ -68,8 +67,8 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
phy_measurements->n0_power[aarx] = ((k1*signal_energy(&eNB_common_vars->rxdata[eNB_id][aarx][(frame_parms->samples_per_tti<<1) -frame_parms->ofdm_symbol_size], phy_measurements->n0_power[aarx] = ((k1*signal_energy(&eNB_common_vars->rxdata[eNB_id][aarx][(frame_parms->samples_per_tti<<1) -frame_parms->ofdm_symbol_size],
frame_parms->ofdm_symbol_size)) + k2*phy_measurements->n0_power[aarx])>>10; frame_parms->ofdm_symbol_size)) + k2*phy_measurements->n0_power[aarx])>>10;
phy_measurements->n0_power[aarx] = (phy_measurements->n0_power[aarx] * 12*frame_parms->N_RB_DL)/(frame_parms->ofdm_symbol_size); //phy_measurements->n0_power[aarx] = (phy_measurements->n0_power[aarx]) * 12*frame_parms->N_RB_DL)/(frame_parms->ofdm_symbol_size);
phy_measurements->n0_power_dB[aarx] = (unsigned short) dB_fixed(phy_measurements->n0_power[aarx]); phy_measurements->n0_power_dB[aarx] = (unsigned short) dB_fixed(phy_measurements->n0_power[aarx]);
phy_measurements->n0_power_tot += phy_measurements->n0_power[aarx]; phy_measurements->n0_power_tot += phy_measurements->n0_power[aarx];
} }
...@@ -88,7 +87,7 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB, ...@@ -88,7 +87,7 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB,
// select the 7th symbol in an uplink subframe // select the 7th symbol in an uplink subframe
offset = (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size; offset = (frame_parms->first_carrier_offset + (rb*12))%frame_parms->ofdm_symbol_size;
offset += (7*frame_parms->ofdm_symbol_size);//(((Nsymb*subframe)+7)*frame_parms->ofdm_symbol_size); offset += (7*frame_parms->ofdm_symbol_size);
ul_ch = &eNB_common_vars->rxdataF[eNB_id][aarx][offset]; ul_ch = &eNB_common_vars->rxdataF[eNB_id][aarx][offset];
len = 12; len = 12;
// just do first half of middle PRB for odd number of PRBs // just do first half of middle PRB for odd number of PRBs
......
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SCHED/extern.h" #include "SCHED/extern.h"
#include "MAC_INTERFACE/defs.h"
#include "MAC_INTERFACE/extern.h"
#include <math.h> #include <math.h>
#ifdef OPENAIR2 #ifdef OPENAIR2
...@@ -52,8 +50,8 @@ ...@@ -52,8 +50,8 @@
int* sync_corr_ue0 = NULL; int* sync_corr_ue0 = NULL;
int* sync_corr_ue1 = NULL; int* sync_corr_ue1 = NULL;
int* sync_corr_ue2 = NULL; int* sync_corr_ue2 = NULL;
int sync_tmp[2048*4] __attribute__((aligned(16))); int sync_tmp[2048*4] __attribute__((aligned(32)));
short syncF_tmp[2048*2] __attribute__((aligned(16))); short syncF_tmp[2048*2] __attribute__((aligned(32)));
...@@ -172,12 +170,13 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -172,12 +170,13 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
case 75: case 75:
idft1536((short*)syncF_tmp, /// complex input idft1536((short*)syncF_tmp, /// complex input
(short*)sync_tmp); /// complex output (short*)sync_tmp,
1); /// complex output
break; break;
case 100: case 100:
idft2048((short*)syncF_tmp, /// complex input idft2048((short*)syncF_tmp, /// complex input
(short*)sync_tmp, /// complex output (short*)sync_tmp, /// complex output
1); 1);
break; break;
default: default:
LOG_E(PHY,"Unsupported N_RB_DL %d\n",frame_parms->N_RB_DL); LOG_E(PHY,"Unsupported N_RB_DL %d\n",frame_parms->N_RB_DL);
...@@ -219,8 +218,8 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -219,8 +218,8 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
case 75: case 75:
idft1536((short*)syncF_tmp, /// complex input idft1536((short*)syncF_tmp, /// complex input
(short*)sync_tmp /// complex output (short*)sync_tmp, /// complex output
); 1);
break; break;
case 100: case 100:
idft2048((short*)syncF_tmp, /// complex input idft2048((short*)syncF_tmp, /// complex input
...@@ -267,8 +266,8 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com ...@@ -267,8 +266,8 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
case 75: case 75:
idft1536((short*)syncF_tmp, /// complex input idft1536((short*)syncF_tmp, /// complex input
(short*)sync_tmp /// complex output (short*)sync_tmp, /// complex output
); 1);
break; break;
case 100: case 100:
idft2048((short*)syncF_tmp, /// complex input idft2048((short*)syncF_tmp, /// complex input
...@@ -346,6 +345,8 @@ static inline int abs32(int x) ...@@ -346,6 +345,8 @@ static inline int abs32(int x)
int debug_cnt=0; int debug_cnt=0;
#endif #endif
#define SHIFT 17
int lte_sync_time(int **rxdata, ///rx data in time domain int lte_sync_time(int **rxdata, ///rx data in time domain
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
int *eNB_id) int *eNB_id)
...@@ -414,8 +415,8 @@ int lte_sync_time(int **rxdata, ///rx data in time domain ...@@ -414,8 +415,8 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n]; //calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) { for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
result = dot_product((short*)primary_synch0_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, 15); result = dot_product((short*)primary_synch0_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
result2 = dot_product((short*)primary_synch0_time, (short*) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, 15); result2 = dot_product((short*)primary_synch0_time, (short*) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, SHIFT);
((short*)sync_corr_ue0)[2*n] += ((short*) &result)[0]; ((short*)sync_corr_ue0)[2*n] += ((short*) &result)[0];
((short*)sync_corr_ue0)[2*n+1] += ((short*) &result)[1]; ((short*)sync_corr_ue0)[2*n+1] += ((short*) &result)[1];
...@@ -428,8 +429,8 @@ int lte_sync_time(int **rxdata, ///rx data in time domain ...@@ -428,8 +429,8 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
} }
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) { for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
result = dot_product((short*)primary_synch1_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, 15); result = dot_product((short*)primary_synch1_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
result2 = dot_product((short*)primary_synch1_time, (short*) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, 15); result2 = dot_product((short*)primary_synch1_time, (short*) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, SHIFT);
((short*)sync_corr_ue1)[2*n] += ((short*) &result)[0]; ((short*)sync_corr_ue1)[2*n] += ((short*) &result)[0];
((short*)sync_corr_ue1)[2*n+1] += ((short*) &result)[1]; ((short*)sync_corr_ue1)[2*n+1] += ((short*) &result)[1];
((short*)sync_corr_ue1)[2*(length+n)] += ((short*) &result2)[0]; ((short*)sync_corr_ue1)[2*(length+n)] += ((short*) &result2)[0];
...@@ -443,8 +444,8 @@ int lte_sync_time(int **rxdata, ///rx data in time domain ...@@ -443,8 +444,8 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) { for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
result = dot_product((short*)primary_synch2_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, 15); result = dot_product((short*)primary_synch2_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
result2 = dot_product((short*)primary_synch2_time, (short*) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, 15); result2 = dot_product((short*)primary_synch2_time, (short*) &(rxdata[ar][n+length]), frame_parms->ofdm_symbol_size, SHIFT);
((short*)sync_corr_ue2)[2*n] += ((short*) &result)[0]; ((short*)sync_corr_ue2)[2*n] += ((short*) &result)[0];
((short*)sync_corr_ue2)[2*n+1] += ((short*) &result)[1]; ((short*)sync_corr_ue2)[2*n+1] += ((short*) &result)[1];
((short*)sync_corr_ue2)[2*(length+n)] += ((short*) &result2)[0]; ((short*)sync_corr_ue2)[2*(length+n)] += ((short*) &result2)[0];
...@@ -558,7 +559,7 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain ...@@ -558,7 +559,7 @@ int lte_sync_time_eNB(int32_t **rxdata, ///rx data in time domain
//calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n]; //calculate dot product of primary_synch0_time and rxdata[ar][n] (ar=0..nb_ant_rx) and store the sum in temp[n];
for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) { for (ar=0; ar<frame_parms->nb_antennas_rx; ar++) {
result = dot_product((short*)primary_synch_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, 15); result = dot_product((short*)primary_synch_time, (short*) &(rxdata[ar][n]), frame_parms->ofdm_symbol_size, SHIFT);
//((short*)sync_corr)[2*n] += ((short*) &result)[0]; //((short*)sync_corr)[2*n] += ((short*) &result)[0];
//((short*)sync_corr)[2*n+1] += ((short*) &result)[1]; //((short*)sync_corr)[2*n+1] += ((short*) &result)[1];
sync_corr_eNB[n] += abs32(result); sync_corr_eNB[n] += abs32(result);
......
...@@ -56,8 +56,8 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq) ...@@ -56,8 +56,8 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq)
{ {
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
UE_SCAN_INFO_t *scan_info = &ue->scan_info[band]; UE_SCAN_INFO_t *scan_info = &ue->scan_info[band];
int16_t spectrum[12288] __attribute__((aligned(16))); int16_t spectrum[12288] __attribute__((aligned(32)));
int16_t spectrum_p5ms[12288] __attribute__((aligned(16))); int16_t spectrum_p5ms[12288] __attribute__((aligned(32)));
int i,f,band_idx; int i,f,band_idx;
__m128i autocorr0[256/4],autocorr1[256/4],autocorr2[256/4]; __m128i autocorr0[256/4],autocorr1[256/4],autocorr2[256/4];
__m128i autocorr0_t[256/4],autocorr1_t[256/4],autocorr2_t[256/4]; __m128i autocorr0_t[256/4],autocorr1_t[256/4],autocorr2_t[256/4];
......
...@@ -73,7 +73,7 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl ...@@ -73,7 +73,7 @@ void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_tabl
int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
mod_sym_t *output, int32_t *output,
short amp, short amp,
unsigned char Ns, unsigned char Ns,
unsigned char l, unsigned char l,
...@@ -89,7 +89,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -89,7 +89,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
*/ */
int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB, int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
uint8_t UE_id, uint8_t UE_id,
mod_sym_t *output, int32_t *output,
short amp, short amp,
uint8_t Ns, uint8_t Ns,
uint8_t p, uint8_t p,
...@@ -102,7 +102,7 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -102,7 +102,7 @@ int lte_dl_ue_spec(PHY_VARS_eNB *phy_vars_eNB,
@param Ns Slot number (0..19) @param Ns Slot number (0..19)
@param l symbol (0,1,2) @param l symbol (0,1,2)
*/ */
int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, mod_sym_t *output, int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
short amp, short amp,
int subframe, int subframe,
unsigned char l); unsigned char l);
...@@ -148,7 +148,7 @@ void free_ul_ref_sigs(void); ...@@ -148,7 +148,7 @@ void free_ul_ref_sigs(void);
@sub_frame_offset Offset of this subframe in units of subframes @sub_frame_offset Offset of this subframe in units of subframes
*/ */
int lte_generate_srs(mod_sym_t **txdataF, int lte_generate_srs(int32_t **txdataF,
short amp, short amp,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
unsigned int sub_frame_offset); unsigned int sub_frame_offset);
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
//Calibration //Calibration
int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB, int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
mod_sym_t *output, int32_t *output,
short amp, short amp,
unsigned char Ns, unsigned char Ns,
unsigned char l,//nb of sym per slot unsigned char l,//nb of sym per slot
...@@ -50,7 +50,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB, ...@@ -50,7 +50,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
unsigned char nu,mprime,mprime_dword,mprime_qpsk_symb,m; unsigned char nu,mprime,mprime_dword,mprime_qpsk_symb,m;
unsigned short k,a; unsigned short k,a;
mod_sym_t qpsk[4]; int32_t qpsk[4];
a = (amp*ONE_OVER_SQRT2_Q15)>>15; a = (amp*ONE_OVER_SQRT2_Q15)>>15;
((short *)&qpsk[0])[0] = a; ((short *)&qpsk[0])[0] = a;
...@@ -121,7 +121,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB, ...@@ -121,7 +121,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB,
int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
mod_sym_t *output, int32_t *output,
short amp, short amp,
unsigned char Ns, unsigned char Ns,
unsigned char l, unsigned char l,
...@@ -130,7 +130,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, ...@@ -130,7 +130,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB,
unsigned char nu,mprime,mprime_dword,mprime_qpsk_symb,m; unsigned char nu,mprime,mprime_dword,mprime_qpsk_symb,m;
unsigned short k,a; unsigned short k,a;
mod_sym_t qpsk[4]; int32_t qpsk[4];
a = (amp*ONE_OVER_SQRT2_Q15)>>15; a = (amp*ONE_OVER_SQRT2_Q15)>>15;
((short *)&qpsk[0])[0] = a; ((short *)&qpsk[0])[0] = a;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
//extern unsigned int lte_gold_table[10][3][42]; //extern unsigned int lte_gold_table[10][3][42];
//#define DEBUG_DL_MBSFN //#define DEBUG_DL_MBSFN
int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, mod_sym_t *output, int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, int32_t *output,
short amp, short amp,
int subframe, int subframe,
unsigned char l) unsigned char l)
...@@ -47,7 +47,7 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, mod_sym_t *output, ...@@ -47,7 +47,7 @@ int lte_dl_mbsfn(PHY_VARS_eNB *phy_vars_eNB, mod_sym_t *output,
unsigned int mprime,mprime_dword,mprime_qpsk_symb,m; unsigned int mprime,mprime_dword,mprime_qpsk_symb,m;
unsigned short k=0,a; unsigned short k=0,a;
mod_sym_t qpsk[4]; int32_t qpsk[4];
a = (amp*ONE_OVER_SQRT2_Q15)>>15; a = (amp*ONE_OVER_SQRT2_Q15)>>15;
((short *)&qpsk[0])[0] = a; ((short *)&qpsk[0])[0] = a;
......
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.
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
int generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB, int generate_mbsfn_pilot(PHY_VARS_eNB *phy_vars_eNB,
mod_sym_t **txdataF, int32_t **txdataF,
int16_t amp, int16_t amp,
uint16_t subframe) uint16_t subframe)
{ {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment