diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000..c75f8fa464 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,32 @@ +job1: + script: + - echo $PWD + - echo $USER + - echo $OAI_USER + - echo $OAI_EXTRA_ARGS + - echo $NFS_SHARE_DIR + - echo $EXTERNAL_SHARE_DIR + - echo $SHELL + - git rev-parse --abbrev-ref HEAD + - git_head=`git rev-parse HEAD` + - echo $git_head + - tmp=`git show-ref --head | grep $git_head` + - tmp=(${tmp///// }) + - git_branch=${tmp[@]:(-1)} + - echo $git_branch + - source oaienv + - echo $OPENAIR_DIR + - NFS_TEST_RESULTS_DIR=$NFS_SHARE_DIR/$git_branch/$git_head + - EXTERNAL_SHARE_RESULTS_DIR=$EXTERNAL_SHARE_DIR/$git_branch/$git_head + - echo $NFS_TEST_RESULTS_DIR + - echo $EXTERNAL_SHARE_RESULTS_DIR + - echo $NRUNS_LTE_SOFTMODEM + - echo $TIMEOUT_CMD + - mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log + - python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -c -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS $OAI_EXTRA_ARGS -g "$OAI_TEST_CASE_GROUP">& $OPENAIR_DIR/cmake_targets/autotests/python_autotest_cleanup.log + - python $OPENAIR_DIR/cmake_targets/autotests/run_exec_lte-softmodem_tests.py -r -5GRepoHeadVersion $git_head -n $NFS_SHARE_DIR -u $OAI_USER -p $OAI_PASS `echo $OAI_EXTRA_ARGS` -g "$OAI_TEST_CASE_GROUP" --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_cleanup.log $OPENAIR_DIR/cmake_targets/autotests/log/python_autotest_cleanup.log + - sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $NFS_TEST_RESULTS_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$NFS_TEST_RESULTS_DIR + - sshpass -p "$OAI_PASS" rsync -az -e "ssh -o StrictHostKeyChecking=no " --rsync-path="mkdir -p $EXTERNAL_SHARE_DIR && rsync" $OPENAIR_DIR/cmake_targets/autotests/log $OAI_USER@localhost:$EXTERNAL_SHARE_DIR + - cat $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 537449b029..4146be799e 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -133,9 +133,6 @@ else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l") if (CPUINFO MATCHES "avx2") set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -mavx2") endif() - if (CPUINFO MATCHES "sse4_2") - set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -msse4.2") - endif() if (CPUINFO MATCHES "sse4_1") set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -msse4.1") endif() @@ -149,8 +146,8 @@ set(C_FLAGS_PROCESSOR " ${C_FLAGS_PROCESSOR} ${CFLAGS_PROCESSOR_USER}") Message("C_FLAGS_PROCESSOR is ${C_FLAGS_PROCESSOR}") if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86") - if ( (NOT( C_FLAGS_PROCESSOR MATCHES "ssse3")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.1")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.2")) ) - Message(FATAL_ERROR "For x86 Architecture, you must have following flags: -mssse3 -msse4.1 -msse4.2. The current detected flags are: ${C_FLAGS_PROCESSOR}. You can pass the flags manually in build script, for example: ./build_oai --cflags_processor \"-mssse3 -msse4.1 -msse4.2\" ") + if ( (NOT( C_FLAGS_PROCESSOR MATCHES "ssse3")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.1")) ) + Message(FATAL_ERROR "For x86 Architecture, you must have following flags: -mssse3 -msse4.1. The current detected flags are: ${C_FLAGS_PROCESSOR}. You can pass the flags manually in build script, for example: ./build_oai --cflags_processor \"-mssse3 -msse4.1\" ") endif() endif() @@ -252,6 +249,9 @@ endif (${RTAI}) set(asn1c_call "${OPENAIR_CMAKE}/tools/generate_asn1") set(asn1_generated_dir ${OPENAIR_BIN_DIR}) +set(protoc_call "${OPENAIR_CMAKE}/tools/generate_protobuf") +set(protobuf_generated_dir ${OPENAIR_BIN_DIR}) + # RRC ###### add_list2_option(RRC_ASN1_VERSION "Rel10" "ASN.1 version of RRC interface" "Rel8" "Rel10" "CBA") @@ -491,6 +491,7 @@ elseif (${RF_BOARD} STREQUAL "CPRIGW") #to ask endif (${RF_BOARD} STREQUAL "EXMIMO") + if (${TRANSP_PRO} STREQUAL "ETHERNET") include_directories ("${OPENAIR_TARGETS}/ARCH/ETHERNET/USERSPACE/LIB") @@ -501,12 +502,15 @@ if (${TRANSP_PRO} STREQUAL "ETHERNET") ) set(option_TP_lib "-rdynamic -ldl") set(LOWLATENCY True) + endif (${TRANSP_PRO} STREQUAL "ETHERNET") ########################################################## include_directories ("${OPENAIR_TARGETS}/ARCH/COMMON") - + +Message("LOWLATENCY flag is ${LOWLATENCY}") + ############################################################## # ???!!! TO BE DOCUMENTED OPTIONS !!!??? ############################################################## @@ -514,6 +518,7 @@ add_boolean_option(ENABLE_SECURITY True "Enable LTE integrity and ciphe add_boolean_option(ENABLE_USE_MME True "eNB connected to MME (INTERFACE S1-C), not standalone eNB") add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO") add_boolean_option(USER_MODE True "????") +add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the default bearer") add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????") add_boolean_option(DISABLE_USE_NAS False "???") @@ -527,6 +532,9 @@ add_list_string_option(PACKAGE_NAME "NotDefined" "As per attribute name") add_boolean_option(MESSAGE_CHART_GENERATOR False "For generating sequence diagrams") add_boolean_option(MESSAGE_CHART_GENERATOR_RLC_MAC False "trace RLC-MAC exchanges in sequence diagrams") add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchanges in sequence diagrams") + +add_boolean_option(ENB_AGENT True "enable eNB agent to inteface with a SDN contrller") + ######################## # Include order ########################## @@ -741,6 +749,56 @@ include_directories("${OPENAIR_DIR}") # Utilities Library ################ +if (ENB_AGENT) + # set the version of protobuf messages, V3 not supported yet + add_list1_option(PRPT_VERSION V2 "PRPT MSG protobuf grammar version" V2 V3) + + if (${PRPT_VERSION} STREQUAL "V2") + set (PRPTDIR V2) + elseif (${PRPT_VERSION} STREQUAL "V3") + set (PRPTDIR V3) + endif(${PRPT_VERSION} STREQUAL "V2") + + set(PRPT_MSG_DIR ${OPENAIR2_DIR}/ENB_APP/MESSAGES/${PRPTDIR} ) + set(PRPT_MSG_FILES + ${PRPT_MSG_DIR}/header.proto + ${PRPT_MSG_DIR}/progran.proto + ${PRPT_MSG_DIR}/stats_common.proto + ${PRPT_MSG_DIR}/stats_messages.proto + ) + + set(PRPT_C_DIR ${protobuf_generated_dir}/${PRPTDIR}) + message("calling ${protoc_call} ${PRPT_C_DIR} ${PRPT_MSG_FILES}") + execute_process(COMMAND ${protoc_call} ${PRPT_C_DIR} ${PRPT_MSG_FILES}) + file(GLOB PRPT_source ${PRPT_C_DIR}/*.c) + set(PRPT_OAI_generated + ${PRPT_C_DIR}/header.pb-c.c + ${PRPT_C_DIR}/progran.pb-c.c + ${PRPT_C_DIR}/stats_common.pb-c.c + ${PRPT_C_DIR}/stats_messages.pb-c.c + ) + + file(GLOB prpt_h ${PRPT_C_DIR}/*.h) + set(prpt_h ${prpt_h} ) + + add_library(PRPT_MSG + ${PRPT_OAI_generated} + ${PRPT_source} + ) + + include_directories ("${PRPT_C_DIR}") + + add_library(ASYNC_IF + ${OPENAIR2_DIR}/UTIL/ASYNC_IF/socket_link.c + ${OPENAIR2_DIR}/UTIL/ASYNC_IF/link_manager.c + ${OPENAIR2_DIR}/UTIL/ASYNC_IF/message_queue.c + ) + set(ASYNC_IF_LIB ASYNC_IF) + include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF) + +endif() + + add_library(HASHTABLE ${OPENAIR_DIR}/common/utils/collection/hashtable/hashtable.c ${OPENAIR_DIR}/common/utils/collection/hashtable/obj_hashtable.c @@ -1648,7 +1706,7 @@ add_executable(oaisim_nos1 target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER) target_link_libraries (oaisim_nos1 -Wl,--start-group - RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} + RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${ASYNC_IF_LIB} -Wl,--end-group ) target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES}) diff --git a/cmake_targets/autotests/README.txt b/cmake_targets/autotests/README.txt index c983933125..506fc3321d 100644 --- a/cmake_targets/autotests/README.txt +++ b/cmake_targets/autotests/README.txt @@ -6,41 +6,50 @@ Obj.# Case# Test# Description 01 pre-commit test case 01 01 Build OAI 01 01 01 Build oaisim.Rel8 -01 01 02 Build oaisim.Rel8 + network device driver(nasmesh_fix) -01 01 03 Build (lte-softmodem.Rel8.EXMIMO + lte-softmodem.Rel10.EXMIMO + lte-softmodem.Rel10.USRP) -01 01 04 Build (dlsim.Rel10 + ulsim.Rel10 + pucchsim.Rel10 + prachsim.Rel10 + pdcchsim.Rel10 + pbchsim.Rel10 + mbmssim.Rel10 +01 01 02 Build oaisim.Rel10 +01 01 03 Build oaisim_noS1.Rel10 +01 01 10 Build lte-softmodem_noS1.USRP.Rel10 +01 01 11 Build lte-softmodem_noS1.EXMIMO.Rel10 +01 01 12 Build lte-softmodem_noS1.BLADERF.Rel10 +01 01 13 Build lte-softmodem_noS1.ETHERNET.Rel10 +01 01 20 Build lte-softmodem.USRP.Rel10 +01 01 21 Build lte-softmodem.EXMIMO.Rel10 +01 01 22 Build lte-softmodem.BLADERF.Rel10 +01 01 23 Build lte-softmodem.ETHERNET.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.Rel10 secu_knas_encrypt_eea1.Rel10 kdf.Rel10 aes128_cmac_encrypt.Rel10 secu_knas_encrypt_eia2.Rel10) -01 01 06 Build oaisim.Rel8 + ITTI -01 01 07 Build oaisim.Rel10 -01 01 08 Build oaisim.Rel10 + ITTI -01 01 20 Build Nasmesh -01 01 30 Build RRH Gateway + +01 01 40 Build RRH Gateway for USRP (Rel 10) +01 01 41 Build RRH Gateway for EXMIMO (Rel 10) +01 01 42 Build RRH Gateway for BLADERF (Rel 10) -01 02 Run OAISIM Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2,5,6), and check the operation -01 02 00 Run OAISIM Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit -01 02 01 Run OAISIM Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors -01 02 02 Run OAISIM Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit -01 02 03 Run OAISIM Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors -01 02 04 Run OAI Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) without PHY_ABSTRACTION mode, ping from from eNB to UE, + +01 02 Run OAISIM-NOS1 Rel10 (TDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation +01 02 00 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit +01 02 01 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors +01 02 02 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit +01 02 03 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors +01 02 04 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) without PHY_ABSTRACTION mode, ping from from eNB to UE, and for check for no packet losses -01 02 05 Run OAI Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode, send ping from from eNB to UE, +01 02 05 Run OAISIM-NOS1 Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode, send ping from from eNB to UE, and check for no packet losses -01 03 Run OAISIM Rel10 (FDD + 5MHz/10MHz/20MHz + TM 1,2,5,6), and check the operation -01 03 00 Run OAISIM Rel10 FDD, 1 eNB + 1 UE 1 eNB (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit -01 03 01 Run OAISIM Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors -01 03 02 Run OAISIM Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit -01 03 03 Run OAISIM Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors -01 03 04 Run OAI Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) without PHY_ABSTRACTION mode, ping from from eNB to UE, +01 03 Run OAISIM-NOS1 Rel10 (FDD + 5MHz/10MHz/20MHz + TM 1,2), and check the operation +01 03 00 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE 1 eNB (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit +01 03 01 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors +01 03 02 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit +01 03 03 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors +01 03 04 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) without PHY_ABSTRACTION mode, ping from from eNB to UE, and for check for no packet losses -01 03 05 Run OAI Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode, send ping from from eNB to UE, +01 03 05 Run OAISIM-NOS1 Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode, send ping from from eNB to UE, and check for no packet losses -01 04 MBSFN Tests +01 04 OAISIM-NOS1 MBSFN Tests 01 04 00 Check if eMBMS procedure is not finished completely, make sure that the SIB13/MCCH have been correclty received by UEs 01 04 01 Check if eMBMS multicast/broadcast data is received, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs 01 04 02 Check for eMBMS multicast/broadcast data received in fdd mode, make sure that the SIB13/MCCH/MTCH have been correctly @@ -88,7 +97,73 @@ Obj.# Case# Test# Description 01 51 06 mbmssim (TBD) -01 55 lte-softmodem tests +01 55 lte-softmodem tests with USRP B210 RF as eNB and ALU EPC w/ Bandrich COTS UE for TX/1RX, 2TX/2RX +01 55 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX +01 55 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX +01 55 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX +01 55 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX +01 55 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX +01 55 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX +01 55 06 Band 7 FDD 5MHz UL Throughput for 300 sec for 2TX/2RX +01 55 07 Band 7 FDD 10MHz UL Throughput for 300 sec for 2TX/2RX +01 55 08 Band 7 FDD 20MHz UL Throughput for 300 sec for 2TX/2RX +01 55 09 Band 7 FDD 5MHz DL Throughput for 300 sec for 2TX/2RX +01 55 10 Band 7 FDD 10MHz DL Throughput for 300 sec for 2TX/2RX +01 55 11 Band 7 FDD 20MHz DL Throughput for 300 sec for 2TX/2RX + +01 56 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE +01 56 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX +01 56 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX +01 56 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX +01 56 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX +01 56 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX +01 56 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX + +01 57 lte-softmodem tests with USRP B210 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE +01 57 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX +01 57 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX +01 57 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX +01 57 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX +01 57 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX +01 57 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX + +01 58 lte-softmodem tests with USRP X310 RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX +01 58 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX +01 58 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX +01 58 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX +01 58 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX +01 58 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX +01 58 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX + +01 59 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE + +01 60 lte-softmodem tests with USRP X310 RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE +01 60 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX +01 60 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX +01 60 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX +01 60 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX +01 60 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX +01 60 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX + +01 61 lte-softmodem tests with EXMIMO RF as eNB and ALU EPC w/ Bandrich COTS UE for `TX/1RX, 2TX/2RX +01 61 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX +01 61 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX +01 61 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX +01 61 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX +01 61 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX +01 61 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX + +01 62 lte-softmodem tests with EXMIMO RF as eNB and OAI EPC (eNB and EPC are on same machines) w/ Bandrich COTS UE + +01 63 lte-softmodem tests with EXMIMO RF as eNB and OAI EPC (eNB and EPC are on different machines) w/ Bandrich COTS UE +01 63 00 Band 7 FDD 5MHz UL Throughput for 300 sec for 1TX/1RX +01 63 01 Band 7 FDD 10MHz UL Throughput for 300 sec for 1TX/1RX +01 63 02 Band 7 FDD 20MHz UL Throughput for 300 sec for 1TX/1RX +01 63 03 Band 7 FDD 5MHz DL Throughput for 300 sec for 1TX/1RX +01 63 04 Band 7 FDD 10MHz DL Throughput for 300 sec for 1TX/1RX +01 63 05 Band 7 FDD 20MHz DL Throughput for 300 sec for 1TX/1RX + +01 64 lte-softmodem-noS1 tests 02 Functional test case diff --git a/cmake_targets/autotests/core.py b/cmake_targets/autotests/core.py new file mode 100644 index 0000000000..5b1f39a85b --- /dev/null +++ b/cmake_targets/autotests/core.py @@ -0,0 +1,351 @@ +#****************************************************************************** + +# Eurecom OpenAirInterface +# Copyright(c) 1999 - 2013 Eurecom + +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. + +# This program is distributed in the hope 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 +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + +# The full GNU General Public License is included in this distribution in +# the file called "COPYING". + +# Contact Information +# Openair Admin: openair_admin@eurecom.fr +# Openair Tech : openair_tech@eurecom.fr +# Forums : http://forums.eurecom.fsr/openairinterface +# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France + +#***************************************************************************** + +# \file core.py +# \brief OAI core testing class that provides various primitives to send/recv cmd to openair class searching for patterns and process the responses and tag the test case as passed/failed/skipped +# \author Navid Nikaein +# \date 2013 +# \version 0.1 +# @ingroup _test + + +import pexpect +import time +import re +import string +import sys +import os + +import openair +import log + +class core: + def __init__(self): + self.send_cr = 1 + self.expect_echo = 0 + self.expect_response = 1 + self.flag_errors = 1 + self.log = None + + def clean(self, obj): + if type(obj) is str: + return obj + else: + return repr(obj) + + def mark(self, marker): + if self.log: + print >> self.log, "\n\n{" + marker + "}\n\n" + + def expected(self, expected, got): + return "================================= Failure ===================================\n"+\ + "_________________________________ Expected __________________________________\n"+\ + "--->" + expected + "<-\n" +\ + "_________________________________ Received __________________________________\n"+\ + "--->" + got + "<-\n" +\ + "=============================================================================\n" + + def unexpected(self, notexpected, got): + return "================================= Failure ===================================\n"+\ + "__________________________ not expect to find _______________________________\n"+\ + "---> " + self.clean(notexpected) + "\n" +\ + "_________________________________ Received___________________________________\n"+\ + "---> " + self.clean(got) + "\n" +\ + "=============================================================================\n" + + def failed(self, command, expect,debug): + time.sleep(2) + ret = "================================= Failure =================================\n" + ret +="_________________________________ Sent ____________________________________\n" + ret +="---> " + command + "\n" + ret +="______________________________Searching for _______________________________\n" + ret +="---> " + self.clean(expect) + "\n" + if debug >= 1 : + ret +="________________________________ Received _________________________________\n" + ret +="---> " + self.clean(self.oai.before) + "\n" + ret +="_______________________________ Remaining _________________________________\n" + ret +="---> " + self.clean(self.oai.after) + "\n" + ret +="===========================================================================\n" + return ret + + def err(self, command): + return "============================ Error received ================================\n"+\ + "__________________________________ Sent ____________________________________\n"+\ + '---> ' + command + "\n"+\ + "_________________________________ Error was ________________________________\n"+\ + "---> " + self.oai.before + "\n" +\ + "============================================================================\n" + + + def wait_quiet(self, timeout=0.5): + while 1: + try: + self.oai.expect(['..*'], timeout=0.5) + except pexpect.TIMEOUT, e: + return +# print '[Flushing ' + self.oai.after + ']' + + # **************************Send***************************** + # 1) send a command and return, do not wait + # ************************************************************ + def send_nowait(self, command, sudo=False): + rsp1 = self.prompt1 + rsp2 = self.prompt2 + if sudo == True: + command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' ' + self.wait_quiet() + if self.send_cr: + log.stats['cmd'] += 1 + self.oai.sendline(command) + else: + self.oai.send(command) + + + # **************************Send***************************** + # 1) send a command + # 2) wait for a return prompt. Don't capture the response. + # 3) Check for error or timeout. + # ************************************************************ + def send(self, command,sudo=False, timeout = 50, rsp1=None, rsp2=None,debug=0): + if not rsp1: + rsp1 = self.prompt1 + if not rsp2: + rsp2 = self.prompt2 + self.wait_quiet() + if sudo == True: + command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' ' + if self.send_cr: + log.stats['cmd'] += 1 + self.oai.sendline(command) + else: + self.oai.send(command) + + if self.expect_echo: + #cmd = self.oai.expect([re.escape(command), pexpect.TIMEOUT], timeout=timeout); + cmd = self.oai.expect_exact([command, pexpect.TIMEOUT], timeout=timeout); + if cmd != 0: + raise log.err(self.failed(command, command,debug)) + + if self.expect_response: + #index = self.oai.expect([re.escape(rsp1), re.escape(rsp2),'%', pexpect.TIMEOUT], timeout=timeout) + index = self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout) + + if index == 0 or index == 1: + return 'OK' + elif index == 2: + #self.oai.expect([re.escape(rsp1), re.escape(rsp2), pexpect.TIMEOUT], timeout=timeout) + self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout) + if self.flag_errors: + raise log.err(self.err(command)) + else: + return 'OK' + else: + raise log.err(self.failed(command, rsp1 + ' or ' + rsp2,debug)) + + # **************************send_recv************************* + # 1) send a command + # 2) wait for either rsp1 or rsp2 is found (normally prompts) + # 3) return everything seen before that + # ************************************************************ + def send_recv(self, command, sudo=False, timeout=100, rsp1=None, rsp2=None,debug=0): + if not rsp1: + rsp1 = self.prompt1 + if not rsp2: + rsp2 = self.prompt2 + self.wait_quiet() + if sudo == True: + #command = 'echo \'' + self.password + '\' | sudo -S -E ' + command + command = 'echo \'' + '' + '\' | sudo -S -E bash -c \' ' + command + '\' ' + if self.send_cr: + log.stats['cmd'] += 1 + self.oai.sendline(command) + else: + self.oai.send(command) + #index = self.oai.expect([re.escape(rsp1), re.escape(rsp2), pexpect.TIMEOUT], timeout=timeout); + index = self.oai.expect_exact([rsp1, rsp2, pexpect.TIMEOUT], timeout=timeout); + if index == 0 or index == 1 : + return self.oai.before + else: + print "command = " + command + "rsp1 = " + rsp1 + " rsp2 = " + rsp2 + " index = " + str(index) + raise log.err(self.failed(command, rsp1 + ' or ' + rsp2,debug)) + + + # **************************send_expect************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expected pattern in the response + # 3) raise an error if not found + # ************************************************************** + def send_expect(self, command, expect, sudo=False, delay = 50, rsp1=None, rsp2=None,debug=0): + if debug : + print command + print expect + print delay + rsp = self.send_recv(command, sudo, delay, rsp1, rsp2) + #print rsp + if (rsp.find(expect) != -1): + return 'Ok' + + raise log.err(self.failed(command, expect,debug)) + + + # **************************send_expect_re************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expected pattern defined by a regular expression in the response + # 3) return a error if raise_err flag is set and re not found, otherwise return 'Ok' + # ***************************************************************** + def send_expect_re(self, command, expect, sudo=False, raise_err=1, delay = 50, rsp1=None, rsp2=None,debug=0): + rsp = self.send_recv(command, sudo, delay, rsp1, rsp2) +# print rsp + match = re.compile(expect).search(rsp) + if match: + return match + if raise_err: + raise log.err(self.failed(command, expect,debug)) + else : + return None + + # **************************send_expect************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expected pattern defined by a re in the response + # 3) return ok if not found + # ************************************************************** + def send_expect_false(self, command, expect, sudo=False, delay = 5, rsp1=None, rsp2=None,debug=0): + rsp = self.send_recv(command, sudo, delay, rsp1, rsp2) + # print rsp + if (rsp.find(expect) == -1): + return 'OK' + else: + print "command = " + command + "expect = " + expect + "rsp = " + rsp + raise log.err(self.failed(command, expect,debug)) + + + # **************************send_wait************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expected pattern in the response + # 3) retry for a numretries if not found + # 4) return an error if not found after the numtries + # 3) return the response if found + # ************************************************************** + def send_wait(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0): + timer = 0 + for i in range(numretries): + rsp = self.send_recv(command, sudo, 10, rsp1, rsp2) + if (rsp.find(expect) != -1): + return rsp; + time.sleep(2) + timer = timer+2 + raise log.err(self.failed(command, expect,debug)) + + # **************************send_wait_re************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expected pattern defined by a re in the response + # 3) retry for a numretries if not found + # 4) return an error if not found after the numtries + # 3) return the response if found + # ************************************************************** + def send_wait_re(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0): + timer = 0 + for i in range(numretries): + rsp = self.send_recv(command,sudo) + if re.compile(expect).search(rsp): +# print "Found in",i,"attempts" + return rsp; + time.sleep(2) + timer = timer+2 + raise log.err(self.failed(command, expect,debug)) + + # **************************send_wait_false************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expect pattern in the response + # 3) return the response if not found + # 4) return an error if the pattern found after the numtries + # ************************************************************** + def send_wait_false(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0): + timer = 1 + for i in range(numretries): + rsp = self.send_recv(command,sudo) + if (rsp.find(expect) == -1): + return rsp; + time.sleep(2) + timer = timer+2 + raise log.err(self.failed(command, expect,debug)) + + # **************************send_wait_false************************* + # 1) send a command, and optionally specify a the time to wait + # 2) search for an expect pattern defined by a re in the response + # 3) return the response if not found + # 4) return an error if the pattern found after the numtries + # ************************************************************** + def send_wait_false_re(self, command, expect, sudo=False, numretries=3, rsp1=None, rsp2=None,debug=0): + timer = 0 + for i in range(numretries): + rsp = self.send_recv(command,sudo) + if not re.compile(expect).search(rsp): + return rsp; + time.sleep(2) + timer = timer+2 + raise log.err(self.failed(command, expect,debug)) + + # **************************find************************* + # 1) find an exact pattern in a given string + # 2) raise an error if not found + # ************************************************************** + def find(self, string, pattern): + word = string.replace(pattern,'*','\*') + words = string.replace(word,' ','\s*') + if re.search(words,string): + pass + else: + raise log.err(string) + + + # **************************find_false************************** + # 1) find an exact pattern in a given string + # 2) raise an error if found + # ************************************************************** + def find_false(self, string, pattern): + if string.find(pattern) != -1: + raise log.err(string) + + # **************************find_re************************* + # 1) find an exact re pattern in a given string + # 2) raise an error if not found + # ************************************************************** + def find_re(self, string, pattern): + if not re.compile(pattern).search(string): + raise log.err(string) + + # **************************find_false_re************************* + # 1) find an exact re pattern in a given string + # 2) raise an error if found + # ************************************************************** + def find_false_re(self, string, pattern): + if re.compile(pattern).search(string): + raise log.err(string) + diff --git a/cmake_targets/autotests/log.py b/cmake_targets/autotests/log.py new file mode 100644 index 0000000000..0b4baff3e9 --- /dev/null +++ b/cmake_targets/autotests/log.py @@ -0,0 +1,206 @@ +#****************************************************************************** + +# Eurecom OpenAirInterface +# Copyright(c) 1999 - 2013 Eurecom + +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. + +# This program is distributed in the hope 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 +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + +# The full GNU General Public License is included in this distribution in +# the file called "COPYING". + +# Contact Information +# Openair Admin: openair_admin@eurecom.fr +# Openair Tech : openair_tech@eurecom.fr +# Forums : http://forums.eurecom.fsr/openairinterface +# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France + +#***************************************************************************** + +# \file log.py +# \brief provides primitives and defines how the logs and statistics are generated +# \author Navid Nikaein +# \date 2013 +# \version 0.1 +# @ingroup _test + +import sys +import re +import time +import datetime +import array +import xml.etree.ElementTree as ET + + +debug = False +docfile = '' +start_time = time.time() +testcase_starttime = start_time +debug = 0 +stats = {'passed':0, 'failed':0, 'skipped':0, 'internal_errors':0, 'cmd':0} + +# xml result (jUnit like) +xUnitTestsuites = ET.Element( 'testsuites' ) +xUnitTestsuite = ET.SubElement( xUnitTestsuites, 'testsuite' ) +xUnitTestsuite.set( 'name', 'OAI' ) +xUnitTestsuite.set( 'timestamp', datetime.datetime.fromtimestamp(start_time).strftime('%Y-%m-%dT%H:%M:%S') ) +xUnitTestsuite.set( 'hostname', 'localhost' ) +#xUnitSystemOut = ET.SubElement( xUnitTestsuite, 'system-out' ) + +class bcolors: + header = '\033[95m' + okblue = '\033[94m' + okgreen = '\033[92m' + warning = '\033[93m' + fail = '\033[91m' + normal = '\033[0m' + + def __init__(self): + if not sys.stdout.isatty(): + self.disable() + + def disable(self): + self.header = '' + self.okblue = '' + self.okgreen = '' + self.warning = '' + self.fail = '' + self.normal = '' + +class err(Exception): + def __init__(self, value): + self.value = value + def __str__(self): + return repr(self.value) + +def writefile(logfile, message): + F_testlog = open(logfile, 'a') + F_testlog.write(message + '\n') + F_testlog.close() + + +def sleep(seconds): + time.sleep(seconds) + +def start(): + """Start the timer for the following testcase.""" + global testcase_starttime + testcase_starttime = time.time() + +def set_debug_level(level): + debug = level + +def statistics(logfile): + global start_time + + #if stats['passed'] == 0: + # print "no test executed...exiting" + # sys.exit() + + total_tests = stats['passed'] + stats['failed'] + stats['skipped'] + total_ex_tests = stats['passed'] + stats['failed'] + elapsed_time = time.gmtime(time.time() - start_time) + print '\n' + log_record('info', '===============================================') + log_record('info', 'Total tests performed ' + repr(total_tests)) + log_record('info', 'Tests passed ' + repr(stats['passed'])) + log_record('info', 'Tests failed ' + repr(stats['failed'])) + log_record('info', 'Tests skipped ' + repr(stats['skipped'])) + log_record('info', '') + log_record('info', 'Total commands sent ' + repr(stats['cmd'])) + log_record('info', 'Total elapsed time (h:m:s) ' + time.strftime('%H:%M:%S', elapsed_time)) + log_record('info', '===============================================') + log_record('info', 'Testing pass rate ' + repr((stats['passed'] * 100) / total_tests) + '%') + log_record('info', '===============================================') + + writefile(logfile, '\n=====================Results===================') + writefile(logfile, 'Total tests performed ' + repr(total_tests)) + writefile(logfile, 'Tests passed ' + repr(stats['passed'])) + writefile(logfile, 'Tests failed ' + repr(stats['failed'])) + writefile(logfile, 'Tests skipped ' + repr(stats['skipped'])) + writefile(logfile, '') + writefile(logfile, 'Total commands sent ' + repr(stats['cmd'])) + writefile(logfile, 'Total elapsed time (h:m:s) ' + time.strftime('%H:%M:%S', elapsed_time)) + writefile(logfile, '===============================================') + writefile(logfile, 'Testing pass rate ' + repr((stats['passed'] * 100) / total_tests) + '%') + writefile(logfile, '===============================================\n') + + xUnitTestsuite.set( 'tests', repr(total_tests) ) + xUnitTestsuite.set( 'failures', repr(stats['failed']) ) + xUnitTestsuite.set( 'skipped', repr(stats['skipped']) ) + xUnitTestsuite.set( 'errors', '0' ) + time_delta = datetime.datetime.now() - datetime.datetime.fromtimestamp(start_time) + xUnitTestsuite.set( 'time', repr(time_delta.total_seconds()) ) + writefile( logfile + '.xml', ET.tostring( xUnitTestsuites, encoding="utf-8", method="xml" ) ) + +def log_record(level, message): + ts = time.strftime('%d %b %Y %H:%M') + message = ts + ' [' + level + '] ' + message + if level == 'passed' : + print bcolors.okgreen + message + bcolors.normal + elif level == 'failed' : + print bcolors.fail + message + bcolors.normal + elif level == 'skipped' : + print bcolors.warning + message + bcolors.normal + else : + print message + +def fail(case, testnum, testname, conf, message, diag, output,trace): +# report(case, testnum, testname, conf, 'failed', output, diag, message) + report(case, testnum, testname, conf, 'failed', output, diag) + log_record('failed', case + testnum + ' : ' + testname + ' ('+ conf+')') + if message : + log_record('failed', "Output follows:\n" + message ) + if trace : + log_record('failed', "trace file can be found in " + trace + "\n" ) + stats['failed'] += 1 + +def failquiet(case, testnum, testname, conf): + log_record('failed', case + testnum + ' :' + testname + ' ('+ conf+')') + stats['failed'] += 1 + +def ok(case, testnum, testname, conf, message, output): + report(case, testnum, testname, conf, 'passed', output) + log_record('passed', case + testnum + ' : ' + testname + ' ('+ conf+')') + if message : + print bcolors.okgreen + message + bcolors.normal + stats['passed'] += 1 + + +def skip(case, testnum, testname, conf, message=None, diag=None, output=None): + log_record('skipped', case + testnum + ' :' + testname + ' ('+ conf+')') + report(case, testnum, testname, conf, 'skipped', output, diag) + if message : + log_record('skipped', "Output follows:\n" + message ) + if diag : + log_record('skipped', "Diagnostic: \n" + diag ) + stats['skipped'] += 1 + + +def report(case, test, name, conf, status, output, diag=None, desc=None): + writefile (output, '[' +status+ '] ' + case + test + ' : ' + name + ' ('+ conf+')') + if diag : + writefile (output, '-------> ' + diag) + if desc: + writefile(output, desc) + #log_record('report', + case + test + ' documented') + e = ET.SubElement( xUnitTestsuite, 'testcase' ) + e.set( 'name', case + '_' + test + '_' + name ) + e.set( 'classname', 'shellscript' ) + e.set( 'time', repr( time.time() - testcase_starttime ) ) + if status == 'failed': + e = ET.SubElement( e, 'failure' ) + e.set( 'message', 'failed' ) + e.text = diag + if status == 'skipped': + e = ET.SubElement( e, 'skipped' ) diff --git a/cmake_targets/autotests/openair.py b/cmake_targets/autotests/openair.py new file mode 100644 index 0000000000..1079c466a8 --- /dev/null +++ b/cmake_targets/autotests/openair.py @@ -0,0 +1,272 @@ +#****************************************************************************** + +# Eurecom OpenAirInterface +# Copyright(c) 1999 - 2013 Eurecom + +# This program is free software; you can redistribute it and/or modify it +# under the terms and conditions of the GNU General Public License, +# version 2, as published by the Free Software Foundation. + +# This program is distributed in the hope 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 +# this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. + +# The full GNU General Public License is included in this distribution in +# the file called "COPYING". + +# Contact Information +# Openair Admin: openair_admin@eurecom.fr +# Openair Tech : openair_tech@eurecom.fr +# Forums : http://forums.eurecom.fsr/openairinterface +# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France + +#***************************************************************************** + +# \file openair.py +# \brief class that define the oaisim class and its attributes +# \author Navid Nikaein +# \date 2013 +# \version 0.1 +# @ingroup _test + +import pexpect +import pxssh +import time +import os +import array +import shutil +import subprocess +import sys +import traceback +import time +# import call + +from core import * + +SHELL = '/bin/bash' + +class openair(core): + def __init__(self, hostname, address): + self.error = '% ' + self.hostname = hostname + self.address = address + self.localhost = None + core.__init__(self) + + @property + def localhost(self): + if self.localhost : + return self.localhost + elif self.hostname in ['localhost', '127.0.0.7', '::1'] : + self.localhost = self.hostname + return self.localhost + + @localhost.setter + def localhost(self,localhost): + self.localhost = localhost + + def shcmd(self,cmd,sudo=False): + + if sudo: + cmd = "sudo %s" % command + + proc = subprocess.Popen(command, shell=True, + stdout = subprocess.PIPE, + stderr = subprocess.PIPE) + + stdout, stderr = proc.communicate() + return (stdout, stderr) + + def connect(self, username, password, prompt='PEXPECT_OAI'): + max_retries=100 + i=0 + while i <= max_retries: + self.prompt1 = prompt + self.prompt2 = prompt + self.password = '' + i=i+1 + # WE do not store the password when sending commands for secuirity reasons. The password might be accidentally logged in such cases. + #The password is used only to make ssh connections. In case user wants to run programs with sudo, then he/she needs to add following line in /etc/sudoers + # your_user_name ALL=(ALL:ALL) NOPASSWD: ALL + try: + if not username: + username = root + if not password: + password = username + self.oai = pxssh.pxssh() + self.oai.login(self.address,username,password) + self.oai.sendline('PS1='+self.prompt1) + self.oai.PROMPT='PEXPECT_OAI' + # need to look for twice the string of the prompt + self.oai.prompt() + self.oai.prompt() + self.oai.sendline('uptime') + self.oai.prompt() + print self.oai.before + break + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + 'address = "'+ self.address +' username = ' + username + error = error + traceback.format_exc() + print error + print "Retrying again in 1 seconds" + time.sleep(1) + if i==max_retries: + print "Fatal Error: Terminating the program now..." + sys.exit(1) + + def connect2(self, username, password, prompt='$'): + self.prompt1 = prompt + self.prompt2 = prompt + self.password = password + while 1: + try: + if not username: + username = root + if not password: + password = username + + self.oai = pexpect.spawn('ssh -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" -o "ConnectionAttempts=1" ' \ + + username + '@' + self.address) + + index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=40) + if index == 0 : + return 'Ok' + else : + index = self.oai.expect(['password:', pexpect.TIMEOUT], timeout=40) + if index == 0 : + self.oai.sendline(password) + index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=10) + if index != 0: + print 'ERROR! could not login with SSH.' + print 'Expected ' + self.prompt1 + ', received >>>>' + self.oai.before + '<<<<' + sys.exit(1) + return 'Ok' + + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) + + def connect_localshell(self, prompt='$'): + self.prompt1 = prompt + self.prompt2 = prompt + + while 1: + try: + # start a shell and use the current environment + self.oai = pexpect.spawn('bash --norc --noprofile') + + index = self.oai.expect([re.escape(self.prompt1), re.escape(self.prompt2), pexpect.TIMEOUT], timeout=40) + if index == 0 : + return 'Ok' + else : + sys.exit(1) + + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) + + def disconnect(self): + print 'disconnecting the ssh connection to ' + self.address + '\n' + self.oai.send('exit') +# self.cancel() + + def kill(self, user, pw): + try: + if user == 'root' : + os.system('pkill oaisim oaisim_nos1') + os.system('pkill cc1') + time.sleep(1) + os.system('pkill oaisim oaisim_nos1') + else : + os.system('echo '+pw+' | sudo -S pkill oaisim oaisim_nos1') + os.system('echo '+pw+' | sudo -S pkill cc1') + time.sleep(1) + os.system('echo '+pw+' | sudo -S pkill oaisim oaisim_nos1') + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + #sys.exit(1) + + def rm_driver(self,oai,user, pw): + try: + if user == 'root' : + #oai.send_nowait('rmmod nasmesh;') + os.system('rmmod nasmesh;') + else : + oai.send_nowait('echo '+pw+ ' | sudo -S rmmod nasmesh;') + #os.system('echo '+pw+ ' | sudo -S rmmod nasmesh;') + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + #sys.exit(1) + + def driver(self,oai,user,pw): + #pwd = oai.send_recv('pwd') + oai.send('cd $OPENAIR_TARGETS;') + oai.send('cd SIMU/USER;') + try: + if user == 'root' : + oai.send_nowait('insmod ./nasmesh.ko;') + else : + oai.send('echo '+pw+ ' | sudo -S insmod ./nasmesh.ko;') + + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + #sys.exit(1) + + def cleandir (self, logdir,debug) : + + for filename in os.listdir(logdir): + filepath = os.path.join(logdir, filename) + if debug == 2 : + print 'logdir is ' + logdir + print 'filepath is ' + filepath + try: + shutil.rmtree(filepath) + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + #sys.exit(1) + #print 'Could not remove the filepath'+ filepath + ' with error ' + OSError + + def create_dir(self,dirname,debug) : + if not os.path.exists(dirname) : + try: + os.makedirs(dirname,0755) + except OSError: + # There was an error on creation, so make sure we know about it + raise + def cpu_freq(self): + freq=0 + proc = subprocess.Popen(["cat","/proc/cpuinfo"], + stdout=subprocess.PIPE) + out, err = proc.communicate() + + for line in out.split("\n"): + if "cpu MHz" in line: + freq = float(line.split(":")[1]) + break + + return freq diff --git a/cmake_targets/autotests/run_exec_autotests.bash b/cmake_targets/autotests/run_exec_autotests.bash index c4d11b7ba4..836a8c197a 100755 --- a/cmake_targets/autotests/run_exec_autotests.bash +++ b/cmake_targets/autotests/run_exec_autotests.bash @@ -7,12 +7,15 @@ else exit 1 fi +trap handle_ctrl_c INT + source $OPENAIR_DIR/cmake_targets/tools/test_helper + #SUDO="sudo -E " tdir=$OPENAIR_DIR/cmake_targets/autotests -rm -fr $tdir/bin $tdir/log -mkdir -p $tdir/bin $tdir/log +rm -fr $tdir/bin +mkdir -p $tdir/bin results_file="$tdir/log/results_autotests.xml" updated=$(svn st -q $OPENAIR_DIR) @@ -36,12 +39,12 @@ cd $tdir #\param $12 -> class of the test case (compilation, execution) #\param $13 -> output of compilation program that needs to be found for test case to pass #\param $14 -> tags to help identify the test case for readability in output xml file -test_compile() { +function test_compile() { xUnit_start test_case_name=$1 - log_dir=$tdir/log - log_file=$tdir/log/test.$1.txt + log_dir=$tdir/log/$test_case_name + log_file=$log_dir/test.$1.log.txt compile_prog=$2 compile_args=$3 pre_exec_file=$4 @@ -54,11 +57,18 @@ test_compile() { class=${12} compile_prog_out=${13} tags=${14} - build_dir=$tdir/$1/build - exec_file=$build_dir/$6 + xmlfile_testcase=$log_dir/test.$1.xml + #build_dir=$tdir/$1/build + #exec_file=$build_dir/$6 + #compile_prog_out=`eval "echo $compile_prog_out"` + #echo "compile_prog_out = $compile_prog_out" + read -a compile_prog_out_array <<< "$compile_prog_out" + #Temporary log file where execution log is stored. temp_exec_log=$log_dir/temp_log.txt + rm -fr $log_dir + mkdir -p $log_dir @@ -74,44 +84,78 @@ test_compile() { compile_prog_array=() read -a compile_prog_array <<<"$compile_prog" - tags_array=() - read -a tags_array <<<"$tags" + #tags_array=() + #read -a tags_array <<<"$tags" - pre_compile_prog_array=() - readarray -t pre_compile_prog_array <<< "$pre_compile_prog" + #pre_compile_prog_array=() + #readarray -t pre_compile_prog_array <<< "$pre_compile_prog" + result=1 + result_string="" for (( run_index=1; run_index <= $nruns; run_index++ )) do - tags_array_index=0 - for pre_compile_prog_array_index in "${pre_compile_prog_array[@]}" - do + + #tags_array_index=0 + #for pre_compile_prog_array_index in "${pre_compile_prog_array[@]}" + #do - for compile_prog_array_index in "${compile_prog_array[@]}" - do - echo "Compiling test case $test_case_name.$compile_prog_array_index.${tags_array[$tags_array_index]} Log file = $log_file" - echo "" >> $log_file - rm -fr $build_dir - mkdir -p $build_dir - cd $build_dir + #for compile_prog_array_index in "${compile_prog_array[@]}" + #do + echo "Compiling test case $test_case_name.${tags} Log file = $log_file" + date=`date` + echo ", Date = $date " >> $log_file + #rm -fr $build_dir + #mkdir -p $build_dir + cd $log_dir { - eval $pre_compile_prog_array_index - cmake .. - #rm -fv $exec_file - make -j`nproc` $compile_prog_array_index $compile_args + uname -a + compile_log_dir=`eval echo \"$OPENAIR_DIR/cmake_targets/log/\"` + echo "Removing compilation log files in $compile_log_dir" + rm -frv $compile_log_dir + echo "Executing $compile_prog $compile_prog_args ...." + eval $compile_prog $compile_prog_args + echo "Copying compilation log files to test case log directory: $log_dir" + cp -fvr $OPENAIR_DIR/cmake_targets/log/ $log_dir/compile_log }>> $log_file 2>&1 echo "" >> $log_file 2>&1 if [ "$class" == "compilation" ]; then - if [ -s "$compile_prog_array_index" ] || [ -s "$compile_prog_out" ] ; then - echo_success "$test_case_name.$compile_prog_array_index.${tags_array[$tags_array_index]} compiled" - xUnit_success "compilation" "$test_case_name.$compile_prog_array_index.${tags_array[$tags_array_index]}" "PASS" "$run_index" - else - echo_error "$test_case_name.$exec_prog.${tags_array[$tags_array_index]} compilation failed" - xUnit_fail "compilation" "$test_case_name.$compile_prog_array_index.${tags_array[$tags_array_index]}" "FAIL" "$run_index" + for compile_prog_out_index in ${compile_prog_out_array[@]} + do + if [ -s "$compile_prog_out_index" ]; then + let "result = result&1" + + echo_success "$test_case_name.${tags} RUN = $run_index $compile_prog_out_index = compiled" + + else + let "result = result&0" + + echo_error "$test_case_name.${tags} RUN = $run_index $compile_prog_out_index failed" + + fi + done #end of for loop compile_prog_out_index + if [ "$result" == "1" ]; then + result_string=$result_string" Run_$run_index = PASS" + else + result_string=$result_string" Run_$run_index = FAIL" fi + fi - let "tags_array_index++" - done # End of for loop compile_prog_array - done # End of for loop (pre_compile_prog_array_index) + #let "tags_array_index++" + #done # End of for loop compile_prog_array + #done # End of for loop (pre_compile_prog_array_index) done #End of for loop (run_index) + + + #If for for some reason upper for loop does not execute, we fail the test case completely + if [ "$result_string" == "" ]; then + result=0 + fi + if [ "$result" == "1" ]; then + echo_success "$test_case_name.${tags} PASSED" + xUnit_success "compilation" "$test_case_name.$tags" "PASS" "$result_string" "$xmlfile_testcase" + else + echo_error "$test_case_name.${tags} FAILED" + xUnit_fail "compilation" "$test_case_name.$tags" "FAIL" "$result_string" "$xmlfile_testcase" + fi } @@ -130,12 +174,13 @@ test_compile() { #\param $12 -> class of the test case (compilation, execution) #\param $13 -> output of compilation program that needs to be found for test case to pass #\param $14 -> tags to help identify the test case for readability in output xml file +#\param $15 => password for the user to run certain commands as sudo -test_compile_and_run() { +function test_compile_and_run() { xUnit_start test_case_name=$1 - log_dir=$tdir/log - log_file=$tdir/log/test.$1.txt + log_dir=$tdir/log/$test_case_name + log_file=$log_dir/test.$1.log.txt compile_prog=$2 compile_args=$3 pre_exec_file=$4 @@ -149,16 +194,20 @@ test_compile_and_run() { class=${12} compile_prog_out=${13} tags=${14} + mypassword=${15} build_dir=$tdir/$1/build - exec_file=$build_dir/$6 - + #exec_file=$build_dir/$6 + xmlfile_testcase=$log_dir/test.$1.xml #Temporary log file where execution log is stored. temp_exec_log=$log_dir/temp_log.txt + rm -fr $log_dir + mkdir -p $log_dir + rm -fr $OPENAIR_DIR/cmake_targets/log - - + echo "" > $temp_exec_log + echo "" > $log_file #echo "log_dir = $log_dir" #echo "log_file = $log_file" #echo "exec_file = $exec_file" @@ -168,63 +217,68 @@ test_compile_and_run() { #echo "nruns = $nruns" echo "class = $class" - compile_prog_array=() - read -a compile_prog_array <<<"$compile_prog" + #compile_prog_array=() + #read -a compile_prog_array <<<"$compile_prog" tags_array=() read -a tags_array <<<"$tags" main_exec_args_array=() readarray -t main_exec_args_array <<< "$exec_args" + + + #for search_expr in "${compile_prog_array[@]}" + #do + echo "Compiling test case $test_case_name Log file = $log_file" + echo "" >> $log_file - for search_expr in "${compile_prog_array[@]}" - do - echo "Compiling test case $test_case_name.$search_expr Log file = $log_file" - echo "" >> $log_file + #rm -fr $build_dir + #mkdir -p $build_dir - rm -fr $build_dir - mkdir -p $build_dir - - cd $build_dir + cd $log_dir { - eval $pre_compile_prog - cmake .. + uname -a + #eval $pre_compile_prog + #cmake .. #rm -fv $exec_file - make -j`nproc` $search_expr $compile_args + echo "Executing $compile_prog $compile_args" >> $log_file + eval "$compile_prog $compile_args" + echo "Copying compilation log files to test case log directory: $log_dir" + cp -fvr $OPENAIR_DIR/cmake_targets/log/ $log_dir/compile_log }>> $log_file 2>&1 echo "" >> $log_file 2>&1 - if [ "$class" == "compilation" ]; then - if [ -s "$search_expr" ] ; then - echo_success "$test_case_name $search_expr compiled" - xUnit_success "compilation" "$test_name.$search_expr" "PASS" 1 - else - echo_error "$test_case_name $exec_prog compilation failed" - xUnit_fail "compilation" "$test_name.$search_expr" "FAIL" 1 - fi - fi - done + #done #process the test case if it is that of execution if [ "$class" == "execution" ]; then tags_array_index=0 for main_exec_args_array_index in "${main_exec_args_array[@]}" do - for (( run_index=1; run_index <= $nruns; run_index++ )) + global_result=1 + result_string="" + + for (( run_index=1; run_index <= $nruns; run_index++ )) do - echo "Executing test case $test_case_name.$main_exec.${tags_array[$tags_array_index]}, Run Index = $run_index, Log file = $log_file" + temp_exec_log=$log_dir/test.$test_case_name.${tags_array[$tags_array_index]}.run_$run_index + echo "" > $temp_exec_log - echo "-----------------------------------------------------------------------------" >> $log_file 2>&1 - echo "" >> $log_file 2>&1 - + echo "Executing test case $test_case_name.${tags_array[$tags_array_index]}, Run Index = $run_index, Execution Log file = $temp_exec_log" + + echo "-----------------------------------------------------------------------------" >> $temp_exec_log 2>&1 + echo "" >> $temp_exec_log 2>&1 + if [ -n "$pre_exec_file" ]; then - { eval "source $pre_exec_file $pre_exec_args"; } >> $log_file 2>&1 - fi - echo "Executing $exec_file $main_exec_args_array_index " - echo "Executing $exec_file $main_exec_args_array_index " >> $log_file - { eval "$exec_file $main_exec_args_array_index" ;} > $temp_exec_log 2>&1 + { echo " Executing $pre_exec_file $pre_exec_args " + eval " echo '$mypassword' |sudo -S -E $pre_exec_file $pre_exec_args " ; }>> $temp_exec_log 2>&1 + fi + echo "Executing $main_exec $main_exec_args_array_index " + echo "Executing $main_exec $main_exec_args_array_index " >> $temp_exec_log + { uname -a ; eval "$main_exec $main_exec_args_array_index" ;} >> $temp_exec_log 2>&1 + + echo "" >> $temp_exec_log 2>&1 cat $temp_exec_log >> $log_file 2>&1 - echo "" >> $log_file 2>&1 + result=1 for search_expr in "${search_expr_array[@]}" @@ -241,68 +295,59 @@ test_compile_and_run() { let "result = result & 1" fi done + + #If we find a negative search result then there is crash of program and test case is failed even if above condition is true + search_result=`grep -iE "$search_expr_negative" $temp_exec_log` + if [ -n "$search_result" ]; then + result=0 + fi + let "global_result = global_result & result" #echo "result = $result" - - test_case_result="" + + #this is a result of this run + #test_case_result="" if [ "$result" -eq "0" ]; then - test_case_result="FAIL" + result_string=$result_string" Run_$run_index =FAIL" + echo_error "$test_case_name.${tags_array[$tags_array_index]} RUN = $run_index Result = FAIL" fi if [ "$result" -eq "1" ]; then - test_case_result="PASS" + result_string=$result_string" Run_$run_index =PASS" + echo_success "$test_case_name.${tags_array[$tags_array_index]} RUN = $run_index Result = PASS" fi - #If we find a negative search result then there is crash of program and test case is failed even if above condition is true - - search_result=`grep -iE "$search_expr_negative" $temp_exec_log` - if [ -n "$search_result" ]; then - test_case_result="FAIL" - fi - - if [ "$test_case_result" == "FAIL" ]; then - echo_error "execution $test_case_name.$compile_prog.${tags_array[$tags_array_index]} FAIL $run_index" - xUnit_fail "execution" "$test_case_name.$compile_prog.${tags_array[$tags_array_index]}" "FAIL" "$run_index" - fi - - if [ "$test_case_result" == "PASS" ]; then - echo_success "execution $test_case_name.$compile_prog.${tags_array[$tags_array_index]} PASS $run_index" - xUnit_success "execution" "$test_case_name.$compile_prog.${tags_array[$tags_array_index]}" "PASS" "$run_index" - fi - - done + done #End of for loop (nindex) + + echo " Result String = $result_string" + + if [ "$result_string" == "" ]; then + echo_error "execution $test_case_name.$compile_prog.${tags_array[$tags_array_index]} Run_Result = \"$result_string\" Result = FAIL" + xUnit_fail "execution" "$test_case_name.${tags_array[$tags_array_index]}" "FAIL" "$result_string" "$xmlfile_testcase" + else + if [ "$global_result" == "0" ]; then + echo_error "execution $test_case_name.${tags_array[$tags_array_index]} Run_Result = \"$result_string\" Result = FAIL" + xUnit_fail "execution" "$test_case_name.${tags_array[$tags_array_index]}" "FAIL" "$result_string" "$xmlfile_testcase" + fi + + if [ "$global_result" == "1" ]; then + echo_success "execution $test_case_name.${tags_array[$tags_array_index]} Run_Result = \"$result_string\" Result = PASS " + xUnit_success "execution" "$test_case_name.${tags_array[$tags_array_index]}" "PASS" "$result_string" "$xmlfile_testcase" + fi + fi + let "tags_array_index++" - done # End of for loop (nindex) + done fi + rm -fr $build_dir } dbin=$OPENAIR_DIR/cmake_targets/autotests/bin dlog=$OPENAIR_DIR/cmake_targets/autotests/log -run_test() { -case=case$1; shift -cmd=$1; shift -expected=$3; shift -echo "expected = $expected" -exit -$cmd > $dlog/$case.txt 2>&1 -if [ $expected = "true" ] ; then - if $* $dlog/$case.txt; then - echo_success "test $case, command: $cmd ok" - else - echo_error "test $case, command: $cmd Failed" - fi -else - if $* $dlog/$case.txt; then - echo_error "test $case, command: $cmd Failed" - else - echo_success "test $case, command: $cmd ok" - fi -fi -} -print_help() { +function print_help() { echo_info ' This program runs automated test case system for OpenAirInterface You should have ubuntu 14.xx, updated, and the Linux kernel >= 3.14 @@ -311,14 +356,20 @@ Options This help -g | --run-group Run test cases in a group. For example, ./run_exec_autotests "0101* 010102" +-p + Use password for logging ' } -main () { +function main () { RUN_GROUP=0 +SET_PASSWORD=0 +passwd="" test_case_group="" test_case_group_array=() test_case_array=() +echo_info "Note that the user should be sudoer for executing certain commands, for example loading kernel modules" + until [ -z "$1" ] do @@ -328,6 +379,10 @@ until [ -z "$1" ] test_case_group=$2 echo_info "Will execute test cases only in group $test_case_group" shift 2;; + -p) + SET_PASSWORD=1 + passwd=$2 + shift 2;; -h | --help) print_help exit 1;; @@ -338,6 +393,23 @@ until [ -z "$1" ] esac done +if [ "$SET_PASSWORD" == "1" ]; then + mypassword=$passwd +else + read -s -p "Enter Password: " mypassword +fi + +tmpfile=`mktemp` +echo \'$passwd\' | $SUDO echo $HOME >& $tmpfile +tstsudo=`cat $tmpfile` +if [ "$tstsudo" != "$HOME" ]; then + echo "$USER might not have sudo privileges. Exiting" + exit +else + echo "$USER has sudo privileges" +fi +echo "tstsudo = $tstsudo" +rm -fr $tmpfile xml_conf="$OPENAIR_DIR/cmake_targets/autotests/test_case_list.xml" @@ -392,6 +464,8 @@ for search_expr in "${test_case_array[@]}" echo "Description = $desc" echo "pre_compile_prog = $pre_compile_prog" echo "compile_prog = $compile_prog" + echo "compile_prog_args = $compile_prog_args" + echo "compile_prog_out = $compile_prog_out" echo "pre_exec = $pre_exec" echo "pre_exec_args = $pre_exec_args" echo "main_exec = $main_exec" @@ -401,6 +475,7 @@ for search_expr in "${test_case_array[@]}" echo "nruns = $nruns" #eval $pre_exec + compile_prog_out=`eval echo \"$compile_prog_out\"` search_array_true=() @@ -421,9 +496,10 @@ for search_expr in "${test_case_array[@]}" if [ "$class" == "compilation" ]; then test_compile "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags" elif [ "$class" == "execution" ]; then - test_compile_and_run "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags" + $SUDO killall -q oaisim_nos1 + test_compile_and_run "$name" "$compile_prog" "$compile_prog_args" "$pre_exec" "$pre_exec_args" "$main_exec" "$main_exec_args" "search_array_true[@]" "$search_expr_false" "$nruns" "$pre_compile_prog" "$class" "$compile_prog_out" "$tags" "$mypassword" else - echo "Unexpected class of test case...Exiting...." + echo "Unexpected class of test case...Skipping the test case $name ...." fi done @@ -432,6 +508,8 @@ for search_expr in "${test_case_array[@]}" } +uname -a + main "$@" xUnit_write "$results_file" diff --git a/cmake_targets/autotests/run_exec_lte-softmodem_tests.py b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py new file mode 100755 index 0000000000..ed4a19f4dc --- /dev/null +++ b/cmake_targets/autotests/run_exec_lte-softmodem_tests.py @@ -0,0 +1,1467 @@ +#! /usr/bin/python +#****************************************************************************** + +# 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 . + +# Contact Information +# OpenAirInterface Admin: openair_admin@eurecom.fr +# OpenAirInterface Tech : openair_tech@eurecom.fr +# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr + +# Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE + +# *******************************************************************************/ + +# \file test01.py +# \brief test 01 for OAI +# \author Navid Nikaein +# \date 2013 - 2015 +# \version 0.1 +# @ingroup _test + +import tempfile +import threading +import sys +import traceback +import wave +import os +import time +import datetime +import getpass +import math #from time import clock +import xml.etree.ElementTree as ET +import re + +import numpy as np + +import log + +from openair import * + +import paramiko + +import subprocess +import commands +sys.path.append('/opt/ssh') + +import ssh +from ssh import SSHSession +import argparse + +# \brief write a string to a file +# \param filename name of file +# \param string string to write +# \mode file opening mode (default=write) +def write_file(filename, string, mode="w"): + text_file = open(filename, mode) + text_file.write(string) + text_file.close() + +# \brief function to check if test case passed throughput test +# \param filename name of file which has throughput results (usually from iperf -s ... +# \param min_tput minimum throughput +# \param max_tuput maximum throughput +# \param average average throughput +# \param min_duration minimum duration of throughput +#The throughput values found in file must be higher than values from from arguments 2,3,4,5 +#The function returns True if throughput conditions are saisfied else it returns fails +def tput_test(filename, min_tput, max_tput, average, min_duration): + + if os.path.exists(filename): + with open (filename, "r") as myfile: + data=myfile.read() + p=re.compile('(\d*.\d*) Mbits/sec') + array=p.findall(data) + array = [ float(x) for x in array ] + duration = array.__len__() + if duration !=0: + min_list = min(array) + max_list = max(array) + average_list = np.mean(array) + else: + min_list = 0 + max_list = 0 + average_list=0 + tput_string=' ( '+ "min=%0.2f" % min_list + ' Mbps / ' + "max=%0.2f" % max_list + ' Mbps / ' + "avg=%0.2f" % average_list + ' Mbps / ' + "dur=%0.2f" % duration + ' s) ' + if (min_list >= min_tput and max_list >= max_tput and average_list >= average and duration >= min_duration): + return True , tput_string + else: + return False , tput_string + else: + return False , tput_string + +# \brief Convert string to float or return None if there is exception +def try_convert_to_float(string, fail=None): + try: + return float(string) + except Exception: + return fail; + +# \brief get throughput statistics from log file +# \param search_expr search expression found in test_case_list.xml file +# \param logfile_traffic logfile which has traffic statistics +def tput_test_search_expr (search_expr, logfile_traffic): + result=0 + tput_string='' + if search_expr !='': + if search_expr.find('throughput_test')!= -1 : + p= re.compile('min\s*=\s*(\d*.\d*)\s*Mbits/sec') + min_tput=p.findall(search_expr) + if min_tput.__len__()==1: + min_tput = min_tput[0] + else: + min_tput = None + + p= re.compile('max\s*=\s*(\d*.\d*)\s*Mbits/sec') + max_tput=p.findall(search_expr) + if max_tput.__len__()==1: + max_tput = max_tput[0] + else: + max_tput = None + + p= re.compile('average\s*=\s*(\d*.\d*)\s*Mbits/sec') + avg_tput=p.findall(search_expr) + if avg_tput.__len__()==1: + avg_tput=avg_tput[0] + else: + avg_tput = None + + p= re.compile('duration\s*=\s*(\d*.\d*)\s*s') + duration=p.findall(search_expr) + if duration.__len__()==1: + duration = duration[0] + else: + duration = None + + min_tput = try_convert_to_float(min_tput) + max_tput = try_convert_to_float(max_tput) + avg_tput = try_convert_to_float(avg_tput) + duration = try_convert_to_float(duration) + + if (min_tput != None and max_tput != None and avg_tput != None and duration != None ): + result, tput_string = tput_test(logfile_traffic, min_tput, max_tput, avg_tput, duration) + else: + result=1 + + return result, tput_string + +# \brief function to copy files to/from remote machine +# \param username user with which to make sftp connection +# \param password password of user +# \param hostname host to connect +# \ports port of remote machine on which server is listening +# \paramList This is list of operations as a set {operation: "get/put", localfile: "filename", remotefile: "filename" +# \param logfile Ignored currently and set once at the beginning of program +def sftp_module (username, password, hostname, ports, paramList,logfile): + #localD = localfile + #remoteD = remotefile + #fd, paramiko_logfile = tempfile.mkstemp() + #res = os.close(fd ) + #paramiko logfile path should not be changed with multiple calls. The logs seem to in first file regardless + error = "" + #The lines below are outside exception loop to be sure to terminate the test case if the network connectivity goes down or there is authentication failure + transport = paramiko.Transport(hostname, ports) + transport.connect(username = username, password = password) + sftp = paramiko.SFTPClient.from_transport(transport) + # index =0 + for param in paramList: + try: + operation = param["operation"] + localD = param["localfile"] + remoteD = param["remotefile"] + if operation == "put": + sftp.put(remotepath=remoteD, localpath=localD) + elif operation == "get": + sftp.get(remotepath=remoteD, localpath=localD) + else : + print "sftp_module: unidentified operation:<" + operation + "> Exiting now" + print "hostname = " + hostname + print "ports = " + ports + print "localfile = " + localD + print "remotefile = " + remoteD + print "operation = " + operation + sys.exit() + except Exception, e: + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n username = ' + username + '\n hostname = ' + hostname + '\n localfile = ' + localD + '\n remotefile = ' + remoteD + '\n operation = ' + operation + '\nlogfile = ' + logfile + '\n ports = ' + str(ports) + '\n' + error = error + traceback.format_exc() + print error + + sftp.close() + transport.close() + res = os.system('\n echo \'SFTP Module Log for Machine: <' + hostname + '> starts...\' >> ' + logfile + ' 2>&1 ') + res = os.system('cat ' + paramiko_logfile + ' >> ' + logfile + ' 2>&1 \n') + write_file(logfile, error, "a") + res = os.system('\n echo \'SFTP Module Log for Machine: <' + hostname + '> ends...\' >> ' + logfile + ' 2>&1 \n') + +# \brief bash script stub put at the end of scripts to terminate it +# \param timeout_cmd terminate script after timeout_cmd seconds +# \param terminate_missing_procs if True terminate all the processes launched by script if one of them terminates prematurely (due to error) +def finalize_deploy_script (timeout_cmd, terminate_missing_procs='True'): + cmd = 'declare -i timeout_cmd='+str(timeout_cmd) + '\n' + if terminate_missing_procs == 'True': + cmd = cmd + """ + #The code below checks if one the processes launched in background has crashed. + #If it does, then the code below terminates all the child processes created by this script + declare -i wakeup_interval=1 + declare -i step=0 + echo \"Array pid = ${array_exec_pid[@]}\" + while [ "$step" -lt "$timeout_cmd" ] + do + declare -i break_while_loop=0 + #Iterate over each process ID in array_exec_pid + for i in "${array_exec_pid[@]}" + do + numchild=`pstree -p $i | perl -ne 's/\((\d+)\)/print " $1"/ge' |wc -w` + echo "PID = $i, numchild = $numchild" + if [ "$numchild" -eq "0" ] ; then + echo "Process ID $i has finished unexpectedly. Now preparing to kill all the processes " + break_while_loop=1 + break + fi + done + if [ "$break_while_loop" -eq "1" ] ; then + break + fi + step=$(( step + wakeup_interval )) + sleep $wakeup_interval + done + echo "Final time step (Duration of test case) = $step " + date + """ + else: + #We do not terminate the script if one of the processes has existed prematurely + cmd = cmd + 'sleep ' + str(timeout_cmd) + ' ; date \n' + + return cmd + +# \brief run python script and update config file params of test case +# \param oai module with already open connection +# \param config_string config string taken from xml file +# \param logdirRepo directory of remote repository +# \param python_script python script location +def update_config_file(oai, config_string, logdirRepo, python_script): + cmd="" + if config_string : + stringArray = config_string.splitlines() + #python_script = '$OPENAIR_DIR/targets/autotests/tools/search_repl.py' + for string in stringArray: + #split the string based on space now + string1=string.split() + cmd = cmd + 'python ' + python_script + ' ' + logdirRepo+'/'+string1[0] + ' ' + string1[1] + ' '+ string1[2] + '\n' + #cmd = cmd + 'perl -p -i -e \'s/'+ string1[1] + '\\s*=\\s*"\\S*"\\s*/' + string1[1] + ' = "' + string1[2] +'"' + '/g\' ' + logdirRepo + '/' +string1[0] + '\n' + return cmd + #result = oai.send_recv(cmd) + +# \brief thread safe sshsession wrapper due to occasional connection issues with ssh +# \param machine name of machine +# \param username user login for remote machine +# \param key_file file name which has keys to enable passwordless login +# \param password password for remote machine +# \param logdir_remote remote directory +# \param logdir_local_base local directory +# \param operation operation to perform (get_all, put_all) transfers recursively for directories +def SSHSessionWrapper(machine, username, key_file, password, logdir_remote, logdir_local_base, operation): + max_tries = 100 + i=0 + while i <= max_tries: + i = i +1 + try: + ssh = SSHSession(machine , username, key_file, password) + if operation == "get_all": + ssh.get_all(logdir_remote , logdir_local_base) + elif operation == "put_all": + ssh.put_all(logdir_local_base, logdir_remote ) + else: + print "Error: Uknown operation in SSHSessionWrapper. Exiting now..." + sys.exit(1) + break + except Exception, e: + error='' + error = error + ' In Class = function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n username = ' + username + '\n machine = ' + machine + '\n logdir_remote = ' + logdir_remote + '\n logdir_local_base = ' + logdir_local_base + error = error + traceback.format_exc() + print error + print " Retrying again in 1 seconds" + time.sleep(1) + print "Continuing ..." + if i ==max_tries: + print "Fatal Error: Max no of retries reached. Exiting now..." + sys.exit(1) + + + +# \briefFunction to clean old programs that might be running from earlier execution +# \param oai - parameter for making connection to machine +# \parm programList list of programs that must be terminated before execution of any test case +# \param CleanUpAluLteBox program to terminate AlU Bell Labs LTE Box +# \param ExmimoRfStop String to stop EXMIMO card (specified in test_case_list.xml) +def cleanOldPrograms(oai, programList, CleanUpAluLteBox, ExmimoRfStop): + cmd = 'killall -q -r ' + programList + result = oai.send(cmd, True) + print "Killing old programs..." + result + programArray = programList.split() + programListJoin = '|'.join(programArray) + cmd = cleanupOldProgramsScript + ' ' + '\''+programListJoin+'\'' + #result = oai.send_recv(cmd) + #print result + result = oai.send_expect_false(cmd, 'Match found', False) + print "Looking for old programs..." + result + res=oai.send_recv(CleanUpAluLteBox, True) + res = oai.send_recv(ExmimoRfStop, False) + +# \brief Class thread to launch a generic command on remote machine +# \param threadID number of thread (for book keeping) +# \param threadname string of threadname (for book keeping) +# \param machine machine name on which to run the command +# \param username username with which to login +# \param password password with which to login +# \param cmd command as a string to run on remote machine +# \parma sudo if True sudo is set +# \param timeout timeout of command in seconds +class oaiThread (threading.Thread): + def __init__(self, threadID, threadname, machine, username, password, cmd, sudo, timeout): + threading.Thread.__init__(self) + self.threadID = threadID + self.threadname = threadname + self.machine = machine + self.username = username + self.password = password + self.cmd = cmd + self.sudo = sudo + self.timeout = timeout + def run(self): + try: + oai = openair('localdomain',self.machine) + oai.connect(self.username, self.password) + print "Starting " + self.threadname + " on machine " + self.machine + result = oai.send_recv(self.cmd, self.sudo, self.timeout) + print "result = " + result + print "Exiting " + self.threadname + oai.disconnect() + except Exception, e: + error='' + error = error + ' In class oaiThread, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n threadID = ' + str(self.threadID) + '\n threadname = ' + self.threadname + '\n timeout = ' + str(self.timeout) + '\n machine = ' + self.machine + '\n cmd = ' + self.cmd + '\n timeout = ' + str(self.timeout) + '\n username = ' + self.username + '\n' + error = error + traceback.format_exc() + print error + + +# \brief This class runs test cases with class {execution, compilatation} +# \param threadID number of thread (for book keeping) +# \param name string of threadname (for book keeping) +# \param machine machine name on which to run the command +# \param logdirOAI5GRepo directory on remote machine which as openairinterface5g repo installed +# \param testcasename name of test case to run on remote machine +# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml) +# \param user username with which to login +# \param password password with which to login +# \param timeout timeout of command in seconds +# \param ExmimoRfStop command to stop EXMIMO Card +class testCaseThread_generic (threading.Thread): + def __init__(self, threadID, name, machine, logdirOAI5GRepo, testcasename,oldprogramList, CleanupAluLteBox, user, password, timeout, ExmimoRfStop): + threading.Thread.__init__(self) + self.threadID = threadID + self.name = name + self.testcasename = testcasename + self.timeout = timeout + self.machine = machine + self.logdirOAI5GRepo = logdirOAI5GRepo + self.oldprogramList = oldprogramList + self.CleanupAluLteBox = CleanupAluLteBox + self.password=password + self.ExmimoRfStop = ExmimoRfStop + self.user = user + def run(self): + try: + mypassword='' + #addsudo = 'echo \'' + mypassword + '\' | sudo -S -E ' + addpass = 'echo \'' + mypassword + '\' | ' + #user = getpass.getuser() + print "Starting test case : " + self.testcasename + " On machine " + self.machine + " timeout = " + str(self.timeout) + oai = openair('localdomain',self.machine) + oai.connect(self.user, self.password) + #cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox, self.ExmimoRfStop) + logdir_local = os.environ.get('OPENAIR_DIR') + logdir_local_testcase = logdir_local +'/cmake_targets/autotests/log/'+ self.testcasename + logdir_local_base = logdir_local +'/cmake_targets/autotests/log/' + logdir_remote_testcase = self.logdirOAI5GRepo + '/cmake_targets/autotests/log/' + self.testcasename + logdir_remote = self.logdirOAI5GRepo + '/cmake_targets/autotests/log/' + logfile_task_testcasename = logdir_local_testcase + '/test_task' + '_' + self.testcasename + '_.log' + logfile_task_testcasename_out = logdir_remote + '/test_task_out' + '_' + self.testcasename + '_.log' + #print "logdir_local_testcase = " + logdir_local_testcase + #print "logdir_remote_testcase = " + logdir_remote_testcase + #if os.path.exists(logdir_local_testcase) == True : + # os.removedirs(logdir_local_testcase) + #os.mkdir(logdir_local_testcase) + os.system("rm -fr " + logdir_local_testcase ) + os.system("mkdir -p " + logdir_local_testcase) + cmd = "mkdir -p " + logdir_remote_testcase + res = oai.send_recv(cmd, False, self.timeout) + #print "res = " + res + + cmd = "( cd " + self.logdirOAI5GRepo + " \n " + cmd = cmd + "source oaienv \n" + cmd = cmd + "$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash --run-group \"" + self.testcasename + "\" -p \'\'" + cmd = cmd + " ) >& " + logfile_task_testcasename_out + " ; " + "mkdir -p " + logdir_remote_testcase + "; mv " + logfile_task_testcasename_out + " " +logdir_remote_testcase + + #print "cmd = " + cmd + res = oai.send_recv(cmd, False, self.timeout) + #print "res = " + res + #print "ThreadID = " + str(self.threadID) + "ThreadName: " + self.name + " testcasename: " + self.testcasename + "Execution Result = " + res + write_file(logfile_task_testcasename, cmd, mode="w") + #Now we copy all the remote files + #ssh = SSHSession(self.machine , username=user, key_file=None, password=self.password) + #ssh.get_all(logdir_remote_testcase , logdir_local_base) + SSHSessionWrapper(self.machine, self.user, None, self.password, logdir_remote_testcase, logdir_local_base, "get_all") + print "Finishing test case : " + self.testcasename + " On machine " + self.machine + #cleanOldPrograms(oai, self.oldprogramList, self.CleanupAluLteBox, self.ExmimoRfStop) + #oai.kill(user,mypassword) + oai.disconnect() + except Exception, e: + error='' + error = error + ' In Class = testCaseThread_generic, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n threadID = ' + str(self.threadID) + '\n threadName = ' + self.name + '\n testcasename = ' + self.testcasename + '\n machine = ' + self.machine + '\n logdirOAI5GRepo = ' + self.logdirOAI5GRepo + '\n' + '\n timeout = ' + str(self.timeout) + '\n user = ' + self.user + error = error + traceback.format_exc() + print error + print "Continuing with next test case..." + #sys.exit() + + + +# \bried function to run a command as a sudo +# \param cmd command as a string +# \param password password to be supplied +def addsudo (cmd, password=""): + cmd = 'echo \'' + password + '\' | sudo -S -E bash -c \' ' + cmd + '\' ' + return cmd + +# \brief handler for executing test cases (compilation, execution) +# \param name of testcase +# \param threadListGeneric list of threads which are already running on remote machines +# \param oldprogramList list of programs which must be terminated before running a test case +# \param logdirOAI5GRepo directory on remote machine which as openairinterface5g repo installed +# \param MachineList list of all machines on which generic test cases can be run +# \param user username with which to login +# \param password password with which to login +# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml) +# \param timeout timeout of command in seconds +# \param ExmimoRfStop command to stop EXMIMO Card +def handle_testcaseclass_generic (testcasename, threadListGeneric, oldprogramList, logdirOAI5GRepo, MachineList, user, password, CleanupAluLteBox,timeout, ExmimoRfStop): + try: + mypassword=password + MachineListFree=[] + threadListNew=[] + while MachineListFree.__len__() == 0 : + MachineListBusy=[] + MachineListFree=[] + threadListNew=[] + #first we need to find the list of free machines that we could run our test case + if threadListGeneric.__len__() ==0 : + #This means no thread is started yet + MachineListFree = MachineList[:] + else : + for param in threadListGeneric : + thread_id = param["thread_id"] + machine = param["Machine"] + testcasenameold = param["testcasename"] + thread_id.join(1) + if thread_id.isAlive() == True: + threadListNew.append(param) + print "thread_id is alive: testcasename: " + testcasenameold + " on machine "+ machine + if machine not in MachineListBusy: + MachineListBusy.append(machine) + else : + print "thread_id is finished: testcasename: " + testcasenameold + " on machine " + machine + #threadListGeneric.remove(param) + #if machine not in MachineListFree: + # MachineListFree.append(machine) + #Now we check if there is at least one free machine + MachineListFree = MachineList[:] + for machine in MachineListBusy: + if machine in MachineListFree: + MachineListFree.remove(machine) + print "MachineListFree = " + ','.join(MachineListFree) + print "MachineListBusy = " + ','.join(MachineListBusy) + print "MachineList = " + ','.join(MachineList) + machine = MachineListFree[0] + thread = testCaseThread_generic(1,"Generic Thread_"+testcasename+"_"+ "machine_", machine, logdirOAI5GRepo, testcasename, oldprogramList, CleanupAluLteBox, user, password, timeout, ExmimoRfStop) + param={"thread_id":thread, "Machine":machine, "testcasename":testcasename} + thread.start() + threadListNew.append(param) + return threadListNew + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n testcasename = ' + testcasename + '\n logdirOAI5GRepo = ' + logdirOAI5GRepo + '\n MachineList = ' + ','.join(MachineList) + '\n timeout = ' + str(timeout) + '\n' + 'user = ' + user + error = error + traceback.format_exc() + print error + print "Continuing..." + #sys.exit(1) + +# \brief Blocking wait for all threads related to generic testcase execution, class (compilation and execution) +# \param threadListGeneric list of threads which are running on remote machines +# \param timeout time to wait on threads in seconds +def wait_testcaseclass_generic_threads(threadListGeneric, timeout = 1): + threadListGenericNew=[] + for param in threadListGeneric: + thread_id = param["thread_id"] + machine = param["Machine"] + testcasenameold = param["testcasename"] + thread_id.join(timeout) + if thread_id.isAlive() == True: + threadListGenericNew.append(param) + print "thread_id on machine: " + machine + " is still alive: testcasename: " + testcasenameold + print " Exiting now..." + sys.exit(1) + else: + print "thread_id on machine: " + machine + " is stopped: testcasename: " + testcasenameold + #threadListGeneric.remove(param) + return threadListGenericNew + + +# \brief handler for executing test cases (lte-softmodem) +# \param testcase name of testcase +# \param oldprogramList list of programs which must be terminated before running a test case +# \param logdirOAI5GRepo directory on remote machine which has openairinterface5g repo installed +# \param logdirOpenaircnRepo directory on remote machine which has openair-cn repo installed +# \param MachineList list of all machines on which test cases can be run +# \param user username with which to login +# \param password password with which to login +# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml) +# \param ExmimoRfStop command to stop EXMIMO Card +# \param nruns_lte-softmodem global parameter to override number of runs (nruns) within the test case +def handle_testcaseclass_softmodem (testcase, oldprogramList, logdirOAI5GRepo , logdirOpenaircnRepo, MachineList, user, password, CleanUpAluLteBox, ExmimoRfStop, nruns_lte_softmodem, timeout_cmd): + #We ignore the password sent to this function for secuirity reasons for password present in log files + #It is recommended to add a line in /etc/sudoers that looks something like below. The line below will run sudo without password prompt + # your_user_name ALL=(ALL:ALL) NOPASSWD: ALL + mypassword='' + #addsudo = 'echo \'' + mypassword + '\' | sudo -S -E ' + addpass = 'echo \'' + mypassword + '\' | ' + #user = getpass.getuser() + testcasename = testcase.get('id') + testcaseclass = testcase.findtext('class',default='') + if timeout_cmd == '': + timeout_cmd = testcase.findtext('TimeOut_cmd',default='') + timeout_cmd = int(float(timeout_cmd)) + #Timeout_thread is more than that of cmd to have room for compilation time, etc + timeout_thread = timeout_cmd + 300 + if nruns_lte_softmodem == '': + nruns = testcase.findtext('nruns',default='') + else: + nruns = nruns_lte_softmodem + nruns = int(float(nruns)) + tags = testcase.findtext('tags',default='') + eNBMachine = testcase.findtext('eNB',default='') + eNB_config_file = testcase.findtext('eNB_config_file',default='') + eNB_compile_prog = testcase.findtext('eNB_compile_prog',default='') + eNB_compile_prog_args = testcase.findtext('eNB_compile_prog_args',default='') + eNB_pre_exec = testcase.findtext('eNB_pre_exec',default='') + eNB_pre_exec_args = testcase.findtext('eNB_pre_exec_args',default='') + eNB_main_exec = testcase.findtext('eNB_main_exec',default='') + eNB_main_exec_args = testcase.findtext('eNB_main_exec_args',default='') + eNB_traffic_exec = testcase.findtext('eNB_traffic_exec',default='') + eNB_traffic_exec_args = testcase.findtext('eNB_traffic_exec_args',default='') + eNB_terminate_missing_procs = testcase.findtext('eNB_terminate_missing_procs',default='True') + eNB_search_expr_true = testcase.findtext('eNB_search_expr_true','') + if re.compile('\w+').match(eNB_search_expr_true) != None: + eNB_search_expr_true = eNB_search_expr_true + ' duration=' + str(timeout_cmd-90) + 's' + + UEMachine = testcase.findtext('UE',default='') + UE_config_file = testcase.findtext('UE_config_file',default='') + UE_compile_prog = testcase.findtext('UE_compile_prog',default='') + UE_compile_prog_args = testcase.findtext('UE_compile_prog_args',default='') + UE_pre_exec = testcase.findtext('UE_pre_exec',default='') + UE_pre_exec_args = testcase.findtext('UE_pre_exec_args',default='') + UE_main_exec = testcase.findtext('UE_main_exec',default='') + UE_main_exec_args = testcase.findtext('UE_main_exec_args',default='') + UE_traffic_exec = testcase.findtext('UE_traffic_exec',default='') + UE_traffic_exec_args = testcase.findtext('UE_traffic_exec_args',default='') + UE_terminate_missing_procs = testcase.findtext('UE_terminate_missing_procs',default='True') + UE_search_expr_true = testcase.findtext('UE_search_expr_true','') + UE_stop_script = testcase.findtext('UE_stop_script','') + if re.compile('\w+').match(UE_search_expr_true) != None: + UE_search_expr_true = UE_search_expr_true + ' duration=' + str(timeout_cmd-90) + 's' + + EPCMachine = testcase.findtext('EPC',default='') + EPC_config_file = testcase.findtext('EPC_config_file',default='') + EPC_compile_prog = testcase.findtext('EPC_compile_prog',default='') + EPC_compile_prog_args = testcase.findtext('EPC_compile_prog_args',default='') + HSS_compile_prog = testcase.findtext('HSS_compile_prog',default='') + HSS_compile_prog_args = testcase.findtext('HSS_compile_prog_args',default='') + + EPC_pre_exec= testcase.findtext('EPC_pre_exec',default='') + EPC_pre_exec_args = testcase.findtext('EPC_pre_exec_args',default='') + EPC_main_exec= testcase.findtext('EPC_main_exec',default='') + EPC_main_exec_args = testcase.findtext('EPC_main_exec_args',default='') + HSS_main_exec= testcase.findtext('HSS_main_exec',default='') + HSS_main_exec_args = testcase.findtext('HSS_main_exec_args',default='') + EPC_traffic_exec = testcase.findtext('EPC_traffic_exec',default='') + EPC_traffic_exec_args = testcase.findtext('EPC_traffic_exec_args',default='') + EPC_terminate_missing_procs = testcase.findtext('EPC_terminate_missing_procs',default='True') + EPC_search_expr_true = testcase.findtext('EPC_search_expr_true','') + if re.compile('\w+').match(EPC_search_expr_true) != None: + EPC_search_expr_true = EPC_search_expr_true + ' duration=' + str(timeout_cmd-90) + 's' + + index_eNBMachine = MachineList.index(eNBMachine) + index_UEMachine = MachineList.index(UEMachine) + index_EPCMachine = MachineList.index(EPCMachine) + cmd = 'cd ' + logdirOAI5GRepo + '; source oaienv ; env|grep OPENAIR' + oai_eNB = openair('localdomain', eNBMachine) + oai_eNB.connect(user, password) + res= oai_eNB.send_recv(cmd) + oai_UE = openair('localdomain', UEMachine) + oai_UE.connect(user, password) + res = oai_eNB.send_recv(cmd) + oai_EPC = openair('localdomain', EPCMachine) + oai_EPC.connect(user, password) + res = oai_eNB.send_recv(cmd) + + #cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop) + #cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop) + #cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop) + logdir_eNB = logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename + logdir_UE = logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename + logdir_EPC = logdirOpenaircnRepo+'/TEST/autotests/log/'+ testcasename + logdir_local = os.environ.get('OPENAIR_DIR') + if logdir_local is None: + print "Environment variable OPENAIR_DIR not set correctly" + sys.exit() + + #Make the log directory of test case + #cmd = 'mkdir -p ' + logdir_eNB + #result = oai_eNB.send_recv(cmd) + #cmd = 'mkdir -p ' + logdir_UE + #result = oai_UE.send_recv(cmd) + #cmd = 'mkdir -p ' + logdir_EPC + #result = oai_EPC.send_recv(cmd) + + print "Updating the config files for ENB/UE/EPC..." + #updating the eNB/UE/EPC configuration file from the test case + #update_config_file(oai_eNB, eNB_config_file, logdirOAI5GRepo) + #update_config_file(oai_UE, UE_config_file, logdirOAI5GRepo) + #update_config_file(oai_EPC, EPC_config_file, logdirOpenaircnRepo) + test_result=1 + test_result_string='' + start_time=time.time() + for run in range(0,nruns): + run_result=1 + run_result_string='' + logdir_eNB = logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename + '/run_' + str(run) + logdir_UE = logdirOAI5GRepo+'/cmake_targets/autotests/log/'+ testcasename + '/run_' + str(run) + logdir_EPC = logdirOpenaircnRepo+'/TEST/autotests/log/'+ testcasename + '/run_' + str(run) + logdir_local_testcase = logdir_local + '/cmake_targets/autotests/log/'+ testcasename + '/run_' + str(run) + #Make the log directory of test case + cmd = 'rm -fr ' + logdir_eNB + ' ; mkdir -p ' + logdir_eNB + result = oai_eNB.send_recv(cmd) + cmd = 'rm -fr ' + logdir_UE + ' ; mkdir -p ' + logdir_UE + result = oai_UE.send_recv(cmd) + cmd = 'rm -fr ' + logdir_EPC + '; mkdir -p ' + logdir_EPC + result = oai_EPC.send_recv(cmd) + cmd = ' rm -fr ' + logdir_local_testcase + ' ; mkdir -p ' + logdir_local_testcase + result = os.system(cmd) + + logfile_compile_eNB = logdir_eNB + '/eNB_compile' + '_' + str(run) + '_.log' + logfile_exec_eNB = logdir_eNB + '/eNB_exec' + '_' + str(run) + '_.log' + logfile_pre_exec_eNB = logdir_eNB + '/eNB_pre_exec' + '_' + str(run) + '_.log' + logfile_traffic_eNB = logdir_eNB + '/eNB_traffic' + '_' + str(run) + '_.log' + logfile_task_eNB_compile_out = logdir_eNB + '/eNB_task_compile_out' + '_' + str(run) + '_.log' + logfile_task_eNB_compile = logdir_local_testcase + '/eNB_task_compile' + '_' + str(run) + '_.log' + logfile_task_eNB_out = logdir_eNB + '/eNB_task_out' + '_' + str(run) + '_.log' + logfile_task_eNB = logdir_local_testcase + '/eNB_task' + '_' + str(run) + '_.log' + logfile_local_traffic_eNB_out = logdir_local_testcase + '/eNB_traffic' + '_' + str(run) + '_.log' + logfile_tshark_eNB = logdir_eNB + '/eNB_tshark' + '_' + str(run) + '_.log' + logfile_pcap_eNB = logdir_eNB + '/eNB_tshark' + '_' + str(run) + '_.pcap' + logfile_pcap_zip_eNB = logdir_eNB + '/eNB_tshark' + '_' + str(run) + '_.pcap.zip' + logfile_pcap_tmp_eNB = '/tmp/' + '/eNB_tshark' + '_' + str(run) + '_.pcap' + + task_eNB_compile = ' ( uname -a ; date \n' + task_eNB_compile = task_eNB_compile + 'cd ' + logdirOAI5GRepo + ' ; source oaienv ; source cmake_targets/tools/build_helper \n' + task_eNB_compile = task_eNB_compile + 'env |grep OPENAIR \n' + task_eNB_compile = task_eNB_compile + update_config_file(oai_eNB, eNB_config_file, logdirOAI5GRepo, '$OPENAIR_DIR/cmake_targets/autotests/tools/search_repl.py') + '\n' + if eNB_compile_prog != "": + task_eNB_compile = task_eNB_compile + ' ( ' + eNB_compile_prog + ' '+ eNB_compile_prog_args + ' ) > ' + logfile_compile_eNB + ' 2>&1 \n' + task_eNB_compile = task_eNB_compile + ' date ) > ' + logfile_task_eNB_compile_out + ' 2>&1 ' + write_file(logfile_task_eNB_compile, task_eNB_compile, mode="w") + + task_eNB = ' ( uname -a ; date \n' + task_eNB = task_eNB + 'cd ' + logdirOAI5GRepo + ' ; source oaienv ; source cmake_targets/tools/build_helper \n' + task_eNB = task_eNB + 'env |grep OPENAIR \n' + 'array_exec_pid=() \n' + + if eNB_pre_exec != "": + task_eNB = task_eNB + ' ( date; ' + eNB_pre_exec + ' '+ eNB_pre_exec_args + ' ) > ' + logfile_pre_exec_eNB + ' 2>&1 \n' + if eNB_main_exec != "": + task_eNB = task_eNB + ' ( date; ' + addsudo(eNB_main_exec + ' ' + eNB_main_exec_args, mypassword) + ' ) > ' + logfile_exec_eNB + ' 2>&1 & \n' + task_eNB = task_eNB + 'array_exec_pid+=($!) \n' + task_eNB = task_eNB + 'echo eNB_main_exec PID = $! \n' + if eNB_traffic_exec != "": + cmd_traffic = eNB_traffic_exec + ' ' + eNB_traffic_exec_args + if cmd_traffic.find('-c') >= 0: + cmd_traffic = cmd_traffic + ' -t ' + str(timeout_cmd - 60) + task_eNB = task_eNB + ' (date; ' + cmd_traffic + ' ) > ' + logfile_traffic_eNB + ' 2>&1 & \n' + task_eNB = task_eNB + 'array_exec_pid+=($!) \n' + task_eNB = task_eNB + 'echo eNB_traffic_exec PID = $! \n' + + task_eNB = task_eNB + ' (date; sudo rm -f ' + logfile_pcap_tmp_eNB + ' ; sudo -E tshark -i any -s 65535 -a duration:' + str(timeout_cmd-10)+ ' -w ' + logfile_pcap_tmp_eNB+ ' ; sudo -E chown ' + user + ' ' + logfile_pcap_tmp_eNB + ' ; zip -j -9 ' + logfile_pcap_zip_eNB + ' ' + logfile_pcap_tmp_eNB + ' ) > ' + logfile_tshark_eNB + ' 2>&1 & \n ' + task_eNB = task_eNB + 'array_exec_pid+=($!) \n' + task_eNB = task_eNB + 'echo eNB_tshark_exec PID = $! \n' + #terminate the eNB test case after timeout_cmd seconds + task_eNB = task_eNB + finalize_deploy_script (timeout_cmd, eNB_terminate_missing_procs) + ' \n' + #task_eNB = task_eNB + 'sleep ' + str(timeout_cmd) + ' \n' + task_eNB = task_eNB + 'handle_ctrl_c' + '\n' + task_eNB = task_eNB + ' ) > ' + logfile_task_eNB_out + ' 2>&1 ' + write_file(logfile_task_eNB, task_eNB, mode="w") + + #task_eNB = 'echo \" ' + task_eNB + '\" > ' + logfile_script_eNB + ' 2>&1 ; ' + task_eNB + logfile_compile_UE = logdir_UE + '/UE_compile' + '_' + str(run) + '_.log' + logfile_exec_UE = logdir_UE + '/UE_exec' + '_' + str(run) + '_.log' + logfile_pre_exec_UE = logdir_UE + '/UE_pre_exec' + '_' + str(run) + '_.log' + logfile_traffic_UE = logdir_UE + '/UE_traffic' + '_' + str(run) + '_.log' + logfile_task_UE_out = logdir_UE + '/UE_task_out' + '_' + str(run) + '_.log' + logfile_task_UE = logdir_local_testcase + '/UE_task' + '_' + str(run) + '_.log' + logfile_task_UE_compile_out = logdir_UE + '/UE_task_compile_out' + '_' + str(run) + '_.log' + logfile_task_UE_compile = logdir_local_testcase + '/UE_task_compile' + '_' + str(run) + '_.log' + logfile_local_traffic_UE_out = logdir_local_testcase + '/UE_traffic' + '_' + str(run) + '_.log' + + task_UE_compile = ' ( uname -a ; date \n' + task_UE_compile = task_UE_compile + 'array_exec_pid=()' + '\n' + task_UE_compile = task_UE_compile + 'cd ' + logdirOAI5GRepo + '\n' + task_UE_compile = task_UE_compile + 'source oaienv \n' + task_UE_compile = task_UE_compile + 'source cmake_targets/tools/build_helper \n' + task_UE_compile = task_UE_compile + 'env |grep OPENAIR \n' + task_UE_compile = task_UE_compile + update_config_file(oai_UE, UE_config_file, logdirOAI5GRepo, '$OPENAIR_DIR/cmake_targets/autotests/tools/search_repl.py') + '\n' + if UE_compile_prog != "": + task_UE_compile = task_UE_compile + ' ( ' + UE_compile_prog + ' '+ UE_compile_prog_args + ' ) > ' + logfile_compile_UE + ' 2>&1 \n' + task_UE_compile = task_UE_compile + ' ) > ' + logfile_task_UE_compile_out + ' 2>&1 ' + write_file(logfile_task_UE_compile, task_UE_compile, mode="w") + + task_UE = ' ( uname -a ; date \n' + task_UE = task_UE + 'array_exec_pid=()' + '\n' + task_UE = task_UE + 'cd ' + logdirOAI5GRepo + '\n' + task_UE = task_UE + 'source oaienv \n' + task_UE = task_UE + 'source cmake_targets/tools/build_helper \n' + task_UE = task_UE + 'env |grep OPENAIR \n' + if UE_pre_exec != "": + task_UE = task_UE + ' ( date; ' + UE_pre_exec + ' '+ UE_pre_exec_args + ' ) > ' + logfile_pre_exec_UE + ' 2>&1 \n' + if UE_main_exec != "": + task_UE = task_UE + ' ( date; ' + addsudo(UE_main_exec + ' ' + UE_main_exec_args, mypassword) + ' ) > ' + logfile_exec_UE + ' 2>&1 & \n' + task_UE = task_UE + 'array_exec_pid+=($!) \n' + task_UE = task_UE + 'echo UE_main_exec PID = $! \n' + if UE_traffic_exec != "": + cmd_traffic = UE_traffic_exec + ' ' + UE_traffic_exec_args + if cmd_traffic.find('-c') >= 0: + cmd_traffic = cmd_traffic + ' -t ' + str(timeout_cmd - 60) + task_UE = task_UE + ' ( date; ' + cmd_traffic + ' ) >' + logfile_traffic_UE + ' 2>&1 & \n' + task_UE = task_UE + 'array_exec_pid+=($!) \n' + task_UE = task_UE + 'echo UE_traffic_exec PID = $! \n' + #terminate the UE test case after timeout_cmd seconds + task_UE = task_UE + finalize_deploy_script (timeout_cmd, UE_terminate_missing_procs) + ' \n' + #task_UE = task_UE + 'sleep ' + str(timeout_cmd) + ' \n' + task_UE = task_UE + 'handle_ctrl_c' + '\n' + task_UE = task_UE + ' ) > ' + logfile_task_UE_out + ' 2>&1 ' + write_file(logfile_task_UE, task_UE, mode="w") + #task_UE = 'echo \" ' + task_UE + '\" > ' + logfile_script_UE + ' 2>&1 ; ' + task_UE + + logfile_compile_EPC = logdir_EPC + '/EPC_compile' + '_' + str(run) + '_.log' + logfile_compile_HSS = logdir_EPC + '/HSS_compile' + '_' + str(run) + '_.log' + logfile_exec_EPC = logdir_EPC + '/EPC_exec' + '_' + str(run) + '_.log' + logfile_pre_exec_EPC = logdir_EPC + '/EPC_pre_exec' + '_' + str(run) + '_.log' + logfile_exec_HSS = logdir_EPC + '/HSS_exec' + '_' + str(run) + '_.log' + logfile_traffic_EPC = logdir_EPC + '/EPC_traffic' + '_' + str(run) + '_.log' + logfile_task_EPC_out = logdir_EPC + '/EPC_task_out' + '_' + str(run) + '_.log' + logfile_task_EPC = logdir_local_testcase + '/EPC_task' + '_' + str(run) + '_.log' + logfile_task_EPC_compile_out = logdir_EPC + '/EPC_task_compile_out' + '_' + str(run) + '_.log' + logfile_task_EPC_compile = logdir_local_testcase + '/EPC_task_compile' + '_' + str(run) + '_.log' + logfile_local_traffic_EPC_out = logdir_local_testcase + '/EPC_traffic' + '_' + str(run) + '_.log' + + task_EPC_compile = ' ( uname -a ; date \n' + task_EPC_compile = task_EPC_compile + 'array_exec_pid=()' + '\n' + task_EPC_compile = task_EPC_compile + 'cd ' + logdirOpenaircnRepo + ' ; source oaienv \n' + task_EPC_compile = task_EPC_compile + update_config_file(oai_EPC, EPC_config_file, logdirOpenaircnRepo, logdirOpenaircnRepo+'/TEST/autotests/tools/search_repl.py') + '\n' + task_EPC_compile = task_EPC_compile + 'source BUILD/TOOLS/build_helper \n' + if EPC_compile_prog != "": + task_EPC_compile = task_EPC_compile + '(' + EPC_compile_prog + ' ' + EPC_compile_prog_args + ' ) > ' + logfile_compile_EPC + ' 2>&1 \n' + if HSS_compile_prog != "": + task_EPC_compile = task_EPC_compile + '(' + HSS_compile_prog + ' ' + HSS_compile_prog_args + ' ) > ' + logfile_compile_HSS + ' 2>&1 \n' + task_EPC_compile = task_EPC_compile + ' ) > ' + logfile_task_EPC_compile_out + ' 2>&1 ' + write_file(logfile_task_EPC_compile, task_EPC_compile, mode="w") + + task_EPC = ' ( uname -a ; date \n' + task_EPC = task_EPC + 'array_exec_pid=()' + '\n' + task_EPC = task_EPC + 'cd ' + logdirOpenaircnRepo + '; source oaienv\n' + task_EPC = task_EPC + 'source BUILD/TOOLS/build_helper \n' + if EPC_pre_exec != "": + task_EPC = task_EPC + ' ( date; ' + EPC_pre_exec + ' '+ EPC_pre_exec_args + ' ) > ' + logfile_pre_exec_EPC + ' 2>&1 \n' + if HSS_main_exec != "": + task_EPC = task_EPC + '( date; ' + addsudo (HSS_main_exec + ' ' + HSS_main_exec_args, mypassword) + ' ) > ' + logfile_exec_HSS + ' 2>&1 & \n' + task_EPC = task_EPC + 'array_exec_pid+=($!) \n' + task_EPC = task_EPC + 'echo HSS_main_exec PID = $! \n' + if EPC_main_exec != "": + task_EPC = task_EPC + '( date; ' + addsudo (EPC_main_exec + ' ' + EPC_main_exec_args, mypassword) + ' ) > ' + logfile_exec_EPC + ' 2>&1 & \n' + task_EPC = task_EPC + 'array_exec_pid+=($!) \n' + task_EPC = task_EPC + 'echo EPC_main_exec PID = $! \n' + if EPC_traffic_exec != "": + cmd_traffic = EPC_traffic_exec + ' ' + EPC_traffic_exec_args + if cmd_traffic.find('-c') >= 0: + cmd_traffic = cmd_traffic + ' -t ' + str(timeout_cmd - 60) + task_EPC = task_EPC + '( date; ' + cmd_traffic + ' ) > ' + logfile_traffic_EPC + ' 2>&1 & \n' + task_EPC = task_EPC + 'array_exec_pid+=($!) \n' + task_EPC = task_EPC + 'echo EPC_traffic_exec PID = $! \n' + #terminate the EPC test case after timeout_cmd seconds + task_EPC = task_EPC + finalize_deploy_script (timeout_cmd, EPC_terminate_missing_procs) + '\n' + #task_EPC = task_EPC + 'sleep ' + str(timeout_cmd) + '\n' + task_EPC = task_EPC + 'handle_ctrl_c' '\n' + task_EPC = task_EPC + ' ) > ' + logfile_task_EPC_out + ' 2>&1 ' + write_file(logfile_task_EPC, task_EPC, mode="w") + + #first we compile all the programs + thread_EPC = oaiThread(1, "EPC_thread", EPCMachine, user, password , task_EPC_compile, False, timeout_thread) + thread_eNB = oaiThread(2, "eNB_thread", eNBMachine, user, password , task_eNB_compile, False, timeout_thread) + thread_UE = oaiThread(3, "UE_thread", UEMachine, user, password , task_UE_compile, False, timeout_thread) + threads=[] + threads.append(thread_eNB) + threads.append(thread_UE) + threads.append(thread_EPC) + # Start new Threads + thread_eNB.start() + thread_UE.start() + thread_EPC.start() + #Wait for all the compile threads to complete + for t in threads: + t.join() + + #Now we execute all the threads + thread_EPC = oaiThread(1, "EPC_thread", EPCMachine, user, password , task_EPC, False, timeout_thread) + thread_eNB = oaiThread(2, "eNB_thread", eNBMachine, user, password , task_eNB, False, timeout_thread) + thread_UE = oaiThread(3, "UE_thread", UEMachine, user, password , task_UE, False, timeout_thread) + + threads=[] + threads.append(thread_eNB) + threads.append(thread_UE) + threads.append(thread_EPC) + # Start new Threads + + thread_eNB.start() + thread_UE.start() + thread_EPC.start() + + #Wait for all the compile threads to complete + for t in threads: + t.join() + #Now we get the log files from remote machines on the local machine + cleanOldProgramsAllMachines([oai_eNB, oai_UE, oai_EPC] , oldprogramList, CleanUpAluLteBox, ExmimoRfStop) + + #cleanOldPrograms(oai_eNB, oldprogramList, CleanUpAluLteBox, ExmimoRfStop) + #cleanOldPrograms(oai_UE, oldprogramList, CleanUpAluLteBox, ExmimoRfStop) + #cleanOldPrograms(oai_EPC, oldprogramList, CleanUpAluLteBox, ExmimoRfStop) + logfile_UE_stop_script_out = logdir_UE + '/UE_stop_script_out' + '_' + str(run) + '_.log' + logfile_UE_stop_script = logdir_local_testcase + '/UE_stop_script' + '_' + str(run) + '_.log' + + if UE_stop_script != "": + cmd = ' ( uname -a ; date \n' + cmd = cmd + 'cd ' + logdirOAI5GRepo + ' ; source oaienv ; source cmake_targets/tools/build_helper \n' + cmd = cmd + 'env |grep OPENAIR \n' + 'array_exec_pid=() \n' + cmd = cmd + UE_stop_script + '\n' + cmd = cmd + ') > ' + logfile_UE_stop_script_out + ' 2>&1 ' + write_file(logfile_UE_stop_script , cmd, mode="w") + thread_UE = oaiThread(4, "UE_thread", UEMachine, user, password , cmd, False, timeout_thread) + thread_UE.start() + thread_UE.join() + + #Now we change the permissions of the logfiles to avoid some of them being with root permissions + cmd = 'sudo -E chown -R ' + user + ' ' + logdir_eNB + res= oai_eNB.send_recv(cmd) + print "Changing permissions of logdir <" + logdir_eNB + "> in eNB machine..." + res + + cmd = 'sudo -E chown -R ' + user + ' ' + logdir_UE + res= oai_UE.send_recv(cmd) + print "Changing permissions of logdir <" + logdir_UE + "> in UE machine..." + res + + cmd = 'sudo -E chown -R ' + user + ' ' + logdir_EPC + res= oai_EPC.send_recv(cmd) + print "Changing permissions of logdir <" + logdir_EPC + "> in EPC machine..." + res + + + print "Copying files from EPCMachine : " + EPCMachine + "logdir_EPC = " + logdir_EPC + #ssh = SSHSession(EPCMachine , username=user, key_file=None, password=password) + #ssh.get_all(logdir_EPC , logdir_local + '/cmake_targets/autotests/log/'+ testcasename) + SSHSessionWrapper(EPCMachine, user, None, password, logdir_EPC, logdir_local + '/cmake_targets/autotests/log/'+ testcasename, "get_all") + + print "Copying files from eNBMachine " + eNBMachine + "logdir_eNB = " + logdir_eNB + #ssh = SSHSession(eNBMachine , username=user, key_file=None, password=password) + #ssh.get_all(logdir_eNB, logdir_local + '/cmake_targets/autotests/log/'+ testcasename) + SSHSessionWrapper(eNBMachine, user, None, password, logdir_eNB, logdir_local + '/cmake_targets/autotests/log/'+ testcasename, "get_all") + + print "Copying files from UEMachine : " + UEMachine + "logdir_UE = " + logdir_UE + #ssh = SSHSession(UEMachine , username=user, key_file=None, password=password) + #ssh.get_all(logdir_UE , logdir_local + '/cmake_targets/autotests/log/'+ testcasename) + SSHSessionWrapper(UEMachine, user, None, password, logdir_UE, logdir_local + '/cmake_targets/autotests/log/'+ testcasename, "get_all") + + + + #Currently we only perform throughput tests + tput_run_string='' + result, tput_string = tput_test_search_expr(eNB_search_expr_true, logfile_local_traffic_eNB_out) + tput_run_string = tput_run_string + tput_string + run_result=run_result&result + result, tput_string = tput_test_search_expr(EPC_search_expr_true, logfile_local_traffic_EPC_out) + run_result=run_result&result + tput_run_string = tput_run_string + tput_string + result, tput_string = tput_test_search_expr(UE_search_expr_true, logfile_local_traffic_UE_out) + run_result=run_result&result + tput_run_string = tput_run_string + tput_string + + if run_result == 1: + run_result_string = ' RUN_'+str(run) + ' = PASS' + else: + run_result_string = ' RUN_'+str(run) + ' = FAIL' + + run_result_string = run_result_string + tput_run_string + + test_result=test_result & run_result + test_result_string=test_result_string + run_result_string + + oai_eNB.disconnect() + oai_UE.disconnect() + oai_EPC.disconnect() + #We need to close the new ssh session that was created + #if index_eNBMachine == index_EPCMachine: + # oai_EPC.disconnect() + #Now we finalize the xml file of the test case + end_time=time.time() + duration= end_time - start_time + xmlFile = logdir_local + '/cmake_targets/autotests/log/'+ testcasename + '/test.' + testcasename + '.xml' + if test_result ==0: + result='FAIL' + else: + result = 'PASS' + xml="\n \n" + write_file(xmlFile, xml, mode="w") + + +# \brief This function searches if test case is present in list of test cases that need to be executed by user +# \param testcasename the test case to search for +# \param testcasegroup list that is passed from the arguments +# \param test_case_exclude list of test cases excluded from execution (specified in test_case_list.xml) +def search_test_case_group(testcasename, testcasegroup, test_case_exclude): + + if test_case_exclude != "": + testcase_exclusion_list=test_case_exclude.split() + for entry in testcase_exclusion_list: + if entry.find('+') >=0: + match = re.search(entry, testcasename) + if match: + print "\nSkipping test case as it is found in black list: " + testcasename + return False + else: + match = entry.find(testcasename) + if match >=0: + print "\nSkipping test case as it is found in black list: " + testcasename + return False + if testcasegroup == '': + return True + else: + testcaselist = testcasegroup.split() + for entry in testcaselist: + if entry.find('+') >=0: + match = re.search(entry, testcasename) + if match: + return True + else: + match = testcasename.find(entry) + if match >=0: + return True + return False + +# \brief thread that cleans up remote machines from pre-existing test case executions +# \param threadID number of thread (for book keeping) +# \param threadname name of thread (for book keeping) +# \param oai handler that can be used to execute programs on remote machines +# \param CleanUpOldProgs list of programs which must be terminated before running a test case (specified in test_case_list.xml) +# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml) +# \param ExmimoRfStop command to stop EXMIMO Card +class oaiCleanOldProgramThread (threading.Thread): + def __init__(self, threadID, threadname, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop): + threading.Thread.__init__(self) + self.threadID = threadID + self.threadname = threadname + self.oai = oai + self.CleanUpOldProgs = CleanUpOldProgs + self.CleanUpAluLteBox = CleanUpAluLteBox + self.ExmimoRfStop = ExmimoRfStop + def run(self): + try: + cleanOldPrograms(self.oai, self.CleanUpOldProgs, self.CleanUpAluLteBox, self.ExmimoRfStop) + except Exception, e: + error='' + error = error + ' In class oaiCleanOldProgramThread, function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n threadID = ' + str(self.threadID) + '\n threadname = ' + self.threadname + '\n CleanUpOldProgs = ' + self.CleanUpOldProgs + '\n CleanUpAluLteBox = ' + self.CleanUpAluLteBox + '\n ExmimoRfStop = ' + self.ExmimoRfStop + '\n' + error = error + traceback.format_exc() + print error + +# \brief Run parallel threads in all machines for clean up old execution of test cases +# \param oai_list list of handlers that can be used to execute programs on remote machines +# \param CleanUpOldProgs list of programs which must be terminated before running a test case (specified in test_case_list.xml) +# \param CleanupAluLteBox string that contains commands to stop ALU Bell Labs LTEBox (specified in test_case_list.xml) +# \param ExmimoRfStop command to stop EXMIMO Card +def cleanOldProgramsAllMachines(oai_list, CleanOldProgs, CleanUpAluLteBox, ExmimoRfStop): + threadId=0 + threadList=[] + for oai in oai_list: + threadName="cleanup_thread_"+str(threadId) + thread=oaiCleanOldProgramThread(threadId, threadName, oai, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) + threadList.append(thread) + thread.start() + threadId = threadId + 1 + for t in threadList: + t.join() + + +debug = 0 +pw ='' +i = 0 +dlsim=0 +localshell=0 +GitOAI5GRepoBranch='' +GitOAI5GHeadVersion='' +user='' +pw='' +testcasegroup='' +NFSResultsShare='' +cleanUpRemoteMachines=False +openairdir_local = os.environ.get('OPENAIR_DIR') +if openairdir_local is None: + print "Environment variable OPENAIR_DIR not set correctly" + sys.exit() +locallogdir = openairdir_local + '/cmake_targets/autotests/log' +MachineList = '' +MachineListGeneric='' +flag_remove_logdir=False +flag_start_testcase=False +nruns_lte_softmodem='' +flag_skip_git_head_check=False +Timeout_cmd='' +print "Number of arguments argc = " + str(len(sys.argv)) +#for index in range(1,len(sys.argv) ): +# print "argv_" + str(index) + " : " + sys.argv[index] + +i=1 +while i < len (sys.argv): + arg=sys.argv[i] + if arg == '-r': + flag_remove_logdir=True + elif arg == '-s' : + flag_start_testcase=True + elif arg == '-g' : + testcasegroup = sys.argv[i+1].replace("\"","") + i = i +1 + elif arg == '-c': + cleanUpRemoteMachines=True + elif arg == '-5GRepoBranch': + GitOAI5GRepoBranch = sys.argv[i+1] + i = i +1 + elif arg == '-5GRepoHeadVersion': + GitOAI5GHeadVersion = sys.argv[i+1] + #We now find the branch that corresponds to this Git Head Commit + cmd = "git show-ref --head " + " | grep " + GitOAI5GHeadVersion + cmd_out = subprocess.check_output ([cmd], shell=True) + cmd_out=cmd_out.replace("\n","") + cmd_out = cmd_out.split('/') + GitOAI5GRepoBranch = cmd_out[-1] + if GitOAI5GRepoBranch == '': + print "Error extracting GitBranch from head commit. Exiting now..." + sys.exit(1) + i = i +1 + elif arg == '-u': + user = sys.argv[i+1] + i = i +1 + elif arg == '-p': + pw = sys.argv[i+1] + i = i +1 + elif arg == '-n': + NFSResultsShare = sys.argv[i+1] + i = i +1 + elif arg == '--nrun_lte_softmodem': + nruns_lte_softmodem = sys.argv[i+1] + i = i +1 + elif arg == '-MachineList': + MachineList = sys.argv[i+1] + MachineList = MachineList.replace("\"","") + MachineList = MachineList.replace("\'","") + i = i +1 + elif arg == '-MachineListGeneric': + MachineListGeneric = sys.argv[i+1] + MachineListGeneric = MachineListGeneric.replace("\"","") + MachineListGeneric = MachineListGeneric.replace("\'","") + i = i +1 + elif arg == '--skip-git-head-check': + flag_skip_git_head_check=True + elif arg == '--timeout_cmd': + Timeout_cmd = sys.argv[i+1] + i = i +1 + elif arg == '-h' : + print "-s: This flag *MUST* be set to start the test cases" + print "-r: Remove the log directory in autotests" + print "-g: Run test cases in a group" + print "-c: Run cleanup scripts on remote machines and exit" + print "-5GRepoBranch: Branch for OAI 5G Repository to run tests (overrides the branch in test_case_list.xml)" + print "-5GRepoHeadVersion: Head commit on which to run tests (overrides the branch in test_case_list.xml)" + print "-u: use the user name passed as argument" + print "-p: use the password passed as an argument" + print "-n: Set the NFS share passed as an argument" + print "--nrun_lte_softmodem: Set the number of runs for lte-softmodem test case class" + print "-MachineList : overrides the MachineList parameter in test_case_list.xml" + print "-MachineListGeneric : overrides the MachineListGeneric parameter in test_case_list.xml" + print "--skip-git-head-check: skip checking of GitHead remote/local branch (only for debugging)" + print "--timeout_cmd: Override the default parameter (timeout_cmd) in test_case_list.xml. This parameter is in seconds and should be > 120" + sys.exit() + else : + print "Unrecongnized Option: <" + arg + ">. Use -h to see valid options" + sys.exit() + i= i + 1 + +try: + os.environ["OPENAIR1_DIR"] +except KeyError: + print "Please set the environment variable OPENAIR1_DIR in the .bashrc" + sys.exit(1) + +try: + os.environ["OPENAIR2_DIR"] +except KeyError: + print "Please set the environment variable OPENAIR2_DIR in the .bashrc" + sys.exit(1) + +try: + os.environ["OPENAIR_TARGETS"] +except KeyError: + print "Please set the environment variable OPENAIR_TARGETS in the .bashrc" + sys.exit(1) + +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 ' +os.system(cmd) + +if flag_start_testcase == False: + print "You need to start the testcase by passing option -s. Use -h to see all options. Aborting now..." + sys.exit(1) + +# get the oai object +host = os.uname()[1] +#oai = openair('localdomain','calisson') +oai_list = [] + +#start_time = time.time() # datetime.datetime.now() +if user=='': + user = getpass.getuser() +if pw=='': + pw = getpass.getpass() + +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 = cmd + '; ps aux |grep \"/usr/bin/ssh -q -l ' + user + '\"|tr -s \" \" :|cut -f 2 -d :|xargs kill -9 ' +os.system(cmd) + +print "host = " + host +print "user = " + user +xmlInputFile=os.environ.get('OPENAIR_DIR')+"/cmake_targets/autotests/test_case_list.xml" +NFSResultsDir = '/mnt/sradio' +cleanupOldProgramsScript = '$OPENAIR_DIR/cmake_targets/autotests/tools/remove_old_programs.bash' +logdir = '/tmp/' + 'OAITestFrameWork-' + user + '/' +logdirOAI5GRepo = logdir + 'openairinterface5g/' +logdirOpenaircnRepo = logdir + 'openair-cn/' + +if flag_remove_logdir == True: + print "Removing directory: " + locallogdir + os.system(' rm -fr ' + locallogdir + '; mkdir -p ' + locallogdir ) + +paramiko_logfile = os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/log/paramiko.log') +res=os.system(' echo > ' + paramiko_logfile) +paramiko.util.log_to_file(paramiko_logfile) + +#pw=getpass.getpass() + +#Now we parse the xml file for basic configuration +xmlTree = ET.parse(xmlInputFile) +xmlRoot = xmlTree.getroot() + + + +if MachineList =='': + MachineList = xmlRoot.findtext('MachineList',default='') +NFSResultsShare = xmlRoot.findtext('NFSResultsShare',default='') +GitOpenaircnRepo = xmlRoot.findtext('GitOpenair-cnRepo',default='') +GitOAI5GRepo = xmlRoot.findtext('GitOAI5GRepo',default='') + +if GitOAI5GRepoBranch == '': + GitOAI5GRepoBranch = xmlRoot.findtext('GitOAI5GRepoBranch',default='') + +GitOpenaircnRepoBranch = xmlRoot.findtext('GitOpenair-cnRepoBranch',default='') +CleanUpOldProgs = xmlRoot.findtext('CleanUpOldProgs',default='') +CleanUpAluLteBox = xmlRoot.findtext('CleanUpAluLteBox',default='') +Timeout_execution = int (xmlRoot.findtext('Timeout_execution')) +if MachineListGeneric == '': + MachineListGeneric = xmlRoot.findtext('MachineListGeneric',default='') +TestCaseExclusionList = xmlRoot.findtext('TestCaseExclusionList',default='') +ExmimoRfStop = xmlRoot.findtext('ExmimoRfStop',default='') +if nruns_lte_softmodem == '': + nruns_lte_softmodem = xmlRoot.findtext('nruns_lte-softmodem',default='') + +print "MachineList = " + MachineList +print "GitOpenair-cnRepo = " + GitOpenaircnRepo +print "GitOAI5GRepo = " + GitOAI5GRepo +print "GitOAI5GBranch = " + GitOAI5GRepoBranch +print "GitOpenaircnRepoBranch = " + GitOpenaircnRepoBranch +print "NFSResultsShare = " + NFSResultsShare +print "nruns_lte_softmodem = " + nruns_lte_softmodem +print "Timeout_cmd = " + Timeout_cmd + +if GitOAI5GHeadVersion == '': + cmd = "git show-ref --heads -s "+ GitOAI5GRepoBranch + GitOAI5GHeadVersion = subprocess.check_output ([cmd], shell=True) + GitOAI5GHeadVersion=GitOAI5GHeadVersion.replace("\n","") + +print "GitOAI5GHeadVersion = " + GitOAI5GHeadVersion +print "CleanUpOldProgs = " + CleanUpOldProgs +print "Timeout_execution = " + str(Timeout_execution) + +if GitOAI5GHeadVersion == '': + print "Error getting the OAI5GBranch Head version...Exiting" + sys.exit() + +NFSTestsResultsDir = NFSResultsShare + '/'+ GitOAI5GRepoBranch + '/' + GitOAI5GHeadVersion + +print "NFSTestsResultsDir = " + NFSTestsResultsDir + +MachineList = MachineList.split() +MachineListGeneric = MachineListGeneric.split() + +#index=0 +for machine in MachineList: + oai_list.append( openair('localdomain',machine)) + #index = index + 1 + + +print "\nTesting the sanity of machines used for testing..." +if localshell == 0: + try: + index=0 + for machine in MachineList: + print '\n******* Note that the user <'+user+'> should be a sudoer *******\n' + print '******* Connecting to the machine <'+machine+'> to perform the test *******\n' + if not pw : + print "username: " + user + #pw = getpass.getpass() + #print "password: " + pw + else : + print "username: " + user + #print "password: " + pw + # issues in ubuntu 12.04 + oai_list[index].connect(user,pw) + print '\nChecking for sudo permissions on machine <'+machine+'>...' + result = oai_list[index].send_expect_false('sudo -S -v','may not run sudo',True) + print "Sudo permissions..." + result + + print '\nCleaning Older running programs : ' + CleanUpOldProgs + cleanOldPrograms(oai_list[index], CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) + + result = oai_list[index].send('mount ' + NFSResultsDir, True) + print "Mounting NFS Share " + NFSResultsDir + "..." + result + + # Check if NFS share is mounted correctly. + print 'Checking if NFS Share<' + NFSResultsDir + '> is mounted correctly...' + #result = oai_list[index].send_expect('mount | grep ' + NFSResultsDir, NFSResultsDir ) + cmd = 'if grep -qs '+NFSResultsDir+ ' /proc/mounts; then echo \'' + NFSResultsDir + ' is mounted\' ; fi' + search_expr = NFSResultsDir + ' is mounted' + print "cmd = " + cmd + print "search_expr = " + search_expr + result = oai_list[index].send_expect(cmd, search_expr) + print "Mount NFS_Results_Dir..." + result + index = index + 1 + + #oai.connect2(user,pw) + #oai.get_shell() + except : + print 'Fail to connect to the machine: '+ machine + sys.exit(1) +else: + pw = '' + oai_list[0].connect_localshell() + +#We now prepare the machines for testing +index=0 +threads_init_setup=[] +for oai in oai_list: + try: + print "setting up machine: " + MachineList[index] + #print oai_list[oai].send_recv('echo \''+pw+'\' |sudo -S -v') + #print oai_list[oai].send_recv('sudo su') + #print oai_list[oai].send_recv('who am i') + #cleanUpPrograms(oai_list[oai] + cmd = 'sudo -S -E rm -fr ' + logdir + ' ; mkdir -p ' + logdir + result = oai.send_recv(cmd) + + setuplogfile = logdir + '/setup_log_' + MachineList[index] + '_.txt' + setup_script = locallogdir + '/setup_script_' + MachineList[index] + '_.txt' + cmd = ' ( \n' + #cmd = cmd + 'rm -fR ' + logdir + '\n' + #cmd = cmd + 'mkdir -p ' + logdir + '\n' + cmd = cmd + 'cd '+ logdir + '\n' + cmd = cmd + 'git config --global http.sslVerify false \n' + cmd = cmd + 'git clone --depth 1 '+ GitOAI5GRepo + ' -b ' + GitOAI5GRepoBranch +' \n' + cmd = cmd + 'git clone '+ GitOpenaircnRepo + ' -b ' +GitOpenaircnRepoBranch + ' \n' + cmd = cmd + 'cd ' + logdirOAI5GRepo + '\n' + cmd = cmd + 'git checkout ' + GitOAI5GRepoBranch + '\n' + #cmd = cmd + 'git checkout ' + GitOAI5GHeadVersion + '\n' + cmd = cmd + 'git_head=`git ls-remote |grep \'' + GitOAI5GRepoBranch + '\'` \n' + cmd = cmd + 'git_head=($git_head) \n' + cmd = cmd + 'git_head=${git_head[0]} \n' + cmd = cmd + 'echo \"GitOAI5GHeadVersion_remote = $git_head\"' + cmd = cmd + 'echo \"GitOAI5GHeadVersion_local = ' + GitOAI5GHeadVersion + '\" \n' + if flag_skip_git_head_check==True: + cmd = cmd + 'echo \"skipping GitHead check...\" \n ' + else: + cmd = cmd + 'if [ \"$git_head\" != \"'+ GitOAI5GHeadVersion + '\" ]; then echo \"error: Git openairinterface5g head version does not match\" ; fi \n' + cmd = cmd + 'source oaienv' + '\n' + cmd = cmd + 'cd ' + logdirOpenaircnRepo + '\n' + cmd = cmd + 'git checkout ' + GitOpenaircnRepoBranch + '\n' + cmd = cmd + 'env |grep OPENAIR' + '\n' + cmd = cmd + ' cd ' + logdir + '\n' + cmd = cmd + ' ) > ' + setuplogfile + ' 2>&1 \n' + #cmd = cmd + 'echo \' ' + cmd + '\' > ' + setup_script + ' 2>&1 \n ' + #result = oai_list[index].send_recv(cmd, False, 300 ) + write_file(setup_script, cmd, mode="w") + tempThread = oaiThread(index, 'thread_setup_'+str(index)+'_' + MachineList[index] , MachineList[index] , user, pw, cmd, False, 300) + threads_init_setup.append(tempThread ) + tempThread.start() + index = index + 1 + except Exception, e: + print 'There is error in one of the commands to setup the machine '+ MachineList[index] + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + sys.exit(1) + +#Now we wait for all the threads to complete +index = 0 +for t in threads_init_setup: + t.join() + setuplogfile = logdir + '/setup_log_' + MachineList[index] + '_.txt' + setup_script = locallogdir + '/setup_script_' + MachineList[index] + '_.txt' + localfile = locallogdir + '/setup_log_' + MachineList[index] + '_.txt' + remotefile = logdir + '/setup_log_' + MachineList[index] + '_.txt' + port = 22 + + paramList=[] + sftp_log = os.path.expandvars(locallogdir + '/sftp_module.log') + paramList.append ( {"operation":'get', "localfile":localfile, "remotefile":remotefile} ) + #sftp_module (user, pw, MachineList[index], port, localfile, remotefile, sftp_log, "get") + + #Now we copy test_case_list.xml on the remote machines + localfile = os.path.expandvars('$OPENAIR_DIR/cmake_targets/autotests/test_case_list.xml') + remotefile = logdirOAI5GRepo + '/cmake_targets/autotests/test_case_list.xml' + 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 = ' cd ' + logdirOAI5GRepo + ' ; source oaienv ; env|grep OPENAIR \n' + res = oai_list[index].send_recv(cmd) + index = index +1 + if os.path.exists(localfile) == 0: + print "Setup log file <" + localfile + "> missing for machine <" + MachineList[index] + ">. Please check the setup log files. Exiting now" + sys.exit(1) + +#Now we process all the test cases +#Now we check if there was error in setup files + +status, out = commands.getstatusoutput('grep ' + ' -il \'error\' ' + locallogdir + '/setup_log*') +if (out != '') : + print "There is error in setup of machines" + print "status = " + str(status) + "\n Check files for error = " + out + print sys.exit(1) + +cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) +if cleanUpRemoteMachines == True: + sys.exit(0) + +threadListGlobal=[] +testcaseList=xmlRoot.findall('testCase') +#print testcaseList +for testcase in testcaseList: + try: + testcasename = testcase.get('id') + testcaseclass = testcase.findtext('class',default='') + desc = testcase.findtext('desc',default='') + #print "Machine list top level = " + ','.join(MachineList) + if search_test_case_group(testcasename, testcasegroup, TestCaseExclusionList) == True: + if testcaseclass == 'lte-softmodem' : + eNBMachine = testcase.findtext('eNB',default='') + UEMachine = testcase.findtext('UE',default='') + EPCMachine = testcase.findtext('EPC',default='') + #index_eNBMachine = MachineList.index(eNBMachine) + #index_UEMachine = MachineList.index(UEMachine) + #index_EPCMachine = MachineList.index(EPCMachine) + if (eNBMachine not in MachineList)|(UEMachine not in MachineList)|(UEMachine not in MachineList): + print "One of the machines is not in the machine list" + print "eNBMachine : " + eNBMachine + "UEMachine : " + UEMachine + "EPCMachine : " + EPCMachine + "MachineList : " + ','.join(MachineList) + print "testcasename = " + testcasename + " class = " + testcaseclass + threadListGlobal = wait_testcaseclass_generic_threads(threadListGlobal, Timeout_execution) + #cleanOldProgramsAllMachines(oai_list, CleanUpOldProgs, CleanUpAluLteBox, ExmimoRfStop) + handle_testcaseclass_softmodem (testcase, CleanUpOldProgs, logdirOAI5GRepo, logdirOpenaircnRepo, MachineList, user, pw, CleanUpAluLteBox, ExmimoRfStop, nruns_lte_softmodem, Timeout_cmd ) + elif (testcaseclass == 'compilation'): + threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, user, pw, CleanUpAluLteBox,Timeout_execution, ExmimoRfStop) + elif (testcaseclass == 'execution'): + threadListGlobal = handle_testcaseclass_generic (testcasename, threadListGlobal, CleanUpOldProgs, logdirOAI5GRepo, MachineListGeneric, user, pw, CleanUpAluLteBox, Timeout_execution, ExmimoRfStop) + else : + print "Unknown test case class: " + testcaseclass + sys.exit() + + except Exception, e: + error='' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + '\n testcasename = ' + testcasename + '\n testcaseclass = ' + testcaseclass + '\n desc = ' + 'desc' + '\n' + error = error + traceback.format_exc() + print error + print "Continuing to next test case..." + #sys.exit(1) + + +print "Exiting the test cases execution now. Waiting for existing threads to complete..." + +for param in threadListGlobal: + thread_id = param["thread_id"] + thread_id.join() + +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) + +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") + +sys.exit() diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 1425eb56a9..6e0d1c2fdb 100644 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -1,175 +1,335 @@ -mozart stevens calisson nano amerique - /mnt/sradio/TEST_RESULTS +mozart calisson stevens nano amerique + /mnt/sradio/TEST_RESULTS/ https://gitlab.eurecom.fr/oai/openairinterface5g.git https://gitlab.eurecom.fr/oai/openair-cn.git - feature-34-test_framework + develop develop - oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* ltebox* - + oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* hss hss_sim configure_cots_bandrich_ue* wvdial* iperf iperf_script ping tshark + sudo -S -E /opt/ltebox/tools/stop_ltebox +$OPENAIR_DIR/cmake_targets/build_oai -w EXMIMO -c; sudo -S -E $OPENAIR_DIR/cmake_targets/tools/stop_exmimo2; dmesg|tail + 36000 + 0104+ 015506 015507 015508 015509 015510 015511 015602 015605 015702 015705 015802 015805 016002 016005 016102 016105 016302 016305 + 3 + mozart calisson stevens nano amerique compilation Build oaisim.Rel8 - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim -r Rel8 -c + $OPENAIR_DIR/cmake_targets/oaisim_build_oai/build/oaisim + $OPENAIR_DIR/cmake_targets/at_commands/build/at_nas_ue + $OPENAIR_DIR/cmake_targets/nas_sim_tools/build/usim + $OPENAIR_DIR/cmake_targets/nas_sim_tools/build/nvram + oaisim.Rel8 1 - + compilation - Build oaisim.Rel8 + network device driver(nasmesh_fix) + Build oaisim.Rel10 - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim -r Rel10 -c + $OPENAIR_DIR/cmake_targets/oaisim_build_oai/build/oaisim + $OPENAIR_DIR/cmake_targets/at_commands/build/at_nas_ue + $OPENAIR_DIR/cmake_targets/nas_sim_tools/build/usim + $OPENAIR_DIR/cmake_targets/nas_sim_tools/build/nvram - + + oaisim.Rel10 1 compilation - Build lte-softmodem EXMIMO.Rel8 + EXMIMO.Rel10 + USRP.Rel10 - cp -vf ../CMakeLists.txt.Rel8 ../CMakeLists.txt - cp -vf ../CMakeLists.txt.Rel10 ../CMakeLists.txt - cp -vf ../CMakeLists.txt.USRP ../CMakeLists.txt - lte-softmodem - + Build oaisim_noS1.Rel10 + + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim -r Rel10 --noS1 -c + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/CMakeFiles/oai_nw_drv/oai_nw_drv.ko + oaisim_noS1.Rel10 1 - + - + compilation - Build phy unitary simulators + secuirity unitary tests + Build lte_softmodem_noS1.USRP.Rel10 - dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim test_secu_knas_encrypt_eia1 test_secu_kenb test_aes128_ctr_encrypt test_aes128_ctr_decrypt test_secu_knas_encrypt_eea2 test_secu_knas test_secu_knas_encrypt_eea1 test_kdf test_aes128_cmac_encrypt test_secu_knas_encrypt_eia2 - + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -r Rel10 --noS1 -c + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + lte-softmodem_noS1.USRP.Rel10 1 - + - + compilation - Build oaisim.Rel8 + ITTI + Build lte_softmodem_noS1.EXMIMO.Rel10 - oaisim - + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -r Rel10 --noS1 -c + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/openair_rf/openair_rf.ko + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/updatefw + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/oarf_config_exmimo.oct + lte-softmodem_noS1.EXMIMO.Rel10 1 - + - + compilation - Build oaisim_nos1.Rel10 + Build lte_softmodem_noS1.BLADERF.Rel10 - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w BLADERF -r Rel10 --noS1 -c + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + lte-softmodem_noS1.BLADERF.Rel10 1 - - - + + + compilation - Build oaisim.Rel10 + ITTI + Build lte_softmodem_noS1.ETHERNET.Rel10 - oaisim - + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w ETHERNET -r Rel10 --noS1 -c + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/lte-softmodem-nos1 + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/rb_tool + $OPENAIR_DIR/cmake_targets/lte_noS1_build_oai/build/CMakeFiles/nasmesh/nasmesh.ko + lte-softmodem_noS1.ETHERNET.Rel10 1 - - + + + + compilation - Build Nasmesh + Build lte_softmodem.USRP.Rel10 - nasmesh - - CMakeFiles/nasmesh/nasmesh.ko + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -r Rel10 -c + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + lte-softmodem.USRP.Rel10 1 - + + + compilation + Build lte_softmodem.EXMIMO.Rel10 + + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -r Rel10 -c + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/CMakeFiles/openair_rf/openair_rf.ko + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/updatefw + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/oarf_config_exmimo.oct + + + + + + + lte-softmodem.EXMIMO.Rel10 + 1 + + + + compilation + Build lte_softmodem.BLADERF.Rel10 + + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w BLADERF -r Rel10 -c + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + + + + + + + lte-softmodem.BLADERF.Rel10 + 1 + + + + compilation + Build lte_softmodem.ETHERNET.Rel10 + + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w ETHERNET -r Rel10 -c + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + + + + + + + lte-softmodem.ETHERNET.Rel10 + 1 + compilation - Build RRH Gateway + Build phy unitary simulators + secuirity unitary tests - rrh_gw - + $OPENAIR_DIR/cmake_targets/build_oai + --phy_simulators --core_simulators -c + $OPENAIR_DIR/cmake_targets/lte-simulators/build/dlsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/ulsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/pucchsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/prachsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/pdcchsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/pbchsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/mbmssim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eia1 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_kenb + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_ctr_encrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_ctr_decrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eea2 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eea1 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_kdf + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_cmac_encrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eia2 + unitary-sim.Rel10 + 1 + + + + + compilation + Build RRH Gateway + + $OPENAIR_DIR/cmake_targets/build_oai + --RRH -w USRP -c + $OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw + + + + + + + RRH.USRP.Rel10 + 1 + + + + compilation + Build RRH Gateway + + $OPENAIR_DIR/cmake_targets/build_oai + --RRH -w EXMIMO -c + $OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw + $OPENAIR_DIR/cmake_targets/rrh_gw/build/CMakeFiles/openair_rf/openair_rf.ko + $OPENAIR_DIR/cmake_targets/rrh_gw/build/updatefw + $OPENAIR_DIR/cmake_targets/rrh_gw/build/oarf_config_exmimo.oct + + + + + + + RRH.EXMIMO.Rel10 + 1 + + + + compilation + Build RRH Gateway + + $OPENAIR_DIR/cmake_targets/build_oai + --RRH -w BLADERF -c + $OPENAIR_DIR/cmake_targets/rrh_gw/build/rrh_gw + + + + + + + RRH.BLADERF.Rel10 1 execution - Run OAISIM Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit + Run OAISIM Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 2 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 2 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 5 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 5 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 5 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_noS1.tdd.20MHz.TM2 "Received RRCConnectionReconfigurationComplete from UE 0" segmentation fault|assertion|exiting|fatal 3 @@ -177,26 +337,20 @@ execution - Run OAISIM Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors, segmentation fault or exit + Run OAISIM Rel10 TDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 2 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 2 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 5 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 5 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 5 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 -a - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 -a + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_noS1.tdd.20MHz.TM2 "Received RRCConnectionReconfigurationComplete from UE 0" segmentation fault|assertion|exiting|fatal 3 @@ -204,26 +358,20 @@ execution - Run OAISIM Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit + Run OAISIM Rel10 TDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 2 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 2 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 5 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 5 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 5 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_noS1.tdd.20MHz.TM2 "Received RRCConnectionReconfigurationComplete from UE 0" "Received RRCConnectionReconfigurationComplete from UE 1" "Received RRCConnectionReconfigurationComplete from UE 2" segmentation fault|assertion|exiting|fatal 3 @@ -233,24 +381,18 @@ execution Run OAISIM Rel10 TDD, 1 eNB + 3 UEs (5 MHz) in PHY_ABSTRACTION mode and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 2 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 2 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 5 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 5 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 5 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 -a - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 -a + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_nos1.tdd.20MHz.TM2 "Received RRCConnectionReconfigurationComplete from UE 0" "Received RRCConnectionReconfigurationComplete from UE 1" "Received RRCConnectionReconfigurationComplete from UE 2" segmentation fault|assertion|exiting|fatal 3 @@ -260,24 +402,18 @@ execution Run OAI Rel10 TDD, 1 eNB + 1 UE (5 MHz) without abstraction mode, send ping from from eNB to UE, and check that there is no packet losses - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 2 -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 2 -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 5 -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 5 -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 5 -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 -c26 - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 -c26 + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_noS1.tdd.20MHz.TM2 "DL and UL loss rate below 10" segmentation fault|assertion|exiting|fatal 3 @@ -287,24 +423,18 @@ execution Run OAI Rel10 TDD, 1 eNB + 1 UE (5 MHz) in PHY_ABSTRACTION mode, send ping from from eNB to UE, and check that there is no packet losses - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 2 -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 2 -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 5 -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 5 -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 5 -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 -c26 -a - tdd.5MHz.TM1 tdd.10MHz.TM1 tdd.20MHz.TM1 tdd.5MHz.TM2 tdd.10MHz.TM2 tdd.20MHz.TM2 tdd.5MHz.TM5 tdd.10MHz.TM5 tdd.20MHz.TM5 tdd.5MHz.TM6 tdd.10MHz.TM6 tdd.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 -c26 -a + oaisim_noS1.tdd.5MHz.TM1 oaisim_noS1.tdd.10MHz.TM1 oaisim_noS1.tdd.20MHz.TM1 oaisim_noS1.tdd.5MHz.TM2 oaisim_noS1.tdd.10MHz.TM2 oaisim_noS1.tdd.20MHz.TM2 "DL and UL loss rate below 10" segmentation fault|assertion|exiting|fatal 3 @@ -312,26 +442,20 @@ execution - Run OAISIM Rel10 FDD, 1 eNB + 1 UE 1 eNB (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit + Run OAISIM Rel10 FDD, 1 eNB + 1 UE 1 eNB (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 2 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 2 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 5 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 5 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 5 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 -F - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 -F + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 "Received RRCConnectionReconfigurationComplete from UE 0" segmentation fault|assertion|exiting|fatal 3 @@ -339,26 +463,20 @@ execution - Run OAISIM Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors + Run OAISIM Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 2 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 2 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 5 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 5 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 5 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 -F -a - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 -F -a + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 "Received RRCConnectionReconfigurationComplete from UE 0" segmentation fault|assertion|exiting|fatal 3 @@ -366,26 +484,20 @@ execution - Run OAISIM Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) and search for errors, segmentation fault or exit + Run OAISIM Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) and search for errors, segmentation fault or exit - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 2 -F -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 2 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 5 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 5 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 5 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -F - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 -F - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 -F + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 "Received RRCConnectionReconfigurationComplete from UE 0" "Received RRCConnectionReconfigurationComplete from UE 1" "Received RRCConnectionReconfigurationComplete from UE 2" segmentation fault|assertion|exiting|fatal 3 @@ -393,26 +505,20 @@ execution - Run OAISIM Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode and search for errors + Run OAISIM Rel10 FDD, 1 eNB + 3 UEs (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode and search for errors - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 1 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 1 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 1 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 2 -F -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 2 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 5 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 5 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 5 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 25 -x 6 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 50 -x 6 -F -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 6 -F -a - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u3 -n100 -R 100 -x 2 -F -a + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 "Received RRCConnectionReconfigurationComplete from UE 0" "Received RRCConnectionReconfigurationComplete from UE 1" "Received RRCConnectionReconfigurationComplete from UE 2" segmentation fault|assertion|exiting|fatal 3 @@ -420,26 +526,20 @@ execution - Run OAI Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) without PHY_ABSTRACTION mode, ping from from eNB to UE, and for check for no packet losses + Run OAI Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) without PHY_ABSTRACTION mode, ping from from eNB to UE, and for check for no packet losses - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -F -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -F -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -F -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 2 -F -c26 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 2 -F -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 -F -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 5 -F -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 5 -F -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 5 -F -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -F -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -F -c26 - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 -F -c26 - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 -F -c26 + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 "DL and UL loss rate below 10" segmentation fault|assertion|exiting|fatal 3 @@ -447,26 +547,20 @@ execution - Run OAI Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2,5,6) in PHY_ABSTRACTION mode, send ping from from eNB to UE, and check for no packet losses + Run OAI Rel10 FDD, 1 eNB + 1 UE (5 MHz/10MHz/20MHz), (TM 1,2) in PHY_ABSTRACTION mode, send ping from from eNB to UE, and check for no packet losses - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 1 -F -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 1 -F -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 1 -F -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 2 -F -c26 -a -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 2 -F -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 -F -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 5 -F -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 5 -F -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 5 -F -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 25 -x 6 -F -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 50 -x 6 -F -c26 -a - -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 6 -F -c26 -a - FDD.5MHz.TM1 FDD.10MHz.TM1 FDD.20MHz.TM1 FDD.5MHz.TM2 FDD.10MHz.TM2 FDD.20MHz.TM2 FDD.5MHz.TM5 FDD.10MHz.TM5 FDD.20MHz.TM5 FDD.5MHz.TM6 FDD.10MHz.TM6 FDD.20MHz.TM6 + -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -b1 -u1 -n100 -R 100 -x 2 -F -c26 -a + oaisim_noS1.FDD.5MHz.TM1 oaisim_noS1.FDD.10MHz.TM1 oaisim_noS1.FDD.20MHz.TM1 oaisim_noS1.FDD.5MHz.TM2 oaisim_noS1.FDD.10MHz.TM2 oaisim_noS1.FDD.20MHz.TM2 "DL and UL loss rate below 10" segmentation fault|assertion|exiting|fatal 3 @@ -476,14 +570,15 @@ execution Check if eMBMS procedure is not finished completely, make sure that the SIB13/MCCH have been correclty received by UEs - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -l7 -x 1 -Q3 -n 100 -b1 -u1 "Found MBSFNAreaConfiguration from eNB 0" segmentation fault|assertion|exiting|fatal + oaisim_noS1.eMBMS 3 @@ -491,14 +586,15 @@ execution Check if eMBMS multicast/broadcast data is received, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -l7 -x 1 -T mscbr -Q3 -n 100 -b1 -u1 "Received a multicast packet" segmentation fault|assertion|exiting|fatal + oaisim_noS1.eMBMS 3 @@ -506,14 +602,15 @@ execution Check for eMBMS multicast/broadcast data received in fdd mode, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -l7 -F -T mscbr -x 1 -Q3 -n 100 -b1 -u1 "Received a multicast packet" segmentation fault|assertion|exiting|fatal + oaisim_noS1.eMBMS 3 @@ -521,14 +618,15 @@ execution Check for eMBMS multicast/broadcast DF relaying working properly in fdd mode, make sure that the SIB13/MCCH/MTCH have been correclty received by UEs - oaisim_nos1 - + $OPENAIR_DIR/cmake_targets/build_oai + --oaisim --noS1 -c $OPENAIR_DIR/cmake_targets/tools/init_nas_nos1 - oaisim_nos1 + $OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 -O $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -A AWGN -l7 -c43 -F -T mbvbr -Q4 -j1 -n120 "MTCH for sync area 1" segmentation fault|assertion|exiting|fatal + oaisim_noS1.eMBMS 3 @@ -536,14 +634,15 @@ execution test_aes128_cmac_encrypt - test_aes128_cmac_encrypt - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators -c - test_aes128_cmac_encrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_cmac_encrypt --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_aes128_cmac_encrypt 3 @@ -551,14 +650,15 @@ execution test_aes128_ctr_decrypt - test_aes128_ctr_decrypt - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators -c - test_aes128_ctr_decrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_ctr_decrypt --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_aes128_ctr_decrypt 3 @@ -566,14 +666,15 @@ execution test_aes128_ctr_encrypt - test_aes128_ctr_encrypt - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators -c - test_aes128_ctr_encrypt + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_aes128_ctr_encrypt --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_aes128_ctr_encrypt 3 @@ -581,14 +682,15 @@ execution test_secu_kenb - test_secu_kenb - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators -c - test_secu_kenb + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_kenb --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_kenb 3 @@ -596,14 +698,15 @@ execution test_secu_knas - test_secu_knas - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators -c - test_secu_knas + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_knas 3 @@ -611,14 +714,15 @@ execution test_secu_knas_encrypt_eea1 - test_secu_knas_encrypt_eea1 - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators -c - test_secu_knas_encrypt_eea1 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eea1 --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_knas_encrypt_eea1 3 @@ -626,14 +730,15 @@ execution test_secu_knas_encrypt_eea2 - test_secu_knas_encrypt_eea2 - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators -c - test_secu_knas_encrypt_eea2 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eea2 --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_knas_encrypt_eea2 3 @@ -641,14 +746,15 @@ execution test_secu_knas_encrypt_eia1 - test_secu_knas_encrypt_eia1 - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators -c - test_secu_knas_encrypt_eia1 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eia1 --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_knas_encrypt_eia1 3 @@ -656,14 +762,15 @@ execution test_secu_knas_encrypt_eia2 - test_secu_knas_encrypt_eia2 - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators -c - test_secu_knas_encrypt_eia2 + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_secu_knas_encrypt_eia1 --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_secu_knas_encrypt_eia2 3 @@ -671,14 +778,15 @@ execution test_kdf - test_kdf - + $OPENAIR_DIR/cmake_targets/build_oai + --core_simulators -c - test_kdf + $OPENAIR_DIR/cmake_targets/lte-simulators/build/test_kdf --verbose "finished with 0 errors" segmentation fault|assertion|exiting|fatal + test_kdf 3 @@ -697,11 +805,11 @@ (TM2 Test 1b 20 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)), - dlsim - + $OPENAIR_DIR/cmake_targets/build_oai + --phy_simulators -c - dlsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/dlsim -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 -L -m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O70 -m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 -L @@ -713,10 +821,10 @@ -m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70 -L -m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O70 -L -m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O70 -L - test1 test5 test6 test6b test7 test7b test10 test10b test11 TM2_test1 TM2_test1b + dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.TM2_test1 dlsim.TM2_test1b "passed" segmentation fault|assertion|exiting|fatal - 1 + 3 @@ -728,21 +836,21 @@ (Test 5, 20 MHz, FDD (MCS 5), AWGN, 6dB (70%)), (Test 6, 20 MHz, FDD (MCS 16), AWGN, 12 dB (70%)) - ulsim - + $OPENAIR_DIR/cmake_targets/build_oai + --phy_simulators -c - ulsim + $OPENAIR_DIR/cmake_targets/lte-simulators/build/ulsim -B25 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 -L -B25 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 -L -B50 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 -L -B50 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 -L -B100 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70 -L -B100 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70 -L - test1 test2 test3 test4 test5 test6 + ulsim.test1 ulsim.test2 ulsim.test3 ulsim.test4 ulsim.test5 ulsim.test6 "passed" segmentation fault|assertion|exiting|fatal - 1 + 3 @@ -750,63 +858,3744 @@ calisson stevens - nano - oaisim* oaisim_nos1* lte-softmodem* lte-softmodem-nos1* mme_gw* run_epc* run_hss* iperf* ltebox* - 300 - + amerique + 390 /tmp - $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code 1 - $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code 208 - $OPENAIR_TARGETS/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code 95 - - - $OPENAIR_DIR/cmake_targets/build_oai - --eNB -w USRP - iperf + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem - + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + False /tmp - - - $OPENAIR_DIR/cmake_targets/build_oai - --eNB -w USRP - iperf + + + + - $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + False + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + USRPb210.ALU_EPC.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True /tmp - - - $OPENAIR_DIR/cmake_targets/build_oai - --eNB -w USRP - iperf + + + + - $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + True + USRPb210.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + True + USRPb210.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec + /tmp - - - $OPENAIR_DIR/cmake_targets/build_oai - --eNB -w USRP - iperf + + + + + + + - $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + USRPb210.ALU_EPC.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True + + /tmp + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + USRPb210.ALU_EPC.Bandrich.10MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + USRPb210.ALU_EPC.Bandrich.20MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue;$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo iperf -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + True + USRPb210.ALU_EPC.Bandrich.5MHz.FDD.Band_7.UL.2TX.2RX + 10 + + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True + + /tmp + > + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue;$OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=2.0Mbits/sec max=2.0Mbits/sec average=2.0Mbits/sec + + True + USRPb210.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.2TX.2RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=4.0Mbits/sec max=4.0Mbits/sec average=4.0Mbits/sec + + True + USRPb210.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.2TX.2RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + USRPb210.ALU_EPC.Bandrich.5MHz.FDD.Band_7.DL.2TX.2RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + USRPb210.ALU_EPC.Bandrich.10MHz.FDD.Band_7.DL.2TX.2RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 2 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + USRPb210.ALU_EPC.Bandrich.20MHz.FDD.Band_7.DL.2TX.2RX + 10 + + + + + lte-softmodem + + calisson + stevens + calisson + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf pdsch_referenceSignalPower -26 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mme_ip_address "ipv4=\"192.170.0.1\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0:3\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0:4\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.170.1.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; sudo -E ifconfig eth0:3 192.170.0.2 up ; sudo -E ifconfig eth0:4 192.170.1.2 up; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0:1\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.1/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0:2\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.170.1.1/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -i -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + USRPb210.OAI_EPC_local.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + calisson + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf pdsch_referenceSignalPower -29 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mme_ip_address "ipv4=\"192.170.0.1\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0:3\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0:4\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.170.1.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth0:3 192.170.0.2 up ; sudo -E ifconfig eth0:4 192.170.1.2 up; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0:1\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.1/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0:2\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.170.1.1/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -i -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + USRPb210.OAI_EPC_local.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + calisson + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf pdsch_referenceSignalPower -29 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mme_ip_address "ipv4=\"192.170.0.1\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0:3\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0:4\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.170.1.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth0:3 192.170.0.2 up ; sudo -E ifconfig eth0:4 192.170.1.2 up; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0:1\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.1/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0:2\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.170.1.1/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -i -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + USRPb210.OAI_EPC_local.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + calisson + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf pdsch_referenceSignalPower -26 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mme_ip_address "ipv4=\"192.170.0.1\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0:3\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0:4\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.170.1.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth0:3 192.170.0.2 up ; sudo -E ifconfig eth0:4 192.170.1.2 up; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=10.0Mbits/sec max=10.5Mbits/sec average=11.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0:1\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.1/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0:2\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.170.1.1/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -i -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + - 2 + False + USRPb210.OAI_EPC_local.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + calisson + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf pdsch_referenceSignalPower -29 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mme_ip_address "ipv4=\"192.170.0.1\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0:3\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0:4\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.170.1.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth0:3 192.170.0.2 up ; sudo -E ifconfig eth0:4 192.170.1.2 up; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0:1\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.1/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0:2\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.170.1.1/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -i -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + USRPb210.OAI_EPC_local.Bandrich.10MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + calisson + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf pdsch_referenceSignalPower -29 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf mme_ip_address "ipv4=\"192.170.0.1\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0:3\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0:4\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.170.1.2/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth0:3 192.170.0.2 up ; sudo -E ifconfig eth0:4 192.170.1.2 up; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=40.0Mbits/sec max=42.0Mbits/sec average=44.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0:1\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.170.0.1/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0:2\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.170.1.1/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -i -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + USRPb210.OAI_EPC_local.Bandrich.20MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf pdsch_referenceSignalPower -26 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches'; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + USRPb210.OAI_EPC_remote.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf pdsch_referenceSignalPower -29 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + USRPb210.OAI_EPC_remote.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf pdsch_referenceSignalPower -29 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth0:3 192.170.0.2 up ; sudo -E ifconfig eth0:4 192.170.1.2 up; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + USRPb210.OAI_EPC_remote.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf pdsch_referenceSignalPower -26 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=10.0Mbits/sec max=10.5Mbits/sec average=11.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + USRPb210.OAI_EPC_remote.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf pdsch_referenceSignalPower -29 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + USRPb210.OAI_EPC_remote.Bandrich.10MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf pdsch_referenceSignalPower -29 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf tx_gain 90 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf rx_gain 125 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -c + sleep 15; sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; ifconfig + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + USRPb210.OAI_EPC_remote.Bandrich.20MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + + lte-softmodem + + mozart + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf -W + + + + + True + + /tmp + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + True + USRPx310.ALU_EPC.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + lte-softmodem + + mozart + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf -W + + + + + True + + /tmp + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + True + USRPx310.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + mozart + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + True + USRPx310.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + mozart + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + USRPx310.ALU_EPC.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + mozart + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + USRPx310.ALU_EPC.Bandrich.10MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + mozart + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + USRPx310.ALU_EPC.Bandrich.20MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + + + + lte-softmodem + + mozart + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sleep 15; sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + USRPx310.OAI_EPC_remote.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + + + lte-softmodem + + mozart + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sleep 15; sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf -W + + + + + True + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + USRPx310.OAI_EPC_remote.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + mozart + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sleep 15; sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + USRPx310.OAI_EPC_remote.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + mozart + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sleep 15; sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=10.0Mbits/sec max=10.5Mbits/sec average=11.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + USRPx310.OAI_EPC_remote.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + mozart + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sleep 15; sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + USRPx310.OAI_EPC_remote.Bandrich.10MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + mozart + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_INTERFACE_NAME_FOR_S1U \"eth0\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.111/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w USRP -x -c + sleep 15; sudo -E -S /usr/local/bin/niusrprio_pcie start ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf -W + + + + + True + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + USRPx310.OAI_EPC_remote.Bandrich.20MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + True + + /tmp + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + True + EXMIMO.ALU_EPC.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + True + EXMIMO.ALU_EPC.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.local.enb.conf.in MCC \"208\" + BUILD/EPC/epc.local.enb.conf.in MNC \"92\" + BUILD/EPC/epc.local.enb.conf.in TAC \"1\" + BUILD/EPC/epc.local.enb.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth1\" + BUILD/EPC/epc.local.enb.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.82/24\" + SCRIPTS/build_epc + -c -l + SCRIPTS/build_hss + -c -l + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + True + EXMIMO.ALU_EPC.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + throughput_test min=4.0Mbits/sec max=5.0Mbits/sec average=4.0Mbits/sec + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + EXMIMO.ALU_EPC.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + throughput_test min=8.0Mbits/sec max=9.0Mbits/sec average=8.5Mbits/sec + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + EXMIMO.ALU_EPC.Bandrich.10MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + amerique + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.26\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + True + + /tmp + + + + + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; sleep 45; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + True + sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + throughput_test min=15.0Mbits/sec max=15.0Mbits/sec average=15.0Mbits/sec + + + /tmp + + + + + + + + + /opt/ltebox/tools/stop_ltebox ; /opt/ltebox/tools/start_ltebox ; sleep 3000 + + /opt/hss_sim0609/starthss >> /dev/null ; sleep 3000 + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + True + EXMIMO.ALU_EPC.Bandrich.20MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sleep 15; sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + False + + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + EXMIMO.OAI_EPC_remote.Bandrich.5MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sleep 15; sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + EXMIMO.OAI_EPC_remote.Bandrich.10MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sleep 15; sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -u -c 192.172.0.1 -b 10Mbits/s -B 192.172.0.2 + + + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ; sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 5 lo -s -i 1 -u -f m -B 192.172.0.1 + + throughput_test min=1.0Mbits/sec max=1.0Mbits/sec average=1.0Mbits/sec + + False + EXMIMO.OAI_EPC_remote.Bandrich.20MHz.FDD.Band_7.UL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 25 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sleep 15; sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + False> + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=10.0Mbits/sec max=10.5Mbits/sec average=11.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + EXMIMO.OAI_EPC_remote.Bandrich.5MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 50 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sleep 15; sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + EXMIMO.OAI_EPC_remote.Bandrich.10MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + lte-softmodem + + calisson + stevens + nano + 390 + /tmp + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf tracking_area_code \"1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_country_code \"208\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mobile_network_code \"92\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf N_RB_DL 100 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf mme_ip_address "ipv4=\"192.168.12.62\";ipv6=\"192:168:30::17\";active=\"yes\";preference=\"ipv4\";" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf downlink_frequency 2660000000L + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf uplink_frequency_offset -120000000 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf frame_type \"FDD\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_rx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf nb_antennas_tx 1 + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1_MME \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_INTERFACE_NAME_FOR_S1U \"eth1\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_IPV4_ADDRESS_FOR_S1U \"192.168.12.82/24\" + targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf ENB_PORT_FOR_S1U 2152 + $OPENAIR_DIR/cmake_targets/build_oai + --eNB -w EXMIMO -x -c + sleep 15; sudo -E -S $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 ; dmesg|tail + + $OPENAIR_DIR/cmake_targets/lte_build_oai/build/lte-softmodem + -O $OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf -W + + + + + False + + /tmp + + + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue ; $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --start-ue + + $OPENAIR_DIR/cmake_targets/autotests/tools/iperf_script 1 ppp0 -s -i 1 -u -f m -B 192.172.0.2 + + throughput_test min=20.0Mbits/sec max=21.0Mbits/sec average=22.0Mbits/sec + + False + $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --reset-ue; sudo -S -E $OPENAIR_DIR/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py --stop-ue + + /tmp + BUILD/EPC/epc.conf.in MCC \"208\" + BUILD/EPC/epc.conf.in MNC \"92\" + BUILD/EPC/epc.conf.in TAC \"1\" + BUILD/EPC/epc.conf.in MME_INTERFACE_NAME_FOR_S1_MME \"eth0\" + BUILD/EPC/epc.conf.in MME_IPV4_ADDRESS_FOR_S1_MME \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP \"eth0\"; + BUILD/EPC/epc.conf.in SGW_IPV4_ADDRESS_FOR_S1U_S12_S4_UP \"192.168.12.62/24\"; + BUILD/EPC/epc.conf.in PGW_INTERFACE_NAME_FOR_SGI \"eth0\" + BUILD/EPC/epc.conf.in PGW_IPV4_ADDRESS_FOR_SGI \"192.168.12.62/24\" + BUILD/EPC/epc.conf.in IPV4_LIST \"192.172.0.0/24\",\"192.172.1.0/24\" + $OPENAIRCN_DIR/SCRIPTS/build_epc + -c -l + $OPENAIRCN_DIR/SCRIPTS/build_hss + -c -l + + sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' ;sudo -E ifconfig eth1 add 192.172.0.1 + + $OPENAIRCN_DIR/SCRIPTS/run_epc + -r + sleep 10; $OPENAIRCN_DIR/SCRIPTS/run_hss + + $OPENAIRCN_DIR/TEST/autotests/tools/iperf_script 60 lo -u -c 192.172.0.2 -b 10Mbits/s -B 192.172.0.1 + + + + False + EXMIMO.OAI_EPC_remote.Bandrich.20MHz.FDD.Band_7.DL.1TX.1RX + 10 + + + + diff --git a/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py new file mode 100755 index 0000000000..99c4a04eaa --- /dev/null +++ b/cmake_targets/autotests/tools/configure_cots_bandrich_ue.py @@ -0,0 +1,218 @@ +#!/usr/bin/python + +import time +import serial +import os +from pyroute2 import IPRoute +import sys +import re +import threading +import signal +import traceback +import os +import commands + +# configure the serial connections (the parameters differs on the device you are connecting to) +#First we find an open port to work with +serial_port='' +ser=serial.Serial() +openair_dir = os.environ.get('OPENAIR_DIR') +if openair_dir == None: + print "Error getting OPENAIR_DIR environment variable" + sys.exit(1) + +def find_open_port(): + global serial_port, ser + max_ports=100 + if os.path.exists(serial_port) == True: + return serial_port + for port in range(2,100): + serial_port = '/dev/ttyUSB'+str(port) + if os.path.exists(serial_port) == True: + print 'New Serial Port : ' + serial_port + break + + ser = serial.Serial(port=serial_port) + return + + + +#serial_port = '/dev/ttyUSB2' +bandrich_ppd_config = os.environ.get('OPENAIR_DIR') + '/cmake_targets/autotests/tools/wdial.bandrich.conf' + +exit_flag=0 + +def signal_handler(signal, frame): + print('You pressed Ctrl+C!') + print('Resetting the UE to detached state') + timeout=10 + exit_flag=1 + send_command('AT+CGATT=0' , 'OK' , timeout) + sys.exit(0) + +signal.signal(signal.SIGINT, signal_handler) + + + +#ser.open() +#ser.isOpen() + +class pppThread (threading.Thread): + def __init__(self, threadID, name, counter): + threading.Thread.__init__(self) + self.threadID = threadID + self.name = name + self.counter = counter + def run(self): + print "Starting " + self.name + #Here we keep running pppd thread in indefinite loop as this script terminates sometimes + #while 1: + while 1: + time.sleep(5) #Hard coded, do not reduce this number! + print "Starting wvdial now..." + print 'exit_flag = ' + str(exit_flag) + send_command('AT+CGATT=1','OK', 300) + os.system('wvdial -C ' + bandrich_ppd_config + '' ) + if exit_flag == 1: + print "Exit flag set to true. Exiting pppThread now" + print "Terminating wvdial now..." + +def send_command (cmd, response, timeout): + count=0 + sleep_duration = 1 + print 'In function: send_command: cmd = <' + cmd + '> response: <' + response + '> \n' + global serial_port, ser + while count <= timeout: + try: + #Sometimes the port does not exist coz of reset in modem. + #In that case, we need to search for this port again + if os.path.exists(serial_port) == False: + find_open_port() + ser.write (cmd + '\r\n') + out = '' + time.sleep(sleep_duration) + count = count + sleep_duration + while ser.inWaiting() > 0: + out += ser.read(1) + print 'out = <' + out + '> response = <' + response + '> \n' + if re.search(response, out): + break + except Exception, e: + error = ' cmd : ' + cmd + ' response : ' + response + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + + +def start_ue () : + #print 'Enter your commands below.\r\nInsert "exit" to leave the application.' + timeout=60 #timeout in seconds + send_command('AT', 'OK' , timeout) + send_command('AT+CFUN=1' , 'OK' , timeout) + #send_command('AT+CGATT=0' , 'OK' , timeout) + send_command('AT+CGATT=1','OK', 300) + #os.system('wvdial -C ' + bandrich_ppd_config + ' &' ) + + thread_ppp = pppThread(1, "ppp_thread", 1) + thread_ppp.start() + + iface='ppp0' + + while 1: + time.sleep ( 2) + #Now we check if ppp0 interface is up and running + try: + if exit_flag == 1: + break + ip = IPRoute() + idx = ip.link_lookup(ifname=iface)[0] + os.system ('route add ' + gw + ' ppp0') + os.system ('ping ' + gw) + break + except Exception, e: + error = ' Interface ' + iface + 'does not exist...' + error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + error = error + traceback.format_exc() + print error + + thread_ppp.join() + +def stop_ue(): + 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 +def reset_ue(): + stringIdBandrich='BandRich, Inc. 4G LTE adapter' + status, out = commands.getstatusoutput('lsusb | grep -i \'' + stringIdBandrich + '\'') + if (out == '') : + print "Bandrich 4G LTE Adapter not found. Exiting now..." + sys.exit() + p=re.compile('Bus\s*(\w+)\s*Device\s*(\w+):\s*ID\s*(\w+):(\w+)') + res=p.findall(out) + BusId=res[0][0] + DeviceId=res[0][1] + VendorId=res[0][2] + ProductId=res[0][3] + usb_dir= find_usb_path(VendorId, ProductId) + print usb_dir + cmd = "sudo sh -c \"echo 0 > " + usb_dir + "/authorized\"" + os.system(cmd + " ; sleep 5" ) + cmd = "sudo sh -c \"echo 1 > " + usb_dir + "/authorized\"" + os.system(cmd + " ; sleep 5" ) + +def read_file(filename): + try: + file = open(filename, 'r') + return file.read() + except Exception, e: + #error = ' Filename ' + filename + #error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e) + #error = error + traceback.format_exc() + #print error + return '' + + +def find_usb_path(idVendor, idProduct): + for root, dirs, files in os.walk("/sys/bus/usb/devices", topdown=False): + for name in dirs: + tmpdir= os.path.join(root, name) + tmpidVendor = read_file(tmpdir+'/idVendor').replace("\n","") + tmpidProduct = read_file(tmpdir+'/idProduct').replace("\n","") + #print "tmpdir = " + tmpdir + " tmpidVendor = " + tmpidVendor + " tmpidProduct = " + tmpidProduct + if tmpidVendor == idVendor and tmpidProduct == idProduct: + return tmpdir + return '' + +i=1 +gw='192.172.0.1' +while i < len(sys.argv): + arg=sys.argv[i] + if arg == '--start-ue' : + find_open_port() + print 'Using Serial port : ' + serial_port + start_ue() + elif arg == '--stop-ue' : + find_open_port() + print 'Using Serial port : ' + serial_port + stop_ue() + elif arg == '--reset-ue' : + reset_ue() + elif arg == '-gw' : + gw = sys.argv[i+1] + i=i+1 + elif arg == '-h' : + print "--reset-ue: Reset the UE on USB Bus. Similar to unplugging and plugging the UE" + print "--stop-ue: Stop the UE. Send DETACH command" + print "--start-ue: Start the UE. Send ATTACH command" + print "-gw: Specify the default gw as sometimes the gateway/route arguments are not set properly via wvdial" + else : + print " Script called with wrong arguments, arg = " + arg + sys.exit() + i = i +1 + + diff --git a/cmake_targets/autotests/tools/find_usb_path.bash b/cmake_targets/autotests/tools/find_usb_path.bash new file mode 100755 index 0000000000..c8ec950292 --- /dev/null +++ b/cmake_targets/autotests/tools/find_usb_path.bash @@ -0,0 +1,20 @@ +#!/bin/bash + +#arg1 idVendor +#arg2 idProduct +argIdVendor=$1 +argIdProduct=$2 + +echo $1 +echo $2 + +for X in /sys/bus/usb/devices/*; do + #echo "$X" + idVendor=`cat "$X/idVendor" 2>/dev/null` + idProduct=`cat "$X/idProduct" 2>/dev/null` + if [ "$argIdVendor" == "$idVendor" ] && [ "$argIdProduct" == "$idProduct" ] + then + echo "$X" + fi +done + diff --git a/cmake_targets/autotests/tools/iperf_script b/cmake_targets/autotests/tools/iperf_script new file mode 100755 index 0000000000..ecd2f7a996 --- /dev/null +++ b/cmake_targets/autotests/tools/iperf_script @@ -0,0 +1,22 @@ +#!/bin/bash + +#arg1 timeout to wait before running the script +#arg2 interface +#arg3 iperf arguments + +args=($*) +timeout=${args[0]} +iface=${args[1]} +iperf_args=(${args[@]:2}) + +#array=${1:-1} +echo "args = ${args[@]}" +echo "timeout = $timeout" +echo "iface = $iface" +echo "iperf_args = ${iperf_args[@]}" + +sleep $timeout + +while true; do var=`ifconfig $iface` ;sleep 1; if [ "$var" != "" ]; then break; fi ; done ; sleep 5 + +iperf ${iperf_args[@]} diff --git a/cmake_targets/autotests/tools/search_repl.py b/cmake_targets/autotests/tools/search_repl.py new file mode 100755 index 0000000000..d0d6c4638f --- /dev/null +++ b/cmake_targets/autotests/tools/search_repl.py @@ -0,0 +1,37 @@ +#!/usr/bin/python +import sys +import re + +#Arg 1 name of file +#Arg 2 keyword +#arg 3 replacement text +#Note that these should be seperated by spaces +if len(sys.argv) != 4: + print "search_repl.py: Wrong number of arguments. This program needs 3 arguments" + sys.exit() +filename = sys.argv[1] +keyword = sys.argv[2] +replacement_text = sys.argv[3] + +file = open(filename, 'r') +string = file.read() +file.close() + + +if keyword == 'mme_ip_address': + replacement_text = keyword + ' = ( { ' + replacement_text + ' } ) ; ' + string = re.sub(r"mme_ip_address\s*=\s*\(([^\$]+?)\)\s*;", replacement_text, string, re.M) +elif keyword == 'IPV4_LIST': + replacement_text = keyword + ' = ( ' + replacement_text + ' ) ; ' + string = re.sub(r"IPV4_LIST\s*=\s*\(([^\$]+?)\)\s*;", replacement_text, string, re.M) +else : + replacement_text = keyword + ' = ' + replacement_text + ' ; ' + string = re.sub(r"%s\s*=\s*([^\$]+?)\s*;" % keyword , replacement_text, string, re.M) +#else : +# replacement_text = keyword + ' =\"' + replacement_text + '\" ; ' +# string = re.sub(r"%s\s*=\s*\"([^\$]+?)\"\s*;" % keyword , replacement_text, string, re.M) + +file = open(filename, 'w') +file.write(string) +file.close() + diff --git a/cmake_targets/autotests/tools/wdial.bandrich.conf b/cmake_targets/autotests/tools/wdial.bandrich.conf new file mode 100644 index 0000000000..e1b64568f9 --- /dev/null +++ b/cmake_targets/autotests/tools/wdial.bandrich.conf @@ -0,0 +1,36 @@ +[Dialer Defaults] +Modem = /dev/ttyUSB0 +ISDN = off +Modem Type = Analog Modem +Baud = 9600 +Init = ATZ +Init2 = AT+CPIN? +Init3 = AT+CGREG? +Init4 = AT+COPS? +Init5 = AT+CSQ +Init6 = +Init7 = AT+CGATT=1 +Init8 = +Init9 = +Phone = *99***1# +Phone1 = +Phone2 = +Phone3 = +Phone4 = +Dial Prefix = +Dial Attempts = 1 +Dial Command = ATM1L3DT +Ask Password = off +Password = '' +Username = ImaginLab +Auto Reconnect = off +Abort on Busy = off +Carrier Check = on +Check Def Route = on +Abort on No Dialtone = on +Stupid Mode = on +Idle Seconds = 0 +Auto DNS = on +;Minimize = off +;Dock = off +;Do NOT edit this file by hand! diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 3fb0f07499..cb28d33f1b 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -45,8 +45,10 @@ MSC_GEN="False" XFORMS="False" PRINT_STATS="False" VCD_TIMING="False" +LOWLATENCY_FLAG_USER="False" +FORCE_LOWLATENCY_FLAG_USER="" REL="Rel10" -HW="NO_VALUE" +HW="EXMIMO" TP="NO_VALUE" NOS1=0 EPC=0 @@ -55,6 +57,8 @@ CFLAGS_PROCESSOR_USER="" RUN_GROUP=0 TEST_CASE_GROUP="" +trap handle_ctrl_c INT + function print_help() { echo_info ' This program installs OpenAirInterface Software @@ -81,15 +85,13 @@ Options Makes the LTE softmodem --UE Makes the UE specific parts (ue_ip, usim, nvram) ---EPC - Makes the EPC (MME-SPGW, HSS) --RRH Makes the RRH -r | --3gpp-release default is Rel10, Rel8 limits the implementation to 3GPP Release 8 version -w | --hardware - EXMIMO, USRP, BLADERF + EXMIMO (Default), USRP, BLADERF, None Adds this RF board support (in external packages installation and in compilation) -t | --transport protocol ETHERNET , None @@ -117,11 +119,14 @@ Options Shows detailed compilation instructions in makefile --cflags_processor Manually Add CFLAGS of processor if they are not detected correctly by script. Only add these flags if you know your processor supports them. Example flags: -msse3 -msse4.1 -msse4.2 -mavx2 - +--disable-deadline + Disables deadline scheduler of Linux kernel (>=3.14.x). +--enable-deadline + Disables deadline scheduler of Linux kernel (>=3.14.x). Usage (first build): oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files - Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files - NI/ETTUS B201 + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files -w USRP + Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files + NI/ETTUS B201 + COTS UE : ./build_oai -I -g --eNB -x --install-system-files -w USRP Usage (Regular): oaisim : ./build_oai --oaisim -x Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x @@ -163,10 +168,6 @@ function main() { UE=1 echo_info "Will compile UE" shift;; - --EPC) - EPC=1 - echo_info "Will compile EPC" - shift;; --RRH) RRH=1 echo_info "Will compile RRH" @@ -237,6 +238,15 @@ function main() { CFLAGS_PROCESSOR_USER=$2 echo_info "Setting CPU FLAGS from USER to: $CFLAGS_PROCESSOR_USER" shift 2;; + --disable-deadline) + FORCE_LOWLATENCY_FLAG_USER="False" + echo_info "Disabling the usage of deadline scheduler" + shift 1;; + --enable-deadline) + FORCE_LOWLATENCY_FLAG_USER="True" + echo_info "Enabling the usage of deadline scheduler" + shift 1;; + -h | --help) print_help exit 1;; @@ -250,7 +260,7 @@ function main() { ############################################ # check validity of HW and TP parameters for RRH and eNB ############################################# - + # to be discussed if [ "$eNB" = "1" ] ; then if [ "$HW" = "NO_VALUE" -a "$TP" = "NO_VALUE" ] ; then echo_fatal "A hardware target or a transport protocol must be defined!!" @@ -275,15 +285,32 @@ function main() { fi fi - if [ "$oaisim" = "1" ] ; then - # there is no RF device and no transport protocol - HW="NO_VALUE" - TP="NO_VALUE" - - if [ "$XFORMS" == "True" ] ; then - PRINT_STATS="True" - fi + #Now we set flags to enable deadline scheduler settings + #By default: USRP: disable, + #By default: BLADERF: enable, + #By default: EXMIMO: enable + if [ "$FORCE_LOWLATENCY_FLAG_USER" = "" ]; then + if [ "$HW" = "EXMIMO" ] ; then + LOWLATENCY_FLAG_USER="True" + elif [ "$HW" = "ETHERNET" ] ; then + LOWLATENCY_FLAG_USER="True" + elif [ "$HW" = "OAI_USRP" ] ; then + LOWLATENCY_FLAG_USER="False" + elif [ "$HW" = "OAI_BLADERF" ] ; then + LOWLATENCY_FLAG_USER="False" + elif [ "$HW" = "None" ] ; then + LOWLATENCY_FLAG_USER="False" + else + echo_error "Unknown HW type $HW. Exiting now..." + exit + fi + else + LOWLATENCY_FLAG_USER=$FORCE_LOWLATENCY_FLAG_USER fi + + echo_info "Flags for Deadline scheduler: $LOWLATENCY_FLAG_USER" + + ############################################ # setting and printing OAI envs, we should check here ############################################ @@ -332,7 +359,17 @@ function main() { check_install_additional_tools fi - + if [ "$oaisim" = "1" ] ; then + #to be discussed + # there is no RF device and no transport protocol + HW="NO_VALUE" + TP="NO_VALUE" + + if [ "$XFORMS" == "True" ] ; then + PRINT_STATS="True" + fi + fi + echo_info "3. building the compilation directives ..." @@ -363,6 +400,7 @@ function main() { echo "set ( RF_BOARD \"${HW}\")" >> $cmake_file echo "set ( TRANSP_PRO \"${TP}\")" >> $cmake_file echo "set(PACKAGE_NAME \"${lte_exec}\")" >> $cmake_file + echo "set (LOWLATENCY \"${LOWLATENCY_FLAG_USER}\" )" >>$cmake_file echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file cd $DIR/$lte_build_dir/build cmake .. @@ -454,7 +492,7 @@ function main() { # EXMIMO drivers & firmware loader ############### - if [ "$HW" = "EXMIMO" -a "$EPC" = "0" ] ; then + if [ "$HW" = "EXMIMO" ] ; then echo_info "Compiling Express MIMO 2 board drivers" compilations \ @@ -569,6 +607,7 @@ function main() { # RRH compilation ##################### if [ "$RRH" = "1" ] ; then + rrh_exec=rrh_gw rrh_build_dir=rrh_gw @@ -589,6 +628,7 @@ function main() { compilations \ rrh_gw rrh_gw \ rrh_gw $dbin/rrh_gw + fi # build RF device and transport protocol libraries @@ -654,42 +694,29 @@ function main() { fi - # EPC compilation - ################## - if [ "$EPC" = "1" ] ; then - echo_info "Compiling EPC" - # Example HSS and EPC run on the same host - if [ "$CLEAN" = "1" ]; then - $OPENAIR_DIR/cmake_targets/tools/build_epc --clean --debug --transport-tcp-only --transport-prefer-tcp --s6a-server - $OPENAIR_DIR/cmake_targets/tools/build_hss --clean --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn` - else - $OPENAIR_DIR/cmake_targets/tools/build_epc --debug --transport-tcp-only --transport-prefer-tcp --s6a-server - $OPENAIR_DIR/cmake_targets/tools/build_hss --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn` - fi - - # if [ "$INSTALL_SYSTEM_FILES" = "1" ] ;then - # if [ -f $dbin/hss.conf ] ; then - # sed -e 's/ *= */=/' $dbin/hss.conf > $dconf/hss.conf.nospace - # source $dconf/hss.conf.nospace - # rm -f $dconf/hss.conf.nospace - # create_hss_database root linux "$MYSQL_user" "$MYSQL_pass" "$MYSQL_db" - # else - # echo_warning "not created HSS database: config not found" - # fi - # fi - fi # Auto-tests ##################### if [ "$OAI_TEST" = "1" ]; then echo_info "10. Running OAI pre commit tests (pre-ci) ..." + echo_error "These scripts ASSUME that user is in /etc/sudoers and can execute commands without PASSWORD prompt" + echo_error "Add the following lines in /etc/sudoers file to make your __user_name__ sudo without password prompt" + echo_error " __your_user_name__ ALL = (ALL:ALL) NOPASSWD: ALL" + echo_error " __your_user_name__ ALL = (ALL) NOPASSWD: ALL " + echo_info "The log file for the autotest script for debugging is located here: $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log " + echo_info "The results of autotests results is located here: $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml " + echo_info "You can hit CTRL-C any time to terminate the autotests..." + echo "Current User Name: $USER" + read -s -p "Enter Password: " mypassword + echo -e "\n" rm -fr $OPENAIR_DIR/cmake_targets/autotests/log mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log if [ "$RUN_GROUP" -eq "1" ]; then - $SUDO $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" + $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" -p '$mypassword' >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log & else - $SUDO $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash + $OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -p '$mypassword' >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log & fi + wait else echo_info "10. Bypassing the Tests ..." fi diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 46997c2773..496096e972 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -111,7 +111,12 @@ compilations() { cd $OPENAIR_DIR/cmake_targets/$1/build { rm -f $3 - make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE + if [ "$VERBOSE_COMPILE" == "1" ]; then + make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE + else + make -j`nproc` $2 + fi + } > $dlog/$2.$REL.txt 2>&1 echo_info "Log file for compilation has been written to: $dlog/$2.$REL.txt" if [ -s $3 ] ; then @@ -158,18 +163,23 @@ install_gnutls_from_source(){ check_install_usrp_uhd_driver(){ + #first we remove old installation + $SUDO apt-get remove uhd libuhd-dev libuhd003 uhd-host -y v=$(lsb_release -cs) - $SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" + $SUDO apt-add-repository --remove "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main" + #The new USRP repository + $SUDO add-apt-repository ppa:ettusresearch/uhd -y $SUDO apt-get update $SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev - $SUDO apt-get -y install -t `lsb_release -cs` uhd --force-yes + $SUDO apt-get -y install libuhd-dev libuhd003 uhd-host + $SUDO uhd_images_downloader } check_install_bladerf_driver(){ $SUDO add-apt-repository -y ppa:bladerf/bladerf $SUDO apt-get update $SUDO apt-get install -y bladerf libbladerf-dev - $SUDO apt-get install bladerf-firmware-fx3 - $SUDO apt-get install bladerf-fpga-hostedx40 + $SUDO apt-get install -y bladerf-firmware-fx3 + $SUDO apt-get install -y bladerf-fpga-hostedx40 bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img } @@ -183,7 +193,6 @@ check_install_additional_tools (){ libboost-all-dev \ libpthread-stubs0-dev \ openvpn \ - phpmyadmin \ pkg-config \ python-dev \ python-pexpect \ @@ -194,27 +203,27 @@ check_install_additional_tools (){ unzip \ valgrind \ vlan \ - ctags + ctags \ + ntpdate } check_install_oai_software() { - $SUDO apt-get update $SUDO apt-get install -y \ - autoconf \ + autoconf \ automake \ bison \ build-essential \ cmake \ cmake-curses-gui \ doxygen \ - doxygen-gui\ - texlive-latex-base\ + doxygen-gui \ + texlive-latex-base \ ethtool \ flex \ - gccxml \ - gdb \ - git \ + gccxml \ + gdb \ + git \ graphviz \ gtkwave \ guile-2.0-dev \ @@ -233,7 +242,7 @@ check_install_oai_software() { libgmp-dev \ libgtk-3-dev \ libidn2-0-dev \ - libidn11-dev \ + libidn11-dev \ libmysqlclient-dev \ liboctave-dev \ libpgm-5.1 \ @@ -255,7 +264,12 @@ check_install_oai_software() { openssl \ python \ subversion \ - xmlstarlet + xmlstarlet \ + python-pip \ + pydb \ + wvdial \ + python-numpy \ + sshpass $SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so if [ `lsb_release -rs` = '12.04' ] ; then install_nettle_from_source @@ -263,20 +277,28 @@ check_install_oai_software() { else $SUDO apt-get install -y libgnutls-dev nettle-dev nettle-bin fi + $SUDO pip install paramiko + $SUDO pip install pyroute2 install_asn1c_from_source + $SUDO rm -fr /opt/ssh + $SUDO git clone https://gist.github.com/2190472.git /opt/ssh } install_asn1c_from_source(){ + asn1_install_dir=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt + echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_dir " + ( + rm -rf /tmp/asn1c-r1516 mkdir -p /tmp/asn1c-r1516 cd /tmp/asn1c-r1516 - rm -rf /tmp/asn1c-r1516/* - svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516 > /tmp/log_compile_asn1c - patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0 >> /tmp/log_compile_asn1c - patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0 >> /tmp/log_compile_asn1c - patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0 >> /tmp/log_compile_asn1c + svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516 + 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 ./configure - make > /tmp/log_compile_asn1c 2>&1 + make -j`nproc` $SUDO make install + ) > $asn1_install_dir 2>&1 } ################################################# @@ -319,3 +341,42 @@ set_openair_env(){ export OPENAIR_TARGETS=$openair_path/targets } +################################ +# Function to killall the subprocesses when Ctrl-C Key is hit +############################### +function handle_ctrl_c(){ +CURPID=$$ +ppid=$$ +arraycounter=1 +echo_info "** Trapped CTRL-C. Killing all subprocesses now..." +while true +do + FORLOOP=FALSE + # Get all the child process id + for i in `ps -ef| awk '$3 == '$ppid' { print $2 }'` + do + if [ $i -ne $CURPID ] ; then + procid[$arraycounter]=$i + arraycounter=`expr $arraycounter + 1` + ppid=$i + FORLOOP=TRUE + fi + done + if [ "$FORLOOP" = "FALSE" ] ; then + arraycounter=`expr $arraycounter - 1` + ## We want to kill child process id first and then parent id's + while [ $arraycounter -ne 0 ] + do + echo "first we send ctrl-c to program" + $SUDO kill -INT "${procid[$arraycounter]}" + sleep 5 + echo "Now we force kill if that didn't work" + $SUDO kill -9 "${procid[$arraycounter]}" >/dev/null + arraycounter=`expr $arraycounter - 1` + done + exit + fi +done +} + + diff --git a/cmake_targets/tools/exmimo_stop_octave.m b/cmake_targets/tools/exmimo_stop_octave.m new file mode 100644 index 0000000000..82aa1f2845 --- /dev/null +++ b/cmake_targets/tools/exmimo_stop_octave.m @@ -0,0 +1,4 @@ +n=oarf_get_num_detected_cards; +for i=n-1:0 + oarf_stop(i); +end diff --git a/cmake_targets/tools/init_nas_nos1 b/cmake_targets/tools/init_nas_nos1 old mode 100644 new mode 100755 diff --git a/cmake_targets/tools/perf_oai.bash b/cmake_targets/tools/perf_oai.bash index 2254f64ea3..42d6be0716 100755 --- a/cmake_targets/tools/perf_oai.bash +++ b/cmake_targets/tools/perf_oai.bash @@ -68,7 +68,7 @@ declare MAX_RATE=1000 # set paths to the required binaries and check if the required binaries are available ENB_CONFIG=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf -OAISIM_EXEC=$OPENAIR_DIR/targets/bin/oaisim_nos1 +OAISIM_EXEC=$OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1 BYPASSE_ITTI=0 OTGPLOT="$OPENAIR2_DIR/UTIL/OTG/OTGplot" PS2PDF="ps2pdf" @@ -301,8 +301,8 @@ oaisim_otg_stats(){ sync if [ ! -f $OAISIM_EXEC ]; then - echo_info "3.1 compiling OAISIM ($OPENAIR_TARGETS/cmake_targets/build_oai --oaisim -c)" - ($OPENAIR_TARGETS/cmake_targets/build_oai --oaisim -c >> results/perf_log.txt 2>&1 ) + echo_info "3.1 compiling OAISIM ($OPENAIR_DIR/cmake_targets/build_oai --oaisim -c --noS1)" + ($OPENAIR_DIR/cmake_targets/build_oai --oaisim -c --noS1 >> results/perf_log.txt 2>&1 ) build_stats=$? if [ $build_stats != 0 ] ; then echo_error "$OAISIM_EXEC cannot be built, check results/perf_log.txt file" diff --git a/cmake_targets/tools/stop_exmimo2 b/cmake_targets/tools/stop_exmimo2 new file mode 100755 index 0000000000..63810e0bf8 --- /dev/null +++ b/cmake_targets/tools/stop_exmimo2 @@ -0,0 +1,17 @@ +#!/bin/bash + +echo "This script stops exmimo2 as it might be transmitting signal by itself if lte-softmodem terminates incorrectly" + +if [ "$OPENAIR_DIR" == "" ]; then + echo "Is the OPENAIR_DIR path set correctly? Exiting now" + exit +fi +sudo -E bash -c 'echo 3 > /proc/sys/vm/drop_caches' + +#load the module +sudo -E $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 + +#now we stop the card from transmitting anything +cd $OPENAIR_DIR/targets/bin +sudo -E octave $OPENAIR_DIR/cmake_targets/tools/exmimo_stop_octave.m + diff --git a/cmake_targets/tools/test_helper b/cmake_targets/tools/test_helper index 35752e9d20..49a9910573 100644 --- a/cmake_targets/tools/test_helper +++ b/cmake_targets/tools/test_helper @@ -24,15 +24,18 @@ xUnit_start() { # \param $1 classname # \param $2 testcase name # \param $3 testcase result -# \param $4 run index +# \param $4 run result +# \param $5 XML file local to test case for storing its own results xUnit_fail() { class=$1 test_case=$2 result=$3 - run_index=$4 + run_result=$4 + xmlfile_testcase=$5 currtime=$(date +%s.%N) time=$(echo "$currtime - $XUNIT_START" | bc -l) - xml="" + xml="" + echo -e $xml >> $xmlfile_testcase XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml" XUNIT_FAILED=$((XUNIT_FAILED+1)) } @@ -43,15 +46,18 @@ xUnit_fail() { # \param $1 classname # \param $2 testcase name # \param $3 testcase result -# \param $4 run index +# \param $4 run result +# \param $5 XML file local to test case for storing its own results xUnit_success() { class=$1 test_case=$2 result=$3 - run_index=$4 + run_result=$4 + xmlfile_testcase=$5 currtime=$(date +%s.%N) time=$(echo "$currtime - $XUNIT_START" | bc -l) - xml="" + xml="" + echo -e $xml >> $xmlfile_testcase XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml" XUNIT_SUCCESS=$((XUNIT_SUCCESS+1)) } diff --git a/oaienv b/oaienv index 383c75a4b1..f6b298debf 100644 --- a/oaienv +++ b/oaienv @@ -5,7 +5,8 @@ export OPENAIR1_DIR=$OPENAIR_HOME/openair1 export OPENAIR2_DIR=$OPENAIR_HOME/openair2 export OPENAIR3_DIR=$OPENAIR_HOME/openair3 export OPENAIR_TARGETS=$OPENAIR_HOME/targets -export OPENAIRITS_DIR=$OPENAIR_HOME/openairITS + +export PATH=$PATH:$OPENAIR_TARGETS/bin alias oai='cd $OPENAIR_HOME' alias oai0='cd $OPENAIR0_DIR' diff --git a/openair1/PHY/CODING/lte_rate_matching.c b/openair1/PHY/CODING/lte_rate_matching.c index 69697fc2e0..96663bd8a6 100644 --- a/openair1/PHY/CODING/lte_rate_matching.c +++ b/openair1/PHY/CODING/lte_rate_matching.c @@ -36,6 +36,7 @@ #include #endif #include "PHY/defs.h" +#include "assertions.h" //#define cmin(a,b) ((a)<(b) ? (a) : (b)) @@ -515,16 +516,14 @@ uint32_t lte_rate_matching_turbo(uint32_t RTC, // if (rvidx==3) // for (cnt=0;cnt=(3*RTC<<5),"Exiting, RM condition (Ncb %d, Nir/C %d, Nsoft %d, Kw %d\n",Ncb,Nir/C,Nsoft,3*(RTC<<5)); + Gp = G/Nl/Qm; GpmodC = Gp%C; #ifdef RM_DEBUG - printf("lte_rate_matching_turbo: Kw %d, rvidx %d, G %d, Qm %d, Nl%d, r %d\n",3*(RTC<<5),rvidx, G, Qm,Nl,r); + printf("lte_rate_matching_turbo: Ncb %d, Kw %d, Nir/C %d, rvidx %d, G %d, Qm %d, Nl%d, r %d\n",Ncb,3*(RTC<<5),Nir/C,rvidx, G, Qm,Nl,r); #endif if (r < (C-(GpmodC))) diff --git a/openair1/PHY/INIT/lte_param_init.c b/openair1/PHY/INIT/lte_param_init.c new file mode 100644 index 0000000000..2b827dcb0e --- /dev/null +++ b/openair1/PHY/INIT/lte_param_init.c @@ -0,0 +1,106 @@ +#include +#include +#include +#include +#include + +#include "SIMULATION/TOOLS/defs.h" +#include "PHY/types.h" +#include "PHY/defs.h" +#include "PHY/extern.h" + +extern PHY_VARS_eNB *PHY_vars_eNB; +extern PHY_VARS_UE *PHY_vars_UE; + +void lte_param_init(unsigned char N_tx, + unsigned char N_rx, + unsigned char transmission_mode, + uint8_t extended_prefix_flag, + frame_t frame_type, + uint16_t Nid_cell, + uint8_t tdd_config, + uint8_t N_RB_DL, + uint8_t threequarter_fs, + uint8_t osf, + uint32_t perfect_ce) +{ + + LTE_DL_FRAME_PARMS *lte_frame_parms; + int i; + + + printf("Start lte_param_init\n"); + PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB)); + PHY_vars_UE = malloc(sizeof(PHY_VARS_UE)); + //PHY_config = malloc(sizeof(PHY_CONFIG)); + mac_xface = malloc(sizeof(MAC_xface)); + + srand(0); + randominit(0); + set_taus_seed(0); + + lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms); + + lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz + lte_frame_parms->N_RB_UL = N_RB_DL; + lte_frame_parms->threequarter_fs = threequarter_fs; + lte_frame_parms->Ncp = extended_prefix_flag; + lte_frame_parms->Nid_cell = Nid_cell; + lte_frame_parms->nushift = Nid_cell%6; + lte_frame_parms->nb_antennas_tx = N_tx; + lte_frame_parms->nb_antennas_rx = N_rx; + lte_frame_parms->nb_antennas_tx_eNB = N_tx; + lte_frame_parms->phich_config_common.phich_resource = one; + lte_frame_parms->tdd_config = tdd_config; + lte_frame_parms->frame_type = frame_type; + // lte_frame_parms->Csrs = 2; + // lte_frame_parms->Bsrs = 0; + // lte_frame_parms->kTC = 0;44 + // lte_frame_parms->n_RRC = 0; + lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0; + + init_frame_parms(lte_frame_parms,osf); + + //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing)); + + // phy_init_top(lte_frame_parms); //allocation + + PHY_vars_UE->is_secondary_ue = 0; + PHY_vars_UE->lte_frame_parms = *lte_frame_parms; + PHY_vars_eNB->lte_frame_parms = *lte_frame_parms; + + phy_init_lte_top(lte_frame_parms); + dump_frame_parms(lte_frame_parms); + + PHY_vars_UE->PHY_measurements.n_adj_cells=0; + PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1; + PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2; + + for (i=0; i<3; i++) + lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i); + + phy_init_lte_ue(PHY_vars_UE,1,0); + phy_init_lte_eNB(PHY_vars_eNB,0,0,0); + + generate_pcfich_reg_mapping(&PHY_vars_UE->lte_frame_parms); + generate_phich_reg_mapping(&PHY_vars_UE->lte_frame_parms); + + // DL power control init + if (transmission_mode == 1) { + PHY_vars_eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB + ((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 0; + PHY_vars_UE->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB + ((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 0; + } else { // rho_a = rhob + PHY_vars_eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB + ((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 1; + PHY_vars_UE->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB + ((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 1; + } + + PHY_vars_UE->perfect_ce = perfect_ce; + + printf("Done lte_param_init\n"); + + +} diff --git a/openair1/PHY/INIT/lte_parms.c b/openair1/PHY/INIT/lte_parms.c index 55bd964aa7..fa0e731af9 100644 --- a/openair1/PHY/INIT/lte_parms.c +++ b/openair1/PHY/INIT/lte_parms.c @@ -68,33 +68,57 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) break; default: - msg("Illegal oversampling %d\n",osf); + printf("Illegal oversampling %d\n",osf); return(-1); } switch (frame_parms->N_RB_DL) { + case 100: if (osf>1) { - msg("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL); + printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL); return(-1); } - frame_parms->ofdm_symbol_size = 2048; - frame_parms->log2_symbol_size = 11; - frame_parms->samples_per_tti = 30720; - frame_parms->first_carrier_offset = 2048-600; + if (frame_parms->threequarter_fs) { + frame_parms->ofdm_symbol_size = 1536; + frame_parms->samples_per_tti = 23040; + frame_parms->first_carrier_offset = 1536-600; + frame_parms->nb_prefix_samples=(frame_parms->nb_prefix_samples*3)>>2; + frame_parms->nb_prefix_samples0=(frame_parms->nb_prefix_samples0*3)>>2; + } + else { + frame_parms->ofdm_symbol_size = 2048; + frame_parms->samples_per_tti = 30720; + frame_parms->first_carrier_offset = 2048-600; + } + frame_parms->N_RBGS = 4; + frame_parms->N_RBG = 25; + break; + + case 75: + if (osf>1) { + printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL); + return(-1); + } + + + frame_parms->ofdm_symbol_size = 1536; + frame_parms->samples_per_tti = 23040; + frame_parms->first_carrier_offset = 1536-450; + frame_parms->nb_prefix_samples=(frame_parms->nb_prefix_samples*3)>>2; + frame_parms->nb_prefix_samples0=(frame_parms->nb_prefix_samples0*3)>>2; frame_parms->N_RBGS = 4; frame_parms->N_RBG = 25; break; case 50: if (osf>1) { - msg("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL); + printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL); return(-1); } frame_parms->ofdm_symbol_size = 1024*osf; - frame_parms->log2_symbol_size = 10+log2_osf; frame_parms->samples_per_tti = 15360*osf; frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 300; frame_parms->nb_prefix_samples>>=(1-log2_osf); @@ -105,13 +129,13 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) case 25: if (osf>2) { - msg("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL); + printf("Illegal oversampling %d for N_RB_DL %d\n",osf,frame_parms->N_RB_DL); return(-1); } frame_parms->ofdm_symbol_size = 512*osf; - frame_parms->log2_symbol_size = 9+log2_osf; + frame_parms->samples_per_tti = 7680*osf; frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 150; frame_parms->nb_prefix_samples>>=(2-log2_osf); @@ -124,7 +148,6 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) case 15: frame_parms->ofdm_symbol_size = 256*osf; - frame_parms->log2_symbol_size = 8+log2_osf; frame_parms->samples_per_tti = 3840*osf; frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 90; frame_parms->nb_prefix_samples>>=(3-log2_osf); @@ -135,7 +158,6 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) case 6: frame_parms->ofdm_symbol_size = 128*osf; - frame_parms->log2_symbol_size = 7+log2_osf; frame_parms->samples_per_tti = 1920*osf; frame_parms->first_carrier_offset = frame_parms->ofdm_symbol_size - 36; frame_parms->nb_prefix_samples>>=(4-log2_osf); @@ -145,7 +167,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) break; default: - msg("init_frame_parms: Error: Number of resource blocks (N_RB_DL %d) undefined, frame_parms = %p \n",frame_parms->N_RB_DL, frame_parms); + printf("init_frame_parms: Error: Number of resource blocks (N_RB_DL %d) undefined, frame_parms = %p \n",frame_parms->N_RB_DL, frame_parms); return(-1); break; } @@ -159,23 +181,22 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf) void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms) { - msg("frame_parms->N_RB_DL=%d\n",frame_parms->N_RB_DL); - msg("frame_parms->N_RB_UL=%d\n",frame_parms->N_RB_UL); - msg("frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell); - msg("frame_parms->Ncp=%d\n",frame_parms->Ncp); - msg("frame_parms->Ncp_UL=%d\n",frame_parms->Ncp_UL); - msg("frame_parms->nushift=%d\n",frame_parms->nushift); - msg("frame_parms->frame_type=%d\n",frame_parms->frame_type); - msg("frame_parms->tdd_config=%d\n",frame_parms->tdd_config); - msg("frame_parms->tdd_config_S=%d\n",frame_parms->tdd_config_S); - msg("frame_parms->mode1_flag=%d\n",frame_parms->mode1_flag); - msg("frame_parms->nb_antennas_tx=%d\n",frame_parms->nb_antennas_tx); - msg("frame_parms->nb_antennas_rx=%d\n",frame_parms->nb_antennas_rx); - msg("frame_parms->ofdm_symbol_size=%d\n",frame_parms->ofdm_symbol_size); - msg("frame_parms->log2_symbol_size=%d\n",frame_parms->log2_symbol_size); - msg("frame_parms->nb_prefix_samples=%d\n",frame_parms->nb_prefix_samples); - msg("frame_parms->nb_prefix_samples0=%d\n",frame_parms->nb_prefix_samples0); - msg("frame_parms->first_carrier_offset=%d\n",frame_parms->first_carrier_offset); - msg("frame_parms->samples_per_tti=%d\n",frame_parms->samples_per_tti); - msg("frame_parms->symbols_per_tti=%d\n",frame_parms->symbols_per_tti); + printf("frame_parms->N_RB_DL=%d\n",frame_parms->N_RB_DL); + printf("frame_parms->N_RB_UL=%d\n",frame_parms->N_RB_UL); + printf("frame_parms->Nid_cell=%d\n",frame_parms->Nid_cell); + printf("frame_parms->Ncp=%d\n",frame_parms->Ncp); + printf("frame_parms->Ncp_UL=%d\n",frame_parms->Ncp_UL); + printf("frame_parms->nushift=%d\n",frame_parms->nushift); + printf("frame_parms->frame_type=%d\n",frame_parms->frame_type); + printf("frame_parms->tdd_config=%d\n",frame_parms->tdd_config); + printf("frame_parms->tdd_config_S=%d\n",frame_parms->tdd_config_S); + printf("frame_parms->mode1_flag=%d\n",frame_parms->mode1_flag); + printf("frame_parms->nb_antennas_tx=%d\n",frame_parms->nb_antennas_tx); + printf("frame_parms->nb_antennas_rx=%d\n",frame_parms->nb_antennas_rx); + printf("frame_parms->ofdm_symbol_size=%d\n",frame_parms->ofdm_symbol_size); + printf("frame_parms->nb_prefix_samples=%d\n",frame_parms->nb_prefix_samples); + printf("frame_parms->nb_prefix_samples0=%d\n",frame_parms->nb_prefix_samples0); + printf("frame_parms->first_carrier_offset=%d\n",frame_parms->first_carrier_offset); + printf("frame_parms->samples_per_tti=%d\n",frame_parms->samples_per_tti); + printf("frame_parms->symbols_per_tti=%d\n",frame_parms->symbols_per_tti); } diff --git a/openair1/PHY/LTE_ESTIMATION/defs.h b/openair1/PHY/LTE_ESTIMATION/defs.h index 10dc558c9b..903793c2b5 100644 --- a/openair1/PHY/LTE_ESTIMATION/defs.h +++ b/openair1/PHY/LTE_ESTIMATION/defs.h @@ -243,15 +243,16 @@ int lte_est_timing_advance(LTE_DL_FRAME_PARMS *frame_parms, int lte_est_timing_advance_pusch(PHY_VARS_eNB* phy_vars_eNB,module_id_t UE_id,uint8_t subframe); -void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNb, +void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB, + int subframe, module_id_t eNB_id, unsigned char clear); -void lte_eNB_I0_measurements_emul(PHY_VARS_eNB *phy_vars_eNb, +void lte_eNB_I0_measurements_emul(PHY_VARS_eNB *phy_vars_eNB, uint8_t sect_id); -void lte_eNB_srs_measurements(PHY_VARS_eNB *phy_vars_eNb, +void lte_eNB_srs_measurements(PHY_VARS_eNB *phy_vars_eNBy, module_id_t eNB_id, module_id_t UE_id, unsigned char init_averaging); diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c index 10c0cef42a..cfc2d929f1 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c @@ -703,24 +703,28 @@ int lte_dl_channel_estimation(PHY_VARS_UE *phy_vars_ue, void (*idft)(int16_t *,int16_t *, int); - switch (phy_vars_ue->lte_frame_parms.log2_symbol_size) { - case 7: + switch (phy_vars_ue->lte_frame_parms.ofdm_symbol_size) { + case 128: idft = idft128; break; - case 8: + case 256: idft = idft256; break; - case 9: + case 512: idft = idft512; break; - case 10: + case 1024: idft = idft1024; break; - case 11: + case 1536: + idft = idft1536; + break; + + case 2048: idft = idft2048; break; diff --git a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c index 9564b7842c..14e1c18571 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_eNB_measurements.c @@ -39,57 +39,36 @@ int32_t rx_power_avg_eNB[3][3]; -void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNb, +void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNB, + int subframe, unsigned char eNB_id, unsigned char clear) { - LTE_eNB_COMMON *eNB_common_vars = &phy_vars_eNb->lte_eNB_common_vars; - LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNb->lte_frame_parms; - PHY_MEASUREMENTS_eNB *phy_measurements = &phy_vars_eNb->PHY_measurements_eNB[eNB_id]; - + LTE_eNB_COMMON *eNB_common_vars = &phy_vars_eNB->lte_eNB_common_vars; + LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->lte_frame_parms; + PHY_MEASUREMENTS_eNB *phy_measurements = &phy_vars_eNB->PHY_measurements_eNB[eNB_id]; + int32_t *rb_mask = phy_vars_eNB->rb_mask_ul; uint32_t aarx,rx_power_correction; uint32_t rb; int32_t *ul_ch; int32_t n0_power_tot; - + int len; + int offset; + int Nsymb = (frame_parms->Ncp==NORMAL)?14:12; // noise measurements // for the moment we measure the noise on the 7th OFDM symbol (in S subframe) phy_measurements->n0_power_tot = 0; - /* printf("rxdataF0 %p, rxdataF1 %p\n", - (&eNB_common_vars->rxdataF[0][0][(frame_parms->ofdm_symbol_size + frame_parms->first_carrier_offset)<<1 ]), - (&eNB_common_vars->rxdataF[0][1][(frame_parms->ofdm_symbol_size + frame_parms->first_carrier_offset)<<1 ])); - */ - /* - for (i=0;i<512;i++) - printf("sector 0 antenna 0 : %d,%d\n",((short *)&eNB_common_vars->rxdataF[0][0][(19*frame_parms->ofdm_symbol_size)<<1])[i<<1], - ((short *)&eNB_common_vars->rxdataF[0][0][(19*frame_parms->ofdm_symbol_size)<<1])[1+(i<<1)]); - - for (i=0;i<12;i++) - // printf("sector 0 antenna 1 : %d,%d\n",((short *)&eNB_common_vars->rxdataF[0][1][(19*frame_parms->ofdm_symbol_size)<<1])[i<<1], - ((short *)&eNB_common_vars->rxdataF[0][1][(19*frame_parms->ofdm_symbol_size)<<1])[1+(i<<1)]); - */ - - if ( (frame_parms->ofdm_symbol_size == 128) || - (frame_parms->ofdm_symbol_size == 512) ) - rx_power_correction = 2; - else - rx_power_correction = 1; - for (aarx=0; aarxnb_antennas_rx; aarx++) { if (clear == 1) phy_measurements->n0_power[aarx]=0; -#ifdef USER_MODE + 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; -#else - 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; -#endif 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_tot += phy_measurements->n0_power[aarx]; @@ -97,52 +76,49 @@ void lte_eNB_I0_measurements(PHY_VARS_eNB *phy_vars_eNb, phy_measurements->n0_power_tot_dB = (unsigned short) dB_fixed(phy_measurements->n0_power_tot); - phy_measurements->n0_power_tot_dBm = phy_measurements->n0_power_tot_dB - phy_vars_eNb->rx_total_gain_eNB_dB; + phy_measurements->n0_power_tot_dBm = phy_measurements->n0_power_tot_dB - phy_vars_eNB->rx_total_gain_eNB_dB; // printf("n0_power %d\n",phy_measurements->n0_power_tot_dB); for (rb=0; rbN_RB_UL; rb++) { n0_power_tot=0; + if ((rb_mask[rb>>5]&(1<<(rb&31))) == 0) { // check that rb was not used in this subframe + for (aarx=0; aarxnb_antennas_rx; aarx++) { - for (aarx=0; aarxnb_antennas_rx; aarx++) { + // select the 7th symbol in an uplink subframe + 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); + ul_ch = &eNB_common_vars->rxdataF[eNB_id][aarx][offset]; + len = 12; + // just do first half of middle PRB for odd number of PRBs + if (((frame_parms->N_RB_UL&1) == 1) && + (rb==(frame_parms->N_RB_UL>>1))) { + len=6; + } + if (clear == 1) + phy_measurements->n0_subband_power[aarx][rb]=0; + + AssertFatal(ul_ch, "RX signal buffer (freq) problem"); - if (rb < 12) - // ul_ch = &eNB_common_vars->rxdataF[eNB_id][aarx][((19*(frame_parms->ofdm_symbol_size)) + frame_parms->first_carrier_offset + (rb*12))<<1]; - ul_ch = &eNB_common_vars->rxdataF[eNB_id][aarx][((7*frame_parms->ofdm_symbol_size) + frame_parms->first_carrier_offset + (rb*12))<<1]; - else if (rb>12) - ul_ch = &eNB_common_vars->rxdataF[eNB_id][aarx][((7*frame_parms->ofdm_symbol_size) + 6 + (rb-13)*12)<<1]; - else { - ul_ch = NULL; - } - - if (clear == 1) - phy_measurements->n0_subband_power[aarx][rb]=0; - - if (ul_ch) { - // for (i=0;i<24;i+=2) - // printf("re %d => %d\n",i/2,ul_ch[i]); - phy_measurements->n0_subband_power[aarx][rb] = ((k1*(signal_energy_nodc(ul_ch, - 24))*rx_power_correction) + (k2*phy_measurements->n0_subband_power[aarx][rb]))>>11; // 11 and 24 to compensate for repeated signal format - - phy_measurements->n0_subband_power_dB[aarx][rb] = dB_fixed(phy_measurements->n0_subband_power[aarx][rb]); - // printf("eNb %d, aarx %d, rb %d : energy %d (%d dB)\n",eNB_id,aarx,rb,signal_energy_nodc(ul_ch,24), phy_measurements->n0_subband_power_dB[aarx][rb]); - n0_power_tot += phy_measurements->n0_subband_power[aarx][rb]; - } else { - phy_measurements->n0_subband_power[aarx][rb] = 1; - phy_measurements->n0_subband_power_dB[aarx][rb] = -99; - n0_power_tot = 1; + phy_measurements->n0_subband_power[aarx][rb] = signal_energy_nodc(ul_ch,len); + //((k1*(signal_energy_nodc(ul_ch,len))) + // + (k2*phy_measurements->n0_subband_power[aarx][rb])); + + phy_measurements->n0_subband_power_dB[aarx][rb] = dB_fixed(phy_measurements->n0_subband_power[aarx][rb]); + // printf("subframe %d (%d): eNb %d, aarx %d, rb %d len %d: energy %d (%d dB)\n",subframe,offset,eNB_id,aarx,rb,len,signal_energy_nodc(ul_ch,len), + // phy_measurements->n0_subband_power_dB[aarx][rb]); + n0_power_tot += phy_measurements->n0_subband_power[aarx][rb]; } + + phy_measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_power_tot); + phy_measurements->n0_subband_power_tot_dBm[rb] = phy_measurements->n0_subband_power_tot_dB[rb] - phy_vars_eNB->rx_total_gain_eNB_dB - dB_fixed(frame_parms->N_RB_UL); + } - - phy_measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_power_tot); - phy_measurements->n0_subband_power_tot_dBm[rb] = phy_measurements->n0_subband_power_tot_dB[rb] - phy_vars_eNb->rx_total_gain_eNB_dB - 14; - } } - void lte_eNB_srs_measurements(PHY_VARS_eNB *phy_vars_eNb, unsigned char eNB_id, unsigned char UE_id, diff --git a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c index 9864a50ee2..6e2311789e 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_sync_time.c @@ -61,7 +61,6 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com { int i,k; - //unsigned short ds = frame_parms->log2_symbol_size - 7; sync_corr_ue0 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti); sync_corr_ue1 = (int *)malloc16(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*sizeof(int)*frame_parms->samples_per_tti); @@ -184,13 +183,6 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com LOG_E(PHY,"Unsupported N_RB_DL %d\n",frame_parms->N_RB_DL); break; } - /* - frame_parms->twiddle_ifft, /// complex twiddle factors - frame_parms->rev, /// bit reversed permutation vector - frame_parms->log2_symbol_size,/// log2(FFT_SIZE) - (frame_parms->log2_symbol_size/2), - 0); /// 0 - input is in complex Q1.15 format, 1 - input is in complex redundant Q1.15 format) - */ for (i=0; iofdm_symbol_size; i++) ((int32_t*)primary_synch0_time)[i] = sync_tmp[i]; diff --git a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c index 1d23bdca38..1eb663ec89 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c @@ -432,7 +432,7 @@ int32_t lte_ul_channel_estimation(PHY_VARS_eNB *phy_vars_eNB, in_fft_ptr_0 = &temp_in_fft_0[0]; in_fft_ptr_1 = &temp_in_fft_1[0]; - for(j=0; j<(1<<(frame_parms->log2_symbol_size))/12; j++) { + for(j=0; j<(frame_parms->ofdm_symbol_size)/12; j++) { if (j>19) { ((int16_t*)in_fft_ptr_0)[-40+(2*j)] = ((int16_t*)temp_out_ifft_0)[-80+(2*j)]*rx_power_correction; ((int16_t*)in_fft_ptr_0)[-40+(2*j)+1] = ((int16_t*)temp_out_ifft_0)[-80+(2*j+1)]*rx_power_correction; diff --git a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c index 6faf2e1ed0..8e64275b41 100644 --- a/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c +++ b/openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c @@ -72,7 +72,7 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB, else if ((p==1) && (l>0)) nu = 0; else { - msg("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l); + printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l); return(-1); } @@ -94,9 +94,9 @@ int lte_dl_cell_spec_SS(PHY_VARS_eNB *phy_vars_eNB, output[k] = qpsk[(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3]; //output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3; #ifdef DEBUG_DL_CELL_SPEC - msg("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", + printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", Ns,l,m,mprime_dword,mprime_qpsk_symb); - msg("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); + printf("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); #endif mprime++; @@ -151,7 +151,7 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, else if ((p==1) && (l>0)) nu = 0; else { - msg("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l); + printf("lte_dl_cell_spec: p %d, l %d -> ERROR\n",p,l); return(-1); } @@ -177,9 +177,9 @@ int lte_dl_cell_spec(PHY_VARS_eNB *phy_vars_eNB, output[k] = qpsk[(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3]; //output[k] = (lte_gold_table[eNB_offset][Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3; #ifdef DEBUG_DL_CELL_SPEC - msg("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", + printf("Ns %d, l %d, m %d,mprime_dword %d, mprime_qpsk_symbol %d\n", Ns,l,m,mprime_dword,mprime_qpsk_symb); - msg("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); + printf("index = %d (k %d)\n",(phy_vars_eNB->lte_gold_table[Ns][l][mprime_dword]>>(2*mprime_qpsk_symb))&3,k); #endif mprime++; diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c index 2fd89c8f64..70761ac5ae 100644 --- a/openair1/PHY/LTE_TRANSPORT/dci.c +++ b/openair1/PHY/LTE_TRANSPORT/dci.c @@ -2108,14 +2108,14 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, if (dci_alloc[i].L == (uint8_t)L) { #ifdef DEBUG_DCI_ENCODING - LOG_I(PHY,"Generating common DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x)\n",i,num_common_dci,dci_alloc[i].nCCE,dci_alloc[i].dci_length,1<=0) { + if (dci_alloc[i].firstCCE>=0) { e_ptr = generate_dci0(dci_alloc[i].dci_pdu, - e+(72*dci_alloc[i].nCCE), + e+(72*dci_alloc[i].firstCCE), dci_alloc[i].dci_length, dci_alloc[i].L, dci_alloc[i].rnti); @@ -2133,9 +2133,9 @@ uint8_t generate_dci_top(uint8_t num_ue_spec_dci, dump_dci(frame_parms,&dci_alloc[i]); #endif - if (dci_alloc[i].nCCE >= 0) { + if (dci_alloc[i].firstCCE >= 0) { e_ptr = generate_dci0(dci_alloc[i].dci_pdu, - e+(72*dci_alloc[i].nCCE), + e+(72*dci_alloc[i].firstCCE), dci_alloc[i].dci_length, dci_alloc[i].L, dci_alloc[i].rnti); @@ -2537,13 +2537,116 @@ uint16_t get_nquad(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uin return(Nreg - 4 - (3*Ngroup_PHICH)); } -uint16_t get_nCCE_max(uint8_t Mod_id,uint8_t CC_id) +uint16_t get_nCCE_mac(uint8_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int subframe) { // check for eNB only ! - return(get_nCCE(3,&PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms,1)); // 5, 15,21 + return(get_nCCE(num_pdcch_symbols, + &PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms, + get_mi(&PHY_vars_eNB_g[Mod_id][CC_id]->lte_frame_parms,subframe))); } + +int get_nCCE_offset_l1(int *CCE_table, + const unsigned char L, + const int nCCE, + const int common_dci, + const unsigned short rnti, + const unsigned char subframe) +{ + + int search_space_free,m,nb_candidates = 0,l,i; + unsigned int Yk; + /* + printf("CCE Allocation: "); + for (i=0;i=0 ; m--) { + + search_space_free = 1; + for (l=0; lharq_processes[harq_pid]; - dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT6[rballoc]; + if (vrb_type==LOCALIZED) { + dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT6[rballoc]; + } + else { + LOG_E(PHY,"Distributed RB allocation not done yet\n"); + mac_xface->macphy_exit("exiting"); + } dlsch0_harq->vrb_type = vrb_type; dlsch0_harq->nb_rb = RIV2nb_rb_LUT6[rballoc];//NPRB; RIV_max = RIV_max6; @@ -960,7 +965,14 @@ int generate_eNB_dlsch_params_from_dci(int frame, dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; - dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT25[rballoc]; + + if (vrb_type==LOCALIZED) { + dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT25[rballoc]; + } + else { + LOG_E(PHY,"Distributed RB allocation not done yet\n"); + mac_xface->macphy_exit("exiting"); + } dlsch0_harq->vrb_type = vrb_type; dlsch0_harq->nb_rb = RIV2nb_rb_LUT25[rballoc];//NPRB; RIV_max = RIV_max25; @@ -987,9 +999,16 @@ int generate_eNB_dlsch_params_from_dci(int frame, } dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; + if (vrb_type==LOCALIZED) { + dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT50_0[rballoc]; + dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT50_1[rballoc]; + } + else { + LOG_E(PHY,"Distributed RB allocation not done yet\n"); + mac_xface->macphy_exit("exiting"); + } + - dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT50_0[rballoc]; - dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT50_1[rballoc]; dlsch0_harq->vrb_type = vrb_type; dlsch0_harq->nb_rb = RIV2nb_rb_LUT50[rballoc];//NPRB; RIV_max = RIV_max50; @@ -1017,10 +1036,17 @@ int generate_eNB_dlsch_params_from_dci(int frame, dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; dlsch0_harq->vrb_type = vrb_type; - dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT100_0[rballoc]; - dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT100_1[rballoc]; - dlsch0_harq->rb_alloc[2] = localRIV2alloc_LUT100_2[rballoc]; - dlsch0_harq->rb_alloc[3] = localRIV2alloc_LUT100_3[rballoc]; + if (vrb_type==LOCALIZED) { + dlsch0_harq->rb_alloc[0] = localRIV2alloc_LUT100_0[rballoc]; + dlsch0_harq->rb_alloc[1] = localRIV2alloc_LUT100_1[rballoc]; + dlsch0_harq->rb_alloc[2] = localRIV2alloc_LUT100_2[rballoc]; + dlsch0_harq->rb_alloc[3] = localRIV2alloc_LUT100_3[rballoc]; + } + else { + LOG_E(PHY,"Distributed RB allocation not done yet\n"); + mac_xface->macphy_exit("exiting"); + } + dlsch0_harq->nb_rb = RIV2nb_rb_LUT100[rballoc];//NPRB; @@ -1102,8 +1128,12 @@ int generate_eNB_dlsch_params_from_dci(int frame, dlsch[0]->harq_ids[subframe] = harq_pid; - if (dlsch0_harq->round == 0) + if (dlsch0_harq->round == 0) { + /* necessary test? */ + if (dlsch0_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch[0], harq_pid); dlsch0_harq->status = ACTIVE; + } break; @@ -1237,6 +1267,9 @@ int generate_eNB_dlsch_params_from_dci(int frame, if (dlsch0_harq->round == 0) { + /* necessary test? */ + if (dlsch0_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch[0], harq_pid); dlsch0_harq->status = ACTIVE; // printf("Setting DLSCH process %d to ACTIVE\n",harq_pid); // MCS and TBS don't change across HARQ rounds @@ -1605,10 +1638,16 @@ int generate_eNB_dlsch_params_from_dci(int frame, // reset HARQ process if this is the first transmission if (dlsch0_harq->round == 0) { + /* necessary test? */ + if (dlsch0_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch0, harq_pid); dlsch0_harq->status = ACTIVE; } if (dlsch1_harq->round == 0) { + /* necessary test? */ + if (dlsch1_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch1, harq_pid); dlsch1_harq->status = ACTIVE; } @@ -1986,10 +2025,16 @@ int generate_eNB_dlsch_params_from_dci(int frame, // reset HARQ process if this is the first transmission if ((dlsch0->active==1) && (dlsch0_harq->round == 0)) { + /* necessary test? */ + if (dlsch0_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch0, harq_pid); dlsch0_harq->status = ACTIVE; } if ((dlsch1->active==1) && (dlsch1_harq->round == 0)) { + /* necessary test? */ + if (dlsch1_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch1, harq_pid); dlsch1_harq->status = ACTIVE; } @@ -2131,16 +2176,23 @@ int generate_eNB_dlsch_params_from_dci(int frame, // check if either TB is disabled (see 36-213 V8.6 p. 26) - if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) + if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) { + LOG_W(PHY, "what to do with respect to remove_harq_pid_from_freelist?\n"); dlsch0_harq->status = DISABLED; + } - if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) + if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) { + LOG_W(PHY, "what to do with respect to remove_harq_pid_from_freelist?\n"); dlsch1_harq->status = DISABLED; + } dlsch0_harq->Nl = 1; if (dlsch0_harq->round == 0) { + /* necessary test? */ + if (dlsch0_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch0, harq_pid); dlsch0_harq->status = ACTIVE; // printf("Setting DLSCH process %d to ACTIVE\n",harq_pid); } @@ -2305,11 +2357,17 @@ int generate_eNB_dlsch_params_from_dci(int frame, if ((dlsch0_harq->round == 0) && (dlsch0->active == 1) ) { + /* necessary test? */ + if (dlsch0_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch0, harq_pid); dlsch0_harq->status = ACTIVE; dlsch0_harq->mcs = mcs1; } if ((dlsch1_harq->round == 0) && (dlsch1->active == 1) ) { + /* necessary test? */ + if (dlsch1_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch1, harq_pid); dlsch1_harq->status = ACTIVE; dlsch1_harq->mcs = mcs2; } @@ -2473,6 +2531,9 @@ int generate_eNB_dlsch_params_from_dci(int frame, if (dlsch0_harq->round == 0) { + /* necessary test? */ + if (dlsch0_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch0, harq_pid); dlsch0_harq->status = ACTIVE; // printf("Setting DLSCH process %d to ACTIVE\n",harq_pid); } @@ -2602,6 +2663,9 @@ int generate_eNB_dlsch_params_from_dci(int frame, // dlsch0_harq->Ndi = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->ndi; if (dlsch0_harq->round == 0) { + /* necessary test? */ + if (dlsch0_harq->status == SCH_IDLE) + remove_harq_pid_from_freelist(dlsch0, harq_pid); dlsch0_harq->status = ACTIVE; // printf("Setting DLSCH process %d to ACTIVE\n",harq_pid); } @@ -2644,17 +2708,17 @@ int generate_eNB_dlsch_params_from_dci(int frame, #ifdef DEBUG_DCI if (dlsch0) { - msg("dlsch0 eNB: dlsch0 %p\n",dlsch0); - msg("dlsch0 eNB: rnti %x\n",dlsch0->rnti); - msg("dlsch0 eNB: NBRB %d\n",dlsch0_harq->nb_rb); - msg("dlsch0 eNB: rballoc %x\n",dlsch0_harq->rb_alloc[0]); - msg("dlsch0 eNB: harq_pid %d\n",harq_pid); - msg("dlsch0 eNB: round %d\n",dlsch0_harq->round); - msg("dlsch0 eNB: rvidx %d\n",dlsch0_harq->rvidx); - msg("dlsch0 eNB: TBS %d (NPRB %d)\n",dlsch0_harq->TBS,NPRB); - msg("dlsch0 eNB: mcs %d\n",dlsch0_harq->mcs); - msg("dlsch0 eNB: tpmi %d\n",tpmi); - msg("dlsch0 eNB: mimo_mode %d\n",dlsch0_harq->mimo_mode); + printf("dlsch0 eNB: dlsch0 %p\n",dlsch0); + printf("dlsch0 eNB: rnti %x\n",dlsch0->rnti); + printf("dlsch0 eNB: NBRB %d\n",dlsch0_harq->nb_rb); + printf("dlsch0 eNB: rballoc %x\n",dlsch0_harq->rb_alloc[0]); + printf("dlsch0 eNB: harq_pid %d\n",harq_pid); + printf("dlsch0 eNB: round %d\n",dlsch0_harq->round); + printf("dlsch0 eNB: rvidx %d\n",dlsch0_harq->rvidx); + printf("dlsch0 eNB: TBS %d (NPRB %d)\n",dlsch0_harq->TBS,NPRB); + printf("dlsch0 eNB: mcs %d\n",dlsch0_harq->mcs); + printf("dlsch0 eNB: tpmi %d\n",tpmi); + printf("dlsch0 eNB: mimo_mode %d\n",dlsch0_harq->mimo_mode); } #endif @@ -5511,15 +5575,15 @@ int generate_ue_dlsch_params_from_dci(int frame, #ifdef DEBUG_DCI if (dlsch[0]) { - msg("PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti); - msg("PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb); - msg("PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc[0]); - msg("PDSCH dlsch0 UE: harq_pid %d\n",harq_pid); - msg("PDSCH dlsch0 UE: DCINdi %d\n",dlsch0_harq->DCINdi); - msg("PDSCH dlsch0 UE: rvidx %d\n",dlsch0_harq->rvidx); - msg("PDSCH dlsch0 UE: TBS %d\n",dlsch0_harq->TBS); - msg("PDSCH dlsch0 UE: mcs %d\n",dlsch0_harq->mcs); - msg("PDSCH dlsch0 UE: pwr_off %d\n",dlsch0_harq->dl_power_off); + printf("PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti); + printf("PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb); + printf("PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc_even[0]); + printf("PDSCH dlsch0 UE: harq_pid %d\n",harq_pid); + printf("PDSCH dlsch0 UE: DCINdi %d\n",dlsch0_harq->DCINdi); + printf("PDSCH dlsch0 UE: rvidx %d\n",dlsch0_harq->rvidx); + printf("PDSCH dlsch0 UE: TBS %d\n",dlsch0_harq->TBS); + printf("PDSCH dlsch0 UE: mcs %d\n",dlsch0_harq->mcs); + printf("PDSCH dlsch0 UE: pwr_off %d\n",dlsch0_harq->dl_power_off); } #endif diff --git a/openair1/PHY/LTE_TRANSPORT/defs.h b/openair1/PHY/LTE_TRANSPORT/defs.h index a21693fea0..3cd608aa14 100644 --- a/openair1/PHY/LTE_TRANSPORT/defs.h +++ b/openair1/PHY/LTE_TRANSPORT/defs.h @@ -258,6 +258,13 @@ typedef struct { uint8_t error_threshold; /// Pointers to 8 HARQ processes for the DLSCH LTE_DL_eNB_HARQ_t *harq_processes[8]; + /// circular list of free harq PIDs (the oldest come first) + /// (10 is arbitrary value, must be > to max number of DL HARQ processes in LTE) + int harq_pid_freelist[10]; + /// the head position of the free list (if list is free then head=tail) + int head_freelist; + /// the tail position of the free list + int tail_freelist; /// Number of soft channel bits uint32_t G; /// Codebook index for this dlsch (0,1,2,3) @@ -266,6 +273,8 @@ typedef struct { uint8_t Mdlharq; /// MIMO transmission mode indicator for this sub-frame (for definition see 36-212 V8.6 2009-03, p.17) uint8_t Kmimo; + /// Nsoft parameter related to UE Category + uint32_t Nsoft; /// amplitude of PDSCH (compared to RS) in symbols without pilots int16_t sqrt_rho_a; /// amplitude of PDSCH (compared to RS) in symbols containing pilots @@ -576,13 +585,13 @@ typedef struct { /// UL RSSI per receive antenna int32_t UL_rssi[NB_ANTENNAS_RX]; /// PUCCH1a/b power (digital linear) - int32_t Po_PUCCH; + uint32_t Po_PUCCH; /// PUCCH1a/b power (dBm) int32_t Po_PUCCH_dBm; /// PUCCH1 power (digital linear), conditioned on below threshold - int32_t Po_PUCCH1_below; + uint32_t Po_PUCCH1_below; /// PUCCH1 power (digital linear), conditioned on above threshold - int32_t Po_PUCCH1_above; + uint32_t Po_PUCCH1_above; /// Indicator that Po_PUCCH has been updated by PHY int32_t Po_PUCCH_update; /// DL Wideband CQI index (2 TBs) @@ -693,6 +702,8 @@ typedef struct { uint8_t Mdlharq; /// MIMO transmission mode indicator for this sub-frame (for definition see 36-212 V8.6 2009-03, p.17) uint8_t Kmimo; + /// Nsoft parameter related to UE Category + uint32_t Nsoft; /// Maximum number of Turbo iterations uint8_t max_turbo_iterations; /// accumulated tx power adjustment for PUCCH @@ -737,7 +748,7 @@ typedef struct { /// Aggregation level uint8_t L; /// Position of first CCE of the dci - int nCCE; + int firstCCE; /// flag to indicate that this is a RA response boolean_t ra_flag; /// rnti diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c index 83066480b4..95af038ab0 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_coding.c @@ -117,7 +117,7 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch) } -LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigned char N_RB_DL, uint8_t abstraction_flag) +LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_t Nsoft,unsigned char N_RB_DL, uint8_t abstraction_flag) { LTE_eNB_DLSCH_t *dlsch; @@ -148,10 +148,14 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne bzero(dlsch,sizeof(LTE_eNB_DLSCH_t)); dlsch->Kmimo = Kmimo; dlsch->Mdlharq = Mdlharq; + dlsch->Nsoft = Nsoft; for (i=0; i<10; i++) dlsch->harq_ids[i] = Mdlharq; + dlsch->head_freelist = 0; + dlsch->tail_freelist = 0; + for (i=0; iharq_processes[i] = (LTE_DL_eNB_HARQ_t *)malloc16(sizeof(LTE_DL_eNB_HARQ_t)); LOG_T(PHY, "Required mem size %d (bw scaling %d), dlsch->harq_processes[%d] %p\n", @@ -192,6 +196,8 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne msg("Can't get harq_p %d\n",i); exit_flag=3; } + + put_harq_pid_in_freelist(dlsch, i); } if (exit_flag==0) { @@ -395,7 +401,7 @@ int dlsch_encoding(unsigned char *a, dlsch->harq_processes[harq_pid]->w[r], dlsch->harq_processes[harq_pid]->e+r_offset, dlsch->harq_processes[harq_pid]->C, // C - NSOFT, // Nsoft, + dlsch->Nsoft, // Nsoft, dlsch->Mdlharq, dlsch->Kmimo, dlsch->harq_processes[harq_pid]->rvidx, diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c index 6ab784aa18..efcd868338 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_decoding.c @@ -81,7 +81,7 @@ void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch) } } -LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t max_turbo_iterations,uint8_t N_RB_DL, uint8_t abstraction_flag) +LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t max_turbo_iterations,uint8_t N_RB_DL, uint8_t abstraction_flag) { LTE_UE_DLSCH_t *dlsch; @@ -113,6 +113,7 @@ LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t max_turbo_ite memset(dlsch,0,sizeof(LTE_UE_DLSCH_t)); dlsch->Kmimo = Kmimo; dlsch->Mdlharq = Mdlharq; + dlsch->Nsoft = Nsoft; dlsch->max_turbo_iterations = max_turbo_iterations; for (i=0; iC, - NSOFT, + dlsch->Nsoft, dlsch->Mdlharq, dlsch->Kmimo, harq_process->rvidx, diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c index a35f89b851..f9f6002970 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_llr_computation.c @@ -662,14 +662,16 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms, if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) { if (frame_parms->mode1_flag==0) - len = (nb_rb*8)- (2*pbch_pss_sss_adjust/3); + len = (nb_rb*8) - (2*pbch_pss_sss_adjust/3); else len = (nb_rb*10) - (5*pbch_pss_sss_adjust/6); } else { len = (nb_rb*12) - pbch_pss_sss_adjust; } + // printf("dlsch_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust); + for (i=0; iMod_id, phy_vars_ue->lte_ue_pdcch_vars[0]->crnti); - len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE\n", + len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE (NF %.1f dB)\n", 10*log10(phy_vars_ue->PHY_measurements.rsrp[0])-phy_vars_ue->rx_total_gain_dB, 10*log10(phy_vars_ue->PHY_measurements.rssi)-phy_vars_ue->rx_total_gain_dB, 10*log10(phy_vars_ue->PHY_measurements.rsrq[0]), - phy_vars_ue->PHY_measurements.n0_power_tot_dBm); + phy_vars_ue->PHY_measurements.n0_power_tot_dBm, + (double)phy_vars_ue->PHY_measurements.n0_power_tot_dBm+132.24); /* len += sprintf(&buffer[len], @@ -96,10 +97,10 @@ int dump_ue_stats(PHY_VARS_UE *phy_vars_ue, char* buffer, int length, runmode_t #ifdef EXMIMO len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB (LNA %d, vga %d dB)\n",phy_vars_ue->rx_total_gain_dB, openair0_cfg[0].rxg_mode[0],(int)openair0_cfg[0].rx_gain[0]); #endif -#ifdef OAI_USRP +#if defined(OAI_USRP) || defined(OAI_BLADERF) len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",phy_vars_ue->rx_total_gain_dB); #endif -#if defined(EXMIMO) || defined(OAI_USRP) +#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz (%d), estimated carrier frequency %f Hz\n",phy_vars_ue->lte_ue_common_vars.freq_offset,openair_daq_vars.freq_offset,openair0_cfg[0].rx_freq[0]-phy_vars_ue->lte_ue_common_vars.freq_offset); #endif len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[phy_vars_ue->UE_mode[0]],phy_vars_ue->UE_mode[0]); @@ -573,12 +574,18 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) phy_vars_eNB->PHY_measurements_eNB[eNB].n0_power_dB[0], phy_vars_eNB->PHY_measurements_eNB[eNB].n0_power_dB[1]); - len += sprintf(&buffer[len],"[eNB PROC] Subband I0: "); + len += sprintf(&buffer[len],"[eNB PROC] PRB I0 (%X.%X.%X.%X): ", + phy_vars_eNB->rb_mask_ul[0], + phy_vars_eNB->rb_mask_ul[1],phy_vars_eNB->rb_mask_ul[2],phy_vars_eNB->rb_mask_ul[3]); - for (i=0; i<25; i++) - len += sprintf(&buffer[len],"%2d ", - phy_vars_eNB->PHY_measurements_eNB[eNB].n0_subband_power_tot_dB[i]); + for (i=0; ilte_frame_parms.N_RB_UL; i++) { + len += sprintf(&buffer[len],"%4d ", + phy_vars_eNB->PHY_measurements_eNB[eNB].n0_subband_power_tot_dBm[i]); + if ((i>0) && ((i%25) == 0)) + len += sprintf(&buffer[len],"\n ", + phy_vars_eNB->PHY_measurements_eNB[eNB].n0_subband_power_tot_dBm[i]); + } len += sprintf(&buffer[len],"\n"); len += sprintf(&buffer[len],"\n[eNB PROC] PERFORMANCE PARAMETERS\n"); /* @@ -634,11 +641,11 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length) dB_fixed(phy_vars_eNB->lte_eNB_pusch_vars[UE_id]->ulsch_power[1]), phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[0], phy_vars_eNB->eNB_UE_stats[UE_id].UL_rssi[1], - dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH)-phy_vars_eNB->rx_total_gain_eNB_dB, + dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB, phy_vars_eNB->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH, - dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_below)-phy_vars_eNB->rx_total_gain_eNB_dB, - dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_above)-phy_vars_eNB->rx_total_gain_eNB_dB, - PUCCH1_THRES+phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm, //-dB_fixed(phy_vars_eNB->lte_frame_parms.N_RB_UL), + dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_below/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB, + dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_above/phy_vars_eNB->lte_frame_parms.N_RB_UL)-phy_vars_eNB->rx_total_gain_eNB_dB, + PUCCH1_THRES+phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm-dB_fixed(phy_vars_eNB->lte_frame_parms.N_RB_UL), phy_vars_eNB->eNB_UE_stats[UE_id].sector); for(i=0; i<8; i++) diff --git a/openair1/PHY/LTE_TRANSPORT/proto.h b/openair1/PHY/LTE_TRANSPORT/proto.h index e6aa7ef919..9afea790b3 100644 --- a/openair1/PHY/LTE_TRANSPORT/proto.h +++ b/openair1/PHY/LTE_TRANSPORT/proto.h @@ -56,15 +56,16 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch); void clean_eNb_dlsch(LTE_eNB_DLSCH_t *dlsch, uint8_t abstraction_flag); -/** \fn new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t abstraction_flag) +/** \fn new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t abstraction_flag) \brief This function allocates structures for a particular DLSCH at eNB @returns Pointer to DLSCH to be removed @param Kmimo Kmimo factor from 36-212/36-213 @param Mdlharq Maximum number of HARQ rounds (36-212/36-213) + @param Nsoft Soft-LLR buffer size from UE-Category @params N_RB_DL total number of resource blocks (determine the operating BW) @param abstraction_flag Flag to indicate abstracted interface */ -LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t N_RB_DL, uint8_t abstraction_flag); +LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t N_RB_DL, uint8_t abstraction_flag); /** \fn free_ue_dlsch(LTE_UE_DLSCH_t *dlsch) \brief This function frees memory allocated for a particular DLSCH at UE @@ -72,8 +73,16 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t N_RB_DL, ui */ void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch); -LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t max_turbo_iterations,uint8_t N_RB_DL, uint8_t abstraction_flag); - +/** \fn new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t abstraction_flag) + \brief This function allocates structures for a particular DLSCH at eNB + @returns Pointer to DLSCH to be removed + @param Kmimo Kmimo factor from 36-212/36-213 + @param Mdlharq Maximum number of HARQ rounds (36-212/36-213) + @param Nsoft Soft-LLR buffer size from UE-Category + @params N_RB_DL total number of resource blocks (determine the operating BW) + @param abstraction_flag Flag to indicate abstracted interface +*/ +LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_t max_turbo_iterations,uint8_t N_RB_DL, uint8_t abstraction_flag); void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch, uint8_t abstraction_flag); @@ -84,9 +93,6 @@ LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t Mdlharq,uint8_t max_turbo_iterations,uint LTE_UE_ULSCH_t *new_ue_ulsch(uint8_t Mdlharq, unsigned char N_RB_UL, uint8_t abstraction_flag); -uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t n); - - /** \fn dlsch_encoding(uint8_t *input_buffer, LTE_DL_FRAME_PARMS *frame_parms, uint8_t num_pdcch_symbols, @@ -1233,11 +1239,20 @@ uint32_t get_TBS_DL(uint8_t mcs, uint16_t nb_rb); uint32_t get_TBS_UL(uint8_t mcs, uint16_t nb_rb); /* \brief Return bit-map of resource allocation for a given DCI rballoc (RIV format) and vrb type + @param N_RB_DL number of PRB on DL + @param indicator for even/odd slot + @param vrb vrb index + @param Ngap Gap indicator +*/ +uint32_t get_prb(int N_RB_DL,int odd_slot,int vrb,int Ngap); + +/* \brief Return prb for a given vrb index @param vrb_type VRB type (0=localized,1=distributed) @param rb_alloc_dci rballoc field from DCI */ uint32_t get_rballoc(vrb_t vrb_type,uint16_t rb_alloc_dci); + /* \brief Return bit-map of resource allocation for a given DCI rballoc (RIV format) and vrb type @returns Transmission mode (1-7) */ @@ -1577,6 +1592,12 @@ uint16_t computeRIV(uint16_t N_RB_DL,uint16_t RBstart,uint16_t Lcrbs); uint32_t pmi_extend(LTE_DL_FRAME_PARMS *frame_parms,uint8_t wideband_pmi); +int get_nCCE_offset_l1(int *CCE_table, + const unsigned char L, + const int nCCE, + const int common_dci, + const unsigned short rnti, + const unsigned char subframe); uint16_t get_nCCE(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uint8_t mi); @@ -1584,7 +1605,7 @@ uint16_t get_nquad(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uin uint8_t get_mi(LTE_DL_FRAME_PARMS *frame,uint8_t subframe); -uint16_t get_nCCE_max(uint8_t Mod_id,uint8_t CC_id); +uint16_t get_nCCE_mac(uint8_t Mod_id,uint8_t CC_id,int num_pdcch_symbols,int subframe); uint8_t get_num_pdcch_symbols(uint8_t num_dci,DCI_ALLOC_t *dci_alloc,LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe); @@ -1637,22 +1658,22 @@ void generate_pucch_emul(PHY_VARS_UE *phy_vars_ue, uint8_t subframe); -int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, - PUCCH_FMT_t fmt, - uint8_t UE_id, - uint16_t n1_pucch, - uint16_t n2_pucch, - uint8_t shortened_format, - uint8_t *payload, - uint8_t subframe, - uint8_t pucch1_thres); +uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, + PUCCH_FMT_t fmt, + uint8_t UE_id, + uint16_t n1_pucch, + uint16_t n2_pucch, + uint8_t shortened_format, + uint8_t *payload, + uint8_t subframe, + uint8_t pucch1_thres); int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB, - uint8_t UE_index, - PUCCH_FMT_t fmt, - uint8_t n1_pucch_sel, - uint8_t *payload, - uint8_t subframe); + uint8_t UE_index, + PUCCH_FMT_t fmt, + uint8_t n1_pucch_sel, + uint8_t *payload, + uint8_t subframe); /*! @@ -1769,5 +1790,7 @@ double computeRhoB_UE(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated, uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms, uint8_t tdd_mapindex, uint16_t Nf); +uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t n); + /**@}*/ #endif diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index 2ed5694dd1..837c99b073 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -430,15 +430,15 @@ void generate_pucch_emul(PHY_VARS_UE *phy_vars_ue, } -int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, - PUCCH_FMT_t fmt, - uint8_t UE_id, - uint16_t n1_pucch, - uint16_t n2_pucch, - uint8_t shortened_format, - uint8_t *payload, - uint8_t subframe, - uint8_t pucch1_thres) +uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, + PUCCH_FMT_t fmt, + uint8_t UE_id, + uint16_t n1_pucch, + uint16_t n2_pucch, + uint8_t shortened_format, + uint8_t *payload, + uint8_t subframe, + uint8_t pucch1_thres) { @@ -446,11 +446,11 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, LTE_eNB_COMMON *eNB_common_vars = &phy_vars_eNB->lte_eNB_common_vars; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->lte_frame_parms; // PUCCH_CONFIG_DEDICATED *pucch_config_dedicated = &phy_vars_eNB->pucch_config_dedicated[UE_id]; - int8_t sigma2_dB = phy_vars_eNB->PHY_measurements_eNB[0].n0_power_dB[0]; - int32_t *Po_PUCCH = &(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH); + int8_t sigma2_dB = phy_vars_eNB->PHY_measurements_eNB[0].n0_subband_power_tot_dB[6]; + uint32_t *Po_PUCCH = &(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH); int32_t *Po_PUCCH_dBm = &(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH_dBm); - int32_t *Po_PUCCH1_below = &(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_below); - int32_t *Po_PUCCH1_above = &(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_above); + uint32_t *Po_PUCCH1_below = &(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_below); + uint32_t *Po_PUCCH1_above = &(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_above); int32_t *Po_PUCCH_update = &(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH_update); uint32_t u,v,n,aa; uint32_t z[12*14]; @@ -468,7 +468,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, uint32_t symbol_offset; int16_t stat_ref_re,stat_ref_im,*cfo,chest_re,chest_im; int32_t stat_re=0,stat_im=0; - int32_t stat,stat_max=0; + uint32_t stat,stat_max=0; uint8_t deltaPUCCH_Shift = frame_parms->pucch_config_common.deltaPUCCH_Shift; uint8_t NRB2 = frame_parms->pucch_config_common.nRB_CQI; @@ -478,6 +478,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, uint32_t u1 = (frame_parms->Nid_cell + frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.grouphop[1+(subframe<<1)]) % 30; uint32_t v0=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[subframe<<1]; uint32_t v1=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[1+(subframe<<1)]; + int chL; if (first_call == 1) { for (i=0;i<10;i++) { @@ -508,6 +509,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, } */ + if ((deltaPUCCH_Shift==0) || (deltaPUCCH_Shift>3)) { LOG_E(PHY,"[eNB] rx_pucch: Illegal deltaPUCCH_shift %d (should be 1,2,3)\n",deltaPUCCH_Shift); return(-1); @@ -737,30 +739,35 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase]; for (l=0; l<(nsymb>>1); l++) { - stat_re += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); - stat_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); + stat_re += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/nsymb; + stat_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/nsymb; off+=2; + + #ifdef DEBUG_PUCCH_RX - LOG_D(PHY,"[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,re, + LOG_D(PHY,"[eNB] PUCCH subframe %d (%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d) , stat %d\n",subframe,phase,l,re, rxcomp[aa][off],rxcomp[aa][1+off], cfo[l<<1],cfo[1+(l<<1)], - stat_re,stat_im); + stat_re,stat_im,stat); #endif } for (l2=0,l=(nsymb>>1); l<(nsymb-1); l++,l2++) { - stat_re += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15); - stat_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15); + stat_re += (((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15))/nsymb; + stat_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l2<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l2<<1)])>>15))/nsymb; off+=2; + #ifdef DEBUG_PUCCH_RX - LOG_D(PHY,"[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l2,re, + LOG_D(PHY,"[eNB] PUCCH subframe %d (%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d), stat %d\n",subframe,phase,l2,re, rxcomp[aa][off],rxcomp[aa][1+off], cfo[l2<<1],cfo[1+(l2<<1)], - stat_re,stat_im); + stat_re,stat_im,stat); #endif + } - stat += (stat_re*stat_re) + (stat_im*stat_im); + stat += ((stat_re*stat_re) + (stat_im*stat_im)); + } //re } // aa @@ -772,16 +779,18 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, } //phase - stat_max /= (nsymb*12); // normalize to energy per symbol and RE + stat_max *= nsymb; // normalize to energy per symbol + stat_max /= (frame_parms->N_RB_UL*12); // #ifdef DEBUG_PUCCH_RX LOG_D(PHY,"[eNB] PUCCH: stat %d, stat_max %d, phase_max %d\n", stat,stat_max,phase_max); #endif #ifdef DEBUG_PUCCH_RX - LOG_D(PHY,"[eNB] PUCCH fmt0: stat_max : %d, sigma2_dB %d (%d, %d), phase_max : %d\n",dB_fixed(stat_max),sigma2_dB,phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm,pucch1_thres,phase_max); + LOG_I(PHY,"[eNB] PUCCH fmt1: stat_max : %d, sigma2_dB %d (%d, %d), phase_max : %d\n",dB_fixed(stat_max),sigma2_dB,phy_vars_eNB->PHY_measurements_eNB[0].n0_subband_power_tot_dBm[6],pucch1_thres,phase_max); #endif phy_vars_eNB->pucch1_stats[UE_id][(subframe<<10)+phy_vars_eNB->pucch1_stats_cnt[UE_id][subframe]] = stat_max; + phy_vars_eNB->pucch1_stats_thres[UE_id][(subframe<<10)+phy_vars_eNB->pucch1_stats_cnt[UE_id][subframe]] = sigma2_dB+pucch1_thres; phy_vars_eNB->pucch1_stats_cnt[UE_id][subframe] = (phy_vars_eNB->pucch1_stats_cnt[UE_id][subframe]+1)&1023; /* @@ -798,13 +807,13 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres)) { *payload = 1; *Po_PUCCH1_above = ((*Po_PUCCH1_above<<9) + (stat_max<<9)+1024)>>10; - + //LOG_I(PHY,"[eNB] PUCCH fmt1: stat_max : %d, sigma2_dB %d (%d, %d), phase_max : %d\n",dB_fixed(stat_max),sigma2_dB,phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm,pucch1_thres,phase_max); } else { *payload = 0; *Po_PUCCH1_below = ((*Po_PUCCH1_below<<9) + (stat_max<<9)+1024)>>10; } - LOG_D(PHY,"[eNB] PUCCH fmt0: stat_max : %d, sigma2_dB %d (I0 %d dBm, thres %d), Po_PUCCH1_below/above : %d / %d\n",dB_fixed(stat_max),sigma2_dB,phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm,pucch1_thres,dB_fixed(*Po_PUCCH1_below),dB_fixed(*Po_PUCCH1_above)); + LOG_D(PHY,"[eNB] PUCCH fmt1: stat_max : %d, sigma2_dB %d (I0 %d dBm, thres %d), Po_PUCCH1_below/above : %d / %d\n",dB_fixed(stat_max),sigma2_dB,phy_vars_eNB->PHY_measurements_eNB[0].n0_subband_power_tot_dBm[6],pucch1_thres,dB_fixed(*Po_PUCCH1_below),dB_fixed(*Po_PUCCH1_above)); *Po_PUCCH_update = 1; } else if ((fmt == pucch_format1a)||(fmt == pucch_format1b)) { @@ -813,7 +822,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, LOG_I(PHY,"Doing PUCCH detection for format 1a/1b\n"); #endif - for (phase=0; phase<7; phase++) { + for (phase=3;phase<4;phase++){ //phase=0; phase<7; phase++) { stat=0; for (aa=0; aanb_antennas_rx; aa++) { @@ -844,6 +853,9 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, #endif } + + + for (l2=0,l=(nsymb>>1); l<(nsymb-1); l++,l2++) { if ((l2<2) || ((l2>(nsymb>>1) - 3)) ) { // data symbols stat_re += ((rxcomp[aa][off]*(int32_t)cfo[l2<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l2<<1)])>>15); @@ -863,34 +875,36 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, } - stat += (((stat_re*stat_re)) + ((stat_im*stat_im)) + - ((stat_ref_re*stat_ref_re)) + ((stat_ref_im*stat_ref_im))); #ifdef DEBUG_PUCCH_RX LOG_D(PHY,"aa%d re %d : phase %d : stat %d\n",aa,re,phase,stat); #endif + + stat += ((((stat_re*stat_re)) + ((stat_im*stat_im)) + + ((stat_ref_re*stat_ref_re)) + ((stat_ref_im*stat_ref_im)))/nsymb); + + } //re } // aa #ifdef DEBUG_PUCCH_RX - LOG_I(PHY,"phase %d : stat %d\n",phase,stat); + LOG_I(PHY,"Format 1A: phase %d : stat %d\n",phase,stat); #endif - if (stat>stat_max) { stat_max = stat; phase_max = phase; } } //phase - stat_max/=(nsymb*12); //normalize to energy per symbol and RE -#ifdef DEBUG_PUCCH_RX - LOG_I(PHY,"[eNB] PUCCH fmt1: stat_max : %d, phase_max : %d\n",stat_max,phase_max); -#endif + stat_max/=(12); //normalize to energy per symbol and RE + //#ifdef DEBUG_PUCCH_RX + LOG_D(PHY,"[eNB] PUCCH fmt1a/b: stat_max : %d, phase_max : %d\n",stat_max,phase_max); + //#endif stat_re=0; stat_im=0; LOG_D(PHY,"PUCCH1A : Po_PUCCH before %d dB (%d)\n",dB_fixed(*Po_PUCCH),*Po_PUCCH); - *Po_PUCCH = ((*Po_PUCCH<<9) + (stat_max<<9)+1024)>>10; - *Po_PUCCH_dBm = dB_fixed(*Po_PUCCH) - phy_vars_eNB->rx_total_gain_eNB_dB; + *Po_PUCCH = ((*Po_PUCCH>>1) + ((stat_max)>>1)); + *Po_PUCCH_dBm = dB_fixed(*Po_PUCCH/frame_parms->N_RB_UL) - phy_vars_eNB->rx_total_gain_eNB_dB; *Po_PUCCH_update = 1; LOG_D(PHY,"PUCCH1A : stat_max %d (%d,%d,%d) => Po_PUCCH %d\n", @@ -906,6 +920,8 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, *Po_PUCCH = ((*Po_PUCCH*1023) + stat_max)>>10; + chL = (nsymb>>1)-4; + for (aa=0; aanb_antennas_rx; aa++) { for (re=0; re<12; re++) { chest_re=0; @@ -915,8 +931,8 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, // channel estimate for first slot for (l=2; l<(nsymb>>1)-2; l++) { off=(re<<1) + (24*l); - chest_re += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); - chest_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); + chest_re += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/chL; + chest_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/chL; } #ifdef DEBUG_PUCCH_RX @@ -928,8 +944,8 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, off=(re<<1) + (24*l); tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); - stat_re += ((tmp_re*chest_re)>>15) + ((tmp_im*chest_im)>>15); - stat_im += ((tmp_re*chest_im)>>15) - ((tmp_im*chest_re)>>15); + stat_re += (((tmp_re*chest_re)>>15) + ((tmp_im*chest_im)>>15))/4; + stat_im += (((tmp_re*chest_im)>>15) - ((tmp_im*chest_re)>>15))/4; off+=2; #ifdef DEBUG_PUCCH_RX LOG_D(PHY,"[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,re, @@ -943,8 +959,8 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, off=(re<<1) + (24*l); tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); - stat_re += ((tmp_re*chest_re)>>15) + ((tmp_im*chest_im)>>15); - stat_im += ((tmp_re*chest_im)>>15) - ((tmp_im*chest_re)>>15); + stat_re += (((tmp_re*chest_re)>>15) + ((tmp_im*chest_im)>>15)/4); + stat_im += (((tmp_re*chest_im)>>15) - ((tmp_im*chest_re)>>15)/4); off+=2; #ifdef DEBUG_PUCCH_RX LOG_D(PHY,"[eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,re, @@ -960,8 +976,8 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, // channel estimate for second slot for (l=2; l<(nsymb>>1)-2; l++) { off=(re<<1) + (24*l) + (nsymb>>1)*24; - chest_re += ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); - chest_im += ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); + chest_re += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/chL; + chest_im += (((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15))/chL; } #ifdef DEBUG_PUCCH_RX @@ -973,8 +989,8 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, off=(re<<1) + (24*l) + (nsymb>>1)*24; tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); - stat_re += ((tmp_re*chest_re)>>15) + ((tmp_im*chest_im)>>15); - stat_im += ((tmp_re*chest_im)>>15) - ((tmp_im*chest_re)>>15); + stat_re += (((tmp_re*chest_re)>>15) + ((tmp_im*chest_im)>>15))/4; + stat_im += (((tmp_re*chest_im)>>15) - ((tmp_im*chest_re)>>15))/4; off+=2; #ifdef DEBUG_PUCCH_RX LOG_D(PHY,"[PHY][eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,re, @@ -988,8 +1004,8 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, off=(re<<1) + (24*l) + (nsymb>>1)*24; tmp_re = ((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15); tmp_im = ((rxcomp[aa][off]*(int32_t)cfo[1+(l<<1)])>>15) + ((rxcomp[aa][1+off]*(int32_t)cfo[(l<<1)])>>15); - stat_re += ((tmp_re*chest_re)>>9) + ((tmp_im*chest_im)>>9); - stat_im += ((tmp_re*chest_im)>>9) - ((tmp_im*chest_re)>>9); + stat_re += (((tmp_re*chest_re)>>15) + ((tmp_im*chest_im)>>15))/4; + stat_im += (((tmp_re*chest_im)>>15) - ((tmp_im*chest_re)>>15))/4; off+=2; #ifdef DEBUG_PUCCH_RX LOG_D(PHY,"[PHY][eNB] PUCCH subframe %d (%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,re, @@ -1007,20 +1023,27 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, } // aa #ifdef DEBUG_PUCCH_RX - LOG_D(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im, + LOG_I(PHY,"PUCCH 1a/b: subframe %d : stat %d,%d (pos %d)\n",subframe,stat_re,stat_im, (subframe<<10) + (phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe])); #endif - - ((int16_t*)&phy_vars_eNB->pucch1ab_stats[UE_id][(subframe<<10) + (phy_vars_eNB->pucch1_stats_cnt[UE_id][subframe])])[0] = stat_re; - ((int16_t*)&phy_vars_eNB->pucch1ab_stats[UE_id][(subframe<<10) + (phy_vars_eNB->pucch1_stats_cnt[UE_id][subframe])])[1] = stat_im; - phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe] = (phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023; + phy_vars_eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re); + phy_vars_eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im); + phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe] = (phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023; + + + *payload = (stat_re<0) ? 1 : 0; if (fmt==pucch_format1b) *(1+payload) = (stat_im<0) ? 1 : 0; } else { // insufficient energy on PUCCH so NAK *payload = 0; + ((int16_t*)&phy_vars_eNB->pucch1ab_stats[UE_id][(subframe<<10) + (phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re); + ((int16_t*)&phy_vars_eNB->pucch1ab_stats[UE_id][(subframe<<10) + (phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe])])[1] = (int16_t)(stat_im); + phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe] = (phy_vars_eNB->pucch1ab_stats_cnt[UE_id][subframe]+1)&1023; + + *payload = (stat_re<0) ? 1 : 0; if (fmt==pucch_format1b) *(1+payload) = 0; @@ -1054,7 +1077,7 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB, } if (UE_id==NB_UE_INST) { - LOG_E(PHY,"rx_pucch_emul: FATAL, didn't find UE with rnti %x\n",rnti); + LOG_W(PHY,"rx_pucch_emul: Didn't find UE with rnti %x\n",rnti); return(-1); } diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c index 606b2692d5..f2e4dea58a 100644 --- a/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/ulsch_demodulation.c @@ -1657,8 +1657,15 @@ void rx_ulsch(PHY_VARS_eNB *phy_vars_eNB, } } else { for (i=0; inb_antennas_rx; i++) { + /* eNB_pusch_vars->ulsch_power[i] = signal_energy_nodc(eNB_pusch_vars->drs_ch_estimates[eNB_id][i], ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12)*rx_power_correction; + + */ + + eNB_pusch_vars->ulsch_power[i] = signal_energy_nodc(eNB_pusch_vars->drs_ch_estimates[eNB_id][i], + ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12); + #ifdef LOCALIZATION eNB_pusch_vars->subcarrier_power = (int32_t *)malloc(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*sizeof(int32_t)); eNB_pusch_vars->active_subcarrier = subcarrier_energy(eNB_pusch_vars->drs_ch_estimates[eNB_id][i], diff --git a/openair1/PHY/MODULATION/defs.h b/openair1/PHY/MODULATION/defs.h index 8d45c15e00..6005d6d49a 100644 --- a/openair1/PHY/MODULATION/defs.h +++ b/openair1/PHY/MODULATION/defs.h @@ -34,12 +34,12 @@ */ /** -\fn void PHY_ofdm_mod(int *input,int *output,unsigned char log2fftsize,unsigned char nb_symbols,unsigned short nb_prefix_samples,Extension_t etype) +\fn void PHY_ofdm_mod(int *input,int *output,int fftsize,unsigned char nb_symbols,unsigned short nb_prefix_samples,Extension_t etype) This function performs OFDM modulation with cyclic extension or zero-padding. @param input The sequence input samples in the frequency-domain. This is a concatenation of the input symbols in SIMD redundant format @param output The time-domain output signal -@param log2fftsize Base-2 logarithm of the OFDM symbol size (\f$N_d\f$) +@param fftsize size of OFDM symbol size (\f$N_d\f$) @param nb_symbols The number of OFDM symbols in the block @param nb_prefix_samples The number of prefix/suffix/zero samples @param etype Type of extension (CYCLIC_PREFIX,CYCLIC_SUFFIX,ZEROS) @@ -47,7 +47,7 @@ This function performs OFDM modulation with cyclic extension or zero-padding. */ void PHY_ofdm_mod(int *input, int *output, - unsigned char log2fftsize, + int fftsize, unsigned char nb_symbols, unsigned short nb_prefix_samples, Extension_t etype diff --git a/openair1/PHY/MODULATION/ofdm_mod.c b/openair1/PHY/MODULATION/ofdm_mod.c index 61e5f9fb5b..3dd76c0fbb 100755 --- a/openair1/PHY/MODULATION/ofdm_mod.c +++ b/openair1/PHY/MODULATION/ofdm_mod.c @@ -61,9 +61,9 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA txdata+(i*(frame_parms->samples_per_tti>>1))); #endif - PHY_ofdm_mod(txdataF+(i*NUMBER_OF_OFDM_CARRIERS*frame_parms->symbols_per_tti>>1), // input + PHY_ofdm_mod(txdataF+(i*frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti>>1), // input txdata+(i*frame_parms->samples_per_tti>>1), // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, 1, // number of symbols frame_parms->nb_prefix_samples0, // number of prefix samples CYCLIC_PREFIX); @@ -71,9 +71,9 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA printf("slot i %d (txdata offset %d)\n",i,OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0+(i*frame_parms->samples_per_tti>>1)); #endif - PHY_ofdm_mod(txdataF+NUMBER_OF_OFDM_CARRIERS+(i*NUMBER_OF_OFDM_CARRIERS*(frame_parms->symbols_per_tti>>1)), // input + PHY_ofdm_mod(txdataF+frame_parms->ofdm_symbol_size+(i*frame_parms->ofdm_symbol_size*(frame_parms->symbols_per_tti>>1)), // input txdata+OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES0+(i*(frame_parms->samples_per_tti>>1)), // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, (short_offset==1) ? 1 :(frame_parms->symbols_per_tti>>1)-1,//6, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); @@ -84,7 +84,7 @@ void normal_prefix_mod(int32_t *txdataF,int32_t *txdata,uint8_t nsymb,LTE_DL_FRA void PHY_ofdm_mod(int *input, /// pointer to complex input int *output, /// pointer to complex output - unsigned char log2fftsize, /// log2(FFT_SIZE) + int fftsize, /// FFT_SIZE unsigned char nb_symbols, /// number of OFDM symbols unsigned short nb_prefix_samples, /// cyclic prefix length Extension_t etype /// type of extension @@ -100,24 +100,28 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input int *temp_ptr=(int*)0; void (*idft)(int16_t *,int16_t *, int); - switch (log2fftsize) { - case 7: + switch (fftsize) { + case 128: idft = idft128; break; - case 8: + case 256: idft = idft256; break; - case 9: + case 512: idft = idft512; break; - case 10: + case 1024: idft = idft1024; break; - case 11: + case 1536: + idft = idft1536; + break; + + case 2048: idft = idft2048; break; @@ -127,8 +131,8 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input } #ifdef DEBUG_OFDM_MOD - msg("[PHY] OFDM mod (size %d,prefix %d) Symbols %d, input %p, output %p\n", - 1< %p)\n",i,nb_symbols,input,&input[i< %p)\n",i,nb_symbols,i*fftsize+(i*nb_prefix_samples),input,&input[i*fftsize],&output[(i*fftsize) + ((i)*nb_prefix_samples)]); #endif - idft((int16_t *)&input[i<=-nb_prefix_samples; k--) { output_ptr[k] = output_ptr[--j]; @@ -175,19 +175,19 @@ void PHY_ofdm_mod(int *input, /// pointer to complex input case CYCLIC_SUFFIX: - output_ptr = &output[(i<>1,slot_offset); PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input &txdata[aa][slot_offset], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, 12, // number of symbols frame_parms->ofdm_symbol_size>>2, // number of prefix samples CYCLIC_PREFIX); @@ -252,7 +245,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t if (frame_parms->Ncp == EXTENDED) PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input &txdata[aa][slot_offset], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, 2, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); @@ -268,7 +261,7 @@ void do_OFDM_mod(mod_sym_t **txdataF, int32_t **txdata, uint32_t frame,uint16_t if (frame_parms->Ncp == EXTENDED) PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input &txdata[aa][slot_offset], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, 6, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); diff --git a/openair1/PHY/MODULATION/slot_fep.c b/openair1/PHY/MODULATION/slot_fep.c index feb2d885b2..0d2389c2ae 100644 --- a/openair1/PHY/MODULATION/slot_fep.c +++ b/openair1/PHY/MODULATION/slot_fep.c @@ -58,24 +58,28 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, void (*dft)(int16_t *,int16_t *, int); int tmp_dft_in[256]; // This is for misalignment issues for 6 and 15 PRBs - switch (frame_parms->log2_symbol_size) { - case 7: + switch (frame_parms->ofdm_symbol_size) { + case 128: dft = dft128; break; - case 8: + case 256: dft = dft256; break; - case 9: + case 512: dft = dft512; break; - case 10: + case 1024: dft = dft1024; break; - case 11: + case 1536: + dft = dft1536; + break; + + case 2048: dft = dft2048; break; @@ -96,12 +100,12 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, if (l<0 || l>=7-frame_parms->Ncp) { - msg("slot_fep: l must be between 0 and %d\n",7-frame_parms->Ncp); + printf("slot_fep: l must be between 0 and %d\n",7-frame_parms->Ncp); return(-1); } if (Ns<0 || Ns>=20) { - msg("slot_fep: Ns must be between 0 and 19\n"); + printf("slot_fep: Ns must be between 0 and 19\n"); return(-1); } @@ -116,7 +120,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, #ifdef DEBUG_FEP // if (phy_vars_ue->frame <100) - msg("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol, + printf("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol, nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset); #endif @@ -147,7 +151,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, #ifdef DEBUG_FEP // if (phy_vars_ue->frame <100) - msg("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol, + printf("slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d\n", phy_vars_ue->frame_rx,Ns, symbol, nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset); #endif @@ -182,7 +186,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, for (aa=0; aanb_antennas_tx_eNB; aa++) { #ifdef DEBUG_FEP - msg("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l); + printf("Channel estimation eNB %d, aatx %d, slot %d, symbol %d\n",eNB_id,aa,Ns,l); #endif start_meas(&phy_vars_ue->dlsch_channel_estimation_stats); lte_dl_channel_estimation(phy_vars_ue,eNB_id,0, @@ -205,7 +209,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, // do frequency offset estimation here! // use channel estimates from current symbol (=ch_t) and last symbol (ch_{t-1}) #ifdef DEBUG_FEP - msg("Frequency offset estimation\n"); + printf("Frequency offset estimation\n"); #endif if (l==(4-frame_parms->Ncp)) { @@ -222,7 +226,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, } #ifdef DEBUG_FEP - msg("slot_fep: done\n"); + printf("slot_fep: done\n"); #endif return(0); } diff --git a/openair1/PHY/MODULATION/slot_fep_mbsfn.c b/openair1/PHY/MODULATION/slot_fep_mbsfn.c index 94dc4b3ef1..d71a9d0477 100644 --- a/openair1/PHY/MODULATION/slot_fep_mbsfn.c +++ b/openair1/PHY/MODULATION/slot_fep_mbsfn.c @@ -54,25 +54,29 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue, unsigned int frame_length_samples = frame_parms->samples_per_tti * 10; void (*dft)(int16_t *,int16_t *, int); - switch (frame_parms->log2_symbol_size) { + switch (frame_parms->ofdm_symbol_size) { - case 7: + case 128: dft = dft128; break; - case 8: + case 256: dft = dft256; break; - case 9: + case 512: dft = dft512; break; - case 10: + case 1024: dft = dft1024; break; - case 11: + case 1536: + dft = dft1536; + break; + + case 2048: dft = dft2048; break; diff --git a/openair1/PHY/MODULATION/slot_fep_ul.c b/openair1/PHY/MODULATION/slot_fep_ul.c index 32bae2c036..57f4a6f7ab 100644 --- a/openair1/PHY/MODULATION/slot_fep_ul.c +++ b/openair1/PHY/MODULATION/slot_fep_ul.c @@ -50,24 +50,28 @@ int slot_fep_ul(LTE_DL_FRAME_PARMS *frame_parms, void (*dft)(int16_t *,int16_t *, int); - switch (frame_parms->log2_symbol_size) { - case 7: + switch (frame_parms->ofdm_symbol_size) { + case 128: dft = dft128; break; - case 8: + case 256: dft = dft256; break; - case 9: + case 512: dft = dft512; break; - case 10: + case 1024: dft = dft1024; break; - case 11: + case 1536: + dft = dft1536; + break; + + case 2048: dft = dft2048; break; diff --git a/openair1/PHY/TOOLS/cdot_prod.c b/openair1/PHY/TOOLS/cdot_prod.c index 2e52e63f7e..e6ff476303 100644 --- a/openair1/PHY/TOOLS/cdot_prod.c +++ b/openair1/PHY/TOOLS/cdot_prod.c @@ -115,11 +115,11 @@ int32_t dot_product(int16_t *x, // convert back to integer result = _mm_cvtsi64_si32(mmtmp7); - return(result); - _mm_empty(); _m_empty(); + return(result); + #elif defined(__arm__) int16x4_t *x_128=(int16x4_t*)x; int16x4_t *y_128=(int16x4_t*)y; diff --git a/openair1/PHY/TOOLS/lte_dfts.c b/openair1/PHY/TOOLS/lte_dfts.c index c031d5d384..b010f93aab 100644 --- a/openair1/PHY/TOOLS/lte_dfts.c +++ b/openair1/PHY/TOOLS/lte_dfts.c @@ -45,8 +45,10 @@ #define debug_msg #define ONE_OVER_SQRT2_Q15 23170 + #endif +#define ONE_OVER_SQRT3_Q15 18919 #include "PHY/sse_intrin.h" @@ -94,7 +96,7 @@ static inline void cmacc(__m128i a,__m128i b, __m128i *re32, __m128i *im32) cmac_tmp = _mm_sign_epi16(b,*(__m128i*)reflip); // cmac_tmp = _mm_shufflelo_epi16(b,_MM_SHUFFLE(2,3,0,1)); // cmac_tmp = _mm_shufflehi_epi16(cmac_tmp,_MM_SHUFFLE(2,3,0,1)); - cmac_tmp = _mm_shuffle_epi8(b,_mm_set_epi8(13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2)); + cmac_tmp = _mm_shuffle_epi8(cmac_tmp,_mm_set_epi8(13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2)); cmac_tmp_im32 = _mm_madd_epi16(cmac_tmp,a); *re32 = _mm_add_epi32(*re32,cmac_tmp_re32); @@ -3180,6 +3182,8 @@ void idft1536(int16_t *input, int16_t *output) int i,i2,j; uint32_t tmp[3][512 ]__attribute__((aligned(16))); uint32_t tmpo[3][512] __attribute__((aligned(16))); + simd_q15_t *y128p=(simd_q15_t*)output; + simd_q15_t ONE_OVER_SQRT3_Q15_128 = set1_int16(ONE_OVER_SQRT3_Q15); for (i=0,j=0; i<512; i++) { tmp[0][i] = ((uint32_t *)input)[j++]; @@ -3190,17 +3194,6 @@ void idft1536(int16_t *input, int16_t *output) idft512((int16_t*)(tmp[0]),(int16_t*)(tmpo[0]),1); idft512((int16_t*)(tmp[1]),(int16_t*)(tmpo[1]),1); idft512((int16_t*)(tmp[2]),(int16_t*)(tmpo[2]),1); - /* - for (i=1; i<512; i++) { - tmpo[0][i] = tmpo[0][i<<1]; - tmpo[1][i] = tmpo[1][i<<1]; - tmpo[2][i] = tmpo[2][i<<1]; - }*/ - - // write_output("in.m","in",input,6144,1,1); - // write_output("out0.m","o0",tmpo[0],2048,1,1); - // write_output("out1.m","o1",tmpo[1],2048,1,1); - // write_output("out2.m","o2",tmpo[2],2048,1,1); for (i=0,i2=0; i<1024; i+=8,i2+=4) { ibfly3((simd_q15_t*)(&tmpo[0][i2]),(simd_q15_t*)(&tmpo[1][i2]),((simd_q15_t*)&tmpo[2][i2]), @@ -3209,6 +3202,26 @@ void idft1536(int16_t *input, int16_t *output) } + for (i=0; i<24; i++) { + y128p[0] = mulhi_int16(y128p[0],ONE_OVER_SQRT3_Q15_128); + y128p[1] = mulhi_int16(y128p[1],ONE_OVER_SQRT3_Q15_128); + y128p[2] = mulhi_int16(y128p[2],ONE_OVER_SQRT3_Q15_128); + y128p[3] = mulhi_int16(y128p[3],ONE_OVER_SQRT3_Q15_128); + y128p[4] = mulhi_int16(y128p[4],ONE_OVER_SQRT3_Q15_128); + y128p[5] = mulhi_int16(y128p[5],ONE_OVER_SQRT3_Q15_128); + y128p[6] = mulhi_int16(y128p[6],ONE_OVER_SQRT3_Q15_128); + y128p[7] = mulhi_int16(y128p[7],ONE_OVER_SQRT3_Q15_128); + y128p[8] = mulhi_int16(y128p[8],ONE_OVER_SQRT3_Q15_128); + y128p[9] = mulhi_int16(y128p[9],ONE_OVER_SQRT3_Q15_128); + y128p[10] = mulhi_int16(y128p[10],ONE_OVER_SQRT3_Q15_128); + y128p[11] = mulhi_int16(y128p[11],ONE_OVER_SQRT3_Q15_128); + y128p[12] = mulhi_int16(y128p[12],ONE_OVER_SQRT3_Q15_128); + y128p[13] = mulhi_int16(y128p[13],ONE_OVER_SQRT3_Q15_128); + y128p[14] = mulhi_int16(y128p[14],ONE_OVER_SQRT3_Q15_128); + y128p[15] = mulhi_int16(y128p[15],ONE_OVER_SQRT3_Q15_128); + y128p+=16; + } + _mm_empty(); _m_empty(); diff --git a/openair1/PHY/TOOLS/lte_phy_scope.c b/openair1/PHY/TOOLS/lte_phy_scope.c index 49cafa19b5..e507024c86 100644 --- a/openair1/PHY/TOOLS/lte_phy_scope.c +++ b/openair1/PHY/TOOLS/lte_phy_scope.c @@ -119,7 +119,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void ) fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR); // I/Q PUCCH comp (format 1) - fdui->pucch_comp1 = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 480, 240, 100, "PUCCH I/Q of MF Output" ); + fdui->pucch_comp1 = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 480, 240, 100, "PUCCH1 Energy (SR)" ); fl_set_object_boxtype( fdui->pucch_comp1, FL_EMBOSSED_BOX ); fl_set_object_color( fdui->pucch_comp1, FL_BLACK, FL_YELLOW ); fl_set_object_lcolor( fdui->pucch_comp1, FL_WHITE ); // Label color @@ -160,7 +160,7 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form, int UE_id) { int eNB_id = 0; - int i,arx,atx,ind,k; + int i,i2,arx,atx,ind,k; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_enb->lte_frame_parms; int nsymb_ce = 12*frame_parms->N_RB_UL*frame_parms->symbols_per_tti; uint8_t nb_antennas_rx = frame_parms->nb_antennas_rx; @@ -171,15 +171,17 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form, int16_t *pusch_llr; int16_t *pusch_comp; int32_t *pucch1_comp; - int16_t *pucch1ab_comp; + int32_t *pucch1_thres; + int32_t *pucch1ab_comp; float Re,Im,ymax; float *llr, *bit; float I[nsymb_ce*2], Q[nsymb_ce*2]; - float I_pucch[10240],Q_pucch[10240],A_pucch[10240],B_pucch[10240]; + float I_pucch[10240],Q_pucch[10240],A_pucch[10240],B_pucch[10240],C_pucch[10240]; float rxsig_t_dB[nb_antennas_rx][FRAME_LENGTH_COMPLEX_SAMPLES]; float chest_t_abs[nb_antennas_rx][frame_parms->ofdm_symbol_size]; float *chest_f_abs; float time[FRAME_LENGTH_COMPLEX_SAMPLES]; + float time2[2048]; float freq[nsymb_ce*nb_antennas_rx*nb_antennas_tx]; int frame = phy_vars_enb->proc[0].frame_tx; uint32_t total_dlsch_bitrate = phy_vars_enb->total_dlsch_bitrate; @@ -206,7 +208,8 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form, pusch_llr = (int16_t*) phy_vars_enb->lte_eNB_pusch_vars[UE_id]->llr; pusch_comp = (int16_t*) phy_vars_enb->lte_eNB_pusch_vars[UE_id]->rxdataF_comp[eNB_id][0]; pucch1_comp = (int32_t*) phy_vars_enb->pucch1_stats[UE_id]; - pucch1ab_comp = (int16_t*) phy_vars_enb->pucch1ab_stats[UE_id]; + pucch1_thres = (int32_t*) phy_vars_enb->pucch1_stats_thres[UE_id]; + pucch1ab_comp = (int32_t*) phy_vars_enb->pucch1ab_stats[UE_id]; // Received signal in time domain of receive antenna 0 if (rxsig_t != NULL) { @@ -236,19 +239,21 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form, if (chest_t[0] !=NULL) { for (i=0; i<(frame_parms->ofdm_symbol_size); i++) { - chest_t_abs[0][i] = 10*log10((float) (chest_t[0][2*i]*chest_t[0][2*i]+chest_t[0][2*i+1]*chest_t[0][2*i+1])); + i2 = (i+(frame_parms->ofdm_symbol_size>>1))%frame_parms->ofdm_symbol_size; + time2[i] = (float)(i-(frame_parms->ofdm_symbol_size>>1)); + chest_t_abs[0][i] = 10*log10((float) (1+chest_t[0][2*i2]*chest_t[0][2*i2]+chest_t[0][2*i2+1]*chest_t[0][2*i2+1])); if (chest_t_abs[0][i] > ymax) ymax = chest_t_abs[0][i]; } - fl_set_xyplot_data(form->chest_t,time,chest_t_abs[0],(frame_parms->ofdm_symbol_size),"","",""); + fl_set_xyplot_data(form->chest_t,time2,chest_t_abs[0],(frame_parms->ofdm_symbol_size),"","",""); } for (arx=1; arxofdm_symbol_size>>3); i++) { - chest_t_abs[arx][i] = 10*log10((float) (chest_t[arx][2*i]*chest_t[arx][2*i]+chest_t[arx][2*i+1]*chest_t[arx][2*i+1])); + chest_t_abs[arx][i] = 10*log10((float) (1+chest_t[arx][2*i]*chest_t[arx][2*i]+chest_t[arx][2*i+1]*chest_t[arx][2*i+1])); if (chest_t_abs[arx][i] > ymax) ymax = chest_t_abs[arx][i]; @@ -337,16 +342,20 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form, // PUSCH I/Q of MF Output if (pucch1ab_comp!=NULL) { for (ind=0; ind<10240; ind++) { - I_pucch[ind] = pucch1ab_comp[2*ind]; - Q_pucch[ind] = pucch1ab_comp[2*ind+1]; + + I_pucch[ind] = (float)pucch1ab_comp[2*(ind)]; + Q_pucch[ind] = (float)pucch1ab_comp[2*(ind)+1]; A_pucch[ind] = 10*log10(pucch1_comp[ind]); B_pucch[ind] = ind; + C_pucch[ind] = (float)pucch1_thres[ind]; } fl_set_xyplot_data(form->pucch_comp,I_pucch,Q_pucch,10240,"","",""); fl_set_xyplot_data(form->pucch_comp1,B_pucch,A_pucch,1024,"","",""); - fl_set_xyplot_xbounds(form->pucch_comp,-200,200); - fl_set_xyplot_ybounds(form->pucch_comp,-100,100); - fl_set_xyplot_ybounds(form->pucch_comp1,10,40); + fl_add_xyplot_overlay(form->pucch_comp1,1,B_pucch,C_pucch,1024,FL_RED); + fl_set_xyplot_ybounds(form->pucch_comp,-5000,5000); + fl_set_xyplot_xbounds(form->pucch_comp,-5000,5000); + + fl_set_xyplot_ybounds(form->pucch_comp1,20,80); } diff --git a/openair1/PHY/TOOLS/signal_energy.c b/openair1/PHY/TOOLS/signal_energy.c index 323a1831dc..373fdc0d90 100755 --- a/openair1/PHY/TOOLS/signal_energy.c +++ b/openair1/PHY/TOOLS/signal_energy.c @@ -197,7 +197,7 @@ int32_t signal_energy(int32_t *input,uint32_t length) for (i=0; i>1; i++) { tmpE = vqaddq_s32(tmpE,vshrq_n_s32(vmull_s16(*in,*in),shift)); - tmpDC = vaddw_s16(tmpDC,vshr_n_s16(*in++,shift_DC)); + //tmpDC = vaddw_s16(tmpDC,vshr_n_s16(*in++,shift_DC)); } diff --git a/openair1/PHY/defs.h b/openair1/PHY/defs.h index 2fef7e347d..f308c0500a 100755 --- a/openair1/PHY/defs.h +++ b/openair1/PHY/defs.h @@ -320,6 +320,8 @@ typedef struct PHY_VARS_eNB_s { struct PhysicalConfigDedicated *physicalConfigDedicated[NUMBER_OF_UE_MAX]; + uint32_t rb_mask_ul[4]; + /// Information regarding TM5 MU_MIMO_mode mu_mimo_mode[NUMBER_OF_UE_MAX]; @@ -381,12 +383,13 @@ typedef struct PHY_VARS_eNB_s { #ifdef LOCALIZATION /// time state for localization time_stats_t localization_stats; -#endif +#endif int32_t pucch1_stats_cnt[NUMBER_OF_UE_MAX][10]; int32_t pucch1_stats[NUMBER_OF_UE_MAX][10*1024]; + int32_t pucch1_stats_thres[NUMBER_OF_UE_MAX][10*1024]; int32_t pucch1ab_stats_cnt[NUMBER_OF_UE_MAX][10]; - int32_t pucch1ab_stats[NUMBER_OF_UE_MAX][10*1024]; + int32_t pucch1ab_stats[NUMBER_OF_UE_MAX][2*10*1024]; #if ENABLE_RAL hash_table_t *ral_thresholds_timed; diff --git a/openair1/PHY/impl_defs_lte.h b/openair1/PHY/impl_defs_lte.h index a0ef6c005a..cd6ee4ecce 100644 --- a/openair1/PHY/impl_defs_lte.h +++ b/openair1/PHY/impl_defs_lte.h @@ -516,10 +516,10 @@ typedef struct { uint8_t dual_tx; /// flag to indicate SISO transmission uint8_t mode1_flag; + /// Indicator that 20 MHz channel uses 3/4 sampling frequency + uint8_t threequarter_fs; /// Size of FFT uint16_t ofdm_symbol_size; - /// log2(Size of FFT) - uint8_t log2_symbol_size; /// Number of prefix samples in all but first symbol of slot uint16_t nb_prefix_samples; /// Number of prefix samples in first symbol of slot diff --git a/openair1/PHY/impl_defs_top.h b/openair1/PHY/impl_defs_top.h index c84b7d3ece..69d8e16649 100755 --- a/openair1/PHY/impl_defs_top.h +++ b/openair1/PHY/impl_defs_top.h @@ -117,7 +117,6 @@ */ #define NUMBER_OF_OFDM_CARRIERS (frame_parms->ofdm_symbol_size) #define NUMBER_OF_SYMBOLS_PER_FRAME (frame_parms->symbols_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME) -#define LOG2_NUMBER_OF_OFDM_CARRIERS (frame_parms->log2_symbol_size) #define NUMBER_OF_USEFUL_CARRIERS (12*frame_parms->N_RB_DL) #define NUMBER_OF_ZERO_CARRIERS (NUMBER_OF_OFDM_CARRIERS-NUMBER_OF_USEFUL_CARRIERS) #define NUMBER_OF_USEFUL_CARRIERS_BYTES (NUMBER_OF_USEFUL_CARRIERS>>2) @@ -340,13 +339,12 @@ typedef struct { #define NUMBER_OF_SUBBANDS_MAX 13 #define NUMBER_OF_HARQ_PID_MAX 8 -#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) #define MAX_FRAME_NUMBER 0x400 +#if defined(CBMIMO1) || defined(EXMIMO) || defined(OAI_USRP) #define NUMBER_OF_eNB_MAX 1 #define NUMBER_OF_UE_MAX 4 #define NUMBER_OF_CONNECTED_eNB_MAX 3 #else -#define MAX_FRAME_NUMBER 0xFFFF #ifdef LARGE_SCALE #define NUMBER_OF_eNB_MAX 2 #define NUMBER_OF_UE_MAX 120 @@ -471,13 +469,13 @@ typedef struct { //! estimated avg noise power (dB) short n0_power_tot_dBm; //! estimated avg noise power per RB per RX ant (lin) - unsigned short n0_subband_power[NB_ANTENNAS_RX][25]; + unsigned short n0_subband_power[NB_ANTENNAS_RX][100]; //! estimated avg noise power per RB per RX ant (dB) - unsigned short n0_subband_power_dB[NB_ANTENNAS_RX][25]; + unsigned short n0_subband_power_dB[NB_ANTENNAS_RX][100]; //! estimated avg noise power per RB (dB) - short n0_subband_power_tot_dB[25]; + short n0_subband_power_tot_dB[100]; //! estimated avg noise power per RB (dBm) - short n0_subband_power_tot_dBm[25]; + short n0_subband_power_tot_dBm[100]; // eNB measurements (per user) //! estimated received spatial signal power (linear) unsigned int rx_spatial_power[NUMBER_OF_UE_MAX][2][2]; @@ -497,13 +495,13 @@ typedef struct { /// Wideband CQI (sum of all RX antennas, in dB) char wideband_cqi_tot[NUMBER_OF_UE_MAX]; /// Subband CQI per RX antenna and RB (= SINR) - int subband_cqi[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][25]; + int subband_cqi[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][100]; /// Total Subband CQI and RB (= SINR) - int subband_cqi_tot[NUMBER_OF_UE_MAX][25]; + int subband_cqi_tot[NUMBER_OF_UE_MAX][100]; /// Subband CQI in dB and RB (= SINR dB) - int subband_cqi_dB[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][25]; + int subband_cqi_dB[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][100]; /// Total Subband CQI and RB - int subband_cqi_tot_dB[NUMBER_OF_UE_MAX][25]; + int subband_cqi_tot_dB[NUMBER_OF_UE_MAX][100]; } PHY_MEASUREMENTS_eNB; diff --git a/openair1/SCHED/defs.h b/openair1/SCHED/defs.h index bebe476dcd..8692a31f12 100644 --- a/openair1/SCHED/defs.h +++ b/openair1/SCHED/defs.h @@ -399,8 +399,9 @@ uint32_t pdcch_alloc2ul_frame(LTE_DL_FRAME_PARMS *frame_parms,uint32_t frame, ui uint16_t get_Np(uint8_t N_RB_DL,uint8_t nCCE,uint8_t plus1); -int get_nCCE_offset(unsigned char L, int nCCE, int common_dci, unsigned short rnti, unsigned char subframe); +void put_harq_pid_in_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid); +void remove_harq_pid_from_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid); int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB); int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB); diff --git a/openair1/SCHED/phy_procedures_lte_common.c b/openair1/SCHED/phy_procedures_lte_common.c index ce659a60f8..c51bd82d8a 100755 --- a/openair1/SCHED/phy_procedures_lte_common.c +++ b/openair1/SCHED/phy_procedures_lte_common.c @@ -405,8 +405,8 @@ uint8_t get_ack(LTE_DL_FRAME_PARMS *frame_parms, if (harq_ack[0].send_harq_status == 1) o_ACK[1] = harq_ack[0].ack; - } else if (harq_ack[8].send_harq_status == 1) - o_ACK[0] = harq_ack[8].ack; + } else if (harq_ack[0].send_harq_status == 1) + o_ACK[0] = harq_ack[0].ack; status = harq_ack[9].send_harq_status + (harq_ack[0].send_harq_status<<1); //printf("Subframe 4, TDD config 3: harq_ack[9] = %d,harq_ack[0] = %d\n",harq_ack[9].ack,harq_ack[0].ack); diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c index 165f2fbac6..60cd0ec0f7 100755 --- a/openair1/SCHED/phy_procedures_lte_eNb.c +++ b/openair1/SCHED/phy_procedures_lte_eNb.c @@ -104,7 +104,6 @@ extern uint8_t smbv_frame_cnt; #ifdef DIAG_PHY extern int rx_sig_fifo; #endif -static unsigned char I0_clear = 1; uint8_t is_SR_subframe(PHY_VARS_eNB *phy_vars_eNB,uint8_t UE_id,uint8_t sched_subframe) { @@ -136,6 +135,30 @@ uint8_t is_SR_subframe(PHY_VARS_eNB *phy_vars_eNB,uint8_t UE_id,uint8_t sched_su return(0); } +void put_harq_pid_in_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid) +{ + DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->tail_freelist] = harq_pid; + DLSCH_ptr->tail_freelist = (DLSCH_ptr->tail_freelist + 1) % 10; +} + +void remove_harq_pid_from_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid) +{ + if (DLSCH_ptr->head_freelist == DLSCH_ptr->tail_freelist) { + LOG_E(PHY, "%s:%d: you cannot read this!\n", __FILE__, __LINE__); + abort(); + } + /* basic check, in case several threads deal with the free list at the same time + * in normal situations it should not happen, that's also why we don't use any + * locking mechanism to protect the free list + * to be refined in case things don't work properly + */ + if (harq_pid != DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist]) { + LOG_E(PHY, "%s:%d: critical error, get in touch with the authors\n", __FILE__, __LINE__); + abort(); + } + DLSCH_ptr->head_freelist = (DLSCH_ptr->head_freelist + 1) % 10; +} + int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB) { uint8_t i; @@ -178,6 +201,7 @@ int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB) int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB, uint8_t abstraction_flag) { uint8_t i; + int j; for (i=0; idlsch_eNB[i]==NULL) || (phy_vars_eNB->ulsch_eNB[i]==NULL)) { @@ -196,6 +220,13 @@ int32_t remove_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB, uint8_t abstraction //phy_vars_eNB->eNB_UE_stats[i].crnti = 0; memset(&phy_vars_eNB->eNB_UE_stats[i],0,sizeof(LTE_eNB_UE_stats)); // mac_exit_wrapper("Removing UE"); + + /* clear the harq pid freelist */ + phy_vars_eNB->dlsch_eNB[i][0]->head_freelist = 0; + phy_vars_eNB->dlsch_eNB[i][0]->tail_freelist = 0; + for (j = 0; j < 8; j++) + put_harq_pid_in_freelist(phy_vars_eNB->dlsch_eNB[i][0], j); + return(i); } } @@ -224,14 +255,12 @@ int8_t find_next_ue_index(PHY_VARS_eNB *phy_vars_eNB) int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16_t rnti, const int frame, const uint8_t subframe,uint8_t *harq_pid,uint8_t *round,const uint8_t ul_flag) { - LTE_eNB_DLSCH_t *DLSCH_ptr; LTE_eNB_ULSCH_t *ULSCH_ptr; uint8_t ulsch_subframe,ulsch_frame; uint8_t i; int8_t UE_id = find_ue(rnti,PHY_vars_eNB_g[Mod_id][CC_id]); int sf1=(10*frame)+subframe,sf2,sfdiff,sfdiff_max=7; - int first_proc_found=0; if (UE_id==-1) { LOG_D(PHY,"Cannot find UE with rnti %x (Mod_id %d, CC_id %d)\n",rnti, Mod_id, CC_id); @@ -247,18 +276,7 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16 for (i=0; iMdlharq; i++) { if (DLSCH_ptr->harq_processes[i]!=NULL) { - if (DLSCH_ptr->harq_processes[i]->status != ACTIVE) { - // store first inactive process - if (first_proc_found == 0) { - first_proc_found = 1; - *harq_pid = i; - *round = 0; - LOG_D(PHY,"process %d is first free process\n",i); - } - else { - LOG_D(PHY,"process %d is free\n",i); - } - } else { + if (DLSCH_ptr->harq_processes[i]->status == ACTIVE) { sf2 = (DLSCH_ptr->harq_processes[i]->frame*10) + DLSCH_ptr->harq_processes[i]->subframe; if (sf2<=sf1) sfdiff = sf1-sf2; @@ -270,7 +288,6 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16 sfdiff_max = sfdiff; *harq_pid = i; *round = DLSCH_ptr->harq_processes[i]->round; - first_proc_found = 1; } } } else { // a process is not defined @@ -278,6 +295,14 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16 return(-1); } } + + /* if no active harq pid, get the oldest in the freelist, if any */ + if (*harq_pid == 255 && DLSCH_ptr->head_freelist != DLSCH_ptr->tail_freelist) { + *harq_pid = DLSCH_ptr->harq_pid_freelist[DLSCH_ptr->head_freelist]; + *round = 0; + LOG_D(PHY,"process %d is first free process\n", *harq_pid); + } + LOG_D(PHY,"get_ue_active_harq_pid DL => Frame %d, Subframe %d : harq_pid %d\n", frame,subframe,*harq_pid); } else { // This is a UL request @@ -296,101 +321,6 @@ int get_ue_active_harq_pid(const uint8_t Mod_id,const uint8_t CC_id,const uint16 return(0); } - -int CCE_table[800]; - -void init_nCCE_table(void) -{ - memset(CCE_table,0,800*sizeof(int)); -} - - -int get_nCCE_offset(const unsigned char L, const int nCCE, const int common_dci, const unsigned short rnti, const unsigned char subframe) -{ - - int search_space_free,m,nb_candidates = 0,l,i; - unsigned int Yk; - - /* - printf("CCE Allocation: "); - for (i=0;i=0 ; m--) { - search_space_free = 1; - for (l=0; lPHY_measurements_eNB[0].n0_power_tot_dBm; @@ -476,6 +406,7 @@ void phy_procedures_eNB_S_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars if (abstraction_flag == 0) { lte_eNB_I0_measurements(phy_vars_eNB, + subframe, 0, phy_vars_eNB->first_run_I0_measurements); } @@ -489,8 +420,6 @@ void phy_procedures_eNB_S_RX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars #endif - if (I0_clear == 1) - I0_clear = 0; } @@ -1813,15 +1742,18 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e phy_vars_eNB->dlsch_eNB[i][0]->subframe_tx[subframe] = 0; } - init_nCCE_table(); + // init_nCCE_table(); - num_pdcch_symbols = get_num_pdcch_symbols(DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci, - DCI_pdu->dci_alloc, - &phy_vars_eNB->lte_frame_parms, - subframe); + num_pdcch_symbols = DCI_pdu->num_pdcch_symbols; + /*get_num_pdcch_symbols(DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci, + DCI_pdu->dci_alloc, + &phy_vars_eNB->lte_frame_parms, + subframe);*/ + /* DCI_pdu->nCCE = get_nCCE(num_pdcch_symbols, &phy_vars_eNB->lte_frame_parms, - get_mi(&phy_vars_eNB->lte_frame_parms,subframe)); + get_mi(&phy_vars_eNB->lte_frame_parms,subframe));*/ + LOG_D(PHY,"num_pdcch_symbols %"PRIu8", nCCE %u (dci commond %"PRIu8", dci uespec %"PRIu8"\n",num_pdcch_symbols,DCI_pdu->nCCE, DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci); @@ -1837,6 +1769,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e #endif for (i=0; iNum_common_dci + DCI_pdu->Num_ue_spec_dci ; i++) { + LOG_D(PHY,"[eNB] Subframe %d: DCI %d/%d : rnti %x, CCEind %d\n",subframe,i,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci,DCI_pdu->dci_alloc[i].rnti,DCI_pdu->dci_alloc[i].firstCCE); #ifdef DEBUG_PHY_PROC if (DCI_pdu->dci_alloc[i].rnti != SI_RNTI) { @@ -1864,28 +1797,21 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e phy_vars_eNB->eNB_UE_stats[0].DL_pmi_single); - int result = get_nCCE_offset(1<dci_alloc[i].L, DCI_pdu->nCCE, 1, SI_RNTI, subframe); - phy_vars_eNB->dlsch_eNB_SI->nCCE[subframe] = result; - - if (result == -1) { - // FIXME what happens to phy_vars_eNB->dlsch_eNB_SI->nCCE[subframe]? - LOG_E(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : No available CCE resources for common DCI (SI)!!!\n",phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe); - } else { - LOG_T(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resource for common DCI (SI) => %"PRIu8"/%u\n",phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe, - phy_vars_eNB->dlsch_eNB_SI->nCCE[subframe],DCI_pdu->nCCE); + phy_vars_eNB->dlsch_eNB_SI->nCCE[subframe] = DCI_pdu->dci_alloc[i].firstCCE; + LOG_T(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resource for common DCI (SI) => %"PRIu8"/%u\n",phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe, + phy_vars_eNB->dlsch_eNB_SI->nCCE[subframe],DCI_pdu->nCCE); + #if defined(SMBV) && !defined(EXMIMO) - // configure SI DCI - if (smbv_is_config_frame(phy_vars_eNB->proc[sched_subframe].frame_tx) && (smbv_frame_cnt < 4)) { - msg("[SMBV] Frame %3d, SI in SF %d DCI %"PRIu32"\n",phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,i); - smbv_configure_common_dci(smbv_fname,(smbv_frame_cnt*10) + (subframe), "SI", &DCI_pdu->dci_alloc[i], i); - } - -#endif + // configure SI DCI + if (smbv_is_config_frame(phy_vars_eNB->proc[sched_subframe].frame_tx) && (smbv_frame_cnt < 4)) { + msg("[SMBV] Frame %3d, SI in SF %d DCI %"PRIu32"\n",phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,i); + smbv_configure_common_dci(smbv_fname,(smbv_frame_cnt*10) + (subframe), "SI", &DCI_pdu->dci_alloc[i], i); } - - DCI_pdu->dci_alloc[i].nCCE = phy_vars_eNB->dlsch_eNB_SI->nCCE[subframe]; + +#endif + } else if (DCI_pdu->dci_alloc[i].ra_flag == 1) { #ifdef DEBUG_PHY_PROC @@ -1906,28 +1832,20 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e // mac_xface->macphy_exit("Transmitted RAR, exiting\n"); - int result = get_nCCE_offset(1<dci_alloc[i].L, DCI_pdu->nCCE, 1, DCI_pdu->dci_alloc[i].rnti, subframe); - phy_vars_eNB->dlsch_eNB_ra->nCCE[subframe] = result; - if (result == -1) { - // FIXME what happens to phy_vars_eNB->dlsch_eNB_ra->nCCE[subframe]? - LOG_E(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : No available CCE resources for common DCI (RA) !!!\n",phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe); - } else { - LOG_D(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resource for common DCI (RA) => %"PRIu8"/%u\n",phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe, - phy_vars_eNB->dlsch_eNB_ra->nCCE[subframe],DCI_pdu->nCCE); + phy_vars_eNB->dlsch_eNB_ra->nCCE[subframe] = DCI_pdu->dci_alloc[i].firstCCE; + + LOG_D(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resource for common DCI (RA) => %"PRIu8"/%u\n",phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe, + phy_vars_eNB->dlsch_eNB_ra->nCCE[subframe],DCI_pdu->nCCE); #if defined(SMBV) && !defined(EXMIMO) - // configure RA DCI - if (smbv_is_config_frame(phy_vars_eNB->proc[sched_subframe].frame_tx) && (smbv_frame_cnt < 4)) { - msg("[SMBV] Frame %3d, RA in SF %d DCI %"PRIu32"\n",phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,i); - smbv_configure_common_dci(smbv_fname,(smbv_frame_cnt*10) + (subframe), "RA", &DCI_pdu->dci_alloc[i], i); - } - -#endif - + // configure RA DCI + if (smbv_is_config_frame(phy_vars_eNB->proc[sched_subframe].frame_tx) && (smbv_frame_cnt < 4)) { + msg("[SMBV] Frame %3d, RA in SF %d DCI %"PRIu32"\n",phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,i); + smbv_configure_common_dci(smbv_fname,(smbv_frame_cnt*10) + (subframe), "RA", &DCI_pdu->dci_alloc[i], i); } - DCI_pdu->dci_alloc[i].nCCE = phy_vars_eNB->dlsch_eNB_ra->nCCE[subframe]; +#endif } @@ -1968,30 +1886,22 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e LOG_D(PHY,"[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d subframe %d: Generated dlsch params\n", phy_vars_eNB->Mod_id,DCI_pdu->dci_alloc[i].rnti,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->current_harq_pid,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe); - int result = get_nCCE_offset(1<dci_alloc[i].L, DCI_pdu->nCCE, 0, DCI_pdu->dci_alloc[i].rnti, subframe); - phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->nCCE[subframe] = result; - if (result == -1) { - // FIXME what happens to phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->nCCE[subframe]? - LOG_E(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : No available CCE resources for UE spec DCI (PDSCH %"PRIx16") !!!\n", - phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,DCI_pdu->dci_alloc[i].rnti); - } else { - LOG_D(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resource for ue DCI (PDSCH %"PRIx16") => %"PRIu8"/%u\n",phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe, - DCI_pdu->dci_alloc[i].rnti,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->nCCE[subframe],DCI_pdu->nCCE); + phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->nCCE[subframe] = DCI_pdu->dci_alloc[i].firstCCE; + + LOG_D(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resource for ue DCI (PDSCH %"PRIx16") => %"PRIu8"/%u\n",phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe, + DCI_pdu->dci_alloc[i].rnti,phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->nCCE[subframe],DCI_pdu->nCCE); #if defined(SMBV) && !defined(EXMIMO) - DCI_pdu->dci_alloc[i].nCCE = phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->nCCE[subframe]; - - // configure UE-spec DCI - if (smbv_is_config_frame(phy_vars_eNB->proc[sched_subframe].frame_tx) && (smbv_frame_cnt < 4)) { - msg("[SMBV] Frame %3d, PDSCH in SF %d DCI %"PRIu32"\n",phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,i); - smbv_configure_ue_spec_dci(smbv_fname,(smbv_frame_cnt*10) + (subframe), UE_id+1, &DCI_pdu->dci_alloc[i], i); - } + + // configure UE-spec DCI + if (smbv_is_config_frame(phy_vars_eNB->proc[sched_subframe].frame_tx) && (smbv_frame_cnt < 4)) { + msg("[SMBV] Frame %3d, PDSCH in SF %d DCI %"PRIu32"\n",phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,i); + smbv_configure_ue_spec_dci(smbv_fname,(smbv_frame_cnt*10) + (subframe), UE_id+1, &DCI_pdu->dci_alloc[i], i); + } #endif - } - DCI_pdu->dci_alloc[i].nCCE = phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->nCCE[subframe]; #ifdef DEBUG_PHY_PROC //if (phy_vars_eNB->proc[sched_subframe].frame_tx%100 == 0) LOG_D(PHY,"[eNB %"PRIu8"][DCI][PDSCH %"PRIx16"] Frame %d subframe %d UE_id %"PRId8" Generated DCI format %d, aggregation %d\n", @@ -2069,29 +1979,21 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e CBA_RNTI, 0); // do_srs - if ((DCI_pdu->dci_alloc[i].nCCE=get_nCCE_offset(1<dci_alloc[i].L, - DCI_pdu->nCCE, - 0, - DCI_pdu->dci_alloc[i].rnti, - subframe)) == -1) { - LOG_E(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : No available CCE resources (%u) for UE spec DCI (PUSCH %"PRIx16") !!!\n", - phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,DCI_pdu->nCCE,DCI_pdu->dci_alloc[i].rnti); - } else { - LOG_T(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resources for UE spec DCI (PUSCH %"PRIx16") => %d/%u\n", - phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,DCI_pdu->dci_alloc[i].rnti, - DCI_pdu->dci_alloc[i].nCCE,DCI_pdu->nCCE); - + LOG_T(PHY,"[eNB %"PRIu8"] Frame %d subframe %d : CCE resources for UE spec DCI (PUSCH %"PRIx16") => %d/%u\n", + phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,DCI_pdu->dci_alloc[i].rnti, + DCI_pdu->dci_alloc[i].firstCCE,DCI_pdu->nCCE); + #if defined(SMBV) && !defined(EXMIMO) // configure UE-spec DCI for UL Grant - if (smbv_is_config_frame(phy_vars_eNB->proc[sched_subframe].frame_tx) && (smbv_frame_cnt < 4)) { - msg("[SMBV] Frame %3d, SF %d UL DCI %"PRIu32"\n",phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,i); - smbv_configure_ue_spec_dci(smbv_fname,(smbv_frame_cnt*10) + (subframe), UE_id+1, &DCI_pdu->dci_alloc[i], i); - } - + if (smbv_is_config_frame(phy_vars_eNB->proc[sched_subframe].frame_tx) && (smbv_frame_cnt < 4)) { + msg("[SMBV] Frame %3d, SF %d UL DCI %"PRIu32"\n",phy_vars_eNB->proc[sched_subframe].frame_tx,subframe,i); + smbv_configure_ue_spec_dci(smbv_fname,(smbv_frame_cnt*10) + (subframe), UE_id+1, &DCI_pdu->dci_alloc[i], i); + } + #endif - } + #ifdef DEBUG_PHY_PROC LOG_D(PHY,"[eNB %"PRIu8"][PUSCH %"PRIu8"] frame %d subframe %d Setting subframe_scheduling_flag for UE %"PRIu32" harq_pid %"PRIu8" (ul subframe %"PRIu8")\n", @@ -2122,13 +2024,13 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e } if (abstraction_flag == 0) { -#ifdef DEBUG_PHY_PROC + //#ifdef DEBUG_PHY_PROC if (DCI_pdu->Num_ue_spec_dci+DCI_pdu->Num_common_dci > 0) LOG_D(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (common %"PRIu8",ue_spec %"PRIu8")\n",phy_vars_eNB->Mod_id,phy_vars_eNB->proc[sched_subframe].frame_tx, subframe, DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci); -#endif + //#endif // for (sect_id=0;sect_idNum_ue_spec_dci, @@ -2411,7 +2313,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e input_buffer_length = phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->TBS/8; -#ifdef DEBUG_PHY_PROC + //#ifdef DEBUG_PHY_PROC LOG_D(PHY, "[eNB %"PRIu8"][PDSCH %"PRIx16"/%"PRIu8"] Frame %d, subframe %d: Generating PDSCH/DLSCH with input size = %"PRIu16", G %d, nb_rb %"PRIu16", mcs %"PRIu8", pmi_alloc %"PRIx16", rv %"PRIu8" (round %"PRIu8")\n", phy_vars_eNB->Mod_id, phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->rnti,harq_pid, @@ -2427,7 +2329,7 @@ void phy_procedures_eNB_TX(unsigned char sched_subframe,PHY_VARS_eNB *phy_vars_e pmi2hex_2Ar1(phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->pmi_alloc), phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->rvidx, phy_vars_eNB->dlsch_eNB[(uint8_t)UE_id][0]->harq_processes[harq_pid]->round); -#endif + //#endif #if defined(MESSAGE_CHART_GENERATOR_PHY) MSC_LOG_TX_MESSAGE( MSC_PHY_ENB,MSC_PHY_UE, @@ -2868,6 +2770,7 @@ void process_HARQ_feedback(uint8_t UE_id, dlsch_harq_proc->round = 0; ue_stats->dlsch_l2_errors[dl_harq_pid[m]]++; dlsch_harq_proc->status = SCH_IDLE; + put_harq_pid_in_freelist(dlsch, dl_harq_pid[m]); dlsch->harq_ids[dl_subframe] = dlsch->Mdlharq; } } else { @@ -2880,6 +2783,7 @@ void process_HARQ_feedback(uint8_t UE_id, // Received ACK so set round to 0 and set dlsch_harq_pid IDLE dlsch_harq_proc->round = 0; dlsch_harq_proc->status = SCH_IDLE; + put_harq_pid_in_freelist(dlsch, dl_harq_pid[m]); dlsch->harq_ids[dl_subframe] = dlsch->Mdlharq; ue_stats->total_TBS = ue_stats->total_TBS + @@ -3218,7 +3122,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ int16_t n1_pucch0,n1_pucch1,n1_pucch2,n1_pucch3; uint8_t do_SR = 0; uint8_t pucch_sel = 0; - int32_t metric0=0,metric1=0; + int32_t metric0=0,metric1=0,metric0_SR=0; ANFBmode_t bundling_flag; PUCCH_FMT_t format; uint8_t nPRS; @@ -3247,6 +3151,11 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ phy_vars_eNB->lte_frame_parms.samples_per_tti); #endif */ + phy_vars_eNB->rb_mask_ul[0]=0; + phy_vars_eNB->rb_mask_ul[1]=0; + phy_vars_eNB->rb_mask_ul[2]=0; + phy_vars_eNB->rb_mask_ul[3]=0; + if (abstraction_flag == 0) { remove_7_5_kHz(phy_vars_eNB,subframe<<1); remove_7_5_kHz(phy_vars_eNB,(subframe<<1)+1); @@ -3395,6 +3304,12 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ pusch_active = 1; round = phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round; + for (int rb=0; + rb<=phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->nb_rb; + rb++) { + int rb2 = rb+phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->first_rb; + phy_vars_eNB->rb_mask_ul[rb2>>5] |= (1<<(rb2&31)); + } #ifdef DEBUG_PHY_PROC LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d Scheduling PUSCH/ULSCH Reception for rnti %x (UE_id %d)\n", phy_vars_eNB->Mod_id,harq_pid, @@ -3436,7 +3351,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ } } -#ifdef DEBUG_PHY_PROC + //#ifdef DEBUG_PHY_PROC LOG_D(PHY, "[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, mcs %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d, nprs %d), O_ACK %d \n", phy_vars_eNB->Mod_id,harq_pid,frame,subframe, @@ -3453,7 +3368,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ phy_vars_eNB->lte_frame_parms.pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift, nPRS, phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->O_ACK); -#endif + //#endif start_meas(&phy_vars_eNB->ulsch_demodulation_stats); if (abstraction_flag==0) { @@ -3499,7 +3414,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ #endif stop_meas(&phy_vars_eNB->ulsch_decoding_stats); -#ifdef DEBUG_PHY_PROC + //#ifdef DEBUG_PHY_PROC LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) RSSI (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d\n", phy_vars_eNB->Mod_id,harq_pid, frame,subframe, @@ -3513,7 +3428,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->o_ACK[0], phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->o_ACK[1], ret); -#endif //DEBUG_PHY_PROC + //#endif //DEBUG_PHY_PROC /* if ((two_ues_connected==1) && (phy_vars_eNB->cooperation_flag==2)) { for (j=0;jlte_frame_parms.nb_antennas_rx;j++) { @@ -3715,13 +3630,19 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ for (j=0; jlte_frame_parms.nb_antennas_rx; j++) //this is the RSSI per RB phy_vars_eNB->eNB_UE_stats[i].UL_rssi[j] = + dB_fixed(phy_vars_eNB->lte_eNB_pusch_vars[i]->ulsch_power[j]* (phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->nb_rb*12)/ phy_vars_eNB->lte_frame_parms.ofdm_symbol_size) - phy_vars_eNB->rx_total_gain_eNB_dB - hundred_times_log10_NPRB[phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->nb_rb-1]/100 - get_hundred_times_delta_IF_eNB(phy_vars_eNB,i,harq_pid, 0)/100; - + + /* + dB_fixed(phy_vars_eNB->lte_eNB_pusch_vars[i]->ulsch_power[j]*phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->nb_rb) - + phy_vars_eNB->rx_total_gain_eNB_dB - + hundred_times_log10_NPRB[phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->nb_rb-1]/100 - + get_hundred_times_delta_IF_eNB(phy_vars_eNB,i,harq_pid, 0)/100;*/ phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->phich_active = 1; phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->phich_ACK = 1; phy_vars_eNB->ulsch_eNB[i]->harq_processes[harq_pid]->round = 0; @@ -3729,11 +3650,11 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ if (phy_vars_eNB->ulsch_eNB[i]->Msg3_flag == 1) { #ifdef OPENAIR2 -#ifdef DEBUG_PHY_PROC + //#ifdef DEBUG_PHY_PROC LOG_I(PHY,"[eNB %d][RAPROC] Frame %d Terminating ra_proc for harq %d, UE %d\n", phy_vars_eNB->Mod_id, frame,harq_pid,i); -#endif + //#endif mac_xface->rx_sdu(phy_vars_eNB->Mod_id, phy_vars_eNB->CC_id, frame,subframe, @@ -3743,7 +3664,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ harq_pid, &phy_vars_eNB->ulsch_eNB[i]->Msg3_flag); - // false msg3 detection by MAC: empty PDU + // one-shot msg3 detection by MAC: empty PDU (e.g. CRNTI) if (phy_vars_eNB->ulsch_eNB[i]->Msg3_flag == 0 ) { phy_vars_eNB->eNB_UE_stats[i].mode = PRACH; mac_xface->cancel_ra_proc(phy_vars_eNB->Mod_id, @@ -3766,9 +3687,9 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ phy_vars_eNB->eNB_UE_stats[i].mode = PUSCH; phy_vars_eNB->ulsch_eNB[i]->Msg3_flag = 0; -#ifdef DEBUG_PHY_PROC - LOG_D(PHY,"[eNB %d][RAPROC] Frame %d : RX Subframe %d Setting UE %d mode to PUSCH\n",phy_vars_eNB->Mod_id,frame,subframe,i); -#endif //DEBUG_PHY_PROC + //#ifdef DEBUG_PHY_PROC + LOG_D(PHY,"[eNB %d][RAPROC] Frame %d : RX Subframe %d Setting UE %d mode to PUSCH\n",phy_vars_eNB->Mod_id,frame,subframe,i); + //#endif //DEBUG_PHY_PROC for (k=0; k<8; k++) { //harq_processes for (j=0; jdlsch_eNB[i][0]->Mdlharq; j++) { @@ -3915,28 +3836,56 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ } else { // otherwise we have some PUCCH detection to do + // Null out PUCCH PRBs for noise measurement + switch(phy_vars_eNB->lte_frame_parms.N_RB_UL) { + case 6: + phy_vars_eNB->rb_mask_ul[0] |= (0x1 | (1<<5)); //position 5 + break; + case 15: + phy_vars_eNB->rb_mask_ul[0] |= (0x1 | (1<<14)); // position 14 + break; + case 25: + phy_vars_eNB->rb_mask_ul[0] |= (0x1 | (1<<24)); // position 24 + break; + case 50: + phy_vars_eNB->rb_mask_ul[0] |= 0x1; + phy_vars_eNB->rb_mask_ul[1] |= (1<<17); // position 49 (49-32) + break; + case 75: + phy_vars_eNB->rb_mask_ul[0] |= 0x1; + phy_vars_eNB->rb_mask_ul[2] |= (1<<10); // position 74 (74-64) + break; + case 100: + phy_vars_eNB->rb_mask_ul[0] |= 0x1; + phy_vars_eNB->rb_mask_ul[3] |= (1<<3); // position 99 (99-96) + break; + default: + LOG_E(PHY,"Unknown number for N_RB_UL %d\n",phy_vars_eNB->lte_frame_parms.N_RB_UL); + break; + } + if (do_SR == 1) { phy_vars_eNB->eNB_UE_stats[i].sr_total++; if (abstraction_flag == 0) - metric0 = rx_pucch(phy_vars_eNB, - pucch_format1, - i, - phy_vars_eNB->scheduling_request_config[i].sr_PUCCH_ResourceIndex, - 0, // n2_pucch - 1, // shortened format - &SR_payload, - subframe, - PUCCH1_THRES); + metric0_SR = rx_pucch(phy_vars_eNB, + pucch_format1, + i, + phy_vars_eNB->scheduling_request_config[i].sr_PUCCH_ResourceIndex, + 0, // n2_pucch + 0, // shortened format, should be use_srs flag, later + &SR_payload, + subframe, + PUCCH1_THRES); #ifdef PHY_ABSTRACTION else { - metric0 = rx_pucch_emul(phy_vars_eNB, - i, - pucch_format1, - 0, - &SR_payload, - sched_subframe); + metric0_SR = rx_pucch_emul(phy_vars_eNB, + i, + pucch_format1, + 0, + &SR_payload, + sched_subframe); LOG_D(PHY,"[eNB %d][SR %x] Frame %d subframe %d Checking SR (UE SR %d/%d)\n",phy_vars_eNB->Mod_id, phy_vars_eNB->ulsch_eNB[i]->rnti,frame,subframe,SR_payload,phy_vars_eNB->scheduling_request_config[i].sr_PUCCH_ResourceIndex); } @@ -3949,6 +3898,9 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ phy_vars_eNB->eNB_UE_stats[i].sr_received++; if (phy_vars_eNB->first_sr[i] == 1) { // this is the first request for uplink after Connection Setup, so clear HARQ process 0 use for Msg4 + /* is this test necessary? */ + if (phy_vars_eNB->dlsch_eNB[i][0]->harq_processes[0]->status != SCH_IDLE) + put_harq_pid_in_freelist(phy_vars_eNB->dlsch_eNB[i][0], 0); phy_vars_eNB->first_sr[i] = 0; phy_vars_eNB->dlsch_eNB[i][0]->harq_processes[0]->round=0; phy_vars_eNB->dlsch_eNB[i][0]->harq_processes[0]->status=SCH_IDLE; @@ -3969,20 +3921,35 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ if ((n1_pucch0==-1) && (n1_pucch1==-1)) { // just check for SR } else if (phy_vars_eNB->lte_frame_parms.frame_type==FDD) { // FDD // if SR was detected, use the n1_pucch from SR, else use n1_pucch0 - n1_pucch0 = (SR_payload==1) ? phy_vars_eNB->scheduling_request_config[i].sr_PUCCH_ResourceIndex:n1_pucch0; + // n1_pucch0 = (SR_payload==1) ? phy_vars_eNB->scheduling_request_config[i].sr_PUCCH_ResourceIndex:n1_pucch0; LOG_D(PHY,"Demodulating PUCCH for ACK/NAK: n1_pucch0 %d (%d), SR_payload %d\n",n1_pucch0,phy_vars_eNB->scheduling_request_config[i].sr_PUCCH_ResourceIndex,SR_payload); - if (abstraction_flag == 0) + if (abstraction_flag == 0) { + + + metric0 = rx_pucch(phy_vars_eNB, pucch_format1a, i, (uint16_t)n1_pucch0, 0, //n2_pucch - 1, // shortened format + 0, // shortened format pucch_payload0, subframe, PUCCH1a_THRES); + + if (metric0 < metric0_SR) + metric0=rx_pucch(phy_vars_eNB, + pucch_format1a, + i, + phy_vars_eNB->scheduling_request_config[i].sr_PUCCH_ResourceIndex, + 0, //n2_pucch + 0, // shortened format + pucch_payload0, + subframe, + PUCCH1a_THRES); + } else { #ifdef PHY_ABSTRACTION metric0 = rx_pucch_emul(phy_vars_eNB,i, @@ -4034,15 +4001,15 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ #endif if (abstraction_flag == 0) - metric0 = rx_pucch(phy_vars_eNB, - format, - i, - phy_vars_eNB->scheduling_request_config[i].sr_PUCCH_ResourceIndex, - 0, //n2_pucch - 1, // shortened format - pucch_payload0, - subframe, - PUCCH1a_THRES); + metric0_SR = rx_pucch(phy_vars_eNB, + format, + i, + phy_vars_eNB->scheduling_request_config[i].sr_PUCCH_ResourceIndex, + 0, //n2_pucch + 0, // shortened format + pucch_payload0, + subframe, + PUCCH1a_THRES); else { #ifdef PHY_ABSTRACTION metric0 = rx_pucch_emul(phy_vars_eNB,i, @@ -4070,7 +4037,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ i, (uint16_t)n1_pucch0, 0, // n2_pucch - 1, // shortened format + 0, // shortened format pucch_payload0, subframe, PUCCH1a_THRES); @@ -4093,7 +4060,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ i, (uint16_t)n1_pucch1, 0, //n2_pucch - 1, // shortened format + 0, // shortened format pucch_payload1, subframe, PUCCH1a_THRES); @@ -4336,13 +4303,15 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ } // loop i=0 ... NUMBER_OF_UE_MAX-1 - if (pusch_active == 0) { + // if (pusch_active == 0) { if (abstraction_flag == 0) { // LOG_D(PHY,"[eNB] Frame %d, subframe %d Doing I0_measurements\n", // (((subframe)==9)?-1:0) + phy_vars_eNB->proc[sched_subframe].frame_tx,subframe); lte_eNB_I0_measurements(phy_vars_eNB, + subframe, 0, phy_vars_eNB->first_run_I0_measurements); + phy_vars_eNB->first_run_I0_measurements = 0; } #ifdef PHY_ABSTRACTION @@ -4354,9 +4323,7 @@ void phy_procedures_eNB_RX(const unsigned char sched_subframe,PHY_VARS_eNB *phy_ #endif - if (I0_clear == 1) - I0_clear = 0; - } + //} #ifdef EMOS phy_procedures_emos_eNB_RX(subframe,phy_vars_eNB); @@ -4595,11 +4562,11 @@ void phy_procedures_eNB_lte(unsigned char subframe,PHY_VARS_eNB **phy_vars_eNB,u phy_vars_eNB[CC_id]->proc[subframe].frame_tx++; phy_vars_eNB[CC_id]->proc[subframe].frame_rx++; - if (phy_vars_eNB[CC_id]->proc[subframe].frame_tx==MAX_FRAME_NUMBER) // defined in impl_defs_top.h - phy_vars_eNB[CC_id]->proc[subframe].frame_tx=0; + if (phy_vars_eNB[CC_id]->proc[subframe].frame_tx>=MAX_FRAME_NUMBER) // defined in impl_defs_top.h + phy_vars_eNB[CC_id]->proc[subframe].frame_tx-=MAX_FRAME_NUMBER; - if (phy_vars_eNB[CC_id]->proc[subframe].frame_rx==MAX_FRAME_NUMBER) - phy_vars_eNB[CC_id]->proc[subframe].frame_rx=0; + if (phy_vars_eNB[CC_id]->proc[subframe].frame_rx>=MAX_FRAME_NUMBER) + phy_vars_eNB[CC_id]->proc[subframe].frame_rx-=MAX_FRAME_NUMBER; } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_LTE,0); diff --git a/openair1/SCHED/phy_procedures_lte_ue.c b/openair1/SCHED/phy_procedures_lte_ue.c index 7dcd71ce47..bc84beae43 100755 --- a/openair1/SCHED/phy_procedures_lte_ue.c +++ b/openair1/SCHED/phy_procedures_lte_ue.c @@ -168,7 +168,7 @@ void dump_dlsch_SI(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t subframe) 1, phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->num_pdcch_symbols, phy_vars_ue->frame_rx,subframe); - LOG_I(PHY,"[UE %d] Dumping dlsch_SI : ofdm_symbol_size %d, nsymb %d, nb_rb %d, mcs %d, nb_rb %d, num_pdcch_symbols %d,G %d\n", + LOG_D(PHY,"[UE %d] Dumping dlsch_SI : ofdm_symbol_size %d, nsymb %d, nb_rb %d, mcs %d, nb_rb %d, num_pdcch_symbols %d,G %d\n", phy_vars_ue->Mod_id, phy_vars_ue->lte_frame_parms.ofdm_symbol_size, nsymb, @@ -1262,7 +1262,7 @@ void phy_procedures_UE_TX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstra #else &phy_vars_ue->lte_ue_common_vars.txdata[aa][ulsch_start], #endif - frame_parms->log2_symbol_size, + frame_parms->ofdm_symbol_size, nsymb, frame_parms->nb_prefix_samples, CYCLIC_PREFIX); @@ -1553,7 +1553,9 @@ void lte_ue_measurement_procedures(uint16_t l, PHY_VARS_UE *phy_vars_ue,uint8_t #else #ifndef OAI_USRP + #ifndef OAI_BLADERF phy_adjust_gain (phy_vars_ue,0); + #endif #endif #endif VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_GAIN_CONTROL, VCD_FUNCTION_OUT); @@ -2061,9 +2063,9 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst #endif -#ifdef DEBUG_PHY_PROC + //#ifdef DEBUG_PHY_PROC LOG_D(PHY,"[UE %d] Frame %d, slot %d, Mode %s: DCI found %i\n",phy_vars_ue->Mod_id,frame_rx,slot_rx,mode_string[phy_vars_ue->UE_mode[eNB_id]],dci_cnt); -#endif + //#endif phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->dci_received += dci_cnt; /* @@ -2101,10 +2103,10 @@ int lte_ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *phy_vars_ue,uint8_t abst #ifdef DEBUG_PHY_PROC - if (subframe_rx == 9) { //( frame_rx % 100 == 0) { + // if (subframe_rx == 9) { //( frame_rx % 100 == 0) { LOG_D(PHY,"frame %d, subframe %d, rnti %x: dci %d/%d\n",frame_rx,subframe_rx,phy_vars_ue->lte_ue_pdcch_vars[eNB_id]->crnti,i,dci_cnt); //dump_dci(&phy_vars_ue->lte_frame_parms, &dci_alloc_rx[i]); - } + // } #endif @@ -2444,7 +2446,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac else openair_daq_vars.use_ia_receiver = (openair_daq_vars.use_ia_receiver+1)%3; - LOG_I(PHY,"[MYEMOS] frame %d, IA receiver %d, MCS %d, bitrate %d\n", + LOG_D(PHY,"[MYEMOS] frame %d, IA receiver %d, MCS %d, bitrate %d\n", frame_rx, openair_daq_vars.use_ia_receiver, phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[phy_vars_ue->dlsch_ue[eNB_id][0]->current_harq_pid]->mcs, @@ -2622,13 +2624,13 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac phy_vars_ue->dlsch_ue[eNB_id][0]->active = 0; -#ifdef DEBUG_PHY_PROC + //#ifdef DEBUG_PHY_PROC LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d Scheduling DLSCH decoding\n", phy_vars_ue->Mod_id, phy_vars_ue->dlsch_ue[eNB_id][0]->rnti, harq_pid, (subframe_prev == 9) ? (frame_rx-1) : frame_rx,subframe_prev); -#endif + //#endif if (phy_vars_ue->dlsch_ue[eNB_id][0]) { if (abstraction_flag == 0) { @@ -2674,17 +2676,18 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac if (ret == (1+phy_vars_ue->dlsch_ue[eNB_id][0]->max_turbo_iterations)) { phy_vars_ue->dlsch_errors[eNB_id]++; -#ifdef DEBUG_PHY_PROC - LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH in error (rv %d,mcs %d)\n", + //#ifdef DEBUG_PHY_PROC + LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d DLSCH in error (rv %d,mcs %d,TBS %d)\n", phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue[eNB_id][0]->rnti, harq_pid,frame_rx,subframe_prev, phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->rvidx, - phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->mcs); + phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->mcs, + phy_vars_ue->dlsch_ue[eNB_id][0]->harq_processes[harq_pid]->TBS); // if (abstraction_flag ==0 ) - //dump_dlsch(phy_vars_ue,eNB_id,subframe_prev,harq_pid); - //mac_xface->macphy_exit(""); -#endif + dump_dlsch(phy_vars_ue,eNB_id,subframe_prev,harq_pid); + mac_xface->macphy_exit(""); + //#endif } else { LOG_D(PHY,"[UE %d][PDSCH %x/%d] Frame %d subframe %d (slot_rx %d): Received DLSCH (rv %d,mcs %d,TBS %d)\n", phy_vars_ue->Mod_id,phy_vars_ue->dlsch_ue[eNB_id][0]->rnti, @@ -2799,7 +2802,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac frame_rx,subframe_prev); #ifdef DEBUG_PHY_PROC - LOG_I(PHY,"Decoding DLSCH_SI : rb_alloc %x : nb_rb %d G %d TBS %d, num_pdcch_sym %d\n",phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc_even[0], + LOG_D(PHY,"Decoding DLSCH_SI : rb_alloc %x : nb_rb %d G %d TBS %d, num_pdcch_sym %d\n",phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->rb_alloc_even[0], phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->nb_rb, phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->G, phy_vars_ue->dlsch_ue_SI[eNB_id]->harq_processes[0]->TBS, @@ -2847,7 +2850,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac if (ret == (1+phy_vars_ue->dlsch_ue_SI[eNB_id]->max_turbo_iterations)) { phy_vars_ue->dlsch_SI_errors[eNB_id]++; #ifdef DEBUG_PHY_PROC - LOG_I(PHY,"[UE %d] Frame %d, subframe %d, received SI in error (TBS %d, mcs %d, rvidx %d, rballoc %X.%X.%X.%X\n", + LOG_D(PHY,"[UE %d] Frame %d, subframe %d, received SI in error (TBS %d, mcs %d, rvidx %d, rballoc %X.%X.%X.%X\n", phy_vars_ue->Mod_id, frame_rx, subframe_prev, @@ -3280,7 +3283,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac } if (is_pmch_subframe((subframe_rx==9?-1:0)+frame_rx,subframe_rx,&phy_vars_ue->lte_frame_parms)) { - LOG_I(PHY,"ue calling pmch subframe ..\n "); + LOG_D(PHY,"ue calling pmch subframe ..\n "); if ((slot_rx%2)==1) { LOG_D(PHY,"[UE %d] Frame %d, subframe %d: Querying for PMCH demodulation(%d)\n", @@ -3428,7 +3431,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint8_t abstrac phy_vars_rn->sync_area[subframe_rx] = sync_area; // this could also go the harq data struct phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->TBS = phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->TBS; phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->mcs = phy_vars_ue->dlsch_ue_MCH[0]->harq_processes[0]->mcs; - LOG_I(PHY,"[RN/UE %d] Frame %d subframe %d: store the MCH PDU for MBSFN sync area %d (MCS %d, TBS %d)\n", + LOG_D(PHY,"[RN/UE %d] Frame %d subframe %d: store the MCH PDU for MBSFN sync area %d (MCS %d, TBS %d)\n", phy_vars_ue->Mod_id, frame_rx,subframe_rx,sync_area, phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->mcs, phy_vars_rn->dlsch_rn_MCH[subframe_rx]->harq_processes[0]->TBS>>3); diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 0e0dce370c..fbb88bf052 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -107,88 +107,6 @@ void handler(int sig) exit(1); } -void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,uint8_t fdd_flag, uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL, - uint8_t osf,uint32_t perfect_ce) -{ - - LTE_DL_FRAME_PARMS *lte_frame_parms; - int i; - - - printf("Start lte_param_init\n"); - PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB)); - PHY_vars_UE = malloc(sizeof(PHY_VARS_UE)); - //PHY_config = malloc(sizeof(PHY_CONFIG)); - mac_xface = malloc(sizeof(MAC_xface)); - - srand(0); - randominit(0); - set_taus_seed(0); - - lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms); - - lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz - lte_frame_parms->N_RB_UL = N_RB_DL; - lte_frame_parms->Ncp = extended_prefix_flag; - lte_frame_parms->Nid_cell = Nid_cell; - lte_frame_parms->nushift = Nid_cell%6; - lte_frame_parms->nb_antennas_tx = N_tx; - lte_frame_parms->nb_antennas_rx = N_rx; - lte_frame_parms->nb_antennas_tx_eNB = N_tx; - lte_frame_parms->phich_config_common.phich_resource = one; - lte_frame_parms->tdd_config = tdd_config; - lte_frame_parms->frame_type = (fdd_flag==1)?0 : 1; - // lte_frame_parms->Csrs = 2; - // lte_frame_parms->Bsrs = 0; - // lte_frame_parms->kTC = 0;44 - // lte_frame_parms->n_RRC = 0; - lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0; - - init_frame_parms(lte_frame_parms,osf); - - //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing)); - - // phy_init_top(lte_frame_parms); //allocation - - PHY_vars_UE->is_secondary_ue = 0; - PHY_vars_UE->lte_frame_parms = *lte_frame_parms; - PHY_vars_eNB->lte_frame_parms = *lte_frame_parms; - - phy_init_lte_top(lte_frame_parms); - dump_frame_parms(lte_frame_parms); - - PHY_vars_UE->PHY_measurements.n_adj_cells=0; - PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1; - PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2; - - for (i=0; i<3; i++) - lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i); - - phy_init_lte_ue(PHY_vars_UE,1,0); - phy_init_lte_eNB(PHY_vars_eNB,0,0,0); - - generate_pcfich_reg_mapping(&PHY_vars_UE->lte_frame_parms); - generate_phich_reg_mapping(&PHY_vars_UE->lte_frame_parms); - - // DL power control init - if (transmission_mode == 1) { - PHY_vars_eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB - ((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 0; - PHY_vars_UE->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB - ((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 0; - } else { // rho_a = rhob - PHY_vars_eNB->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB - ((PHY_vars_eNB->lte_frame_parms).pdsch_config_common).p_b = 1; - PHY_vars_UE->pdsch_config_dedicated->p_a = dB0; // 4 = 0dB - ((PHY_vars_UE->lte_frame_parms).pdsch_config_common).p_b = 1; - } - - PHY_vars_UE->perfect_ce = perfect_ce; - - printf("Done lte_param_init\n"); - - -} //DCI2_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2_2A[2]; @@ -214,7 +132,7 @@ void do_OFDM_mod_l(mod_sym_t **txdataF, int32_t **txdata, uint16_t next_slot, LT if (frame_parms->Ncp == 1) PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input &txdata[aa][slot_offset], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, 6, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); @@ -266,15 +184,15 @@ int main(int argc, char **argv) unsigned int ret; unsigned int coded_bits_per_codeword=0,nsymb,dci_cnt,tbs=0; - unsigned int tx_lev=0,tx_lev_dB=0,trials,errs[4]= {0,0,0,0},errs2[4]= {0,0,0,0},round_trials[4]= {0,0,0,0},dci_errors=0,dlsch_active=0,num_layers; + unsigned int tx_lev=0,tx_lev_dB=0,trials,errs[4]= {0,0,0,0},errs2[4]= {0,0,0,0},round_trials[4]= {0,0,0,0},dci_errors=0,dlsch_active=0;//,num_layers; int re_allocated; char fname[32],vname[32]; FILE *bler_fd; char bler_fname[256]; FILE *time_meas_fd; char time_meas_fname[256]; - FILE *tikz_fd; - char tikz_fname[256]; + // FILE *tikz_fd; + // char tikz_fname[256]; FILE *input_trch_fd=NULL; unsigned char input_trch_file=0; @@ -300,7 +218,7 @@ int main(int argc, char **argv) uint8_t rx_sample_offset = 0; //char stats_buffer[4096]; //int len; - uint8_t num_rounds = 4,fix_rounds=0; + uint8_t num_rounds = 4;//,fix_rounds=0; uint8_t subframe=7; int u; int n=0; @@ -314,11 +232,11 @@ int main(int argc, char **argv) // void *data; // int ii; - int bler; - double blerr[4],uncoded_ber,avg_ber; + // int bler; + double blerr[4],uncoded_ber;//,avg_ber; short *uncoded_ber_bit=NULL; uint8_t N_RB_DL=25,osf=1; - uint8_t fdd_flag = 0; + frame_t frame_type = FDD; #ifdef XFORMS FD_lte_phy_scope_ue *form_ue; char title[255]; @@ -326,11 +244,11 @@ int main(int argc, char **argv) uint32_t DLSCH_RB_ALLOC = 0x1fff; int numCCE=0; int dci_length_bytes=0,dci_length=0; - double BW = 5.0; + //double channel_bandwidth = 5.0, sampling_rate=7.68; int common_flag=0,TPC=0; double cpu_freq_GHz; - time_stats_t ts;//,sts,usts; + // time_stats_t ts;//,sts,usts; int avg_iter,iter_trials; int rballocset=0; int print_perf=0; @@ -344,15 +262,24 @@ int main(int argc, char **argv) int TB0_active = 1; uint32_t perfect_ce = 0; - LTE_DL_UE_HARQ_t *dlsch0_ue_harq; - LTE_DL_eNB_HARQ_t *dlsch0_eNB_harq; + // LTE_DL_UE_HARQ_t *dlsch0_ue_harq; + // LTE_DL_eNB_HARQ_t *dlsch0_eNB_harq; uint8_t Kmimo; - FILE *proc_fd = NULL; - char buf[64]; + uint8_t ue_category=4; + uint32_t Nsoft; + + + + int CCE_table[800]; + + int threequarter_fs=0; opp_enabled=1; // to enable the time meas #if defined(__arm__) + FILE *proc_fd = NULL; + char buf[64]; + proc_fd = fopen("/sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_cur_freq", "r"); if(!proc_fd) printf("cannot open /sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_cur_freq"); @@ -375,16 +302,20 @@ int main(int argc, char **argv) // default parameters n_frames = 1000; snr0 = 0; - num_layers = 1; + // num_layers = 1; perfect_ce = 0; - while ((c = getopt (argc, argv, "ahdpZDe:m:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:Y")) != -1) { + while ((c = getopt (argc, argv, "ahdpZDe:Em:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:Y")) != -1) { switch (c) { case 'a': awgn_flag = 1; channel_model = AWGN; break; + case 'A': + abstx = 1; + break; + case 'b': tdd_config=atoi(optarg); break; @@ -393,10 +324,59 @@ int main(int argc, char **argv) N_RB_DL=atoi(optarg); break; + case 'c': + num_pdcch_symbols=atoi(optarg); + break; + + case 'C': + Nid_cell = atoi(optarg); + break; + case 'd': dci_flag = 1; break; + case 'D': + frame_type=TDD; + break; + + case 'e': + num_rounds=1; + common_flag = 1; + TPC = atoi(optarg); + break; + + case 'E': + threequarter_fs=1; + break; + + case 'f': + input_snr_step= atof(optarg); + break; + + case 'F': + forgetting_factor = atof(optarg); + break; + + case 'i': + input_fd = fopen(optarg,"r"); + input_file=1; + dci_flag = 1; + break; + + case 'I': + input_trch_fd = fopen(optarg,"r"); + input_trch_file=1; + break; + + case 'L': + llr8_flag=1; + break; + + case 'l': + offset_mumimo_llr_drange_fix=atoi(optarg); + break; + case 'm': mcs1 = atoi(optarg); break; @@ -405,6 +385,11 @@ int main(int argc, char **argv) mcs2 = atoi(optarg); break; + case 'O': + test_perf=atoi(optarg); + //print_perf =1; + break; + case 't': mcs_i = atoi(optarg); i_mod = get_Qm(mcs_i); @@ -414,27 +399,16 @@ int main(int argc, char **argv) n_frames = atoi(optarg); break; - case 'C': - Nid_cell = atoi(optarg); - break; case 'o': rx_sample_offset = atoi(optarg); break; - case 'D': - fdd_flag = 1; - break; - case 'r': DLSCH_RB_ALLOC = atoi(optarg); rballocset = 1; break; - case 'F': - forgetting_factor = atof(optarg); - break; - case 's': snr0 = atof(optarg); break; @@ -443,13 +417,6 @@ int main(int argc, char **argv) snr_int = atof(optarg); break; - case 'f': - input_snr_step= atof(optarg); - break; - - case 'A': - abstx = 1; - break; case 'N': n_ch_rlz= atof(optarg); @@ -459,10 +426,6 @@ int main(int argc, char **argv) extended_prefix_flag=1; break; - case 'c': - num_pdcch_symbols=atoi(optarg); - break; - case 'g': memcpy(channel_model_input,optarg,10); @@ -522,70 +485,12 @@ int main(int argc, char **argv) case 'N': channel_model=AWGN; break; - default: msg("Unsupported channel model!\n"); exit(-1); } break; - - case 'x': - transmission_mode=atoi(optarg); - - if ((transmission_mode!=1) && - (transmission_mode!=2) && - (transmission_mode!=3) && - (transmission_mode!=4) && - (transmission_mode!=5) && - (transmission_mode!=6)) { - msg("Unsupported transmission mode %d\n",transmission_mode); - exit(-1); - } - - if (transmission_mode>1) { - n_tx = 2; - } - - break; - - case 'y': - n_tx=atoi(optarg); - - if ((n_tx==0) || (n_tx>2)) { - msg("Unsupported number of tx antennas %d\n",n_tx); - exit(-1); - } - - break; - - case 'z': - n_rx=atoi(optarg); - - if ((n_rx==0) || (n_rx>2)) { - msg("Unsupported number of rx antennas %d\n",n_rx); - exit(-1); - } - - break; - - case 'I': - input_trch_fd = fopen(optarg,"r"); - input_trch_file=1; - break; - - case 'i': - input_fd = fopen(optarg,"r"); - input_file=1; - dci_flag = 1; - break; - - case 'e': - num_rounds=1; - common_flag = 1; - TPC = atoi(optarg); - break; - case 'R': num_rounds=atoi(optarg); break; @@ -623,26 +528,54 @@ int main(int argc, char **argv) print_perf=1; break; - case 'L': - llr8_flag=1; + case 'x': + transmission_mode=atoi(optarg); + + if ((transmission_mode!=1) && + (transmission_mode!=2) && + (transmission_mode!=3) && + (transmission_mode!=4) && + (transmission_mode!=5) && + (transmission_mode!=6)) { + msg("Unsupported transmission mode %d\n",transmission_mode); + exit(-1); + } + + if (transmission_mode>1) { + n_tx = 2; + } + break; - case 'l': - offset_mumimo_llr_drange_fix=atoi(optarg); + case 'y': + n_tx=atoi(optarg); + + if ((n_tx==0) || (n_tx>2)) { + msg("Unsupported number of tx antennas %d\n",n_tx); + exit(-1); + } + break; - case 'O': - test_perf=atoi(optarg); - //print_perf =1; + case 'Y': + perfect_ce=1; + break; + + case 'z': + n_rx=atoi(optarg); + + if ((n_rx==0) || (n_rx>2)) { + msg("Unsupported number of rx antennas %d\n",n_rx); + exit(-1); + } + break; case 'Z': dump_table=1; break; - case 'Y': - perfect_ce=1; - break; + case 'h': default: @@ -680,27 +613,19 @@ int main(int argc, char **argv) switch (N_RB_DL) { case 6: if (rballocset==0) DLSCH_RB_ALLOC = 0x3f; - - BW = 1.25; num_pdcch_symbols = 3; break; case 25: if (rballocset==0) DLSCH_RB_ALLOC = 0x1fff; - - BW = 5.00; break; case 50: if (rballocset==0) DLSCH_RB_ALLOC = 0x1ffff; - - BW = 10.00; break; case 100: if (rballocset==0) DLSCH_RB_ALLOC = 0x1ffffff; - - BW = 20.00; break; } @@ -708,8 +633,6 @@ int main(int argc, char **argv) } else NB_RB = 4; - NB_RB=conv_nprb(0,DLSCH_RB_ALLOC,N_RB_DL); - if ((transmission_mode > 1) && (n_tx != 2)) printf("n_tx must be >1 for transmission_mode %d\n",transmission_mode); @@ -733,8 +656,10 @@ int main(int argc, char **argv) printf("dual_stream_UE=%d\n", dual_stream_UE); } - lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,fdd_flag,Nid_cell,tdd_config,N_RB_DL,osf,perfect_ce); + lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,tdd_config,N_RB_DL,threequarter_fs,osf,perfect_ce); + + eNB_id_i = PHY_vars_UE->n_connected_eNB; printf("Setting mcs1 = %d\n",mcs1); @@ -967,7 +892,8 @@ int main(int argc, char **argv) eNB2UE[0] = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx, PHY_vars_UE->lte_frame_parms.nb_antennas_rx, channel_model, - BW, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL), forgetting_factor, rx_sample_offset, 0); @@ -977,8 +903,9 @@ int main(int argc, char **argv) eNB2UE[n] = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx, PHY_vars_UE->lte_frame_parms.nb_antennas_rx, channel_model, - BW, - forgetting_factor, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL), + forgetting_factor, rx_sample_offset, 0); } @@ -993,10 +920,27 @@ int main(int argc, char **argv) else Kmimo=1; + switch (ue_category) { + case 1: + Nsoft = 250368; + break; + case 2: + case 3: + Nsoft = 1237248; + break; + case 4: + Nsoft = 1827072; + break; + default: + printf("Unsupported UE category %d\n",ue_category); + exit(-1); + break; + } + for (k=0; kdlsch_eNB[k][i] = new_eNB_dlsch(Kmimo,8,N_RB_DL,0); + PHY_vars_eNB->dlsch_eNB[k][i] = new_eNB_dlsch(Kmimo,8,Nsoft,N_RB_DL,0); if (!PHY_vars_eNB->dlsch_eNB[k][i]) { printf("Can't get eNB dlsch structures\n"); @@ -1008,7 +952,7 @@ int main(int argc, char **argv) } for (i=0; i<2; i++) { - PHY_vars_UE->dlsch_ue[0][i] = new_ue_dlsch(Kmimo,8,MAX_TURBO_ITERATIONS,N_RB_DL,0); + PHY_vars_UE->dlsch_ue[0][i] = new_ue_dlsch(Kmimo,8,Nsoft,MAX_TURBO_ITERATIONS,N_RB_DL,0); if (!PHY_vars_UE->dlsch_ue[0][i]) { printf("Can't get ue dlsch structures\n"); @@ -1019,7 +963,7 @@ int main(int argc, char **argv) } // structure for SIC at UE - PHY_vars_UE->dlsch_eNB[0] = new_eNB_dlsch(Kmimo,8,N_RB_DL,0); + PHY_vars_UE->dlsch_eNB[0] = new_eNB_dlsch(Kmimo,8,Nsoft,N_RB_DL,0); if (DLSCH_alloc_pdu2_1E[0].tpmi == 5) { @@ -1306,7 +1250,7 @@ int main(int argc, char **argv) dci_alloc[num_dci].L = 1; dci_alloc[num_dci].rnti = SI_RNTI; dci_alloc[num_dci].format = format1A; - dci_alloc[num_dci].nCCE = 0; + dci_alloc[num_dci].firstCCE = 0; dump_dci(&PHY_vars_eNB->lte_frame_parms,&dci_alloc[num_dci]); printf("Generating dlsch params for user %d\n",k); @@ -1613,7 +1557,7 @@ int main(int argc, char **argv) dci_alloc[num_dci].L = 1; dci_alloc[num_dci].rnti = SI_RNTI; dci_alloc[num_dci].format = format1A; - dci_alloc[num_dci].nCCE = 0; + dci_alloc[num_dci].firstCCE = 0; dump_dci(&PHY_vars_eNB->lte_frame_parms,&dci_alloc[num_dci]); printf("Generating dlsch params for user %d\n",k); @@ -1921,7 +1865,7 @@ int main(int argc, char **argv) dci_alloc[num_dci].L = 1; dci_alloc[num_dci].rnti = SI_RNTI; dci_alloc[num_dci].format = format1A; - dci_alloc[num_dci].nCCE = 0; + dci_alloc[num_dci].firstCCE = 0; dump_dci(&PHY_vars_eNB->lte_frame_parms,&dci_alloc[num_dci]); printf("Generating dlsch params for user %d\n",k); @@ -1952,7 +1896,7 @@ int main(int argc, char **argv) dci_alloc[num_dci].L = 1; dci_alloc[num_dci].rnti = n_rnti+k; dci_alloc[num_dci].format = format1E_2A_M10PRB; - dci_alloc[num_dci].nCCE = 4*k; + dci_alloc[num_dci].firstCCE = 4*k; printf("Generating dlsch params for user %d\n",k); generate_eNB_dlsch_params_from_dci(0, subframe, @@ -1997,17 +1941,20 @@ int main(int argc, char **argv) if (n_frames==1) printf("%d\n",numCCE); // apply RNTI-based nCCE allocation + memset(CCE_table,0,800*sizeof(int)); + for (i=num_common_dci; ilte_frame_parms, PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNB_id], subframe); - + if (num_pdcch_symbols_2 > num_pdcch_symbols) { msg("Error: given num_pdcch_symbols not big enough (%d > %d)\n",num_pdcch_symbols_2,num_pdcch_symbols); exit(-1); @@ -2675,13 +2622,15 @@ PMI_FEEDBACK: } start_meas(&PHY_vars_eNB->dlsch_modulation_stats); + re_allocated = dlsch_modulation(PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNB_id], AMP, subframe, &PHY_vars_eNB->lte_frame_parms, num_pdcch_symbols, PHY_vars_eNB->dlsch_eNB[k][0], - PHY_vars_eNB->dlsch_eNB[k][1]); + PHY_vars_eNB->dlsch_eNB[k][1]); + stop_meas(&PHY_vars_eNB->dlsch_modulation_stats); /* if (trials==0 && round==0) @@ -2789,7 +2738,7 @@ PMI_FEEDBACK: // Multipath channel if (awgn_flag == 0) { - multipath_channel(eNB2UE[0],s_re,s_im,r_re,r_im, + multipath_channel(eNB2UE[round],s_re,s_im,r_re,r_im, 2*frame_parms->samples_per_tti,hold_channel); // printf("amc: ****************** eNB2UE[%d]->n_rx = %d,dd %d\n",round,eNB2UE[round]->nb_rx,eNB2UE[round]->channel_offset); @@ -2799,8 +2748,16 @@ PMI_FEEDBACK: random_channel(eNB2UE[2],0); random_channel(eNB2UE[3],0); } - } - + + if (PHY_vars_UE->perfect_ce==1) { + // fill in perfect channel estimates + freq_channel(eNB2UE[round],PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1); + /* + write_output("channel.m","ch",eNB2UE[round]->ch[0],eNB2UE[round]->channel_length,1,8); + write_output("channelF.m","chF",eNB2UE[round]->chF[0],12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1,1,8); + */ + } + } if(abstx) { if (trials==0 && round==0) { @@ -2946,11 +2903,6 @@ PMI_FEEDBACK: if (PHY_vars_UE->perfect_ce==1) { if (awgn_flag==0) { - // fill in perfect channel estimates - freq_channel(eNB2UE[round],PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1); - - //write_output("channel.m","ch",desc1->ch[0],desc1->channel_length,1,8); - //write_output("channelF.m","chF",desc1->chF[0],nb_samples,1,8); for(k=0; knb_antennas_tx; aa++) { for (aarx=0; aarxnb_antennas_rx; aarx++) { diff --git a/openair1/SIMULATION/LTE_PHY/mbmssim.c b/openair1/SIMULATION/LTE_PHY/mbmssim.c index 862edaa864..98d1b68a15 100644 --- a/openair1/SIMULATION/LTE_PHY/mbmssim.c +++ b/openair1/SIMULATION/LTE_PHY/mbmssim.c @@ -47,15 +47,12 @@ #include "LAYER2/MAC/vars.h" #ifdef XFORMS -#include -#include "../../USERSPACE_TOOLS/SCOPE/lte_scope.h" +#include "PHY/TOOLS/lte_phy_scope.h" #endif //XFORMS #include "OCG_vars.h" -//#define BW 5.0 - PHY_VARS_eNB *PHY_vars_eNB; PHY_VARS_UE *PHY_vars_UE; @@ -131,7 +128,7 @@ int main(int argc, char **argv) char c; - int i,l,aa,aarx; + int i,l,aa,aarx,k; double sigma2, sigma2_dB=0,SNR,snr0=-2.0,snr1=0.0; uint8_t snr1set=0; double snr_step=1,input_snr_step=1; @@ -172,20 +169,19 @@ int main(int argc, char **argv) unsigned int trials,errs[4]= {0,0,0,0}; //,round_trials[4]={0,0,0,0}; uint8_t N_RB_DL=25,osf=1; - double BW=5.0; uint32_t perfect_ce = 0; lte_frame_type_t frame_type = FDD; #ifdef XFORMS - FD_lte_scope *form_dl; + FD_lte_phy_scope_ue *form_ue; char title[255]; fl_initialize (&argc, argv, NULL, 0, 0); - form_dl = create_form_lte_scope(); + form_ue = create_lte_phy_scope_ue(); sprintf (title, "LTE DL SCOPE UE"); - fl_show_form (form_dl->lte_scope, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); + fl_show_form (form_ue->lte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title); #endif logInit(); @@ -255,27 +251,9 @@ int main(int argc, char **argv) case 'R': N_RB_DL = atoi(optarg); - switch (N_RB_DL) { - case 6: - BW=1.25; - break; - - case 25: - BW=5.0; - break; - - case 50: - BW=10.0; - break; - - case 100: - BW=20.0; - break; - - default: + if ((N_RB_DL!=6) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=100)) { printf("Unsupported Bandwidth %d\n",N_RB_DL); exit(-1); - break; } break; @@ -397,7 +375,8 @@ int main(int argc, char **argv) eNB2UE = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx, PHY_vars_UE->lte_frame_parms.nb_antennas_rx, channel_model, - BW, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL), 0, 0, 0); @@ -477,7 +456,7 @@ int main(int argc, char **argv) PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][0], // input, txdata[0], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); @@ -541,15 +520,26 @@ int main(int argc, char **argv) subframe%10, 0, 0); - } - - for (l=2; l<12; l++) { - rx_pmch(PHY_vars_UE, + + if (PHY_vars_UE->perfect_ce==1) { + // fill in perfect channel estimates + freq_channel(eNB2UE,PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1); + for(k=0; knb_antennas_tx; aa++) { + for (aarx=0; aarxnb_antennas_rx; aarx++) { + for (i=0; iN_RB_DL*12; i++) { + ((int16_t *) PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[k][(aa<<1)+aarx])[2*i+(l*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(eNB2UE->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x*AMP); + ((int16_t *) PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[k][(aa<<1)+aarx])[2*i+1+(l*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(eNB2UE->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].y*AMP); + } + } + } + } + } + + rx_pmch(PHY_vars_UE, 0, subframe%10, l); - - } PHY_vars_UE->dlsch_ue_MCH[0]->harq_processes[0]->G = get_G(&PHY_vars_UE->lte_frame_parms, diff --git a/openair1/SIMULATION/LTE_PHY/pbchsim.c b/openair1/SIMULATION/LTE_PHY/pbchsim.c index 5aa3fac997..319c2ed008 100644 --- a/openair1/SIMULATION/LTE_PHY/pbchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pbchsim.c @@ -53,90 +53,11 @@ #include "OCG_vars.h" -#define BW 5.0 - - -PHY_VARS_eNB *PHY_vars_eNb,*PHY_vars_eNb1,*PHY_vars_eNb2; +PHY_VARS_eNB *PHY_vars_eNB,*PHY_vars_eNB1,*PHY_vars_eNB2; PHY_VARS_UE *PHY_vars_UE; #define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13 -void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,unsigned char frame_type, uint16_t Nid_cell,uint8_t N_RB_DL,uint8_t osf) -{ - - // unsigned int ind; - LTE_DL_FRAME_PARMS *lte_frame_parms; - int i; - - printf("Start lte_param_init\n"); - PHY_vars_eNb = malloc(sizeof(PHY_VARS_eNB)); - PHY_vars_eNb1 = malloc(sizeof(PHY_VARS_eNB)); - PHY_vars_eNb2 = malloc(sizeof(PHY_VARS_eNB)); - - PHY_vars_UE = malloc(sizeof(PHY_VARS_UE)); - //PHY_config = malloc(sizeof(PHY_CONFIG)); - mac_xface = malloc(sizeof(MAC_xface)); - - randominit(0); - set_taus_seed(0); - - lte_frame_parms = &(PHY_vars_eNb->lte_frame_parms); - - lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz - lte_frame_parms->N_RB_UL = N_RB_DL; - lte_frame_parms->Ncp = extended_prefix_flag; - lte_frame_parms->Nid_cell = Nid_cell; - lte_frame_parms->nushift = Nid_cell%6; - lte_frame_parms->nb_antennas_tx = N_tx; - lte_frame_parms->nb_antennas_tx_eNB = N_tx; - lte_frame_parms->nb_antennas_rx = N_rx; - // lte_frame_parms->Csrs = 2; - // lte_frame_parms->Bsrs = 0; - // lte_frame_parms->kTC = 0; - // lte_frame_parms->n_RRC = 0; - lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0; - lte_frame_parms->tdd_config = 3; - lte_frame_parms->frame_type = frame_type; - init_frame_parms(lte_frame_parms,osf); - - //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing)); - - PHY_vars_UE->lte_frame_parms = *lte_frame_parms; - - phy_init_lte_top(lte_frame_parms); - - PHY_vars_UE->PHY_measurements.n_adj_cells=2; - PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1; - PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2; - - for (i=0; i<3; i++) - lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i); - - phy_init_lte_ue(PHY_vars_UE,1,0); - - phy_init_lte_eNB(PHY_vars_eNb,0,0,0); - - memcpy((void*)&PHY_vars_eNb1->lte_frame_parms,(void*)&PHY_vars_eNb->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS)); - PHY_vars_eNb1->lte_frame_parms.Nid_cell=Nid_cell+1; - PHY_vars_eNb1->lte_frame_parms.nushift=(Nid_cell+1)%6; - PHY_vars_eNb1->Mod_id=1; - - memcpy((void*)&PHY_vars_eNb2->lte_frame_parms,(void*)&PHY_vars_eNb->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS)); - PHY_vars_eNb2->lte_frame_parms.Nid_cell=Nid_cell+2; - PHY_vars_eNb2->lte_frame_parms.nushift=(Nid_cell+2)%6; - PHY_vars_eNb2->Mod_id=2; - - phy_init_lte_eNB(PHY_vars_eNb1,0,0,0); - - phy_init_lte_eNB(PHY_vars_eNb2,0,0,0); - - phy_init_lte_top(lte_frame_parms); - - printf("Done lte_param_init\n"); - - -} - mod_sym_t *dummybuf[4]; mod_sym_t dummy0[2048*14]; mod_sym_t dummy1[2048*14]; @@ -423,6 +344,28 @@ int main(int argc, char **argv) lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,N_RB_DL,osf); + PHY_vars_eNB1 = malloc(sizeof(PHY_VARS_eNB)); + PHY_vars_eNB2 = malloc(sizeof(PHY_VARS_eNB)); + PHY_vars_UE->PHY_measurements.n_adj_cells=2; + PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1; + PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2; + + for (i=0; i<3; i++) + lte_gold(&PHY_vars_eNB->lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i); + + memcpy((void*)&PHY_vars_eNB1->lte_frame_parms,(void*)&PHY_vars_eNB->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS)); + PHY_vars_eNB1->lte_frame_parms.Nid_cell=Nid_cell+1; + PHY_vars_eNB1->lte_frame_parms.nushift=(Nid_cell+1)%6; + PHY_vars_eNB1->Mod_id=1; + + memcpy((void*)&PHY_vars_eNB2->lte_frame_parms,(void*)&PHY_vars_eNB->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS)); + PHY_vars_eNB2->lte_frame_parms.Nid_cell=Nid_cell+2; + PHY_vars_eNB2->lte_frame_parms.nushift=(Nid_cell+2)%6; + PHY_vars_eNB2->Mod_id=2; + + phy_init_lte_eNB(PHY_vars_eNB1,0,0,0); + phy_init_lte_eNB(PHY_vars_eNB2,0,0,0); + #ifdef XFORMS fl_initialize (&argc, argv, NULL, 0, 0); form_ue = create_lte_phy_scope_ue(); @@ -439,13 +382,13 @@ int main(int argc, char **argv) printf("SNR0 %f, SNR1 %f\n",snr0,snr1); - frame_parms = &PHY_vars_eNb->lte_frame_parms; + frame_parms = &PHY_vars_eNB->lte_frame_parms; - txdata = PHY_vars_eNb->lte_eNB_common_vars.txdata[0]; - txdata1 = PHY_vars_eNb1->lte_eNB_common_vars.txdata[0]; - txdata2 = PHY_vars_eNb2->lte_eNB_common_vars.txdata[0]; + txdata = PHY_vars_eNB->lte_eNB_common_vars.txdata[0]; + txdata1 = PHY_vars_eNB1->lte_eNB_common_vars.txdata[0]; + txdata2 = PHY_vars_eNB2->lte_eNB_common_vars.txdata[0]; s_re = malloc(2*sizeof(double*)); @@ -466,8 +409,8 @@ int main(int argc, char **argv) printf("FFT Size %d, Extended Prefix %d, Samples per subframe %d, Symbols per subframe %d, interf (%d,%d)\n",NUMBER_OF_OFDM_CARRIERS, frame_parms->Ncp,frame_parms->samples_per_tti,nsymb,interf1,interf2); - printf("PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][0] = %p\n", - PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][0]); + printf("PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][0] = %p\n", + PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][0]); DLSCH_alloc_pdu2.rah = 0; @@ -482,28 +425,31 @@ int main(int argc, char **argv) // Forget second codeword DLSCH_alloc_pdu2.tpmi = (transmission_mode==6 ? 5 : 0) ; // precoding - eNB2UE = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx, + eNB2UE = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx, PHY_vars_UE->lte_frame_parms.nb_antennas_rx, channel_model, - BW, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL), 0, 0, 0); if (interf1>-20) - eNB2UE1 = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx, + eNB2UE1 = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx, PHY_vars_UE->lte_frame_parms.nb_antennas_rx, channel_model, - BW, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL), 0, 4, 0); if (interf2>-20) - eNB2UE2 = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx, + eNB2UE2 = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx, PHY_vars_UE->lte_frame_parms.nb_antennas_rx, channel_model, - BW, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL), 0, 8, 0); @@ -567,47 +513,47 @@ int main(int argc, char **argv) pbch_pdu[1]=1; pbch_pdu[2]=0; - if (PHY_vars_eNb->lte_frame_parms.frame_type == 0) { - generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + if (PHY_vars_eNB->lte_frame_parms.frame_type == 0) { + generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, 0); - generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 5 : 4, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4, 0); - generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, 10); - generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 5 : 4, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4, 10); } else { - generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, 1); - generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, + &PHY_vars_eNB->lte_frame_parms, 2, 2); - generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, 11); - generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, + &PHY_vars_eNB->lte_frame_parms, 2, 12); @@ -626,11 +572,11 @@ int main(int argc, char **argv) dci_alloc[1].rnti = 0x1234; */ - printf("Generating PBCH for mode1_flag = %d\n", PHY_vars_eNb->lte_frame_parms.mode1_flag); + printf("Generating PBCH for mode1_flag = %d\n", PHY_vars_eNB->lte_frame_parms.mode1_flag); - generate_pilots(PHY_vars_eNb, - PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pilots(PHY_vars_eNB, + PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, LTE_NUMBER_OF_SUBFRAMES_PER_FRAME); @@ -641,8 +587,8 @@ int main(int argc, char **argv) dci_alloc, 0, 1024, - &PHY_vars_eNb->lte_frame_parms, - PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + &PHY_vars_eNB->lte_frame_parms, + PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], 0); */ @@ -657,47 +603,47 @@ int main(int argc, char **argv) dummybuf[1] = dummy1; dummybuf[2] = dummy2; dummybuf[3] = dummy3; - generate_pbch(&PHY_vars_eNb->lte_eNB_pbch, + generate_pbch(&PHY_vars_eNB->lte_eNB_pbch, (mod_sym_t**)dummybuf, AMP, - &PHY_vars_eNb->lte_frame_parms, + &PHY_vars_eNB->lte_frame_parms, pbch_pdu, 0); } - generate_pbch(&PHY_vars_eNb->lte_eNB_pbch, - PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pbch(&PHY_vars_eNB->lte_eNB_pbch, + PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, + &PHY_vars_eNB->lte_frame_parms, pbch_pdu, pbch_phase); /* - generate_pbch(&PHY_vars_eNb->lte_eNB_pbch, - PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pbch(&PHY_vars_eNB->lte_eNB_pbch, + PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, + &PHY_vars_eNB->lte_frame_parms, pbch_pdu, 1); */ if (interf1>-20) { /* - generate_pss(PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0], + generate_pss(PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb1->lte_frame_parms, - (PHY_vars_eNb1->lte_frame_parms.Ncp==0)?6:5, + &PHY_vars_eNB1->lte_frame_parms, + (PHY_vars_eNB1->lte_frame_parms.Ncp==0)?6:5, 0); */ - generate_pilots(PHY_vars_eNb1, - PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0], + generate_pilots(PHY_vars_eNB1, + PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0], AMP, LTE_NUMBER_OF_SUBFRAMES_PER_FRAME); - generate_pbch(&PHY_vars_eNb1->lte_eNB_pbch, - PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0], + generate_pbch(&PHY_vars_eNB1->lte_eNB_pbch, + PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb1->lte_frame_parms, + &PHY_vars_eNB1->lte_frame_parms, pbch_pdu, 0); @@ -705,26 +651,26 @@ int main(int argc, char **argv) if (interf2>-20) { /* - generate_pss(PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0], + generate_pss(PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb2->lte_frame_parms, - (PHY_vars_eNb2->lte_frame_parms.Ncp==0)?6:5, + &PHY_vars_eNB2->lte_frame_parms, + (PHY_vars_eNB2->lte_frame_parms.Ncp==0)?6:5, 0); */ - generate_pilots(PHY_vars_eNb2, - PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0], + generate_pilots(PHY_vars_eNB2, + PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0], AMP, LTE_NUMBER_OF_SUBFRAMES_PER_FRAME); - generate_pbch(&PHY_vars_eNb2->lte_eNB_pbch, - PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0], + generate_pbch(&PHY_vars_eNB2->lte_eNB_pbch, + PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb2->lte_frame_parms, + &PHY_vars_eNB2->lte_frame_parms, pbch_pdu, 0); @@ -733,10 +679,10 @@ int main(int argc, char **argv) // write_output("pilotsF.m","rsF",txdataF[0],lte_frame_parms->ofdm_symbol_size,1,1); - write_output("txsigF0.m","txsF0", PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); + write_output("txsigF0.m","txsF0", PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); - if (PHY_vars_eNb->lte_frame_parms.nb_antennas_tx>1) - write_output("txsigF1.m","txsF1", PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); + if (PHY_vars_eNB->lte_frame_parms.nb_antennas_tx>1) + write_output("txsigF1.m","txsF1", PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); tx_lev = 0; tx_lev1 = 0; @@ -745,16 +691,16 @@ int main(int argc, char **argv) - for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { + for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { if (frame_parms->Ncp == 1) - PHY_ofdm_mod(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][aa], // input, + PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][aa], // input, txdata[aa], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); else { - normal_prefix_mod(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][aa], + normal_prefix_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][aa], txdata[aa], LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, frame_parms); @@ -765,17 +711,17 @@ int main(int argc, char **argv) } if (interf1>-20) { - for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { + for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { if (frame_parms->Ncp == 1) - PHY_ofdm_mod(PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][aa], // input, - PHY_vars_eNb1->lte_eNB_common_vars.txdata[0][aa], // output - frame_parms->log2_symbol_size, // log2_fft_size + PHY_ofdm_mod(PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][aa], // input, + PHY_vars_eNB1->lte_eNB_common_vars.txdata[0][aa], // output + frame_parms->ofdm_symbol_size, 2*nsymb, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); else { - normal_prefix_mod(PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][aa], - PHY_vars_eNb1->lte_eNB_common_vars.txdata[0][aa], + normal_prefix_mod(PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][aa], + PHY_vars_eNB1->lte_eNB_common_vars.txdata[0][aa], 2*nsymb, frame_parms); } @@ -784,24 +730,24 @@ int main(int argc, char **argv) OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES); } - write_output("txsigF0_1.m","txsF0_1", PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); + write_output("txsigF0_1.m","txsF0_1", PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); - if (PHY_vars_eNb1->lte_frame_parms.nb_antennas_tx>1) - write_output("txsigF1_1.m","txsF1_1", PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); + if (PHY_vars_eNB1->lte_frame_parms.nb_antennas_tx>1) + write_output("txsigF1_1.m","txsF1_1", PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); } if (interf2>-20) { - for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { + for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { if (frame_parms->Ncp == 1) - PHY_ofdm_mod(PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0][aa], // input, - PHY_vars_eNb2->lte_eNB_common_vars.txdata[0][aa], // output - frame_parms->log2_symbol_size, // log2_fft_size + PHY_ofdm_mod(PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0][aa], // input, + PHY_vars_eNB2->lte_eNB_common_vars.txdata[0][aa], // output + frame_parms->ofdm_symbol_size, 2*nsymb, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); else { - normal_prefix_mod(PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0][aa], - PHY_vars_eNb2->lte_eNB_common_vars.txdata[0][aa], + normal_prefix_mod(PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0][aa], + PHY_vars_eNB2->lte_eNB_common_vars.txdata[0][aa], 2*nsymb, frame_parms); } @@ -810,10 +756,10 @@ int main(int argc, char **argv) OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES); } - write_output("txsigF0_2.m","txsF0_2", PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); + write_output("txsigF0_2.m","txsF0_2", PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); - if (PHY_vars_eNb2->lte_frame_parms.nb_antennas_tx>1) - write_output("txsigF1_2.m","txsF1_2", PHY_vars_eNb2->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); + if (PHY_vars_eNB2->lte_frame_parms.nb_antennas_tx>1) + write_output("txsigF1_2.m","txsF1_2", PHY_vars_eNB2->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); } // tx_lev_dB = (unsigned int) dB_fixed(tx_lev); @@ -823,15 +769,15 @@ int main(int argc, char **argv) if (frame_parms->nb_antennas_tx>1) write_output("txsig1.m","txs1", txdata[1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1); - write_output("txsig0_1.m","txs0_1", PHY_vars_eNb1->lte_eNB_common_vars.txdata[0][0],FRAME_LENGTH_COMPLEX_SAMPLES,1,1); + write_output("txsig0_1.m","txs0_1", PHY_vars_eNB1->lte_eNB_common_vars.txdata[0][0],FRAME_LENGTH_COMPLEX_SAMPLES,1,1); if (frame_parms->nb_antennas_tx>1) - write_output("txsig1_1.m","txs1_1", PHY_vars_eNb1->lte_eNB_common_vars.txdata[0][1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1); + write_output("txsig1_1.m","txs1_1", PHY_vars_eNB1->lte_eNB_common_vars.txdata[0][1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1); - write_output("txsig0_2.m","txs0_2", PHY_vars_eNb2->lte_eNB_common_vars.txdata[0][0],FRAME_LENGTH_COMPLEX_SAMPLES,1,1); + write_output("txsig0_2.m","txs0_2", PHY_vars_eNB2->lte_eNB_common_vars.txdata[0][0],FRAME_LENGTH_COMPLEX_SAMPLES,1,1); if (frame_parms->nb_antennas_tx>1) - write_output("txsig1_2.m","txs1_2", PHY_vars_eNb2->lte_eNB_common_vars.txdata[0][1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1); + write_output("txsig1_2.m","txs1_2", PHY_vars_eNB2->lte_eNB_common_vars.txdata[0][1],FRAME_LENGTH_COMPLEX_SAMPLES,1,1); } else { //read in from file i=0; @@ -864,7 +810,7 @@ int main(int argc, char **argv) // multipath channel for (i=0; i<2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; i++) { - for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { + for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { s_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]); s_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]); @@ -925,7 +871,7 @@ int main(int argc, char **argv) } } - sigma2_dB = 10*log10((double)tx_lev) +10*log10((double)PHY_vars_eNb->lte_frame_parms.ofdm_symbol_size/(double)(12*NB_RB)) - SNR; + sigma2_dB = 10*log10((double)tx_lev) +10*log10((double)PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size/(double)(12*NB_RB)) - SNR; if (n_frames==1) printf("sigma2_dB %f (SNR %f dB) tx_lev_dB %f,%f,%f\n",sigma2_dB,SNR, @@ -947,7 +893,7 @@ int main(int argc, char **argv) for (n_trials=0; n_trialslte_frame_parms.nb_antennas_rx; aa++) { + for (aa=0; aalte_frame_parms.nb_antennas_rx; aa++) { if (n_trials==0) { r_re[aa][i] += (pow(10.0,.05*interf1)*r_re1[aa][i] + pow(10.0,.05*interf2)*r_re2[aa][i]); r_im[aa][i] += (pow(10.0,.05*interf1)*r_im1[aa][i] + pow(10.0,.05*interf2)*r_im2[aa][i]); @@ -983,14 +929,14 @@ int main(int argc, char **argv) */ - for (l=0; llte_frame_parms.symbols_per_tti; l++) { + for (l=0; llte_frame_parms.symbols_per_tti; l++) { - // subframe_offset = (l/PHY_vars_eNb->lte_frame_parms.symbols_per_tti)*PHY_vars_eNb->lte_frame_parms.samples_per_tti; + // subframe_offset = (l/PHY_vars_eNB->lte_frame_parms.symbols_per_tti)*PHY_vars_eNB->lte_frame_parms.samples_per_tti; // printf("subframe_offset = %d\n",subframe_offset); slot_fep(PHY_vars_UE, - l%(PHY_vars_eNb->lte_frame_parms.symbols_per_tti/2), - l/(PHY_vars_eNb->lte_frame_parms.symbols_per_tti/2), + l%(PHY_vars_eNB->lte_frame_parms.symbols_per_tti/2), + l/(PHY_vars_eNB->lte_frame_parms.symbols_per_tti/2), 0, 0, 0); @@ -1026,7 +972,7 @@ int main(int argc, char **argv) */ } - if (l==((PHY_vars_eNb->lte_frame_parms.Ncp==0)?4:3)) { + if (l==((PHY_vars_eNB->lte_frame_parms.Ncp==0)?4:3)) { //sprintf(fname,"dl_ch00_%d.m",l); //sprintf(vname,"dl_ch00_%d",l); //write_output(fname,vname,&(lte_ue_common_vars->dl_ch_estimates[0][lte_frame_parms->ofdm_symbol_size*(l%6)]),lte_frame_parms->ofdm_symbol_size,1,1); @@ -1038,7 +984,7 @@ int main(int argc, char **argv) 1); } - if (l==((PHY_vars_eNb->lte_frame_parms.Ncp==0)?10:9)) { + if (l==((PHY_vars_eNB->lte_frame_parms.Ncp==0)?10:9)) { for (frame_mod4=0; frame_mod4<4; frame_mod4++) { pbch_tx_ant = rx_pbch(&PHY_vars_UE->lte_ue_common_vars, @@ -1059,7 +1005,7 @@ int main(int argc, char **argv) pbch_tx_ant = rx_pbch(&PHY_vars_UE->lte_ue_common_vars, PHY_vars_UE->lte_ue_pbch_vars[0], - &PHY_vars_eNb->lte_frame_parms, + &PHY_vars_eNB->lte_frame_parms, 0, ALAMOUTI, PHY_vars_UE->high_speed_flag, @@ -1119,10 +1065,10 @@ int main(int argc, char **argv) if (n_frames==1) { - write_output("H00.m","h00",&(PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[0][0][0]),((frame_parms->Ncp==0)?7:6)*(PHY_vars_eNb->lte_frame_parms.ofdm_symbol_size),1,1); + write_output("H00.m","h00",&(PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[0][0][0]),((frame_parms->Ncp==0)?7:6)*(PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size),1,1); if (n_tx==2) - write_output("H10.m","h10",&(PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[0][2][0]),((frame_parms->Ncp==0)?7:6)*(PHY_vars_eNb->lte_frame_parms.ofdm_symbol_size),1,1); + write_output("H10.m","h10",&(PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[0][2][0]),((frame_parms->Ncp==0)?7:6)*(PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size),1,1); write_output("rxsig0.m","rxs0", PHY_vars_UE->lte_ue_common_vars.rxdata[0],FRAME_LENGTH_COMPLEX_SAMPLES,1,1); write_output("rxsigF0.m","rxsF0", PHY_vars_UE->lte_ue_common_vars.rxdataF[0],NUMBER_OF_OFDM_CARRIERS*2*((frame_parms->Ncp==0)?14:12),2,1); diff --git a/openair1/SIMULATION/LTE_PHY/pdcchsim.c b/openair1/SIMULATION/LTE_PHY/pdcchsim.c index caa7e1248d..3c717d2625 100644 --- a/openair1/SIMULATION/LTE_PHY/pdcchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pdcchsim.c @@ -56,107 +56,15 @@ PHY_VARS_UE *PHY_vars_UE; #define UL_RB_ALLOC 0x1ff; #define CCCH_RB_ALLOC computeRIV(PHY_vars_eNB->lte_frame_parms.N_RB_UL,0,2) -#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13 - -void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t tdd_config,uint8_t N_RB_DL, - lte_frame_type_t frame_type,uint8_t osf,uint32_t perfect_ce) -{ - - unsigned int i; - LTE_DL_FRAME_PARMS *lte_frame_parms; - - printf("Start lte_param_init (Nid_cell %d, extended_prefix %d, transmission_mode %d, N_tx %d, N_rx %d)\n", - Nid_cell, extended_prefix_flag,transmission_mode,N_tx,N_rx); - PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB)); - PHY_vars_eNB1 = malloc(sizeof(PHY_VARS_eNB)); - PHY_vars_eNB2 = malloc(sizeof(PHY_VARS_eNB)); - - PHY_vars_UE = malloc(sizeof(PHY_VARS_UE)); - //PHY_config = malloc(sizeof(PHY_CONFIG)); - mac_xface = malloc(sizeof(MAC_xface)); - - randominit(0); - set_taus_seed(0); - - lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms); - - lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz - lte_frame_parms->N_RB_UL = N_RB_DL; - lte_frame_parms->Ncp = extended_prefix_flag; - lte_frame_parms->Nid_cell = Nid_cell; - lte_frame_parms->nushift = Nid_cell%6; - lte_frame_parms->nb_antennas_tx_eNB = N_tx; - lte_frame_parms->nb_antennas_tx = N_tx; - lte_frame_parms->nb_antennas_rx = N_rx; - lte_frame_parms->phich_config_common.phich_resource = one; //half - lte_frame_parms->tdd_config = tdd_config; - lte_frame_parms->frame_type = frame_type; - - // lte_frame_parms->Csrs = 2; - // lte_frame_parms->Bsrs = 0; - // lte_frame_parms->kTC = 0; - // lte_frame_parms->n_RRC = 0; - lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0; - - init_frame_parms(lte_frame_parms,osf); - - //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing)); - - - memcpy(&PHY_vars_UE->lte_frame_parms,lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS)); - - - phy_init_lte_top(lte_frame_parms); - - phy_init_lte_ue(PHY_vars_UE,1,0); - - phy_init_lte_eNB(PHY_vars_eNB,0,0,0); - - memcpy((void*)&PHY_vars_eNB1->lte_frame_parms,(void*)&PHY_vars_eNB->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS)); - PHY_vars_eNB1->lte_frame_parms.nushift=(Nid_cell+1)%6; - PHY_vars_eNB1->lte_frame_parms.Nid_cell=Nid_cell+1; - - memcpy((void*)&PHY_vars_eNB2->lte_frame_parms,(void*)&PHY_vars_eNB->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS)); - PHY_vars_eNB2->lte_frame_parms.nushift=(Nid_cell+2)%6; - PHY_vars_eNB2->lte_frame_parms.Nid_cell=Nid_cell+2; - - phy_init_lte_eNB(PHY_vars_eNB1,0,0,0); - - phy_init_lte_eNB(PHY_vars_eNB2,0,0,0); - - phy_init_lte_top(lte_frame_parms); - - PHY_vars_UE->PHY_measurements.n_adj_cells=2; - PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1; - PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2; - PHY_vars_UE->perfect_ce = perfect_ce; - - for (i=0; i<3; i++) - lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i); - - generate_pcfich_reg_mapping(&PHY_vars_UE->lte_frame_parms); - generate_phich_reg_mapping(&PHY_vars_UE->lte_frame_parms); - - printf("Done lte_param_init\n"); - - CCCH_alloc_pdu.type = 1; - CCCH_alloc_pdu.vrb_type = 0; - CCCH_alloc_pdu.rballoc = CCCH_RB_ALLOC; - CCCH_alloc_pdu.ndi = 1; - CCCH_alloc_pdu.mcs = 1; - CCCH_alloc_pdu.harq_pid = 0; - -} - - +#define DLSCH_RB_ALLOC ((uint16_t)0x1fbf) // igore DC component,RB13 DCI_PDU DCI_pdu; DCI_PDU *get_dci(LTE_DL_FRAME_PARMS *lte_frame_parms,uint8_t log2L, uint8_t log2Lcommon, uint8_t format_selector, uint32_t rnti) { - uint8_t BCCH_alloc_pdu[8]; - uint8_t DLSCH_alloc_pdu[8]; - uint8_t UL_alloc_pdu[8]; + uint32_t BCCH_alloc_pdu[2]; + uint32_t DLSCH_alloc_pdu[2]; + uint32_t UL_alloc_pdu[2]; int i; int dci_length_bytes,dci_length; @@ -462,31 +370,35 @@ DCI_PDU *get_dci(LTE_DL_FRAME_PARMS *lte_frame_parms,uint8_t log2L, uint8_t log2 DCI_pdu.dci_alloc[0].ra_flag = 0; memcpy((void*)&DCI_pdu.dci_alloc[0].dci_pdu[0], &BCCH_alloc_pdu[0], BCCH_pdu_size_bytes); DCI_pdu.Num_common_dci++; - /* + if (lte_frame_parms->N_RB_DL >= 25) { // add ue specific dci - DCI_pdu.dci_alloc[1].dci_length = dci_length; - DCI_pdu.dci_alloc[1].L = log2L; - DCI_pdu.dci_alloc[1].rnti = rnti; - DCI_pdu.dci_alloc[1].format = format1; - DCI_pdu.dci_alloc[1].ra_flag = 0; - memcpy((void*)&DCI_pdu.dci_alloc[1].dci_pdu[0], &DLSCH_alloc_pdu[0], dci_length_bytes); - DCI_pdu.Num_ue_spec_dci++; + DCI_pdu.dci_alloc[1].dci_length = dci_length; + DCI_pdu.dci_alloc[1].L = log2L; + DCI_pdu.dci_alloc[1].rnti = rnti; + DCI_pdu.dci_alloc[1].format = format1; + DCI_pdu.dci_alloc[1].ra_flag = 0; + memcpy((void*)&DCI_pdu.dci_alloc[1].dci_pdu[0], &DLSCH_alloc_pdu[0], dci_length_bytes); + DCI_pdu.Num_ue_spec_dci++; + + if (lte_frame_parms->N_RB_DL >= 50) { + DCI_pdu.dci_alloc[2].dci_length = UL_pdu_size_bits; + DCI_pdu.dci_alloc[2].L = log2L; + DCI_pdu.dci_alloc[2].rnti = rnti; + DCI_pdu.dci_alloc[2].format = format0; + DCI_pdu.dci_alloc[2].ra_flag = 0; + memcpy((void*)&DCI_pdu.dci_alloc[0].dci_pdu[0], &UL_alloc_pdu[0], UL_pdu_size_bytes); + DCI_pdu.Num_ue_spec_dci++; + } + } + - DCI_pdu.dci_alloc[0].dci_length = UL_pdu_size_bits; - DCI_pdu.dci_alloc[0].L = log2L; - DCI_pdu.dci_alloc[0].rnti = rnti; - DCI_pdu.dci_alloc[0].format = format0; - DCI_pdu.dci_alloc[0].ra_flag = 0; - memcpy((void*)&DCI_pdu.dci_alloc[0].dci_pdu[0], &UL_alloc_pdu[0], UL_pdu_size_bytes); - DCI_pdu.Num_ue_spec_dci++; - */ DCI_pdu.nCCE = 0; for (i=0; ilte_frame_parms.Ncp,PHY_vars_eNB->lte_frame_parms.samples_per_tti,nsymb); - switch (N_RB_DL) { - case 6: - BW = 1.25; - break; - - case 25: - BW = 5.00; - break; - - case 50: - BW = 10.00; - break; - - case 100: - BW = 20.00; - break; - } - eNB2UE = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx_eNB, PHY_vars_UE->lte_frame_parms.nb_antennas_rx, channel_model, - BW, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL), 0, 0, 0); @@ -894,7 +787,7 @@ int main(int argc, char **argv) i=0; while (!feof(input_fd)) { - fscanf(input_fd,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2); + ret=fscanf(input_fd,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2); if ((i%4)==0) { ((short*)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL)); @@ -921,7 +814,7 @@ int main(int argc, char **argv) PHY_vars_UE->UE_mode[0] = PUSCH; - nCCE_max = get_nCCE(3,&PHY_vars_eNB->lte_frame_parms,get_mi(&PHY_vars_eNB->lte_frame_parms,0)); + // nCCE_max = get_nCCE(3,&PHY_vars_eNB->lte_frame_parms,get_mi(&PHY_vars_eNB->lte_frame_parms,0)); //printf("nCCE_max %d\n",nCCE_max); //printf("num_phich interferers %d\n",num_phich_interf); @@ -973,55 +866,62 @@ int main(int argc, char **argv) numCCE=0; n_trials_common++; common_active = 1; - n_trials_ul++; - ul_active = 1; - n_trials_dl++; - dl_active = 1; + if (PHY_vars_eNB->lte_frame_parms.N_RB_DL >= 50) { + n_trials_ul++; + ul_active = 1; + } + if (PHY_vars_eNB->lte_frame_parms.N_RB_DL >= 25) { + n_trials_dl++; + dl_active = 1; + } - init_nCCE_table(); num_pdcch_symbols = get_num_pdcch_symbols(DCI_pdu.Num_common_dci+DCI_pdu.Num_ue_spec_dci, DCI_pdu.dci_alloc, frame_parms, subframe); - DCI_pdu.nCCE = get_nCCE(num_pdcch_symbols,&PHY_vars_eNB->lte_frame_parms,get_mi(&PHY_vars_eNB->lte_frame_parms,subframe)); + numCCE = get_nCCE(num_pdcch_symbols,&PHY_vars_eNB->lte_frame_parms,get_mi(&PHY_vars_eNB->lte_frame_parms,subframe)); if (n_frames==1) { printf("num_dci %d, num_pddch_symbols %d, nCCE %d\n", DCI_pdu.Num_common_dci+DCI_pdu.Num_ue_spec_dci, - num_pdcch_symbols, - DCI_pdu.nCCE); + num_pdcch_symbols,numCCE); } // apply RNTI-based nCCE allocation + memset(CCE_table,0,800*sizeof(int)); + for (i = 0; i < DCI_pdu.Num_common_dci + DCI_pdu.Num_ue_spec_dci; i++) { // SI RNTI if (DCI_pdu.dci_alloc[i].rnti == SI_RNTI) { - DCI_pdu.dci_alloc[i].nCCE = get_nCCE_offset(1<0) { PHY_vars_eNB->ulsch_eNB[0]->harq_processes[harq_pid]->first_rb = 4; @@ -1082,7 +982,7 @@ int main(int argc, char **argv) } PHY_vars_eNB->ulsch_eNB[0]->harq_processes[harq_pid]->first_rb = 0; - */ + } // write_output("pilotsF.m","rsF",txdataF[0],lte_PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size,1,1); @@ -1102,7 +1002,7 @@ int main(int argc, char **argv) if (PHY_vars_eNB->lte_frame_parms.Ncp == 1) PHY_ofdm_mod(&PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa][subframe*nsymb*PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size], // input, &txdata[aa][subframe*PHY_vars_eNB->lte_frame_parms.samples_per_tti], // output - PHY_vars_eNB->lte_frame_parms.log2_symbol_size, // log2_fft_size + PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size, 2*nsymb, // number of symbols PHY_vars_eNB->lte_frame_parms.nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); @@ -1262,7 +1162,7 @@ int main(int argc, char **argv) for (i = 0; i < dci_cnt; i++) printf("dci %d: rnti 0x%x, format %d, L %d, nCCE %d/%d dci_length %d\n",i, dci_alloc_rx[i].rnti, dci_alloc_rx[i].format, - dci_alloc_rx[i].L, dci_alloc_rx[i].nCCE, numCCE, dci_alloc_rx[i].dci_length); + dci_alloc_rx[i].L, dci_alloc_rx[i].firstCCE, numCCE, dci_alloc_rx[i].dci_length); } for (i=0; ilte_frame_parms); - - lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz - lte_frame_parms->N_RB_UL = N_RB_DL; - lte_frame_parms->Ncp = extended_prefix_flag; - lte_frame_parms->Nid_cell = Nid_cell; - lte_frame_parms->nushift = 0; - lte_frame_parms->nb_antennas_tx = N_tx; - lte_frame_parms->nb_antennas_rx = N_rx; - // lte_frame_parms->Csrs = 2; - // lte_frame_parms->Bsrs = 0; - // lte_frame_parms->kTC = 0; - // lte_frame_parms->n_RRC = 0; - lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0; - lte_frame_parms->tdd_config = 1; - lte_frame_parms->frame_type = 1; - init_frame_parms(lte_frame_parms,osf); - - //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing)); - - - PHY_vars_UE->lte_frame_parms = *lte_frame_parms; - - phy_init_lte_top(lte_frame_parms); - - phy_init_lte_ue(PHY_vars_UE,1,0); - - phy_init_lte_eNB(PHY_vars_eNB,0,0,0); - - - - - - printf("Done lte_param_init\n"); - -} - extern uint16_t prach_root_sequence_map0_3[838]; int main(int argc, char **argv) @@ -372,7 +318,16 @@ int main(int argc, char **argv) if (transmission_mode==2) n_tx=2; - lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,Nid_cell,N_RB_DL,osf); + lte_param_init(n_tx, + n_rx, + transmission_mode, + extended_prefix_flag, + FDD, + Nid_cell, + 3, + N_RB_DL, + osf, + 0); if (snr1set==0) { @@ -412,7 +367,8 @@ int main(int argc, char **argv) UE2eNB = new_channel_desc_scm(PHY_vars_UE->lte_frame_parms.nb_antennas_tx, PHY_vars_eNB->lte_frame_parms.nb_antennas_rx, channel_model, - BW, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_UL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_UL), 0.0, delay, 0); diff --git a/openair1/SIMULATION/LTE_PHY/pucchsim.c b/openair1/SIMULATION/LTE_PHY/pucchsim.c index 919bec144d..42de78ac74 100644 --- a/openair1/SIMULATION/LTE_PHY/pucchsim.c +++ b/openair1/SIMULATION/LTE_PHY/pucchsim.c @@ -49,8 +49,6 @@ #include "OCG_vars.h" #include "UTIL/LOG/log_extern.h" -#define BW 5.0 - int current_dlsch_cqi; //FIXME! PHY_VARS_eNB *PHY_vars_eNB; @@ -60,60 +58,6 @@ PHY_VARS_UE *PHY_vars_UE; -void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,uint16_t Nid_cell,uint8_t N_RB_DL,uint8_t osf) -{ - - LTE_DL_FRAME_PARMS *lte_frame_parms; - - printf("Start lte_param_init\n"); - PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB)); - - PHY_vars_UE = malloc(sizeof(PHY_VARS_UE)); - //PHY_config = malloc(sizeof(PHY_CONFIG)); - mac_xface = malloc(sizeof(MAC_xface)); - - randominit(0); - set_taus_seed(0); - - lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms); - - lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz - lte_frame_parms->N_RB_UL = N_RB_DL; - lte_frame_parms->Ncp = extended_prefix_flag; - lte_frame_parms->Nid_cell = Nid_cell; - lte_frame_parms->nushift = 0; - lte_frame_parms->nb_antennas_tx = N_tx; - lte_frame_parms->nb_antennas_rx = N_rx; - // lte_frame_parms->Csrs = 2; - // lte_frame_parms->Bsrs = 0; - // lte_frame_parms->kTC = 0; - // lte_frame_parms->n_RRC = 0; - lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0; - lte_frame_parms->tdd_config = 3; - lte_frame_parms->frame_type = 0; - init_frame_parms(lte_frame_parms,osf); - - //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing)); - -// phy_init_top(lte_frame_parms); //allocation - - PHY_vars_UE->lte_frame_parms = *lte_frame_parms; - - - phy_init_lte_ue(PHY_vars_UE,1,0); - - phy_init_lte_eNB(PHY_vars_eNB,0,0,0); - - phy_init_lte_top(lte_frame_parms); - - - - - printf("Done lte_param_init\n"); - -} - - int main(int argc, char **argv) { @@ -248,7 +192,7 @@ int main(int argc, char **argv) break; default: - msg("Unsupported channel model!\n"); + printf("Unsupported channel model!\n"); exit(-1); } @@ -260,13 +204,13 @@ int main(int argc, char **argv) case 's': snr0 = atof(optarg); - msg("Setting SNR0 to %f\n",snr0); + printf("Setting SNR0 to %f\n",snr0); break; case 'S': snr1 = atof(optarg); snr1set=1; - msg("Setting SNR1 to %f\n",snr1); + printf("Setting SNR1 to %f\n",snr1); break; case 'p': @@ -289,7 +233,7 @@ int main(int argc, char **argv) if ((transmission_mode!=1) && (transmission_mode!=2) && (transmission_mode!=6)) { - msg("Unsupported transmission mode %d\n",transmission_mode); + printf("Unsupported transmission mode %d\n",transmission_mode); exit(-1); } @@ -299,7 +243,7 @@ int main(int argc, char **argv) n_tx=atoi(optarg); if ((n_tx==0) || (n_tx>2)) { - msg("Unsupported number of tx antennas %d\n",n_tx); + printf("Unsupported number of tx antennas %d\n",n_tx); exit(-1); } @@ -309,7 +253,7 @@ int main(int argc, char **argv) n_rx=atoi(optarg); if ((n_rx==0) || (n_rx>2)) { - msg("Unsupported number of rx antennas %d\n",n_rx); + printf("Unsupported number of rx antennas %d\n",n_rx); exit(-1); } @@ -370,7 +314,16 @@ int main(int argc, char **argv) if (transmission_mode==2) n_tx=2; - lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,Nid_cell,N_RB_DL,osf); + lte_param_init(n_tx, + n_rx, + transmission_mode, + extended_prefix_flag, + Nid_cell, + FDD, + 3, + N_RB_DL, + osf, + 0); if (snr1set==0) { @@ -414,18 +367,19 @@ int main(int argc, char **argv) - msg("[SIM] Using SCM/101\n"); + printf("[SIM] Using SCM/101\n"); UE2eNB = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx, PHY_vars_UE->lte_frame_parms.nb_antennas_rx, channel_model, - BW, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_UL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_UL), 0.0, 0, 0); if (UE2eNB==NULL) { - msg("Problem generating channel model. Exiting.\n"); + printf("Problem generating channel model. Exiting.\n"); exit(-1); } @@ -453,7 +407,7 @@ int main(int argc, char **argv) PHY_vars_UE->lte_frame_parms.pucch_config_common.nRB_CQI = 0; PHY_vars_UE->lte_frame_parms.pucch_config_common.nCS_AN = 0; - pucch_payload = 1; + pucch_payload = 0; generate_pucch(PHY_vars_UE->lte_ue_common_vars.txdataF, frame_parms, @@ -474,7 +428,7 @@ int main(int argc, char **argv) if (frame_parms->Ncp == 1) PHY_ofdm_mod(txdataF2[aa], // input txdata[aa], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, 2*nsymb, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); @@ -497,7 +451,7 @@ int main(int argc, char **argv) if (frame_parms->Ncp == 1) PHY_ofdm_mod(&PHY_vars_UE->lte_ue_common_vars.txdataF[aa][2*subframe*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX], // input, &txdata[aa][PHY_vars_eNB->lte_frame_parms.samples_per_tti*subframe], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, nsymb, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); @@ -596,9 +550,7 @@ int main(int argc, char **argv) } } - lte_eNB_I0_measurements(PHY_vars_eNB, - 0, - 1); + for (i=0; i<2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; i++) { for (aa=0; aalte_frame_parms.nb_antennas_rx; aa++) { @@ -646,6 +598,10 @@ int main(int argc, char **argv) // if (sig == 1) // printf("*"); + lte_eNB_I0_measurements(PHY_vars_eNB, + subframe, + 0, + 1); PHY_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dB = N0;//(int8_t)(sigma2_dB-10*log10(PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size/(12*NB_RB))); stat = rx_pucch(PHY_vars_eNB, pucch_format, diff --git a/openair1/SIMULATION/LTE_PHY/scansim.c b/openair1/SIMULATION/LTE_PHY/scansim.c index c2ceb1c58d..2cbb7b3e32 100644 --- a/openair1/SIMULATION/LTE_PHY/scansim.c +++ b/openair1/SIMULATION/LTE_PHY/scansim.c @@ -56,94 +56,11 @@ #define BW 20.0 -PHY_VARS_eNB *PHY_vars_eNb,*PHY_vars_eNb1,*PHY_vars_eNb2; +PHY_VARS_eNB *PHY_vars_eNB,*PHY_vars_eNB1,*PHY_vars_eNB2; PHY_VARS_UE *PHY_vars_UE; #define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13 -void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,unsigned char extended_prefix_flag,unsigned char frame_type, uint16_t Nid_cell,uint8_t N_RB_DL,uint8_t osf) -{ - - // unsigned int ind; - LTE_DL_FRAME_PARMS *lte_frame_parms; - int i; - - printf("Start lte_param_init\n"); - PHY_vars_eNb = malloc(sizeof(PHY_VARS_eNB)); - PHY_vars_eNb1 = malloc(sizeof(PHY_VARS_eNB)); - PHY_vars_eNb2 = malloc(sizeof(PHY_VARS_eNB)); - - PHY_vars_UE = malloc(sizeof(PHY_VARS_UE)); - //PHY_config = malloc(sizeof(PHY_CONFIG)); - mac_xface = malloc(sizeof(MAC_xface)); - - randominit(0); - set_taus_seed(0); - - lte_frame_parms = &(PHY_vars_eNb->lte_frame_parms); - - lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz - lte_frame_parms->N_RB_UL = N_RB_DL; - lte_frame_parms->Ncp = extended_prefix_flag; - lte_frame_parms->Nid_cell = Nid_cell; - lte_frame_parms->nushift = Nid_cell%6; - lte_frame_parms->nb_antennas_tx = N_tx; - lte_frame_parms->nb_antennas_tx_eNB = N_tx; - lte_frame_parms->nb_antennas_rx = N_rx; - // lte_frame_parms->Csrs = 2; - // lte_frame_parms->Bsrs = 0; - // lte_frame_parms->kTC = 0; - // lte_frame_parms->n_RRC = 0; - lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0; - lte_frame_parms->tdd_config = 3; - lte_frame_parms->frame_type = frame_type; - init_frame_parms(lte_frame_parms,osf); - - //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing)); - - - PHY_vars_UE->lte_frame_parms = *lte_frame_parms; - - phy_init_lte_top(lte_frame_parms); - - PHY_vars_UE->PHY_measurements.n_adj_cells=2; - PHY_vars_UE->PHY_measurements.adj_cell_id[0] = Nid_cell+1; - PHY_vars_UE->PHY_measurements.adj_cell_id[1] = Nid_cell+2; - - for (i=0; i<3; i++) - lte_gold(lte_frame_parms,PHY_vars_UE->lte_gold_table[i],Nid_cell+i); - - phy_init_lte_ue(PHY_vars_UE,1,0); - - phy_init_lte_eNB(PHY_vars_eNb,0,0,0); - - for (i=0; i<10; i++) { - PHY_vars_UE->scan_info[0].amp[0][i] = 0; - PHY_vars_UE->scan_info[0].amp[1][i] = 0; - PHY_vars_UE->scan_info[0].amp[2][i] = 0; - } - - memcpy((void*)&PHY_vars_eNb1->lte_frame_parms,(void*)&PHY_vars_eNb->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS)); - PHY_vars_eNb1->lte_frame_parms.Nid_cell=Nid_cell+1; - PHY_vars_eNb1->lte_frame_parms.nushift=(Nid_cell+1)%6; - PHY_vars_eNb1->Mod_id=1; - - memcpy((void*)&PHY_vars_eNb2->lte_frame_parms,(void*)&PHY_vars_eNb->lte_frame_parms,sizeof(LTE_DL_FRAME_PARMS)); - PHY_vars_eNb2->lte_frame_parms.Nid_cell=Nid_cell+2; - PHY_vars_eNb2->lte_frame_parms.nushift=(Nid_cell+2)%6; - PHY_vars_eNb2->Mod_id=2; - - phy_init_lte_eNB(PHY_vars_eNb1,0,0,0); - - phy_init_lte_eNB(PHY_vars_eNb2,0,0,0); - - phy_init_lte_top(lte_frame_parms); - - printf("Done lte_param_init\n"); - - -} - mod_sym_t *dummybuf[4]; mod_sym_t dummy0[2048*14]; mod_sym_t dummy1[2048*14]; @@ -404,7 +321,16 @@ int main(int argc, char **argv) if (transmission_mode>=2) n_tx=2; - lte_param_init(n_tx,n_rx,transmission_mode,extended_prefix_flag,frame_type,Nid_cell,N_RB_DL,osf); + lte_param_init(n_tx, + n_rx, + transmission_mode, + extended_prefix_flag, + frame_type, + Nid_cell, + 3, + N_RB_DL, + osf, + 0); #ifdef XFORMS fl_initialize (&argc, argv, NULL, 0, 0); @@ -422,13 +348,13 @@ int main(int argc, char **argv) printf("SNR0 %f, SNR1 %f\n",snr0,snr1); - frame_parms = &PHY_vars_eNb->lte_frame_parms; + frame_parms = &PHY_vars_eNB->lte_frame_parms; - txdata = PHY_vars_eNb->lte_eNB_common_vars.txdata[0]; - txdata1 = PHY_vars_eNb1->lte_eNB_common_vars.txdata[0]; - txdata2 = PHY_vars_eNb2->lte_eNB_common_vars.txdata[0]; + txdata = PHY_vars_eNB->lte_eNB_common_vars.txdata[0]; + txdata1 = PHY_vars_eNB1->lte_eNB_common_vars.txdata[0]; + txdata2 = PHY_vars_eNB2->lte_eNB_common_vars.txdata[0]; s_re = malloc(2*sizeof(double*)); @@ -449,8 +375,8 @@ int main(int argc, char **argv) printf("FFT Size %d, Extended Prefix %d, Samples per subframe %d, Symbols per subframe %d\n",NUMBER_OF_OFDM_CARRIERS, frame_parms->Ncp,frame_parms->samples_per_tti,nsymb); - printf("PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][0] = %p\n", - PHY_vars_eNb1->lte_eNB_common_vars.txdataF[0][0]); + printf("PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][0] = %p\n", + PHY_vars_eNB1->lte_eNB_common_vars.txdataF[0][0]); DLSCH_alloc_pdu2.rah = 0; @@ -465,13 +391,14 @@ int main(int argc, char **argv) // Forget second codeword DLSCH_alloc_pdu2.tpmi = (transmission_mode==6 ? 5 : 0) ; // precoding - eNB2UE = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx, - PHY_vars_UE->lte_frame_parms.nb_antennas_rx, - channel_model, - BW, - 0, - 0, - 0); + eNB2UE = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx, + PHY_vars_UE->lte_frame_parms.nb_antennas_rx, + channel_model, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL), + 0, + 0, + 0); if (eNB2UE==NULL) { @@ -512,51 +439,51 @@ int main(int argc, char **argv) pbch_pdu[1]=1; pbch_pdu[2]=0; - if (PHY_vars_eNb->lte_frame_parms.frame_type == FDD) { - generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + if (PHY_vars_eNB->lte_frame_parms.frame_type == FDD) { + generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==NORMAL) ? 6 : 5, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==NORMAL) ? 6 : 5, 0); /* - generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 5 : 4, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4, 0);*/ - generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, 10); /* - generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 5 : 4, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 5 : 4, 10); */ } else { - generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, 1); - generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, + &PHY_vars_eNB->lte_frame_parms, 2, 2); - generate_sss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_sss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, - (PHY_vars_eNb->lte_frame_parms.Ncp==0) ? 6 : 5, + &PHY_vars_eNB->lte_frame_parms, + (PHY_vars_eNB->lte_frame_parms.Ncp==0) ? 6 : 5, 11); - generate_pss(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pss(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, + &PHY_vars_eNB->lte_frame_parms, 2, 12); @@ -565,8 +492,8 @@ int main(int argc, char **argv) /* - generate_pilots(PHY_vars_eNb, - PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pilots(PHY_vars_eNB, + PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, LTE_NUMBER_OF_SUBFRAMES_PER_FRAME); @@ -577,8 +504,8 @@ int main(int argc, char **argv) dci_alloc, 0, 1024, - &PHY_vars_eNb->lte_frame_parms, - PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + &PHY_vars_eNB->lte_frame_parms, + PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], 0); */ @@ -593,25 +520,25 @@ int main(int argc, char **argv) dummybuf[1] = dummy1; dummybuf[2] = dummy2; dummybuf[3] = dummy3; - generate_pbch(&PHY_vars_eNb->lte_eNB_pbch, + generate_pbch(&PHY_vars_eNB->lte_eNB_pbch, (mod_sym_t**)dummybuf, AMP, - &PHY_vars_eNb->lte_frame_parms, + &PHY_vars_eNB->lte_frame_parms, pbch_pdu, 0); } - generate_pbch(&PHY_vars_eNb->lte_eNB_pbch, - PHY_vars_eNb->lte_eNB_common_vars.txdataF[0], + generate_pbch(&PHY_vars_eNB->lte_eNB_pbch, + PHY_vars_eNB->lte_eNB_common_vars.txdataF[0], AMP, - &PHY_vars_eNb->lte_frame_parms, + &PHY_vars_eNB->lte_frame_parms, pbch_pdu, pbch_phase); */ - write_output("txsigF0.m","txsF0", PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); + write_output("txsigF0.m","txsF0", PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][0],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); - if (PHY_vars_eNb->lte_frame_parms.nb_antennas_tx>1) - write_output("txsigF1.m","txsF1", PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); + if (PHY_vars_eNB->lte_frame_parms.nb_antennas_tx>1) + write_output("txsigF1.m","txsF1", PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][1],FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX,1,1); tx_lev = 0; tx_lev1 = 0; @@ -620,16 +547,16 @@ int main(int argc, char **argv) - for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { + for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { if (frame_parms->Ncp == 1) - PHY_ofdm_mod(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][aa], // input, + PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][aa], // input, txdata[aa], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); else { - normal_prefix_mod(PHY_vars_eNb->lte_eNB_common_vars.txdataF[0][aa], + normal_prefix_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[0][aa], txdata[aa], LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, frame_parms); @@ -648,7 +575,7 @@ int main(int argc, char **argv) // multipath channel for (i=0; i<2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES; i++) { - for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { + for (aa=0; aalte_frame_parms.nb_antennas_tx; aa++) { s_re[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)]); s_im[aa][i] = ((double)(((short *)txdata[aa]))[(i<<1)+1]); } @@ -667,7 +594,7 @@ int main(int argc, char **argv) multipath_channel(eNB2UE,s_re,s_im,r_re,r_im, 2*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES,0); - sigma2_dB = 10*log10((double)tx_lev) +10*log10((double)PHY_vars_eNb->lte_frame_parms.ofdm_symbol_size/(double)(12*NB_RB)) - SNR; + sigma2_dB = 10*log10((double)tx_lev) +10*log10((double)PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size/(double)(12*NB_RB)) - SNR; if (n_frames==1) printf("sigma2_dB %f (SNR %f dB) tx_lev_dB %f,%f,%f\n",sigma2_dB,SNR, @@ -689,7 +616,7 @@ int main(int argc, char **argv) for (n_trials=0; n_trialslte_frame_parms.nb_antennas_rx; aa++) { + for (aa=0; aalte_frame_parms.nb_antennas_rx; aa++) { ((short*) PHY_vars_UE->lte_ue_common_vars.rxdata[aa])[2*i] = (short) ((r_re[aa][i] +sqrt(sigma2/2)*gaussdouble(0.0,1.0))); ((short*) PHY_vars_UE->lte_ue_common_vars.rxdata[aa])[2*i+1] = (short) ((r_im[aa][i] + (iqim*r_re[aa][i]) + sqrt(sigma2/2)*gaussdouble(0.0,1.0))); } diff --git a/openair1/SIMULATION/LTE_PHY/syncsim.c b/openair1/SIMULATION/LTE_PHY/syncsim.c index a5f046da93..45b69adcc5 100644 --- a/openair1/SIMULATION/LTE_PHY/syncsim.c +++ b/openair1/SIMULATION/LTE_PHY/syncsim.c @@ -1189,7 +1189,7 @@ int main(int argc, char **argv) if (frame_parms->Ncp == 1) PHY_ofdm_mod(txdataF2[aa], // input txdata[aa], // output - PHY_vars_eNB->lte_frame_parms.log2_symbol_size, // log2_fft_size + PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size, // log2_fft_size LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols PHY_vars_eNB->lte_frame_parms.nb_prefix_samples, // number of prefix samples PHY_vars_eNB->lte_frame_parms.twiddle_ifft, // IFFT twiddle factors @@ -1218,7 +1218,7 @@ int main(int argc, char **argv) if (frame_parms->Ncp == 1) PHY_ofdm_mod(PHY_vars_eNB->lte_eNB_common_vars.txdataF[eNb_id][aa], // input, txdata[aa], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, // log2_fft_size LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->twiddle_ifft, // IFFT twiddle factors @@ -1240,7 +1240,7 @@ int main(int argc, char **argv) if (frame_parms->Ncp == 1) PHY_ofdm_mod(PHY_vars_eNB1->lte_eNB_common_vars.txdataF[eNb_id][aa], // input, PHY_vars_eNB1->lte_eNB_common_vars.txdata[eNb_id][aa], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, // log2_fft_size LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->twiddle_ifft, // IFFT twiddle factors @@ -1260,7 +1260,7 @@ int main(int argc, char **argv) if (frame_parms->Ncp == 1) PHY_ofdm_mod(PHY_vars_eNB2->lte_eNB_common_vars.txdataF[eNb_id][aa], // input, PHY_vars_eNB2->lte_eNB_common_vars.txdata[eNb_id][aa], // output - frame_parms->log2_symbol_size, // log2_fft_size + frame_parms->ofdm_symbol_size, // log2_fft_size LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*nsymb, // number of symbols frame_parms->nb_prefix_samples, // number of prefix samples frame_parms->twiddle_ifft, // IFFT twiddle factors diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 134e6b2885..a72f2ad6c5 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -58,23 +58,11 @@ extern unsigned short dftsizes[33]; extern short *ul_ref_sigs[30][2][33]; -//#define AWGN -//#define NO_DCI -#define BW 7.68 -//#define ABSTRACTION -//#define PERFECT_CE - -/* - #define RBmask0 0x00fc00fc - #define RBmask1 0x0 - #define RBmask2 0x0 - #define RBmask3 0x0 -*/ PHY_VARS_eNB *PHY_vars_eNB; PHY_VARS_UE *PHY_vars_UE; -#define MCS_COUNT 23//added for PHY abstraction +//#define MCS_COUNT 23//added for PHY abstraction channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX]; channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX]; @@ -101,65 +89,6 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for tx */ int n_tx_dropped = 0; /*!< \brief initial max process time for tx */ int n_rx_dropped = 0; /*!< \brief initial max process time for rx */ -void lte_param_init(unsigned char N_tx, unsigned char N_rx,unsigned char transmission_mode,uint8_t extended_prefix_flag,uint8_t N_RB_DL,uint8_t frame_type,uint8_t tdd_config,uint8_t osf) -{ - - LTE_DL_FRAME_PARMS *lte_frame_parms; - - printf("Start lte_param_init\n"); - PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB)); - PHY_vars_UE = malloc(sizeof(PHY_VARS_UE)); - //PHY_config = malloc(sizeof(PHY_CONFIG)); - mac_xface = malloc(sizeof(MAC_xface)); - - randominit(0); - set_taus_seed(0); - - lte_frame_parms = &(PHY_vars_eNB->lte_frame_parms); - - lte_frame_parms->frame_type = frame_type; - lte_frame_parms->tdd_config = tdd_config; - lte_frame_parms->N_RB_DL = N_RB_DL; //50 for 10MHz and 25 for 5 MHz - lte_frame_parms->N_RB_UL = N_RB_DL; - lte_frame_parms->Ncp = extended_prefix_flag; - lte_frame_parms->Ncp_UL = extended_prefix_flag; - lte_frame_parms->Nid_cell = 10; - lte_frame_parms->nushift = 0; - lte_frame_parms->nb_antennas_tx = N_tx; - lte_frame_parms->nb_antennas_rx = N_rx; - // lte_frame_parms->Csrs = 2; - // lte_frame_parms->Bsrs = 0; - // lte_frame_parms->kTC = 0; - // lte_frame_parms->n_RRC = 0; - lte_frame_parms->mode1_flag = (transmission_mode == 1)? 1 : 0; - lte_frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 0;//n_DMRS1 set to 0 - - init_frame_parms(lte_frame_parms,osf); - - //copy_lte_parms_to_phy_framing(lte_frame_parms, &(PHY_config->PHY_framing)); - - - PHY_vars_UE->lte_frame_parms = *lte_frame_parms; - - phy_init_lte_top(lte_frame_parms); - - phy_init_lte_ue(PHY_vars_UE,1,0); - - phy_init_lte_eNB(PHY_vars_eNB,0,0,0); - - printf("Done lte_param_init\n"); - - -} - - - - -#define UL_RB_ALLOC 0x1ff; - - - - int main(int argc, char **argv) { @@ -168,12 +97,10 @@ int main(int argc, char **argv) int aarx,aatx; double channelx,channely; - double sigma2, sigma2_dB=10,SNR,SNR2,snr0=-2.0,snr1,SNRmeas,rate,saving_bler; + double sigma2, sigma2_dB=10,SNR,SNR2,snr0=-2.0,snr1,SNRmeas,rate,saving_bler=0; double input_snr_step=.2,snr_int=30; double blerr; - //int **txdataF, **txdata; - int **txdata; LTE_DL_FRAME_PARMS *frame_parms; @@ -199,7 +126,7 @@ int main(int argc, char **argv) unsigned int coded_bits_per_codeword,nsymb; int subframe=3; unsigned int tx_lev=0,tx_lev_dB,trials,errs[4]= {0,0,0,0},round_trials[4]= {0,0,0,0}; - uint8_t transmission_mode=1,n_rx=1,n_tx=1; + uint8_t transmission_mode=1,n_rx=1; FILE *bler_fd=NULL; char bler_fname[512]; @@ -414,10 +341,6 @@ int main(int argc, char **argv) exit(-1); } - if (transmission_mode>1) { - n_tx = 1; - } - break; case 'y': @@ -539,7 +462,16 @@ int main(int argc, char **argv) } } - lte_param_init(1,n_rx,1,extended_prefix_flag,N_RB_DL,frame_type,tdd_config,osf); + lte_param_init(1, + n_rx, + 1, + extended_prefix_flag, + frame_type, + 0, + tdd_config, + N_RB_DL, + osf, + 0); if (nb_rb_set == 0) nb_rb = PHY_vars_eNB->lte_frame_parms.N_RB_UL; @@ -583,6 +515,10 @@ int main(int argc, char **argv) sprintf(bler_fname,"ULbler_mcs%d_nrb%d_ChannelModel%d_nsim%d.csv",mcs,nb_rb,chMod,n_frames); bler_fd = fopen(bler_fname,"w"); + if (bler_fd==NULL) { + fprintf(stderr,"Problem creating file %s\n",bler_fname); + exit(-1); + } fprintf(bler_fd,"#SNR;mcs;nb_rb;TBS;rate;errors[0];trials[0];errors[1];trials[1];errors[2];trials[2];errors[3];trials[3]\n"); @@ -591,13 +527,16 @@ int main(int argc, char **argv) hostname[1023] = '\0'; gethostname(hostname, 1023); printf("Hostname: %s\n", hostname); - char dirname[FILENAME_MAX]; - sprintf(dirname, "%s//SIMU/USER/pre-ci-logs-%s", getenv("OPENAIR_TARGETS"),hostname); - mkdir(dirname, 0777); - sprintf(time_meas_fname,"%s/time_meas_prb%d_mcs%d_antrx%d_channel%s_tx%d.csv", - dirname, + //char dirname[FILENAME_MAX]; + //sprintf(dirname, "%s//SIMU/USER/pre-ci-logs-%s", getenv("OPENAIR_TARGETS"),hostname); + //mkdir(dirname, 0777); + sprintf(time_meas_fname,"time_meas_prb%d_mcs%d_antrx%d_channel%s_tx%d.csv", N_RB_DL,mcs,n_rx,channel_model_input,transmission_mode); time_meas_fd = fopen(time_meas_fname,"w"); + if (time_meas_fd==NULL) { + fprintf(stderr,"Cannot create file %s!\n",time_meas_fname); + exit(-1); + } } /* @@ -688,7 +627,8 @@ int main(int argc, char **argv) UE2eNB = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx, PHY_vars_UE->lte_frame_parms.nb_antennas_rx, channel_model, - BW, + N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_UL), + N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_UL), forgetting_factor, delay, 0); @@ -701,8 +641,8 @@ int main(int argc, char **argv) // Create transport channel structures for 2 transport blocks (MIMO) for (i=0; i<2; i++) { - PHY_vars_eNB->dlsch_eNB[0][i] = new_eNB_dlsch(1,8,N_RB_DL,0); - PHY_vars_UE->dlsch_ue[0][i] = new_ue_dlsch(1,8,MAX_TURBO_ITERATIONS,N_RB_DL,0); + PHY_vars_eNB->dlsch_eNB[0][i] = new_eNB_dlsch(1,8,1827072,N_RB_DL,0); + PHY_vars_UE->dlsch_ue[0][i] = new_ue_dlsch(1,8,1827072,MAX_TURBO_ITERATIONS,N_RB_DL,0); if (!PHY_vars_eNB->dlsch_eNB[0][i]) { printf("Can't get eNB dlsch structures\n"); @@ -717,7 +657,7 @@ int main(int argc, char **argv) PHY_vars_eNB->dlsch_eNB[0][i]->rnti = 14; PHY_vars_UE->dlsch_ue[0][i]->rnti = 14; - } + } switch (PHY_vars_eNB->lte_frame_parms.N_RB_UL) { @@ -905,11 +845,11 @@ int main(int argc, char **argv) harq_pid = subframe2harq_pid(&PHY_vars_UE->lte_frame_parms,PHY_vars_UE->frame_tx,subframe); - + input_buffer_length = PHY_vars_UE->ulsch_ue[0]->harq_processes[harq_pid]->TBS/8; + input_buffer = (unsigned char *)malloc(input_buffer_length+4); // printf("UL frame %d/subframe %d, harq_pid %d\n",PHY_vars_UE->frame,subframe,harq_pid); if (input_fdUL == NULL) { - input_buffer_length = PHY_vars_UE->ulsch_ue[0]->harq_processes[harq_pid]->TBS/8; - input_buffer = (unsigned char *)malloc(input_buffer_length+4); + if (n_frames == 1) { trch_out_fdUL= fopen("ulsch_trchUL.txt","w"); @@ -931,7 +871,7 @@ int main(int argc, char **argv) i=0; while (!feof(input_fdUL)) { - fscanf(input_fdUL,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2); + ret=fscanf(input_fdUL,"%s %s",input_val_str,input_val_str2);//&input_val1,&input_val2); if ((i%4)==0) { ((short*)txdata[0])[i/2] = (short)((1<<15)*strtod(input_val_str,NULL)); @@ -1120,7 +1060,7 @@ int main(int argc, char **argv) if (frame_parms->Ncp == 1) PHY_ofdm_mod(&PHY_vars_UE->lte_ue_common_vars.txdataF[aa][subframe*nsymb*OFDM_SYMBOL_SIZE_COMPLEX_SAMPLES_NO_PREFIX], // input &txdata[aa][PHY_vars_eNB->lte_frame_parms.samples_per_tti*subframe], // output - PHY_vars_UE->lte_frame_parms.log2_symbol_size, // log2_fft_size + PHY_vars_UE->lte_frame_parms.ofdm_symbol_size, nsymb, // number of symbols PHY_vars_UE->lte_frame_parms.nb_prefix_samples, // number of prefix samples CYCLIC_PREFIX); @@ -1261,6 +1201,7 @@ int main(int argc, char **argv) start_meas(&PHY_vars_eNB->phy_proc_rx); start_meas(&PHY_vars_eNB->ofdm_demod_stats); lte_eNB_I0_measurements(PHY_vars_eNB, + subframe, 0, 1); diff --git a/openair1/SIMULATION/TOOLS/abstraction.c b/openair1/SIMULATION/TOOLS/abstraction.c index d63d0b0fe9..591b238acf 100644 --- a/openair1/SIMULATION/TOOLS/abstraction.c +++ b/openair1/SIMULATION/TOOLS/abstraction.c @@ -45,7 +45,7 @@ double **cos_lut=NULL,**sin_lut=NULL; -void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) +int init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) { @@ -54,15 +54,17 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) int16_t f; uint8_t l; + if ((n_samples&1)==0) { + fprintf(stderr, "freq_channel_init: n_samples has to be odd\n"); + return(-1); + } cos_lut = (double **)malloc(n_samples*sizeof(double*)); sin_lut = (double **)malloc(n_samples*sizeof(double*)); - - delta_f = nb_rb*180000/(n_samples-1); - for (f=-(n_samples>>1); f<(n_samples>>1); f++) { + for (f=-(n_samples>>1); f<=(n_samples>>1); f++) { freq=delta_f*(double)f*1e-6;// due to the fact that delays is in mus cos_lut[f+(n_samples>>1)] = (double *)malloc((int)desc->nb_taps*sizeof(double)); @@ -73,7 +75,7 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) if (desc->nb_taps==1) delay = desc->delays[l]; else - delay = desc->delays[l]+NB_SAMPLES_CHANNEL_OFFSET/desc->BW; + delay = desc->delays[l]+NB_SAMPLES_CHANNEL_OFFSET/desc->sampling_rate; cos_lut[f+(n_samples>>1)][l] = cos(2*M_PI*freq*delay); sin_lut[f+(n_samples>>1)][l] = sin(2*M_PI*freq*delay); @@ -81,9 +83,11 @@ void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) } } + + return(0); } -void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) +int freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) { @@ -93,22 +97,32 @@ void freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) static int freq_channel_init=0; static int n_samples_max=0; - // printf("no of samples:%d,",n_samples); + // do some error checking + // n_samples has to be a odd number because we assume the spectrum is symmetric around the DC and includes the DC + if ((n_samples&1)==0) { + fprintf(stderr, "freq_channel: n_samples has to be odd\n"); + return(-1); + } + // printf("no of taps:%d,",(int)desc->nb_taps); if (freq_channel_init == 0) { // we are initializing the lut for the largets possible n_samples=12*nb_rb+1 // if called with n_samples<12*nb_rb+1, we decimate the lut n_samples_max=12*nb_rb+1; - init_freq_channel(desc,nb_rb,n_samples_max); - freq_channel_init=1; + if (init_freq_channel(desc,nb_rb,n_samples_max)==0) + freq_channel_init=1; + else + return(-1); } - d=n_samples_max/n_samples; + d=(n_samples_max-1)/(n_samples-1); + + //printf("no_samples=%d, n_samples_max=%d, d=%d\n",n_samples,n_samples_max,d); start_meas(&desc->interp_freq); - for (f=-n_samples_max/2,f2=-n_samples/2; finterp_freq); + + return(0); } double compute_pbch_sinr(channel_desc_t *desc, diff --git a/openair1/SIMULATION/TOOLS/defs.h b/openair1/SIMULATION/TOOLS/defs.h index 187ffcb241..c72ea743b1 100644 --- a/openair1/SIMULATION/TOOLS/defs.h +++ b/openair1/SIMULATION/TOOLS/defs.h @@ -69,7 +69,9 @@ typedef struct { ///Maximum path delay in mus. double Td; ///Channel bandwidth in MHz. - double BW; + double channel_bandwidth; + ///System sampling rate in Msps. + double sampling_rate; ///Ricean factor of first tap wrt other taps (0..1, where 0 means AWGN and 1 means Rayleigh channel). double ricean_factor; ///Angle of arrival of wavefront (in radians). For Ricean channel only. This assumes that both RX and TX have linear antenna arrays with lambda/2 antenna spacing. Furhter it is assumed that the arrays are parallel to each other and that they are far enough apart so that we can safely assume plane wave propagation. @@ -202,7 +204,8 @@ typedef enum { channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, uint8_t nb_rx, SCM_t channel_model, - double BW, + double sampling_rate, + double channel_bandwidth, double forgetting_factor, int32_t channel_offset, double path_loss_dB); @@ -351,8 +354,8 @@ int gauss(unsigned int *gauss_LUT,unsigned char Nbits); double gaussdouble(double,double); void randominit(unsigned int seed_init); double uniformrandom(void); -void freq_channel(channel_desc_t *desc,uint16_t nb_rb, int16_t n_samples); -void init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples); +int freq_channel(channel_desc_t *desc,uint16_t nb_rb, int16_t n_samples); +int init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples); uint8_t multipath_channel_nosigconv(channel_desc_t *desc); void multipath_tv_channel(channel_desc_t *desc, double **tx_sig_re, @@ -364,6 +367,10 @@ void multipath_tv_channel(channel_desc_t *desc, /**@} */ /**@} */ + +double N_RB2sampling_rate(uint16_t N_RB); +double N_RB2channel_bandwidth(uint16_t N_RB); + #endif diff --git a/openair1/SIMULATION/TOOLS/multipath_tv_channel.c b/openair1/SIMULATION/TOOLS/multipath_tv_channel.c index b1bd091ca7..3568545f29 100644 --- a/openair1/SIMULATION/TOOLS/multipath_tv_channel.c +++ b/openair1/SIMULATION/TOOLS/multipath_tv_channel.c @@ -175,13 +175,13 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint16_t length) { for(p=0;pnb_paths;p++) { - H[i][j] += sqrt(desc->amps[j]/2)*alpha[p]*cexp(-I*(2*pi*w_Hz[p]*i*(1/(desc->BW*1e6))+phi_rad[p])); + H[i][j] += sqrt(desc->amps[j]/2)*alpha[p]*cexp(-I*(2*pi*w_Hz[p]*i*(1/(desc->sampling_rate*1e6))+phi_rad[p])); } } } for(j=0;jnb_paths;j++) { - phi_rad[j] = fmod(2*pi*w_Hz[j]*(length-1)*(1/desc->BW)+phi_rad[j],2*pi); + phi_rad[j] = fmod(2*pi*w_Hz[j]*(length-1)*(1/desc->sampling_rate)+phi_rad[j],2*pi); } */ @@ -193,13 +193,13 @@ void tv_channel(channel_desc_t *desc,double complex ***H,uint16_t length) H[i+(j*desc->nb_rx)][k][l] = 0; for(p=0; pnb_paths; p++) { - H[i+(j*desc->nb_rx)][k][l] += sqrt(desc->amps[l]/2)*alpha[p]*cexp(I*(2*pi*w_Hz[p]*k*(1/(desc->BW*1e6))+phi_rad[p])); + H[i+(j*desc->nb_rx)][k][l] += sqrt(desc->amps[l]/2)*alpha[p]*cexp(I*(2*pi*w_Hz[p]*k*(1/(desc->sampling_rate*1e6))+phi_rad[p])); } } } for(j=0; jnb_paths; j++) { - phi_rad[j] = fmod(2*pi*w_Hz[j]*(length-1)*(1/desc->BW)+phi_rad[j],2*pi); + phi_rad[j] = fmod(2*pi*w_Hz[j]*(length-1)*(1/desc->sampling_rate)+phi_rad[j],2*pi); } } } diff --git a/openair1/SIMULATION/TOOLS/random_channel.c b/openair1/SIMULATION/TOOLS/random_channel.c index 9233d94132..417ff29162 100644 --- a/openair1/SIMULATION/TOOLS/random_channel.c +++ b/openair1/SIMULATION/TOOLS/random_channel.c @@ -48,7 +48,8 @@ void fill_channel_desc(channel_desc_t *chan_desc, double *delays, struct complex** R_sqrt, double Td, - double BW, + double sampling_rate, + double channel_bandwidth, double ricean_factor, double aoa, double forgetting_factor, @@ -81,7 +82,8 @@ void fill_channel_desc(channel_desc_t *chan_desc, chan_desc->delays = delays; chan_desc->Td = Td; - chan_desc->BW = BW; + chan_desc->sampling_rate = sampling_rate; + chan_desc->channel_bandwidth = channel_bandwidth; chan_desc->ricean_factor = ricean_factor; chan_desc->aoa = aoa; chan_desc->random_aoa = random_aoa; @@ -195,7 +197,8 @@ struct complex **R_sqrt_ptr2; channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, uint8_t nb_rx, SCM_t channel_model, - double BW, + double sampling_rate, + double channel_bandwidth, double forgetting_factor, int32_t channel_offset, double path_loss_dB) @@ -209,7 +212,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, chan_desc->nb_tx = nb_tx; chan_desc->nb_rx = nb_rx; - chan_desc->BW = BW; + chan_desc->sampling_rate = sampling_rate; + chan_desc->channel_bandwidth = channel_bandwidth; chan_desc->forgetting_factor = forgetting_factor; chan_desc->channel_offset = channel_offset; chan_desc->path_loss_dB = path_loss_dB; @@ -232,7 +236,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, case SCM_C: chan_desc->nb_taps = 18; chan_desc->Td = 4.625; - chan_desc->channel_length = (int) (2*chan_desc->BW*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->BW*chan_desc->Td)); + chan_desc->channel_length = (int) (2*chan_desc->sampling_rate*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->sampling_rate*chan_desc->Td)); sum_amps = 0; chan_desc->amps = (double*) malloc(chan_desc->nb_taps*sizeof(double)); @@ -291,7 +295,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, LOG_W(OCM,"This is not the real SCM-D model! It is just SCM-C with an additional Rice factor!\n"); chan_desc->nb_taps = 18; chan_desc->Td = 4.625; - chan_desc->channel_length = (int) (2*chan_desc->BW*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->BW*chan_desc->Td)); + chan_desc->channel_length = (int) (2*chan_desc->sampling_rate*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->sampling_rate*chan_desc->Td)); sum_amps = 0; chan_desc->amps = (double*) malloc(chan_desc->nb_taps*sizeof(double)); @@ -349,7 +353,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, case EPA: chan_desc->nb_taps = 7; chan_desc->Td = .410; - chan_desc->channel_length = (int) (2*chan_desc->BW*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->BW*chan_desc->Td)); + chan_desc->channel_length = (int) (2*chan_desc->sampling_rate*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->sampling_rate*chan_desc->Td)); sum_amps = 0; chan_desc->amps = (double*) malloc(chan_desc->nb_taps*sizeof(double)); @@ -403,7 +407,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, case EVA: chan_desc->nb_taps = 9; chan_desc->Td = 2.51; - chan_desc->channel_length = (int) (2*chan_desc->BW*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->BW*chan_desc->Td)); + chan_desc->channel_length = (int) (2*chan_desc->sampling_rate*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->sampling_rate*chan_desc->Td)); sum_amps = 0; chan_desc->amps = (double*) malloc(chan_desc->nb_taps*sizeof(double)); @@ -457,7 +461,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, case ETU: chan_desc->nb_taps = 9; chan_desc->Td = 5.0; - chan_desc->channel_length = (int) (2*chan_desc->BW*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->BW*chan_desc->Td)); + chan_desc->channel_length = (int) (2*chan_desc->sampling_rate*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->sampling_rate*chan_desc->Td)); sum_amps = 0; chan_desc->amps = (double*) malloc(chan_desc->nb_taps*sizeof(double)); @@ -511,7 +515,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, case MBSFN: chan_desc->nb_taps = 18; chan_desc->Td = 28.58; - chan_desc->channel_length = (int) (2*chan_desc->BW*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->BW*chan_desc->Td)); + chan_desc->channel_length = (int) (2*chan_desc->sampling_rate*chan_desc->Td + 1 + 2/(M_PI*M_PI)*log(4*M_PI*chan_desc->sampling_rate*chan_desc->Td)); sum_amps = 0; chan_desc->amps = (double*) malloc(chan_desc->nb_taps*sizeof(double)); @@ -558,7 +562,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, case Rayleigh8: nb_taps = 8; Td = 0.8; - channel_length = (int)11+2*BW*Td; + channel_length = (int)11+2*sampling_rate*Td; ricean_factor = 1; aoa = .03; maxDoppler = 0; @@ -572,7 +576,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, NULL, Td, - BW, + sampling_rate, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -585,7 +590,7 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, case Rice8: nb_taps = 8; Td = 0.8; - channel_length = (int)11+2*BW*Td; + channel_length = (int)11+2*sampling_rate*Td; ricean_factor = 0.1; aoa = .03; maxDoppler = 0; @@ -598,7 +603,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, NULL, Td, - BW, + sampling_rate, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -624,7 +630,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, NULL, Td, - BW, + sampling_rate, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -650,7 +657,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, NULL, Td, - BW, + sampling_rate, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -683,7 +691,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, R_sqrt_ptr2, Td, - BW, + sampling_rate, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -716,7 +725,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, R_sqrt_ptr2, Td, - BW, + sampling_rate, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -742,7 +752,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, NULL, Td, - BW, + sampling_rate, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -768,7 +779,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, NULL, Td, - BW, + sampling_rate, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -803,7 +815,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, R_sqrt_ptr2, Td, - BW, + sampling_rate, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -836,7 +849,8 @@ channel_desc_t *new_channel_desc_scm(uint8_t nb_tx, NULL, R_sqrt_ptr2, Td, - BW, + sampling_rate, + channel_bandwidth, ricean_factor, aoa, forgetting_factor, @@ -985,11 +999,11 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag) desc->ch[aarx+(aatx*desc->nb_rx)][k].y = 0.0; for (l=0; lnb_taps; l++) { - if ((k - (desc->delays[l]*desc->BW) - NB_SAMPLES_CHANNEL_OFFSET) == 0) + if ((k - (desc->delays[l]*desc->sampling_rate) - NB_SAMPLES_CHANNEL_OFFSET) == 0) s = 1.0; else - s = sin(M_PI*(k - (desc->delays[l]*desc->BW) - NB_SAMPLES_CHANNEL_OFFSET))/ - (M_PI*(k - (desc->delays[l]*desc->BW) - NB_SAMPLES_CHANNEL_OFFSET)); + s = sin(M_PI*(k - (desc->delays[l]*desc->sampling_rate) - NB_SAMPLES_CHANNEL_OFFSET))/ + (M_PI*(k - (desc->delays[l]*desc->sampling_rate) - NB_SAMPLES_CHANNEL_OFFSET)); desc->ch[aarx+(aatx*desc->nb_rx)][k].x += s*desc->a[l][aarx+(aatx*desc->nb_rx)].x; desc->ch[aarx+(aatx*desc->nb_rx)][k].y += s*desc->a[l][aarx+(aatx*desc->nb_rx)].y; @@ -1014,22 +1028,77 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag) return (0); } +double N_RB2sampling_rate(uint16_t N_RB) +{ + double sampling_rate; + switch (N_RB) { + case 6: + sampling_rate = 1.92; + break; + + case 25: + sampling_rate = 7.68; + break; + + case 50: + sampling_rate = 15.36; + break; + + case 100: + sampling_rate = 30.72; + break; + + default: + LOG_E(PHY,"Unknown N_PRB\n"); + return(-1); + } + + return(sampling_rate); +} + +double N_RB2channel_bandwidth(uint16_t N_RB) +{ + double channel_bandwidth; + switch (N_RB) { + case 6: + channel_bandwidth = 1.25; + break; + + case 25: + channel_bandwidth = 5.00; + break; + + case 50: + channel_bandwidth = 10.00; + break; + + case 100: + channel_bandwidth = 20.00; + break; + + default: + LOG_E(PHY,"Unknown N_PRB\n"); + return(-1); + } + return(channel_bandwidth); +} + #ifdef RANDOM_CHANNEL_MAIN -#define BW 5.0 +#define sampling_rate 5.0 #define Td 2.0 main(int argc,char **argv) { double amps[8] = {.8,.2,.1,.04,.02,.01,.005}; - struct complex ch[(int)(1+2*BW*Td)],phase; + struct complex ch[(int)(1+2*sampling_rate*Td)],phase; int i; randominit(); phase.x = 1.0; phase.y = 0; - random_channel(amps,Td, 8,BW,ch,(double)1.0,&phase); + random_channel(amps,Td, 8,sampling_rate,ch,(double)1.0,&phase); /* - for (i=0;i<(11+2*BW*Td);i++){ + for (i=0;i<(11+2*sampling_rate*Td);i++){ printf("%f + sqrt(-1)*%f\n",ch[i].x,ch[i].y); } */ diff --git a/openair2/COMMON/platform_types.h b/openair2/COMMON/platform_types.h index a1af19fd0a..6f7722316f 100755 --- a/openair2/COMMON/platform_types.h +++ b/openair2/COMMON/platform_types.h @@ -163,7 +163,13 @@ typedef uint32_t mbms_session_id_t; typedef uint16_t mbms_service_id_t; typedef uint16_t rnti_t; typedef uint8_t rrc_enb_index_t; +typedef uint8_t mme_code_t; +typedef uint32_t m_tmsi_t; +//Random UE identity length = 40 bits +#if ! defined(NOT_A_RANDOM_UE_IDENTITY) +#define NOT_A_RANDOM_UE_IDENTITY (uint64_t)0xFFFFFFFF +#endif #if ! defined(NOT_A_RNTI) #define NOT_A_RNTI (rnti_t)0 #endif diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h index a0a43b6d79..cd2d593726 100644 --- a/openair2/LAYER2/MAC/defs.h +++ b/openair2/LAYER2/MAC/defs.h @@ -251,7 +251,8 @@ typedef struct { typedef struct { uint8_t Num_ue_spec_dci ; uint8_t Num_common_dci ; - unsigned int nCCE; + uint32_t nCCE; + uint32_t num_pdcch_symbols; DCI_ALLOC_t dci_alloc[NUM_DCI_MAX] ; } DCI_PDU; /*! \brief CCCH payload */ @@ -735,7 +736,8 @@ typedef struct { uint8_t dl_pow_off[MAX_NUM_CCs]; uint16_t pre_nb_available_rbs[MAX_NUM_CCs]; unsigned char rballoc_sub_UE[MAX_NUM_CCs][N_RBG_MAX]; - + uint16_t ta_timer; + int16_t ta_update; } UE_sched_ctrl; /*! \brief eNB template for the Random access information */ typedef struct { @@ -765,8 +767,6 @@ typedef struct { uint8_t Msg3_subframe; /// Flag to indicate the eNB should generate Msg4 upon reception of SDU from RRC. This is triggered by first ULSCH reception at eNB for new user. uint8_t generate_Msg4; - /// Flag to indicate the eNB should generate the DCI for Msg4, after getting the SDU from RRC. - uint8_t generate_Msg4_dci; /// Flag to indicate that eNB is waiting for ACK that UE has received Msg3. uint8_t wait_ack_Msg4; /// UE RNTI allocated during RAR @@ -835,8 +835,8 @@ typedef struct { /// Outgoing CCCH pdu for PHY CCCH_PDU CCCH_pdu; RA_TEMPLATE RA_template[NB_RA_PROC_MAX]; - /// BCCH active flag - uint8_t bcch_active; + /// VRB map for common channels + uint8_t vrb_map[100]; /// MBSFN SubframeConfig struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[8]; /// number of subframe allocation pattern available for MBSFN sync area @@ -883,9 +883,11 @@ typedef struct { /// Common cell resources COMMON_channels_t common_channels[MAX_NUM_CCs]; UE_list_t UE_list; + ///subband bitmap configuration SBMAP_CONF sbmap_conf; - + /// CCE table used to build DCI scheduling information + int CCE_table[MAX_NUM_CCs][800]; /// active flag for Other lcid // uint8_t lcid_active[NB_RB_MAX]; /// eNB stats diff --git a/openair2/LAYER2/MAC/eNB_scheduler.c b/openair2/LAYER2/MAC/eNB_scheduler.c index 329c40be05..21e9337dbb 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler.c +++ b/openair2/LAYER2/MAC/eNB_scheduler.c @@ -77,13 +77,13 @@ + + + void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, frame_t frameP, sub_frame_t subframeP) //, int calibration_flag) { { - unsigned int nprb[MAX_NUM_CCs]; - unsigned int nCCE[MAX_NUM_CCs]; int mbsfn_status[MAX_NUM_CCs]; - uint32_t RBalloc[MAX_NUM_CCs]; protocol_ctxt_t ctxt; #ifdef EXMIMO int ret; @@ -106,10 +106,11 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, for (CC_id=0; CC_idnCCE=0; + DCI_pdu[CC_id]->num_pdcch_symbols=1; mbsfn_status[CC_id]=0; + // clear vrb_map + memset(eNB_mac_inst[module_idP].common_channels[CC_id].vrb_map,0,100); } // refresh UE list based on UEs dropped by PHY in previous subframe @@ -186,7 +187,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, for (CC_id=0; CC_idNum_common_dci = 0; DCI_pdu[CC_id]->Num_ue_spec_dci = 0; - eNB_mac_inst[module_idP].common_channels[CC_id].bcch_active = 0; + #ifdef Rel10 eNB_mac_inst[module_idP].common_channels[CC_id].mcch_active =0; @@ -194,6 +195,8 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, eNB_mac_inst[module_idP].frame = frameP; eNB_mac_inst[module_idP].subframe = subframeP; + + } //if (subframeP%5 == 0) @@ -238,19 +241,20 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, // Schedule ULSCH for FDD or subframeP 4 (TDD config 0,3,6) // Schedule Normal DLSCH - schedule_RA(module_idP,frameP,subframeP,2,nprb,nCCE); + + schedule_RA(module_idP,frameP,subframeP,2); + if (mac_xface->lte_frame_parms->frame_type == FDD) { //FDD - schedule_ulsch(module_idP,frameP,cooperation_flag,0,4,nCCE);//,calibration_flag); + schedule_ulsch(module_idP,frameP,cooperation_flag,0,4);//,calibration_flag); } else if ((mac_xface->lte_frame_parms->tdd_config == TDD) || //TDD (mac_xface->lte_frame_parms->tdd_config == 3) || (mac_xface->lte_frame_parms->tdd_config == 6)) { - //schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,4,nCCE);//,calibration_flag); + //schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,4);//,calibration_flag); } - // schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,1,mbsfn_status); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; @@ -262,22 +266,22 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, switch (mac_xface->lte_frame_parms->tdd_config) { case 0: case 1: - schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,7,nCCE); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,7); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; case 6: - schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,8,nCCE); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,8); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; default: break; } } else { //FDD - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); - schedule_ulsch(module_idP,frameP,cooperation_flag,1,5,nCCE); + schedule_ulsch(module_idP,frameP,cooperation_flag,1,5); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); } break; @@ -287,9 +291,9 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, // TDD, nothing // FDD, normal UL/DLSCH if (mac_xface->lte_frame_parms->frame_type == FDD) { //FDD - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); - schedule_ulsch(module_idP,frameP,cooperation_flag,2,6,nCCE); + schedule_ulsch(module_idP,frameP,cooperation_flag,2,6); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); } break; @@ -302,22 +306,22 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, if (mac_xface->lte_frame_parms->frame_type == TDD) { switch (mac_xface->lte_frame_parms->tdd_config) { case 2: - schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,7,nCCE); + schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,7); // no break here! case 5: - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; default: break; } } else { //FDD - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); - schedule_ulsch(module_idP,frameP,cooperation_flag,3,7,nCCE); + schedule_ulsch(module_idP,frameP,cooperation_flag,3,7); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); } break; @@ -330,8 +334,8 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, if (mac_xface->lte_frame_parms->frame_type == 1) { // TDD switch (mac_xface->lte_frame_parms->tdd_config) { case 1: - // schedule_RA(module_idP,frameP,subframeP,nprb,nCCE); - schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,8,nCCE); + // schedule_RA(module_idP,frameP,subframeP); + schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,8); // no break here! case 2: @@ -341,8 +345,9 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, // no break here! case 5: - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,1,mbsfn_status); + + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; default: @@ -350,11 +355,11 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, } } else { if (mac_xface->lte_frame_parms->frame_type == FDD) { //FDD - // schedule_RA(module_idP,frameP, subframeP, 0, nprb, nCCE); - // schedule_ulsch(module_idP, frameP, cooperation_flag, 4, 8, nCCE); - schedule_ue_spec(module_idP, frameP, subframeP, nprb, nCCE, mbsfn_status); - fill_DLSCH_dci(module_idP, frameP, subframeP, RBalloc, 1, mbsfn_status); + // schedule_RA(module_idP,frameP, subframeP, 0); + schedule_ulsch(module_idP, frameP, cooperation_flag, 4, 8); + schedule_ue_spec(module_idP, frameP, subframeP, mbsfn_status); + fill_DLSCH_dci(module_idP, frameP, subframeP, mbsfn_status); } } @@ -365,21 +370,21 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, // TDD Config 0,6 ULSCH for subframes 9,3 resp. // TDD normal DLSCH // FDD normal UL/DLSCH - schedule_SI(module_idP,frameP,nprb,nCCE); + schedule_SI(module_idP,frameP,subframeP); - //schedule_RA(module_idP,frameP,subframeP,5,nprb,nCCE); + //schedule_RA(module_idP,frameP,subframeP,5); if (mac_xface->lte_frame_parms->frame_type == FDD) { - schedule_RA(module_idP,frameP,subframeP,1,nprb,nCCE); - // schedule_ulsch(module_idP,frameP,cooperation_flag,5,9,nCCE); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,1,mbsfn_status); - + schedule_RA(module_idP,frameP,subframeP,1); + schedule_ulsch(module_idP,frameP,cooperation_flag,5,9); + schedule_ue_spec(module_idP, frameP, subframeP, mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); } else if ((mac_xface->lte_frame_parms->tdd_config == 0) || // TDD Config 0 (mac_xface->lte_frame_parms->tdd_config == 6)) { // TDD Config 6 - //schedule_ulsch(module_idP,cooperation_flag,subframeP,nCCE); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + //schedule_ulsch(module_idP,cooperation_flag,subframeP); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); } else { - //schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); } break; @@ -395,36 +400,36 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, break; case 1: - schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,2,nCCE); - // schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,2); + // schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; case 6: - schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3,nCCE); - // schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3); + // schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; case 5: - schedule_RA(module_idP,frameP,subframeP,2,nprb,nCCE); - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,1,mbsfn_status); + schedule_RA(module_idP,frameP,subframeP,2); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; case 3: case 4: - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; default: break; } } else { //FDD - // schedule_ulsch(module_idP,frameP,cooperation_flag,6,0,nCCE); - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + // schedule_ulsch(module_idP,frameP,cooperation_flag,6,0); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); } break; @@ -437,23 +442,23 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, switch (mac_xface->lte_frame_parms->tdd_config) { case 3: case 4: - schedule_RA(module_idP,frameP,subframeP,3,nprb,nCCE); // 3 = Msg3 subframeP, not - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,1,mbsfn_status); + schedule_RA(module_idP,frameP,subframeP,3); // 3 = Msg3 subframeP, not + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; case 5: - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; default: break; } } else { //FDD - //schedule_ulsch(module_idP,frameP,cooperation_flag,7,1,nCCE); - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + //schedule_ulsch(module_idP,frameP,cooperation_flag,7,1); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); } break; @@ -470,19 +475,19 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, case 4: case 5: - // schedule_RA(module_idP,subframeP,nprb,nCCE); - schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,2,nCCE); - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + // schedule_RA(module_idP,subframeP); + schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,2); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; default: break; } } else { //FDD - //schedule_ulsch(module_idP,frameP,cooperation_flag,8,2,nCCE); - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + //schedule_ulsch(module_idP,frameP,cooperation_flag,8,2); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); } break; @@ -493,51 +498,53 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag, if (mac_xface->lte_frame_parms->frame_type == TDD) { switch (mac_xface->lte_frame_parms->tdd_config) { case 1: - schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3,nCCE); - schedule_RA(module_idP,frameP,subframeP,7,nprb,nCCE); // 7 = Msg3 subframeP, not - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,1,mbsfn_status); + schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3); + schedule_RA(module_idP,frameP,subframeP,7); // 7 = Msg3 subframeP, not + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; case 3: case 4: - schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3,nCCE); - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,3); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; case 6: - schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,4,nCCE); - //schedule_RA(module_idP,frameP,subframeP,nprb,nCCE); - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + schedule_ulsch(module_idP,frameP,cooperation_flag,subframeP,4); + //schedule_RA(module_idP,frameP,subframeP); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; case 2: case 5: - //schedule_RA(module_idP,frameP,subframeP,nprb,nCCE); - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + //schedule_RA(module_idP,frameP,subframeP); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); break; default: break; } } else { //FDD - // schedule_ulsch(module_idP,frameP,cooperation_flag,9,3,nCCE); - schedule_ue_spec(module_idP,frameP,subframeP,nprb,nCCE,mbsfn_status); - fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status); + // schedule_ulsch(module_idP,frameP,cooperation_flag,9,3); + schedule_ue_spec(module_idP,frameP,subframeP,mbsfn_status); + fill_DLSCH_dci(module_idP,frameP,subframeP,mbsfn_status); } break; } - for (CC_id=0; CC_idnCCE = nCCE[CC_id]; - } + LOG_D(MAC,"FrameP %d, subframeP %d : Scheduling CCEs\n",frameP,subframeP); - LOG_D(MAC,"frameP %d, subframeP %d nCCE %d\n",frameP,subframeP,nCCE[0]); + // Allocate CCEs for good after scheduling is done + for (CC_id=0;CC_idschedule_ra); for (CC_id=0; CC_idcommon_channels[CC_id].RA_template[0]; + + vrb_map = eNB->common_channels[CC_id].vrb_map; + DCI_pdu = &eNB->common_channels[CC_id].DCI_pdu; for (i=0; icommon_channels[CC_id].RA_template[i]; + + if (RA_template->RA_active == TRUE) { LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d RA %d is active (generate RAR %d, generate_Msg4 %d, wait_ack_Msg4 %d, rnti %x)\n", - module_idP,CC_id,i,RA_template[i].generate_rar,RA_template[i].generate_Msg4,RA_template[i].wait_ack_Msg4, RA_template[i].rnti); + module_idP,CC_id,i,RA_template->generate_rar,RA_template->generate_Msg4,RA_template->wait_ack_Msg4, RA_template->rnti); - if (RA_template[i].generate_rar == 1) { - nprb[CC_id]= nprb[CC_id] + 3; - nCCE[CC_id] = nCCE[CC_id] + 4; - RA_template[i].Msg3_subframe=Msg3_subframe; - } else if (RA_template[i].generate_Msg4 == 1) { + if (RA_template->generate_rar == 1) { + + LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI (proc %d), RA_active %d format 1A (%d,%d))\n", + module_idP, CC_id, frameP, subframeP,i, + RA_template->RA_active, + RA_template->RA_dci_fmt1, + RA_template->RA_dci_size_bits1); + + + + if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { + switch(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { + case 6: + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->type=1; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); + break; + + case 25: + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->type=1; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); + break; + + case 50: + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->type=1; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); + break; + + case 100: + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->type=1; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); + break; + + default: + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->type=1; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); + break; + } + } else { + switch(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { + case 6: + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->type=1; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); + break; + + case 25: + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->type=1; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_UL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); + break; + + case 50: + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->type=1; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); + break; + + case 100: + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->type=1; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); + break; + + default: + break; + } + } + + if (!CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,2,RA_template->RA_rnti)) { + add_common_dci(DCI_pdu, + (void*)&RA_template->RA_alloc_pdu1[0], + RA_template->RA_rnti, + RA_template->RA_dci_size_bytes1, + 2, + RA_template->RA_dci_size_bits1, + RA_template->RA_dci_fmt1, + 1); + + RA_template->Msg3_subframe=Msg3_subframe; + } + } else if (RA_template->generate_Msg4 == 1) { // check for Msg4 Message - UE_id = find_UE_id(module_idP,RA_template[i].rnti); + UE_id = find_UE_id(module_idP,RA_template->rnti); if (Is_rrc_registered == 1) { @@ -131,7 +293,7 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un if (rrc_sdu_length>0) { LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Generating Msg4 with RRC Piggyback (RA proc %d, RNTI %x)\n", - module_idP, CC_id, frameP, subframeP,i,RA_template[i].rnti); + module_idP, CC_id, frameP, subframeP,i,RA_template->rnti); //msg("[MAC][eNB %d][RAPROC] Frame %d, subframeP %d: Received %d bytes for Msg4: \n",module_idP,frameP,subframeP,rrc_sdu_length); // for (j=0;jlte_frame_parms.N_RB_DL-4)); + + if ((vrb_map[first_rb] != 1) && (vrb_map[first_rb+3] != 1)) + break; + } + */ + first_rb=0; + + vrb_map[first_rb] = 1; + vrb_map[first_rb+1] = 1; + vrb_map[first_rb+2] = 1; + vrb_map[first_rb+3] = 1; // Compute MCS for 3 PRB @@ -149,273 +326,406 @@ void schedule_RA(module_id_t module_idP,frame_t frameP, sub_frame_t subframeP,un switch (mac_xface->lte_frame_parms->N_RB_DL) { case 6: - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->ndi=1; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; if ((rrc_sdu_length+msg4_header) <= 22) { - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=4; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=4; TBsize = 22; } else if ((rrc_sdu_length+msg4_header) <= 28) { - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=5; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=5; TBsize = 28; } else if ((rrc_sdu_length+msg4_header) <= 32) { - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=6; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=6; TBsize = 32; } else if ((rrc_sdu_length+msg4_header) <= 41) { - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=7; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=7; TBsize = 41; } else if ((rrc_sdu_length+msg4_header) <= 49) { - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=8; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=8; TBsize = 49; } else if ((rrc_sdu_length+msg4_header) <= 57) { - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=9; TBsize = 57; } - + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->type=1; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, + ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); + break; case 25: - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->ndi=1; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; if ((rrc_sdu_length+msg4_header) <= 22) { - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=4; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=4; TBsize = 22; } else if ((rrc_sdu_length+msg4_header) <= 28) { - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=5; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=5; TBsize = 28; } else if ((rrc_sdu_length+msg4_header) <= 32) { - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=6; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=6; TBsize = 32; } else if ((rrc_sdu_length+msg4_header) <= 41) { - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=7; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=7; TBsize = 41; } else if ((rrc_sdu_length+msg4_header) <= 49) { - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=8; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=8; TBsize = 49; } else if ((rrc_sdu_length+msg4_header) <= 57) { - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=9; TBsize = 57; } - + + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->type=1; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); break; case 50: - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->ndi=1; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; if ((rrc_sdu_length+msg4_header) <= 22) { - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=4; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=4; TBsize = 22; } else if ((rrc_sdu_length+msg4_header) <= 28) { - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=5; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=5; TBsize = 28; } else if ((rrc_sdu_length+msg4_header) <= 32) { - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=6; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=6; TBsize = 32; } else if ((rrc_sdu_length+msg4_header) <= 41) { - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=7; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=7; TBsize = 41; } else if ((rrc_sdu_length+msg4_header) <= 49) { - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=8; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=8; TBsize = 49; } else if ((rrc_sdu_length+msg4_header) <= 57) { - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=9; TBsize = 57; } + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->type=1; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, + ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); break; case 100: - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->ndi=1; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; if ((rrc_sdu_length+msg4_header) <= 22) { - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=4; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=4; TBsize = 22; } else if ((rrc_sdu_length+msg4_header) <= 28) { - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=5; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=5; TBsize = 28; } else if ((rrc_sdu_length+msg4_header) <= 32) { - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=6; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=6; TBsize = 32; } else if ((rrc_sdu_length+msg4_header) <= 41) { - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=7; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=7; TBsize = 41; } else if ((rrc_sdu_length+msg4_header) <= 49) { - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=8; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=8; TBsize = 49; } else if ((rrc_sdu_length+msg4_header) <= 57) { - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->mcs=9; TBsize = 57; } + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->type=1; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, + ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); break; } } else { // FDD DCI switch (mac_xface->lte_frame_parms->N_RB_DL) { case 6: - ((DCI1A_1_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->ndi=1; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; if ((rrc_sdu_length+msg4_header) <= 22) { - ((DCI1A_1_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=4; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=4; TBsize = 22; } else if ((rrc_sdu_length+msg4_header) <= 28) { - ((DCI1A_1_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=5; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=5; TBsize = 28; } else if ((rrc_sdu_length+msg4_header) <= 32) { - ((DCI1A_1_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=6; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=6; TBsize = 32; } else if ((rrc_sdu_length+msg4_header) <= 41) { - ((DCI1A_1_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=7; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=7; TBsize = 41; } else if ((rrc_sdu_length+msg4_header) <= 49) { - ((DCI1A_1_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=8; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=8; TBsize = 49; } else if ((rrc_sdu_length+msg4_header) <= 57) { - ((DCI1A_1_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=9; TBsize = 57; } + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->type=1; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, + ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); break; case 25: - ((DCI1A_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->ndi=1; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; if ((rrc_sdu_length+msg4_header) <= 22) { - ((DCI1A_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=4; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=4; TBsize = 22; } else if ((rrc_sdu_length+msg4_header) <= 28) { - ((DCI1A_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=5; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=5; TBsize = 28; } else if ((rrc_sdu_length+msg4_header) <= 32) { - ((DCI1A_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=6; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=6; TBsize = 32; } else if ((rrc_sdu_length+msg4_header) <= 41) { - ((DCI1A_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=7; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=7; TBsize = 41; } else if ((rrc_sdu_length+msg4_header) <= 49) { - ((DCI1A_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=8; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=8; TBsize = 49; } else if ((rrc_sdu_length+msg4_header) <= 57) { - ((DCI1A_5MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=9; TBsize = 57; } + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->type=1; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); break; case 50: - ((DCI1A_10MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->ndi=1; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; if ((rrc_sdu_length+msg4_header) <= 22) { - ((DCI1A_10MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=4; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=4; TBsize = 22; } else if ((rrc_sdu_length+msg4_header) <= 28) { - ((DCI1A_10MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=5; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=5; TBsize = 28; } else if ((rrc_sdu_length+msg4_header) <= 32) { - ((DCI1A_10MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=6; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=6; TBsize = 32; } else if ((rrc_sdu_length+msg4_header) <= 41) { - ((DCI1A_10MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=7; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=7; TBsize = 41; } else if ((rrc_sdu_length+msg4_header) <= 49) { - ((DCI1A_10MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=8; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=8; TBsize = 49; } else if ((rrc_sdu_length+msg4_header) <= 57) { - ((DCI1A_10MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=9; TBsize = 57; } + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->type=1; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, + ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); break; case 100: - ((DCI1A_20MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->ndi=1; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; if ((rrc_sdu_length+msg4_header) <= 22) { - ((DCI1A_20MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=4; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=4; TBsize = 22; } else if ((rrc_sdu_length+msg4_header) <= 28) { - ((DCI1A_20MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=5; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=5; TBsize = 28; } else if ((rrc_sdu_length+msg4_header) <= 32) { - ((DCI1A_20MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=6; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=6; TBsize = 32; } else if ((rrc_sdu_length+msg4_header) <= 41) { - ((DCI1A_20MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=7; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=7; TBsize = 41; } else if ((rrc_sdu_length+msg4_header) <= 49) { - ((DCI1A_20MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=8; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=8; TBsize = 49; } else if ((rrc_sdu_length+msg4_header) <= 57) { - ((DCI1A_20MHz_FDD_t*)&RA_template[i].RA_alloc_pdu2[0])->mcs=9; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->mcs=9; TBsize = 57; } - + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->type=1; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, + ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); break; } } - RA_template[i].generate_Msg4=0; - RA_template[i].generate_Msg4_dci=1; - RA_template[i].wait_ack_Msg4=1; - RA_template[i].RA_active = FALSE; - lcid=0; - - if ((TBsize - rrc_sdu_length - msg4_header) <= 2) { - msg4_padding = TBsize - rrc_sdu_length - msg4_header; - msg4_post_padding = 0; - } else { - msg4_padding = 0; - msg4_post_padding = TBsize - rrc_sdu_length - msg4_header -1; - } - - LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d subframeP %d Msg4 : TBS %d, sdu_len %d, msg4_header %d, msg4_padding %d, msg4_post_padding %d\n", - module_idP,CC_id,frameP,subframeP,TBsize,rrc_sdu_length,msg4_header,msg4_padding,msg4_post_padding); - DevAssert( UE_id != UE_INDEX_INVALID ); // FIXME not sure how to gracefully return - offset = generate_dlsch_header((unsigned char*)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0], - 1, //num_sdus - (unsigned short*)&rrc_sdu_length, // - &lcid, // sdu_lcid - 255, // no drx - 0, // no timing advance - RA_template[i].cont_res_id, // contention res id - msg4_padding, // no padding - msg4_post_padding); - - memcpy((void*)&eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0][(unsigned char)offset], - &eNB->common_channels[CC_id].CCCH_pdu.payload[0], - rrc_sdu_length); - - if (opt_enabled==1) { - trace_pdu(1, (uint8_t *)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0], - rrc_sdu_length, UE_id, 3, UE_RNTI(module_idP, UE_id), - eNB->subframe,0,0); - LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n", - module_idP, CC_id, frameP, UE_RNTI(module_idP,UE_id), rrc_sdu_length); - } - - nprb[CC_id]= nprb[CC_id] + 3; - nCCE[CC_id] = nCCE[CC_id] + 4; - } + if (!CCE_allocation_infeasible(module_idP,CC_id,0,subframeP,2,RA_template->rnti)) { + add_ue_spec_dci(DCI_pdu, + (void*)&RA_template->RA_alloc_pdu2[0], + RA_template->rnti, + RA_template->RA_dci_size_bytes2, + 2, + RA_template->RA_dci_size_bits2, + RA_template->RA_dci_fmt2, + 0); + + RA_template->generate_Msg4=0; + RA_template->wait_ack_Msg4=1; + RA_template->RA_active = FALSE; + lcid=0; + + if ((TBsize - rrc_sdu_length - msg4_header) <= 2) { + msg4_padding = TBsize - rrc_sdu_length - msg4_header; + msg4_post_padding = 0; + } else { + msg4_padding = 0; + msg4_post_padding = TBsize - rrc_sdu_length - msg4_header -1; + } + + LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d subframeP %d Msg4 : TBS %d, sdu_len %d, msg4_header %d, msg4_padding %d, msg4_post_padding %d\n", + module_idP,CC_id,frameP,subframeP,TBsize,rrc_sdu_length,msg4_header,msg4_padding,msg4_post_padding); + DevAssert( UE_id != UE_INDEX_INVALID ); // FIXME not sure how to gracefully return + offset = generate_dlsch_header((unsigned char*)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0], + 1, //num_sdus + (unsigned short*)&rrc_sdu_length, // + &lcid, // sdu_lcid + 255, // no drx + 0, // no timing advance + RA_template->cont_res_id, // contention res id + msg4_padding, // no padding + msg4_post_padding); + + memcpy((void*)&eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0][(unsigned char)offset], + &eNB->common_channels[CC_id].CCCH_pdu.payload[0], + rrc_sdu_length); + + if (opt_enabled==1) { + trace_pdu(1, (uint8_t *)eNB->UE_list.DLSCH_pdu[CC_id][0][(unsigned char)UE_id].payload[0], + rrc_sdu_length, UE_id, 3, UE_RNTI(module_idP, UE_id), + eNB->subframe,0,0); + LOG_D(OPT,"[eNB %d][DLSCH] CC_id %d Frame %d trace pdu for rnti %x with size %d\n", + module_idP, CC_id, frameP, UE_RNTI(module_idP,UE_id), rrc_sdu_length); + } + + } + } //try here } - /* - else if (eNB_mac_inst[module_idP][CC_id].RA_template[i].wait_ack_Msg4==1) { - // check HARQ status and retransmit if necessary - LOG_I(MAC,"[eNB %d][RAPROC] Frame %d, subframeP %d: Checking if Msg4 was acknowledged :\n",module_idP,frameP,subframeP); - // Get candidate harq_pid from PHY - mac_xface->get_ue_active_harq_pid(module_idP,eNB_mac_inst[module_idP][CC_id].RA_template[i].rnti,subframeP,&harq_pid,&round,0); - if (round>0) { - *nprb= (*nprb) + 3; - *nCCE = (*nCCE) + 4; - } - } - */ + } else if (RA_template->wait_ack_Msg4==1) { + // check HARQ status and retransmit if necessary + LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 was acknowledged: \n", + module_idP,CC_id,frameP,subframeP); + // Get candidate harq_pid from PHY + mac_xface->get_ue_active_harq_pid(module_idP,CC_id,RA_template->rnti,frameP,subframeP,&harq_pid,&round,0); + + if (round>0) { + //RA_template->wait_ack_Msg4++; + // we have to schedule a retransmission + if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; + } else { + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; + } + + /* + // randomize frequency allocation for RA + while (1) { + first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL-4)); + + if ((vrb_map[first_rb] != 1) && (vrb_map[first_rb+3] != 1)) + break; + } + */ + first_rb=0; + vrb_map[first_rb] = 1; + vrb_map[first_rb+1] = 1; + vrb_map[first_rb+2] = 1; + vrb_map[first_rb+3] = 1; + + if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_UL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, + ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); + } else { + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_UL,first_rb,4); + rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, + ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); + } + + if (!CCE_allocation_infeasible(module_idP,CC_id,0,subframeP,2,RA_template->rnti)) { + add_ue_spec_dci(DCI_pdu, + (void*)&RA_template->RA_alloc_pdu2[0], + RA_template->rnti, + RA_template->RA_dci_size_bytes2, + 2, + RA_template->RA_dci_size_bits2, + RA_template->RA_dci_fmt2, + 0); + } + LOG_W(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Msg4 not acknowledged, adding ue specific dci (rnti %x) for RA (Msg4 Retransmission)\n", + module_idP,CC_id,frameP,subframeP,RA_template->rnti); + } else { + /* msg4 not received + if ((round == 0) && (RA_template->wait_ack_Msg4>1){ + remove UE instance across all the layers: mac_xface->cancel_RA(); + } + */ + LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d : Msg4 acknowledged\n",module_idP,CC_id,frameP,subframeP); + RA_template->wait_ack_Msg4=0; + RA_template->RA_active=FALSE; + UE_id = find_UE_id(module_idP,RA_template->rnti); + DevAssert( UE_id != -1 ); + eNB_mac_inst[module_idP].UE_list.UE_template[UE_PCCID(module_idP,UE_id)][UE_id].configured=TRUE; + + } } - } - } + } // for i=0 .. N_RA_PROC-1 + } // CC_id stop_meas(&eNB->schedule_ra); } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_bch.c b/openair2/LAYER2/MAC/eNB_scheduler_bch.c index dd0890783e..65240356a7 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_bch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_bch.c @@ -72,9 +72,8 @@ void schedule_SI( module_id_t module_idP, frame_t frameP, - unsigned int* nprbP, - unsigned int* nCCEP -) + sub_frame_t subframeP) + //------------------------------------------------------------------------------ { @@ -85,12 +84,19 @@ schedule_SI( void *BCCH_alloc_pdu; int CC_id; eNB_MAC_INST *eNB = &eNB_mac_inst[module_idP]; + uint8_t *vrb_map; + int first_rb; + int rballoc[MAX_NUM_CCs]; + int sizeof1A_bytes,sizeof1A_bits; + DCI_PDU *DCI_pdu; start_meas(&eNB->schedule_si); for (CC_id=0; CC_idcommon_channels[CC_id].BCCH_alloc_pdu; + + BCCH_alloc_pdu = (void*)&eNB->common_channels[CC_id].BCCH_alloc_pdu; + DCI_pdu = (void*)&eNB->common_channels[CC_id].DCI_pdu; + vrb_map = (void*)&eNB->common_channels[CC_id].vrb_map; bcch_sdu_length = mac_rrc_data_req(module_idP, CC_id, @@ -104,7 +110,41 @@ schedule_SI( if (bcch_sdu_length > 0) { LOG_D(MAC,"[eNB %d] Frame %d : BCCH->DLSCH CC_id %d, Received %d bytes \n",module_idP,frameP,CC_id,bcch_sdu_length); + // Allocate 4 PRBs in a random location + /* + while (1) { + first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL-4)); + if ((vrb_map[first_rb] != 1) && + (vrb_map[first_rb+1] != 1) && + (vrb_map[first_rb+2] != 1) && + (vrb_map[first_rb+3] != 1)) + break; + } + */ + switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { + case 6: + first_rb = 0; + break; + case 15: + first_rb = 6; + break; + case 25: + first_rb = 11; + break; + case 50: + first_rb = 23; + break; + case 100: + first_rb = 48; + break; + } + vrb_map[first_rb] = 1; + vrb_map[first_rb+1] = 1; + vrb_map[first_rb+2] = 1; + vrb_map[first_rb+3] = 1; + + // Get MCS for length of SI if (bcch_sdu_length <= (mac_xface->get_TBS_DL(0,3))) { mcs=0; } else if (bcch_sdu_length <= (mac_xface->get_TBS_DL(1,3))) { @@ -125,46 +165,153 @@ schedule_SI( mcs=8; } + + if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { case 6: ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->mcs = mcs; + ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->type = 1; + ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->vrb_type = 0; + ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->ndi = 1; + ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rv = 1; + ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->harq_pid = 0; + ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->TPC = 1; + ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->padding = 0; + rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc); + sizeof1A_bytes = sizeof(DCI1A_1_5MHz_TDD_1_6_t); + sizeof1A_bits = sizeof_DCI1A_1_5MHz_TDD_1_6_t; break; case 25: ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->mcs = mcs; - break; + ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->type = 1; + ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->vrb_type = 0; + ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->ndi = 1; + ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rv = 1; + ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->harq_pid = 0; + ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->TPC = 1; + ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->padding = 0; + rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc); + sizeof1A_bytes = sizeof(DCI1A_5MHz_TDD_1_6_t); + sizeof1A_bits = sizeof_DCI1A_5MHz_TDD_1_6_t; + break; case 50: ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->mcs = mcs; + ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->type = 1; + ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->vrb_type = 0; + ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->ndi = 1; + ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rv = 1; + ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->harq_pid = 0; + ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->TPC = 1; + ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->padding = 0; + rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc); + sizeof1A_bytes = sizeof(DCI1A_10MHz_TDD_1_6_t); + sizeof1A_bits = sizeof_DCI1A_10MHz_TDD_1_6_t; break; case 100: ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->mcs = mcs; - break; + ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->type = 1; + ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->vrb_type = 0; + ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->ndi = 1; + ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rv = 1; + ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->harq_pid = 0; + ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->TPC = 1; + ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->padding = 0; + rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc); + sizeof1A_bytes = sizeof(DCI1A_20MHz_TDD_1_6_t); + sizeof1A_bits = sizeof_DCI1A_20MHz_TDD_1_6_t; + break; } } else { switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { case 6: ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->mcs = mcs; + ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->type = 1; + ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->vrb_type = 0; + ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->ndi = 1; + ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->rv = 1; + ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->harq_pid = 0; + ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->TPC = 1; + ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->padding = 0; + + rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->rballoc); + sizeof1A_bytes = sizeof(DCI1A_1_5MHz_FDD_t); + sizeof1A_bits = sizeof_DCI1A_1_5MHz_FDD_t; break; case 25: ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->mcs = mcs; + ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->type = 1; + ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->vrb_type = 0; + ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->ndi = 1; + ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->rv = 1; + ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->harq_pid = 0; + ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->TPC = 1; + ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->padding = 0; + + rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->rballoc); + sizeof1A_bytes = sizeof(DCI1A_5MHz_FDD_t); + sizeof1A_bits = sizeof_DCI1A_5MHz_FDD_t; break; case 50: ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->mcs = mcs; + ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->type = 1; + ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->vrb_type = 0; + ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->ndi = 1; + ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->rv = 1; + ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->harq_pid = 0; + ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->TPC = 1; + ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->padding = 0; + + rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->rballoc); + sizeof1A_bytes = sizeof(DCI1A_10MHz_FDD_t); + sizeof1A_bits = sizeof_DCI1A_10MHz_FDD_t; break; case 100: ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->mcs = mcs; - break; + ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); + ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->type = 1; + ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->vrb_type = 0; + ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->ndi = 1; + ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->rv = 1; + ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->harq_pid = 0; + ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->TPC = 1; + ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->padding = 0; + + rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->rballoc); + sizeof1A_bytes = sizeof(DCI1A_20MHz_FDD_t); + sizeof1A_bits = sizeof_DCI1A_20MHz_FDD_t; + break; } } + if (!CCE_allocation_infeasible(module_idP,CC_id,1,subframeP,2,SI_RNTI)) { + add_common_dci(DCI_pdu, + BCCH_alloc_pdu, + SI_RNTI, + sizeof1A_bytes, + 2, + sizeof1A_bits, + format1A,0); + } + else { + LOG_E(MAC,"[eNB %d] CCid %d Frame %d, subframe %d : Cannot add DCI 1A for SI\n",module_idP, CC_id,frameP,subframeP); + } + if (opt_enabled == 1) { trace_pdu(1, &eNB->common_channels[CC_id].BCCH_pdu.payload[0], @@ -194,17 +341,13 @@ schedule_SI( mac_xface->get_TBS_DL(mcs,3)); } - eNB->common_channels[CC_id].bcch_active=1; - nprbP[CC_id]=3; - nCCEP[CC_id]=4; + eNB->eNB_stats[CC_id].total_num_bcch_pdu+=1; eNB->eNB_stats[CC_id].bcch_buffer=bcch_sdu_length; eNB->eNB_stats[CC_id].total_bcch_buffer+=bcch_sdu_length; eNB->eNB_stats[CC_id].bcch_mcs=mcs; } else { - eNB->common_channels[CC_id].bcch_active=0; - nprbP[CC_id]=0; - nCCEP[CC_id]=0; + //LOG_D(MAC,"[eNB %d] Frame %d : BCCH not active \n",Mod_id,frame); } } diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 52e0f60d65..2a52d8779a 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -422,16 +422,13 @@ schedule_ue_spec( module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, - unsigned int *nb_rb_used0, - unsigned int *nCCE_used, - int* mbsfn_flag + int* mbsfn_flag ) //------------------------------------------------------------------------------ { uint8_t CC_id; int UE_id; - uint16_t nCCE[MAX_NUM_CCs]; int N_RBG[MAX_NUM_CCs]; unsigned char aggregation; mac_rlc_status_resp_t rlc_status; @@ -450,7 +447,6 @@ schedule_ue_spec( // uint16_t pre_nb_available_rbs[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; int mcs; uint16_t min_rb_unit[MAX_NUM_CCs]; - short ta_update = 0; eNB_MAC_INST *eNB = &eNB_mac_inst[module_idP]; UE_list_t *UE_list = &eNB->UE_list; LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]; @@ -459,6 +455,7 @@ schedule_ue_spec( int32_t tpc=1; static int32_t tpc_accumulated=0; UE_sched_ctrl *ue_sched_ctl; + int i; if (UE_list->head==-1) { return; @@ -473,15 +470,18 @@ schedule_ue_spec( for (CC_id=0; CC_idget_lte_frame_parms(module_idP,CC_id); - total_nb_available_rb[CC_id] = frame_parms[CC_id]->N_RB_DL - nb_rb_used0[CC_id]; - nCCE[CC_id] = mac_xface->get_nCCE_max(module_idP,CC_id) - nCCE_used[CC_id]; + // get number of PRBs less those used by common channels + total_nb_available_rb[CC_id] = frame_parms[CC_id]->N_RB_DL; + for (i=0;iN_RB_DL;i++) + if (eNB->common_channels[CC_id].vrb_map[i]!=0) + total_nb_available_rb[CC_id]--; + N_RBG[CC_id] = frame_parms[CC_id]->N_RBG; // store the global enb stats: eNB->eNB_stats[CC_id].num_dlactive_UEs = UE_list->num_UEs; eNB->eNB_stats[CC_id].available_prbs = total_nb_available_rb[CC_id]; eNB->eNB_stats[CC_id].total_available_prbs += total_nb_available_rb[CC_id]; - eNB->eNB_stats[CC_id].available_ncces = nCCE[CC_id]; eNB->eNB_stats[CC_id].dlsch_bytes_tx=0; eNB->eNB_stats[CC_id].dlsch_pdus_tx=0; } @@ -523,9 +523,11 @@ schedule_ue_spec( continue_flag=1; } - if ((ue_sched_ctl->pre_nb_available_rbs[CC_id] == 0) || (nCCE[CC_id] < (1<pre_nb_available_rbs[CC_id] == 0) || // no RBs allocated + CCE_allocation_infeasible(module_idP,CC_id,0,subframeP,aggregation,rnti) + ) { LOG_D(MAC,"[eNB %d] Frame %d : no RB allocated for UE %d on CC_id %d: continue \n", - module_idP, frameP, UE_id, CC_id, nb_rb_used0[CC_id], ue_sched_ctl->pre_nb_available_rbs[CC_id], nCCE[CC_id], aggregation); + module_idP, frameP, UE_id, CC_id); //if(mac_xface->get_transmission_mode(module_idP,rnti)==5) continue_flag=1; //to next user (there might be rbs availiable for other UEs in TM5 // else @@ -540,7 +542,6 @@ schedule_ue_spec( UE_list); // update UL DAI after DLSCH scheduling set_ul_DAI(module_idP,UE_id,CC_id,frameP,subframeP,frame_parms); - } if (continue_flag == 1 ) { @@ -587,11 +588,10 @@ schedule_ue_spec( UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][j] = 0; } - LOG_D(MAC,"[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, ncc %d, rrc %d)\n", + LOG_D(MAC,"[eNB %d] Frame %d: Scheduling UE %d on CC_id %d (rnti %x, harq_pid %d, round %d, rb %d, cqi %d, mcs %d, rrc %d)\n", module_idP, frameP, UE_id,CC_id,rnti,harq_pid, round,nb_available_rb, eNB_UE_stats->DL_cqi[0], eNB_UE_stats->dlsch_mcs1, - nCCE[CC_id], - UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status); + UE_list->eNB_UE_stats[CC_id][UE_id].rrc_status); // Note this code is for a specific DCI format @@ -641,8 +641,6 @@ schedule_ue_spec( nb_available_rb -= nb_rb; aggregation = process_ue_cqi(module_idP,UE_id); - nCCE[CC_id]-=(1<mu_mimo_mode[UE_id].pre_nb_available_rbs = nb_rb; @@ -789,7 +787,6 @@ schedule_ue_spec( UE_list->eNB_UE_stats[CC_id][UE_id].num_retransmission+=1; UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used_retx=nb_rb; UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used_retx+=nb_rb; - UE_list->eNB_UE_stats[CC_id][UE_id].ncce_used_retx=nCCE[CC_id]; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1=eNB_UE_stats->dlsch_mcs1; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2=eNB_UE_stats->dlsch_mcs1; } else { @@ -806,29 +803,7 @@ schedule_ue_spec( // check first for RLC data on DCCH // add the length for all the control elements (timing adv, drx, etc) : header + payload - //#ifndef EXMIMO_IOT - // to be checked by RK, NN, FK - uint8_t update_TA=4; - - switch (frame_parms[CC_id]->N_RB_DL) { - case 6: - update_TA = 1; - break; - - case 25: - update_TA = 4; - break; - - case 50: - update_TA = 8; - break; - - case 100: - update_TA = 16; - break; - } - - ta_len = ((eNB_UE_stats->timing_advance_update/update_TA)!=0) ? 2 : 0; + ta_len = (ue_sched_ctl->ta_update!=0) ? 2 : 0; header_len_dcch = 2; // 2 bytes DCCH SDU subheader @@ -1076,11 +1051,6 @@ schedule_ue_spec( post_padding = TBS - sdu_length_total - header_len_dcch - header_len_dtch - ta_len ; // 1 is for the postpadding header } - //#ifndef EXMIMO_IOT - ta_update = eNB_UE_stats->timing_advance_update/update_TA; - /*#else - ta_update = 0; - #endif*/ offset = generate_dlsch_header((unsigned char*)UE_list->DLSCH_pdu[CC_id][0][UE_id].payload[0], // offset = generate_dlsch_header((unsigned char*)eNB_mac_inst[0].DLSCH_pdu[0][0].payload[0], @@ -1088,17 +1058,17 @@ schedule_ue_spec( sdu_lengths, // sdu_lcids, 255, // no drx - ta_update, // timing advance + ue_sched_ctl->ta_update, // timing advance NULL, // contention res id padding, post_padding); //#ifdef DEBUG_eNB_SCHEDULER - if (ta_update) { + if (ue_sched_ctl->ta_update) { LOG_I(MAC, "[eNB %d][DLSCH] Frame %d Generate header for UE_id %d on CC_id %d: sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,timing advance value : %d, padding %d,post_padding %d,(mcs %d, TBS %d, nb_rb %d),header_dcch %d, header_dtch %d\n", module_idP,frameP, UE_id, CC_id, sdu_length_total,num_sdus,sdu_lengths[0],sdu_lcids[0],offset, - ta_update,padding,post_padding,mcs,TBS,nb_rb,header_len_dcch,header_len_dtch); + ue_sched_ctl->ta_update,padding,post_padding,mcs,TBS,nb_rb,header_len_dcch,header_len_dtch); } //#endif @@ -1130,8 +1100,6 @@ schedule_ue_spec( } aggregation = process_ue_cqi(module_idP,UE_id); - nCCE[CC_id]-=(1<UE_template[CC_id][UE_id].nb_rb[harq_pid] = nb_rb; add_ue_dlsch_info(module_idP, @@ -1145,7 +1113,6 @@ schedule_ue_spec( UE_list->eNB_UE_stats[CC_id][UE_id].rbs_used = nb_rb; UE_list->eNB_UE_stats[CC_id][UE_id].total_rbs_used += nb_rb; - UE_list->eNB_UE_stats[CC_id][UE_id].ncce_used = nCCE[CC_id]; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs1=eNB_UE_stats->dlsch_mcs1; UE_list->eNB_UE_stats[CC_id][UE_id].dlsch_mcs2=mcs; UE_list->eNB_UE_stats[CC_id][UE_id].TBS = TBS; @@ -1166,7 +1133,7 @@ schedule_ue_spec( // this is the normalized RX power eNB_UE_stats = mac_xface->get_eNB_UE_stats(module_idP,CC_id,rnti); normalized_rx_power = eNB_UE_stats->Po_PUCCH_dBm; - target_rx_power = mac_xface->get_target_pucch_rx_power(module_idP,CC_id) + 10; + target_rx_power = mac_xface->get_target_pucch_rx_power(module_idP,CC_id) + 20; // this assumes accumulated tpc // make sure that we are only sending a tpc update once a frame, otherwise the control loop will freak out @@ -1178,6 +1145,7 @@ schedule_ue_spec( UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_frame=frameP; UE_list->UE_template[CC_id][UE_id].pucch_tpc_tx_subframe=subframeP; + if (normalized_rx_power>(target_rx_power+1)) { tpc = 0; //-1 tpc_accumulated--; @@ -1187,9 +1155,11 @@ schedule_ue_spec( } else { tpc = 1; //0 } - LOG_D(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n", + /* + LOG_I(MAC,"[eNB %d] DLSCH scheduler: frame %d, subframe %d, harq_pid %d, tpc %d, accumulated %d, normalized/target rx power %d/%d\n", module_idP,frameP, subframeP,harq_pid,tpc, - tpc_accumulated,normalized_rx_power,target_rx_power); + tpc_accumulated,normalized_rx_power,target_rx_power);*/ + } // Po_PUCCH has been updated else { tpc = 1; //0 @@ -1495,10 +1465,9 @@ schedule_ue_spec( if (frame_parms[CC_id]->frame_type == TDD) { set_ul_DAI(module_idP,UE_id,CC_id,frameP,subframeP,frame_parms); } - } - } - //printf("MAC nCCE : %d\n",*nCCE_used); + } // UE_id loop + } // CC_id loop stop_meas(&eNB->schedule_dlsch); @@ -1509,13 +1478,11 @@ schedule_ue_spec( //------------------------------------------------------------------------------ void fill_DLSCH_dci( - module_id_t module_idP, - frame_t frameP, - sub_frame_t subframeP, - uint32_t* RBallocP, - uint8_t RA_scheduledP, - int* mbsfn_flagP -) + module_id_t module_idP, + frame_t frameP, + sub_frame_t subframeP, + int* mbsfn_flagP + ) //------------------------------------------------------------------------------ { @@ -1523,10 +1490,9 @@ fill_DLSCH_dci( int UE_id = -1; uint8_t first_rb,nb_rb=3; rnti_t rnti; - unsigned char vrb_map[100]; + unsigned char *vrb_map; uint8_t rballoc_sub[25]; //uint8_t number_of_subbands=13; - uint32_t *rballoc=RBallocP; unsigned char round; unsigned char harq_pid; @@ -1549,598 +1515,8 @@ fill_DLSCH_dci( if (mbsfn_flagP[CC_id]>0) continue; - DCI_pdu = &eNB->common_channels[CC_id].DCI_pdu; - BCCH_alloc_pdu=(void*)&eNB->common_channels[CC_id].BCCH_alloc_pdu; - // clear vrb_map - memset(vrb_map,0,100); - - - // SI DLSCH - // printf("BCCH check\n"); - if (eNB->common_channels[CC_id].bcch_active == 1) { - eNB->common_channels[CC_id].bcch_active = 0; - LOG_D(MAC,"[eNB %d] CC_id %d Frame %d subframeP %d: BCCH active\n", module_idP, CC_id, frameP, subframeP); - // randomize frequency allocation for SI - first_rb = 10;//(unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL-4)); - - /* Where is this from, should be removed!!!! - - if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { - - } - else { - BCCH_alloc_pdu_fdd.rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(BCCH_alloc_pdu_fdd.vrb_type,BCCH_alloc_pdu_fdd.rballoc); - } - */ - - - vrb_map[first_rb] = 1; - vrb_map[first_rb+1] = 1; - vrb_map[first_rb+2] = 1; - vrb_map[first_rb+3] = 1; - - if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { - switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { - case 6: - ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->type = 1; - ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->vrb_type = 0; - ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->ndi = 1; - ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rv = 1; - ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->harq_pid = 0; - ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->TPC = 1; - ((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->padding = 0; - rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_1_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc); - add_common_dci(DCI_pdu, - BCCH_alloc_pdu, - SI_RNTI, - sizeof(DCI1A_1_5MHz_TDD_1_6_t), - 2, - sizeof_DCI1A_1_5MHz_TDD_1_6_t, - format1A,0); - break; - - case 25: - ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->type = 1; - ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->vrb_type = 0; - ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->ndi = 1; - ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rv = 1; - ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->harq_pid = 0; - ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->TPC = 1; - ((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->padding = 0; - rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_5MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc); - add_common_dci(DCI_pdu, - BCCH_alloc_pdu, - SI_RNTI, - sizeof(DCI1A_5MHz_TDD_1_6_t), - 2, - sizeof_DCI1A_5MHz_TDD_1_6_t, - format1A,0); - break; - - case 50: - ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->type = 1; - ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->vrb_type = 0; - ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->ndi = 1; - ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rv = 1; - ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->harq_pid = 0; - ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->TPC = 1; - ((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->padding = 0; - rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_10MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc); - add_common_dci(DCI_pdu, - BCCH_alloc_pdu, - SI_RNTI, - sizeof(DCI1A_10MHz_TDD_1_6_t), - 2, - sizeof_DCI1A_10MHz_TDD_1_6_t, - format1A,0); - break; - - case 100: - ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->type = 1; - ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->vrb_type = 0; - ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->ndi = 1; - ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rv = 1; - ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->harq_pid = 0; - ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->TPC = 1; - ((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->padding = 0; - rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_20MHz_TDD_1_6_t*)BCCH_alloc_pdu)->rballoc); - add_common_dci(DCI_pdu, - BCCH_alloc_pdu, - SI_RNTI, - sizeof(DCI1A_20MHz_TDD_1_6_t), - 2, - sizeof_DCI1A_20MHz_TDD_1_6_t, - format1A,0); - break; - } - } else { - switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { - case 6: - ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->type = 1; - ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->vrb_type = 0; - ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->ndi = 1; - ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->rv = 1; - ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->harq_pid = 0; - ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->TPC = 1; - ((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->padding = 0; - - rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_1_5MHz_FDD_t*)BCCH_alloc_pdu)->rballoc); - add_common_dci(DCI_pdu, - BCCH_alloc_pdu, - SI_RNTI, - sizeof(DCI1A_1_5MHz_FDD_t), - 2, - sizeof_DCI1A_1_5MHz_FDD_t, - format1A,0); - break; - - case 25: - ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->type = 1; - ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->vrb_type = 0; - ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->ndi = 1; - ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->rv = 1; - ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->harq_pid = 0; - ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->TPC = 1; - ((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->padding = 0; - - rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_5MHz_FDD_t*)BCCH_alloc_pdu)->rballoc); - add_common_dci(DCI_pdu, - BCCH_alloc_pdu, - SI_RNTI, - sizeof(DCI1A_5MHz_FDD_t), - 2, - sizeof_DCI1A_5MHz_FDD_t, - format1A,0); - break; - - case 50: - ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->type = 1; - ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->vrb_type = 0; - ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->ndi = 1; - ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->rv = 1; - ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->harq_pid = 0; - ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->TPC = 1; - ((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->padding = 0; - - rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_10MHz_FDD_t*)BCCH_alloc_pdu)->rballoc); - add_common_dci(DCI_pdu, - BCCH_alloc_pdu, - SI_RNTI, - sizeof(DCI1A_10MHz_FDD_t), - 2, - sizeof_DCI1A_10MHz_FDD_t, - format1A,0); - break; - - case 100: - ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->type = 1; - ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->vrb_type = 0; - ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->ndi = 1; - ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->rv = 1; - ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->harq_pid = 0; - ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->TPC = 1; - ((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->padding = 0; - - rballoc[CC_id] |= mac_xface->get_rballoc(0,((DCI1A_20MHz_FDD_t*)BCCH_alloc_pdu)->rballoc); - add_common_dci(DCI_pdu, - BCCH_alloc_pdu, - SI_RNTI, - sizeof(DCI1A_20MHz_FDD_t), - 2, - sizeof_DCI1A_20MHz_FDD_t, - format1A,0); - break; - } - } - } - - if (RA_scheduledP == 1) { - for (i=0; icommon_channels[CC_id].RA_template[i]; - - if (RA_template->generate_rar == 1) { - - //FK: postponed to fill_rar - //RA_template->generate_rar = 0; - - LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generating RAR DCI (proc %d), RA_active %d format 1A (%d,%d))\n", - module_idP, CC_id, frameP, subframeP,i, - RA_template->RA_active, - RA_template->RA_dci_fmt1, - RA_template->RA_dci_size_bits1); - - // randomize frequency allocation for RA - while (1) { - first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL-4)); - - if ((vrb_map[first_rb] != 1) && (vrb_map[first_rb+3] != 1)) - break; - } - - vrb_map[first_rb] = 1; - vrb_map[first_rb+1] = 1; - vrb_map[first_rb+2] = 1; - vrb_map[first_rb+3] = 1; - - if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { - switch(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { - case 6: - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->type=1; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); - break; - - case 25: - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->type=1; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); - break; - - case 50: - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->type=1; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); - break; - - case 100: - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->type=1; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); - break; - - default: - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->type=1; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); - break; - } - } else { - switch(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { - case 6: - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->type=1; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); - break; - - case 25: - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->type=1; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_UL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); - break; - - case 50: - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->type=1; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); - break; - - case 100: - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->type=1; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type=0; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->ndi=1; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rv=0; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->mcs=0; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->harq_pid=0; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->TPC=1; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->padding=0; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->vrb_type, - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu1[0])->rballoc); - break; - - default: - break; - } - } - - add_common_dci(DCI_pdu, - (void*)&RA_template->RA_alloc_pdu1[0], - RA_template->RA_rnti, - RA_template->RA_dci_size_bytes1, - 2, - RA_template->RA_dci_size_bits1, - RA_template->RA_dci_fmt1, - 1); - - - - LOG_D(MAC,"[eNB %d] CC_id %d Frame %d: Adding common dci for RA%d (RAR) RA_active %d\n", - module_idP,CC_id,frameP,i, RA_template->RA_active); - } - - if (RA_template->generate_Msg4_dci == 1) { - - // randomize frequency allocation for RA - while (1) { - first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL-4)); - - if ((vrb_map[first_rb] != 1) && (vrb_map[first_rb+3] != 1)) - break; - } - - vrb_map[first_rb] = 1; - vrb_map[first_rb+1] = 1; - vrb_map[first_rb+2] = 1; - vrb_map[first_rb+3] = 1; - - if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { - switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { - case 6: - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->type=1; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_1_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - break; - - case 25: - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->type=1; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - break; - - case 50: - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->type=1; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_10MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - break; - - case 100: - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->type=1; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_20MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - break; - - default: - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->type=1; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - break; - } - } else { - switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { - - case 6: - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->type=1; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_1_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - break; - - case 25: - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->type=1; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - break; - - case 50: - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->type=1; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_10MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - break; - - case 100: - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->type=1; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->padding=0; - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_20MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - break; - - default: - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->type=1; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rv=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->harq_pid=0; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->TPC=1; - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc= mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - break; - } - } - - add_ue_spec_dci(DCI_pdu, - (void*)&RA_template->RA_alloc_pdu2[0], - RA_template->rnti, - RA_template->RA_dci_size_bytes2, - 1, - RA_template->RA_dci_size_bits2, - RA_template->RA_dci_fmt2, - 0); - LOG_D(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Adding ue specific dci (rnti %x) for Msg4\n", - module_idP,CC_id,frameP,subframeP,RA_template->rnti); - RA_template->generate_Msg4_dci=0; - - } else if (RA_template->wait_ack_Msg4==1) { - // check HARQ status and retransmit if necessary - LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Checking if Msg4 was acknowledged: \n", - module_idP,CC_id,frameP,subframeP); - // Get candidate harq_pid from PHY - mac_xface->get_ue_active_harq_pid(module_idP,CC_id,RA_template->rnti,frameP,subframeP,&harq_pid,&round,0); - - if (round>0) { - //RA_template->wait_ack_Msg4++; - // we have to schedule a retransmission - if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; - } else { - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->ndi=1; - } - - // randomize frequency allocation for RA - while (1) { - first_rb = (unsigned char)(taus()%(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL-4)); - - if ((vrb_map[first_rb] != 1) && (vrb_map[first_rb+3] != 1)) - break; - } - - vrb_map[first_rb] = 1; - vrb_map[first_rb+1] = 1; - vrb_map[first_rb+2] = 1; - vrb_map[first_rb+3] = 1; - - if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_UL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_5MHz_TDD_1_6_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - } else { - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc = mac_xface->computeRIV(PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_UL,first_rb,4); - rballoc[CC_id] |= mac_xface->get_rballoc(((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->vrb_type, - ((DCI1A_5MHz_FDD_t*)&RA_template->RA_alloc_pdu2[0])->rballoc); - } - - add_ue_spec_dci(DCI_pdu, - (void*)&RA_template->RA_alloc_pdu2[0], - RA_template->rnti, - RA_template->RA_dci_size_bytes2, - 2, - RA_template->RA_dci_size_bits2, - RA_template->RA_dci_fmt2, - 0); - LOG_W(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d: Msg4 not acknowledged, adding ue specific dci (rnti %x) for RA (Msg4 Retransmission)\n", - module_idP,CC_id,frameP,subframeP,RA_template->rnti); - } else { - /* msg4 not received - if ((round == 0) && (RA_template->wait_ack_Msg4>1){ - remove UE instance across all the layers: mac_xface->cancel_RA(); - } - */ - LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d, subframeP %d : Msg4 acknowledged\n",module_idP,CC_id,frameP,subframeP); - RA_template->wait_ack_Msg4=0; - RA_template->RA_active=FALSE; - UE_id = find_UE_id(module_idP,RA_template->rnti); - DevAssert( UE_id != -1 ); - eNB_mac_inst[module_idP].UE_list.UE_template[UE_PCCID(module_idP,UE_id)][UE_id].configured=TRUE; - - } - } - } - } // RA is scheduled in this subframeP - + DCI_pdu = &eNB->common_channels[CC_id].DCI_pdu; + // UE specific DCIs for (UE_id=UE_list->head; UE_id>=0; UE_id=UE_list->next[UE_id]) { @@ -2161,11 +1537,6 @@ fill_DLSCH_dci( /// Synchronizing rballoc with rballoc_sub for(i=0; ilte_frame_parms.N_RBG; i++) { rballoc_sub[i] = UE_list->UE_template[CC_id][UE_id].rballoc_subband[harq_pid][i]; - - if(rballoc_sub[i] == 1) { - rballoc[CC_id] |= (0x0001<get_transmission_mode(module_idP,CC_id,rnti)) { @@ -2174,7 +1545,7 @@ fill_DLSCH_dci( case 1: case 2: - LOG_D(MAC,"[eNB %d] CC_id %d Adding UE %d spec DCI for %d PRBS (rb alloc: %x) \n",module_idP, CC_id, UE_id, nb_rb,rballoc); + LOG_D(MAC,"[eNB %d] CC_id %d Adding UE %d spec DCI for %d PRBS \n",module_idP, CC_id, UE_id, nb_rb); if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { @@ -2267,7 +1638,7 @@ fill_DLSCH_dci( case 3: LOG_D(MAC,"[eNB %d] CC_id %d Adding Format 2A UE %d spec DCI for %d PRBS (rb alloc: %x) \n", - module_idP, CC_id, UE_id, nb_rb,rballoc); + module_idP, CC_id, UE_id, nb_rb); if (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.frame_type == TDD) { switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c index 34169d902e..9cabd6b622 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c @@ -267,6 +267,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP,int harq_pidP) UE_list->ordered_ULCCids[0][UE_id] = cc_idP; UE_list->num_UEs++; UE_list->active[UE_id] = TRUE; + memset((void*)&UE_list->UE_sched_ctrl[UE_id],0,sizeof(UE_sched_ctrl)); for (j=0; j<8; j++) { UE_list->UE_template[cc_idP][UE_id].oldNDI[j] = (j==0)?1:0; // 1 because first transmission is with format1A (Msg4) for harq_pid 0 @@ -879,3 +880,230 @@ int get_nb_subband(void) return nb_sb; } + +void init_CCE_table(int module_idP,int CC_idP) +{ + memset(eNB_mac_inst[module_idP].CCE_table[CC_idP],0,800*sizeof(int)); +} + + +int get_nCCE_offset(int *CCE_table, + const unsigned char L, + const int nCCE, + const int common_dci, + const unsigned short rnti, + const unsigned char subframe) +{ + + int search_space_free,m,nb_candidates = 0,l,i; + unsigned int Yk; + /* + printf("CCE Allocation: "); + for (i=0;i=0 ; m--) { + + search_space_free = 1; + for (l=0; lget_nCCE_max(module_idP,CC_idP,DCI_pdu->num_pdcch_symbols,subframeP); + int fCCE; + int i,j; + int allocation_is_feasible = 1; + DCI_ALLOC_t *dci_alloc; + + + LOG_D(MAC,"Allocate CCEs subframe %d, test %d : (common %d,uspec %d)\n",subframeP,test_onlyP,DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci); + + init_CCE_table(module_idP,CC_idP); + DCI_pdu->nCCE=0; + + while (allocation_is_feasible == 1) { + + for (i=0;iNum_common_dci + DCI_pdu->Num_ue_spec_dci;i++) { + dci_alloc = &DCI_pdu->dci_alloc[i]; + LOG_D(MAC,"Trying to allocate DCI %d/%d (%d,%d) : rnti %x, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n", + i,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci, + DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci, + dci_alloc->rnti,1<L, + DCI_pdu->nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols); + + if (DCI_pdu->nCCE + (1<L) > nCCE_max) { + if (DCI_pdu->num_pdcch_symbols == 3) + allocation_is_feasible = 0; + else { + DCI_pdu->num_pdcch_symbols++; + nCCE_max = mac_xface->get_nCCE_max(module_idP,CC_idP,DCI_pdu->num_pdcch_symbols,subframeP); + } + break; + } + else { // number of CCEs left can potentially hold this allocation + if ((fCCE = get_nCCE_offset(CCE_table, + 1<<(dci_alloc->L), + nCCE_max, + (iNum_common_dci) ? 1 : 0, + dci_alloc->rnti, + subframeP))>=0) {// the allocation is feasible, rnti rule passes + + LOG_D(MAC,"Allocating at nCCE %d\n",fCCE); + if (test_onlyP == 0) { + DCI_pdu->nCCE += (1<L); + dci_alloc->firstCCE=fCCE; + LOG_D(MAC,"Allocate CCEs subframe %d, test %d\n",subframeP,test_onlyP); + } + } // fCCE>=0 + else { + if (DCI_pdu->num_pdcch_symbols == 3) { + allocation_is_feasible = 0; + LOG_I(MAC,"subframe %d: Dropping Allocation for RNTI %x\n", + subframeP,dci_alloc->rnti); + for (j=0;j<=i;j++){ + + LOG_I(MAC,"DCI %d/%d (%d,%d) : rnti %x dci format %d, aggreg %d nCCE %d / %d (num_pdcch_symbols %d)\n", + i,DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci, + DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci, + DCI_pdu->dci_alloc[j].rnti,DCI_pdu->dci_alloc[j].format, + 1<dci_alloc[j].L, + DCI_pdu->nCCE,nCCE_max,DCI_pdu->num_pdcch_symbols); + } + } + else { + DCI_pdu->num_pdcch_symbols++; + nCCE_max = mac_xface->get_nCCE_max(module_idP,CC_idP,DCI_pdu->num_pdcch_symbols,subframeP); + } + break; + } // fCCE==-1 + } // nCCE <= nCCE_max + } // for i = 0 ... num_dcis + if (allocation_is_feasible==1) + return (0); + } // allocation_is_feasible == 1 + + return(-1); + + +} + +boolean_t CCE_allocation_infeasible(int module_idP, + int CC_idP, + int common_flag, + int subframe, + int aggregation, + int rnti) { + + + DCI_PDU *DCI_pdu = &eNB_mac_inst[module_idP].common_channels[CC_idP].DCI_pdu; + DCI_ALLOC_t *dci_alloc; + int ret; + boolean_t res=FALSE; + + if (common_flag==1) { + DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci].rnti = rnti; + DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci].L = aggregation; + DCI_pdu->Num_common_dci++; + ret = allocate_CCEs(module_idP,CC_idP,subframe,1); + if (ret==-1) + res = TRUE; + DCI_pdu->Num_common_dci--; + } + else { + DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci].rnti = rnti; + DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci + DCI_pdu->Num_ue_spec_dci].L = aggregation; + DCI_pdu->Num_ue_spec_dci++; + ret = allocate_CCEs(module_idP,CC_idP,subframe,1); + if (ret==-1) + res = TRUE; + DCI_pdu->Num_ue_spec_dci--; + } + return(res); +} + diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c index 1018c6e7d8..493ff11d33 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c @@ -88,6 +88,7 @@ void rx_sdu( int ii,j; eNB_MAC_INST *eNB = &eNB_mac_inst[enb_mod_idP]; UE_list_t *UE_list= &eNB->UE_list; + int crnti_rx=0; start_meas(&eNB->rx_ulsch_sdu); @@ -126,13 +127,11 @@ void rx_sdu( break; case CRNTI: - LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d (ce %d/%d): Received CRNTI %2.2x%2.2x\n", - enb_mod_idP, CC_idP, rx_ces[i], i,num_ce, payload_ptr[0], payload_ptr[1]); UE_id = find_UE_id(enb_mod_idP,(((uint16_t)payload_ptr[0])<<8) + payload_ptr[1]); - LOG_I(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d : CRNTI %x (UE_id %d) in Msg3\n",enb_mod_idP, CC_idP, rx_ces[i], (((uint16_t)payload_ptr[0])<<8) + payload_ptr[1],UE_id); - + LOG_I(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d (ce %d/%d): CRNTI %x (UE_id %d) in Msg3\n",enb_mod_idP, CC_idP, rx_ces[i], i,num_ce,(((uint16_t)payload_ptr[0])<<8) + payload_ptr[1],UE_id); + crnti_rx=1; payload_ptr+=2; - /* we don't process this CE yet */ + if (msg3_flagP != NULL) { *msg3_flagP = 0; } @@ -146,6 +145,9 @@ void rx_sdu( LOG_D(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d : Received short BSR LCGID = %u bsr = %d\n", enb_mod_idP, CC_idP, rx_ces[i], lcgid, payload_ptr[0] & 0x3f); + if (crnti_rx==1) + LOG_I(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d : Received short BSR LCGID = %u bsr = %d\n", + enb_mod_idP, CC_idP, rx_ces[i], lcgid, payload_ptr[0] & 0x3f); if (UE_id != -1) { UE_list->UE_template[CC_idP][UE_id].bsr_info[lcgid] = (payload_ptr[0] & 0x3f); @@ -177,6 +179,15 @@ void rx_sdu( UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID1], UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID2], UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID3]); + if (crnti_rx==1) + LOG_I(MAC, "[eNB %d] CC_id %d MAC CE_LCID %d: Received long BSR LCGID0 = %u LCGID1 = " + "%u LCGID2 = %u LCGID3 = %u\n", + enb_mod_idP, CC_idP, + rx_ces[i], + UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID0], + UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID1], + UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID2], + UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID3]); if (UE_list->UE_template[CC_idP][UE_id].bsr_info[LCGID0] == 0 ) { UE_list->UE_template[CC_idP][UE_id].ul_buffer_creation_time[LCGID0]=0; @@ -223,7 +234,7 @@ void rx_sdu( payload_ptr[0],payload_ptr[1],payload_ptr[2],payload_ptr[3],payload_ptr[4], payload_ptr[5], rntiP); for (ii=0; iicommon_channels[CC_idP].RA_template[ii].rnti, rntiP, eNB->common_channels[CC_idP].RA_template[ii].RA_active); @@ -236,7 +247,7 @@ void rx_sdu( if (UE_id < 0) { memcpy(&eNB->common_channels[CC_idP].RA_template[ii].cont_res_id[0],payload_ptr,6); LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d CCCH: Received Msg3: length %d, offset %d\n", - enb_mod_idP,CC_idP,frameP,rx_lengths[ii],payload_ptr-sduP); + enb_mod_idP,CC_idP,frameP,rx_lengths[i],payload_ptr-sduP); if ((UE_id=add_new_ue(enb_mod_idP,CC_idP,eNB->common_channels[CC_idP].RA_template[ii].rnti,harq_pidP)) == -1 ) { mac_xface->macphy_exit("[MAC][eNB] Max user count reached\n"); @@ -246,7 +257,7 @@ void rx_sdu( enb_mod_idP,CC_idP,frameP,eNB->common_channels[CC_idP].RA_template[ii].rnti,UE_id); } else { LOG_I(MAC,"[eNB %d][RAPROC] CC_id %d Frame %d CCCH: Received Msg3 from already registered UE %d: length %d, offset %d\n", - enb_mod_idP,CC_idP,frameP,UE_id,rx_lengths[ii],payload_ptr-sduP); + enb_mod_idP,CC_idP,frameP,UE_id,rx_lengths[i],payload_ptr-sduP); // kill RA procedure } @@ -258,7 +269,7 @@ void rx_sdu( rntiP, CCCH, (uint8_t*)payload_ptr, - rx_lengths[ii], + rx_lengths[i], ENB_FLAG_YES, enb_mod_idP, 0); @@ -297,17 +308,17 @@ void rx_sdu( enb_mod_idP,CC_idP,frameP, rx_lengths[i], UE_id, rx_lcids[i]); mac_rlc_data_ind( - enb_mod_idP, - rntiP, - enb_mod_idP, - frameP, - ENB_FLAG_YES, - MBMS_FLAG_NO, - rx_lcids[i], - (char *)payload_ptr, - rx_lengths[i], - 1, - NULL);//(unsigned int*)crc_status); + enb_mod_idP, + rntiP, + enb_mod_idP, + frameP, + ENB_FLAG_YES, + MBMS_FLAG_NO, + rx_lcids[i], + (char *)payload_ptr, + rx_lengths[i], + 1, + NULL);//(unsigned int*)crc_status); UE_list->eNB_UE_stats[CC_idP][UE_id].num_pdu_rx[rx_lcids[i]]+=1; UE_list->eNB_UE_stats[CC_idP][UE_id].num_bytes_rx[rx_lcids[i]]+=rx_lengths[i]; } @@ -596,12 +607,14 @@ unsigned char *parse_ulsch_header(unsigned char *mac_header, } -void schedule_ulsch(module_id_t module_idP, frame_t frameP,unsigned char cooperation_flag,sub_frame_t subframeP, unsigned char sched_subframe, - unsigned int *nCCE) //,int calibration_flag) { -{ +void schedule_ulsch(module_id_t module_idP, + frame_t frameP, + unsigned char cooperation_flag, + sub_frame_t subframeP, + unsigned char sched_subframe) { + - unsigned int nCCE_available[MAX_NUM_CCs]; uint16_t first_rb[MAX_NUM_CCs],i; int CC_id; eNB_MAC_INST *eNB=&eNB_mac_inst[module_idP]; @@ -612,7 +625,6 @@ void schedule_ulsch(module_id_t module_idP, frame_t frameP,unsigned char coopera for (CC_id=0; CC_idget_nCCE_max(module_idP,CC_id) - nCCE[CC_id]; // UE data info; // check which UE has data to transmit @@ -644,10 +656,10 @@ void schedule_ulsch(module_id_t module_idP, frame_t frameP,unsigned char coopera } - schedule_ulsch_rnti(module_idP, cooperation_flag, frameP, subframeP, sched_subframe, nCCE, nCCE_available, first_rb); + schedule_ulsch_rnti(module_idP, cooperation_flag, frameP, subframeP, sched_subframe,first_rb); #ifdef CBA - schedule_ulsch_cba_rnti(module_idP, cooperation_flag, frameP, subframeP, sched_subframe, nCCE, nCCE_available, first_rb); + schedule_ulsch_cba_rnti(module_idP, cooperation_flag, frameP, subframeP, sched_subframe, first_rb); #endif @@ -662,8 +674,6 @@ void schedule_ulsch_rnti(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP, unsigned char sched_subframe, - unsigned int *nCCE, - unsigned int *nCCE_available, uint16_t *first_rb) { @@ -697,8 +707,7 @@ void schedule_ulsch_rnti(module_id_t module_idP, frameP, subframeP, first_rb, - aggregation, - nCCE); + aggregation); // LOG_I(MAC,"exiting ulsch preprocesor\n"); @@ -729,11 +738,12 @@ void schedule_ulsch_rnti(module_id_t module_idP, continue; // mac_xface->macphy_exit("[MAC][eNB] Cannot find eNB_UE_stats\n"); } - if (nCCE_available[CC_id] < (1<mode]); if (eNB_UE_stats->mode == PUSCH) { // ue has a ulsch channel @@ -747,9 +757,10 @@ void schedule_ulsch_rnti(module_id_t module_idP, //should we continue or set harq_pid to 0? continue; } else - LOG_T(MAC,"[eNB %d] Frame %d, subframeP %d, UE %d CC %d : got harq pid %d round %d (nCCE %d, rnti %x,mode %s)\n", - module_idP,frameP,subframeP,UE_id,CC_id, harq_pid, round,nCCE[CC_id],rnti,mode_string[eNB_UE_stats->mode]); + LOG_T(MAC,"[eNB %d] Frame %d, subframeP %d, UE %d CC %d : got harq pid %d round %d (rnti %x,mode %s)\n", + module_idP,frameP,subframeP,UE_id,CC_id, harq_pid, round,rnti,mode_string[eNB_UE_stats->mode]); + //#undef EXMIMO_IOT #ifndef EXMIMO_IOT if (((UE_is_to_be_scheduled(module_idP,CC_id,UE_id)>0)) || (round>0) || ((frameP%10)==0)) @@ -1088,9 +1099,6 @@ void schedule_ulsch_rnti(module_id_t module_idP, subframeP, S_UL_SCHEDULED); - nCCE[CC_id] = nCCE[CC_id] + (1<get_nCCE_max(module_idP,CC_id) - nCCE[CC_id]; - LOG_D(MAC,"[eNB %d] CC_id %d Frame %d, subframeP %d: Generated ULSCH DCI for next UE_id %d, format 0\n", module_idP,CC_id,frameP,subframeP,UE_id); #ifdef DEBUG dump_dci(frame_parms, &DCI_pdu->dci_alloc[DCI_pdu->Num_common_dci+DCI_pdu->Num_ue_spec_dci-1]); @@ -1103,8 +1111,7 @@ void schedule_ulsch_rnti(module_id_t module_idP, } #ifdef CBA -void schedule_ulsch_cba_rnti(module_id_t module_idP, unsigned char cooperation_flag, frame_t frameP, sub_frame_t subframeP, unsigned char sched_subframe, unsigned int *nCCE, - unsigned int *nCCE_available, uint16_t *first_rb) +void schedule_ulsch_cba_rnti(module_id_t module_idP, unsigned char cooperation_flag, frame_t frameP, sub_frame_t subframeP, unsigned char sched_subframe, uint16_t *first_rb) { eNB_MAC_INST *eNB = &eNB_mac_inst[module_idP]; @@ -1163,11 +1170,11 @@ void schedule_ulsch_cba_rnti(module_id_t module_idP, unsigned char cooperation_f // cba group template uses the exisitng UE template, and thus if a UE // is scheduled, the correspodning group can't be used for CBA // this can be fixed later - if ((total_groups > 0) && (nCCE[CC_id] == 0)) { + if (total_groups > 0) { DCI_pdu = &eNB_mac_inst[module_idP].common_channels[CC_id].DCI_pdu; for (cba_group=0; - (cba_group (1< (1<= nCCE_available[CC_id]) { - num_cba_resources[cba_group%total_groups]--; - total_cba_resources--; - // LOG_N(MAC,"reducing num cba resources to %d for group %d \n", num_cba_resources[cba_group%total_groups], cba_group%total_groups ); - cba_group++; - } - if (total_cba_resources <= 0) { return; } @@ -1279,11 +1279,11 @@ void schedule_ulsch_cba_rnti(module_id_t module_idP, unsigned char cooperation_f for (cba_group=0; cba_groupN_RB_UL) { case 6: @@ -1425,8 +1425,6 @@ void schedule_ulsch_cba_rnti(module_id_t module_idP, unsigned char cooperation_f break; } - nCCE[CC_id] = nCCE[CC_id] + (1<get_nCCE_max(module_idP,CC_id) - nCCE[CC_id]; // break;// for the moment only schedule one } } diff --git a/openair2/LAYER2/MAC/main.c b/openair2/LAYER2/MAC/main.c index 5db78a30c2..0e8a65cf01 100644 --- a/openair2/LAYER2/MAC/main.c +++ b/openair2/LAYER2/MAC/main.c @@ -468,6 +468,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui mac_xface->get_transmission_mode = get_transmission_mode; mac_xface->get_rballoc = get_rballoc; mac_xface->get_nb_rb = conv_nprb; + mac_xface->get_prb = get_prb; // mac_xface->get_SB_size = Get_SB_size; mac_xface->get_subframe_direction = get_subframe_direction; mac_xface->Msg3_transmitted = Msg3_tx; @@ -507,7 +508,7 @@ int l2_init(LTE_DL_FRAME_PARMS *frame_parms,int eMBMS_active, char *uecap_xer,ui mac_xface->computeRIV = computeRIV; mac_xface->get_TBS_DL = get_TBS_DL; mac_xface->get_TBS_UL = get_TBS_UL; - mac_xface->get_nCCE_max = get_nCCE_max; + mac_xface->get_nCCE_max = get_nCCE_mac; mac_xface->get_nCCE_offset = get_nCCE_offset; mac_xface->get_ue_mode = get_ue_mode; mac_xface->phy_config_sib1_eNB = phy_config_sib1_eNB; diff --git a/openair2/LAYER2/MAC/pre_processor.c b/openair2/LAYER2/MAC/pre_processor.c index 5a4caf82c4..410d454419 100644 --- a/openair2/LAYER2/MAC/pre_processor.c +++ b/openair2/LAYER2/MAC/pre_processor.c @@ -176,6 +176,7 @@ void assign_rbs_required (module_id_t Mod_id, eNB_UE_stats[CC_id]->DL_cqi[0], MIN_CQI_VALUE, MAX_CQI_VALUE); */ eNB_UE_stats[CC_id]->dlsch_mcs1=cqi_to_mcs[eNB_UE_stats[CC_id]->DL_cqi[0]]; + eNB_UE_stats[CC_id]->dlsch_mcs1 = cmin(eNB_UE_stats[CC_id]->dlsch_mcs1,openair_daq_vars.target_ue_dl_mcs); } @@ -729,38 +730,123 @@ void dlsch_scheduler_pre_processor (module_id_t Mod_id, } } +#define SF05_LIMIT 1 void dlsch_scheduler_pre_processor_reset (int module_idP, - int UE_id, - uint8_t CC_id, - int frameP, - int subframeP, - int N_RBG, - uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX], - uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX], - unsigned char rballoc_sub[MAX_NUM_CCs][N_RBG_MAX], - unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]) + int UE_id, + uint8_t CC_id, + int frameP, + int subframeP, + int N_RBG, + uint16_t nb_rbs_required[MAX_NUM_CCs][NUMBER_OF_UE_MAX], + uint16_t nb_rbs_required_remaining[MAX_NUM_CCs][NUMBER_OF_UE_MAX], + unsigned char rballoc_sub[MAX_NUM_CCs][N_RBG_MAX], + unsigned char MIMO_mode_indicator[MAX_NUM_CCs][N_RBG_MAX]) + { - int i; + int i,j; UE_list_t *UE_list=&eNB_mac_inst[module_idP].UE_list; UE_sched_ctrl *ue_sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; rnti_t rnti = UE_RNTI(module_idP,UE_id); - + uint8_t *vrb_map = &eNB_mac_inst[module_idP].common_channels[CC_id].vrb_map; + int RBGsize = PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL/N_RBG; +#ifdef SF05_LIMIT + int subframe05_limit=0; + int sf05_upper=-1,sf05_lower=-1; +#endif + LTE_eNB_UE_stats *eNB_UE_stats = mac_xface->get_eNB_UE_stats(module_idP,CC_id,rnti); // initialize harq_pid and round mac_xface->get_ue_active_harq_pid(module_idP,CC_id,rnti, frameP,subframeP, &ue_sched_ctl->harq_pid[CC_id], &ue_sched_ctl->round[CC_id], 0); + if (ue_sched_ctl->ta_timer == 0) { + // WE SHOULD PROTECT the eNB_UE_stats with a mutex here ... + + ue_sched_ctl->ta_timer = 20; // wait 20 subframes before taking TA measurement from PHY + switch (PHY_vars_eNB_g[module_idP][CC_id]->lte_frame_parms.N_RB_DL) { + case 6: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update; + break; + + case 15: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/2; + break; + + case 25: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/4; + break; + + case 50: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/8; + break; + + case 75: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/12; + break; + + case 100: + ue_sched_ctl->ta_update = eNB_UE_stats->timing_advance_update/16; + break; + } + // clear the update in case PHY does not have a new measurement after timer expiry + eNB_UE_stats->timing_advance_update = 0; + } + else { + ue_sched_ctl->ta_timer--; + ue_sched_ctl->ta_update =0; // don't trigger a timing advance command + } nb_rbs_required[CC_id][UE_id]=0; ue_sched_ctl->pre_nb_available_rbs[CC_id] = 0; ue_sched_ctl->dl_pow_off[CC_id] = 2; nb_rbs_required_remaining[CC_id][UE_id] = 0; +#ifdef SF05_LIMIT + switch (N_RBG) { + case 6: + sf05_lower=0; + sf05_upper=5; + break; + case 8: + sf05_lower=2; + sf05_upper=5; + break; + case 13: + sf05_lower=4; + sf05_upper=7; + break; + case 17: + sf05_lower=7; + sf05_upper=9; + break; + case 25: + sf05_lower=11; + sf05_upper=13; + break; + } +#endif + // Initialize Subbands according to VRB map for (i=0; irballoc_sub_UE[CC_id][i] = 0; rballoc_sub[CC_id][i] = 0; +#ifdef SF05_LIMIT + // for avoiding 6+ PRBs around DC in subframe 0-5 (avoid excessive errors) + + if ((subframeP==0 || subframeP==5) && + (i>=sf05_lower && i<=sf05_upper)) + rballoc_sub[CC_id][i]=1; +#endif + // for SI-RNTI,RA-RNTI and P-RNTI allocations + for (j=0;jpre_allocated_nb_rb_ul > 0) { total_ue_count+=1; } - - if((mac_xface->get_nCCE_max(module_idP,CC_id) - nCCE_to_be_used[CC_id]) > (1<get_nCCE_max(module_idP,CC_id,3,subframeP) - nCCE_to_be_used[CC_id]) > (1<criticalExtensions.present = RRCConnectionReject__criticalExtensions_PR_c1; + rrcConnectionReject->criticalExtensions.choice.c1.present = RRCConnectionReject__criticalExtensions__c1_PR_rrcConnectionReject_r8; + /* let's put a wait time of 1s for the moment */ + rrcConnectionReject->criticalExtensions.choice.c1.choice.rrcConnectionReject_r8.waitTime = 1; + +#ifdef XER_PRINT + xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg); +#endif + enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message, + (void*)&dl_ccch_msg, + buffer, + 100); + AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %ld)!\n", + enc_rval.failed_type->name, enc_rval.encoded); + +#if defined(ENABLE_ITTI) +# if !defined(DISABLE_XER_SPRINT) + { + char message_string[20000]; + size_t message_string_size; + + if ((message_string_size = xer_sprint(message_string, sizeof(message_string), &asn_DEF_DL_CCCH_Message, (void *) &dl_ccch_msg)) > 0) { + MessageDef *msg_p; + + msg_p = itti_alloc_new_message_sized (TASK_RRC_ENB, RRC_DL_CCCH, message_string_size + sizeof (IttiMsgText)); + msg_p->ittiMsg.rrc_dl_ccch.size = message_string_size; + memcpy(&msg_p->ittiMsg.rrc_dl_ccch.text, message_string, message_string_size); + + itti_send_msg_to_task(TASK_UNKNOWN, Mod_id, msg_p); + } + } +# endif +#endif + +#ifdef USER_MODE + LOG_D(RRC,"RRCConnectionReject Encoded %d bits (%d bytes)\n", + enc_rval.encoded,(enc_rval.encoded+7)/8); +#endif + + return((enc_rval.encoded+7)/8); +} + uint8_t do_RRCConnectionRelease( uint8_t Mod_id, uint8_t *buffer, diff --git a/openair2/RRC/LITE/MESSAGES/asn1_msg.h b/openair2/RRC/LITE/MESSAGES/asn1_msg.h index b5747cb94b..9c5e72293a 100644 --- a/openair2/RRC/LITE/MESSAGES/asn1_msg.h +++ b/openair2/RRC/LITE/MESSAGES/asn1_msg.h @@ -218,6 +218,16 @@ do_RRCConnectionReestablishmentReject( uint8_t Mod_id, uint8_t* const buffer); +/** +\brief Generate an RRCConnectionReject DL-CCCH-Message (eNB). +@param Mod_id Module ID of eNB +@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU +@returns Size of encoded bit stream in bytes*/ +uint8_t +do_RRCConnectionReject( + uint8_t Mod_id, + uint8_t* const buffer); + /** \brief Generate an RRCConnectionRequest UL-CCCH-Message (UE) based on random string or S-TMSI. This routine only generates an mo-data establishment cause. diff --git a/openair2/RRC/LITE/defs.h b/openair2/RRC/LITE/defs.h index bae3dc887a..78240de082 100644 --- a/openair2/RRC/LITE/defs.h +++ b/openair2/RRC/LITE/defs.h @@ -212,9 +212,9 @@ typedef struct UE_RRC_INFO_s { } __attribute__ ((__packed__)) UE_RRC_INFO; typedef struct UE_S_TMSI_s { - uint8_t presence; - uint8_t mme_code; - uint32_t m_tmsi; + boolean_t presence; + mme_code_t mme_code; + m_tmsi_t m_tmsi; } __attribute__ ((__packed__)) UE_S_TMSI; #if defined(ENABLE_ITTI) diff --git a/openair2/RRC/LITE/rrc_eNB.c b/openair2/RRC/LITE/rrc_eNB.c index f19c3bced4..1d0b5f2902 100644 --- a/openair2/RRC/LITE/rrc_eNB.c +++ b/openair2/RRC/LITE/rrc_eNB.c @@ -540,8 +540,8 @@ rrc_eNB_get_next_transaction_identifier( //----------------------------------------------------------------------------- -// return 1 if there is already an UE with ue_identityP, 0 otherwise -static int +// return the ue context if there is already an UE with ue_identityP, NULL otherwise +static struct rrc_eNB_ue_context_s* rrc_eNB_ue_context_random_exist( const protocol_ctxt_t* const ctxt_pP, const uint64_t ue_identityP @@ -551,9 +551,28 @@ rrc_eNB_ue_context_random_exist( struct rrc_eNB_ue_context_s* ue_context_p = NULL; RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(eNB_rrc_inst[ctxt_pP->module_id].rrc_ue_head)) { if (ue_context_p->ue_context.random_ue_identity == ue_identityP) - return 1; + return ue_context_p; } - return 0; + return NULL; +} +//----------------------------------------------------------------------------- +// return the ue context if there is already an UE with the same S-TMSI(MMEC+M-TMSI), NULL otherwise +static struct rrc_eNB_ue_context_s* +rrc_eNB_ue_context_stmsi_exist( + const protocol_ctxt_t* const ctxt_pP, + const mme_code_t mme_codeP, + const m_tmsi_t m_tmsiP +) +//----------------------------------------------------------------------------- +{ + struct rrc_eNB_ue_context_s* ue_context_p = NULL; + RB_FOREACH(ue_context_p, rrc_ue_tree_s, &(eNB_rrc_inst[ctxt_pP->module_id].rrc_ue_head)) { + if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence == TRUE) + if (ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi == m_tmsiP) + if (ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code == mme_codeP) + return ue_context_p; + } + return NULL; } //----------------------------------------------------------------------------- @@ -963,6 +982,49 @@ rrc_eNB_generate_UECapabilityEnquiry( } +//----------------------------------------------------------------------------- +void +rrc_eNB_generate_RRCConnectionReject( + const protocol_ctxt_t* const ctxt_pP, + rrc_eNB_ue_context_t* const ue_context_pP, + const int CC_id +) +//----------------------------------------------------------------------------- +{ +#ifdef RRC_MSG_PRINT + int cnt; +#endif + + eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size = + do_RRCConnectionReject(ctxt_pP->module_id, + (uint8_t*) eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Payload); + +#ifdef RRC_MSG_PRINT + LOG_F(RRC,"[MSG] RRCConnectionReject\n"); + + for (cnt = 0; cnt < eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size; cnt++) { + LOG_F(RRC,"%02x ", ((uint8_t*)eNB_rrc_inst[ctxt_pP->module_id].Srb0.Tx_buffer.Payload)[cnt]); + } + + LOG_F(RRC,"\n"); +#endif + + MSC_LOG_TX_MESSAGE( + MSC_RRC_ENB, + MSC_RRC_UE, + eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.Header, + eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size, + MSC_AS_TIME_FMT" RRCConnectionReject UE %x size %u", + MSC_AS_TIME_ARGS(ctxt_pP), + ue_context_pP == NULL ? -1 : ue_context_pP->ue_context.rnti, + eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size); + + LOG_I(RRC, + PROTOCOL_RRC_CTXT_UE_FMT" [RAPROC] Logical Channel DL-CCCH, Generating RRCConnectionReject (bytes %d)\n", + PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), + eNB_rrc_inst[ctxt_pP->module_id].carrier[CC_id].Srb0.Tx_buffer.payload_size); +} + //----------------------------------------------------------------------------- void rrc_eNB_generate_RRCConnectionReestablishmentReject( @@ -3627,23 +3689,62 @@ rrc_eNB_decode_ccch( } else { rrcConnectionRequest = &ul_ccch_msg->message.choice.c1.choice.rrcConnectionRequest.criticalExtensions.choice.rrcConnectionRequest_r8; { - AssertFatal(rrcConnectionRequest->ue_Identity.present == InitialUE_Identity_PR_randomValue, - "unsupported InitialUE-Identity in RRCConnectionRequest"); - AssertFatal(rrcConnectionRequest->ue_Identity.choice.randomValue.size == 5, - "wrong InitialUE-Identity randomValue size, expected 5, provided %d", - rrcConnectionRequest->ue_Identity.choice.randomValue.size); - memcpy(((uint8_t*) & random_value) + 3, - rrcConnectionRequest->ue_Identity.choice.randomValue.buf, - rrcConnectionRequest->ue_Identity.choice.randomValue.size); - /* if there is already a registered UE (with another RNTI) with this random_value, - * the current one must be removed from MAC/PHY (zombie UE) - */ - if (rrc_eNB_ue_context_random_exist(ctxt_pP, random_value)) { - AssertFatal(0 == 1, "TODO: remove UE fro MAC/PHY (how?)"); - ue_context_p = NULL; + if (InitialUE_Identity_PR_randomValue == rrcConnectionRequest->ue_Identity.present) { + AssertFatal(rrcConnectionRequest->ue_Identity.choice.randomValue.size == 5, + "wrong InitialUE-Identity randomValue size, expected 5, provided %d", + rrcConnectionRequest->ue_Identity.choice.randomValue.size); + memcpy(((uint8_t*) & random_value) + 3, + rrcConnectionRequest->ue_Identity.choice.randomValue.buf, + rrcConnectionRequest->ue_Identity.choice.randomValue.size); + /* if there is already a registered UE (with another RNTI) with this random_value, + * the current one must be removed from MAC/PHY (zombie UE) + */ + if ((ue_context_p = rrc_eNB_ue_context_random_exist(ctxt_pP, random_value))) { +#warning "TODO: random_exist: remove UE from MAC/PHY (how?)" + // AssertFatal(0 == 1, "TODO: remove UE from MAC/PHY (how?)"); + ue_context_p = NULL; + } else { + ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, random_value); + } + } else if (InitialUE_Identity_PR_s_TMSI == rrcConnectionRequest->ue_Identity.present) { + /* Save s-TMSI */ + S_TMSI_t s_TMSI = rrcConnectionRequest->ue_Identity.choice.s_TMSI; + mme_code_t mme_code = BIT_STRING_to_uint8(&s_TMSI.mmec); + m_tmsi_t m_tmsi = BIT_STRING_to_uint32(&s_TMSI.m_TMSI); + random_value = (((uint64_t)mme_code) << 32) | m_tmsi; + if ((ue_context_p = rrc_eNB_ue_context_stmsi_exist(ctxt_pP, mme_code, m_tmsi))) { +#warning "TODO: stmsi_exist: remove UE from MAC/PHY (how?)" + // AssertFatal(0 == 1, "TODO: remove UE from MAC/PHY (how?)"); + ue_context_p = NULL; + } else { + ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, NOT_A_RANDOM_UE_IDENTITY); + } + ue_context_p->ue_context.Initialue_identity_s_TMSI.presence = TRUE; + ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code = mme_code; + ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi = m_tmsi; + + MSC_LOG_RX_MESSAGE( + MSC_RRC_ENB, + MSC_RRC_UE, + Srb_info->Rx_buffer.Payload, + dec_rval.consumed, + MSC_AS_TIME_FMT" RRCConnectionRequest UE %x size %u (s-TMSI mmec %u m_TMSI %u random UE id (0x%" PRIx64 ")", + MSC_AS_TIME_ARGS(ctxt_pP), + ue_context_p->ue_context.rnti, + dec_rval.consumed, + ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code, + ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi, + ue_context_p->ue_context.random_ue_identity); } else { - ue_context_p = rrc_eNB_get_next_free_ue_context(ctxt_pP, random_value); + LOG_E(RRC, + PROTOCOL_RRC_CTXT_UE_FMT" RRCConnectionRequest without random UE identity or S-TMSI not supported, let's reject the UE\n", + PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP)); + rrc_eNB_generate_RRCConnectionReject(ctxt_pP, + rrc_eNB_get_ue_context(&eNB_rrc_inst[ctxt_pP->module_id], ctxt_pP->rnti), + CC_id); + break; } + } LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" UE context: %X\n", @@ -3654,47 +3755,7 @@ rrc_eNB_decode_ccch( #if defined(ENABLE_ITTI) - /* Check s-TMSI presence in message */ - ue_context_p->ue_context.Initialue_identity_s_TMSI.presence = - (rrcConnectionRequest->ue_Identity.present == InitialUE_Identity_PR_s_TMSI); - - if (ue_context_p->ue_context.Initialue_identity_s_TMSI.presence) { - /* Save s-TMSI */ - S_TMSI_t s_TMSI = rrcConnectionRequest->ue_Identity.choice.s_TMSI; - - ue_context_p->ue_context.Initialue_identity_s_TMSI.mme_code = - BIT_STRING_to_uint8(&s_TMSI.mmec); - ue_context_p->ue_context.Initialue_identity_s_TMSI.m_tmsi = - BIT_STRING_to_uint32(&s_TMSI.m_TMSI); - - MSC_LOG_RX_DISCARDED_MESSAGE( - MSC_RRC_ENB, - MSC_RRC_UE, - Srb_info->Rx_buffer.Payload, - dec_rval.consumed, - MSC_AS_TIME_FMT" RRCConnectionRequest UE %x size %u (s-TMSI mmec %u m_TMSI %u random UE id (0x%" PRIx64 ")", - MSC_AS_TIME_ARGS(ctxt_pP), - ue_context_p->ue_context.rnti, - dec_rval.consumed, - s_TMSI.mmec, - s_TMSI.m_TMSI, - ue_context_p->ue_context.random_ue_identity); - - } else { - MSC_LOG_RX_DISCARDED_MESSAGE( - MSC_RRC_ENB, - MSC_RRC_UE, - Srb_info->Rx_buffer.Payload, - dec_rval.consumed, - MSC_AS_TIME_FMT" RRCConnectionRequest UE %x size %u random UE id (0x%" PRIx64 ")", - MSC_AS_TIME_ARGS(ctxt_pP), - ue_context_p->ue_context.rnti, - dec_rval.consumed, - ue_context_p->ue_context.random_ue_identity); - } - - ue_context_p->ue_context.establishment_cause = - rrcConnectionRequest->establishmentCause; + ue_context_p->ue_context.establishment_cause = rrcConnectionRequest->establishmentCause; LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Accept new connection from UE random UE identity (0x%" PRIx64 ") MME code %u TMSI %u cause %u\n", PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP), ue_context_p->ue_context.random_ue_identity, diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.c b/openair2/RRC/LITE/rrc_eNB_S1AP.c index 5c41658862..d93b8eea2f 100644 --- a/openair2/RRC/LITE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LITE/rrc_eNB_S1AP.c @@ -43,6 +43,7 @@ # include "RRC/LITE/defs.h" # include "rrc_eNB_UE_context.h" # include "rrc_eNB_S1AP.h" +# include "enb_config.h" # if defined(ENABLE_ITTI) # include "asn1_conversions.h" @@ -661,15 +662,16 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ( S1AP_NAS_FIRST_REQ (message_p).ue_identity.s_tmsi.mme_code = s_TMSI->mme_code; S1AP_NAS_FIRST_REQ (message_p).ue_identity.s_tmsi.m_tmsi = s_TMSI->m_tmsi; LOG_I(S1AP, "[eNB %d] Build S1AP_NAS_FIRST_REQ with s_TMSI: MME code %u M-TMSI %u ue %x\n", - ctxt_pP->module_id, - S1AP_NAS_FIRST_REQ (message_p).ue_identity.s_tmsi.mme_code, - S1AP_NAS_FIRST_REQ (message_p).ue_identity.s_tmsi.m_tmsi, - ue_context_pP->ue_context.rnti); + ctxt_pP->module_id, + S1AP_NAS_FIRST_REQ (message_p).ue_identity.s_tmsi.mme_code, + S1AP_NAS_FIRST_REQ (message_p).ue_identity.s_tmsi.m_tmsi, + ue_context_pP->ue_context.rnti); } if (rrcConnectionSetupComplete->registeredMME != NULL) { /* Fill GUMMEI */ struct RegisteredMME *r_mme = rrcConnectionSetupComplete->registeredMME; + int selected_plmn_identity = rrcConnectionSetupComplete->selectedPLMN_Identity; S1AP_NAS_FIRST_REQ (message_p).ue_identity.presenceMask |= UE_IDENTITIES_gummei; @@ -678,9 +680,9 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ( /* Use first indicated PLMN MCC if it is defined */ S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mcc = *r_mme->plmn_Identity->mcc->list.array[0]; LOG_I(S1AP, "[eNB %d] Build S1AP_NAS_FIRST_REQ adding in s_TMSI: GUMMEI MCC %u ue %x\n", - ctxt_pP->module_id, - S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mcc, - ue_context_pP->ue_context.rnti); + ctxt_pP->module_id, + S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mcc, + ue_context_pP->ue_context.rnti); } if (r_mme->plmn_Identity->mnc.list.count > 0) { @@ -691,6 +693,14 @@ rrc_eNB_send_S1AP_NAS_FIRST_REQ( S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mnc, ue_context_pP->ue_context.rnti); } + } else { + const Enb_properties_array_t *enb_properties_p = NULL; + enb_properties_p = enb_config_get(); + + // actually the eNB configuration contains only one PLMN (can be up to 6) + S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mcc = enb_properties_p->properties[ctxt_pP->module_id]->mcc; + S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mnc = enb_properties_p->properties[ctxt_pP->module_id]->mnc; + S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mnc_len = enb_properties_p->properties[ctxt_pP->module_id]->mnc_digit_length; } S1AP_NAS_FIRST_REQ (message_p).ue_identity.gummei.mme_code = BIT_STRING_to_uint8 (&r_mme->mmec); @@ -1178,7 +1188,7 @@ int rrc_eNB_process_S1AP_UE_CONTEXT_RELEASE_COMMAND (MessageDef *msg_p, const ch GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).rnti = ue_context_p->ue_context.rnti; for (e_rab = 0; e_rab < ue_context_p->ue_context.nb_of_e_rabs; e_rab++) { - GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).eps_bearer_id[GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_p).num_erab++] = + GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).eps_bearer_id[GTPV1U_ENB_DELETE_TUNNEL_REQ(msg_delete_tunnels_p).num_erab++] = ue_context_p->ue_context.enb_gtp_ebi[e_rab]; // erase data ue_context_p->ue_context.enb_gtp_teid[e_rab] = 0; diff --git a/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c b/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c index d92317f20b..2d17dd3e58 100644 --- a/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c +++ b/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c @@ -38,6 +38,14 @@ #include #include "bladerf_lib.h" +#ifdef __SSE4_1__ +# include +#endif + +#ifdef __AVX2__ +# include +#endif + int num_devices=0; /*These items configure the underlying asynch stream used by the the sync interface. */ @@ -47,16 +55,17 @@ int trx_brf_init(openair0_device *openair0) { } -openair0_timestamp trx_get_timestamp(openair0_device *device) { +openair0_timestamp trx_get_timestamp(openair0_device *device, bladerf_module module) { int status; struct bladerf_metadata meta; brf_state_t *brf = (brf_state_t*)device->priv; + memset(&meta, 0, sizeof(meta)); - if ((status=bladerf_get_timestamp(brf->dev, BLADERF_MODULE_TX, &meta.timestamp)) != 0) { - fprintf(stderr,"Failed to get current RX timestamp: %s\n",bladerf_strerror(status)); - } else { - printf("Current TX timestampe 0x%016"PRIx64"\n", meta.timestamp); - } + if ((status=bladerf_get_timestamp(brf->dev, module, &meta.timestamp)) != 0) { + fprintf(stderr,"Failed to get current %s timestamp: %s\n",(module == BLADERF_MODULE_RX ) ? "RX" : "TX", bladerf_strerror(status)); + return -1; + } // else {printf("Current RX timestampe 0x%016"PRIx64"\n", meta.timestamp); } + return meta.timestamp; } @@ -73,22 +82,26 @@ static void trx_brf_stats(openair0_device *device){ static int trx_brf_write(openair0_device *device,openair0_timestamp ptimestamp, void **buff, int nsamps, int cc) { - int status, i; + int status; brf_state_t *brf = (brf_state_t*)device->priv; /* BRF has only 1 rx/tx chaine : is it correct? */ - void *samples = (void*)buff[0]; + int16_t *samples = (int16_t*)buff[0]; - //brf->meta_tx.flags &= ~BLADERF_META_FLAG_TX_NOW; - brf->meta_tx.flags = BLADERF_META_FLAG_TX_BURST_START | - BLADERF_META_FLAG_TX_NOW | - BLADERF_META_FLAG_TX_BURST_END; - - brf->meta_tx.timestamp= (uint64_t) ptimestamp; - + //memset(&brf->meta_tx, 0, sizeof(brf->meta_tx)); + // When BLADERF_META_FLAG_TX_NOW is used the timestamp is not used, so one can't schedule a tx + if (brf->meta_tx.flags == 0 ) + brf->meta_tx.flags = (BLADERF_META_FLAG_TX_BURST_START);// | BLADERF_META_FLAG_TX_BURST_END);// | BLADERF_META_FLAG_TX_NOW); + + + brf->meta_tx.timestamp= (uint64_t) (ptimestamp); status = bladerf_sync_tx(brf->dev, samples, (unsigned int) nsamps, &brf->meta_tx, 2*brf->tx_timeout_ms); + + if (brf->meta_tx.flags == BLADERF_META_FLAG_TX_BURST_START) + brf->meta_tx.flags = BLADERF_META_FLAG_TX_UPDATE_TIMESTAMP; + if (status != 0) { - fprintf(stderr,"Failed to TX sample: %s\n", bladerf_strerror(status)); + //fprintf(stderr,"Failed to TX sample: %s\n", bladerf_strerror(status)); brf->num_tx_errors++; brf_error(status); } else if (brf->meta_tx.status & BLADERF_META_STATUS_UNDERRUN){ @@ -96,6 +109,8 @@ static int trx_brf_write(openair0_device *device,openair0_timestamp ptimestamp, fprintf(stderr, "TX Underrun detected. %u valid samples were read.\n", brf->meta_tx.actual_count); brf->num_underflows++; } + //printf("Provided TX timestampe %u, meta timestame %u\n", ptimestamp,brf->meta_tx.timestamp); + // printf("tx status %d \n",brf->meta_tx.status); brf->tx_current_ts=brf->meta_tx.timestamp; brf->tx_actual_nsamps+=brf->meta_tx.actual_count; @@ -107,26 +122,28 @@ static int trx_brf_write(openair0_device *device,openair0_timestamp ptimestamp, } static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) { - int status, ret; - - unsigned int i; + + int status=0; brf_state_t *brf = (brf_state_t*)device->priv; // BRF has only one rx/tx chain - void *samples = (void*)buff[0]; - - brf->meta_rx.flags |= BLADERF_META_FLAG_RX_NOW; + int16_t *samples = (int16_t*)buff[0]; + + brf->meta_rx.flags = BLADERF_META_FLAG_RX_NOW; status = bladerf_sync_rx(brf->dev, samples, (unsigned int) nsamps, &brf->meta_rx, 2*brf->rx_timeout_ms); + // printf("Current RX timestampe %u, nsamps %u, actual %u, cc %d\n", brf->meta_rx.timestamp, nsamps, brf->meta_rx.actual_count, cc); + if (status != 0) { fprintf(stderr, "RX failed: %s\n", bladerf_strerror(status)); + // printf("RX failed: %s\n", bladerf_strerror(status)); brf->num_rx_errors++; } else if ( brf->meta_rx.status & BLADERF_META_STATUS_OVERRUN) { brf->num_overflows++; - fprintf(stderr, "RX overrun (%d) is detected. t=0x%"PRIu64". Got %u samples. nsymps %d\n", - brf->num_overflows,brf->meta_rx.timestamp, brf->meta_rx.actual_count, nsamps); - //brf->meta_rx.timestamp=(unsigned int)(nsamps-brf->meta_rx.actual_count); - } + printf("RX overrun (%d) is detected. t=%u. Got %u samples. nsymps %d\n", + brf->num_overflows,brf->meta_rx.timestamp, brf->meta_rx.actual_count, nsamps); + } + //printf("Current RX timestampe %u\n", brf->meta_rx.timestamp); //printf("[BRF] (buff %p) ts=0x%"PRIu64" %s\n",samples, brf->meta_rx.timestamp,bladerf_strerror(status)); brf->rx_current_ts=brf->meta_rx.timestamp; brf->rx_actual_nsamps+=brf->meta_rx.actual_count; @@ -135,7 +152,7 @@ static int trx_brf_read(openair0_device *device, openair0_timestamp *ptimestamp, *ptimestamp = brf->meta_rx.timestamp; - + return brf->meta_rx.actual_count; } @@ -176,6 +193,23 @@ int trx_brf_stop(openair0_device* device) { int trx_brf_set_freq(openair0_device* device) { + int status; + brf_state_t *brf = (brf_state_t *)device->priv; + openair0_config_t *openair0_cfg = (openair0_config_t *)device->openair0_cfg; + + + if ((status=bladerf_set_frequency(brf->dev, BLADERF_MODULE_TX, (unsigned int) openair0_cfg->tx_freq[0])) != 0){ + fprintf(stderr,"Failed to set TX frequency: %s\n",bladerf_strerror(status)); + brf_error(status); + }else + printf("[BRF] set TX Frequency to %u\n", (unsigned int) openair0_cfg->tx_freq[0]); + + if ((status=bladerf_set_frequency(brf->dev, BLADERF_MODULE_RX, (unsigned int) openair0_cfg->rx_freq[0])) != 0){ + fprintf(stderr,"Failed to set RX frequency: %s\n",bladerf_strerror(status)); + brf_error(status); + } else + printf("[BRF] set RX frequency to %u\n",(unsigned int)openair0_cfg->rx_freq[0]); + return(0); } @@ -185,25 +219,662 @@ int trx_brf_set_gains(openair0_device* device) { } -int device_init(openair0_device *device, openair0_config_t *openair0_cfg, char *cfgfile) { +#define RXDCLENGTH 16384 +int16_t cos_fsover8[8] = {2047, 1447, 0, -1448, -2047, -1448, 0, 1447}; +int16_t cos_3fsover8[8] = {2047, -1448, 0, 1447, -2047, 1447, 0, -1448}; +rx_gain_calib_table_t calib_table_fx4[] = { + {2300000000.0,53.5}, + {1880000000.0,57.0}, + {816000000.0,73.0}, + {-1,0}}; + +void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index) { + + int i=0; + // loop through calibration table to find best adjustment factor for RX frequency + double min_diff = 6e9,diff; + + while (openair0_cfg->rx_gain_calib_table[i].freq>0) { + diff = fabs(openair0_cfg->rx_freq[chain_index] - openair0_cfg->rx_gain_calib_table[i].freq); + printf("cal %d: freq %f, offset %f, diff %f\n", + i, + openair0_cfg->rx_gain_calib_table[i].freq, + openair0_cfg->rx_gain_calib_table[i].offset,diff); + if (min_diff > diff) { + min_diff = diff; + openair0_cfg->rx_gain_offset[chain_index] = openair0_cfg->rx_gain_calib_table[i].offset; + } + i++; + } + +} + +void calibrate_rf(openair0_device *device) { + + + brf_state_t *brf = (brf_state_t *)device->priv; + openair0_timestamp ptimestamp; + int16_t *calib_buffp,*calib_tx_buffp; + int16_t calib_buff[2*RXDCLENGTH]; + int16_t calib_tx_buff[2*RXDCLENGTH]; + int i,j,offI,offQ,offIold,offQold,offInew,offQnew,offphase,offphaseold,offphasenew,offgain,offgainold,offgainnew; + int32_t meanI,meanQ,meanIold,meanQold; + int cnt=0,loop; + + // put TX on a far-away frequency to avoid interference in RX band + bladerf_set_frequency(brf->dev,BLADERF_MODULE_TX, (unsigned int) device->openair0_cfg->rx_freq[0] + 200e6); + // Set gains to close to max + bladerf_set_gain(brf->dev, BLADERF_MODULE_RX, 60); + bladerf_set_gain(brf->dev, BLADERF_MODULE_TX, 60); + + // fill TX buffer with fs/8 complex sinusoid + j=0; + for (i=0;idev,BLADERF_MODULE_RX,BLADERF_CORR_LMS_DCOFF_I,offIold); + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_LMS_DCOFF_Q,offQold); + for (i=0;i<10;i++) + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + + for (meanIold=meanQold=i=j=0;i (%d,%d)\n",offIold,offQold,meanIold,meanQold); + + offI=offQ=-2048; + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_LMS_DCOFF_I,offI); + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_LMS_DCOFF_Q,offQ); + for (i=0;i<10;i++) + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + + for (meanI=meanQ=i=j=0;i (%d,%d)\n",offI,offQ,meanI,meanQ); + + while (cnt++ < 12) { + + offInew=(offIold+offI)>>1; + offQnew=(offQold+offQ)>>1; + + if (meanI*meanI < meanIold*meanIold) { + meanIold = meanI; + offIold = offI; + printf("[BRF] *** RX DC: offI %d => %d\n",offIold,meanI); + } + if (meanQ*meanQ < meanQold*meanQold) { + meanQold = meanQ; + offQold = offQ; + printf("[BRF] *** RX DC: offQ %d => %d\n",offQold,meanQ); + } + offI = offInew; + offQ = offQnew; + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_LMS_DCOFF_I,offI); + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_LMS_DCOFF_Q,offQ); + + for (i=0;i<10;i++) + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + + for (meanI=meanQ=i=j=0;i (%d,%d)\n",offI,offQ,meanI,meanQ); + } + + printf("[BRF] RX DC: (%d,%d) => (%d,%d)\n",offIold,offQold,meanIold,meanQold); + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_LMS_DCOFF_I,offIold); + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_LMS_DCOFF_Q,offQold); + + // TX DC offset + // PUT TX as f_RX + fs/4 + // loop back BLADERF_LB_RF_LNA1 + bladerf_set_frequency(brf->dev,BLADERF_MODULE_TX, (unsigned int) device->openair0_cfg->rx_freq[0] + (unsigned int) device->openair0_cfg->sample_rate/4); + bladerf_set_loopback (brf->dev,BLADERF_LB_RF_LNA1); + + offIold=2048; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_I,offIold); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + for (meanIold=meanQold=i=j=0;i (%d,%d)\n",offIold,meanIold,meanQold); + + offI=-2048; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_I,offI); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + for (meanI=meanQ=i=j=0;i (%d,%d)\n",offI,meanI,meanQ); + cnt = 0; + while (cnt++ < 12) { + + offInew=(offIold+offI)>>1; + if (meanI*meanI+meanQ*meanQ < meanIold*meanIold +meanQold*meanQold) { + printf("[BRF] TX DC (offI): ([%d,%d]) => %d : %d\n",offIold,offI,offInew,meanI*meanI+meanQ*meanQ); + meanIold = meanI; + meanQold = meanQ; + offIold = offI; + } + offI = offInew; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_I,offI); + + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + for (meanI=meanQ=i=j=0;i (%d,%d)\n",offI,meanI,meanQ); + } + + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_I,offIold); + + offQold=2048; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_Q,offQold); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on fs/4 + for (meanIold=meanQold=i=j=0;i (%d,%d)\n",offQold,meanIold,meanQold); + + offQ=-2048; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_Q,offQ); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + for (meanI=meanQ=i=j=0;i (%d,%d)\n",offQ,meanI,meanQ); + + cnt=0; + while (cnt++ < 12) { + + offQnew=(offQold+offQ)>>1; + if (meanI*meanI+meanQ*meanQ < meanIold*meanIold +meanQold*meanQold) { + printf("[BRF] TX DC (offQ): ([%d,%d]) => %d : %d\n",offQold,offQ,offQnew,meanI*meanI+meanQ*meanQ); + + meanIold = meanI; + meanQold = meanQ; + offQold = offQ; + } + offQ = offQnew; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_Q,offQ); + + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + for (meanI=meanQ=i=j=0;i (%d,%d)\n",offQ,meanI,meanQ); + } + + printf("[BRF] TX DC: (%d,%d) => (%d,%d)\n",offIold,offQold,meanIold,meanQold); + + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_LMS_DCOFF_Q,offQold); + + // TX IQ imbalance + for (loop=0;loop<2;loop++) { + offphaseold=4096; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_PHASE,offphaseold); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on fs/8 (Image of TX signal in +ve frequencies) + for (meanIold=meanQold=i=j=0;i>11; + meanQold+= (calib_buff[j]*cos_fsover8[(i+2)&7] + calib_buff[j+1]*cos_fsover8[i&7])>>11; + j+=2; + } + + meanIold/=RXDCLENGTH; + meanQold/=RXDCLENGTH; + printf("[BRF] TX IQ (offphase): %d => (%d,%d)\n",offphaseold,meanIold,meanQold); + + offphase=-4096; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_PHASE,offphase); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on fs/8 (Image of TX signal in +ve frequencies) + for (meanI=meanQ=i=j=0;i>11; + meanQ+= (calib_buff[j]*cos_fsover8[(i+2)&7] + calib_buff[j+1]*cos_fsover8[i&7])>>11; + j+=2; + } + + meanI/=RXDCLENGTH; + meanQ/=RXDCLENGTH; + printf("[BRF] TX IQ (offphase): %d => (%d,%d)\n",offphase,meanI,meanQ); + + cnt=0; + while (cnt++ < 13) { + + offphasenew=(offphaseold+offphase)>>1; + printf("[BRF] TX IQ (offphase): ([%d,%d]) => %d : %d\n",offphaseold,offphase,offphasenew,meanI*meanI+meanQ*meanQ); + if (meanI*meanI+meanQ*meanQ < meanIold*meanIold +meanQold*meanQold) { + + + meanIold = meanI; + meanQold = meanQ; + offphaseold = offphase; + } + offphase = offphasenew; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_PHASE,offphase); + + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on fs/8 (Image of TX signal in +ve frequencies) + for (meanI=meanQ=i=j=0;i>11; + meanQ+= (calib_buff[j]*cos_fsover8[(i+2)&7] + calib_buff[j+1]*cos_fsover8[i&7])>>11; + j+=2; + } + meanI/=RXDCLENGTH; + meanQ/=RXDCLENGTH; + + // printf("[BRF] TX DC (offQ): %d => (%d,%d)\n",offQ,meanI,meanQ); + } + + printf("[BRF] TX IQ offphase: %d => (%d,%d)\n",offphaseold,meanIold,meanQold); + + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_PHASE,offphaseold); + + offgainold=4096; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_GAIN,offgainold); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on fs/8 (Image of TX signal in +ve frequencies) + for (meanIold=meanQold=i=j=0;i>11; + meanQold+= (calib_buff[j]*cos_fsover8[(i+2)&7] + calib_buff[j+1]*cos_fsover8[i&7])>>11; + j+=2; + } + + meanIold/=RXDCLENGTH; + meanQold/=RXDCLENGTH; + printf("[BRF] TX IQ (offgain): %d => (%d,%d)\n",offgainold,meanIold,meanQold); + + offgain=-4096; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_GAIN,offgain); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on fs/8 (Image of TX signal in +ve frequencies) + for (meanI=meanQ=i=j=0;i>11; + meanQ+= (calib_buff[j]*cos_fsover8[(i+2)&7] + calib_buff[j+1]*cos_fsover8[i&7])>>11; + j+=2; + } + + meanI/=RXDCLENGTH; + meanQ/=RXDCLENGTH; + printf("[BRF] TX IQ (offgain): %d => (%d,%d)\n",offgain,meanI,meanQ); + + cnt=0; + while (cnt++ < 13) { + + offgainnew=(offgainold+offgain)>>1; + if (meanI*meanI+meanQ*meanQ < meanIold*meanIold +meanQold*meanQold) { + printf("[BRF] TX IQ (offgain): ([%d,%d]) => %d : %d\n",offgainold,offgain,offgainnew,meanI*meanI+meanQ*meanQ); + + meanIold = meanI; + meanQold = meanQ; + offgainold = offgain; + } + offgain = offgainnew; + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_GAIN,offgain); + + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on fs/8 (Image of TX signal in +ve frequencies) + for (meanI=meanQ=i=j=0;i>11; + meanQ+= (calib_buff[j]*cos_fsover8[(i+2)&7] + calib_buff[j+1]*cos_fsover8[i&7])>>11; + j+=2; + } + meanI/=RXDCLENGTH; + meanQ/=RXDCLENGTH; + + // printf("[BRF] TX DC (offQ): %d => (%d,%d)\n",offQ,meanI,meanQ); + } + + printf("[BRF] TX IQ offgain: %d => (%d,%d)\n",offgainold,meanIold,meanQold); + + bladerf_set_correction(brf->dev,BLADERF_MODULE_TX,BLADERF_CORR_FPGA_GAIN,offgainold); + } + + // RX IQ imbalance + for (loop=0;loop<2;loop++) { + offphaseold=4096; + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_PHASE,offphaseold); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on -3fs/8 (Image of TX signal in -ve frequencies) + for (meanIold=meanQold=i=j=0;i>11; + meanQold+= (calib_buff[j]*cos_3fsover8[(i+2)&7] + calib_buff[j+1]*cos_3fsover8[i&7])>>11; + j+=2; + } + + meanIold/=RXDCLENGTH; + meanQold/=RXDCLENGTH; + printf("[BRF] RX IQ (offphase): %d => (%d,%d)\n",offphaseold,meanIold,meanQold); + + offphase=-4096; + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_PHASE,offphase); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on -3fs/8 (Image of TX signal in -ve frequencies) + for (meanI=meanQ=i=j=0;i>11; + meanQ+= (calib_buff[j]*cos_3fsover8[(i+2)&7] + calib_buff[j+1]*cos_3fsover8[i&7])>>11; + j+=2; + } + + meanI/=RXDCLENGTH; + meanQ/=RXDCLENGTH; + printf("[BRF] RX IQ (offphase): %d => (%d,%d)\n",offphase,meanI,meanQ); + + cnt=0; + while (cnt++ < 13) { + + offphasenew=(offphaseold+offphase)>>1; + printf("[BRF] RX IQ (offphase): ([%d,%d]) => %d : %d\n",offphaseold,offphase,offphasenew,meanI*meanI+meanQ*meanQ); + if (meanI*meanI+meanQ*meanQ < meanIold*meanIold +meanQold*meanQold) { + + + meanIold = meanI; + meanQold = meanQ; + offphaseold = offphase; + } + offphase = offphasenew; + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_PHASE,offphase); + + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on -3fs/8 (Image of TX signal in -ve frequencies) + for (meanI=meanQ=i=j=0;i>11; + meanQ+= (calib_buff[j]*cos_3fsover8[(i+2)&7] + calib_buff[j+1]*cos_3fsover8[i&7])>>11; + j+=2; + } + meanI/=RXDCLENGTH; + meanQ/=RXDCLENGTH; + + // printf("[BRF] TX DC (offQ): %d => (%d,%d)\n",offQ,meanI,meanQ); + } + + printf("[BRF] RX IQ offphase: %d => (%d,%d)\n",offphaseold,meanIold,meanQold); + + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_PHASE,offphaseold); + + offgainold=4096; + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_GAIN,offgainold); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on -3fs/8 (Image of TX signal in +ve frequencies) + for (meanIold=meanQold=i=j=0;i>11; + meanQold+= (calib_buff[j]*cos_3fsover8[(i+2)&7] + calib_buff[j+1]*cos_3fsover8[i&7])>>11; + j+=2; + } + + meanIold/=RXDCLENGTH; + meanQold/=RXDCLENGTH; + printf("[BRF] RX IQ (offgain): %d => (%d,%d)\n",offgainold,meanIold,meanQold); + + offgain=-4096; + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_GAIN,offgain); + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on 3fs/8 (Image of TX signal in -ve frequencies) + for (meanI=meanQ=i=j=0;i>11; + meanQ+= (calib_buff[j]*cos_3fsover8[(i+2)&7] + calib_buff[j+1]*cos_3fsover8[i&7])>>11; + j+=2; + } + + meanI/=RXDCLENGTH; + meanQ/=RXDCLENGTH; + printf("[BRF] RX IQ (offgain): %d => (%d,%d)\n",offgain,meanI,meanQ); + + cnt=0; + while (cnt++ < 13) { + + offgainnew=(offgainold+offgain)>>1; + if (meanI*meanI+meanQ*meanQ < meanIold*meanIold +meanQold*meanQold) { + printf("[BRF] RX IQ (offgain): ([%d,%d]) => %d : %d\n",offgainold,offgain,offgainnew,meanI*meanI+meanQ*meanQ); + + meanIold = meanI; + meanQold = meanQ; + offgainold = offgain; + } + offgain = offgainnew; + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_GAIN,offgain); + + for (i=0;i<10;i++) { + trx_brf_read(device, &ptimestamp, (void **)&calib_buffp, RXDCLENGTH, 0); + trx_brf_write(device,ptimestamp+5*RXDCLENGTH, (void **)&calib_tx_buffp, RXDCLENGTH, 0); + } + // project on -3fs/8 (Image of TX signal in -ve frequencies) + for (meanI=meanQ=i=j=0;i>11; + meanQ+= (calib_buff[j]*cos_3fsover8[(i+2)&7] + calib_buff[j+1]*cos_3fsover8[i&7])>>11; + j+=2; + } + meanI/=RXDCLENGTH; + meanQ/=RXDCLENGTH; + + // printf("[BRF] TX DC (offQ): %d => (%d,%d)\n",offQ,meanI,meanQ); + } + + printf("[BRF] RX IQ offgain: %d => (%d,%d)\n",offgainold,meanIold,meanQold); + + bladerf_set_correction(brf->dev,BLADERF_MODULE_RX,BLADERF_CORR_FPGA_GAIN,offgainold); + } + + bladerf_set_frequency(brf->dev,BLADERF_MODULE_TX, (unsigned int) device->openair0_cfg->tx_freq[0]); + bladerf_set_loopback(brf->dev,BLADERF_LB_NONE); + bladerf_set_gain(brf->dev, BLADERF_MODULE_RX, (unsigned int) device->openair0_cfg->rx_gain[0]-device->openair0_cfg[0].rx_gain_offset[0]); + bladerf_set_gain(brf->dev, BLADERF_MODULE_TX, (unsigned int) device->openair0_cfg->tx_gain[0]); + // write_output("blade_rf_test.m","rxs",calib_buff,RXDCLENGTH,1,1); +} + +int openair0_dev_init_bladerf(openair0_device *device, openair0_config_t *openair0_cfg) { int status; int card=0; brf_state_t *brf = (brf_state_t*)malloc(sizeof(brf_state_t)); memset(brf, 0, sizeof(brf_state_t)); - // init required params for BRF - brf->num_buffers = 128; - brf->buffer_size = (unsigned int) openair0_cfg[card].samples_per_packet*sizeof(int32_t); // buffer size = 4096 for sample_len of 1024 - brf->num_transfers = 16; - brf->rx_timeout_ms = 0; - brf->tx_timeout_ms = 0; - brf->sample_rate=(unsigned int)openair0_cfg[card].sample_rate; + // init required params - - printf("\n[BRF] sampling_rate %d, num_buffers %d, buffer_size %d, num transfer %d, timeout_ms (rx %d, tx %d)\n", - brf->sample_rate, brf->num_buffers, brf->buffer_size,brf->num_transfers, brf->rx_timeout_ms, brf->tx_timeout_ms); + switch ((int)openair0_cfg->sample_rate) { + case 30720000: + openair0_cfg->samples_per_packet = 2048; + openair0_cfg->tx_sample_advance = 0; + openair0_cfg->tx_scheduling_advance = 8*openair0_cfg->samples_per_packet; + break; + case 15360000: + openair0_cfg->samples_per_packet = 2048; + openair0_cfg->tx_sample_advance = 0; + openair0_cfg->tx_scheduling_advance = 4*openair0_cfg->samples_per_packet; + break; + case 7680000: + openair0_cfg->samples_per_packet = 1024; + openair0_cfg->tx_sample_advance = 0; + openair0_cfg->tx_scheduling_advance = 4*openair0_cfg->samples_per_packet; + break; + case 1920000: + openair0_cfg->samples_per_packet = 256; + openair0_cfg->tx_sample_advance = 50; + openair0_cfg->tx_scheduling_advance = 8*openair0_cfg->samples_per_packet; + break; + default: + printf("Error: unknown sampling rate %f\n",openair0_cfg->sample_rate); + exit(-1); + break; + } + openair0_cfg->iq_txshift= 0; + openair0_cfg->iq_rxrescale = 15; /*not sure*/ + openair0_cfg->rx_gain_calib_table = calib_table_fx4; + // The number of buffers to use in the underlying data stream + brf->num_buffers = 128; + // the size of the underlying stream buffers, in samples + brf->buffer_size = (unsigned int) openair0_cfg->samples_per_packet;//*sizeof(int32_t); // buffer size = 4096 for sample_len of 1024 + brf->num_transfers = 16; + brf->rx_timeout_ms = 0; + brf->tx_timeout_ms = 0; + brf->sample_rate=(unsigned int)openair0_cfg->sample_rate; + + memset(&brf->meta_rx, 0, sizeof(brf->meta_rx)); + memset(&brf->meta_tx, 0, sizeof(brf->meta_tx)); + + printf("\n[BRF] sampling_rate %d, num_buffers %d, buffer_size %d, num transfer %d, timeout_ms (rx %d, tx %d)\n", + brf->sample_rate, brf->num_buffers, brf->buffer_size,brf->num_transfers, brf->rx_timeout_ms, brf->tx_timeout_ms); + if ((status=bladerf_open(&brf->dev, "")) != 0 ) { fprintf(stderr,"Failed to open brf device: %s\n",bladerf_strerror(status)); brf_error(status); @@ -217,83 +888,81 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg, char * printf("[BRF] Device does not operates at max speed, change the USB port\n"); brf_error(BLADERF_ERR_UNSUPPORTED); } - // RX + // RX // Example of CLI output: RX Frequency: 2539999999Hz - if ((status=bladerf_set_frequency(brf->dev, BLADERF_MODULE_RX, (unsigned int) openair0_cfg[card].rx_freq[0])) != 0){ + if ((status=bladerf_set_frequency(brf->dev, BLADERF_MODULE_RX, (unsigned int) openair0_cfg->rx_freq[0])) != 0){ fprintf(stderr,"Failed to set RX frequency: %s\n",bladerf_strerror(status)); brf_error(status); } else - printf("[BRF] set RX frequency to %f\n",openair0_cfg[card].rx_freq[0]); + printf("[BRF] set RX frequency to %u\n",(unsigned int)openair0_cfg->rx_freq[0]); - - if ((status=bladerf_set_sample_rate(brf->dev, BLADERF_MODULE_RX, (unsigned int)openair0_cfg[card].sample_rate, NULL)) != 0){ + + + unsigned int actual_value=0; + if ((status=bladerf_set_sample_rate(brf->dev, BLADERF_MODULE_RX, (unsigned int) openair0_cfg->sample_rate, &actual_value)) != 0){ fprintf(stderr,"Failed to set RX sample rate: %s\n", bladerf_strerror(status)); brf_error(status); - }else - printf("[BRF] set RX sample rate to %f\n",openair0_cfg[card].sample_rate); + }else + printf("[BRF] set RX sample rate to %u, %u\n", (unsigned int) openair0_cfg->sample_rate, actual_value); - if ((status=bladerf_set_bandwidth(brf->dev, BLADERF_MODULE_RX, (unsigned int) openair0_cfg[card].rx_bw, NULL)) != 0){ + + if ((status=bladerf_set_bandwidth(brf->dev, BLADERF_MODULE_RX, (unsigned int) openair0_cfg->rx_bw*2, &actual_value)) != 0){ fprintf(stderr,"Failed to set RX bandwidth: %s\n", bladerf_strerror(status)); brf_error(status); }else - printf("[BRF] set RX bandwidth to %f\n",openair0_cfg[card].rx_bw); + printf("[BRF] set RX bandwidth to %u, %u\n",(unsigned int)openair0_cfg->rx_bw*2, actual_value); - if ((status=bladerf_set_gain(brf->dev, BLADERF_MODULE_RX, (int) openair0_cfg[card].rx_gain[0])) != 0) { + set_rx_gain_offset(&openair0_cfg[0],0); + if ((status=bladerf_set_gain(brf->dev, BLADERF_MODULE_RX, (int) openair0_cfg->rx_gain[0]-openair0_cfg[0].rx_gain_offset[0])) != 0) { fprintf(stderr,"Failed to set RX gain: %s\n",bladerf_strerror(status)); brf_error(status); } else - printf("[BRF] set RX gain to %f\n",openair0_cfg[card].rx_gain[0]); + printf("[BRF] set RX gain to %d (%d)\n",(int)(openair0_cfg->rx_gain[0]-openair0_cfg[0].rx_gain_offset[0]),(int)openair0_cfg[0].rx_gain_offset[0]); - /* Configure the device's RX module for use with the sync interface. - * SC16 Q11 samples *with* metadata are used. */ - if ((status=bladerf_sync_config(brf->dev, BLADERF_MODULE_RX, BLADERF_FORMAT_SC16_Q11_META,brf->num_buffers,brf->buffer_size,brf->num_transfers,brf->rx_timeout_ms)) != 0 ) { - fprintf(stderr,"Failed to configure RX sync interface: %s\n", bladerf_strerror(status)); - brf_error(status); - }else - printf("[BRF] configured Rx for sync interface \n"); - - /* We must always enable the RX module after calling bladerf_sync_config(), and - * before attempting to RX samples via bladerf_sync_rx(). */ - if ((status=bladerf_enable_module(brf->dev, BLADERF_MODULE_RX, true)) != 0) { - fprintf(stderr,"Failed to enable RX module: %s\n", bladerf_strerror(status)); - brf_error(status); - }else - printf("[BRF] RX module enabled \n"); - // TX - if ((status=bladerf_set_frequency(brf->dev, BLADERF_MODULE_TX, (unsigned int) openair0_cfg[card].tx_freq[0])) != 0){ + + if ((status=bladerf_set_frequency(brf->dev, BLADERF_MODULE_TX, (unsigned int) openair0_cfg->tx_freq[0])) != 0){ fprintf(stderr,"Failed to set TX frequency: %s\n",bladerf_strerror(status)); brf_error(status); }else - printf("[BRF] set Tx Frequenct to %f \n", openair0_cfg[card].tx_freq[0]); + printf("[BRF] set TX Frequency to %u\n", (unsigned int) openair0_cfg->tx_freq[0]); - if ((status=bladerf_set_sample_rate(brf->dev, BLADERF_MODULE_TX, (unsigned int) openair0_cfg[card].sample_rate, NULL)) != 0){ + if ((status=bladerf_set_sample_rate(brf->dev, BLADERF_MODULE_TX, (unsigned int) openair0_cfg->sample_rate, NULL)) != 0){ fprintf(stderr,"Failed to set TX sample rate: %s\n", bladerf_strerror(status)); brf_error(status); }else - printf("[BRF] set Tx sampling rate to %f \n", openair0_cfg[card].sample_rate); + printf("[BRF] set TX sampling rate to %u \n", (unsigned int) openair0_cfg->sample_rate); - if ((status=bladerf_set_bandwidth(brf->dev, BLADERF_MODULE_TX,(unsigned int)openair0_cfg[card].tx_bw, NULL)) != 0){ - fprintf(stderr, "Failed to set RX bandwidth: %s\n", bladerf_strerror(status)); + if ((status=bladerf_set_bandwidth(brf->dev, BLADERF_MODULE_TX,(unsigned int)openair0_cfg->tx_bw*2, NULL)) != 0){ + fprintf(stderr, "Failed to set TX bandwidth: %s\n", bladerf_strerror(status)); brf_error(status); }else - printf("[BRF] set Tx sampling ratebandwidth to %f \n", openair0_cfg[card].tx_bw); + printf("[BRF] set TX bandwidth to %u \n", (unsigned int) openair0_cfg->tx_bw*2); - if ((status=bladerf_set_gain(brf->dev, BLADERF_MODULE_TX, (int)openair0_cfg[card].tx_gain[0])) != 0) { + if ((status=bladerf_set_gain(brf->dev, BLADERF_MODULE_TX, (int) openair0_cfg->tx_gain[0])) != 0) { fprintf(stderr,"Failed to set TX gain: %s\n",bladerf_strerror(status)); brf_error(status); }else - printf("[BRF] set the Tx gain to %f \n", openair0_cfg[card].tx_gain[0]); + printf("[BRF] set the TX gain to %d\n", (int)openair0_cfg->tx_gain[0]); + - - /* Configure the device's TX module for use with the sync interface. + /* Configure the device's TX module for use with the sync interface. * SC16 Q11 samples *with* metadata are used. */ if ((status=bladerf_sync_config(brf->dev, BLADERF_MODULE_TX,BLADERF_FORMAT_SC16_Q11_META,brf->num_buffers,brf->buffer_size,brf->num_transfers,brf->tx_timeout_ms)) != 0 ) { fprintf(stderr,"Failed to configure TX sync interface: %s\n", bladerf_strerror(status)); brf_error(status); }else - printf("[BRF] configured tx for sync interface \n"); + printf("[BRF] configured TX sync interface \n"); + +/* Configure the device's RX module for use with the sync interface. + * SC16 Q11 samples *with* metadata are used. */ + if ((status=bladerf_sync_config(brf->dev, BLADERF_MODULE_RX, BLADERF_FORMAT_SC16_Q11_META,brf->num_buffers,brf->buffer_size,brf->num_transfers,brf->rx_timeout_ms)) != 0 ) { + fprintf(stderr,"Failed to configure RX sync interface: %s\n", bladerf_strerror(status)); + brf_error(status); + }else + printf("[BRF] configured Rx sync interface \n"); + /* We must always enable the TX module after calling bladerf_sync_config(), and * before attempting to TX samples via bladerf_sync_tx(). */ @@ -303,7 +972,31 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg, char * } else printf("[BRF] TX module enabled \n"); - bladerf_log_set_verbosity(get_brf_log_level(openair0_cfg[card].log_level)); + /* We must always enable the RX module after calling bladerf_sync_config(), and + * before attempting to RX samples via bladerf_sync_rx(). */ + if ((status=bladerf_enable_module(brf->dev, BLADERF_MODULE_RX, true)) != 0) { + fprintf(stderr,"Failed to enable RX module: %s\n", bladerf_strerror(status)); + brf_error(status); + }else + printf("[BRF] RX module enabled \n"); + + // calibrate + + if ((status=bladerf_calibrate_dc(brf->dev, BLADERF_MODULE_TX)) != 0) { + fprintf(stderr,"Failed to calibrate TX DC: %s\n", bladerf_strerror(status)); + brf_error(status); + } else + printf("[BRF] TX module calibrated DC \n"); + + if ((status=bladerf_calibrate_dc(brf->dev, BLADERF_MODULE_RX)) != 0) { + fprintf(stderr,"Failed to calibrate RX DC: %s\n", bladerf_strerror(status)); + brf_error(status); + }else + printf("[BRF] RX module calibrated DC \n"); + + + + bladerf_log_set_verbosity(get_brf_log_level(openair0_cfg->log_level)); printf("BLADERF: Initializing openair0_device\n"); device->priv = brf; @@ -318,32 +1011,11 @@ int device_init(openair0_device *device, openair0_config_t *openair0_cfg, char * device->trx_stop_func = trx_brf_stop; device->trx_set_freq_func = trx_brf_set_freq; device->trx_set_gains_func = trx_brf_set_gains; + device->openair0_cfg = openair0_cfg; - if(brf->sample_rate==30.72e6) { - openair0_cfg->tx_delay = 8; - openair0_cfg->tx_forward_nsamps = 175; - brf->tx_forward_nsamps = 175; - } - if(brf->sample_rate==15.36e6) { - openair0_cfg->tx_delay = 5; - openair0_cfg->tx_forward_nsamps = 95; - brf->tx_forward_nsamps = 95; - } - if(brf->sample_rate==7.68e6) { - openair0_cfg->tx_delay = 8; - openair0_cfg->tx_forward_nsamps = 0; - brf->tx_forward_nsamps = 0; - } - if(brf->sample_rate==1.92e6) { - openair0_cfg->tx_delay = 8; - openair0_cfg->tx_forward_nsamps = 40; - brf->tx_forward_nsamps = 40; - } - - openair0_cfg->iq_txshift= 0; - openair0_cfg->iq_rxrescale = 15; /*not sure*/ + calibrate_rf(device); - memcpy((void*)&device->openair0_cfg,(void*)openair0_cfg,sizeof(openair0_config_t)); + // memcpy((void*)&device->openair0_cfg,(void*)&openair0_cfg[0],sizeof(openair0_config_t)); return 0; } @@ -385,7 +1057,7 @@ struct bladerf * open_bladerf_from_serial(const char *serial) { int get_brf_log_level(int log_level){ int level=BLADERF_LOG_LEVEL_INFO; - //return BLADERF_LOG_LEVEL_DEBUG; + return BLADERF_LOG_LEVEL_DEBUG; // BLADERF_LOG_LEVEL_VERBOSE;// BLADERF_LOG_LEVEL_DEBUG; // switch(log_level) { case LOG_DEBUG: level=BLADERF_LOG_LEVEL_DEBUG; diff --git a/targets/ARCH/COMMON/common_lib.c b/targets/ARCH/COMMON/common_lib.c index 6d98aeed26..7fa71168c8 100644 --- a/targets/ARCH/COMMON/common_lib.c +++ b/targets/ARCH/COMMON/common_lib.c @@ -44,11 +44,6 @@ #include "common_lib.h" -/* - FT: The device interface is implemented in a shared library, the softmodem knows which kind - of harware is used by parsing the device name returned when calling the trx_getinfo_func function - provided by this shared library -*/ int set_device(openair0_device *device) { switch (device->type) { diff --git a/targets/ARCH/COMMON/common_lib.h b/targets/ARCH/COMMON/common_lib.h index 0b4825714b..500a7cb2c3 100644 --- a/targets/ARCH/COMMON/common_lib.h +++ b/targets/ARCH/COMMON/common_lib.h @@ -76,6 +76,11 @@ typedef enum { max_gain=0,med_gain,byp_gain } rx_gain_t; +typedef enum { + duplex_mode_TDD=1,duplex_mode_FDD=0 +} duplex_mode_t; + + /** @addtogroup _PHY_RF_INTERFACE_ * @{ */ @@ -91,7 +96,9 @@ typedef struct { //! Module ID for this configuration int Mod_id; // device log level - unsigned int log_level; + int log_level; + //! duplexing mode + duplex_mode_t duplex_mode; //! number of downlink resource blocks int num_rb_dl; //! number of samples per frame @@ -99,15 +106,16 @@ typedef struct { //! the sample rate for both transmit and receive. double sample_rate; //! number of samples per RX/TX packet (USRP + Ethernet) - unsigned int samples_per_packet; - // delay in sending samples (write) due to hardware access, softmodem processing and fronthaul delay if exist - int tx_delay; - //! adjust the position of the samples after delay when sending - unsigned int tx_forward_nsamps; + unsigned int samples_per_packet; + //! delay in sending samples (write) due to hardware access, softmodem processing and fronthaul delay if exist + int tx_scheduling_advance; + //! offset in samples between TX and RX paths + int tx_sample_advance; //! configurable tx thread lauch delay int txlaunch_wait; /* 1 or 0 */ + //! configurable tx thread lauch delay int txlaunch_wait_slotcount; - //! number of RX channels (=RX antennas) + //! number of RX channels (=RX antennas) int rx_num_channels; //! number of TX channels (=TX antennas) int tx_num_channels; @@ -117,6 +125,10 @@ typedef struct { //! \brief Center frequency in Hz for TX. //! index: [0..rx_num_channels[ !!! see lte-ue.c:427 FIXME iterates over rx_num_channels double tx_freq[4]; + + //! \brief Pointer to Calibration table for RX gains + rx_gain_calib_table_t *rx_gain_calib_table; + //! mode for rxgain (ExpressMIMO2) rx_gain_t rxg_mode[4]; //! \brief Gain for RX in dB. @@ -163,8 +175,10 @@ typedef enum { MIN_RF_DEV_TYPE = 0, /*!\brief device is ExpressMIMO */ EXMIMO_DEV, - /*!\brief device is USRP*/ - USRP_DEV, + /*!\brief device is USRP B200/B210*/ + USRP_B200_DEV, + /*!\brief device is USRP X300/X310*/ + USRP_X300_DEV, /*!\brief device is BLADE RF*/ BLADERF_DEV, /*!\brief device is NONE*/ @@ -210,8 +224,8 @@ struct openair0_device_t { /*!brief Type of the device's host (BBU/RRH) */ host_type_t host_type; - /*!brief RF frontend parameters set by application */ - openair0_config_t openair0_cfg; + /* !brief RF frontend parameters set by application */ + openair0_config_t *openair0_cfg; /*!brief Can be used by driver to hold internal structure*/ void *priv; @@ -313,6 +327,7 @@ extern "C" /*! \brief Set the RX frequency of USRP RF TARGET */ int openair0_set_rx_frequencies(openair0_device* device, openair0_config_t *openair0_cfg); +/*@}*/ #ifdef __cplusplus } diff --git a/targets/ARCH/EXMIMO/DEFS/pcie_interface.h b/targets/ARCH/EXMIMO/DEFS/pcie_interface.h index 925787cabf..713480b40b 100644 --- a/targets/ARCH/EXMIMO/DEFS/pcie_interface.h +++ b/targets/ARCH/EXMIMO/DEFS/pcie_interface.h @@ -316,7 +316,9 @@ typedef struct { // // In TDD mode, there are two ways to control the RX/TX switch: // 1. using the LSB from the TX data (TXRXSWITCH_LSB) +// only the LSB from RF chain set in the ACTIVE_RF register controls the switch on all the chains // 2. using FPGA logic, based on switch_offset[0..3] +// this mode is not tested well and should be used with care #define DUPLEXMODE_MASK (1<<0) #define DUPLEXMODE_FDD 0 #define DUPLEXMODE_TDD (1<<0) @@ -330,6 +332,11 @@ typedef struct { #define SWITCHSTATE_1 (1<<3) #define TEST_ADACLOOP_MASK (1<<4) #define TEST_ADACLOOP_EN (1<<4) +#define RF_ACTIVE_MASK (15<<5) +#define RF_ACTIVE_1 (1<<5) +#define RF_ACTIVE_2 (2<<5) +#define RF_ACTIVE_3 (4<<5) +#define RF_ACTIVE_4 (8<<5) typedef enum { BW5, diff --git a/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c b/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c index 05105d60df..a1cc474435 100644 --- a/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c +++ b/targets/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c @@ -298,6 +298,7 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag) int ant, card; int resampling_factor=2; int rx_filter=RXLPF25, tx_filter=TXLPF25; + int ACTIVE_RF=0; exmimo_config_t *p_exmimo_config; exmimo_id_t *p_exmimo_id; @@ -317,8 +318,6 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag) else p_exmimo_config->framing.eNB_flag = !UE_flag; - p_exmimo_config->framing.tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_LSB; - if (openair0_num_detected_cards==1) p_exmimo_config->framing.multicard_syncmode=SYNCMODE_FREE; else if (card==0) @@ -357,6 +356,7 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag) for (ant=0; ant<4; ant++) { if (openair0_cfg[card].rx_freq[ant] || openair0_cfg[card].tx_freq[ant]) { + ACTIVE_RF += (1<rf.rf_mode[ant] = RF_MODE_BASE; p_exmimo_config->rf.do_autocal[ant] = 1;//openair0_cfg[card].autocal[ant]; printf("card %d, antenna %d, autocal %d\n",card,ant,openair0_cfg[card].autocal[ant]); @@ -410,6 +410,15 @@ int openair0_config(openair0_config_t *openair0_cfg, int UE_flag) } } + if (openair0_cfg[card].duplex_mode==duplex_mode_FDD) { + p_exmimo_config->framing.tdd_config = DUPLEXMODE_FDD; + printf("!!!!!setting FDD (tdd_config=%d)\n",p_exmimo_config->framing.tdd_config); + } + else { + p_exmimo_config->framing.tdd_config = DUPLEXMODE_TDD + TXRXSWITCH_LSB + ACTIVE_RF; + printf("!!!!!setting TDD (tdd_config=%d)\n",p_exmimo_config->framing.tdd_config); + } + ret = ioctl(openair0_fd, openair_DUMP_CONFIG, card); if (ret!=0) diff --git a/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10 b/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10 index 2889dfa80f..d79e46df76 100755 Binary files a/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10 and b/targets/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10 differ diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 2dea91dc84..d72b905696 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -171,31 +172,45 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp #endif - - if (cc>1) { + if (device->type == USRP_B200_IF) { + if (cc>1) { // receive multiple channels (e.g. RF A and RF B) - std::vector buff_ptrs; - for (int i=0;irx_stream->recv(buff_ptrs, nsamps, s->rx_md); - } else { + std::vector buff_ptrs; + + for (int i=0;irx_stream->recv(buff_ptrs, nsamps, s->rx_md); + } else { // receive a single channel (e.g. from connector RF A) - samples_received = s->rx_stream->recv(buff_tmp[0], nsamps, s->rx_md); - } - + samples_received = s->rx_stream->recv(buff_tmp[0], nsamps, s->rx_md); + } + // bring RX data into 12 LSBs for softmodem RX - for (int i=0;itype == USRP_X300_IF) { + if (cc>1) { + // receive multiple channels (e.g. RF A and RF B) + std::vector buff_ptrs; + + for (int i=0;irx_stream->recv(buff_ptrs, nsamps, s->rx_md); + } else { + // receive a single channel (e.g. from connector RF A) + samples_received = s->rx_stream->recv(buff[0], nsamps, s->rx_md); } + } + if (samples_received < nsamps) { printf("[recv] received %d samples out of %d\n",samples_received,nsamps); @@ -279,7 +294,7 @@ int trx_usrp_set_gains(openair0_device* device, exit(-1); } s->usrp->set_rx_gain(openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0]); - printf("Setting USRP RX gain to %f\n", openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0]); + printf("Setting USRP RX gain to %f (rx_gain %f,gain_range.stop() %f)\n", openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0],openair0_cfg[0].rx_gain[0],gain_range.stop()); return(0); } @@ -289,27 +304,69 @@ int trx_usrp_stop(int card) { } -rx_gain_calib_table_t calib_table[] = { - {3500000000.0,46.0}, - {2660000000.0,53.0}, - {2300000000.0,54.0}, - {1880000000.0,55.0}, - {816000000.0,62.0}, +rx_gain_calib_table_t calib_table_b210[] = { + {3500000000.0,44.0}, + {2660000000.0,49.0}, + {2300000000.0,50.0}, + {1880000000.0,53.0}, + {816000000.0,58.0}, {-1,0}}; -void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index) { +rx_gain_calib_table_t calib_table_b210_38[] = { + {3500000000.0,44.0}, + {2660000000.0,49.8}, + {2300000000.0,51.0}, + {1880000000.0,53.0}, + {816000000.0,57.0}, + {-1,0}}; + +rx_gain_calib_table_t calib_table_x310[] = { + {3500000000.0,77.0}, + {2660000000.0,81.0}, + {2300000000.0,81.0}, + {1880000000.0,82.0}, + {816000000.0,85.0}, + {-1,0}}; + +void set_rx_gain_offset(openair0_config_t *openair0_cfg, int chain_index,int bw_gain_adjust) { int i=0; // loop through calibration table to find best adjustment factor for RX frequency - double min_diff = 6e9,diff; - - while (calib_table[i].freq>0) { - diff = fabs(openair0_cfg->rx_freq[chain_index] - calib_table[i].freq); + double min_diff = 6e9,diff,gain_adj=0.0; + if (bw_gain_adjust==1) { + switch ((int)openair0_cfg[0].sample_rate) { + case 30720000: + break; + case 23040000: + gain_adj=1.25; + break; + case 15360000: + gain_adj=3.0; + break; + case 7680000: + gain_adj=6.0; + break; + case 3840000: + gain_adj=9.0; + break; + case 1920000: + gain_adj=12.0; + break; + default: + printf("unknown sampling rate %d\n",(int)openair0_cfg[0].sample_rate); + exit(-1); + break; + } + } + while (openair0_cfg->rx_gain_calib_table[i].freq>0) { + diff = fabs(openair0_cfg->rx_freq[chain_index] - openair0_cfg->rx_gain_calib_table[i].freq); printf("cal %d: freq %f, offset %f, diff %f\n", - i,calib_table[i].freq,calib_table[i].offset,diff); + i, + openair0_cfg->rx_gain_calib_table[i].freq, + openair0_cfg->rx_gain_calib_table[i].offset,diff); if (min_diff > diff) { min_diff = diff; - openair0_cfg->rx_gain_offset[chain_index] = calib_table[i].offset; + openair0_cfg->rx_gain_offset[chain_index] = openair0_cfg->rx_gain_calib_table[i].offset+gain_adj; } i++; } @@ -338,6 +395,7 @@ extern "C" { // Initialize USRP device +<<<<<<< HEAD std::string args = "type=b200"; @@ -345,6 +403,17 @@ extern "C" { size_t i; printf("Checking for USRPs\n"); +======= + uhd::device_addrs_t device_adds = uhd::device::find(args); + size_t i; + + int vers=0,subvers=0,subsubvers=0; + int bw_gain_adjust=0; + + sscanf(uhd::get_version_string().c_str(),"%d.%d.%d",&vers,&subvers,&subsubvers); + + printf("Checking for USRPs : UHD %s (%d.%d.%d)\n",uhd::get_version_string().c_str(),vers,subvers,subsubvers); +>>>>>>> acd607fa359709ba16a83437f483c230cee1d9b0 if(device_adds.size() == 0) { @@ -358,6 +427,7 @@ extern "C" { uhd::device_addrs_t device_adds = uhd::device::find(args); if(device_adds.size() == 0) +<<<<<<< HEAD { std::cerr<<"No USRP Device Found. " << std::endl; free(s); @@ -365,6 +435,16 @@ extern "C" { } +======= + { + std::cerr<<"No USRP Device Found. " << std::endl; + free(s); + return -1; + + } + + +>>>>>>> acd607fa359709ba16a83437f483c230cee1d9b0 printf("Found USRP X300\n"); s->usrp = uhd::usrp::multi_usrp::make(args); // s->usrp->set_rx_subdev_spec(rx_subdev); @@ -373,11 +453,54 @@ extern "C" { // lock mboard clocks s->usrp->set_clock_source("internal"); + //Setting device type to USRP X300/X310 + device->type=USRP_X300_IF; + // this is not working yet, master clock has to be set via constructor // set master clock rate and sample rate for tx & rx for streaming //s->usrp->set_master_clock_rate(usrp_master_clock); + + openair0_cfg[0].rx_gain_calib_table = calib_table_x310; + + switch ((int)openair0_cfg[0].sample_rate) { + case 30720000: + // from usrp_time_offset + openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 15; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet; + break; + case 15360000: + openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 45; + openair0_cfg[0].tx_bw = 10e6; + openair0_cfg[0].rx_bw = 10e6; + openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet; + break; + case 7680000: + openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 50; + openair0_cfg[0].tx_bw = 5e6; + openair0_cfg[0].rx_bw = 5e6; + openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet; + break; + case 1920000: + openair0_cfg[0].samples_per_packet = 256; + openair0_cfg[0].tx_sample_advance = 50; + openair0_cfg[0].tx_bw = 1.25e6; + openair0_cfg[0].rx_bw = 1.25e6; + openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet; + break; + default: + printf("Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); + exit(-1); + break; + } + } else { printf("Found USRP B200"); + args += ",num_recv_frames=256" ; s->usrp = uhd::usrp::multi_usrp::make(args); // s->usrp->set_rx_subdev_spec(rx_subdev); @@ -387,18 +510,84 @@ extern "C" { // // lock mboard clocks // s->usrp->set_clock_source("internal"); // set master clock rate and sample rate for tx & rx for streaming - s->usrp->set_master_clock_rate(30.72e6); + + device->type = USRP_B200_IF; + +<<<<<<< HEAD + +======= + + if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) { + openair0_cfg[0].rx_gain_calib_table = calib_table_b210; + bw_gain_adjust=0; + } + else { + openair0_cfg[0].rx_gain_calib_table = calib_table_b210_38; + bw_gain_adjust=1; + } + switch ((int)openair0_cfg[0].sample_rate) { + case 30720000: + s->usrp->set_master_clock_rate(30.72e6); + // from usrp_time_offset + openair0_cfg[0].samples_per_packet = 4096; + openair0_cfg[0].tx_sample_advance = 115; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + openair0_cfg[0].tx_scheduling_advance = 11*openair0_cfg[0].samples_per_packet; + break; + case 23040000: + s->usrp->set_master_clock_rate(46.08e6); + openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 113; + openair0_cfg[0].tx_bw = 20e6; + openair0_cfg[0].rx_bw = 20e6; + openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet; + break; + case 15360000: + s->usrp->set_master_clock_rate(30.72e6); + openair0_cfg[0].samples_per_packet = 2048; + openair0_cfg[0].tx_sample_advance = 113; + openair0_cfg[0].tx_bw = 10e6; + openair0_cfg[0].rx_bw = 10e6; + openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet; + break; + case 7680000: + s->usrp->set_master_clock_rate(30.72e6); + openair0_cfg[0].samples_per_packet = 1024; + openair0_cfg[0].tx_sample_advance = 70;//103; + openair0_cfg[0].tx_bw = 5e6; + openair0_cfg[0].rx_bw = 5e6; + openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet; + break; + case 1920000: + s->usrp->set_master_clock_rate(30.72e6); + openair0_cfg[0].samples_per_packet = 256; + openair0_cfg[0].tx_sample_advance = 40; + openair0_cfg[0].tx_bw = 1.25e6; + openair0_cfg[0].rx_bw = 1.25e6; + openair0_cfg[0].tx_scheduling_advance = 8*openair0_cfg[0].samples_per_packet; + break; + default: + printf("Error: unknown sampling rate %f\n",openair0_cfg[0].sample_rate); + exit(-1); + break; + } } - +>>>>>>> acd607fa359709ba16a83437f483c230cee1d9b0 for(i=0;iusrp->get_rx_num_channels();i++) { if (iusrp->set_rx_rate(openair0_cfg[0].sample_rate,i); s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i); - printf("Setting rx freq/gain on channel %lu/%lu\n",i,s->usrp->get_rx_num_channels()); + printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6); s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i); +<<<<<<< HEAD set_rx_gain_offset(&openair0_cfg[0],i); +======= + set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust); + +>>>>>>> acd607fa359709ba16a83437f483c230cee1d9b0 ::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(i); // limit to maximum gain if (openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] > gain_range.stop()) { @@ -416,7 +605,7 @@ extern "C" { if (iusrp->set_tx_rate(openair0_cfg[0].sample_rate,i); s->usrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i); - printf("Setting tx freq/gain on channel %lu/%lu\n",i,s->usrp->get_tx_num_channels()); + printf("Setting tx freq/gain on channel %lu/%lu: BW %f (readback %f)\n",i,s->usrp->get_tx_num_channels(),openair0_cfg[0].tx_bw/1e6,s->usrp->get_tx_bandwidth(i)/1e6); s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i); s->usrp->set_tx_gain(openair0_cfg[0].tx_gain[i],i); } diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.exmimo2.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.exmimo2.conf index 0071b7d002..9444a6f95e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.exmimo2.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band38.tm1.exmimo2.conf @@ -17,7 +17,7 @@ eNBs = mobile_country_code = "208"; - mobile_network_code = "92"; + mobile_network_code = "93"; ////////// Physical parameters: @@ -131,7 +131,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.13.11"; + mme_ip_address = ( { ipv4 = "192.168.12.70"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -141,10 +141,10 @@ eNBs = NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpb210.conf index 1d47abdd60..e083ea0f4e 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpb210.conf @@ -17,7 +17,7 @@ eNBs = mobile_country_code = "208"; - mobile_network_code = "92"; + mobile_network_code = "93"; ////////// Physical parameters: @@ -28,7 +28,7 @@ eNBs = tdd_config_s = 0; prefix_type = "NORMAL"; eutra_band = 7; - downlink_frequency = 2660000000L; + downlink_frequency = 2680000000L; uplink_frequency_offset = -120000000; Nid_cell = 0; N_RB_DL = 100; @@ -36,7 +36,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 90; - rx_gain = 120; + rx_gain = 127; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; @@ -130,7 +130,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.13.11"; + mme_ip_address = ( { ipv4 = "192.168.12.11"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -140,10 +140,10 @@ eNBs = NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf index 7b02ad538f..210c7ea740 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.100PRB.usrpx310.conf @@ -35,7 +35,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 32; - rx_gain = 84; + rx_gain = 116; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf new file mode 100644 index 0000000000..d4b88383e2 --- /dev/null +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.25PRB.usrpx310.epc.remote.conf @@ -0,0 +1,169 @@ +Active_eNBs = ( "eNB_Eurecom_LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB_Eurecom_LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = "1"; + + mobile_country_code = "208"; + mobile_network_code = "92"; + + ////////// Physical parameters: + + component_carriers = ( + { + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 32; + rx_gain = 116; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 32; + pdsch_referenceSignalPower = -16; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -108; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; + /* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; + */ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "192.168.12.26"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.111/24"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.111/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + log_config : + { + global_log_level ="debug"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + + } +); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.bladerfx40.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.bladerfx40.conf new file mode 100644 index 0000000000..5f7ac3d65f --- /dev/null +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.bladerfx40.conf @@ -0,0 +1,171 @@ +Active_eNBs = ( "eNB_Eurecom_LTEBox"); +# Asn1_verbosity, choice in: none, info, annoying +Asn1_verbosity = "none"; + +eNBs = +( + { + ////////// Identification parameters: + eNB_ID = 0xe00; + + cell_type = "CELL_MACRO_ENB"; + + eNB_name = "eNB_Eurecom_LTEBox"; + + // Tracking area code, 0x0000 and 0xfffe are reserved values + tracking_area_code = "1"; + + mobile_country_code = "208"; + + mobile_network_code = "92"; + + ////////// Physical parameters: + + component_carriers = ( + { + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2680000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 50; + Nid_cell_mbsfn = 0; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 60; + rx_gain = 60; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 32; + pdsch_referenceSignalPower = -26; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; + srs_enable = "DISABLE"; + /* srs_BandwidthConfig =; + srs_SubframeConfig =; + srs_ackNackST =; + srs_MaxUpPts =;*/ + + pusch_p0_Nominal = -90; + pusch_alpha = "AL1"; + pucch_p0_Nominal = -108; + msg3_delta_Preamble = 6; + pucch_deltaF_Format1 = "deltaF2"; + pucch_deltaF_Format1b = "deltaF3"; + pucch_deltaF_Format2 = "deltaF0"; + pucch_deltaF_Format2a = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; + + rach_numberOfRA_Preambles = 64; + rach_preamblesGroupAConfig = "DISABLE"; +/* + rach_sizeOfRA_PreamblesGroupA = ; + rach_messageSizeGroupA = ; + rach_messagePowerOffsetGroupB = ; +*/ + rach_powerRampingStep = 4; + rach_preambleInitialReceivedTargetPower = -108; + rach_preambleTransMax = 10; + rach_raResponseWindowSize = 10; + rach_macContentionResolutionTimer = 48; + rach_maxHARQ_Msg3Tx = 4; + + pcch_default_PagingCycle = 128; + pcch_nB = "oneT"; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; + + } + ); + + + srb1_parameters : + { + # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] + timer_poll_retransmit = 80; + + # timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200] + timer_reordering = 35; + + # timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500] + timer_status_prohibit = 0; + + # poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)] + poll_pdu = 4; + + # poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)] + poll_byte = 99999; + + # max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32] + max_retx_threshold = 4; + } + + # ------- SCTP definitions + SCTP : + { + # Number of streams to use in input/output + SCTP_INSTREAMS = 2; + SCTP_OUTSTREAMS = 2; + }; + + ////////// MME parameters: + mme_ip_address = ( { ipv4 = "192.168.13.11"; + ipv6 = "192:168:30::17"; + active = "yes"; + preference = "ipv4"; + } + ); + + NETWORK_INTERFACES : + { + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; + + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 + }; + + log_config : + { + global_log_level ="info"; + global_log_verbosity ="medium"; + hw_log_level ="info"; + hw_log_verbosity ="medium"; + phy_log_level ="info"; + phy_log_verbosity ="medium"; + mac_log_level ="info"; + mac_log_verbosity ="high"; + rlc_log_level ="info"; + rlc_log_verbosity ="medium"; + pdcp_log_level ="info"; + pdcp_log_verbosity ="medium"; + rrc_log_level ="info"; + rrc_log_verbosity ="medium"; + }; + + } +); diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf index 8f9dc280ae..e94e7c79a9 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf @@ -28,7 +28,7 @@ eNBs = tdd_config_s = 0; prefix_type = "NORMAL"; eutra_band = 7; - downlink_frequency = 2660000000L; + downlink_frequency = 2680000000L; uplink_frequency_offset = -120000000; Nid_cell = 0; N_RB_DL = 50; @@ -36,7 +36,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 90; - rx_gain = 118; + rx_gain = 125; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; @@ -66,7 +66,7 @@ eNBs = pusch_p0_Nominal = -90; pusch_alpha = "AL1"; - pucch_p0_Nominal = -108; + pucch_p0_Nominal = -96; msg3_delta_Preamble = 6; pucch_deltaF_Format1 = "deltaF2"; pucch_deltaF_Format1b = "deltaF3"; @@ -140,10 +140,10 @@ eNBs = NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf index e8a8fc8573..d0488f2d37 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpx310.conf @@ -35,7 +35,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 32; - rx_gain = 82; + rx_gain = 118; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf index bdbb46a98b..5c53803c4d 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.bladerfx40.conf @@ -17,7 +17,7 @@ eNBs = mobile_country_code = "208"; - mobile_network_code = "92"; + mobile_network_code = "93"; ////////// Physical parameters: @@ -35,8 +35,8 @@ eNBs = Nid_cell_mbsfn = 0; nb_antennas_tx = 1; nb_antennas_rx = 1; - tx_gain = 20; - rx_gain = 20; + tx_gain = 60; + rx_gain = 120; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; @@ -46,7 +46,7 @@ eNBs = pucch_nRB_CQI = 1; pucch_nCS_AN = 0; pucch_n1_AN = 32; - pdsch_referenceSignalPower = -26; + pdsch_referenceSignalPower = -29; pdsch_p_b = 0; pusch_n_SB = 1; pusch_enable64QAM = "DISABLE"; @@ -132,7 +132,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.13.11"; + mme_ip_address = ( { ipv4 = "192.168.12.11"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -142,10 +142,10 @@ eNBs = NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf index 212f341580..3ce32398f7 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.conf @@ -17,7 +17,7 @@ eNBs = mobile_country_code = "208"; - mobile_network_code = "92"; + mobile_network_code = "93"; ////////// Physical parameters: @@ -31,7 +31,7 @@ eNBs = downlink_frequency = 2680000000L; uplink_frequency_offset = -120000000; Nid_cell = 0; - N_RB_DL = 50; + N_RB_DL = 25; Nid_cell_mbsfn = 0; nb_antennas_tx = 1; nb_antennas_rx = 1; @@ -131,7 +131,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "10.0.1.1"; + mme_ip_address = ( { ipv4 = "192.168.12.171"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -140,11 +140,11 @@ eNBs = NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth3"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.1.229/24"; + ENB_INTERFACE_NAME_FOR_S1_MME = "eth2"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.80/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth3"; - ENB_IPV4_ADDRESS_FOR_S1U = "10.0.1.229/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth2"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.80/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf index 2f11e42ba9..4a9113282f 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf @@ -28,7 +28,7 @@ eNBs = tdd_config_s = 0; prefix_type = "NORMAL"; eutra_band = 7; - downlink_frequency = 2680000000L; + downlink_frequency = 2660000000L; uplink_frequency_offset = -120000000; Nid_cell = 0; N_RB_DL = 25; @@ -36,7 +36,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 90; - rx_gain = 120; + rx_gain = 125; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; @@ -143,10 +143,10 @@ eNBs = NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.216/24"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.212/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.216/24"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.212/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf index e864f47edb..75969c04fd 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf @@ -16,50 +16,49 @@ eNBs = tracking_area_code = "1"; mobile_country_code = "208"; - mobile_network_code = "95"; ////////// Physical parameters: component_carriers = ( { - frame_type = "FDD"; - tdd_config = 3; - tdd_config_s = 0; - prefix_type = "NORMAL"; - eutra_band = 7; - downlink_frequency = 2660000000L; - uplink_frequency_offset = -120000000; - Nid_cell = 0; - N_RB_DL = 25; - Nid_cell_mbsfn = 0; - nb_antennas_tx = 1; - nb_antennas_rx = 1; - tx_gain = 90; - rx_gain = 120; - prach_root = 0; - prach_config_index = 0; - prach_high_speed = "DISABLE"; - prach_zero_correlation = 1; - prach_freq_offset = 2; - pucch_delta_shift = 1; - pucch_nRB_CQI = 1; - pucch_nCS_AN = 0; - pucch_n1_AN = 32; - pdsch_referenceSignalPower = -26; - pdsch_p_b = 0; - pusch_n_SB = 1; - pusch_enable64QAM = "DISABLE"; - pusch_hoppingMode = "interSubFrame"; - pusch_hoppingOffset = 0; - pusch_groupHoppingEnabled = "ENABLE"; - pusch_groupAssignment = 0; - pusch_sequenceHoppingEnabled = "DISABLE"; - pusch_nDMRS1 = 1; - phich_duration = "NORMAL"; - phich_resource = "ONESIXTH"; + frame_type = "FDD"; + tdd_config = 3; + tdd_config_s = 0; + prefix_type = "NORMAL"; + eutra_band = 7; + downlink_frequency = 2660000000L; + uplink_frequency_offset = -120000000; + Nid_cell = 0; + N_RB_DL = 25; + Nid_cell_mbsfn = 0; + nb_antennas_tx = 1; + nb_antennas_rx = 1; + tx_gain = 90; + rx_gain = 132; + prach_root = 0; + prach_config_index = 0; + prach_high_speed = "DISABLE"; + prach_zero_correlation = 1; + prach_freq_offset = 2; + pucch_delta_shift = 1; + pucch_nRB_CQI = 1; + pucch_nCS_AN = 0; + pucch_n1_AN = 32; + pdsch_referenceSignalPower = -26; + pdsch_p_b = 0; + pusch_n_SB = 1; + pusch_enable64QAM = "DISABLE"; + pusch_hoppingMode = "interSubFrame"; + pusch_hoppingOffset = 0; + pusch_groupHoppingEnabled = "ENABLE"; + pusch_groupAssignment = 0; + pusch_sequenceHoppingEnabled = "DISABLE"; + pusch_nDMRS1 = 1; + phich_duration = "NORMAL"; + phich_resource = "ONESIXTH"; srs_enable = "DISABLE"; - /* srs_BandwidthConfig =; + /* srs_BandwidthConfig =; srs_SubframeConfig =; srs_ackNackST =; srs_MaxUpPts =;*/ @@ -72,15 +71,15 @@ eNBs = pucch_deltaF_Format1b = "deltaF3"; pucch_deltaF_Format2 = "deltaF0"; pucch_deltaF_Format2a = "deltaF0"; - pucch_deltaF_Format2b = "deltaF0"; + pucch_deltaF_Format2b = "deltaF0"; rach_numberOfRA_Preambles = 64; rach_preamblesGroupAConfig = "DISABLE"; - /* + /* rach_sizeOfRA_PreamblesGroupA = ; rach_messageSizeGroupA = ; rach_messagePowerOffsetGroupB = ; - */ + */ rach_powerRampingStep = 4; rach_preambleInitialReceivedTargetPower = -108; rach_preambleTransMax = 10; @@ -90,16 +89,17 @@ eNBs = pcch_default_PagingCycle = 128; pcch_nB = "oneT"; - bcch_modificationPeriodCoeff = 2; - ue_TimersAndConstants_t300 = 1000; - ue_TimersAndConstants_t301 = 1000; - ue_TimersAndConstants_t310 = 1000; - ue_TimersAndConstants_t311 = 10000; - ue_TimersAndConstants_n310 = 20; - ue_TimersAndConstants_n311 = 1; + bcch_modificationPeriodCoeff = 2; + ue_TimersAndConstants_t300 = 1000; + ue_TimersAndConstants_t301 = 1000; + ue_TimersAndConstants_t310 = 1000; + ue_TimersAndConstants_t311 = 10000; + ue_TimersAndConstants_n310 = 20; + ue_TimersAndConstants_n311 = 1; } ); + srb1_parameters : { # timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500] @@ -129,28 +129,25 @@ eNBs = SCTP_OUTSTREAMS = 2; }; - ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.188.2.2"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ( {ipv4 = "192.170.0.1"; + ipv6="192:168:30::17"; + active="yes"; + preference="ipv4";}); NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "tun2"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.188.2.2/24"; + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0:3"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.170.0.2/24"; - ENB_INTERFACE_NAME_FOR_S1U = "lo"; - ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.1/24"; - ENB_PORT_FOR_S1U = 2153; # Spec 2152 + ENB_INTERFACE_NAME_FOR_S1U = "eth0:4"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.170.0.2/24"; + ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; log_config : { - global_log_level ="info"; + global_log_level ="debug"; global_log_verbosity ="medium"; hw_log_level ="info"; hw_log_verbosity ="medium"; @@ -164,10 +161,6 @@ eNBs = pdcp_log_verbosity ="medium"; rrc_log_level ="info"; rrc_log_verbosity ="medium"; - gtpu_log_level ="info"; - gtpu_log_verbosity ="medium"; - udp_log_level ="info"; - udp_log_verbosity ="medium"; }; } diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf index 21303ebc71..375a4a90ca 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf @@ -35,7 +35,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 90; - rx_gain = 120; + rx_gain = 132; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; @@ -130,20 +130,18 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.12.62"; - ipv6 = "192:168:30::17"; - active = "yes"; - preference = "ipv4"; - } - ); + mme_ip_address = ( {ipv4 = "192.168.12.17"; + ipv6="192:168:30::17"; + active="yes"; + preference="ipv4";}); NETWORK_INTERFACES : { - ENB_INTERFACE_NAME_FOR_S1_MME = "eth1"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.82/24"; + ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24"; - ENB_INTERFACE_NAME_FOR_S1U = "eth1"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.82/24"; + ENB_INTERFACE_NAME_FOR_S1U = "eth0"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf index fe72488bbf..d4b88383e2 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpx310.conf @@ -35,7 +35,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 32; - rx_gain = 84; + rx_gain = 116; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf index 57a43fb414..6e3357e49b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf @@ -36,7 +36,7 @@ eNBs = nb_antennas_tx = 2; nb_antennas_rx = 2; tx_gain = 90; - rx_gain = 115; + rx_gain = 132; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; @@ -132,7 +132,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.13.11"; + mme_ip_address = ( { ipv4 = "192.168.12.11"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -142,10 +142,10 @@ eNBs = NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/RT/USER/eNB_transport_IQ.c b/targets/RT/USER/eNB_transport_IQ.c index 0b4b6c5fc6..8f679befe3 100644 --- a/targets/RT/USER/eNB_transport_IQ.c +++ b/targets/RT/USER/eNB_transport_IQ.c @@ -172,7 +172,7 @@ if (mod_enb->devs->type != NONE_DEV ) { mod_enb->devs->openair0_cfg.tx_delay = 8; } } - else if (mod_enb->devs->type == USRP_DEV) { + else if ((mod_enb->devs->type == USRP_B200_IF )||(mod_enb->devs->type == USRP_X300_IF )) { if ( mod_enb->devs->openair0_cfg.num_rb_dl == 100 ) { mod_enb->devs->openair0_cfg.samples_per_packet = 2048; mod_enb->devs->openair0_cfg.tx_forward_nsamps = 175; @@ -221,7 +221,7 @@ if (mod_enb->devs->type != NONE_DEV ) { check_dev_config(mod_enb); /* initialize and configure the RF device */ - if (openair0_device_load(mod_enb->devs, &mod_enb->devs->openair0_cfg)<0){ + if (openair0_device_load(mod_enb->devs, &mod_enb->devs->openair0_cfg)<0) { LOG_E(RRH,"Exiting, cannot initialize RF device.\n"); exit(-1); } else { @@ -256,7 +256,7 @@ if (mod_enb->devs->type != NONE_DEV ) { } } } - + /* create main eNB module thread main_rrh_eNB_thread allocates memory for TX/RX buffers and creates TX/RX @@ -305,14 +305,14 @@ void *rrh_eNB_thread(void *arg) { tmp=(void *)malloc16(sizeof(int32_t)*(samples_per_frame + 32)); memset(tmp,0,sizeof(int32_t)*(samples_per_frame + 32)); rx_buffer_eNB[i]=( tmp + (32*sizeof(int32_t)) ); - LOG_D(RRH,"i=%d rx_buffer_eNB[i]=%p tmp= %p samples_per_frame=%d\n",i,rx_buffer_eNB[i],tmp, samples_per_frame); + LOG_D(RRH,"i=%d rx_buffer_eNB[i]=%p tmp= %p\n",i,rx_buffer_eNB[i],tmp); } /* tx_buffer_eNB points to the beginning of data */ for (i=0; ieth_dev.openair0_cfg.tx_num_channels; i++) { tmp=(void *)malloc16(sizeof(int32_t)*(samples_per_frame + 32)); memset(tmp,0,sizeof(int32_t)*(samples_per_frame + 32)); tx_buffer_eNB[i]=( tmp + (32*sizeof(int32_t)) ); - LOG_D(RRH,"i= %d tx_buffer_eNB[i]=%p tmp= %p samples_per_frame=%d\n",i,tx_buffer_eNB[i],tmp, samples_per_frame); + LOG_D(RRH,"i= %d tx_buffer_eNB[i]=%p tmp= %p \n",i,tx_buffer_eNB[i],tmp); } /* dummy initialization for TX/RX buffers */ for (i=0; ieth_dev.openair0_cfg.rx_num_channels; i++) { @@ -596,7 +596,17 @@ void *rrh_eNB_rx_thread(void *arg) { next_rx_pos=(rx_pos+spp_eth); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_RX, 0 ); - + /**/ + if (frame>50) { + pthread_mutex_lock(&sync_trx_mutex); + while (sync_trx) { + pthread_cond_wait(&sync_trx_cond,&sync_trx_mutex); + } + sync_trx=1; + LOG_D(RRH,"out of while send:%d %d\n",sync_trx,frame); + pthread_cond_signal(&sync_trx_cond); + pthread_mutex_unlock(&sync_trx_mutex); + } } // while subframe++; @@ -670,7 +680,14 @@ void *rrh_eNB_tx_thread(void *arg) { while (rrh_exit == 0) { while (tx_pos < (1 + subframe)*samples_per_subframe) { - + LOG_D(RRH,"bef lock read:%d %d\n",sync_trx,frame); + pthread_mutex_lock(&sync_trx_mutex); + + while (!sync_trx) { + LOG_D(RRH,"in sync read:%d %d\n",sync_trx,frame); + pthread_cond_wait(&sync_trx_cond,&sync_trx_mutex); + } + LOG_D(RRH,"out of while read:%d %d\n",sync_trx,frame); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TX, 1 ); VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_HW_FRAME, frame); @@ -733,7 +750,9 @@ void *rrh_eNB_tx_thread(void *arg) { pck_tx++; VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TX, 0 ); - + sync_trx=0; + pthread_cond_signal(&sync_trx_cond); + pthread_mutex_unlock(&sync_trx_mutex); } /* wrap around tx buffer index */ @@ -761,7 +780,7 @@ static void calc_rt_period_ns( openair0_config_t openair0_cfg) { static void check_dev_config( rrh_module_t *mod_enb) { - AssertFatal( (mod_enb->devs->openair0_cfg.num_rb_dl==100 || mod_enb->devs->openair0_cfg.num_rb_dl==50 || mod_enb->devs->openair0_cfg.num_rb_dl==25 || mod_enb->devs->openair0_cfg.num_rb_dl==6) , "Invalid number of resource blocks! %d\n", mod_enb->devs->openair0_cfg.num_rb_dl); + AssertFatal( (mod_enb->devs->openair0_cfg.num_rb_dl==100 || mod_enb->devs->openair0_cfg.num_rb_dl==50 || mod_enb->devs->openair0_cfg.num_rb_dl==25 || mod_enb->devs->openair0_cfg.num_rb_dl==6) , "Invalid number of resource blocks! %d\n", mod_enb->devs->openair0_cfg.num_rb_dl); AssertFatal( mod_enb->devs->openair0_cfg.samples_per_frame > 0 , "Invalid number of samples per frame! %d\n",mod_enb->devs->openair0_cfg.samples_per_frame); AssertFatal( mod_enb->devs->openair0_cfg.sample_rate > 0.0, "Invalid sample rate! %f\n", mod_enb->devs->openair0_cfg.sample_rate); AssertFatal( mod_enb->devs->openair0_cfg.samples_per_packet > 0 , "Invalid number of samples per packet! %d\n",mod_enb->devs->openair0_cfg.samples_per_packet); diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index b6d42e03a8..00ede275b2 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -235,6 +235,7 @@ static int time_offset[4] = {0,0,0,0}; static char UE_flag=0; //static uint8_t eNB_id=0,UE_id=0; +static char threequarter_fs=0; uint32_t downlink_frequency[MAX_NUM_CCs][4]; int32_t uplink_frequency_offset[MAX_NUM_CCs][4]; @@ -289,14 +290,12 @@ double bw = 10.0e6; static int tx_max_power[MAX_NUM_CCs]; /* = {0,0}*/; +int chain_offset=0; + #ifndef EXMIMO char ref[128] = "internal"; char channels[128] = "0"; -//unsigned int samples_per_frame = 307200; -//unsigned int tx_forward_nsamps=0; -//int tx_delay; - #endif int rx_input_level_dBm; @@ -318,6 +317,7 @@ static LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]; int multi_thread=1; uint32_t target_dl_mcs = 28; //maximum allowed mcs uint32_t target_ul_mcs = 10; +uint32_t timing_advance = 0; uint8_t exit_missed_slots=1; uint64_t num_missed_slots=0; // counter for the number of missed slots @@ -471,7 +471,7 @@ void help (void) { printf(" --ue-txgain set UE TX gain\n"); printf(" --ue-scan_carrier set UE to scan around carrier\n"); printf(" --loop-memory get softmodem (UE) to loop through memory instead of acquiring from HW\n"); - printf(" -C Set the downlink frequecny for all Component carrier\n"); + printf(" -C Set the downlink frequency for all component carriers\n"); printf(" -d Enable soft scope and L1 and L2 stats (Xforms)\n"); printf(" -F Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n"); printf(" -g Set the global log level, valide options: (9:trace, 8/7:debug, 6:info, 4:warn, 3:error)\n"); @@ -485,6 +485,7 @@ void help (void) { printf(" -r Set the PRB, valid values: 6, 25, 50, 100 \n"); printf(" -S Skip the missed slots/subframes \n"); printf(" -t Set the maximum uplink MCS\n"); + printf(" -T Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"); printf(" -U Set the lte softmodem as a UE\n"); printf(" -W Enable L2 wireshark messages on localhost \n"); printf(" -V Enable VCD (generated file will be located atopenair_dump_eNB.vcd, read it with target/RT/USER/eNB.gtkw\n"); @@ -958,13 +959,13 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) if (phy_vars_eNB->lte_frame_parms.Ncp == EXTENDED) { PHY_ofdm_mod(&phy_vars_eNB->lte_eNB_common_vars.txdataF[0][aa][slot_offset_F], dummy_tx_b, - phy_vars_eNB->lte_frame_parms.log2_symbol_size, + phy_vars_eNB->lte_frame_parms.ofdm_symbol_size, 6, phy_vars_eNB->lte_frame_parms.nb_prefix_samples, CYCLIC_PREFIX); PHY_ofdm_mod(&phy_vars_eNB->lte_eNB_common_vars.txdataF[0][aa][slot_offset_F+slot_sizeF], dummy_tx_b+(phy_vars_eNB->lte_frame_parms.samples_per_tti>>1), - phy_vars_eNB->lte_frame_parms.log2_symbol_size, + phy_vars_eNB->lte_frame_parms.ofdm_symbol_size, 6, phy_vars_eNB->lte_frame_parms.nb_prefix_samples, CYCLIC_PREFIX); @@ -1005,7 +1006,7 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) ((short*)&phy_vars_eNB->lte_eNB_common_vars.txdata[0][aa][tx_offset])[0]= #ifdef EXMIMO ((short*)dummy_tx_b)[2*i]<<4; -#elif OAI_BLADRF +#elif OAI_BLADERF ((short*)dummy_tx_b)[2*i]; #else ((short*)dummy_tx_b)[2*i]<<4; @@ -1013,7 +1014,7 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) ((short*)&phy_vars_eNB->lte_eNB_common_vars.txdata[0][aa][tx_offset])[1]= #ifdef EXMIMO ((short*)dummy_tx_b)[2*i+1]<<4; -#elif OAI_BLADRF +#elif OAI_BLADERF ((short*)dummy_tx_b)[2*i+1]; #else ((short*)dummy_tx_b)[2*i+1]<<4; @@ -1026,6 +1027,25 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB) phy_vars_eNB->lte_eNB_common_vars.txdata[0][aa][tx_offset++] = 0x00010001; } } + + if ((((phy_vars_eNB->lte_frame_parms.tdd_config==0) || + (phy_vars_eNB->lte_frame_parms.tdd_config==1) || + (phy_vars_eNB->lte_frame_parms.tdd_config==2) || + (phy_vars_eNB->lte_frame_parms.tdd_config==6)) && + (subframe==0)) || (subframe==5)) { + // turn on tx switch N_TA_offset before + //LOG_D(HW,"subframe %d, time to switch to tx (N_TA_offset %d, slot_offset %d) \n",subframe,phy_vars_eNB->N_TA_offset,slot_offset); + for (i=0; iN_TA_offset; i++) { + tx_offset = (int)slot_offset+time_offset[aa]+i-phy_vars_eNB->N_TA_offset/2; + if (tx_offset<0) + tx_offset += LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->lte_frame_parms.samples_per_tti; + + if (tx_offset>=(LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->lte_frame_parms.samples_per_tti)) + tx_offset -= LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->lte_frame_parms.samples_per_tti; + + phy_vars_eNB->lte_eNB_common_vars.txdata[0][aa][tx_offset] = 0x00000000; + } + } } } } @@ -1053,6 +1073,7 @@ static void* eNB_thread_tx( void* param ) eNB_proc_t *proc = (eNB_proc_t*)param; FILE *tx_time_file; char tx_time_name[101]; + if (opp_enabled == 1) { snprintf(tx_time_name, 100,"/tmp/%s_tx_time_thread_sf_%d", "eNB", proc->subframe); tx_time_file = fopen(tx_time_name,"w"); @@ -1192,7 +1213,20 @@ static void* eNB_thread_tx( void* param ) } do_OFDM_mod_rt( proc->subframe_tx, PHY_vars_eNB_g[0][proc->CC_id] ); - + /* + short *txdata = (short*)&PHY_vars_eNB_g[0][proc->CC_id]->lte_eNB_common_vars.txdata[0][0][proc->subframe_tx*PHY_vars_eNB_g[0][proc->CC_id]->lte_frame_parms.samples_per_tti]; + int i; + for (i=0;i<7680*2;i+=8) { + txdata[i] = 2047; + txdata[i+1] = 0; + txdata[i+2] = 0; + txdata[i+3] = 2047; + txdata[i+4] = -2047; + txdata[i+5] = 0; + txdata[i+6] = 0; + txdata[i+7] = -2047; + } + */ if (pthread_mutex_lock(&proc->mutex_tx) != 0) { LOG_E( PHY, "[SCHED][eNB] error locking mutex for eNB TX proc %d\n", proc->subframe ); exit_fun("nothing to add"); @@ -1615,7 +1649,7 @@ static void* eNB_thread( void* arg ) int hw_subframe = 0; // 0..NUM_ENB_THREADS-1 => 0..9 unsigned int rx_pos = 0; - unsigned int tx_pos = 0; //spp*tx_delay; + unsigned int tx_pos = 0; #endif int CC_id=0; struct timespec trx_time0, trx_time1, trx_time2; @@ -1687,13 +1721,19 @@ static void* eNB_thread( void* arg ) pthread_mutex_unlock(&sync_mutex); + printf( "got sync (eNB_thread)\n" ); + int frame = 0; #ifndef EXMIMO - spp = openair0_cfg[0].samples_per_packet; - tx_pos=spp*openair0_cfg[0].tx_delay; + spp = openair0_cfg[0].samples_per_packet; + tx_pos = openair0_cfg[0].tx_scheduling_advance; #endif +#if defined(ENABLE_ITTI) + wait_system_ready ("Waiting for eNB application to be ready %s\r", &start_eNB); +#endif + while (!oai_exit) { start_meas( &softmodem_stats_mt ); @@ -1852,11 +1892,10 @@ static void* eNB_thread( void* arg ) // prepare tx buffer pointers for (i=0; ilte_frame_parms.nb_antennas_tx; i++) txp[i] = (void*)&txdata[i][tx_pos]; - //printf("tx_pos %d ts %d, ts_offset %d txp[i] %p, ap %d\n", tx_pos, timestamp, (timestamp+(tx_delay*spp)-tx_forward_nsamps),txp[i], i); // if symb_written < spp ==> error if (frame > 50) { openair0.trx_write_func(&openair0, - (timestamp+(openair0_cfg[card].tx_delay*spp)-openair0_cfg[card].tx_forward_nsamps), + (timestamp+(openair0_cfg[card].tx_scheduling_advance)-openair0_cfg[card].tx_sample_advance), txp, spp, PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx, @@ -1864,7 +1903,7 @@ static void* eNB_thread( void* arg ) } VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, timestamp&0xffffffff ); - VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp+(openair0_cfg[card].tx_delay*spp)-openair0_cfg[card].tx_forward_nsamps)&0xffffffff ); + VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp+(openair0_cfg[card].tx_scheduling_advance)-openair0_cfg[card].tx_sample_advance)&0xffffffff ); stop_meas( &softmodem_stats_mt ); if (frame > 50) { @@ -1879,8 +1918,9 @@ static void* eNB_thread( void* arg ) // USRP_DEBUG is active rt_sleep_ns(1000000); #endif + /* FT configurable tx lauch delay (in slots )*/ - if ((tx_launched == 0) && + if ( (frame>50) && (tx_launched == 0) && ((openair0_cfg[card].txlaunch_wait == 0) || ((openair0_cfg[card].txlaunch_wait == 1) && (rx_pos >= (((2*hw_subframe)+openair0_cfg[card].txlaunch_wait_slotcount)*PHY_vars_eNB_g[0][0]->lte_frame_parms.samples_per_tti>>1))))) { @@ -1951,52 +1991,53 @@ static void* eNB_thread( void* arg ) #else int sf = hw_subframe; #endif - - for (int CC_id=0; CC_id50) { + for (int CC_id=0; CC_idproc[sf].mutex_tx) != 0) { - LOG_E(PHY,"[eNB] ERROR pthread_mutex_lock for eNB TX thread %d (IC %d)\n",sf,PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_tx); - } else { - // LOG_I(PHY,"[eNB] Waking up eNB process %d (IC %d)\n",sf,PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt); - PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_tx++; - pthread_mutex_unlock(&PHY_vars_eNB_g[0][CC_id]->proc[sf].mutex_tx); - - if (PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_tx == 0) { - if (pthread_cond_signal(&PHY_vars_eNB_g[0][CC_id]->proc[sf].cond_tx) != 0) { - LOG_E(PHY,"[eNB] ERROR pthread_cond_signal for eNB TX thread %d\n",sf); + + if (pthread_mutex_lock(&PHY_vars_eNB_g[0][CC_id]->proc[sf].mutex_tx) != 0) { + LOG_E(PHY,"[eNB] ERROR pthread_mutex_lock for eNB TX thread %d (IC %d)\n",sf,PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_tx); + } else { + // LOG_I(PHY,"[eNB] Waking up eNB process %d (IC %d)\n",sf,PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt); + PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_tx++; + pthread_mutex_unlock(&PHY_vars_eNB_g[0][CC_id]->proc[sf].mutex_tx); + + if (PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_tx == 0) { + if (pthread_cond_signal(&PHY_vars_eNB_g[0][CC_id]->proc[sf].cond_tx) != 0) { + LOG_E(PHY,"[eNB] ERROR pthread_cond_signal for eNB TX thread %d\n",sf); + exit_fun("nothing to add"); + } + } else { + LOG_W(PHY,"[eNB] Frame %d, eNB TX thread %d busy!!\n",PHY_vars_eNB_g[0][CC_id]->proc[sf].frame_tx,sf); exit_fun("nothing to add"); - } - } else { - LOG_W(PHY,"[eNB] Frame %d, eNB TX thread %d busy!!\n",PHY_vars_eNB_g[0][CC_id]->proc[sf].frame_tx,sf); - exit_fun("nothing to add"); - } - } - + } + } + #endif - if (pthread_mutex_lock(&PHY_vars_eNB_g[0][CC_id]->proc[sf].mutex_rx) != 0) { - LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB RX thread %d (IC %d)\n", sf, PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_rx ); - exit_fun( "error locking mutex_rx" ); - break; - } - - int cnt_rx = ++PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_rx; - - pthread_mutex_unlock( &PHY_vars_eNB_g[0][CC_id]->proc[sf].mutex_rx ); - - if (cnt_rx == 0) { - // the thread was presumably waiting where it should and can now be woken up - if (pthread_cond_signal(&PHY_vars_eNB_g[0][CC_id]->proc[sf].cond_rx) != 0) { - LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB RX thread %d\n", sf ); - exit_fun( "ERROR pthread_cond_signal" ); - break; - } - } else { - LOG_W( PHY, "[eNB] Frame %d, eNB RX thread %d busy!! instance_cnt %d CC_id %d\n", PHY_vars_eNB_g[0][CC_id]->proc[sf].frame_rx, sf, PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_rx, CC_id ); - exit_fun( "RX thread busy" ); - break; - } + if (pthread_mutex_lock(&PHY_vars_eNB_g[0][CC_id]->proc[sf].mutex_rx) != 0) { + LOG_E( PHY, "[eNB] ERROR pthread_mutex_lock for eNB RX thread %d (IC %d)\n", sf, PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_rx ); + exit_fun( "error locking mutex_rx" ); + break; + } + + int cnt_rx = ++PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_rx; + + pthread_mutex_unlock( &PHY_vars_eNB_g[0][CC_id]->proc[sf].mutex_rx ); + + if (cnt_rx == 0) { + // the thread was presumably waiting where it should and can now be woken up + if (pthread_cond_signal(&PHY_vars_eNB_g[0][CC_id]->proc[sf].cond_rx) != 0) { + LOG_E( PHY, "[eNB] ERROR pthread_cond_signal for eNB RX thread %d\n", sf ); + exit_fun( "ERROR pthread_cond_signal" ); + break; + } + } else { + LOG_W( PHY, "[eNB] Frame %d, eNB RX thread %d busy!! instance_cnt %d CC_id %d\n", PHY_vars_eNB_g[0][CC_id]->proc[sf].frame_rx, sf, PHY_vars_eNB_g[0][CC_id]->proc[sf].instance_cnt_rx, CC_id ); + exit_fun( "RX thread busy" ); + break; + } + } } } @@ -2059,7 +2100,7 @@ static void get_options (int argc, char **argv) // char line[1000]; // int l; int k,i;//,j,k; -#if defined(OAI_USRP) || defined(CPRIGW) //#ifndef EXMIMO? +#if defined(OAI_USRP) || defined(CPRIGW) int clock_src; #endif int CC_id; @@ -2108,7 +2149,7 @@ static void get_options (int argc, char **argv) {NULL, 0, NULL, 0} }; - while ((c = getopt_long (argc, argv, "C:dK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:x:",long_options,NULL)) != -1) { + while ((c = getopt_long (argc, argv, "A:a:C:dEK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:Tx:",long_options,NULL)) != -1) { switch (c) { case LONG_OPTION_MAXPOWER: tx_max_power[0]=atoi(optarg); @@ -2181,6 +2222,10 @@ static void get_options (int argc, char **argv) local_remote_RF=atoi(optarg); break; + case 'A': + timing_advance = atoi (optarg); + break; + case 'C': for (CC_id=0; CC_id 2 (%d) not supported for the moment\n",transmission_mode); exit(-1); } - break; + + case 'T': + for (CC_id=0; CC_idframe_type = TDD; + break; + case 'h': help (); exit (-1); @@ -2547,12 +2605,10 @@ int main( int argc, char **argv ) memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs); set_latency_target(); - - for (CC_id=0; CC_idframe_type = FDD; /* TDD */ + frame_parms[CC_id]->frame_type = FDD; frame_parms[CC_id]->tdd_config = 3; frame_parms[CC_id]->tdd_config_S = 0; frame_parms[CC_id]->N_RB_DL = 100; @@ -2721,6 +2777,7 @@ int main( int argc, char **argv ) frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 0; frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0; frame_parms[CC_id]->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0; + frame_parms[CC_id]->threequarter_fs = threequarter_fs; init_ul_hopping(frame_parms[CC_id]); init_frame_parms(frame_parms[CC_id],1); // phy_init_top(frame_parms[CC_id]); @@ -2849,7 +2906,7 @@ int main( int argc, char **argv ) PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*)); for (CC_id=0; CC_idNid_cell,cooperation_flag,transmission_mode,abstraction_flag); PHY_vars_eNB_g[0][CC_id]->CC_id = CC_id; #ifndef OPENAIR2 @@ -2900,7 +2957,7 @@ int main( int argc, char **argv ) } #else - //already taken care of in lte-softmodem + //already taken care of in lte-softmodem.c PHY_vars_eNB_g[0][CC_id]->N_TA_offset = 0; #endif @@ -2931,63 +2988,40 @@ int main( int argc, char **argv ) #endif if(frame_parms[0]->N_RB_DL == 100) { - sample_rate = 30.72e6; - bw = 10.0e6; -#ifndef EXMIMO - openair0_cfg[card].sample_rate=30.72e6; - openair0_cfg[card].samples_per_packet = 2048; - openair0_cfg[card].samples_per_frame = 307200; - openair0_cfg[card].tx_bw = 10e6; - openair0_cfg[card].rx_bw = 10e6; - // from usrp_time_offset - //openair0_cfg[card].tx_forward_nsamps = 175; - // openair0_cfg[card].tx_delay = 8; -#endif + if (frame_parms[0]->threequarter_fs) { + openair0_cfg[card].sample_rate=23.04e6; + openair0_cfg[card].samples_per_frame = 230400; + openair0_cfg[card].tx_bw = 10e6; + openair0_cfg[card].rx_bw = 10e6; + } + else { + openair0_cfg[card].sample_rate=30.72e6; + openair0_cfg[card].samples_per_frame = 307200; + openair0_cfg[card].tx_bw = 10e6; + openair0_cfg[card].rx_bw = 10e6; + } } else if(frame_parms[0]->N_RB_DL == 50) { - sample_rate = 15.36e6; - bw = 5.0e6; -#ifndef EXMIMO openair0_cfg[card].sample_rate=15.36e6; - openair0_cfg[card].samples_per_packet = 2048; openair0_cfg[card].samples_per_frame = 153600; openair0_cfg[card].tx_bw = 5e6; openair0_cfg[card].rx_bw = 5e6; - //openair0_cfg[card].tx_forward_nsamps = 95; - //openair0_cfg[card].tx_delay = 5; -#endif } else if (frame_parms[0]->N_RB_DL == 25) { - sample_rate = 7.68e6; - bw = 2.5e6; -#ifndef EXMIMO openair0_cfg[card].sample_rate=7.68e6; openair0_cfg[card].samples_per_frame = 76800; openair0_cfg[card].tx_bw = 2.5e6; openair0_cfg[card].rx_bw = 2.5e6; - openair0_cfg[card].samples_per_packet = 1024; -#ifdef OAI_USRP - - // openair0_cfg[card].tx_forward_nsamps = 70; - //openair0_cfg[card].tx_delay = 5; -#endif - //#elif OAI_BLADERF - //openair0_cfg[card].tx_forward_nsamps = 0; - //openair0_cfg[card].tx_delay = 8; - //#endif -#endif } else if (frame_parms[0]->N_RB_DL == 6) { - sample_rate = 1.92e6; - bw = 0.96e6; -#ifndef EXMIMO openair0_cfg[card].sample_rate=1.92e6; - openair0_cfg[card].samples_per_packet = 256; openair0_cfg[card].samples_per_frame = 19200; openair0_cfg[card].tx_bw = 1.5e6; openair0_cfg[card].rx_bw = 1.5e6; - //openair0_cfg[card].tx_forward_nsamps = 40; - //openair0_cfg[card].tx_delay = 8; -#endif } - + + if (frame_parms[0]->frame_type==TDD) + openair0_cfg[card].duplex_mode = duplex_mode_TDD; + else //FDD + openair0_cfg[card].duplex_mode = duplex_mode_FDD; + #ifdef ETHERNET //openair0_cfg[card].remote_addr = "192.168.12.242"; @@ -2999,11 +3033,11 @@ int main( int argc, char **argv ) openair0_cfg[card].my_addr = "d4:be:d9:22:0a:ac"; openair0_cfg[card].my_port = 50000; //openair0_cfg[card].my_port = 50001; - openair0_cfg[card].tx_delay = 10; - openair0_cfg[card].tx_forward_nsamps = 0; + openair0_cfg[card].tx_scheduling_advance = 10; + openair0_cfg[card].tx_sample_advance = 0; openair0_cfg[card].txlaunch_wait = 0; openair0_cfg[card].txlaunch_wait_slotcount = 0; - + if (frame_parms[0]->N_RB_DL == 6) openair0_cfg[card].samples_per_packet = 256; else @@ -3013,26 +3047,21 @@ int main( int argc, char **argv ) #endif -#ifndef EXMIMO - openair0_cfg[card].samples_per_packet = openair0_cfg[0].samples_per_packet; - openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; -#endif printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card, ((UE_flag==0) ? PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->lte_frame_parms.nb_antennas_tx), ((UE_flag==0) ? PHY_vars_eNB_g[0][0]->lte_frame_parms.nb_antennas_rx : PHY_vars_UE_g[0][0]->lte_frame_parms.nb_antennas_rx)); openair0_cfg[card].Mod_id = 0; -#ifdef ETHERNET/*do we need to separate ue and enb????*/ - +#ifdef ETHERNET + if (UE_flag) { printf("ETHERNET: Configuring UE ETH for %s:%d\n",rrh_UE_ip,rrh_UE_port); openair0_cfg[card].remote_addr = &rrh_UE_ip[0]; openair0_cfg[card].remote_port = rrh_UE_port; } + openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL; #endif - openair0_cfg[card].sample_rate = sample_rate; - openair0_cfg[card].tx_bw = bw; - openair0_cfg[card].rx_bw = bw; + // in the case of the USRP, the following variables need to be initialized before the init // since the USRP only supports one CC (for the moment), we initialize all the cards with first CC. // in the case of EXMIMO2, these values are overwirtten in the function setup_eNB/UE_buffer @@ -3056,26 +3085,31 @@ int main( int argc, char **argv ) openair0_cfg[card].rx_gain[i] = PHY_vars_eNB_g[0][0]->rx_total_gain_eNB_dB; } else { - openair0_cfg[card].rx_gain[i] = PHY_vars_UE_g[0][0]->rx_total_gain_dB;// - USRP_GAIN_OFFSET; // calibrated for USRP B210 @ 2.6 GHz, 30.72 MS/s + openair0_cfg[card].rx_gain[i] = PHY_vars_UE_g[0][0]->rx_total_gain_dB; } +#if 0 // UHD 3.8 switch(frame_parms[0]->N_RB_DL) { case 6: - openair0_cfg[card].rx_gain[i] -= 6; + openair0_cfg[card].rx_gain[i] -= 12; break; case 25: - openair0_cfg[card].rx_gain[i] += 6; + openair0_cfg[card].rx_gain[i] -= 6; break; case 50: - openair0_cfg[card].rx_gain[i] += 8; + openair0_cfg[card].rx_gain[i] -= 3; + break; + + case 100: + openair0_cfg[card].rx_gain[i] -= 0; break; default: break; } - +#endif } @@ -3088,12 +3122,17 @@ int main( int argc, char **argv ) /* transport type is initialized NONE_TP (no transport protocol) when the transport protocol will be initiated transport protocol type will be set */ openair0.transp_type = NONE_TP; openair0_cfg[0].log_level = glog_level; + /* BBU can either have local or remote radio heads - local radio head option is set by default so the corresponding device is initiated */ - if ((mode!=loop_through_memory) && - (openair0_device_load(&openair0, &openair0_cfg[0]) <0)) { - printf("Exiting, cannot initialize device\n"); - exit(-1); + if (mode!=loop_through_memory){ + int ret; + ret= openair0_device_load(&openair0, &openair0_cfg[0]); + printf("openair0_device_load returns %d\n",ret); + if (ret<0) { + printf("Exiting, cannot initialize device\n"); + exit(-1); + } } else if (mode==loop_through_memory) { } @@ -3175,13 +3214,13 @@ int main( int argc, char **argv ) for(CC_id=0; CC_id0) { init_eNB_proc(); @@ -3417,13 +3466,7 @@ int main( int argc, char **argv ) // Sleep to allow all threads to setup sleep(1); -#ifdef USE_MME - while (start_UE == 0) { - sleep(1); - } - -#endif #ifndef EXMIMO @@ -3436,6 +3479,7 @@ int main( int argc, char **argv ) #endif + printf("Sending sync to all threads\n"); pthread_mutex_lock(&sync_mutex); sync_var=0; diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 31701d877f..6293ad4264 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -279,7 +279,7 @@ static void *UE_thread_synch(void *arg) #ifdef OAI_USRP openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB;//-USRP_GAIN_OFFSET; - +#if 0 // UHD 3.8 switch(UE->lte_frame_parms.N_RB_DL) { case 6: openair0_cfg[card].rx_gain[i] -= 12; @@ -301,7 +301,7 @@ static void *UE_thread_synch(void *arg) printf( "Unknown number of RBs %d\n", UE->lte_frame_parms.N_RB_DL ); break; } - +#endif printf( "UE synch: setting RX gain (%d,%d) to %f\n", card, i, openair0_cfg[card].rx_gain[i] ); #endif } @@ -357,7 +357,8 @@ static void *UE_thread_synch(void *arg) openair0_cfg[card].tx_freq[i] = downlink_frequency[card][i]+uplink_frequency_offset[card][i]; #ifdef OAI_USRP openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB;//-USRP_GAIN_OFFSET; // 65 calibrated for USRP B210 @ 2.6 GHz - + +#if 0 // UHD 3.8 switch(UE->lte_frame_parms.N_RB_DL) { case 6: openair0_cfg[card].rx_gain[i] -= 12; @@ -379,7 +380,7 @@ static void *UE_thread_synch(void *arg) printf("Unknown number of RBs %d\n",UE->lte_frame_parms.N_RB_DL); break; } - +#endif printf("UE synch: setting RX gain (%d,%d) to %f\n",card,i,openair0_cfg[card].rx_gain[i]); #endif @@ -400,7 +401,7 @@ static void *UE_thread_synch(void *arg) case pbch: - + LOG_I(PHY,"[UE thread Synch] Running Initial Synch\n"); if (initial_sync( UE, UE->mode ) == 0) { hw_slot_offset = (UE->rx_offset<<1) / UE->lte_frame_parms.samples_per_tti; @@ -410,6 +411,7 @@ static void *UE_thread_synch(void *arg) UE->UE_scan_carrier = 0; // rerun with new cell parameters and frequency-offset for (i=0;irx_total_gain_dB;//-USRP_GAIN_OFFSET; openair0_cfg[0].rx_freq[i] -= UE->lte_ue_common_vars.freq_offset; openair0_cfg[0].tx_freq[i] = openair0_cfg[0].rx_freq[i]+uplink_frequency_offset[0][i]; downlink_frequency[0][i] = openair0_cfg[0].rx_freq[i]; @@ -422,25 +424,25 @@ static void *UE_thread_synch(void *arg) openair0_cfg[0].sample_rate =1.92e6; openair0_cfg[0].rx_bw =.96e6; openair0_cfg[0].tx_bw =.96e6; - openair0_cfg[0].rx_gain[0] -= 12; + // openair0_cfg[0].rx_gain[0] -= 12; break; case 25: openair0_cfg[0].sample_rate =7.68e6; openair0_cfg[0].rx_bw =2.5e6; openair0_cfg[0].tx_bw =2.5e6; - openair0_cfg[0].rx_gain[0] -= 6; + // openair0_cfg[0].rx_gain[0] -= 6; break; case 50: openair0_cfg[0].sample_rate =15.36e6; openair0_cfg[0].rx_bw =5.0e6; openair0_cfg[0].tx_bw =5.0e6; - openair0_cfg[0].rx_gain[0] -= 3; + // openair0_cfg[0].rx_gain[0] -= 3; break; case 100: openair0_cfg[0].sample_rate=30.72e6; openair0_cfg[0].rx_bw=10.0e6; openair0_cfg[0].tx_bw=10.0e6; - openair0_cfg[0].rx_gain[0] -= 0; + // openair0_cfg[0].rx_gain[0] -= 0; break; } #ifndef EXMIMO @@ -519,10 +521,6 @@ static void *UE_thread_synch(void *arg) for (i=0; irx_total_gain_dB;//-USRP_GAIN_OFFSET; - - #ifndef EXMIMO openair0.trx_set_freq_func(&openair0,&openair0_cfg[0],0); @@ -530,6 +528,12 @@ static void *UE_thread_synch(void *arg) openair0_set_frequencies(&openair0,&openair0_cfg[0],0); #endif + +#ifdef OAI_USRP + openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB;//-USRP_GAIN_OFFSET; + + + switch(UE->lte_frame_parms.N_RB_DL) { case 6: openair0_cfg[card].rx_gain[i] -= 12; @@ -1002,7 +1006,7 @@ void *UE_thread(void *arg) static int UE_thread_retval; PHY_VARS_UE *UE = PHY_vars_UE_g[0][0]; int spp = openair0_cfg[0].samples_per_packet; - int slot=1, frame=0, hw_subframe=0, rxpos=0, txpos=spp*openair0_cfg[0].tx_delay; + int slot=1, frame=0, hw_subframe=0, rxpos=0, txpos=openair0_cfg[0].tx_scheduling_advance; #ifdef __AVX2__ int dummy[2][spp] __attribute__((aligned(32))); #else @@ -1019,6 +1023,10 @@ void *UE_thread(void *arg) openair0_timestamp timestamp; +#ifdef NAS_UE + MessageDef *message_p; +#endif + #ifdef RTAI RT_TASK *task = rt_task_init_schmod(nam2num("UE thread"), 0, 0, 0, SCHED_FIFO, 0xF); @@ -1074,6 +1082,11 @@ void *UE_thread(void *arg) printf("starting UE thread\n"); +#ifdef NAS_UE + message_p = itti_alloc_new_message(TASK_NAS_UE, INITIALIZE_MESSAGE); + itti_send_msg_to_task (TASK_NAS_UE, INSTANCE_DEFAULT, message_p); +#endif + T0 = rt_get_time_ns(); first_rx = 1; rxpos=0; @@ -1094,10 +1107,10 @@ void *UE_thread(void *arg) for (int i=0; ilte_frame_parms.nb_antennas_rx; i++) rxp[i] = (dummy_dump==0) ? (void*)&rxdata[i][rxpos] : (void*)dummy[i]; - /* - if (dummy_dump == 0) - printf("writing %d samples to %d (first_rx %d)\n",spp - ((first_rx==1) ? rx_off_diff : 0),rxpos,first_rx); - */ + + /* if (dummy_dump == 0) + printf("writing %d samples to %d (first_rx %d)\n",spp - ((first_rx==1) ? rx_off_diff : 0),rxpos,first_rx);*/ + if (UE->mode != loop_through_memory) { rxs = openair0.trx_read_func(&openair0, ×tamp, @@ -1106,8 +1119,11 @@ void *UE_thread(void *arg) UE->lte_frame_parms.nb_antennas_rx); if (rxs != (spp- ((first_rx==1) ? rx_off_diff : 0))) { - exit_fun("problem in rx"); - return &UE_thread_retval; + printf("rx error: asked %d got %d ",spp - ((first_rx==1) ? rx_off_diff : 0),rxs); + if (UE->is_synchronized == 1) { + exit_fun("problem in rx"); + return &UE_thread_retval; + } } } @@ -1127,7 +1143,7 @@ void *UE_thread(void *arg) txp[i] = (void*)&txdata[i][txpos]; openair0.trx_write_func(&openair0, - (timestamp+spp*openair0_cfg[0].tx_delay-openair0_cfg[0].tx_forward_nsamps), + (timestamp+openair0_cfg[0].tx_scheduling_advance-openair0_cfg[0].tx_sample_advance), txp, spp - ((first_rx==1) ? rx_off_diff : 0), UE->lte_frame_parms.nb_antennas_tx, @@ -1324,6 +1340,7 @@ void *UE_thread(void *arg) #ifndef USRP_DEBUG if (UE->mode != loop_through_memory) { + LOG_I(PHY,"Resynchronizing RX by %d samples\n",UE->rx_offset); rxs = openair0.trx_read_func(&openair0, ×tamp, (void**)rxdata, diff --git a/targets/RT/USER/rrh_gw.c b/targets/RT/USER/rrh_gw.c index c479c2a211..b944be2f77 100644 --- a/targets/RT/USER/rrh_gw.c +++ b/targets/RT/USER/rrh_gw.c @@ -71,8 +71,8 @@ *****************************************************************************************/ - -char rrh_ip[20] = "0.0.0.0"; // there is code to detect my ip address +/* local IP/MAC address is detected*/ +char rrh_ip[20] = "0.0.0.0"; unsigned char rrh_mac[6] = "0:0:0:0:0:0"; int rrh_port = 50000; // has to be an option @@ -103,8 +103,8 @@ uint8_t measurements_flag=0; - default ethernet interface is local */ uint8_t num_eNB_mod=0; uint8_t num_UE_mod=0; -char* if_name="lo"; -uint8_t eth_mode=ETH_UDP_MODE; +char* if_name="lo"; +uint8_t eth_mode=ETH_UDP_MODE; rrh_module_t *enb_array; rrh_module_t *ue_array; @@ -224,6 +224,7 @@ static rrh_module_t new_module (unsigned int id) { rrh_mod.devs->transp_type=NONE_TP; rrh_mod.devs->host_type=RRH_HOST; + return rrh_mod; } @@ -301,7 +302,7 @@ static void get_options(int argc, char *argv[]) { default: /* '?' */ //fprintf(stderr, "Usage: \n", argv[0]); exit(-1); - } + } } } diff --git a/targets/RT/USER/rrh_gw.h b/targets/RT/USER/rrh_gw.h index 69546dbe07..739e2088b2 100644 --- a/targets/RT/USER/rrh_gw.h +++ b/targets/RT/USER/rrh_gw.h @@ -51,7 +51,7 @@ /*! \brief RRH supports two types of modules: eNB and UE each module is associated with an ethernet device (device of ETH_IF) - and optionally with a RF device (device type can be USRP_IF/BLADERF_IF/EXMIMO_IF/NONE_IF) + and optionally with a RF device (device type can be USRP_B200/USRP_X300/BLADERF_IF/EXMIMO_IF/NONE_IF) UE modules will always have RF device type NONE_IF */ typedef struct { /*! \brief module id */ diff --git a/targets/SIMU/USER/channel_sim.c b/targets/SIMU/USER/channel_sim.c index aeddfaddbe..bba32a5a29 100644 --- a/targets/SIMU/USER/channel_sim.c +++ b/targets/SIMU/USER/channel_sim.c @@ -303,8 +303,8 @@ void do_DL_sig(double **r_re0,double **r_im0, 10*log10(rx_pwr*(double)frame_parms->N_RB_DL*12),next_slot,next_slot>>1); LOG_D(OCM,"[SIM][DL] UE %d : rx_pwr (noise) -132 dBm/RE (N0fs = %.1f dBm, N0B = %.1f dBm) for slot %d (subframe %d)\n", UE_id, - 10*log10(eNB2UE[eNB_id][UE_id][CC_id]->BW*1e6)-174, - 10*log10(eNB2UE[eNB_id][UE_id][CC_id]->BW*1e6*12*frame_parms->N_RB_DL/(double)frame_parms->ofdm_symbol_size)-174, + 10*log10(eNB2UE[eNB_id][UE_id][CC_id]->sampling_rate*1e6)-174, + 10*log10(eNB2UE[eNB_id][UE_id][CC_id]->sampling_rate*1e6*12*frame_parms->N_RB_DL/(double)frame_parms->ofdm_symbol_size)-174, next_slot,next_slot>>1); #endif @@ -342,7 +342,7 @@ void do_DL_sig(double **r_re0,double **r_im0, r_im0, nb_antennas_rx, frame_parms->samples_per_tti>>1, - 1e3/eNB2UE[eNB_id][UE_id][CC_id]->BW, // sampling time (ns) + 1e3/eNB2UE[eNB_id][UE_id][CC_id]->sampling_rate, // sampling time (ns) (double)PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB - 66.227); // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later) #ifdef DEBUG_SIM @@ -584,7 +584,7 @@ void do_UL_sig(double **r_re0,double **r_im0,double **r_re,double **r_im,double r_im, nb_antennas_rx, frame_parms->samples_per_tti>>1, - 1e3/UE2eNB[0][eNB_id][CC_id]->BW, // sampling time (ns) + 1e3/UE2eNB[0][eNB_id][CC_id]->sampling_rate, // sampling time (ns) (double)PHY_vars_eNB_g[eNB_id][CC_id]->rx_total_gain_eNB_dB - 66.227); // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later) #ifdef DEBUG_SIM diff --git a/targets/SIMU/USER/init_lte.c b/targets/SIMU/USER/init_lte.c index d798b0968a..bbb99260eb 100644 --- a/targets/SIMU/USER/init_lte.c +++ b/targets/SIMU/USER/init_lte.c @@ -76,7 +76,7 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms, for (i=0; idlsch_eNB[i][j] = new_eNB_dlsch(1,NUMBER_OF_HARQ_PID_MAX,frame_parms->N_RB_DL,abstraction_flag); + PHY_vars_eNB->dlsch_eNB[i][j] = new_eNB_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,frame_parms->N_RB_DL,abstraction_flag); if (!PHY_vars_eNB->dlsch_eNB[i][j]) { LOG_E(PHY,"Can't get eNB dlsch structures for UE %d \n", i); @@ -128,11 +128,11 @@ PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms, exit(-1); } - PHY_vars_eNB->dlsch_eNB_SI = new_eNB_dlsch(1,1,frame_parms->N_RB_DL, abstraction_flag); + PHY_vars_eNB->dlsch_eNB_SI = new_eNB_dlsch(1,1,NSOFT,frame_parms->N_RB_DL, abstraction_flag); LOG_D(PHY,"eNB %d : SI %p\n",eNB_id,PHY_vars_eNB->dlsch_eNB_SI); - PHY_vars_eNB->dlsch_eNB_ra = new_eNB_dlsch(1,1,frame_parms->N_RB_DL, abstraction_flag); + PHY_vars_eNB->dlsch_eNB_ra = new_eNB_dlsch(1,1,NSOFT,frame_parms->N_RB_DL, abstraction_flag); LOG_D(PHY,"eNB %d : RA %p\n",eNB_id,PHY_vars_eNB->dlsch_eNB_ra); - PHY_vars_eNB->dlsch_eNB_MCH = new_eNB_dlsch(1,NUMBER_OF_HARQ_PID_MAX,frame_parms->N_RB_DL, 0); + PHY_vars_eNB->dlsch_eNB_MCH = new_eNB_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,frame_parms->N_RB_DL, 0); LOG_D(PHY,"eNB %d : MCH %p\n",eNB_id,PHY_vars_eNB->dlsch_eNB_MCH); @@ -169,7 +169,7 @@ PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms, for (i=0; idlsch_ue[i][j] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); + PHY_vars_UE->dlsch_ue[i][j] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); if (!PHY_vars_UE->dlsch_ue[i][j]) { LOG_E(PHY,"Can't get ue dlsch structures\n"); @@ -187,15 +187,15 @@ PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms, exit(-1); } - PHY_vars_UE->dlsch_ue_SI[i] = new_ue_dlsch(1,1,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); - PHY_vars_UE->dlsch_ue_ra[i] = new_ue_dlsch(1,1,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); + PHY_vars_UE->dlsch_ue_SI[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); + PHY_vars_UE->dlsch_ue_ra[i] = new_ue_dlsch(1,1,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, abstraction_flag); PHY_vars_UE->transmission_mode[i] = transmission_mode; } PHY_vars_UE->lte_frame_parms.pucch_config_common.deltaPUCCH_Shift = 1; - PHY_vars_UE->dlsch_ue_MCH[0] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,MAX_TURBO_ITERATIONS_MBSFN,frame_parms->N_RB_DL,0); + PHY_vars_UE->dlsch_ue_MCH[0] = new_ue_dlsch(1,NUMBER_OF_HARQ_PID_MAX,NSOFT,MAX_TURBO_ITERATIONS_MBSFN,frame_parms->N_RB_DL,0); return (PHY_vars_UE); } @@ -211,11 +211,11 @@ PHY_VARS_RN* init_lte_RN(LTE_DL_FRAME_PARMS *frame_parms, if (eMBMS_active_state == multicast_relay) { for (i=0; i < 10 ; i++) { // num SF in a frame - PHY_vars_RN->dlsch_rn_MCH[i] = new_ue_dlsch(1,1,MAX_TURBO_ITERATIONS_MBSFN,frame_parms->N_RB_DL, 0); + PHY_vars_RN->dlsch_rn_MCH[i] = new_ue_dlsch(1,1,MAX_TURBO_ITERATIONS_MBSFN,NSOFT,frame_parms->N_RB_DL, 0); LOG_D(PHY,"eNB %d : MCH[%d] %p\n",RN_id,i,PHY_vars_RN->dlsch_rn_MCH[i]); } } else { - PHY_vars_RN->dlsch_rn_MCH[0] = new_ue_dlsch(1,1,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, 0); + PHY_vars_RN->dlsch_rn_MCH[0] = new_ue_dlsch(1,1,MAX_TURBO_ITERATIONS,NSOFT,frame_parms->N_RB_DL, 0); LOG_D(PHY,"eNB %d : MCH[0] %p\n",RN_id,PHY_vars_RN->dlsch_rn_MCH[0]); } diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c index ebdb3c00d3..ca1ec9fccb 100644 --- a/targets/SIMU/USER/oaisim_functions.c +++ b/targets/SIMU/USER/oaisim_functions.c @@ -1122,24 +1122,28 @@ void init_ocm(void) else */ - eNB2UE[eNB_id][UE_id][CC_id] = new_channel_desc_scm(PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.nb_antennas_tx, - PHY_vars_UE_g[UE_id][CC_id]->lte_frame_parms.nb_antennas_rx, - map_str_to_int(small_scale_names,oai_emulation.environment_system_config.fading.small_scale.selected_option), - oai_emulation.environment_system_config.system_bandwidth_MB, - forgetting_factor, - 0, - 0); + eNB2UE[eNB_id][UE_id][CC_id] = + new_channel_desc_scm(PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.nb_antennas_tx, + PHY_vars_UE_g[UE_id][CC_id]->lte_frame_parms.nb_antennas_rx, + map_str_to_int(small_scale_names,oai_emulation.environment_system_config.fading.small_scale.selected_option), + N_RB2sampling_rate(PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.N_RB_DL), + N_RB2channel_bandwidth(PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.N_RB_DL), + forgetting_factor, + 0, + 0); random_channel(eNB2UE[eNB_id][UE_id][CC_id],abstraction_flag); LOG_D(OCM,"[SIM] Initializing channel (%s, %d) from UE %d to eNB %d\n", oai_emulation.environment_system_config.fading.small_scale.selected_option, map_str_to_int(small_scale_names, oai_emulation.environment_system_config.fading.small_scale.selected_option),UE_id, eNB_id); - UE2eNB[UE_id][eNB_id][CC_id] = new_channel_desc_scm(PHY_vars_UE_g[UE_id][CC_id]->lte_frame_parms.nb_antennas_tx, - PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.nb_antennas_rx, - map_str_to_int(small_scale_names, oai_emulation.environment_system_config.fading.small_scale.selected_option), - oai_emulation.environment_system_config.system_bandwidth_MB, - forgetting_factor, - 0, - 0); + UE2eNB[UE_id][eNB_id][CC_id] = + new_channel_desc_scm(PHY_vars_UE_g[UE_id][CC_id]->lte_frame_parms.nb_antennas_tx, + PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.nb_antennas_rx, + map_str_to_int(small_scale_names, oai_emulation.environment_system_config.fading.small_scale.selected_option), + N_RB2sampling_rate(PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.N_RB_UL), + N_RB2channel_bandwidth(PHY_vars_eNB_g[eNB_id][CC_id]->lte_frame_parms.N_RB_UL), + forgetting_factor, + 0, + 0); random_channel(UE2eNB[UE_id][eNB_id][CC_id],abstraction_flag); diff --git a/targets/SIMU/USER/sinr_sim.c b/targets/SIMU/USER/sinr_sim.c index 8bdc4a5057..317fe53c60 100644 --- a/targets/SIMU/USER/sinr_sim.c +++ b/targets/SIMU/USER/sinr_sim.c @@ -254,7 +254,7 @@ void init_snr(channel_desc_t* eNB2UE, node_desc_t *enb_data, node_desc_t *ue_dat uint8_t qq; /* Thermal noise is calculated using 10log10(K*T*B) K = Boltzmann's constant T = room temperature B = bandwidth */ - thermal_noise = -174 + 10*log10(eNB2UE->BW*1e6); //value in dBm + thermal_noise = -174 + 10*log10(eNB2UE->sampling_rate*1e6); //value in dBm //for (aarx=0; aarxnb_rx; aarx++) *N0 = thermal_noise + ue_data->rx_noise_level;//? all the element have the same noise level????? @@ -496,7 +496,7 @@ void init_snr_up(channel_desc_t* UE2eNB, node_desc_t *enb_data, node_desc_t *ue_ // nb_rb = phy_vars_eNB->ulsch_eNB[UE_id]->harq_processes[harq_pid]->nb_rb; /* Thermal noise is calculated using 10log10(K*T*B) K = Boltzmann's constant T = room temperature B = bandwidth */ - thermal_noise = -174 + 10*log10(UE2eNB->BW*1e6); //value in dBm + thermal_noise = -174 + 10*log10(UE2eNB->sampling_rate*1e6); //value in dBm *N0 = thermal_noise + enb_data->rx_noise_level;//? all the element have the same noise level????? double lambda ; double residual; @@ -557,7 +557,7 @@ void calculate_sinr(channel_desc_t* eNB2UE, node_desc_t *enb_data, node_desc_t * short count; /* Thermal noise is calculated using 10log10(K*T*B) K = Boltzmann's constant T = room temperature B = bandwidth */ - thermal_noise = -174 + 10*log10(eNB2UE->BW*1e6); //value in dBm + thermal_noise = -174 + 10*log10(eNB2UE->sampling_rate*1e6); //value in dBm for (count = 0; count < 12 * nb_rb; count++) { sir = enb_data->tx_power_dBm