diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index 245bba4f8b..ff4a452866 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -621,9 +621,7 @@ add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the d
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
add_boolean_option(DEADLINE_SCHEDULER True "Use the Linux scheduler SCHED_DEADLINE: kernel >= 3.14")
add_boolean_option(CPU_AFFINITY False "Enable CPU Affinity of threads (only valid without deadline scheduler). It is enabled only with >2 CPUs")
-add_boolean_option(NAS_ADDRESS_FIX False "specific to oaisim: for nasmesh driver")
add_boolean_option(NAS_NETLINK False "useless ??? Must be True to compile nasmesh driver without rtai ????")
-add_boolean_option(OAISIM False "specific to oaisim")
add_boolean_option(OAI_NW_DRIVER_USE_NETLINK True "????")
add_boolean_option(USE_MME False "this flag is used only one time in lte-softmodem.c")
@@ -656,9 +654,7 @@ add_boolean_option(OPENAIR_LTE True "Seems legacy: keep it to true")
# PHY options
##########################
add_boolean_option(DRIVER2013 True "only relevant for EXMIMO")
-add_boolean_option(ENABLE_NEW_MULTICAST False "specific to oaisim")
add_boolean_option(EXMIMO_IOT True "????")
-add_boolean_option(LARGE_SCALE False "specific to oaisim: defines max eNB=2 and max UE=120")
add_boolean_option(LOCALIZATION False "???")
add_integer_option(MAX_NUM_CCs 1 "????")
add_boolean_option(MU_RECEIVER False "????")
@@ -681,7 +677,6 @@ add_boolean_option(NAS_UE True "NAS UE INSTANCE (<> NAS_MME)")
##########################
# ACCESS STRATUM LAYER2 OPTIONS
##########################
-add_boolean_option(MAC_CONTEXT True "specific to oaisim")
add_boolean_option(JUMBO_FRAME True "ENABLE LARGE SDU in ACCESS STRATUM (larger than common MTU)")
##########################
@@ -1725,12 +1720,14 @@ ${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_channel.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/multipath_tv_channel.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/abstraction.c
+${OPENAIR1_DIR}/SIMULATION/TOOLS/channel_sim.c
${OPENAIR1_DIR}/SIMULATION/RF/rf.c
${OPENAIR1_DIR}/SIMULATION/RF/dac.c
${OPENAIR1_DIR}/SIMULATION/RF/adc.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
)
+
add_library(SIMU_ETH
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
@@ -1987,6 +1984,8 @@ add_executable(lte-uesoftmodem
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c
+ ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
+ ${OPENAIR_TARGETS}/RT/USER/rfsim.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
@@ -2005,13 +2004,13 @@ add_executable(lte-uesoftmodem
target_link_libraries (lte-uesoftmodem
-Wl,--start-group
- RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE
+ RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl)
target_link_libraries (lte-uesoftmodem ${LIBXML2_LIBRARIES})
-target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
+target_link_libraries (lte-uesoftmodem pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
target_link_libraries (lte-uesoftmodem ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-uesoftmodem ${T_LIB})
@@ -2024,6 +2023,8 @@ add_executable(lte-uesoftmodem-nos1
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-uesoftmodem.c
+ ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
+ ${OPENAIR_TARGETS}/RT/USER/rfsim.c
${OPENAIR1_DIR}/SIMULATION/TOOLS/taus.c
${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
@@ -2043,13 +2044,13 @@ add_executable(lte-uesoftmodem-nos1
target_link_libraries (lte-uesoftmodem-nos1
-Wl,--start-group
- RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB}
+ RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE SIMU ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB}
${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl )
target_link_libraries (lte-uesoftmodem-nos1 ${LIBXML2_LIBRARIES})
-target_link_libraries (lte-uesoftmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
+target_link_libraries (lte-uesoftmodem-nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp ${XFORMS_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES} ${ATLAS_LIBRARIES})
target_link_libraries (lte-uesoftmodem-nos1 ${LIB_LMS_LIBRARIES})
target_link_libraries (lte-uesoftmodem-nos1 ${T_LIB})
@@ -2080,96 +2081,6 @@ target_link_libraries (lte-uesoftmodem-nos1 ${T_LIB})
# Addexecutables for tests
####################################
-# A all in one network simulator
-################
-add_executable(oaisim
- ${rrc_h}
- ${s1ap_h}
- ${x2ap_h}
- ${OPENAIR_BIN_DIR}/messages_xml.h
- ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
- ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
- ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
- ${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c
-# ${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c
- ${OPENAIR_TARGETS}/SIMU/USER/sinr_sim.c
- ${OPENAIR_TARGETS}/SIMU/USER/cor_SF_sim.c
- ${OPENAIR_TARGETS}/SIMU/USER/oaisim_functions.c
- ${OPENAIR_TARGETS}/SIMU/USER/event_handler.c
- ${OPENAIR_TARGETS}/SIMU/USER/oaisim.c
- ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
- ${OPENAIR2_DIR}/RRC/NAS/nas_config.c
- ${OPENAIR2_DIR}/RRC/NAS/rb_config.c
- ${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
- ${OPENAIR_DIR}/common/utils/utils.c
- ${OPENAIR_DIR}/common/utils/system.c
- ${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
- ${XFORMS_SOURCE}
- ${T_SOURCE}
- ${CONFIG_SOURCES}
- ${SHLIB_LOADER_SOURCES}
-)
-
-
-target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
-target_link_libraries (oaisim
- -Wl,-ldl,--start-group
- RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS L2_UE ${MSC_LIB} LIB_NAS_UE SIMU SECU_OSA ${ITTI_LIB} ${MIH_LIB}
- ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
- -Wl,--end-group z dl)
-
-target_link_libraries (oaisim ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
-target_link_libraries (oaisim pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} sctp z
- ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
-#Force link with forms, regardless XFORMS option
-target_link_libraries (oaisim forms)
-target_link_libraries (oaisim ${T_LIB})
-
-
-# A all in one network simulator
-################
-add_executable(oaisim_nos1
- ${rrc_h}
- ${s1ap_h}
- ${x2ap_h}
- ${OPENAIR_BIN_DIR}/messages_xml.h
- ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
- ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
- ${OPENAIR1_DIR}/SCHED/prach_procedures.c
- ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
- ${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c
-# ${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c
- ${OPENAIR_TARGETS}/SIMU/USER/sinr_sim.c
- ${OPENAIR_TARGETS}/SIMU/USER/cor_SF_sim.c
- ${OPENAIR_TARGETS}/SIMU/USER/oaisim_functions.c
- ${OPENAIR_TARGETS}/SIMU/USER/event_handler.c
- ${OPENAIR_TARGETS}/SIMU/USER/oaisim.c
- ${OPENAIR_TARGETS}/ARCH/COMMON/common_lib.c
- ${OPENAIR2_DIR}/RRC/NAS/nas_config.c
- ${OPENAIR2_DIR}/RRC/NAS/rb_config.c
- ${OPENAIR_TARGETS}/COMMON/create_tasks_ue.c
- ${OPENAIR_DIR}/common/utils/system.c
- ${XFORMS_SOURCE}
- ${T_SOURCE}
- ${CONFIG_SOURCES}
- ${SHLIB_LOADER_SOURCES}
-)
-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_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_UE PHY_RU LFDS ${MSC_LIB} ${ITTI_LIB} SIMU L2_UE ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7
- -Wl,--end-group z dl )
-
-target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
-target_link_libraries (oaisim_nos1 pthread m ${CONFIG_LIBRARIES} rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES}
- ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${OPENPGM_LIBRARIES} ${PROTOBUF_LIB} ${CMAKE_DL_LIBS} ${LIBYAML_LIBRARIES})
-#Force link with forms, regardless XFORMS option
-target_link_libraries (oaisim_nos1 forms)
-
-#message("protobuflib is ${PROTOBUF_LIB}")
-
-target_link_libraries (oaisim_nos1 ${T_LIB})
-
# Unitary tests for each piece of L1: example, mbmssim is MBMS L1 simulator
#####################################
@@ -2267,7 +2178,7 @@ endforeach(myExe)
if (${T_TRACER})
foreach(i
#all "add_executable" definitions (except tests, rb_tool, updatefw)
- lte-softmodem lte-softmodem-nos1 oaisim oaisim_nos1
+ lte-softmodem lte-softmodem-nos1
dlsim_tm4 dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim
pdcchsim pucchsim prachsim syncsim
#all "add_library" definitions
diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml
index 59fceb6c2d..f0b3256015 100644
--- a/cmake_targets/autotests/test_case_list.xml
+++ b/cmake_targets/autotests/test_case_list.xml
@@ -956,21 +956,21 @@
$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash
$OPENAIR_DIR/targets/bin/dlsim.Rel14
- -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70
- -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
- -m14 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70
- -m15 -gG -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O30
- -m14 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O30
- -m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O70
- -m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O70
- -m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O70
- -m26 -gF -s17.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -O70
- -m26 -gF -s17.3 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1600 -O70
- -m26 -gF -s16.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1899 -O70
- -m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O70
- -m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O70
- dlsim.test1 dlsim.test5 dlsim.test6 dlsim.test6b dlsim.test7 dlsim.test7b dlsim.test10 dlsim.test10b dlsim.test11 dlsim.test11b dlsim.TM2_test1 dlsim.TM2_test1b dlsim.TM2_test1c
+ -m5 -gF -s-1 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
+ -m4 -gF -s0 -w1.0 -f.2 -n500 -B6 -c4 -z2 -O60
+ -m15 -gF -s6.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
+ -m15 -gF -s6.7 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O60
+ -m15 -gG -s1.4 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O25
+ -m15 -gG -s1.4 -w1.0 -f.2 -n500 -B25 -c2 -z2 -O25
+ -m25 -gF -s17.4 -w1.0 -f.2 -n500 -B25 -c3 -z2 -O60
+ -m25 -gF -s17.5 -w1.0 -f.2 -n500 -B25 -c3 -z2 -r1022 -O60
+ -m26 -gF -s17.7 -w1.0 -f.2 -n500 -B50 -c2 -z2 -O60
+ -m26 -gF -s17.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -O60
+ -m26 -gF -s17.3 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1600 -O60
+ -m26 -gF -s16.6 -w1.0 -f.2 -n500 -B100 -c2 -z2 -r1899 -O60
+ -m14 -gF -s6.8 -w1.0 -f.2 -n500 -B50 -c2 -x2 -y2 -z2 -O60
+ -m13 -gF -s5.9 -w1.0 -f.2 -n500 -B25 -c3 -x2 -y2 -z2 -O60
+ 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
3
@@ -990,12 +990,12 @@
$OPENAIR_DIR/cmake_targets/autotests/tools/free_mem.bash
$OPENAIR_DIR/targets/bin/ulsim.Rel14
- -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
+ -B25 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70
+ -B25 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70
+ -B50 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70
+ -B50 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70
+ -B100 -m5 -y1 -gN -x1 -s6 -w1.0 -e.1 -P -n500 -O70
+ -B100 -m16 -y1 -gN -x1 -s12 -w1.0 -e.1 -P -n500 -O70
ulsim.test1 ulsim.test2 ulsim.test3 ulsim.test4 ulsim.test5 ulsim.test6
"passed"
segmentation fault|assertion|exiting|fatal
diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai
index 1d511f36f6..eb354755b6 100755
--- a/cmake_targets/build_oai
+++ b/cmake_targets/build_oai
@@ -112,8 +112,6 @@ Options
-t | --transport protocol
ETHERNET , None
Adds this trasport protocol support in compilation
---oaisim
- Makes the oaisim simulator. Hardware will be defaulted to \"None\".
--phy_simulators
Makes the unitary tests Layer 1 simulators
--core_simulators
@@ -125,12 +123,12 @@ Options
-V | --vcd
Adds a debgging facility to the binary files: GUI with major internal synchronization events
-x | --xforms
- Adds a software oscilloscope feature to the produced binaries. If oaisim, then enable PRINT_STATS.
+ Adds a software oscilloscope feature to the produced binaries.
--install-system-files
Install OpenArInterface required files in Linux system
(will ask root password)
--noS1
- Compiles oaisim or lte-softmodem without S1 interface, using direct link to IP instead
+ Compiles lte-softmodem without S1 interface, using direct link to IP instead
--verbose-compile
Shows detailed compilation instructions in makefile
--cflags_processor
@@ -165,11 +163,8 @@ Options
Generates a basic [1 UE + 1 eNB + no channel] simulator.
See targets/ARCH/tcp_bridge/README.tcp_bridge_oai for documentation.
Usage (first build):
- oaisim (eNB + UE): ./build_oai -I --oaisim -x --install-system-files
- Eurecom EXMIMO + COTS UE : ./build_oai -I --eNB -x --install-system-files
NI/ETTUS B201 + COTS UE : ./build_oai -I --eNB -x --install-system-files -w USRP
Usage (Regular):
- oaisim : ./build_oai --oaisim -x
Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x
NI/ETTUS B201 + OAI ENB : ./build_oai --eNB -x -w USRP"
}
@@ -255,10 +250,6 @@ function main() {
echo_info "Setting transport protocol to: $TP"
fi
shift 2;;
- --oaisim)
- oaisim=1
- echo_info "Will compile oaisim and drivers nasmesh, ..."
- shift;;
--phy_simulators)
SIMUS_PHY=1
echo_info "Will compile dlsim, ulsim, ..."
@@ -495,16 +486,6 @@ function main() {
check_install_additional_tools
fi
- if [ "$oaisim" = "1" ] ; then
- #to be discussed
- # there is no RF device transport protocol
- HW="None"
- TP="ETHERNET"
-
- if [ "$XFORMS" == "True" ] ; then
- PRINT_STATS="True"
- fi
- fi
echo_info "3. building the compilation directives ..."
@@ -697,129 +678,7 @@ function main() {
cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin
fi
- # oaisim compilation
- ###############
- if [ "$oaisim" = "1" ] ; then
- dconf=$OPENAIR_DIR/targets/bin
- if [ "$NOS1" = "1" ] ; then
- oaisim_build_dir=oaisim_noS1_build_oai
- oaisim_exec=oaisim_nos1
- else
- oaisim_build_dir=oaisim_build_oai
- oaisim_exec=oaisim
- fi
-
- echo_info "Compiling $oaisim_exec ($oaisim_build_dir)"
- cmake_file=$DIR/$oaisim_build_dir/CMakeLists.txt
- cp $DIR/$oaisim_build_dir/CMakeLists.template $cmake_file
- echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
- echo "set ( CFLAGS_PROCESSOR_USER \"$CFLAGS_PROCESSOR_USER\" )" >> $cmake_file
- echo "set ( XFORMS $XFORMS )" >> $cmake_file
- echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
- echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
- echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
- echo "set ( PRINT_STATS $PRINT_STATS )" >> $cmake_file
- echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
- echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
- echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
- echo "set ( UE_NAS_USE_TUN $UE_NAS_USE_TUN )" >> $cmake_file
- echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
- [ "$CLEAN" = "1" ] && rm -rf $DIR/$oaisim_build_dir/build
- mkdir -p $DIR/$oaisim_build_dir/build
- cd $DIR/$oaisim_build_dir/build
- eval $CMAKE_CMD
- compilations \
- $oaisim_build_dir $oaisim_exec \
- $oaisim_exec $dbin/$oaisim_exec.$REL
- compilations \
- $oaisim_build_dir $config_libconfig_shlib \
- lib$config_libconfig_shlib.so $dbin/lib$config_libconfig_shlib.so
- compilations \
- $oaisim_build_dir coding \
- libcoding.so $dbin/libcoding.so
- if [ "$NOS1" != "1" ] ; then
-
- [ "$CLEAN" = "1" ] && rm -rf $DIR/at_commands/build
- echo_info "Compiling at_nas_ue"
- mkdir -p $DIR/at_commands/build
- cd $DIR/at_commands/build
- eval $CMAKE_CMD
- compilations \
- at_commands at_nas_ue \
- at_nas_ue $dbin/at_nas_ue
-
- # ue_ip driver compilation
- echo_info "Compiling UE specific part (ue_ip driver and usim tools)"
- compilations \
- oaisim_build_oai ue_ip \
- CMakeFiles/ue_ip/ue_ip.ko $dbin/ue_ip.ko
-
- [ "$CLEAN" = "1" ] && rm -rf $DIR/nas_sim_tools/build
- mkdir -p $DIR/nas_sim_tools/build
- cd $DIR/nas_sim_tools/build
- eval $CMAKE_CMD
- compilations \
- nas_sim_tools usim \
- usim $dbin/usim
- compilations \
- nas_sim_tools nvram \
- nvram $dbin/nvram
- compilations \
- nas_sim_tools conf2uedata \
- conf2uedata $dbin/conf2uedata
-
- # generate USIM data
- if [ -f $dbin/conf2uedata ]; then
- install_nas_tools $conf_nvram_path $gen_nvram_path
- else
- echo_warning "not generated UE NAS files: binaries not found"
- fi
- else
-
- compilations \
- $oaisim_build_dir rb_tool \
- rb_tool $dbin/rb_tool
-
- # nasmesh driver compilation
- compilations \
- $oaisim_build_dir nasmesh \
- CMakeFiles/nasmesh/nasmesh.ko $dbin/nasmesh.ko
-
- #oai_nw_drv
- #compilations \
- # $oaisim_build_dir oai_nw_drv \
- # CMakeFiles/oai_nw_drv/oai_nw_drv.ko $dbin/oai_nw_drv.ko
- fi
-
- if [ "$TP" == "ETHERNET" ] ; then
- compilations \
- $oaisim_build_dir oai_eth_transpro \
- liboai_eth_transpro.so $dbin/liboai_eth_transpro.so.$REL
- ln -sf liboai_eth_transpro.so liboai_transpro.so
- ln -sf $dbin/liboai_eth_transpro.so.$REL $dbin/liboai_transpro.so
- echo_info "liboai_transpro.so is linked with ETHERNET library"
- fi
-
- cmake_file=$DIR/oaisim_mme_build_oai/CMakeLists.txt
- cp $DIR/oaisim_mme_build_oai/CMakeLists.template $cmake_file
- echo "set ( CMAKE_BUILD_TYPE $CMAKE_BUILD_TYPE )" >> $cmake_file
- echo "set ( XFORMS $XFORMS )" >> $cmake_file
- echo "set ( UE_EXPANSION $UE_EXPANSION )" >> $cmake_file
- echo "set ( PHY_TX_THREAD $UE_EXPANSION )" >> $cmake_file
- echo "set ( PRE_SCD_THREAD $UE_EXPANSION )" >> $cmake_file
- echo "set ( RRC_ASN1_VERSION \"${REL}\")" >> $cmake_file
- echo "set ( ENABLE_VCD_FIFO $VCD_TIMING )" >> $cmake_file
- echo "set ( T_TRACER $T_TRACER )" >> $cmake_file
- echo 'include(${CMAKE_CURRENT_SOURCE_DIR}/../CMakeLists.txt)' >> $cmake_file
- #[ "$CLEAN" = "1" ] && rm -rf $DIR/oaisim_mme_build_oai/build
- #mkdir -p $DIR/oaisim_mme_build_oai/build
- #cd $DIR/oaisim_mme_build_oai/build
- #eval $CMAKE_CMD
- #compilations \
- # oaisim_mme_build_oai oaisim_mme \
- # oaisim_mme $dbin/oaisim_mme.$REL
- fi
# Telnet server compilation
#####################
diff --git a/common/utils/itti/signals.c b/common/utils/itti/signals.c
index 4804e6b731..c526f04f43 100644
--- a/common/utils/itti/signals.c
+++ b/common/utils/itti/signals.c
@@ -42,8 +42,8 @@
#include "log.h"
#if defined (LOG_D) && defined (LOG_E)
-# define SIG_DEBUG(x, args...) LOG_D(EMU, x, ##args)
-# define SIG_ERROR(x, args...) LOG_E(EMU, x, ##args)
+# define SIG_DEBUG(x, args...) LOG_D(RRC, x, ##args)
+# define SIG_ERROR(x, args...) LOG_E(RRC, x, ##args)
#endif
#ifndef SIG_DEBUG
diff --git a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
index bfa8985195..476e79cacb 100644
--- a/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
+++ b/openair1/PHY/CODING/3gpplte_turbo_decoder_sse_8bit.c
@@ -1068,9 +1068,8 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
if (init_stats) stop_meas(init_stats);
// do log_map from first parity bit
-
+
log_map8(systematic0,yparity1,m11,m10,alpha,beta,ext,n2,0,F,offset8_flag,alpha_stats,beta_stats,gamma_stats,ext_stats);
-
while (iteration_cnt++ < max_iterations) {
#ifdef DEBUG_LOGMAP
diff --git a/openair1/PHY/INIT/lte_init_ue.c b/openair1/PHY/INIT/lte_init_ue.c
index 8b6acc65f0..8f6276baa5 100644
--- a/openair1/PHY/INIT/lte_init_ue.c
+++ b/openair1/PHY/INIT/lte_init_ue.c
@@ -709,6 +709,7 @@ int init_lte_ue_signal(PHY_VARS_UE *ue,
for (i=0; inb_antennas_rx; i++) {
common_vars->rxdata[i] = (int32_t*) malloc16_clear( (fp->samples_per_tti*10+2048)*sizeof(int32_t) );
+ LOG_I(PHY,"common_vars->rxdata[%d] %p\n",i,common_vars->rxdata[i]);
common_vars->common_vars_rx_data_per_thread[0].rxdataF[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->ofdm_symbol_size*14) );
common_vars->common_vars_rx_data_per_thread[1].rxdataF[i] = (int32_t*)malloc16_clear( sizeof(int32_t)*(fp->ofdm_symbol_size*14) );
}
diff --git a/openair1/PHY/INIT/lte_parms.c b/openair1/PHY/INIT/lte_parms.c
index e7c4ced5d3..3b8a26125d 100644
--- a/openair1/PHY/INIT/lte_parms.c
+++ b/openair1/PHY/INIT/lte_parms.c
@@ -100,6 +100,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
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;
@@ -148,7 +149,6 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
frame_parms->N_RBGS = 2;
frame_parms->N_RBG = 13;
-
break;
case 15:
@@ -159,6 +159,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
frame_parms->nb_prefix_samples0>>=(3-log2_osf);
frame_parms->N_RBGS = 2;
frame_parms->N_RBG = 8;
+
break;
case 6:
@@ -169,6 +170,7 @@ int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf)
frame_parms->nb_prefix_samples0>>=(4-log2_osf);
frame_parms->N_RBGS = 1;
frame_parms->N_RBG = 6;
+
break;
default:
diff --git a/openair1/PHY/LTE_TRANSPORT/dci.c b/openair1/PHY/LTE_TRANSPORT/dci.c
index d8a13bbbfd..2a59407be3 100755
--- a/openair1/PHY/LTE_TRANSPORT/dci.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci.c
@@ -57,8 +57,8 @@
-static uint8_t d[3*(MAX_DCI_SIZE_BITS + 16) + 96];
-static uint8_t w[3*3*(MAX_DCI_SIZE_BITS+16)];
+//static uint8_t d[3*(MAX_DCI_SIZE_BITS + 16) + 96];
+//static uint8_t w[3*3*(MAX_DCI_SIZE_BITS+16)];
void dci_encoding(uint8_t *a,
uint8_t A,
@@ -70,6 +70,8 @@ void dci_encoding(uint8_t *a,
uint8_t D = (A + 16);
uint32_t RCC;
+ uint8_t d[3*(MAX_DCI_SIZE_BITS + 16) + 96];
+ uint8_t w[3*3*(MAX_DCI_SIZE_BITS+16)];
#ifdef DEBUG_DCI_ENCODING
int32_t i;
@@ -169,7 +171,7 @@ uint8_t *generate_dci0(uint8_t *dci,
return(e+coded_bits);
}
-uint32_t Y;
+//uint32_t Y;
@@ -368,16 +370,12 @@ uint8_t generate_dci_top(uint8_t num_pdcch_symbols,
if (dci_alloc[i].L == (uint8_t)L) {
- #ifdef DEBUG_DCI_ENCODING
- if (dci_alloc[i].rnti==0x1234)
- LOG_D(PHY,"Generating DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x), rnti %x\n",i,num_dci,dci_alloc[i].firstCCE,dci_alloc[i].dci_length,dci_alloc[i].L,
+ LOG_D(PHY,"Generating DCI %d/%d (nCCE %d) of length %d, aggregation %d (%x), rnti %x\n",
+ i,num_dci,dci_alloc[i].firstCCE,dci_alloc[i].dci_length,dci_alloc[i].L,
*(unsigned int*)dci_alloc[i].dci_pdu,
dci_alloc[i].rnti);
- dump_dci(frame_parms,&dci_alloc[i]);
- #endif
if (dci_alloc[i].firstCCE>=0) {
-//printf("generate DCI .%d rnti %d length %d\n", subframe, dci_alloc[i].rnti, dci_alloc[i].dci_length);
e_ptr = generate_dci0(dci_alloc[i].dci_pdu,
e+(72*dci_alloc[i].firstCCE),
dci_alloc[i].dci_length,
diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
index 47ad00f099..c3a309a424 100644
--- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
@@ -1998,12 +1998,13 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
else if(ulsch->harq_processes[harq_pid]->n_DMRS == 7)
ulsch->harq_processes[harq_pid]->n_DMRS2 = 9;
- LOG_D(PHY,"[eNB %d][PUSCH %d] Frame %d, Subframe %d Programming PUSCH with n_DMRS2 %d (cshift %d) ulsch:ndi:%d ulsch_pdu:ndi:%d new_ulsch:%d status:%d ulsch_pdu:rvidx:%d\n",
+ LOG_D(PHY,"[eNB %d][PUSCH %d] Frame %d, Subframe %d Programming PUSCH with n_DMRS2 %d (cshift %d) ulsch:ndi:%d ulsch_pdu:ndi:%d new_ulsch:%d status:%d ulsch_pdu:rvidx:%d ulsch_pdu->ulsch_pdu_rel8.size %d\n",
eNB->Mod_id,harq_pid,frame,subframe,
ulsch->harq_processes[harq_pid]->n_DMRS2,
ulsch->harq_processes[harq_pid]->n_DMRS,
ulsch->harq_processes[harq_pid]->ndi, ulsch_pdu->ulsch_pdu_rel8.new_data_indication, new_ulsch, ulsch->harq_processes[harq_pid]->status,
- ulsch_pdu->ulsch_pdu_rel8.redundancy_version);
+ ulsch_pdu->ulsch_pdu_rel8.redundancy_version,
+ ulsch_pdu->ulsch_pdu_rel8.size);
ulsch->harq_processes[harq_pid]->rvidx = ulsch_pdu->ulsch_pdu_rel8.redundancy_version;
if(ulsch_pdu->ulsch_pdu_rel8.modulation_type!=0)
diff --git a/openair1/PHY/LTE_TRANSPORT/prach.c b/openair1/PHY/LTE_TRANSPORT/prach.c
index 8e225822b1..5614f67955 100644
--- a/openair1/PHY/LTE_TRANSPORT/prach.c
+++ b/openair1/PHY/LTE_TRANSPORT/prach.c
@@ -108,6 +108,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
int prach_ifft_cnt=0;
#endif
#ifdef PRACH_DEBUG
+ int en=0;
int en0=0;
#endif
@@ -229,7 +230,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
#ifdef PRACH_DEBUG
int32_t en0=signal_energy((int32_t*)prach[aa],fp->samples_per_tti);
int8_t dbEn0 = dB_fixed(en0);
- int8_t rach_dBm = dbEn0 - eNB->rx_total_gain_dB;
+ int8_t rach_dBm = dbEn0 - ru->rx_total_gain_dB;
#ifdef PRACH_WRITE_OUTPUT_DEBUG
if (dbEn0>32 && prach[0]!= NULL)
@@ -466,7 +467,7 @@ void rx_prach0(PHY_VARS_eNB *eNB,
} else if (eNB!=NULL) {
#ifdef PRACH_DEBUG
- int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
+ en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
#endif
}
diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c
index 3639d55c05..ab32e285c9 100644
--- a/openair1/PHY/LTE_TRANSPORT/pucch.c
+++ b/openair1/PHY/LTE_TRANSPORT/pucch.c
@@ -1089,7 +1089,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
#endif
#ifdef DEBUG_PUCCH_RX
- LOG_D(PHY,"[eNB] PUCCH fmt1: stat_max : %d, sigma2_dB %d (%d, %d), phase_max : %d\n",dB_fixed(stat_max),sigma2_dB,eNB->measurements.n0_subband_power_tot_dBm[6],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,eNB->measurements.n0_subband_power_tot_dBm[6],pucch1_thres,phase_max);
#endif
@@ -1351,9 +1351,9 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
} // aa
- 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) + (eNB->pucch1ab_stats_cnt[UE_id][subframe]));
- LOG_D(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
+ LOG_I(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_re);
eNB->pucch1ab_stats[UE_id][(subframe<<11) + 1+2*(eNB->pucch1ab_stats_cnt[UE_id][subframe])] = (stat_im);
@@ -1370,7 +1370,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
#if defined(USRP_REC_PLAY)
LOG_D(PHY,"PUCCH 1a/b: NAK subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
#else
- LOG_D(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
+ LOG_I(PHY,"PUCCH 1a/b: subframe %d : sigma2_dB %d, stat_max %d, pucch1_thres %d\n",subframe,sigma2_dB,dB_fixed(stat_max),pucch1_thres);
#endif
*payload = 4; // DTX
((int16_t*)&eNB->pucch1ab_stats[UE_id][(subframe<<10) + (eNB->pucch1ab_stats_cnt[UE_id][subframe])])[0] = (int16_t)(stat_re);
diff --git a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
index 752169d253..48cc5d0063 100644
--- a/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
+++ b/openair1/PHY/LTE_TRANSPORT/ulsch_decoding.c
@@ -337,7 +337,7 @@ int ulsch_decoding_data_2thread0(td_params* tdp) {
else
crc_type = CRC24_B;
-
+
ret = tc(&ulsch_harq->d[r][96],
NULL,
ulsch_harq->c[r],
@@ -667,7 +667,8 @@ int ulsch_decoding_data(PHY_VARS_eNB *eNB,int UE_id,int harq_pid,int llr8_flag)
crc_type = CRC24_A;
else
crc_type = CRC24_B;
-
+
+
start_meas(&eNB->ulsch_turbo_decoding_stats);
ret = tc(&ulsch_harq->d[r][96],
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c
index 82dedd9bc9..61228e52c4 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c
@@ -943,7 +943,7 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format,
}
}
- if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti))
+ if (dci_format == format1A && ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)))
{
NPRB = (TPC&1) + 2;
switch (N_RB_DL) {
@@ -960,8 +960,8 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format,
RIV_max = RIV_max100;
break;
}
- }
- else
+ }
+ else if (dci_format == format1A)
{
switch (N_RB_DL) {
case 6:
@@ -996,13 +996,13 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format,
}
- if(dci_format == format1)
+ else if (dci_format == format1)
{
NPRB = conv_nprb(rah, rballoc, N_RB_DL);
}
- if(rballoc > RIV_max)
+ if(dci_format == format1A && rballoc > RIV_max)
{
// LOG_I(PHY,"bad dci rballoc rballoc %d RIV_max %lld \n",rballoc, RIV_max);
// DCI false detection
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
index f9c336b779..dc9534b1fd 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
@@ -38,7 +38,7 @@
#include "UTIL/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
//#define DEBUG_DLSCH_DECODING
-//#define UE_DEBUG_TRACE 1
+#define UE_DEBUG_TRACE 1
void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch)
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c b/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
index 8fd70ed2a6..aac636f07c 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
@@ -387,6 +387,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
// Now TDD normal prefix
frame_parms->Ncp=NORMAL;
frame_parms->frame_type=TDD;
+ frame_parms->tdd_config=1;
init_frame_parms(frame_parms,1);
if (sync_pos >= frame_parms->nb_prefix_samples)
@@ -426,6 +427,7 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
// Now TDD extended prefix
frame_parms->Ncp=EXTENDED;
frame_parms->frame_type=TDD;
+ frame_parms->tdd_config=1;
init_frame_parms(frame_parms,1);
sync_pos2 = sync_pos - frame_parms->nb_prefix_samples;
@@ -493,17 +495,6 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
#endif
// send sync status to higher layers later when timing offset converge to target timing
-#if OAISIM
- if (ue->mac_enabled==1) {
- LOG_I(PHY,"[UE%d] Sending synch status to higher layers\n",ue->Mod_id);
- //mac_resynch();
- dl_phy_sync_success(ue->Mod_id,ue->proc.proc_rxtx[0].frame_rx,0,1);//ue->common_vars.eNb_id);
- ue->UE_mode[0] = PRACH;
- }
- else {
- ue->UE_mode[0] = PUSCH;
- }
-#endif
generate_pcfich_reg_mapping(frame_parms);
generate_phich_reg_mapping(frame_parms);
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/phich_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/phich_ue.c
index 669e0937c6..2e999a42bc 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/phich_ue.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/phich_ue.c
@@ -369,7 +369,7 @@ void rx_phich(PHY_VARS_UE *ue,
if (HI16>0) { //NACK
if (ue->ulsch_Msg3_active[eNB_id] == 1) {
- LOG_D(PHY,"[UE %d][PUSCH %d][RAPROC] Frame %d subframe %d Msg3 PHICH, received NAK (%d) nseq %d, ngroup %d\n",
+ LOG_I(PHY,"[UE %d][PUSCH %d][RAPROC] Frame %d subframe %d Msg3 PHICH, received NAK (%d) nseq %d, ngroup %d\n",
ue->Mod_id,harq_pid,
proc->frame_rx,
subframe,
@@ -379,7 +379,7 @@ void rx_phich(PHY_VARS_UE *ue,
ulsch->f_pusch += delta_PUSCH_acc[ulsch->harq_processes[harq_pid]->TPC];
- LOG_D(PHY,"[PUSCH %d] AbsSubframe %d.%d: f_pusch (ACC) %d, adjusting by %d (TPC %d)\n",
+ LOG_I(PHY,"[PUSCH %d] AbsSubframe %d.%d: f_pusch (ACC) %d, adjusting by %d (TPC %d)\n",
harq_pid,proc->frame_rx,subframe,ulsch->f_pusch,
delta_PUSCH_acc[ulsch->harq_processes[harq_pid]->TPC],
ulsch->harq_processes[harq_pid]->TPC);
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
index 06acb31d57..6d71f5e366 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/prach_ue.c
@@ -41,6 +41,8 @@
#include "../LTE_TRANSPORT/prach_extern.h"
+//#define PRACH_DEBUG 1
+
int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint16_t Nf )
{
@@ -98,7 +100,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
#else //normal case (simulation)
prach_start = subframe*ue->frame_parms.samples_per_tti-ue->N_TA_offset;
- LOG_D(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id,
+ LOG_I(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id,
prach_start,
ue->rx_offset,
ue->hw_timing_advance,
diff --git a/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c b/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c
index 03df4e7f69..f7451d165e 100644
--- a/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c
+++ b/openair1/PHY/LTE_UE_TRANSPORT/rar_tools_ue.c
@@ -182,7 +182,7 @@ int generate_ue_ulsch_params_from_rar(PHY_VARS_UE *ue,
// initialize power control based on PRACH power
ulsch->f_pusch = delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC] +
get_deltaP_rampup(ue->Mod_id,ue->CC_id);
- LOG_D(PHY,"[UE %d][PUSCH PC] Initializing f_pusch to %d dB, TPC %d (delta_PUSCH_msg2 %d dB), deltaP_rampup %d dB\n",
+ LOG_I(PHY,"[UE %d][PUSCH PC] Initializing f_pusch to %d dB, TPC %d (delta_PUSCH_msg2 %d dB), deltaP_rampup %d dB\n",
ue->Mod_id,ulsch->f_pusch,ulsch->harq_processes[harq_pid]->TPC,delta_PUSCH_msg2[ulsch->harq_processes[harq_pid]->TPC],
get_deltaP_rampup(ue->Mod_id,ue->CC_id));
diff --git a/openair1/PHY/MODULATION/ul_7_5_kHz.c b/openair1/PHY/MODULATION/ul_7_5_kHz.c
index 3d1d9c2b04..d27a305a5d 100644
--- a/openair1/PHY/MODULATION/ul_7_5_kHz.c
+++ b/openair1/PHY/MODULATION/ul_7_5_kHz.c
@@ -83,6 +83,9 @@ void remove_7_5_kHz(RU_t *ru,uint8_t slot)
len = frame_parms->samples_per_tti/2;
+ AssertFatal(slot_offset<10*frame_parms->samples_per_tti,
+ "slot_offset %d >= %d\n",slot_offset,10*frame_parms->samples_per_tti);
+
for (aa=0; aanb_rx; aa++) {
#if defined(__x86_64__) || defined(__i386__)
diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h
index c2cf11a86b..1387c78995 100644
--- a/openair1/PHY/defs_common.h
+++ b/openair1/PHY/defs_common.h
@@ -981,7 +981,7 @@ typedef uint8_t(encoder_if_t)(uint8_t *input,
static inline void wait_sync(char *thread_name) {
- printf( "waiting for sync (%s)\n",thread_name);
+ printf( "waiting for sync (%s,%d/%p,%p,%p)\n",thread_name,sync_var,&sync_var,&sync_cond,&sync_mutex);
pthread_mutex_lock( &sync_mutex );
while (sync_var<0)
diff --git a/openair1/PHY/impl_defs_top.h b/openair1/PHY/impl_defs_top.h
index 8b31b60162..df1f6f4693 100644
--- a/openair1/PHY/impl_defs_top.h
+++ b/openair1/PHY/impl_defs_top.h
@@ -287,9 +287,9 @@ typedef struct {
#ifndef malloc16
# ifdef __AVX2__
-# define malloc16(x) memalign(32,x)
+# define malloc16(x) memalign(32,x+32)
# else
-# define malloc16(x) memalign(16,x)
+# define malloc16(x) memalign(16,x+16)
# endif
#endif
#define free16(y,x) free(y)
@@ -306,9 +306,9 @@ typedef struct {
static inline void* malloc16_clear( size_t size )
{
#ifdef __AVX2__
- void* ptr = memalign(32, size);
+ void* ptr = memalign(32, size+32);
#else
- void* ptr = memalign(16, size);
+ void* ptr = memalign(16, size+16);
#endif
DevAssert(ptr);
memset( ptr, 0, size );
diff --git a/openair1/PHY/phy_extern.h b/openair1/PHY/phy_extern.h
index 4cb3cc538f..ece40bd7b4 100644
--- a/openair1/PHY/phy_extern.h
+++ b/openair1/PHY/phy_extern.h
@@ -70,7 +70,6 @@ extern char mode_string[4][20];
-extern unsigned char NB_RU;
#ifndef OPENAIR2
extern unsigned char NB_eNB_INST;
diff --git a/openair1/PHY/phy_extern_ue.h b/openair1/PHY/phy_extern_ue.h
index 98dbfb886e..964c9977b3 100644
--- a/openair1/PHY/phy_extern_ue.h
+++ b/openair1/PHY/phy_extern_ue.h
@@ -65,7 +65,6 @@ extern int flagMag;
extern char mode_string[4][20];
-extern unsigned char NB_RU;
#ifndef OPENAIR2
extern unsigned char NB_eNB_INST;
diff --git a/openair1/PHY/phy_vars.h b/openair1/PHY/phy_vars.h
index 346f4bee7d..ea7d2e5033 100644
--- a/openair1/PHY/phy_vars.h
+++ b/openair1/PHY/phy_vars.h
@@ -66,7 +66,6 @@ char mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"};
#include "SIMULATION/ETH_TRANSPORT/vars.h"
-unsigned char NB_RU=0;
#ifndef OPENAIR2
unsigned char NB_eNB_INST=0;
diff --git a/openair1/PHY/phy_vars_ue.h b/openair1/PHY/phy_vars_ue.h
index 3577cfe82e..0d29b03f63 100644
--- a/openair1/PHY/phy_vars_ue.h
+++ b/openair1/PHY/phy_vars_ue.h
@@ -60,7 +60,6 @@ char mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"};
#include "SIMULATION/ETH_TRANSPORT/vars.h"
-unsigned char NB_RU=0;
#ifndef OPENAIR2
unsigned char NB_eNB_INST=0;
diff --git a/openair1/SCHED/phy_procedures_lte_common.c b/openair1/SCHED/phy_procedures_lte_common.c
index 26a518e8ef..4871499af8 100644
--- a/openair1/SCHED/phy_procedures_lte_common.c
+++ b/openair1/SCHED/phy_procedures_lte_common.c
@@ -451,7 +451,7 @@ uint8_t get_reset_ack(LTE_DL_FRAME_PARMS *frame_parms,
o_ACK[cw_idx] = harq_ack[subframe_dl0].ack;
status = harq_ack[subframe_dl0].send_harq_status;
- //LOG_I(PHY,"dl subframe %d send_harq_status %d cw_idx %d, reset %d\n",subframe_dl0, status, cw_idx, do_reset);
+ LOG_D(PHY,"dl subframe %d send_harq_status %d cw_idx %d, reset %d\n",subframe_dl0, status, cw_idx, do_reset);
if(do_reset)
harq_ack[subframe_dl0].send_harq_status = 0;
//printf("get_ack: Getting ACK/NAK for PDSCH (subframe %d) => %d\n",subframe_dl,o_ACK[0]);
@@ -631,7 +631,7 @@ uint8_t get_reset_ack(LTE_DL_FRAME_PARMS *frame_parms,
pN_bundled[0] = harq_ack[subframe_rx].vDAI_UL;
status = harq_ack[subframe_dl0].send_harq_status + harq_ack[subframe_dl1].send_harq_status + harq_ack[subframe_dl2].send_harq_status + harq_ack[subframe_dl3].send_harq_status;
- LOG_I(PHY,"TDD Config3 UL Sfn %d, dl Sfn0 %d status %d o_Ack %d, dl Sfn1 %d status %d o_Ack %d dl Sfn2 %d status %d o_Ack %d dl Sfn3 %d status %d o_Ack %d subframe_rx %d N_bundled %d status %d\n",
+ LOG_D(PHY,"TDD Config3 UL Sfn %d, dl Sfn0 %d status %d o_Ack %d, dl Sfn1 %d status %d o_Ack %d dl Sfn2 %d status %d o_Ack %d dl Sfn3 %d status %d o_Ack %d subframe_rx %d N_bundled %d status %d\n",
subframe_tx, subframe_dl0, harq_ack[subframe_dl0].send_harq_status,harq_ack[subframe_dl0].ack,
subframe_dl1, harq_ack[subframe_dl1].send_harq_status,harq_ack[subframe_dl1].ack,
subframe_dl2, harq_ack[subframe_dl2].send_harq_status,harq_ack[subframe_dl2].ack,
diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index 635d8c6b61..08b7b28fa4 100644
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -558,11 +558,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
- // num_pdcch_symbols = DCI_pdu->num_pdcch_symbols;
num_pdcch_symbols = eNB->pdcch_vars[subframe&1].num_pdcch_symbols;
num_dci = eNB->pdcch_vars[subframe&1].num_dci;
- // LOG_D(PHY,"num_pdcch_symbols %"PRIu8",(dci common %"PRIu8", dci uespec %"PRIu8"\n",num_pdcch_symbols,
- // DCI_pdu->Num_common_dci,DCI_pdu->Num_ue_spec_dci);
LOG_D(PHY,"num_pdcch_symbols %"PRIu8",number dci %"PRIu8"\n",num_pdcch_symbols, num_dci);
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_DCI_INFO,num_pdcch_symbols);
@@ -572,7 +569,6 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
if (num_dci > 0)
LOG_D(PHY,"[eNB %"PRIu8"] Frame %d, subframe %d: Calling generate_dci_top (pdcch) (num_dci %"PRIu8") num_pdcch_symbols:%d\n",eNB->Mod_id,frame, subframe, num_dci, num_pdcch_symbols);
- //LOG_D(PHY,"Before generate_dci_top num_pdcch_symbols:%d num_dci:%d dci_alloc:dci_length:%d\n", num_pdcch_symbols, num_dci, eNB->pdcch_vars[subframe&1].dci_alloc[0].dci_length);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_PDCCH_TX,1);
@@ -776,15 +772,15 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
case HARQ_SR:
metric_SR = rx_pucch(eNB,
- uci->pucch_fmt,
- i,
- uci->n_pucch_1_0_sr[0],
- 0, // n2_pucch
- uci->srs_active, // shortened format
- &SR_payload,
- frame,
- subframe,
- PUCCH1_THRES);
+ uci->pucch_fmt,
+ i,
+ uci->n_pucch_1_0_sr[0],
+ 0, // n2_pucch
+ uci->srs_active, // shortened format
+ &SR_payload,
+ frame,
+ subframe,
+ PUCCH1_THRES);
LOG_D(PHY,"[eNB %d][SR %x] Frame %d subframe %d Checking SR is %d (uci.type %d SR n1pucch is %d)\n",
eNB->Mod_id,
uci->rnti,
@@ -849,37 +845,42 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
frame,subframe,
pucch_b0b1[0][0],metric[0]);
- uci->stat = metric[0];
+ uci->stat = metric[0];
fill_uci_harq_indication(eNB,uci,frame,subframe,pucch_b0b1[0],0,0xffff);
}
else { // frame_type == TDD
+ LOG_D(PHY,"Frame %d Subframe %d Demodulating PUCCH (UCI %d) for ACK/NAK (uci->pucch_fmt %d,uci->type %d.uci->frame %d, uci->subframe %d): n1_pucch0 %d SR_payload %d\n",
+ frame,subframe,i,
+ uci->pucch_fmt,uci->type,
+ uci->frame,uci->subframe,uci->n_pucch_1[0][0],
+ SR_payload);
#if 1
metric[0] = rx_pucch(eNB,
- uci->pucch_fmt,
- i,
- uci->n_pucch_1[0][0],
- 0, //n2_pucch
- uci->srs_active, // shortened format
- pucch_b0b1[0],
- frame,
- subframe,
- PUCCH1a_THRES);
+ uci->pucch_fmt,
+ i,
+ uci->n_pucch_1[0][0],
+ 0, //n2_pucch
+ uci->srs_active, // shortened format
+ pucch_b0b1[0],
+ frame,
+ subframe,
+ PUCCH1a_THRES);
if (uci->type==HARQ_SR && metric[0] > metric_SR) SR_payload = 0;
else if (SR_payload == 1) fill_sr_indication(eNB,uci->rnti,frame,subframe,metric_SR);
if (uci->type==HARQ_SR && metric[0] <= metric_SR) {
SR_payload = 1;
metric[0] = rx_pucch(eNB,
- pucch_format1b,
- i,
- uci->n_pucch_1_0_sr[0],
- 0, //n2_pucch
- uci->srs_active, // shortened format
- pucch_b0b1[0],
- frame,
- subframe,
- PUCCH1a_THRES);
+ pucch_format1b,
+ i,
+ uci->n_pucch_1_0_sr[0],
+ 0, //n2_pucch
+ uci->srs_active, // shortened format
+ pucch_b0b1[0],
+ frame,
+ subframe,
+ PUCCH1a_THRES);
}
#else
// if SR was detected, use the n1_pucch from SR
@@ -949,7 +950,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
else if (pucch_b0b1[0][0] != 1 && pucch_b0b1[0][1] != 1) { // 0 ACKs, or at least one DL assignment missed
harq_ack[0] = 0;
}
- uci->stat = metric[0];
+ uci->stat = metric[0];
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,2,0xffff); // special_bundling mode
}
else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==2)){ // multiplexing + no SR, implement Table 10.1.3-5 (Rel14) for multiplexing with M=2
@@ -991,7 +992,7 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
}
}
- uci->stat = max(metric[0],metric[1]);
+ uci->stat = max(metric[0],metric[1]);
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,1,tdd_multiplexing_mask); // multiplexing mode
} //else if ((uci->tdd_bundling == 0) && (res==2))
else if ((uci->tdd_bundling == 0) && (uci->num_pucch_resources==3)){ // multiplexing + no SR, implement Table 10.1.3-6 (Rel14) for multiplexing with M=3
@@ -1210,13 +1211,14 @@ void uci_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
}
}
}
- uci->stat = max_metric;
+ uci->stat = max_metric;
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,1,tdd_multiplexing_mask); // multiplexing mode
} // else if ((uci->tdd_bundling == 0) && (res==4))
else { // bundling
harq_ack[0] = pucch_b0b1[0][0];
harq_ack[1] = pucch_b0b1[0][1];
- uci->stat = metric[0];
+ uci->stat = metric[0];
+ LOG_D(PHY,"bundling: (%d,%d), metric %d\n",harq_ack[0],harq_ack[1],uci->stat);
fill_uci_harq_indication(eNB,uci,frame,subframe,harq_ack,0,0xffff); // special_bundling mode
}
@@ -1285,49 +1287,49 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
int rb2 = rb+ulsch_harq->first_rb;
eNB->rb_mask_ul[rb2>>5] |= (1<<(rb2&31));
}
-
+
LOG_D(PHY,"[eNB %d] frame %d, subframe %d: Scheduling ULSCH Reception for UE %d \n", eNB->Mod_id, frame, subframe, i);
-
+
nPRS = fp->pusch_config_common.ul_ReferenceSignalsPUSCH.nPRS[subframe<<1];
-
+
ulsch->cyclicShift = (ulsch_harq->n_DMRS2 +
- fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
- nPRS)%12;
-
+ fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift +
+ nPRS)%12;
+ AssertFatal(ulsch_harq->TBS>0,"illegal TBS %d\n",ulsch_harq->TBS);
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, Qm %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d, ), O_ACK %d, beta_cqi %d \n",
- eNB->Mod_id,harq_pid,frame,subframe,
- ulsch_harq->dci_alloc,
- ulsch_harq->rar_alloc,
- ulsch_harq->round,
- ulsch_harq->first_rb,
- ulsch_harq->nb_rb,
- ulsch_harq->Qm,
- ulsch_harq->TBS,
- ulsch_harq->rvidx,
- ulsch->cyclicShift,
- ulsch_harq->n_DMRS2,
- fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift,
- ulsch_harq->O_ACK,
- ulsch->beta_offset_cqi_times8);
-
- start_meas(&eNB->ulsch_demodulation_stats);
-
- rx_ulsch(eNB,proc, i);
-
- stop_meas(&eNB->ulsch_demodulation_stats);
-
- start_meas(&eNB->ulsch_decoding_stats);
-
- ret = ulsch_decoding(eNB,proc,
- i,
- 0, // control_only_flag
- ulsch_harq->V_UL_DAI,
- ulsch_harq->nb_rb>20 ? 1 : 0);
-
- stop_meas(&eNB->ulsch_decoding_stats);
-
- LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d ulsch_harq->cqi_crc_status:%d ackBits:%d ulsch_decoding_stats[t:%lld max:%lld]\n",
+ "[eNB %d][PUSCH %d] Frame %d Subframe %d Demodulating PUSCH: dci_alloc %d, rar_alloc %d, round %d, first_rb %d, nb_rb %d, Qm %d, TBS %d, rv %d, cyclic_shift %d (n_DMRS2 %d, cyclicShift_common %d, ), O_ACK %d, beta_cqi %d \n",
+ eNB->Mod_id,harq_pid,frame,subframe,
+ ulsch_harq->dci_alloc,
+ ulsch_harq->rar_alloc,
+ ulsch_harq->round,
+ ulsch_harq->first_rb,
+ ulsch_harq->nb_rb,
+ ulsch_harq->Qm,
+ ulsch_harq->TBS,
+ ulsch_harq->rvidx,
+ ulsch->cyclicShift,
+ ulsch_harq->n_DMRS2,
+ fp->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift,
+ ulsch_harq->O_ACK,
+ ulsch->beta_offset_cqi_times8);
+
+ start_meas(&eNB->ulsch_demodulation_stats);
+
+ rx_ulsch(eNB,proc, i);
+
+ stop_meas(&eNB->ulsch_demodulation_stats);
+
+ start_meas(&eNB->ulsch_decoding_stats);
+
+ ret = ulsch_decoding(eNB,proc,
+ i,
+ 0, // control_only_flag
+ ulsch_harq->V_UL_DAI,
+ ulsch_harq->nb_rb>20 ? 1 : 0);
+
+ stop_meas(&eNB->ulsch_decoding_stats);
+
+ LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d RNTI %x RX power (%d,%d) N0 (%d,%d) dB ACK (%d,%d), decoding iter %d ulsch_harq->cqi_crc_status:%d ackBits:%d ulsch_decoding_stats[t:%lld max:%lld]\n",
eNB->Mod_id,harq_pid,
frame,subframe,
ulsch->rnti,
@@ -1341,35 +1343,29 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
ulsch_harq->cqi_crc_status,
ulsch_harq->O_ACK,
eNB->ulsch_decoding_stats.diff_now, eNB->ulsch_decoding_stats.max);
-
- //compute the expected ULSCH RX power (for the stats)
- ulsch_harq->delta_TF = get_hundred_times_delta_IF_eNB(eNB,i,harq_pid, 0); // 0 means bw_factor is not considered
-
- if (ulsch_harq->cqi_crc_status == 1) {
+
+ //compute the expected ULSCH RX power (for the stats)
+ ulsch_harq->delta_TF = get_hundred_times_delta_IF_eNB(eNB,i,harq_pid, 0); // 0 means bw_factor is not considered
+
+ if (ulsch_harq->cqi_crc_status == 1) {
#ifdef DEBUG_PHY_PROC
- //if (((frame%10) == 0) || (frame < 50))
- print_CQI(ulsch_harq->o,ulsch_harq->uci_format,0,fp->N_RB_DL);
+ //if (((frame%10) == 0) || (frame < 50))
+ print_CQI(ulsch_harq->o,ulsch_harq->uci_format,0,fp->N_RB_DL);
#endif
-
+
fill_ulsch_cqi_indication(eNB,frame,subframe,
ulsch_harq,
ulsch->rnti);
- RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe));
- }else{
- if(RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag & (1 << subframe) ){
- RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_flag &= (~(1 << subframe));
- RC.mac[eNB->Mod_id]->UE_list.UE_sched_ctrl[i].cqi_req_timer=30;
- LOG_D(PHY,"Frame %d,Subframe %d, We're supposed to get a cqi here. Set cqi_req_timer to 30.\n",frame,subframe);
- }
+
}
-
+
if (ret == (1+MAX_TURBO_ITERATIONS)) {
- T(T_ENB_PHY_ULSCH_UE_NACK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(ulsch->rnti),
- T_INT(harq_pid));
-
+ T(T_ENB_PHY_ULSCH_UE_NACK, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T_INT(ulsch->rnti),
+ T_INT(harq_pid));
+
fill_crc_indication(eNB,i,frame,subframe,1); // indicate NAK to MAC
fill_rx_indication(eNB,i,frame,subframe); // indicate SDU to MAC
-
+
LOG_D(PHY,"[eNB %d][PUSCH %d] frame %d subframe %d UE %d Error receiving ULSCH, round %d/%d (ACK %d,%d)\n",
eNB->Mod_id,harq_pid,
frame,subframe, i,
@@ -1377,24 +1373,24 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
ulsch->Mlimit,
ulsch_harq->o_ACK[0],
ulsch_harq->o_ACK[1]);
-
+
if (ulsch_harq->round >= 3) {
- ulsch_harq->status = SCH_IDLE;
- ulsch_harq->handled = 0;
- ulsch->harq_mask &= ~(1 << harq_pid);
- ulsch_harq->round = 0;
- }
+ ulsch_harq->status = SCH_IDLE;
+ ulsch_harq->handled = 0;
+ ulsch->harq_mask &= ~(1 << harq_pid);
+ ulsch_harq->round = 0;
+ }
#if defined(MESSAGE_CHART_GENERATOR_PHY)
MSC_LOG_RX_DISCARDED_MESSAGE(
- MSC_PHY_ENB,MSC_PHY_UE,
- NULL,0,
- "%05u:%02u ULSCH received rnti %x harq id %u round %d",
- frame,subframe,
- ulsch->rnti,harq_pid,
- ulsch_harq->round-1
- );
+ MSC_PHY_ENB,MSC_PHY_UE,
+ NULL,0,
+ "%05u:%02u ULSCH received rnti %x harq id %u round %d",
+ frame,subframe,
+ ulsch->rnti,harq_pid,
+ ulsch_harq->round-1
+ );
#endif
-
+
/* Mark the HARQ process to release it later if max transmission reached
* (see below).
* MAC does not send the max transmission count, we have to deal with it
@@ -1433,10 +1429,10 @@ void pusch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc)
LOG_T(PHY,"\n");
#endif
#endif
- } // ulsch not in error
+ } // ulsch not in error
if (ulsch_harq->O_ACK>0) fill_ulsch_harq_indication(eNB,ulsch_harq,ulsch->rnti,frame,subframe,ulsch->bundling);
-
+
LOG_D(PHY,"[eNB %d] Frame %d subframe %d: received ULSCH harq_pid %d for UE %d, ret = %d, CQI CRC Status %d, ACK %d,%d, ulsch_errors %d/%d\n",
eNB->Mod_id,frame,subframe,
harq_pid,
@@ -1910,6 +1906,7 @@ void fill_uci_harq_indication(PHY_VARS_eNB *eNB,
if (uci->pucch_fmt == pucch_format1a) {
pdu->harq_indication_tdd_rel13.tl.tag = NFAPI_HARQ_INDICATION_TDD_REL13_TAG;
pdu->harq_indication_tdd_rel13.number_of_ack_nack = 1;
+ LOG_D(PHY,"bundling, pucch1a, number of ack nack %d\n",pdu->harq_indication_tdd_rel13.number_of_ack_nack);
AssertFatal(harq_ack[0] == 1 || harq_ack[0] == 2 || harq_ack[0] == 4, "harq_ack[0] is %d, should be 1,2 or 4\n",harq_ack[0]);
pdu->harq_indication_tdd_rel13.harq_data[0].bundling.value_0 = harq_ack[0];
// release all bundled DLSCH if needed
diff --git a/openair1/SCHED_UE/phy_procedures_lte_ue.c b/openair1/SCHED_UE/phy_procedures_lte_ue.c
index 08e06294b1..fc095f49a9 100644
--- a/openair1/SCHED_UE/phy_procedures_lte_ue.c
+++ b/openair1/SCHED_UE/phy_procedures_lte_ue.c
@@ -1241,46 +1241,48 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
if (empty_subframe)
{
//#if 1
+ overflow = ulsch_start - 9*frame_parms->samples_per_tti;
+ for (aa=0; aanb_antennas_tx; aa++) {
+
+ if (overflow > 0)
+ {
+ memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*(frame_parms->samples_per_tti-overflow));
+ memset(&ue->common_vars.txdata[aa][0],0,4*overflow);
+ }
+ else
+ {
+ memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*frame_parms->samples_per_tti);
+ }
+ }
+ /*#else
overflow = ulsch_start - 9*frame_parms->samples_per_tti;
for (aa=0; aanb_antennas_tx; aa++) {
-
- if (overflow > 0)
- {
- memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*(frame_parms->samples_per_tti-overflow));
- memset(&ue->common_vars.txdata[aa][0],0,4*overflow);
- }
- else
- {
- memset(&ue->common_vars.txdata[aa][ulsch_start],0,4*frame_parms->samples_per_tti);
- }
+ for (k=ulsch_start; ksamples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME,ulsch_start+frame_parms->samples_per_tti); k++) {
+ ((short*)ue->common_vars.txdata[aa])[2*k] = 0;
+ ((short*)ue->common_vars.txdata[aa])[2*k+1] = 0;
}
-/*#else
- overflow = ulsch_start - 9*frame_parms->samples_per_tti;
- for (aa=0; aanb_antennas_tx; aa++) {
- for (k=ulsch_start; ksamples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME,ulsch_start+frame_parms->samples_per_tti); k++) {
- ((short*)ue->common_vars.txdata[aa])[2*k] = 0;
- ((short*)ue->common_vars.txdata[aa])[2*k+1] = 0;
- }
-
- for (k=0; kcommon_vars.txdata[aa])[2*k] = 0;
- ((short*)ue->common_vars.txdata[aa])[2*k+1] = 0;
- }
+
+ for (k=0; kcommon_vars.txdata[aa])[2*k] = 0;
+ ((short*)ue->common_vars.txdata[aa])[2*k+1] = 0;
}
-#endif*/
- return;
+ }
+ #endif*/
+ return;
}
//#endif
-// if ((frame_tx%100) == 0)
- LOG_D(PHY,"[UE %d] Frame %d, subframe %d: ulsch_start = %d (rxoff %d, HW TA %d, timing advance %d, TA_offset %d\n",
- ue->Mod_id,frame_tx,subframe_tx,
- ulsch_start,
- ue->rx_offset,
- ue->hw_timing_advance,
- ue->timing_advance,
- ue->N_TA_offset);
-
+/*
+ LOG_D(PHY,"[UE %d] Frame %d, subframe %d: ulsch_start = %d (rxoff %d, HW TA %d, timing advance %d, TA_offset %d, signal energy %d dB\n",
+ ue->Mod_id,frame_tx,subframe_tx,
+ ulsch_start,
+ ue->rx_offset,
+ ue->hw_timing_advance,
+ ue->timing_advance,
+ ue->N_TA_offset,
+ dB_fixed(signal_energy(&ue->common_vars.txdataF[aa][subframe_tx*nsymb*frame_parms->ofdm_symbol_size],
+ nsymb*frame_parms->ofdm_symbol_size)));
+*/
for (aa=0; aanb_antennas_tx; aa++) {
if (frame_parms->Ncp == 1)
@@ -1303,7 +1305,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
#endif
nsymb>>1,
&ue->frame_parms);
-
+
normal_prefix_mod(&ue->common_vars.txdataF[aa][((subframe_tx*nsymb)+(nsymb>>1))*frame_parms->ofdm_symbol_size],
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
dummy_tx_buffer+(frame_parms->samples_per_tti>>1),
@@ -1312,7 +1314,7 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
#endif
nsymb>>1,
&ue->frame_parms);
- }
+ }
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
apply_7_5_kHz(ue,dummy_tx_buffer,0);
@@ -1340,11 +1342,11 @@ void ulsch_common_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, uint8_t empt
// handle switch before 1st TX subframe, guarantee that the slot prior to transmission is switch on
for (k=ulsch_start - (frame_parms->samples_per_tti>>1) ; kcommon_vars.txdata[aa][k+frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
+ ue->common_vars.txdata[aa][k+frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
else if (k>(frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME))
- ue->common_vars.txdata[aa][k-frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
+ ue->common_vars.txdata[aa][k-frame_parms->samples_per_tti*LTE_NUMBER_OF_SUBFRAMES_PER_FRAME] &= 0xFFFEFFFE;
else
- ue->common_vars.txdata[aa][k] &= 0xFFFEFFFE;
+ ue->common_vars.txdata[aa][k] &= 0xFFFEFFFE;
}
#endif
#endif
@@ -2177,29 +2179,29 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
case pucch_format1a:
case pucch_format1b:
{
- if (ue->mac_enabled == 1) {
- Po_PUCCH = pucch_power_cntl(ue,proc,subframe_tx,eNB_id,format);
- }
- else {
- Po_PUCCH = ue->tx_power_max_dBm;
- }
- ue->tx_power_dBm[subframe_tx] = Po_PUCCH;
- ue->tx_total_RE[subframe_tx] = 12;
-
+ if (ue->mac_enabled == 1) {
+ Po_PUCCH = pucch_power_cntl(ue,proc,subframe_tx,eNB_id,format);
+ }
+ else {
+ Po_PUCCH = ue->tx_power_max_dBm;
+ }
+ ue->tx_power_dBm[subframe_tx] = Po_PUCCH;
+ ue->tx_total_RE[subframe_tx] = 12;
+
#if defined(EXMIMO) || defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
- tx_amp = get_tx_amp(Po_PUCCH,
- ue->tx_power_max_dBm,
- ue->frame_parms.N_RB_UL,
- 1);
+ tx_amp = get_tx_amp(Po_PUCCH,
+ ue->tx_power_max_dBm,
+ ue->frame_parms.N_RB_UL,
+ 1);
#else
- tx_amp = AMP;
+ tx_amp = AMP;
#endif
#if T_TRACER
- T(T_UE_PHY_PUCCH_TX_POWER, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx),T_INT(ue->tx_power_dBm[subframe_tx]),
- T_INT(tx_amp),T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->g_pucch),T_INT(get_PL(ue->Mod_id,ue->CC_id,eNB_id)));
+ T(T_UE_PHY_PUCCH_TX_POWER, T_INT(eNB_id), T_INT(frame_tx%1024), T_INT(subframe_tx),T_INT(ue->tx_power_dBm[subframe_tx]),
+ T_INT(tx_amp),T_INT(ue->dlsch[ue->current_thread_id[proc->subframe_rx]][eNB_id][0]->g_pucch),T_INT(get_PL(ue->Mod_id,ue->CC_id,eNB_id)));
#endif
-
-#ifdef UE_DEBUG_TRACE
+
+ //#ifdef UE_DEBUG_TRACE
if(format == pucch_format1)
{
LOG_D(PHY,"[UE %d][SR %x] AbsSubframe %d.%d Generating PUCCH 1 (SR for PUSCH), an_srs_simultanous %d, shorten_pucch %d, n1_pucch %d, Po_PUCCH %d\n",
@@ -2240,7 +2242,7 @@ void ue_pucch_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
tx_amp);
}
}
-#endif
+ //#endif
#if T_TRACER
if(pucch_payload[0])
@@ -2392,30 +2394,32 @@ void phy_procedures_UE_TX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,ui
frame_parms->ofdm_symbol_size*frame_parms->symbols_per_tti*sizeof(int32_t));
}
+ if (subframe_select(&ue->frame_parms,proc->subframe_tx) == SF_UL ||
+ ue->frame_parms.frame_type == FDD) {
+ if (ue->UE_mode[eNB_id] != PRACH ) {
+ // check cell srs subframe and ue srs subframe. This has an impact on pusch encoding
+ isSubframeSRS = is_srs_occasion_common(&ue->frame_parms,proc->frame_tx,proc->subframe_tx);
- if (ue->UE_mode[eNB_id] != PRACH) {
- // check cell srs subframe and ue srs subframe. This has an impact on pusch encoding
- isSubframeSRS = is_srs_occasion_common(&ue->frame_parms,proc->frame_tx,proc->subframe_tx);
-
- ue_compute_srs_occasion(ue,proc,eNB_id,isSubframeSRS);
-
- ue_ulsch_uespec_procedures(ue,proc,eNB_id,abstraction_flag);
-
- LOG_D(PHY,"ULPOWERS After ulsch_uespec_procedures : ue->tx_power_dBm[%d]=%d, NPRB %d\n",
- subframe_tx,ue->tx_power_dBm[subframe_tx],ue->tx_total_RE[subframe_tx]);
- }
-
- if (ue->UE_mode[eNB_id] == PUSCH) {
+ ue_compute_srs_occasion(ue,proc,eNB_id,isSubframeSRS);
+
+ ue_ulsch_uespec_procedures(ue,proc,eNB_id,abstraction_flag);
+
+ LOG_D(PHY,"ULPOWERS After ulsch_uespec_procedures : ue->tx_power_dBm[%d]=%d, NPRB %d\n",
+ subframe_tx,ue->tx_power_dBm[subframe_tx],ue->tx_total_RE[subframe_tx]);
+ }
+
+ if (ue->UE_mode[eNB_id] == PUSCH) {
// check if we need to use PUCCH 1a/1b
ue_pucch_procedures(ue,proc,eNB_id,abstraction_flag);
// check if we need to use SRS
ue_srs_procedures(ue,proc,eNB_id,abstraction_flag);
- } // UE_mode==PUSCH
+ } // UE_mode==PUSCH
-
+ }
-
+ LOG_D(PHY,"doing ulsch_common_procedures (%d.%d): generate_ul_signal %d\n",frame_tx,subframe_tx,
+ ue->generate_ul_signal[eNB_id]);
ulsch_common_procedures(ue,proc, (ue->generate_ul_signal[eNB_id] == 0));
if ((ue->UE_mode[eNB_id] == PRACH) &&
@@ -2491,8 +2495,8 @@ void phy_procedures_UE_S_TX(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t abstraction_f
ue->common_vars.txdata[aa][i] = 0x00010001;
#else //this is the normal case
- memset(&ue->common_vars.txdata[aa][0],0,
- (LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti)*sizeof(int32_t));
+ // memset(&ue->common_vars.txdata[aa][0],0,
+ // (LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*frame_parms->samples_per_tti)*sizeof(int32_t));
#endif //else EXMIMO
}
@@ -2665,6 +2669,9 @@ void ue_pbch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc, uin
ue->UE_mode[eNB_id]==NOT_SYNCHED ? 1 : 0);
}
+ // if this is the first PBCH after initial synchronization, make L1 state = PRACH
+ if (ue->UE_mode[eNB_id]==NOT_SYNCHED) ue->UE_mode[eNB_id] = PRACH;
+
if (first_run) {
first_run = 0;
@@ -2786,6 +2793,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
uint8_t next1_thread_id = ue->current_thread_id[subframe_rx]== (RX_NB_TH-1) ? 0:(ue->current_thread_id[subframe_rx]+1);
uint8_t next2_thread_id = next1_thread_id== (RX_NB_TH-1) ? 0:(next1_thread_id+1);
+ LOG_D(PHY,"DCI Decoding procedure in %d.%d\n",frame_rx,subframe_rx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PDCCH_PROCEDURES, VCD_FUNCTION_IN);
#if UE_TIMING_TRACE
start_meas(&ue->dlsch_rx_pdcch_stats);
@@ -5228,7 +5236,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u
}
if ((subframe_select(&ue->frame_parms,subframe_tx)==SF_S) &&
- (slot==1)) {
+ (slot==1)) {
phy_procedures_UE_S_TX(ue,eNB_id,abstraction_flag);
}
diff --git a/openair1/SCHED_UE/pusch_pc.c b/openair1/SCHED_UE/pusch_pc.c
index 90c17099a0..fa38d42c60 100644
--- a/openair1/SCHED_UE/pusch_pc.c
+++ b/openair1/SCHED_UE/pusch_pc.c
@@ -114,7 +114,7 @@ void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_
else if (ue->ulsch[eNB_id]->PHR > 40)
ue->ulsch[eNB_id]->PHR = 40;
- LOG_D(PHY,"[UE %d][PUSCH %d] AbsSubframe %d.%d: nb_rb: %d, Po_PUSCH %d dBm : tx power %d, Po_NOMINAL_PUSCH %d,log10(NPRB) %f,PHR %d, PL %d, alpha*PL %f,delta_IF %f,f_pusch %d\n",
+ LOG_D(PHY,"[UE %d][PUSCH %d] AbsSubframe %d.%d: nb_rb: %d, Po_PUSCH %d dBm : tx power max %d , Po_NOMINAL_PUSCH %d,log10(NPRB) %f,PHR %d, PL %d, alpha*PL %f,delta_IF %f,f_pusch %d\n",
ue->Mod_id,harq_pid,proc->frame_tx,proc->subframe_tx,nb_rb,
ue->ulsch[eNB_id]->Po_PUSCH,
ue->tx_power_max_dBm,
diff --git a/openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c b/openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c
index 8cf9e13212..fa4ffcc6da 100644
--- a/openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c
+++ b/openair1/SIMULATION/ETH_TRANSPORT/multicast_link.c
@@ -99,7 +99,7 @@ multicast_link_init(void)
SOCK_DGRAM,
&group_list[group].port, &sin);
- LOG_D(EMU, "multicast_link_init(): Created socket %d for group %d, port %d\n",
+ LOG_D(PHY, "multicast_link_init(): Created socket %d for group %d, port %d\n",
group_list[group].socket,group,group_list[group].port);
/* Used so we can re-bind to our port while a previous connection is still
@@ -107,17 +107,17 @@ multicast_link_init(void)
*/
if (setsockopt(group_list[group].socket, SOL_SOCKET, SO_REUSEADDR,
&reuse_addr, sizeof (reuse_addr)) < 0) {
- LOG_E(EMU, "[MULTICAST] ERROR : setsockopt:SO_REUSEADDR, exiting ...");
+ LOG_E(PHY, "[MULTICAST] ERROR : setsockopt:SO_REUSEADDR, exiting ...");
exit (EXIT_FAILURE);
}
if (multicast_if != NULL) {
if (setsockopt(group_list[group].socket, SOL_SOCKET,SO_BINDTODEVICE,
multicast_if, strlen(multicast_if)) < 0) {
- LOG_E(EMU,
+ LOG_E(PHY,
"[MULTICAST] ERROR : setsockopt:SO_BINDTODEVICE on interface %s, exiting ...\n",
multicast_if);
- LOG_E(EMU,
+ LOG_E(PHY,
"[MULTICAST] make sure that you have a root privilage or run with sudo -E \n");
exit (EXIT_FAILURE);
}
@@ -132,7 +132,7 @@ multicast_link_init(void)
if (setsockopt (group_list[group].socket, IPPROTO_IP, IP_MULTICAST_LOOP,
&multicast_loop, sizeof (multicast_loop)) < 0) {
- LOG_E(EMU,
+ LOG_E(PHY,
"[MULTICAST] ERROR: %s line %d multicast_link_main_loop() IP_MULTICAST_LOOP %m",
__FILE__, __LINE__);
exit (EXIT_FAILURE);
@@ -143,13 +143,13 @@ multicast_link_init(void)
command.imr_interface.s_addr = htonl (INADDR_ANY);
if (command.imr_multiaddr.s_addr == -1) {
- LOG_E(EMU, "[MULTICAST] ERROR: %s line %d NO MULTICAST", __FILE__, __LINE__);
+ LOG_E(PHY, "[MULTICAST] ERROR: %s line %d NO MULTICAST", __FILE__, __LINE__);
exit (EXIT_FAILURE);
}
if (setsockopt (group_list[group].socket, IPPROTO_IP, IP_ADD_MEMBERSHIP,
&command, sizeof (command)) < 0) {
- LOG_E(EMU, "[MULTICAST] ERROR: %s line %d IP_ADD_MEMBERSHIP %m", __FILE__,
+ LOG_E(PHY, "[MULTICAST] ERROR: %s line %d IP_ADD_MEMBERSHIP %m", __FILE__,
__LINE__);
exit (EXIT_FAILURE);
}
@@ -202,13 +202,13 @@ multicast_link_read_data (int groupP)
if ((groupP < MULTICAST_LINK_NUM_GROUPS) && (groupP >= 0)) {
if ((num_bytes = recvfrom (group_list[groupP].socket,
group_list[groupP].rx_buffer, 40000, 0, 0, 0)) < 0) {
- LOG_E(EMU, "[MULTICAST] recvfrom has failed (%d:%s)\n (%s:%d)\n",
+ LOG_E(PHY, "[MULTICAST] recvfrom has failed (%d:%s)\n (%s:%d)\n",
errno, strerror(errno), __FILE__, __LINE__);
} else {
rx_handler(num_bytes,group_list[groupP].rx_buffer);
}
} else {
- LOG_E(EMU, "[MULTICAST] ERROR: groupP out of bounds %d\n", groupP);
+ LOG_E(PHY, "[MULTICAST] ERROR: groupP out of bounds %d\n", groupP);
}
}
@@ -242,7 +242,7 @@ multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP)
if ((num = sendto (group_list[groupP].socket, dataP, sizeP, 0,
(struct sockaddr *) &group_list[groupP].sock_remote_addr,
sizeof (group_list[groupP].sock_remote_addr))) < 0) {
- LOG_E(EMU, "[MULTICAST] sendto has failed (%d:%s)\n (%s:%d)\n",
+ LOG_E(PHY, "[MULTICAST] sendto has failed (%d:%s)\n (%s:%d)\n",
errno, strerror(errno),
__FILE__, __LINE__);
}
@@ -274,22 +274,19 @@ int multicast_link_read_data_from_sock(uint8_t is_master)
multicast_link_build_select_list ();
- LOG_D(EMU, "Stuck on select with timeout %s\n",
+ LOG_D(PHY, "Stuck on select with timeout %s\n",
timeout_p == NULL ? "infinite" : "15000 usecs");
readsocks = select(highsock + 1, &socks, (fd_set *) 0, (fd_set *) 0, timeout_p);
if (readsocks < 0) {
- LOG_E(EMU, "Multicast select failed (%d:%s)\n", errno, strerror(errno));
+ LOG_E(PHY, "Multicast select failed (%d:%s)\n", errno, strerror(errno));
exit(EXIT_FAILURE);
} else if (readsocks > 0) {
-#ifdef DEBUG_EMU
- LOG_D(EMU, "Multicast Normal read\n");
-#endif
multicast_link_read();
} else {
/* Timeout */
- LOG_I(EMU, "Multicast select time-out\n");
+ LOG_I(PHY, "Multicast select time-out\n");
return 1;
}
@@ -311,21 +308,21 @@ void multicast_link_start(void (*rx_handlerP) (unsigned int, char *),
rx_handler = rx_handlerP;
multicast_group = _multicast_group;
multicast_if = multicast_ifname;
- LOG_I(EMU, "[MULTICAST] LINK START on interface=%s for group=%d: handler=%p\n",
+ LOG_I(PHY, "[MULTICAST] LINK START on interface=%s for group=%d: handler=%p\n",
(multicast_if == NULL) ? "not specified" : multicast_if, multicast_group,
rx_handler);
multicast_link_init ();
#if ! defined(ENABLE_NEW_MULTICAST)
- LOG_D(EMU, "[MULTICAST] multicast link start thread\n");
+ LOG_D(PHY, "[MULTICAST] multicast link start thread\n");
if (pthread_create (&main_loop_thread, NULL, multicast_link_main_loop,
NULL) != 0) {
- LOG_E(EMU, "[MULTICAST LINK] Error in pthread_create (%d:%s)\n",
+ LOG_E(PHY, "[MULTICAST LINK] Error in pthread_create (%d:%s)\n",
errno, strerror(errno));
exit(EXIT_FAILURE);
} else {
pthread_detach(main_loop_thread); // disassociate from parent
- LOG_I(EMU, "[MULTICAST LINK] Thread detached\n");
+ LOG_I(PHY, "[MULTICAST LINK] Thread detached\n");
}
#endif
diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c
index f269a6fe58..909c40512d 100644
--- a/openair1/SIMULATION/LTE_PHY/dlsim.c
+++ b/openair1/SIMULATION/LTE_PHY/dlsim.c
@@ -521,6 +521,7 @@ int main(int argc, char **argv)
int k,i,j,aa;
int re;
+
int s,Kr,Kr_bytes;
double SNR,snr0=-2.0,snr1,rate = 0;
@@ -1137,10 +1138,10 @@ int main(int argc, char **argv)
}
else {
eNB->te = dlsch_encoding_2threads;
- extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *);
- extern void init_te_thread(PHY_VARS_eNB *, pthread_attr_t *);
- init_td_thread(eNB,NULL);
- init_te_thread(eNB,NULL);
+ extern void init_td_thread(PHY_VARS_eNB *);
+ extern void init_te_thread(PHY_VARS_eNB *);
+ init_td_thread(eNB);
+ init_te_thread(eNB);
}
// callback functions required for phy_procedures_tx
@@ -1306,7 +1307,9 @@ int main(int argc, char **argv)
}
*/
+
UE->pdcch_vars[UE->current_thread_id[subframe]][0]->crnti = n_rnti;
+ UE->n_connected_eNB = 1;
printf("Allocating %dx%d eNB->UE channel descriptor\n",eNB->frame_parms.nb_antennas_tx,UE->frame_parms.nb_antennas_rx);
eNB2UE[0] = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx,
@@ -1318,8 +1321,10 @@ int main(int argc, char **argv)
rx_sample_offset,
0);
+ reset_meas(&eNB2UE[0]->random_channel);
+ reset_meas(&eNB2UE[0]->interp_time);
if(num_rounds>1) {
- for(n=1; n<4; n++)
+ for(n=1; n<4; n++) {
eNB2UE[n] = new_channel_desc_scm(eNB->frame_parms.nb_antennas_tx,
UE->frame_parms.nb_antennas_rx,
channel_model,
@@ -1328,8 +1333,11 @@ int main(int argc, char **argv)
forgetting_factor,
rx_sample_offset,
0);
+ reset_meas(&eNB2UE[n]->random_channel);
+ reset_meas(&eNB2UE[n]->interp_time);
+ }
}
-
+
if (eNB2UE[0]==NULL) {
printf("Problem generating channel model. Exiting.\n");
exit(-1);
diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c
index 5d984177f5..c4ea5d5ffb 100644
--- a/openair1/SIMULATION/LTE_PHY/ulsim.c
+++ b/openair1/SIMULATION/LTE_PHY/ulsim.c
@@ -126,7 +126,6 @@ fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
{
memset((void *) ul_config_pdu, 0, sizeof(nfapi_ul_config_request_pdu_t));
- // printf("filling ul_config_pdu: modulation type %d, rvidx %d\n",modulation_type,redundancy_version);
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_PDU_TYPE;
ul_config_pdu->pdu_size = (uint8_t) (2 + sizeof(nfapi_ul_config_ulsch_pdu));
@@ -147,6 +146,8 @@ fill_nfapi_ulsch_config_request(nfapi_ul_config_request_pdu_t *ul_config_pdu,
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.n_srs = n_srs;
ul_config_pdu->ulsch_pdu.ulsch_pdu_rel8.size = size;
+ //printf("Filling ul_config_pdu : Q %d, TBS %d, rv %d, ndi %d\n", modulation_type,size,redundancy_version,new_data_indication);
+
if (cqi_req == 1) {
// Add CQI portion
ul_config_pdu->pdu_type = NFAPI_UL_CONFIG_ULSCH_CQI_RI_PDU_TYPE;
@@ -183,6 +184,7 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
int mcs,
int modulation_type,
int ndi,
+ int TBS,
int cqi_flag,
uint8_t beta_CQI,
uint8_t beta_RI,
@@ -191,7 +193,7 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
nfapi_ul_config_request_body_t *ul_req=&sched_resp->UL_req->ul_config_request_body;
int harq_pid = ((frame*10)+subframe)&7;
- // printf("ulsch in frame %d, subframe %d => harq_pid %d, mcs %d, ndi %d\n",frame,subframe,harq_pid,mcs,ndi);
+ //printf("ulsch in frame %d, subframe %d => harq_pid %d, mcs %d, ndi %d\n",frame,subframe,harq_pid,mcs,ndi);
switch (eNB->frame_parms.N_RB_UL) {
case 6:
@@ -297,7 +299,7 @@ void fill_ulsch_dci(PHY_VARS_eNB *eNB,
0, // ul_tx_mode
0, // current_tx_nb
0, // n_srs
- get_TBS_UL(mcs,nb_rb));
+ TBS);
sched_resp->UL_req->header.message_id = NFAPI_UL_CONFIG_REQUEST;
ul_req->number_of_pdus=1;
@@ -446,14 +448,14 @@ int main(int argc, char **argv)
"cannot load configuration module, exiting\n");
logInit();
- /*
+
// enable these lines if you need debug info
// however itti will catch all signals, so ctrl-c won't work anymore
// alternatively you can disable ITTI completely in CMakeLists.txt
- itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
- set_comp_log(PHY,LOG_DEBUG,LOG_MED,1);
- set_glog(LOG_DEBUG,LOG_MED);
- */
+ //itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
+ //set_comp_log(PHY,LOG_DEBUG,LOG_MED,1);
+ //set_glog(LOG_DEBUG,LOG_MED);
+
while ((c = getopt (argc, argv, "hapZEbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:LF")) != -1) {
switch (c) {
@@ -887,9 +889,9 @@ int main(int argc, char **argv)
if (parallel_flag == 1) {
extern void init_fep_thread(PHY_VARS_eNB *, pthread_attr_t *);
- extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *);
+ extern void init_td_thread(PHY_VARS_eNB *);
init_fep_thread(eNB,NULL);
- init_td_thread(eNB,NULL);
+ init_td_thread(eNB);
}
// Create transport channel structures for 2 transport blocks (MIMO)
for (i=0; i<2; i++) {
@@ -1142,7 +1144,7 @@ int main(int argc, char **argv)
else if (mcs < 21) modulation_type = 4;
else if (mcs < 29) modulation_type = 6;
- fill_ulsch_dci(eNB,proc_rxtx->frame_rx,subframe,&sched_resp,14,(void*)&UL_alloc_pdu,first_rb,nb_rb,(round==0)?mcs:(28+rvidx[round]),modulation_type,ndi,cqi_flag,beta_CQI,beta_RI,cqi_size);
+ fill_ulsch_dci(eNB,proc_rxtx->frame_rx,subframe,&sched_resp,14,(void*)&UL_alloc_pdu,first_rb,nb_rb,(round==0)?mcs:(28+rvidx[round]),modulation_type,ndi,get_TBS_UL(mcs,nb_rb),cqi_flag,beta_CQI,beta_RI,cqi_size);
UE->ulsch_Msg3_active[eNB_id] = 0;
UE->ul_power_control_dedicated[eNB_id].accumulationEnabled=1;
@@ -1324,7 +1326,6 @@ int main(int argc, char **argv)
ru->feprx(ru);
phy_procedures_eNB_uespec_RX(eNB,proc_rxtx);
-
if (cqi_flag > 0) {
cqi_error = 0;
diff --git a/openair1/SIMULATION/LTE_PHY/unitary_defs.h b/openair1/SIMULATION/LTE_PHY/unitary_defs.h
index c33b72f649..133656a562 100644
--- a/openair1/SIMULATION/LTE_PHY/unitary_defs.h
+++ b/openair1/SIMULATION/LTE_PHY/unitary_defs.h
@@ -20,7 +20,7 @@
*/
openair0_device openair0;
-int oai_exit=0;
+volatile int oai_exit=0;
void exit_fun(const char *s) { exit(-1); }
diff --git a/openair1/SIMULATION/RF/adc.c b/openair1/SIMULATION/RF/adc.c
index 3bf70a203a..e424131c6f 100644
--- a/openair1/SIMULATION/RF/adc.c
+++ b/openair1/SIMULATION/RF/adc.c
@@ -38,12 +38,7 @@ void adc(double *r_re[2],
for (aa=0; aa 30000) {
- //("Adc outputs %d %e %d \n",i,((short *)output[0])[((i+output_offset)<<1)], ((i+output_offset)<<1) );
- }
}
- //printf("Adc outputs %d %e %d \n",i,((short *)output[0])[((i+output_offset)<<1)], ((i+output_offset)<<1) );
}
}
diff --git a/openair1/SIMULATION/RF/dac.c b/openair1/SIMULATION/RF/dac.c
index b09bd20374..15fdaa8c01 100644
--- a/openair1/SIMULATION/RF/dac.c
+++ b/openair1/SIMULATION/RF/dac.c
@@ -26,7 +26,7 @@
#include "rf.h"
void dac(double *s_re[2],
double *s_im[2],
- uint32_t **input,
+ int32_t **input,
uint32_t input_offset,
uint32_t nb_tx_antennas,
uint32_t length,
@@ -76,7 +76,7 @@ void dac(double *s_re[2],
double dac_fixed_gain(double *s_re[2],
double *s_im[2],
- uint32_t **input,
+ int32_t **input,
uint32_t input_offset,
uint32_t nb_tx_antennas,
uint32_t length,
diff --git a/openair1/SIMULATION/RF/rf.h b/openair1/SIMULATION/RF/rf.h
index 65055bc71a..d37fa3ed48 100644
--- a/openair1/SIMULATION/RF/rf.h
+++ b/openair1/SIMULATION/RF/rf.h
@@ -69,14 +69,14 @@ void adc(double *r_re[2],
double *r_im[2],
unsigned int input_offset,
unsigned int output_offset,
- int **output,
+ int32_t **output,
unsigned int nb_rx_antennas,
unsigned int length,
unsigned char B);
void dac(double *s_re[2],
double *s_im[2],
- unsigned int **input,
+ int32_t **input,
unsigned int input_offset,
unsigned int nb_tx_antennas,
unsigned int length,
@@ -87,7 +87,7 @@ void dac(double *s_re[2],
double dac_fixed_gain(double *s_re[2],
double *s_im[2],
- unsigned int **input,
+ int32_t **input,
unsigned int input_offset,
unsigned int nb_tx_antennas,
unsigned int length,
diff --git a/openair1/SIMULATION/TOOLS/channel_sim.c b/openair1/SIMULATION/TOOLS/channel_sim.c
new file mode 100644
index 0000000000..2471a08604
--- /dev/null
+++ b/openair1/SIMULATION/TOOLS/channel_sim.c
@@ -0,0 +1,487 @@
+/*
+ * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The OpenAirInterface Software Alliance licenses this file to You under
+ * the OAI Public License, Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.openairinterface.org/?page_id=698
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *-------------------------------------------------------------------------------
+ * For more information about the OpenAirInterface (OAI) Software Alliance:
+ * contact@openairinterface.org
+ */
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "SIMULATION/TOOLS/sim.h"
+#include "SIMULATION/RF/rf.h"
+#include "PHY/types.h"
+#include "PHY/defs_eNB.h"
+#include "PHY/phy_extern.h"
+#include "PHY/phy_extern_ue.h"
+
+#include "LAYER2/MAC/mac.h"
+#include "LAYER2/MAC/mac_extern.h"
+#include "UTIL/LOG/log_if.h"
+#include "UTIL/LOG/log_extern.h"
+#include "RRC/LTE/rrc_extern.h"
+#include "PHY_INTERFACE/phy_interface_extern.h"
+#include "UTIL/OCG/OCG.h"
+#include "UTIL/OPT/opt.h" // to test OPT
+
+#include "UTIL/FIFO/types.h"
+
+#define RF
+//#define DEBUG_SIM
+
+//#undef LOG_D
+//#define LOG_D(A,B,C...) printf(B,C)
+
+
+
+
+
+void do_DL_sig(sim_t *sim,
+ uint16_t subframe,
+ uint32_t offset,
+ uint32_t length,
+ uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *ue_frame_parms,
+ uint8_t UE_id,
+ int CC_id)
+{
+
+ int32_t **txdata,**rxdata;
+
+ uint32_t ru_id=0;
+ double tx_pwr;
+ double rx_pwr;
+ int32_t rx_pwr2;
+ uint32_t i,aa;
+ uint32_t sf_offset;
+
+ uint8_t hold_channel=0;
+ uint8_t nb_antennas_rx = sim->RU2UE[0][0][CC_id]->nb_rx; // number of rx antennas at UE
+ uint8_t nb_antennas_tx = sim->RU2UE[0][0][CC_id]->nb_tx; // number of tx antennas at eNB
+
+ double s_re0[30720];
+ double s_re1[30720];
+ double *s_re[2];
+ double s_im0[30720];
+ double s_im1[30720];
+ double *s_im[2];
+ double r_re00[30720];
+ double r_re01[30720];
+ double *r_re0[2];
+ double r_im00[30720];
+ double r_im01[30720];
+ double *r_im0[2];
+ LTE_DL_FRAME_PARMS *frame_parms;
+
+ s_re[0] = s_re0;
+ s_im[0] = s_im0;
+ s_re[1] = s_re1;
+ s_im[1] = s_im1;
+
+ r_re0[0] = r_re00;
+ r_im0[0] = r_im00;
+ r_re0[1] = r_re01;
+ r_im0[1] = r_im01;
+
+ if (subframe==0)
+ hold_channel = 0;
+ else
+ hold_channel = 1;
+
+ pthread_mutex_lock(&sim->RU_output_mutex[UE_id]);
+
+ if (sim->RU_output_mask[UE_id] == 0) { // This is the first eNodeB for this UE, clear the buffer
+ for (aa=0; aar_re_DL[UE_id][aa],0,(RC.ru[0]->frame_parms.samples_per_tti)*sizeof(double));
+ memset((void*)sim->r_im_DL[UE_id][aa],0,(RC.ru[0]->frame_parms.samples_per_tti)*sizeof(double));
+ }
+ }
+ pthread_mutex_unlock(&sim->RU_output_mutex[UE_id]);
+
+ for (ru_id=0; ru_idcommon.txdata;
+ frame_parms = &RC.ru[ru_id]->frame_parms;
+
+ // sf_offset = (subframe*frame_parms->samples_per_tti) + offset;
+ sf_offset = (subframe*frame_parms->samples_per_tti);
+ LOG_D(OCM,">>>>>>>>>>>>>>>>>TXPATH: RU %d : DL_sig reading TX for subframe %d (sf_offset %d, length %d) from %p\n",ru_id,subframe,sf_offset,length,txdata[0]+sf_offset);
+ int length_meas = frame_parms->ofdm_symbol_size;
+ if (sf_offset+length <= frame_parms->samples_per_tti*10) {
+
+ tx_pwr = dac_fixed_gain(s_re,
+ s_im,
+ txdata,
+ sf_offset+offset,
+ nb_antennas_tx,
+ length,
+ sf_offset,
+ length_meas,
+ 14,
+ frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
+ 0,
+ &sim->ru_amp[ru_id],
+ frame_parms->N_RB_DL*12);
+
+ }
+ else {
+ tx_pwr = dac_fixed_gain(s_re,
+ s_im,
+ txdata,
+ sf_offset,
+ nb_antennas_tx,
+ (frame_parms->samples_per_tti*10)-sf_offset,
+ sf_offset,
+ length_meas,
+ 14,
+ frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
+ 0,
+ &sim->ru_amp[ru_id],
+ frame_parms->N_RB_DL*12);
+
+ tx_pwr = dac_fixed_gain(s_re,
+ s_im,
+ txdata,
+ sf_offset,
+ nb_antennas_tx,
+ length+sf_offset-(frame_parms->samples_per_tti*10),
+ sf_offset,
+ length_meas,
+ 14,
+ frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
+ 0,
+ &sim->ru_amp[ru_id],
+ frame_parms->N_RB_DL*12);
+ }
+#ifdef DEBUG_SIM
+ LOG_D(OCM,"[SIM][DL] subframe %d: txp (time) %d dB\n",
+ subframe,dB_fixed(signal_energy(&txdata[0][sf_offset],length_meas)));
+
+ LOG_D(OCM,"[SIM][DL] RU %d (CCid %d): tx_pwr %.1f dBm/RE (target %d dBm/RE), for subframe %d\n",
+ ru_id,CC_id,
+ 10*log10(tx_pwr),
+ frame_parms->pdsch_config_common.referenceSignalPower,
+ subframe);
+
+#endif
+ tx_pwr = signal_energy_fp(s_re,s_im,nb_antennas_tx,
+ lengthN_RB_DL);
+
+ //RU2UE[eNB_id][UE_id]->path_loss_dB = 0;
+ multipath_channel(sim->RU2UE[ru_id][UE_id][CC_id],s_re,s_im,r_re0,r_im0,
+ length,hold_channel);
+#ifdef DEBUG_SIM
+ rx_pwr = signal_energy_fp2(sim->RU2UE[ru_id][UE_id][CC_id]->ch[0],
+ sim->RU2UE[ru_id][UE_id][CC_id]->channel_length)*sim->RU2UE[ru_id][UE_id][CC_id]->channel_length;
+ LOG_D(OCM,"[SIM][DL] Channel RU %d => UE %d (CCid %d): Channel gain %f dB (%f)\n",ru_id,UE_id,CC_id,10*log10(rx_pwr),rx_pwr);
+#endif
+
+
+#ifdef DEBUG_SIM
+
+ for (i=0; iRU2UE[ru_id][UE_id][CC_id]->channel_length; i++)
+ LOG_D(OCM,"channel(%d,%d)[%d] : (%f,%f)\n",ru_id,UE_id,i,sim->RU2UE[ru_id][UE_id][CC_id]->ch[0][i].x,sim->RU2UE[ru_id][UE_id][CC_id]->ch[0][i].y);
+
+#endif
+
+ LOG_D(OCM,"[SIM][DL] Channel RU %d => UE %d (CCid %d): tx_power %.1f dBm/RE, path_loss %1.f dB\n",
+ ru_id,UE_id,CC_id,
+ (double)frame_parms->pdsch_config_common.referenceSignalPower,
+ sim->RU2UE[ru_id][UE_id][CC_id]->path_loss_dB);
+
+#ifdef DEBUG_SIM
+ rx_pwr = signal_energy_fp(r_re0,r_im0,nb_antennas_rx,
+ lengthN_RB_DL);
+ LOG_D(OCM,"[SIM][DL] UE %d : rx_pwr %f dBm/RE (%f dBm RSSI,tx %f dB)for subframe %d (length %d)\n",UE_id,
+ 10*log10(rx_pwr),
+ 10*log10(rx_pwr*(double)frame_parms->N_RB_DL*12),
+ 10*log10(tx_pwr),subframe,
+ lengthRU2UE[ru_id][UE_id][CC_id]->sampling_rate*1e6)-174,
+ 10*log10(sim->RU2UE[ru_id][UE_id][CC_id]->sampling_rate*1e6*12*frame_parms->N_RB_DL/(double)frame_parms->ofdm_symbol_size)-174,
+ subframe);
+#endif
+
+ if (sim->RU2UE[ru_id][UE_id][CC_id]->first_run == 1)
+ sim->RU2UE[ru_id][UE_id][CC_id]->first_run = 0;
+
+
+ // RF model
+#ifdef DEBUG_SIM
+ LOG_D(OCM,"[SIM][DL] UE %d (CCid %d): rx_gain %d dB (-ADC %f) for subframe %d\n",UE_id,CC_id,PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB,
+ PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB-66.227,subframe);
+#endif
+
+ rf_rx_simple(r_re0,
+ r_im0,
+ nb_antennas_rx,
+ length,
+ 1e3/sim->RU2UE[ru_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
+ rx_pwr = signal_energy_fp(r_re0,r_im0,
+ nb_antennas_rx,
+ lengthN_RB_DL);
+ LOG_D(OCM,"[SIM][DL] UE %d : ADC in (RU %d) %f dBm/RE for subframe %d\n",
+ UE_id,ru_id,
+ 10*log10(rx_pwr),subframe);
+#endif
+
+
+ pthread_mutex_lock(&sim->RU_output_mutex[UE_id]);
+ for (i=0; isamples_per_tti; i++) {
+ for (aa=0; aar_re_DL[UE_id][aa][i]+=r_re0[aa][i];
+ sim->r_im_DL[UE_id][aa][i]+=r_im0[aa][i];
+ }
+ }
+ sim->RU_output_mask[UE_id] |= (1<RU_output_mask[UE_id] == (1<RU_output_mask[UE_id]=0;
+
+
+
+ double *r_re_p[2] = {sim->r_re_DL[UE_id][0],sim->r_re_DL[UE_id][1]};
+ double *r_im_p[2] = {sim->r_im_DL[UE_id][0],sim->r_im_DL[UE_id][1]};
+
+#ifdef DEBUG_SIM
+ rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,lengthN_RB_DL);
+ LOG_D(OCM,"[SIM][DL] UE %d : ADC in %f dBm/RE for subframe %d\n",UE_id,10*log10(rx_pwr),subframe);
+#endif
+
+ rxdata = PHY_vars_UE_g[UE_id][CC_id]->common_vars.rxdata;
+ sf_offset = (subframe*frame_parms->samples_per_tti)+offset;
+
+
+ adc(r_re_p,
+ r_im_p,
+ 0,
+ sf_offset,
+ rxdata,
+ nb_antennas_rx,
+ length,
+ 12);
+
+#ifdef DEBUG_SIM
+ rx_pwr2 = signal_energy(rxdata[0]+sf_offset,lengthN_RB_DL);
+ LOG_D(OCM,"[SIM][DL] UE %d : rx_pwr (ADC out) %f dB/RE (%d) for subframe %d, writing to %p, length %d\n",UE_id, 10*log10((double)rx_pwr2),rx_pwr2,subframe,rxdata,lengthN_RB_DL) ,subframe);
+#else
+ UNUSED_VARIABLE(rx_pwr2);
+ UNUSED_VARIABLE(tx_pwr);
+ UNUSED_VARIABLE(rx_pwr);
+#endif
+
+ } // RU_output_mask
+ pthread_mutex_unlock(&sim->RU_output_mutex[UE_id]);
+ } // ru_id
+
+}
+
+
+
+
+void do_UL_sig(sim_t *sim,
+ uint16_t subframe,uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
+ uint32_t frame,int ru_id,uint8_t CC_id)
+{
+
+ int32_t **txdata,**rxdata;
+ uint8_t UE_id=0;
+
+ uint8_t nb_antennas_rx = sim->UE2RU[0][0][CC_id]->nb_rx; // number of rx antennas at eNB
+ uint8_t nb_antennas_tx = sim->UE2RU[0][0][CC_id]->nb_tx; // number of tx antennas at UE
+
+ double tx_pwr, rx_pwr;
+ int32_t rx_pwr2;
+ uint32_t i,aa;
+ uint32_t sf_offset,sf_offset_tdd;
+
+ uint8_t hold_channel=0;
+
+ double s_re0[30720];
+ double s_re1[30720];
+ double *s_re[2];
+ double s_im0[30720];
+ double s_im1[30720];
+ double *s_im[2];
+ double r_re00[30720];
+ double r_re01[30720];
+ double *r_re0[2];
+ double r_im00[30720];
+ double r_im01[30720];
+ double *r_im0[2];
+
+ s_re[0] = s_re0;
+ s_im[0] = s_im0;
+ s_re[1] = s_re1;
+ s_im[1] = s_im1;
+
+ r_re0[0] = r_re00;
+ r_im0[0] = r_im00;
+ r_re0[1] = r_re01;
+ r_im0[1] = r_im01;
+
+ pthread_mutex_lock(&sim->UE_output_mutex[ru_id]);
+ // Clear RX signal for eNB = eNB_id
+ for (i=0; isamples_per_tti; i++) {
+ for (aa=0; aar_re_UL[ru_id][aa][i]=0.0;
+ sim->r_im_UL[ru_id][aa][i]=0.0;
+ }
+ }
+ pthread_mutex_unlock(&sim->UE_output_mutex[ru_id]);
+
+ // Compute RX signal for eNB = eNB_id
+ for (UE_id=0; UE_idcommon_vars.txdata;
+ AssertFatal(txdata != NULL,"txdata is null\n");
+
+ sf_offset = subframe*frame_parms->samples_per_tti;
+ if (subframe>0) sf_offset_tdd = sf_offset - PHY_vars_UE_g[UE_id][CC_id]->N_TA_offset;
+ else sf_offset_tdd = sf_offset;
+
+ LOG_D(OCM,"txdata for subframe %d (%d), power %d\n",subframe,sf_offset_tdd,dB_fixed(signal_energy(&txdata[0][sf_offset_tdd],frame_parms->samples_per_tti)));
+
+ if (((double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe] +
+ sim->UE2RU[UE_id][ru_id][CC_id]->path_loss_dB) <= -125.0) {
+ // don't simulate a UE that is too weak
+ LOG_D(OCM,"[SIM][UL] ULPOWERS UE %d tx_pwr %d dBm (num_RE %d) for subframe %d (sf_offset %d,sf_offset_tdd %d)\n",
+ UE_id,
+ PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
+ PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
+ subframe,sf_offset,sf_offset_tdd);
+ } else {
+ tx_pwr = dac_fixed_gain((double**)s_re,
+ (double**)s_im,
+ txdata,
+ sf_offset_tdd,
+ nb_antennas_tx,
+ frame_parms->samples_per_tti,
+ sf_offset_tdd,
+ frame_parms->ofdm_symbol_size,
+ 14,
+ (double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe]-10*log10((double)PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]),
+ 1,
+ NULL,
+ PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]); // This make the previous argument the total power
+ LOG_D(OCM,"[SIM][UL] ULPOWERS UE %d tx_pwr %f dBm (target %d dBm, num_RE %d) for subframe %d (sf_offset %d,sf_offset_tdd %d)\n",
+ UE_id,
+ 10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]),
+ PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
+ PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
+ subframe,sf_offset,sf_offset_tdd);
+
+
+ multipath_channel(sim->UE2RU[UE_id][ru_id][CC_id],s_re,s_im,r_re0,r_im0,
+ frame_parms->samples_per_tti,hold_channel);
+
+
+ rx_pwr = signal_energy_fp2(sim->UE2RU[UE_id][ru_id][CC_id]->ch[0],
+ sim->UE2RU[UE_id][ru_id][CC_id]->channel_length)*sim->UE2RU[UE_id][ru_id][CC_id]->channel_length;
+
+ LOG_D(OCM,"[SIM][UL] subframe %d Channel UE %d => RU %d : %f dB (hold %d,length %d, PL %f)\n",subframe,UE_id,ru_id,10*log10(rx_pwr),
+ hold_channel,sim->UE2RU[UE_id][ru_id][CC_id]->channel_length,
+ sim->UE2RU[UE_id][ru_id][CC_id]->path_loss_dB);
+
+ rx_pwr = signal_energy_fp(r_re0,r_im0,nb_antennas_rx,frame_parms->samples_per_tti,0);
+ LOG_D(OCM,"[SIM][UL] RU %d (%d/%d rx antennas) : rx_pwr %f dBm (tx_pwr - PL %f) for subframe %d, sptti %d\n",
+ ru_id,nb_antennas_rx,sim->UE2RU[UE_id][ru_id][CC_id]->nb_rx,10*log10(rx_pwr),10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe])+sim->UE2RU[UE_id][ru_id][CC_id]->path_loss_dB,subframe,frame_parms->samples_per_tti);
+ /*
+ if (abs(10*log10(rx_pwr)-10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe])-UE2RU[UE_id][ru_id][CC_id]->path_loss_dB)>3) {
+ write_output("txsig_re.m","s_re",s_re[0],frame_parms->samples_per_tti,1,7);
+ write_output("txsig_im.m","s_im",s_im[0],frame_parms->samples_per_tti,1,7);
+ write_output("rxsig_re.m","r_re",r_re0[0],frame_parms->samples_per_tti,1,7);
+ write_output("rxsig_im.m","r_im",r_im0[0],frame_parms->samples_per_tti,1,7);
+ exit(-1);
+ }*/
+
+ if (sim->UE2RU[UE_id][ru_id][CC_id]->first_run == 1)
+ sim->UE2RU[UE_id][ru_id][CC_id]->first_run = 0;
+
+
+ pthread_mutex_lock(&sim->UE_output_mutex[ru_id]);
+ for (aa=0; aasamples_per_tti; i++) {
+ sim->r_re_UL[ru_id][aa][i]+=r_re0[aa][i];
+ sim->r_im_UL[ru_id][aa][i]+=r_im0[aa][i];
+ }
+ }
+ pthread_mutex_unlock(&sim->UE_output_mutex[ru_id]);
+ }
+ } //UE_id
+
+ double *r_re_p[2] = {sim->r_re_UL[ru_id][0],sim->r_re_UL[ru_id][1]};
+ double *r_im_p[2] = {sim->r_im_UL[ru_id][0],sim->r_im_UL[ru_id][1]};
+
+ rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,frame_parms->samples_per_tti,0);
+ LOG_D(OCM,"[SIM][UL] RU %d (%d/%d rx antennas) : rx_pwr %f dBm (before RF) for subframe %d, gain %f\n",
+ ru_id,nb_antennas_rx,nb_antennas_rx,10*log10(rx_pwr),subframe,
+ (double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx - 66.227);
+ rf_rx_simple(r_re_p,
+ r_im_p,
+ nb_antennas_rx,
+ frame_parms->samples_per_tti,
+ 1e3/sim->UE2RU[0][ru_id][CC_id]->sampling_rate, // sampling time (ns)
+ (double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx - 66.227); // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
+
+#ifdef DEBUG_SIM
+ rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,frame_parms->samples_per_tti,0);//*(double)frame_parms->ofdm_symbol_size/(12.0*frame_parms->N_RB_DL;
+ LOG_D(OCM,"[SIM][UL] rx_pwr (ADC in) %f dB for subframe %d (rx_gain %f)\n",10*log10(rx_pwr),subframe,
+ (double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx);
+#endif
+
+ rxdata = RC.ru[ru_id]->common.rxdata;
+ sf_offset = subframe*frame_parms->samples_per_tti;
+ if (subframe>0) sf_offset_tdd = sf_offset - RC.ru[ru_id]->N_TA_offset;
+ else sf_offset_tdd = sf_offset;
+
+
+ adc(r_re_p,
+ r_im_p,
+ 0,
+ sf_offset_tdd,
+ rxdata,
+ nb_antennas_rx,
+ frame_parms->samples_per_tti,
+ 12);
+
+#ifdef DEBUG_SIM
+ rx_pwr2 = signal_energy(rxdata[0]+sf_offset_tdd,frame_parms->samples_per_tti)*(double)frame_parms->ofdm_symbol_size/(12.0*frame_parms->N_RB_DL);
+ LOG_D(OCM,"[SIM][UL] RU %d rx_pwr (ADC out) %f dB (%d) for subframe %d (offset %d) = %p\n",ru_id,10*log10((double)rx_pwr2),rx_pwr2,subframe,sf_offset,rxdata[0]+sf_offset_tdd);
+#else
+ UNUSED_VARIABLE(tx_pwr);
+ UNUSED_VARIABLE(rx_pwr);
+ UNUSED_VARIABLE(rx_pwr2);
+#endif
+
+}
+
+
+
+
diff --git a/openair1/SIMULATION/TOOLS/sim.h b/openair1/SIMULATION/TOOLS/sim.h
index 420e5d0072..bde7b92506 100644
--- a/openair1/SIMULATION/TOOLS/sim.h
+++ b/openair1/SIMULATION/TOOLS/sim.h
@@ -22,7 +22,7 @@
#ifndef __SIMULATION_TOOLS_DEFS_H__
#define __SIMULATION_TOOLS_DEFS_H__
#include "PHY/defs_common.h"
-
+#include
/** @defgroup _numerical_ Useful Numerical Functions
*@{
The present clause specifies several numerical functions for testing of digital communication systems.
@@ -181,6 +181,31 @@ typedef enum {
EPA_high,
} SCM_t;
+#include "platform_constants.h"
+
+typedef struct {
+ channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs];
+ channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM_CCs];
+ double r_re_DL[NUMBER_OF_UE_MAX][2][30720];
+ double r_im_DL[NUMBER_OF_UE_MAX][2][30720];
+ double r_re_UL[NUMBER_OF_eNB_MAX][2][30720];
+ double r_im_UL[NUMBER_OF_eNB_MAX][2][30720];
+ int RU_output_mask[NUMBER_OF_UE_MAX];
+ int UE_output_mask[NUMBER_OF_RU_MAX];
+ pthread_mutex_t RU_output_mutex[NUMBER_OF_UE_MAX];
+ pthread_mutex_t UE_output_mutex[NUMBER_OF_RU_MAX];
+ pthread_mutex_t subframe_mutex;
+ int subframe_ru_mask;
+ int subframe_UE_mask;
+ openair0_timestamp current_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs];
+ openair0_timestamp current_UE_rx_timestamp[MAX_MOBILES_PER_ENB][MAX_NUM_CCs];
+ openair0_timestamp last_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs];
+ openair0_timestamp last_UE_rx_timestamp[MAX_MOBILES_PER_ENB][MAX_NUM_CCs];
+ double ru_amp[NUMBER_OF_RU_MAX];
+ pthread_t rfsim_thread;
+} sim_t;
+
+
/**
\brief This routine initializes a new channel descriptor
\param nb_tx Number of TX antennas
@@ -373,6 +398,20 @@ void multipath_tv_channel(channel_desc_t *desc,
double N_RB2sampling_rate(uint16_t N_RB);
double N_RB2channel_bandwidth(uint16_t N_RB);
+#include "targets/RT/USER/rfsim.h"
+
+void do_DL_sig(sim_t *sim,
+ uint16_t subframe,
+ uint32_t offset,
+ uint32_t length,
+ uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *ue_frame_parms,
+ uint8_t UE_id,
+ int CC_id);
+
+void do_UL_sig(sim_t *sim,
+ uint16_t subframe,uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
+ uint32_t frame,int ru_id,uint8_t CC_id);
+
#endif
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
index 08b7eb18a0..336bfc5e6f 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
@@ -1324,6 +1324,26 @@ fill_nfapi_ulsch_harq_information(module_id_t module_
} // get Tmode
}
+uint8_t Np[6][4]= {{0,1,3,5},
+ {0,3,8,13},
+ {0,5,13,22},
+ {0,11,27,44},
+ {0,16,41,66},
+ {0,22,55,88}};
+
+// This is part of the PUCCH allocation procedure (see Section 10.1 36.213)
+uint16_t getNp(int dl_Bandwidth,uint8_t nCCE,uint8_t plus1)
+{
+ AssertFatal(dl_Bandwidth<6,"dl_Bandwidth %d>5\n",dl_Bandwidth);
+
+ if (nCCE>=Np[dl_Bandwidth][2])
+ return(Np[dl_Bandwidth][2+plus1]);
+ else if (nCCE>=Np[dl_Bandwidth][1])
+ return(Np[dl_Bandwidth][1+plus1]);
+ else
+ return(Np[dl_Bandwidth][0+plus1]);
+}
+
void
fill_nfapi_harq_information(module_id_t module_idP,
int CC_idP,
@@ -1365,8 +1385,7 @@ fill_nfapi_harq_information(module_id_t module_idP,
harq_information->harq_information_rel10_tdd.ack_nack_mode = 0; // bundling
}
harq_information->harq_information_rel10_tdd.tl.tag = NFAPI_UL_CONFIG_REQUEST_HARQ_INFORMATION_REL10_TDD_TAG;
- LTE_DL_FRAME_PARMS *frame_parms = &RC.eNB[module_idP][CC_idP]->frame_parms;
- harq_information->harq_information_rel10_tdd.n_pucch_1_0 = get_Np(frame_parms->N_RB_DL,cce_idxP,0) +
+ harq_information->harq_information_rel10_tdd.n_pucch_1_0 = getNp(cc->mib->message.dl_Bandwidth,cce_idxP,0) +
cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + cce_idxP;
harq_information->harq_information_rel10_tdd.number_of_pucch_resources = 1;
} else {
@@ -3157,7 +3176,7 @@ allocate_CCEs(int module_idP, int CC_idP, frame_t frameP, sub_frame_t subframeP,
cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + fCCE;
else
ul_req->ul_config_pdu_list[ack_int].uci_harq_pdu.harq_information.harq_information_rel10_tdd.n_pucch_1_0 =
- cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + fCCE + get_Np(to_prb(cc->mib->message.dl_Bandwidth),fCCE,0) ;
+ cc->radioResourceConfigCommon->pucch_ConfigCommon.n1PUCCH_AN + fCCE + getNp(cc->mib->message.dl_Bandwidth,fCCE,0) ;
}
}
}
@@ -3362,6 +3381,132 @@ uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, su
return -1;
}
+unsigned char ul_ACK_subframe2M(TDD_Config_t *tdd_Config,unsigned char subframe)
+{
+
+ if (tdd_Config == NULL) {
+ return(1);
+ } else {
+ switch (tdd_Config->subframeAssignment) {
+ case 1:
+ return 1; // don't ACK special subframe for now
+ if (subframe == 2) { // ACK subframes 5 and 6
+ return(2);
+ } else if (subframe == 3) { // ACK subframe 9
+ return(1); // To be updated
+ } else if (subframe == 7) { // ACK subframes 0 and 1
+ return(2); // To be updated
+ } else if (subframe == 8) { // ACK subframe 4
+ return(1); // To be updated
+ } else {
+ AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
+ subframe,tdd_Config->subframeAssignment);
+
+ }
+
+ break;
+ case 3:
+ if (subframe == 2) { // ACK subframes 5 and 6
+ return(2); // should be 3
+ } else if (subframe == 3) { // ACK subframes 7 and 8
+ return(2); // To be updated
+ } else if (subframe == 4) { // ACK subframes 9 and 0
+ return(2);
+ } else {
+ AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
+ subframe,tdd_Config->subframeAssignment);
+ }
+
+ break;
+
+ case 4:
+ if (subframe == 2) { // ACK subframes 0,4 and 5
+ return(3); // should be 4
+ } else if (subframe == 3) { // ACK subframes 6,7,8 and 9
+ return(4);
+ } else {
+ AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
+ subframe,tdd_Config->subframeAssignment);
+ }
+
+ break;
+
+ case 5:
+ if (subframe == 2) { // ACK subframes 0,3,4,5,6,7,8 and 9
+ return(8); // should be 3
+ } else {
+ AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
+ subframe,tdd_Config->subframeAssignment);
+ }
+
+ break;
+ }
+ }
+
+ return(0);
+}
+
+unsigned char ul_ACK_subframe2dl_subframe(TDD_Config_t *tdd_Config,unsigned char subframe,unsigned char ACK_index)
+{
+
+ if (tdd_Config == NULL) {
+ return((subframe<4) ? subframe+6 : subframe-4);
+ } else {
+ switch (tdd_Config->subframeAssignment) {
+ case 3:
+ if (subframe == 2) { // ACK subframes 5 and 6
+ if (ACK_index==2)
+ return(1);
+
+ return(5+ACK_index);
+ } else if (subframe == 3) { // ACK subframes 7 and 8
+ return(7+ACK_index); // To be updated
+ } else if (subframe == 4) { // ACK subframes 9 and 0
+ return((9+ACK_index)%10);
+ } else {
+ AssertFatal(1==0,"illegal subframe %d for tdd_config->subframeAssignment %d\n",
+ subframe,tdd_Config->subframeAssignment);
+ }
+
+ break;
+
+ case 4:
+ if (subframe == 2) { // ACK subframes 0, 4 and 5
+ //if (ACK_index==2)
+ // return(1); TBC
+ if (ACK_index==2)
+ return(0);
+
+ return(4+ACK_index);
+ } else if (subframe == 3) { // ACK subframes 6, 7 8 and 9
+ return(6+ACK_index); // To be updated
+ } else {
+ AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
+ subframe,tdd_Config->subframeAssignment);
+ }
+
+ break;
+
+ case 1:
+ if (subframe == 2) { // ACK subframes 5 and 6
+ return(5+ACK_index);
+ } else if (subframe == 3) { // ACK subframe 9
+ return(9); // To be updated
+ } else if (subframe == 7) { // ACK subframes 0 and 1
+ return(ACK_index); // To be updated
+ } else if (subframe == 8) { // ACK subframe 4
+ return(4); // To be updated
+ } else {
+ AssertFatal(1==0,"illegal subframe %d for tdd_config %d\n",
+ subframe,tdd_Config->subframeAssignment);
+ }
+
+ break;
+ }
+ }
+
+ return(0);
+}
void
extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
@@ -3381,11 +3526,10 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
int tmode[5];
int i, j, m;
uint8_t *pdu;
- LTE_DL_FRAME_PARMS *fp;
sub_frame_t subframe_tx;
int frame_tx;
uint8_t harq_pid;
-
+
#if (RRC_VERSION >= MAKE_VERSION(13, 0, 0))
if (UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated != NULL &&
UE_list->UE_template[pCCid][UE_id].physicalConfigDedicated->pucch_ConfigDedicated != NULL &&
@@ -3396,62 +3540,60 @@ extract_harq(module_id_t mod_idP, int CC_idP, int UE_id,
&& (format == 1))))
spatial_bundling = 1;
#endif
- fp=&(RC.eNB[mod_idP][CC_idP]->frame_parms);
for (i = 0; i < numCC; i++)
tmode[i] = get_tmode(mod_idP, i, UE_id);
-
+
if (cc->tdd_Config) {
harq_indication_tdd = (nfapi_harq_indication_tdd_rel13_t *) harq_indication;
// pdu = &harq_indication_tdd->harq_tb_n[0];
-
+
num_ack_nak = harq_indication_tdd->number_of_ack_nack;
-
+
switch (harq_indication_tdd->mode) {
case 0: // Format 1a/b bundling
AssertFatal(numCC == 1, "numCC %d > 1, should not be using Format1a/b\n", numCC);
- int M = ul_ACK_subframe2_M(fp,subframeP);
+ int M = ul_ACK_subframe2M(cc->tdd_Config,subframeP);
for(m=0;m5)
- frame_tx=-1;
- else
- frame_tx = subframeP < 4 ? frameP -1 : frameP;
- harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame_tx,subframe_tx);
+ subframe_tx = ul_ACK_subframe2dl_subframe(cc->tdd_Config,subframeP,m);
+ if(frameP==1023&&subframeP>5)
+ frame_tx=-1;
+ else
+ frame_tx = subframeP < 4 ? frameP -1 : frameP;
+ harq_pid = frame_subframe2_dl_harq_pid(cc->tdd_Config,frame_tx,subframe_tx);
RA_t *ra = &RC.mac[mod_idP]->common_channels[CC_idP].ra[0];
-
- if(num_ack_nak==1){
- if(harq_indication_tdd->harq_data[0].bundling.value_0==1){ //ack
- sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
- sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
- LOG_D(MAC,"frame %d subframe %d Acking (%d,%d) harq_pid %d round %d\n",frameP,subframeP,frame_tx,subframe_tx,harq_pid,sched_ctl->round[CC_idP][harq_pid]);
- }else{ //nack
- if( sched_ctl->round[CC_idP][harq_pid]<8)
- sched_ctl->round[CC_idP][harq_pid]++;
- LOG_D(MAC,"frame %d subframe %d Nacking (%d,%d) harq_pid %d round %d\n",frameP,subframeP,frame_tx,subframe_tx,harq_pid,sched_ctl->round[CC_idP][harq_pid]);
- if(sched_ctl->round[CC_idP][harq_pid] == 8){
- for (uint8_t ra_i = 0; ra_i < NB_RA_PROC_MAX; ra_i++) {
- if((ra[ra_i].rnti == rnti) && (ra[ra_i].state == WAITMSG4ACK)){
- //Msg NACK num to MAC ,remove UE
- // add UE info to freeList
- LOG_I(RRC, "put UE %x into freeList\n", rnti);
- put_UE_in_freelist(mod_idP, rnti, 1);
- }
- }
- }
- }
- }
- for (uint8_t ra_i = 0; ra_i < NB_RA_PROC_MAX; ra_i++) {
- if ((ra[ra_i].rnti == rnti) && (ra[ra_i].state == MSGCRNTI_ACK) && (ra[ra_i].crnti_harq_pid == harq_pid)) {
- LOG_D(MAC,"CRNTI Reconfiguration: ACK %d rnti %x round %d frame %d subframe %d \n",harq_indication_tdd->harq_data[0].bundling.value_0,rnti,sched_ctl->round[CC_idP][harq_pid],frameP,subframeP);
- if(num_ack_nak == 1 && harq_indication_tdd->harq_data[0].bundling.value_0 == 1) {
- cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
- }else{
- if(sched_ctl->round[CC_idP][harq_pid] == 7){
- cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
- }
- }
- break;
- }
+
+ if(num_ack_nak==1){
+ if(harq_indication_tdd->harq_data[0].bundling.value_0==1){ //ack
+ sched_ctl->round[CC_idP][harq_pid] = 8; // release HARQ process
+ sched_ctl->tbcnt[CC_idP][harq_pid] = 0;
+ LOG_D(MAC,"frame %d subframe %d Acking (%d,%d) harq_pid %d round %d\n",frameP,subframeP,frame_tx,subframe_tx,harq_pid,sched_ctl->round[CC_idP][harq_pid]);
+ }else{ //nack
+ if( sched_ctl->round[CC_idP][harq_pid]<8) sched_ctl->round[CC_idP][harq_pid]++;
+ LOG_D(MAC,"frame %d subframe %d Nacking (%d,%d) harq_pid %d round %d\n",frameP,subframeP,frame_tx,subframe_tx,harq_pid,sched_ctl->round[CC_idP][harq_pid]);
+ if(sched_ctl->round[CC_idP][harq_pid] == 8){
+ for (uint8_t ra_i = 0; ra_i < NB_RA_PROC_MAX; ra_i++) {
+ if((ra[ra_i].rnti == rnti) && (ra[ra_i].state == WAITMSG4ACK)){
+ //Msg NACK num to MAC ,remove UE
+ // add UE info to freeList
+ LOG_I(MAC, "put UE %x into freeList\n", rnti);
+ put_UE_in_freelist(mod_idP, rnti, 1);
+ }
+ }
+ }
+ }
+ }
+ for (uint8_t ra_i = 0; ra_i < NB_RA_PROC_MAX; ra_i++) {
+ if ((ra[ra_i].rnti == rnti) && (ra[ra_i].state == MSGCRNTI_ACK) && (ra[ra_i].crnti_harq_pid == harq_pid)) {
+ LOG_D(MAC,"CRNTI Reconfiguration: ACK %d rnti %x round %d frame %d subframe %d \n",harq_indication_tdd->harq_data[0].bundling.value_0,rnti,sched_ctl->round[CC_idP][harq_pid],frameP,subframeP);
+ if(num_ack_nak == 1 && harq_indication_tdd->harq_data[0].bundling.value_0 == 1) {
+ cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
+ }else{
+ if(sched_ctl->round[CC_idP][harq_pid] == 7){
+ cancel_ra_proc(mod_idP, CC_idP, frameP, ra[ra_i].rnti);
+ }
+ }
+ break;
+ }
}
}
break;
@@ -4266,6 +4408,9 @@ cqi_indication(module_id_t mod_idP, int CC_idP, frame_t frameP,
pdu, rel9->length);
LOG_D(MAC,"Frame %d Subframe %d update CQI:%d\n",frameP,subframeP,sched_ctl->dl_cqi[CC_idP]);
+
+ sched_ctl->cqi_req_flag &= (~(1 << subframeP));
+ sched_ctl->cqi_received = 1;
}
// timing advance
@@ -4336,8 +4481,18 @@ static int nack_or_dtx_reported(
int i;
if (cc->tdd_Config) {
- AssertFatal(0==1, "TDD to be done. FAPI structures (see nfapi_harq_indication_tdd_rel13_t) are not clean. To be cleaned as well?\n");
- abort();
+ nfapi_harq_indication_tdd_rel13_t *harq_indication_tdd = &harq_pdu->harq_indication_tdd_rel13;
+ // AssertFatal(0==1, "TDD to be done. FAPI structures (see nfapi_harq_indication_tdd_rel13_t) are not clean. To be cleaned as well?\n");
+ AssertFatal(harq_indication_tdd->number_of_ack_nack==1,"number of ack/nak %d != 1\n",harq_indication_tdd->number_of_ack_nack);
+ switch (harq_indication_tdd->mode) {
+ case 0: // Format 1a/b bundling
+ if (harq_indication_tdd->harq_data[0].bundling.value_0 == 1) return 1;
+ return 0;
+ break;
+ default:
+ AssertFatal(1==0,"harq_indication_tdd type is not bundling\n");
+ break;
+ }
} else {
nfapi_harq_indication_fdd_rel13_t *hi = &harq_pdu->harq_indication_fdd_rel13;
for (i = 0; i < hi->number_of_ack_nack; hi++)
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
index 53d9647c5b..055d3e3419 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
@@ -158,8 +158,8 @@ rx_sdu(const module_id_t enb_mod_idP,
if (UE_id != -1) {
LOG_D(MAC,
- "[eNB %d][PUSCH %d] CC_id %d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n",
- enb_mod_idP, harq_pid, CC_idP,
+ "[eNB %d][PUSCH %d] CC_id %d %d.%d Received ULSCH sdu round %d from PHY (rnti %x, UE_id %d) ul_cqi %d\n",
+ enb_mod_idP, harq_pid, CC_idP,frameP,subframeP,
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
current_rnti, UE_id, ul_cqi);
@@ -191,9 +191,9 @@ rx_sdu(const module_id_t enb_mod_idP,
if (UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes < 0)
UE_list->UE_template[CC_idP][UE_id].scheduled_ul_bytes = 0;
} else { // we've got an error
- LOG_D(MAC,
- "[eNB %d][PUSCH %d] CC_id %d ULSCH in error in round %d, ul_cqi %d\n",
- enb_mod_idP, harq_pid, CC_idP,
+ LOG_I(MAC,
+ "[eNB %d][PUSCH %d] CC_id %d %d.%d ULSCH in error in round %d, ul_cqi %d\n",
+ enb_mod_idP, harq_pid, CC_idP,frameP,subframeP,
UE_list->UE_sched_ctrl[UE_id].round_UL[CC_idP][harq_pid],
ul_cqi);
@@ -1332,18 +1332,23 @@ schedule_ulsch_rnti(module_id_t module_idP,
// reset the scheduling request
UE_template->ul_SR = 0;
status = mac_eNB_get_rrc_status(module_idP, rnti);
- if (status < RRC_CONNECTED)
- cqi_req = 0;
- else if (UE_sched_ctrl->cqi_req_timer > 30) {
- if (nfapi_mode) {
- cqi_req = 0;
- } else {
- cqi_req = 1;
- UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP;
+ cqi_req = 0;
+
+ if (status >= RRC_CONNECTED && UE_sched_ctrl->cqi_req_timer > 30) {
+ if (UE_sched_ctrl->cqi_received == 0) {
+ if (nfapi_mode) {
+ cqi_req = 0;
+ } else {
+ cqi_req = 1;
+ UE_sched_ctrl->cqi_req_flag |= 1 << sched_subframeP;
+ }
}
- UE_sched_ctrl->cqi_req_timer = 0;
- } else
- cqi_req = 0;
+ else if (UE_sched_ctrl->cqi_received == 1) {
+ UE_sched_ctrl->cqi_req_flag = 0;
+ UE_sched_ctrl->cqi_received = 0;
+ UE_sched_ctrl->cqi_req_timer = 0;
+ }
+ }
//power control
//compute the expected ULSCH RX power (for the stats)
@@ -1562,7 +1567,7 @@ schedule_ulsch_rnti(module_id_t module_idP,
CC_id, UE_id, subframeP,
S_UL_SCHEDULED);
- //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);
+ 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);
LOG_D(MAC,"[PUSCH %d] SFN/SF:%04d%d UL_CFG:SFN/SF:%04d%d CQI:%d for UE %d/%x\n", harq_pid,frameP,subframeP,ul_sched_frame,ul_sched_subframeP,cqi_req,UE_id,rnti);
// increment first rb for next UE allocation
diff --git a/openair2/LAYER2/MAC/mac.h b/openair2/LAYER2/MAC/mac.h
index 15d3679ecc..d9e914f087 100644
--- a/openair2/LAYER2/MAC/mac.h
+++ b/openair2/LAYER2/MAC/mac.h
@@ -951,7 +951,10 @@ typedef struct {
int16_t ta_update;
uint16_t ul_consecutive_errors;
int32_t context_active_timer;
+ /// timer for regular CQI request on PUSCH
int32_t cqi_req_timer;
+ /// indicator that CQI was received on PUSCH when requested
+ int32_t cqi_received;
int32_t ul_inactivity_timer;
int32_t ul_failure_timer;
uint32_t ue_reestablishment_reject_timer;
diff --git a/openair2/LAYER2/MAC/mac_proto.h b/openair2/LAYER2/MAC/mac_proto.h
index 20887a4180..aba8c26d92 100644
--- a/openair2/LAYER2/MAC/mac_proto.h
+++ b/openair2/LAYER2/MAC/mac_proto.h
@@ -1060,6 +1060,12 @@ uint16_t mac_computeRIV(uint16_t N_RB_DL, uint16_t RBstart,
int get_phich_resource_times6(COMMON_channels_t * cc);
+uint8_t frame_subframe2_dl_harq_pid(TDD_Config_t *tdd_Config, int abs_frameP, sub_frame_t subframeP);
+
+uint8_t ul_subframe2_k_phich(COMMON_channels_t * cc, sub_frame_t ul_subframe);
+
+unsigned char ul_ACK_subframe2M(TDD_Config_t *tdd_Config,unsigned char subframe);
+
int to_rbg(int dl_Bandwidth);
int to_prb(int dl_Bandwidth);
diff --git a/openair2/LAYER2/MAC/rar_tools_ue.c b/openair2/LAYER2/MAC/rar_tools_ue.c
index 7d24e4c0af..44f0f51582 100644
--- a/openair2/LAYER2/MAC/rar_tools_ue.c
+++ b/openair2/LAYER2/MAC/rar_tools_ue.c
@@ -93,7 +93,7 @@ uint16_t ue_process_rar(const module_id_t module_idP, const int CC_id, const fra
}
LOG_I(MAC,
- "[eNB %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
+ "[UE %d][RAPROC] Frame %d Received RAR (%02x|%02x.%02x.%02x.%02x.%02x.%02x) for preamble %d/%d\n",
module_idP, frameP, *(uint8_t *) rarh, rar[0], rar[1], rar[2],
rar[3], rar[4], rar[5], rarh->RAPID, preamble_index);
#ifdef DEBUG_RAR
diff --git a/openair2/RRC/LTE/rrc_UE.c b/openair2/RRC/LTE/rrc_UE.c
index 88945cc410..c1a110a7ba 100644
--- a/openair2/RRC/LTE/rrc_UE.c
+++ b/openair2/RRC/LTE/rrc_UE.c
@@ -504,7 +504,7 @@ char openair_rrc_ue_init( const module_id_t ue_mod_idP, const unsigned char eNB_
rrc_set_state (ue_mod_idP, RRC_STATE_INACTIVE);
rrc_set_sub_state (ue_mod_idP, RRC_SUB_STATE_INACTIVE);
- LOG_D(RRC,"[UE %d] INIT State = RRC_IDLE (eNB %d)\n",ctxt.module_id,eNB_index);
+ LOG_I(RRC,"[UE %d] INIT State = RRC_IDLE (eNB %d)\n",ctxt.module_id,eNB_index);
UE_rrc_inst[ctxt.module_id].Info[eNB_index].State=RRC_IDLE;
UE_rrc_inst[ctxt.module_id].Info[eNB_index].T300_active = 0;
UE_rrc_inst[ctxt.module_id].Info[eNB_index].T304_active = 0;
@@ -3022,7 +3022,7 @@ int decode_BCCH_DLSCH_Message(
&bcch_message->message.choice.c1.choice.systemInformation,
sizeof(SystemInformation_t) );
- LOG_D( RRC, "[UE %"PRIu8"] Decoding SI for frameP %"PRIu32"\n",
+ LOG_I( RRC, "[UE %"PRIu8"] Decoding SI for frameP %"PRIu32"\n",
ctxt_pP->module_id,
ctxt_pP->frame );
decode_SI( ctxt_pP, eNB_index );
@@ -3247,6 +3247,7 @@ int decode_SIB1( const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index,
#endif
);
+ LOG_I(RRC,"Setting SIStatus bit 0 to 1\n");
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIStatus = 1;
UE_rrc_inst[ctxt_pP->module_id].Info[eNB_index].SIB1systemInfoValueTag = sib1->systemInfoValueTag;
diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c
index c9992ceea5..58011779b0 100644
--- a/openair2/RRC/LTE/rrc_eNB.c
+++ b/openair2/RRC/LTE/rrc_eNB.c
@@ -29,12 +29,15 @@
*/
#define RRC_ENB
#define RRC_ENB_C
-
+#include
+#include /* for _ASN_DEFAULT_STACK_MAX */
+#include
#include "rrc_defs.h"
#include "rrc_extern.h"
#include "assertions.h"
#include "common/ran_context.h"
#include "asn1_conversions.h"
+#include "asn_internal.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "LAYER2/RLC/rlc.h"
#include "LAYER2/MAC/mac_proto.h"
diff --git a/openair2/UTIL/LOG/log.c b/openair2/UTIL/LOG/log.c
index 263f360db5..600135d2fc 100644
--- a/openair2/UTIL/LOG/log.c
+++ b/openair2/UTIL/LOG/log.c
@@ -384,7 +384,7 @@ int logInit (void)
register_log_component("RLC","log",RLC);
register_log_component("PDCP","log",PDCP);
register_log_component("RRC","log",RRC);
- register_log_component("EMU","log",EMU);
+ register_log_component("SIM","log",SIM);
register_log_component("OMG","csv",OMG);
register_log_component("OTG","log",OTG);
register_log_component("OTG_LATENCY","dat",OTG_LATENCY);
@@ -455,7 +455,7 @@ int logInit (void)
if (g_log->syslog) {
#if ! defined(CN_BUILD)
- openlog(g_log->log_component[EMU].name, LOG_PID, g_log->config.facility);
+ openlog(g_log->log_component[SIM].name, LOG_PID, g_log->config.facility);
#endif // ! defined(CN_BUILD)
}
log_getconfig(g_log);
@@ -1257,16 +1257,16 @@ int main(int argc, char *argv[])
int test_log(void)
{
LOG_ENTER(MAC); // because the default level is DEBUG
- LOG_I(EMU, "1 Starting OAI logs version %s Build date: %s on %s\n",
+ LOG_I(SIM, "1 Starting OAI logs version %s Build date: %s on %s\n",
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
LOG_D(MAC, "1 debug MAC \n");
LOG_N(MAC, "1 notice MAC \n");
LOG_W(MAC, "1 warning MAC \n");
- set_comp_log(EMU, LOG_INFO, FLAG_ONLINE);
+ set_comp_log(SIM, LOG_INFO, FLAG_ONLINE);
set_comp_log(MAC, LOG_WARNING, 0);
- LOG_I(EMU, "2 Starting OAI logs version %s Build date: %s on %s\n",
+ LOG_I(SIM, "2 Starting OAI logs version %s Build date: %s on %s\n",
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
LOG_E(MAC, "2 emerge MAC\n");
LOG_D(MAC, "2 debug MAC \n");
@@ -1278,7 +1278,7 @@ int test_log(void)
set_comp_log(MAC, LOG_NOTICE, 1);
LOG_ENTER(MAC);
- LOG_I(EMU, "3 Starting OAI logs version %s Build date: %s on %s\n",
+ LOG_I(SIM, "3 Starting OAI logs version %s Build date: %s on %s\n",
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
LOG_D(MAC, "3 debug MAC \n");
LOG_N(MAC, "3 notice MAC \n");
@@ -1286,10 +1286,10 @@ int test_log(void)
LOG_I(MAC, "3 info MAC \n");
set_comp_log(MAC, LOG_DEBUG,1);
- set_comp_log(EMU, LOG_DEBUG,1);
+ set_comp_log(SIM, LOG_DEBUG,1);
LOG_ENTER(MAC);
- LOG_I(EMU, "4 Starting OAI logs version %s Build date: %s on %s\n",
+ LOG_I(SIM, "4 Starting OAI logs version %s Build date: %s on %s\n",
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
LOG_D(MAC, "4 debug MAC \n");
LOG_N(MAC, "4 notice MAC \n");
@@ -1298,7 +1298,7 @@ int test_log(void)
set_comp_log(MAC, LOG_DEBUG,0);
- set_comp_log(EMU, LOG_DEBUG,0);
+ set_comp_log(SIM, LOG_DEBUG,0);
LOG_I(LOG, "5 Starting OAI logs version %s Build date: %s on %s\n",
BUILD_VERSION, BUILD_DATE, BUILD_HOST);
@@ -1309,7 +1309,7 @@ int test_log(void)
set_comp_log(MAC, LOG_TRACE,0X07F);
- set_comp_log(EMU, LOG_TRACE,0X07F);
+ set_comp_log(SIM, LOG_TRACE,0X07F);
LOG_ENTER(MAC);
LOG_I(LOG, "6 Starting OAI logs version %s Build date: %s on %s\n",
diff --git a/openair2/UTIL/LOG/log.h b/openair2/UTIL/LOG/log.h
index 9a89b7f0c0..f95ea50541 100644
--- a/openair2/UTIL/LOG/log.h
+++ b/openair2/UTIL/LOG/log.h
@@ -151,7 +151,7 @@ typedef enum {
MIN_LOG_COMPONENTS = 0,
PHY = MIN_LOG_COMPONENTS,
MAC,
- EMU,
+ SIM,
OCG,
OMG,
OPT,
diff --git a/openair2/UTIL/LOG/vcd_signal_dumper.c b/openair2/UTIL/LOG/vcd_signal_dumper.c
index a026cfb081..607fe85703 100644
--- a/openair2/UTIL/LOG/vcd_signal_dumper.c
+++ b/openair2/UTIL/LOG/vcd_signal_dumper.c
@@ -89,9 +89,6 @@ const char* eurecomVariablesNames[] = {
"subframe_TX1_UE",
"subframe_RX0_UE",
"subframe_RX1_UE",
- "missed_slot_enb",
- "daq_mbox",
- "rx_offset_mbox",
"ue_rx_offset",
"diff2",
"hw_subframe",
@@ -222,7 +219,10 @@ const char* eurecomFunctionsNames[] = {
"ue_lock_mutex_rxtx_for_cnt_decrement1",
"ue_lock_mutex_rxtx_for_cnt_increment0",
"ue_lock_mutex_rxtx_for_cnt_increment1",
-
+ /* simulation signals */
+ "do_DL_sig",
+ "do_UL_sig",
+ "UE_trx_read",
/* RRH signals */
"eNB_tx",
"eNB_rx",
diff --git a/openair2/UTIL/LOG/vcd_signal_dumper.h b/openair2/UTIL/LOG/vcd_signal_dumper.h
index a47cdc059d..c610883c22 100644
--- a/openair2/UTIL/LOG/vcd_signal_dumper.h
+++ b/openair2/UTIL/LOG/vcd_signal_dumper.h
@@ -65,9 +65,6 @@ typedef enum {
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_TX1_UE,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX0_UE,
VCD_SIGNAL_DUMPER_VARIABLES_SUBFRAME_NUMBER_RX1_UE,
- VCD_SIGNAL_DUMPER_VARIABLES_MISSED_SLOTS_ENB,
- VCD_SIGNAL_DUMPER_VARIABLES_DAQ_MBOX,
- VCD_SIGNAL_DUMPER_VARIABLES_UE_OFFSET_MBOX,
VCD_SIGNAL_DUMPER_VARIABLES_UE_RX_OFFSET,
VCD_SIGNAL_DUMPER_VARIABLES_DIFF,
VCD_SIGNAL_DUMPER_VARIABLES_HW_SUBFRAME,
@@ -199,7 +196,10 @@ typedef enum {
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_DECREMENT1,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT0,
VCD_SIGNAL_DUMPER_FUNCTIONS_UE_LOCK_MUTEX_RXTX_FOR_CNT_INCREMENT1,
-
+ /* SIMULATION signals */
+ VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_DL_SIGNAL,
+ VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL,
+ VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_UE_TRX_READ,
/* RRH signals */
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_TX,
VCD_SIGNAL_DUMPER_FUNCTIONS_eNB_RX,
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf
new file mode 100644
index 0000000000..c4d23bac42
--- /dev/null
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band38.tm1.if4p5.50PRB.lo.conf
@@ -0,0 +1,215 @@
+Active_eNBs = ( "eNB-Eurecom-LTEBox");
+# Asn1_verbosity, choice in: none, info, annoying
+Asn1_verbosity = "none";
+
+eNBs =
+(
+ {
+ # real_time choice in {hard, rt-preempt, no}
+ real_time = "no";
+
+ ////////// 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 = "93";
+
+ tr_s_preference = "local_mac"
+
+ ////////// Physical parameters:
+
+ component_carriers = (
+ {
+ node_function = "NGFI_RCC_IF4p5";
+ node_timing = "synch_to_ext_device";
+ node_synch_ref = 0;
+ frame_type = "TDD";
+ tdd_config = 1;
+ tdd_config_s = 0;
+ prefix_type = "NORMAL";
+ eutra_band = 38;
+ downlink_frequency = 2580000000L;
+ uplink_frequency_offset = 0;
+ Nid_cell = 0;
+ N_RB_DL = 50;
+ Nid_cell_mbsfn = 0;
+ nb_antenna_ports = 1;
+ nb_antennas_tx = 1;
+ nb_antennas_rx = 1;
+ tx_gain = 90;
+ rx_gain = 125;
+ pbch_repetition = "FALSE";
+ 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 = 0;
+ pucch_nCS_AN = 0;
+ pucch_n1_AN = 32;
+ pdsch_referenceSignalPower = -27;
+ 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 = -104;
+ pusch_alpha = "AL1";
+ pucch_p0_Nominal = -96;
+ 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;
+ ue_TransmissionMode = 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 = "127.0.0.3";
+ ipv6 = "192:168:30::17";
+ active = "yes";
+ preference = "ipv4";
+ }
+ );
+
+ NETWORK_INTERFACES :
+ {
+
+ ENB_INTERFACE_NAME_FOR_S1_MME = "lo";
+ ENB_IPV4_ADDRESS_FOR_S1_MME = "127.0.0.2/24";
+ ENB_INTERFACE_NAME_FOR_S1U = "lo";
+ ENB_IPV4_ADDRESS_FOR_S1U = "127.0.0.5/24";
+ ENB_PORT_FOR_S1U = 2152; # Spec 2152
+ };
+ }
+);
+
+MACRLCs = (
+ {
+ num_cc = 1;
+ tr_s_preference = "local_L1";
+ tr_n_preference = "local_RRC";
+ }
+);
+
+L1s = (
+ {
+ num_cc = 1;
+ tr_n_preference = "local_mac";
+ }
+);
+
+RUs = (
+ {
+ local_if_name = "lo";
+ remote_address = "127.0.0.2";
+ local_address = "127.0.0.1";
+ local_portc = 50000;
+ remote_portc = 50000;
+ local_portd = 50001;
+ remote_portd = 50001;
+ local_rf = "no"
+ tr_preference = "udp_if4p5"
+ nb_tx = 2
+ nb_rx = 2
+ att_tx = 0
+ att_rx = 0;
+ eNB_instances = [0];
+ is_slave = "no";
+ }
+);
+
+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/rcc.band7.tm1.if4p5.50PRB.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf
index 25b0cb1456..550de4e1a2 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rcc.band7.tm1.if4p5.50PRB.conf
@@ -39,7 +39,7 @@ eNBs =
downlink_frequency = 2685000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
- N_RB_DL = 50;
+ N_RB_DL = 100;
Nid_cell_mbsfn = 0;
nb_antenna_ports = 1;
nb_antennas_tx = 1;
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
index 8a0f5feb58..41b322fb55 100644
--- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.conf
@@ -11,14 +11,14 @@ RUs = (
tr_preference = "udp_if4p5";
nb_tx = 1;
nb_rx = 1;
- max_pdschReferenceSignalPower = -15;
- max_rxgain = 120;
+ max_pdschReferenceSignalPower = -27;
+ max_rxgain = 125;
bands = [7,13];
}
);
log_config = {
- global_log_level ="debug";
+ global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf
new file mode 100644
index 0000000000..da1481ac7b
--- /dev/null
+++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/rru.oaisim.tdd.conf
@@ -0,0 +1,37 @@
+RUs = (
+ {
+ local_if_name = "lo";
+ remote_address = "127.0.0.1"
+ local_address = "127.0.0.2";
+ local_portc = 50000;
+ remote_portc = 50000;
+ local_portd = 50001;
+ remote_portd = 50001;
+ local_rf = "yes"
+ tr_preference = "udp_if4p5";
+ nb_tx = 1;
+ nb_rx = 1;
+ max_pdschReferenceSignalPower = -29;
+ max_rxgain = 120;
+ bands = [38];
+ is_slave = "no";
+ }
+);
+
+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/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c
index 5d60928cd1..0f785d75bf 100644
--- a/targets/RT/USER/lte-ru.c
+++ b/targets/RT/USER/lte-ru.c
@@ -1717,19 +1717,12 @@ static void* ru_thread( void* param ) {
first_phy_tx = 0;
#endif
-/*
- LOG_D(PHY,"AFTER fh_south_in - SFN/SF:%d%d RU->proc[RX:%d%d TX:%d%d] RC.eNB[0][0]:[RX:%d%d TX(SFN):%d]\n",
- frame,subframe,
- proc->frame_rx,proc->subframe_rx,
- proc->frame_tx,proc->subframe_tx,
- RC.eNB[0][0]->proc.frame_rx,RC.eNB[0][0]->proc.subframe_rx,
- RC.eNB[0][0]->proc.frame_tx);
LOG_D(PHY,"RU thread (do_prach %d, is_prach_subframe %d), received frame %d, subframe %d\n",
ru->do_prach,
is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx),
proc->frame_rx,proc->subframe_rx);
-*/
+
if ((ru->do_prach>0) && (is_prach_subframe(fp, proc->frame_rx, proc->subframe_rx)==1)) {
wakeup_prach_ru(ru);
}
@@ -1782,7 +1775,7 @@ static void* ru_thread( void* param ) {
if (ru->num_eNB>0) wakeup_eNBs(ru);
#ifndef PHY_TX_THREAD
- if(get_nprocs() <= 4){
+ if(get_nprocs() <= 4 || ru->num_eNB==0){
// do TX front-end processing if needed (precoding and/or IDFTs)
if (ru->feptx_prec) ru->feptx_prec(ru);
@@ -2460,12 +2453,12 @@ void configure_rru(int idx,
ru->frame_parms.dl_CarrierFreq = config->tx_freq[0];
ru->frame_parms.ul_CarrierFreq = config->rx_freq[0];
if (ru->frame_parms.dl_CarrierFreq == ru->frame_parms.ul_CarrierFreq) {
- ru->frame_parms.frame_type = TDD;
- ru->frame_parms.tdd_config = config->tdd_config[0];
- ru->frame_parms.tdd_config_S = config->tdd_config_S[0];
+ LOG_I(PHY,"Setting RRU to TDD frame type\n");
+ ru->frame_parms.frame_type = TDD;
+ ru->frame_parms.tdd_config = config->tdd_config[0];
+ ru->frame_parms.tdd_config_S = config->tdd_config_S[0];
}
- else
- ru->frame_parms.frame_type = FDD;
+ else ru->frame_parms.frame_type = FDD;
ru->att_tx = config->att_tx[0];
ru->att_rx = config->att_rx[0];
ru->frame_parms.N_RB_DL = config->N_RB_DL[0];
@@ -2473,9 +2466,9 @@ void configure_rru(int idx,
ru->frame_parms.threequarter_fs = config->threequarter_fs[0];
ru->frame_parms.pdsch_config_common.referenceSignalPower = ru->max_pdschReferenceSignalPower-config->att_tx[0];
if (ru->function==NGFI_RRU_IF4p5) {
- ru->frame_parms.att_rx = ru->att_rx;
- ru->frame_parms.att_tx = ru->att_tx;
-
+ ru->frame_parms.att_rx = ru->att_rx;
+ ru->frame_parms.att_tx = ru->att_tx;
+
LOG_I(PHY,"Setting ru->function to NGFI_RRU_IF4p5, prach_FrequOffset %d, prach_ConfigIndex %d, att (%d,%d)\n",
config->prach_FreqOffset[0],config->prach_ConfigIndex[0],ru->att_tx,ru->att_rx);
ru->frame_parms.prach_config_common.prach_ConfigInfo.prach_FreqOffset = config->prach_FreqOffset[0];
@@ -2828,7 +2821,7 @@ void RCconfig_RU(void) {
- RC.ru_mask=(1<rfdevice.trx_end_func) {
RC.ru[ru_id]->rfdevice.trx_end_func(&RC.ru[ru_id]->rfdevice);
RC.ru[ru_id]->rfdevice.trx_end_func = NULL;
diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h
index 10e9d420ff..71dba041e9 100644
--- a/targets/RT/USER/lte-softmodem.h
+++ b/targets/RT/USER/lte-softmodem.h
@@ -24,7 +24,7 @@
#include
#include "rt_wrapper.h"
#include "../../ARCH/COMMON/common_lib.h"
-#undef MALLOC
+//#undef MALLOC
#include "assertions.h"
#include "msc.h"
#include "PHY/types.h"
@@ -52,6 +52,8 @@
#define CONFIG_HLP_DBGUEPR "UE run normal prach power ramping, but don't continue random-access\n"
#define CONFIG_HLP_CALPRACH "UE run normal prach with maximum power, but don't continue random-access\n"
#define CONFIG_HLP_NOL2CN "bypass L2 and upper layers\n"
+#define CONFIG_HLP_SIML1 "activate RF simulator instead of HW\n"
+#define CONFIG_HLP_NUMUE "number of UE instances\n"
#define CONFIG_HLP_UERXG "set UE RX gain\n"
#define CONFIG_HLP_UERXGOFF "external UE amplifier offset\n"
#define CONFIG_HLP_UETXG "set UE TX gain\n"
@@ -80,6 +82,7 @@
#define CONFIG_HLP_MSLOTS "Skip the missed slots/subframes \n"
#define CONFIG_HLP_ULMCS "Set the maximum uplink MCS\n"
#define CONFIG_HLP_TDD "Set hardware to TDD mode (default: FDD). Used only with -U (otherwise set in config file).\n"
+#define CONFIG_HLP_SNR "Set average SNR in dB (for --siml1 option)\n"
#define CONFIG_HLP_UE "Set the lte softmodem as a UE\n"
#define CONFIG_HLP_L2MONW "Enable L2 wireshark messages on localhost \n"
#define CONFIG_HLP_L2MONP "Enable L2 pcap messages on localhost \n"
@@ -131,15 +134,17 @@
/* optname helpstr paramflags XXXptr defXXXval type numelt */
/*--------------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_UEPARAMS_DESC { \
-{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
+{"siml1", CONFIG_HLP_SIML1, PARAMFLAG_BOOL, iptr:&simL1flag, defintval:0, TYPE_INT, 0}, \
+{"U", CONFIG_HLP_NUMUE, 0, u8ptr:&NB_UE_INST, defuintval:1, TYPE_UINT, 0}, \
+{"ue-rxgain", CONFIG_HLP_UERXG, 0, dblptr:&(rx_gain[0][0]), defdblval:130, TYPE_DOUBLE, 0}, \
{"ue-rxgain-off", CONFIG_HLP_UERXGOFF, 0, dblptr:&rx_gain_off, defdblval:0, TYPE_DOUBLE, 0}, \
{"ue-txgain", CONFIG_HLP_UETXG, 0, dblptr:&(tx_gain[0][0]), defdblval:0, TYPE_DOUBLE, 0}, \
{"ue-nb-ant-rx", CONFIG_HLP_UENANTR, 0, u8ptr:&nb_antenna_rx, defuintval:1, TYPE_UINT8, 0}, \
{"ue-nb-ant-tx", CONFIG_HLP_UENANTT, 0, u8ptr:&nb_antenna_tx, defuintval:1, TYPE_UINT8, 0}, \
{"ue-scan-carrier", CONFIG_HLP_UESCAN, PARAMFLAG_BOOL, iptr:&UE_scan_carrier, defintval:0, TYPE_INT, 0}, \
-{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:90, TYPE_INT, 0}, \
-{"emul-iface", CONFIG_HLP_EMULIFACE, 0, strptr:&emul_iface, defstrval:"lo", TYPE_STRING, 100}, \
-{"L2-emul", NULL, 0, u8ptr:&nfapi_mode, defuintval:3, TYPE_UINT8, 0}, \
+{"ue-max-power", NULL, 0, iptr:&(tx_max_power[0]), defintval:23, TYPE_INT, 0}, \
+{"emul-iface", CONFIG_HLP_EMULIFACE, 0, strptr:&emul_iface, defstrval:"lo", TYPE_STRING, 100}, \
+{"L2-emul", NULL, 0, u8ptr:&nfapi_mode, defuintval:3, TYPE_UINT8, 0}, \
{"num-ues", NULL, 0, u8ptr:&(NB_UE_INST), defuintval:1, TYPE_UINT8, 0}, \
{"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \
{"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \
@@ -181,6 +186,7 @@
{"q" , CONFIG_HLP_STMON, PARAMFLAG_BOOL, iptr:&opp_enabled, defintval:0, TYPE_INT, 0}, \
{"S" , CONFIG_HLP_MSLOTS, PARAMFLAG_BOOL, u8ptr:&exit_missed_slots, defintval:1, TYPE_UINT8, 0}, \
{"T" , CONFIG_HLP_TDD, PARAMFLAG_BOOL, iptr:&tddflag, defintval:0, TYPE_INT, 0}, \
+{"s" , CONFIG_HLP_SNR, 0, iptr:&snr_dB, defintval:25, TYPE_INT, 0}, \
{"numerology" , CONFIG_HLP_NUMEROLOGY, PARAMFLAG_BOOL, iptr:&numerology, defintval:0, TYPE_INT, 0}, \
{"emulate-rf" , CONFIG_HLP_EMULATE_RF, PARAMFLAG_BOOL, iptr:&emulate_rf, defintval:0, TYPE_INT, 0}, \
{"codingw" , CONFIG_HLP_CODINGW, PARAMFLAG_BOOL, iptr:&codingw, defintval:0, TYPE_INT, 0}, \
@@ -259,7 +265,7 @@ extern void set_function_spec_param(RU_t *ru);
extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
extern void fill_ue_band_info(void);
-extern void init_UE(int,int,int,int);
+extern void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax, int nb_rx, int nb_tx);
extern void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_t *cpuset, char * name);
extern void reset_opp_meas(void);
@@ -271,6 +277,10 @@ extern void init_te_thread(PHY_VARS_eNB *);
extern void kill_td_thread(PHY_VARS_eNB *);
extern void kill_te_thread(PHY_VARS_eNB *);
+extern void RCConfig_sim(void);
+extern void init_ocm(double,double);
+extern void init_ue_devices(PHY_VARS_UE *);
+
PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t UE_id,
uint8_t abstraction_flag);
@@ -279,4 +289,11 @@ void init_eNB_afterRU(void);
extern int stop_L1L2(module_id_t enb_id);
extern int restart_L1L2(module_id_t enb_id);
+
+extern void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface);
+
+extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
+ uint8_t UE_id,
+ uint8_t abstraction_flag);
+
#endif
diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c
index 638d476d4e..98ae9dac0f 100644
--- a/targets/RT/USER/lte-ue.c
+++ b/targets/RT/USER/lte-ue.c
@@ -79,7 +79,7 @@ void init_UE_threads(int);
void init_UE_threads_stub(int);
void init_UE_single_thread_stub(int);
void *UE_thread(void *arg);
-void init_UE(int nb_inst,int,int,int);
+void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax,int nb_rx,int nb_tx);
void init_UE_stub(int nb_inst,int,int,char*);
void init_UE_stub_single_thread(int nb_inst,int,int,char*);
int init_timer_thread(void);
@@ -93,6 +93,8 @@ extern int oai_nfapi_sr_indication(nfapi_sr_indication_t *ind);
extern int oai_nfapi_rx_ind(nfapi_rx_indication_t *ind);
extern int multicast_link_write_sock(int groupP, char *dataP, uint32_t sizeP);
+extern int simL1flag;
+
//extern int tx_req_UE_MAC1();
void ue_stub_rx_handler(unsigned int, char *);
@@ -236,11 +238,12 @@ void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_
}
-void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction) {
+void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax,int nb_rx,int nb_tx) {
PHY_VARS_UE *UE;
int inst;
int ret;
+ LTE_DL_FRAME_PARMS *fp;
LOG_I(PHY,"UE : Calling Layer 2 for initialization\n");
@@ -248,18 +251,95 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
0,// cba_group_active
0); // HO flag
+ if (PHY_vars_UE_g==NULL) PHY_vars_UE_g = (PHY_VARS_UE***)calloc(1+nb_inst,sizeof(PHY_VARS_UE**));
+
for (inst=0;instframe_parms.nb_antennas_rx = nb_rx;
+ RC.ru[0]->frame_parms.nb_antennas_tx = nb_tx;
+ PHY_vars_UE_g[inst][0] = init_ue_vars(&RC.ru[0]->frame_parms,inst,0);
+ }
// turn off timing control loop in UE
PHY_vars_UE_g[inst][0]->no_timing_correction = timing_correction;
+ UE = PHY_vars_UE_g[inst][0];
+ fp = &UE->frame_parms;
+ printf("PHY_vars_UE_g[0][0] = %p\n",UE);
+
+ if (phy_test==1)
+ UE->mac_enabled = 0;
+ else
+ UE->mac_enabled = 1;
+
+ if (UE->mac_enabled == 0) { //set default UL parameters for testing mode
+ for (int i=0; ipusch_config_dedicated[i].betaOffset_ACK_Index = 0;
+ UE->pusch_config_dedicated[i].betaOffset_RI_Index = 0;
+ UE->pusch_config_dedicated[i].betaOffset_CQI_Index = 2;
+
+ UE->scheduling_request_config[i].sr_PUCCH_ResourceIndex = 0;
+ UE->scheduling_request_config[i].sr_ConfigIndex = 7+(0%3);
+ UE->scheduling_request_config[i].dsr_TransMax = sr_n4;
+ }
+ }
+
+ UE->UE_scan = UE_scan;
+ UE->UE_scan_carrier = UE_scan_carrier;
+ UE->mode = mode;
+ printf("UE->mode = %d\n",mode);
+
+ if (UE->mac_enabled == 1) {
+ UE->pdcch_vars[0][0]->crnti = 0x1234;
+ UE->pdcch_vars[1][0]->crnti = 0x1234;
+ }else {
+ UE->pdcch_vars[0][0]->crnti = 0x1235;
+ UE->pdcch_vars[1][0]->crnti = 0x1235;
+ }
+ UE->rx_total_gain_dB = rxgain;
+ UE->tx_power_max_dBm = txpowermax;
+
+ UE->frame_parms.nb_antennas_tx = nb_tx;
+ UE->frame_parms.nb_antennas_rx = nb_rx;
+
+ if (fp->frame_type == TDD) {
+ switch (fp->N_RB_DL) {
+
+ case 100:
+ if (fp->threequarter_fs) UE->N_TA_offset = (624*3)/4;
+ else UE->N_TA_offset = 624;
+ break;
+ case 75:
+ UE->N_TA_offset = (624*3)/4;
+ break;
+ case 50:
+ UE->N_TA_offset = 624/2;
+ break;
+ case 25:
+ UE->N_TA_offset = 624/4;
+ break;
+ case 15:
+ UE->N_TA_offset = 624/8;
+ break;
+ case 6:
+ UE->N_TA_offset = 624/16;
+ break;
+ default:
+ AssertFatal(1==0,"illegal N_RB_DL %d\n",fp->N_RB_DL);
+ break;
+ }
+ }
+ else UE->N_TA_offset = 0;
+
+ if (simL1flag == 1) init_ue_devices(UE);
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
init_UE_threads(inst);
- UE = PHY_vars_UE_g[inst][0];
- if (oaisim_flag == 0) {
+ if (simL1flag == 0) {
ret = openair0_device_load(&(UE->rfdevice), &openair0_cfg[0]);
if (ret !=0){
exit_fun("Error loading device library");
@@ -267,7 +347,7 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
}
UE->rfdevice.host_type = RAU_HOST;
// UE->rfdevice.type = NONE_DEV;
- PHY_VARS_UE *UE = PHY_vars_UE_g[inst][0];
+
AssertFatal(0 == pthread_create(&UE->proc.pthread_ue,
&UE->proc.attr_ue,
UE_thread,
@@ -435,9 +515,12 @@ static void *UE_thread_synch(void *arg)
}
}
+/*
while (sync_var<0)
pthread_cond_wait(&sync_cond, &sync_mutex);
pthread_mutex_unlock(&sync_mutex);
+*/
+ wait_sync("UE_thread_sync");
printf("Started device, unlocked sync_mutex (UE_sync_thread)\n");
@@ -1411,6 +1494,13 @@ void *UE_thread(void *arg) {
init_thread(100000, 500000, FIFO_PRIORITY, &cpuset,
"UHD Threads");
+ /*
+ while (sync_var<0)
+ pthread_cond_wait(&sync_cond, &sync_mutex);
+ pthread_mutex_unlock(&sync_mutex);
+ */
+
+ wait_sync("UE thread");
#ifdef NAS_UE
MessageDef *message_p;
message_p = itti_alloc_new_message(TASK_NAS_UE, INITIALIZE_MESSAGE);
diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c
index 27fe6ebe8a..6c665f6d0c 100644
--- a/targets/RT/USER/lte-uesoftmodem.c
+++ b/targets/RT/USER/lte-uesoftmodem.c
@@ -63,7 +63,6 @@
#include "PHY/LTE_TRANSPORT/transport_vars.h"
#include "SCHED/sched_common_vars.h"
#include "PHY/MODULATION/modulation_vars.h"
-#include "../../SIMU/USER/init_lte.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_vars.h"
@@ -156,6 +155,9 @@ static char *itti_dump_file = NULL;
int UE_scan = 1;
int UE_scan_carrier = 0;
+int simL1flag = 0;
+int snr_dB=25;
+
runmode_t mode = normal_txrx;
FILE *input_fd=NULL;
@@ -164,11 +166,11 @@ FILE *input_fd=NULL;
#if MAX_NUM_CCs == 1
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain}};
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0}};
-double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0}};
+double rx_gain[MAX_NUM_CCs][4] = {{130,0,0,0}};
#else
rx_gain_t rx_gain_mode[MAX_NUM_CCs][4] = {{max_gain,max_gain,max_gain,max_gain},{max_gain,max_gain,max_gain,max_gain}};
double tx_gain[MAX_NUM_CCs][4] = {{20,0,0,0},{20,0,0,0}};
-double rx_gain[MAX_NUM_CCs][4] = {{110,0,0,0},{20,0,0,0}};
+double rx_gain[MAX_NUM_CCs][4] = {{130,0,0,0},{20,0,0,0}};
#endif
double rx_gain_off = 0.0;
@@ -212,8 +214,6 @@ uint8_t exit_missed_slots=1;
uint64_t num_missed_slots=0; // counter for the number of missed slots
-extern void reset_opp_meas(void);
-extern void print_opp_meas(void);
extern void init_UE_stub_single_thread(int nb_inst,int eMBMS_active, int uecap_xer_in, char *emul_iface);
extern PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
@@ -452,11 +452,11 @@ void *l2l1_task(void *arg) {
break;
case MESSAGE_TEST:
- LOG_I(EMU, "Received %s\n", ITTI_MSG_NAME(message_p));
+ LOG_I(SIM, "Received %s\n", ITTI_MSG_NAME(message_p));
break;
default:
- LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
+ LOG_E(SIM, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
break;
}
@@ -540,8 +540,7 @@ static void get_options(void) {
}
UE_scan=0;
-
- if (tddflag > 0) {
+ if (tddflag > 0) {
for (CC_id=0; CC_idframe_type = TDD;
}
@@ -573,12 +572,11 @@ static void get_options(void) {
for (CC_id=1;CC_idN_RB_DL == 100) {
- if (frame_parms[0]->threequarter_fs) {
+ if(frame_parms->N_RB_DL == 100) {
+ if (frame_parms->threequarter_fs) {
openair0_cfg[card].sample_rate=23.04e6;
openair0_cfg[card].samples_per_frame = 230400;
openair0_cfg[card].tx_bw = 10e6;
@@ -659,17 +657,17 @@ void init_openair0(void) {
openair0_cfg[card].tx_bw = 10e6;
openair0_cfg[card].rx_bw = 10e6;
}
- } else if(frame_parms[0]->N_RB_DL == 50) {
+ } else if(frame_parms->N_RB_DL == 50) {
openair0_cfg[card].sample_rate=15.36e6;
openair0_cfg[card].samples_per_frame = 153600;
openair0_cfg[card].tx_bw = 5e6;
openair0_cfg[card].rx_bw = 5e6;
- } else if (frame_parms[0]->N_RB_DL == 25) {
+ } else if (frame_parms->N_RB_DL == 25) {
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;
- } else if (frame_parms[0]->N_RB_DL == 6) {
+ } else if (frame_parms->N_RB_DL == 6) {
openair0_cfg[card].sample_rate=1.92e6;
openair0_cfg[card].samples_per_frame = 19200;
openair0_cfg[card].tx_bw = 1.5e6;
@@ -679,23 +677,20 @@ void init_openair0(void) {
- if (frame_parms[0]->frame_type==TDD)
+ if (frame_parms->frame_type==TDD)
openair0_cfg[card].duplex_mode = duplex_mode_TDD;
else //FDD
openair0_cfg[card].duplex_mode = duplex_mode_FDD;
- printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card,
- PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx,
- PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx);
openair0_cfg[card].Mod_id = 0;
- openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
+ openair0_cfg[card].num_rb_dl=frame_parms->N_RB_DL;
openair0_cfg[card].clock_source = clock_source;
- openair0_cfg[card].tx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx);
- openair0_cfg[card].rx_num_channels=min(2,PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx);
+ openair0_cfg[card].tx_num_channels=min(2,frame_parms->nb_antennas_tx);
+ openair0_cfg[card].rx_num_channels=min(2,frame_parms->nb_antennas_rx);
for (i=0; i<4; i++) {
@@ -711,7 +706,7 @@ void init_openair0(void) {
openair0_cfg[card].autocal[i] = 1;
openair0_cfg[card].tx_gain[i] = tx_gain[0][i];
- openair0_cfg[card].rx_gain[i] = PHY_vars_UE_g[0][0]->rx_total_gain_dB - rx_gain_off;
+ openair0_cfg[card].rx_gain[i] = rxgain - rx_gain_off;
openair0_cfg[card].configFilename = rf_config_file;
@@ -771,14 +766,12 @@ int restart_L1L2(module_id_t enb_id)
int main( int argc, char **argv )
{
- int i;
#if defined (XFORMS)
void *status;
#endif
int CC_id;
uint8_t abstraction_flag=0;
- uint8_t beta_ACK=0,beta_RI=0,beta_CQI=2;
// Default value for the number of UEs. It will hold,
// if not changed from the command line option --num-ues
@@ -798,12 +791,10 @@ int main( int argc, char **argv )
setvbuf(stderr, NULL, _IONBF, 0);
#endif
- PHY_VARS_UE *UE[MAX_NUM_CCs];
mode = normal_txrx;
memset(&openair0_cfg[0],0,sizeof(openair0_config_t)*MAX_CARDS);
- memset(tx_max_power,0,sizeof(int)*MAX_NUM_CCs);
set_latency_target();
@@ -811,8 +802,16 @@ int main( int argc, char **argv )
printf("Reading in command-line options\n");
+ for (int i=0;i 1 && simL1flag != 1) {
+ printf("Running with more than 1 UE instance and simL1 is not active, this will result in undefined behaviour for now, exiting.\n");
+ abort();
+ }
+
printf("NFAPI_MODE value: %d \n", nfapi_mode);
// Not sure if the following is needed here
@@ -846,7 +845,7 @@ int main( int argc, char **argv )
set_comp_log(OTG, LOG_INFO, LOG_HIGH, 1);
set_comp_log(RRC, LOG_INFO, LOG_HIGH, 1);
#if defined(ENABLE_ITTI)
- set_comp_log(EMU, LOG_INFO, LOG_MED, 1);
+ set_comp_log(SIM, LOG_INFO, LOG_MED, 1);
# if defined(ENABLE_USE_MME)
set_comp_log(NAS, LOG_INFO, LOG_HIGH, 1);
# endif
@@ -859,11 +858,15 @@ int main( int argc, char **argv )
cpuf=get_cpu_freq_GHz();
+ pthread_cond_init(&sync_cond,NULL);
+ pthread_mutex_init(&sync_mutex, NULL);
+
#if defined(ENABLE_ITTI)
log_set_instance_type (LOG_INSTANCE_UE);
+
printf("ITTI init\n");
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, itti_dump_file);
@@ -923,10 +926,6 @@ int main( int argc, char **argv )
- printf("Before CC \n");
-
-
- //NB_UE_INST=1;
NB_INST=1;
if(nfapi_mode == 3){
PHY_vars_UE_g = malloc(sizeof(PHY_VARS_UE**)*NB_UE_INST);
@@ -935,80 +934,58 @@ int main( int argc, char **argv )
PHY_vars_UE_g[i] = malloc(sizeof(PHY_VARS_UE*)*MAX_NUM_CCs);
PHY_vars_UE_g[i][CC_id] = init_ue_vars(frame_parms[CC_id], i,abstraction_flag);
- UE[CC_id] = PHY_vars_UE_g[i][CC_id];
- printf("PHY_vars_UE_g[inst][%d] = %p\n",CC_id,UE[CC_id]);
if (phy_test==1)
- UE[CC_id]->mac_enabled = 0;
+ PHY_vars_UE_g[i][CC_id]->mac_enabled = 0;
else
- UE[CC_id]->mac_enabled = 1;
+ PHY_vars_UE_g[i][CC_id]->mac_enabled = 1;
}
}
}
- else{
+ else init_openair0(frame_parms[0],(int)rx_gain[0][0]);
- for (CC_id=0; CC_idmac_enabled = 0;
- else
- UE[CC_id]->mac_enabled = 1;
+ RCConfig_sim();
+ }
- if (UE[CC_id]->mac_enabled == 0) { //set default UL parameters for testing mode
- for (i=0; ipusch_config_dedicated[i].betaOffset_ACK_Index = beta_ACK;
- UE[CC_id]->pusch_config_dedicated[i].betaOffset_RI_Index = beta_RI;
- UE[CC_id]->pusch_config_dedicated[i].betaOffset_CQI_Index = beta_CQI;
-
- UE[CC_id]->scheduling_request_config[i].sr_PUCCH_ResourceIndex = 0;
- UE[CC_id]->scheduling_request_config[i].sr_ConfigIndex = 7+(0%3);
- UE[CC_id]->scheduling_request_config[i].dsr_TransMax = sr_n4;
- }
- }
+ // start the main UE threads
+ int eMBMS_active = 0;
- UE[CC_id]->UE_scan = UE_scan;
- UE[CC_id]->UE_scan_carrier = UE_scan_carrier;
- UE[CC_id]->mode = mode;
- printf("UE[%d]->mode = %d\n",CC_id,mode);
-
- if (UE[CC_id]->mac_enabled == 1) {
- UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1234;
- UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1234;
- }else {
- UE[CC_id]->pdcch_vars[0][0]->crnti = 0x1235;
- UE[CC_id]->pdcch_vars[1][0]->crnti = 0x1235;
- }
- UE[CC_id]->rx_total_gain_dB = (int)rx_gain[CC_id][0] + rx_gain_off;
- UE[CC_id]->tx_power_max_dBm = tx_max_power[CC_id];
-
- if (frame_parms[CC_id]->frame_type==FDD) {
- UE[CC_id]->N_TA_offset = 0;
- }
- else {
- if (frame_parms[CC_id]->N_RB_DL == 100)
- UE[CC_id]->N_TA_offset = 624;
- else if (frame_parms[CC_id]->N_RB_DL == 50)
- UE[CC_id]->N_TA_offset = 624/2;
- else if (frame_parms[CC_id]->N_RB_DL == 25)
- UE[CC_id]->N_TA_offset = 624/4;
-
- }
- init_openair0();
+ if (nfapi_mode==3) // UE-STUB-PNF
+ {
+ config_sync_var=0;
+ wait_nfapi_init("main?");
+ //Panos: Temporarily we will be using single set of threads for multiple UEs.
+ //init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface);
+ init_UE_stub_single_thread(NB_UE_INST,eMBMS_active,uecap_xer_in,emul_iface);
+ }
+ else {
+ init_UE(NB_UE_INST,eMBMS_active,uecap_xer_in,0,phy_test,UE_scan,UE_scan_carrier,mode,(int)rx_gain[0][0],tx_max_power[0],
+ frame_parms[0]->nb_antennas_rx,
+ frame_parms[0]->nb_antennas_tx);
}
- printf("Runtime table\n");
- fill_modeled_runtime_table(runtime_phy_rx,runtime_phy_tx);
+ if (phy_test==0) {
+ printf("Filling UE band info\n");
+ fill_ue_band_info();
+ dl_phy_sync_success (0, 0, 0, 1);
+ }
+
+ if (nfapi_mode!=3){
+ number_of_cards = 1;
+ for(CC_id=0; CC_idrf_map.card=0;
+ PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
+ }
+ }
+
+
cpuf=get_cpu_freq_GHz();
- }
@@ -1064,16 +1041,10 @@ int main( int argc, char **argv )
printf("ITTI tasks created\n");
#endif
- // init UE_PF_PO and mutex lock
- pthread_mutex_init(&ue_pf_po_mutex, NULL);
- memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*MAX_MOBILES_PER_ENB*MAX_NUM_CCs);
mlockall(MCL_CURRENT | MCL_FUTURE);
- pthread_cond_init(&sync_cond,NULL);
- pthread_mutex_init(&sync_mutex, NULL);
-
rt_sleep_ns(10*100000000ULL);
const char *nfapi_mode_str = "";
@@ -1102,61 +1073,23 @@ int main( int argc, char **argv )
printf("NFAPI MODE:%s\n", nfapi_mode_str);
- // start the main threads
- int eMBMS_active = 0;
-
- if (nfapi_mode==3) // UE-STUB-PNF
- {
- config_sync_var=0;
- wait_nfapi_init("main?");
- // Temporarily we will be using single set of threads for multiple UEs.
- //init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface);
- init_UE_stub_single_thread(NB_UE_INST,eMBMS_active,uecap_xer_in,emul_iface);
- }
- else {
- init_UE(1,eMBMS_active,uecap_xer_in,0);
- }
-
- if (phy_test==0) {
- printf("Filling UE band info\n");
- fill_ue_band_info();
- dl_phy_sync_success (0, 0, 0, 1);
- }
-
- if (nfapi_mode!=3){
- number_of_cards = 1;
- for(CC_id=0; CC_idrf_map.card=0;
- PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
- }
- }
-
-
-
// connect the TX/RX buffers
- for (CC_id=0; CC_idhw_timing_advance = timing_advance;
-#else
- UE[CC_id]->hw_timing_advance = 160;
-#endif
- }
+ /*
if(nfapi_mode!=3) {
- if (setup_ue_buffers(UE,&openair0_cfg[0])!=0) {
+ if (setup_ue_buffers(PHY_vars_UE_g[0],&openair0_cfg[0])!=0) {
printf("Error setting up eNB buffer\n");
exit(-1);
}
}
-
+ */
if (input_fd) {
printf("Reading in from file to antenna buffer %d\n",0);
- if (fread(UE[0]->common_vars.rxdata[0],
+ if (fread(PHY_vars_UE_g[0][0]->common_vars.rxdata[0],
sizeof(int32_t),
frame_parms[0]->samples_per_tti*10,
input_fd) != frame_parms[0]->samples_per_tti*10)
@@ -1164,6 +1097,14 @@ int main( int argc, char **argv )
}
//p_exmimo_config->framing.tdd_config = TXRXSWITCH_TESTRX;
+
+ if (simL1flag==1) {
+ init_ocm((double)snr_dB,0);
+ PHY_vars_UE_g[0][0]->no_timing_correction = 1;
+ }
+
+
+
#ifdef XFORMS
int UE_id;
@@ -1199,20 +1140,25 @@ int main( int argc, char **argv )
#endif
- printf("Sending sync to all threads\n");
+ printf("Sending sync to all threads (%p,%p,%p)\n",&sync_var,&sync_cond,&sync_mutex);
+
pthread_mutex_lock(&sync_mutex);
sync_var=0;
pthread_cond_broadcast(&sync_cond);
pthread_mutex_unlock(&sync_mutex);
+
+ printf("sync sent\n");
+/*
printf("About to call end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
end_configmodule();
printf("Called end_configmodule() from %s() %s:%d\n", __FUNCTION__, __FILE__, __LINE__);
-
+*/
// wait for end of program
printf("TYPE TO TERMINATE\n");
//getchar();
+
#if defined(ENABLE_ITTI)
printf("Entering ITTI signals handler\n");
itti_wait_tasks_end();
@@ -1221,9 +1167,9 @@ int main( int argc, char **argv )
printf("oai_exit=%d\n",oai_exit);
#else
- while (oai_exit==0)
- rt_sleep_ns(100000000ULL);
- printf("Terminating application - oai_exit=%d\n",oai_exit);
+ while (oai_exit==0)
+ rt_sleep_ns(100000000ULL);
+ printf("Terminating application - oai_exit=%d\n",oai_exit);
#endif
@@ -1246,7 +1192,7 @@ int main( int argc, char **argv )
pthread_cond_destroy(&sync_cond);
pthread_mutex_destroy(&sync_mutex);
- pthread_mutex_destroy(&ue_pf_po_mutex);
+ // pthread_mutex_destroy(&ue_pf_po_mutex);
// *** Handle per CC_id openair0
if (PHY_vars_UE_g[0][0]->rfdevice.trx_end_func)
diff --git a/targets/RT/USER/rfsim.c b/targets/RT/USER/rfsim.c
new file mode 100644
index 0000000000..cc9b70295a
--- /dev/null
+++ b/targets/RT/USER/rfsim.c
@@ -0,0 +1,541 @@
+/*
+ * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The OpenAirInterface Software Alliance licenses this file to You under
+ * the OAI Public License, Version 1.1 (the "License"); you may not use this file
+ * except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.openairinterface.org/?page_id=698
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *-------------------------------------------------------------------------------
+ * For more information about the OpenAirInterface (OAI) Software Alliance:
+ * contact@openairinterface.org
+ */
+
+/*! \file rfsim.c
+* \brief function for simulated RF device
+* \author R. Knopp
+* \date 2018
+* \version 1.0
+* \company Eurecom
+* \email: openair_tech@eurecom.fr
+* \note
+* \warning
+*/
+
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include "assertions.h"
+#include "rfsim.h"
+#include "openair1/SIMULATION/TOOLS/sim.h"
+#include "enb_config.h"
+#include "enb_paramdef.h"
+#include "platform_constants.h"
+#include "common/config/config_paramdesc.h"
+#include "common/config/config_userapi.h"
+#include "common/ran_context.h"
+#include "PHY/defs_UE.h"
+#include "PHY/defs_eNB.h"
+#include "vcd_signal_dumper.h"
+
+RAN_CONTEXT_t RC;
+extern PHY_VARS_UE ***PHY_vars_UE_g;
+
+
+// put all of these in a common structure after
+sim_t sim;
+
+
+void init_ru_devices(void);
+void init_RU(const char*);
+void *rfsim_top(void *n_frames);
+
+void wait_RUs(void)
+{
+ int i;
+
+ // wait for all RUs to be configured over fronthaul
+ pthread_mutex_lock(&RC.ru_mutex);
+
+
+
+ while (RC.ru_mask>0) {
+ pthread_cond_wait(&RC.ru_cond,&RC.ru_mutex);
+ }
+
+ // copy frame parameters from RU to UEs
+ for (i=0;iframe_parms.samples_per_tti + RC.ru[0]->frame_parms.ofdm_symbol_size + RC.ru[0]->frame_parms.nb_prefix_samples0;
+
+ }
+
+ for (int ru_id=0;ru_idframe_parms.samples_per_tti;
+
+ printf("RUs are ready, let's go\n");
+}
+
+void wait_eNBs(void)
+{
+ return;
+}
+
+
+void RCConfig_sim(void) {
+
+ paramlist_def_t RUParamList = {CONFIG_STRING_RU_LIST,NULL,0};
+
+ // AssertFatal(RC.config_file_name!=NULL,"configuration file is undefined\n");
+
+ // Get num RU instances
+ config_getlist( &RUParamList,NULL,0, NULL);
+ RC.nb_RU = RUParamList.numelt;
+
+ printf("returned with %d rus\n",RC.nb_RU);
+
+ init_RU(NULL);
+
+ printf("Waiting for RUs to get set up\n");
+ wait_RUs();
+
+ init_ru_devices();
+
+ static int nframes = 100000;
+
+ AssertFatal(0 == pthread_create(&sim.rfsim_thread,
+ NULL,
+ rfsim_top,
+ (void*)&nframes), "");
+
+}
+
+
+
+int ru_trx_start(openair0_device *device) {
+ return(0);
+}
+
+void ru_trx_end(openair0_device *device) {
+ return;
+}
+
+int ru_trx_stop(openair0_device *device) {
+ return(0);
+}
+int UE_trx_start(openair0_device *device) {
+ return(0);
+}
+void UE_trx_end(openair0_device *device) {
+ return;
+}
+int UE_trx_stop(openair0_device *device) {
+ return(0);
+}
+int ru_trx_set_freq(openair0_device *device, openair0_config_t *openair0_cfg, int dummy) {
+ return(0);
+}
+int ru_trx_set_gains(openair0_device *device, openair0_config_t *openair0_cfg) {
+ return(0);
+}
+int UE_trx_set_freq(openair0_device *device, openair0_config_t *openair0_cfg, int dummy) {
+ return(0);
+}
+int UE_trx_set_gains(openair0_device *device, openair0_config_t *openair0_cfg) {
+ return(0);
+}
+
+extern pthread_mutex_t subframe_mutex;
+extern int subframe_ru_mask,subframe_UE_mask;
+
+
+int ru_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc) {
+
+ int ru_id = device->Mod_id;
+ int CC_id = device->CC_id;
+
+ int subframe;
+ int sample_count=0;
+
+ *ptimestamp = sim.last_ru_rx_timestamp[ru_id][CC_id];
+
+
+ LOG_D(SIM,"RU_trx_read nsamps %d TS(%llu,%llu) => subframe %d\n",nsamps,
+ (unsigned long long)sim.current_ru_rx_timestamp[ru_id][CC_id],
+ (unsigned long long)sim.last_ru_rx_timestamp[ru_id][CC_id],
+ (int)((*ptimestamp/RC.ru[ru_id]->frame_parms.samples_per_tti)%10));
+ // if we're at a subframe boundary generate UL signals for this ru
+
+ while (sample_countframe_parms.samples_per_tti)%10;
+ if (subframe_select(&RC.ru[ru_id]->frame_parms,subframe) != SF_DL || RC.ru[ru_id]->frame_parms.frame_type == FDD) {
+ LOG_D(SIM,"RU_trx_read generating UL subframe %d (Ts %llu, current TS %llu)\n",
+ subframe,(unsigned long long)*ptimestamp,
+ (unsigned long long)sim.current_ru_rx_timestamp[ru_id][CC_id]);
+ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL,1);
+ do_UL_sig(&sim,
+ subframe,
+ 0, // abstraction_flag
+ &RC.ru[ru_id]->frame_parms,
+ 0, // frame is only used for abstraction
+ ru_id,
+ CC_id);
+ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_UL_SIGNAL,0);
+ }
+ sim.last_ru_rx_timestamp[ru_id][CC_id] += RC.ru[ru_id]->frame_parms.samples_per_tti;
+ sample_count += RC.ru[ru_id]->frame_parms.samples_per_tti;
+ }
+
+
+ return(nsamps);
+}
+
+int UE_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void **buff, int nsamps, int cc)
+{
+ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_UE_TRX_READ,1);
+ int UE_id = device->Mod_id;
+ int CC_id = device->CC_id;
+
+ int subframe;
+ int sample_count=0;
+ int read_size;
+ int sptti = PHY_vars_UE_g[UE_id][CC_id]->frame_parms.samples_per_tti;
+
+ *ptimestamp = sim.last_UE_rx_timestamp[UE_id][CC_id];
+
+ LOG_D(PHY,"UE %d DL simulation 0: UE_trx_read nsamps %d TS %llu (%llu, offset %d) antenna %d\n",
+ UE_id,
+ nsamps,
+ (unsigned long long)sim.current_UE_rx_timestamp[UE_id][CC_id],
+ (unsigned long long)sim.last_UE_rx_timestamp[UE_id][CC_id],
+ (int)(sim.last_UE_rx_timestamp[UE_id][CC_id]%sptti),
+ cc);
+
+
+ if (nsamps < sptti)
+ read_size = nsamps;
+ else
+ read_size = sptti;
+
+ while (sample_countframe_parms,
+ UE_id,
+ CC_id);
+ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_DO_DL_SIGNAL,0);
+ LOG_D(PHY,"UE %d: DL simulation 6: UE_trx_read @ TS %"PRIi64" (%"PRIi64")=> frame %d, subframe %d\n",
+ UE_id, sim.current_UE_rx_timestamp[UE_id][CC_id],
+ sim.last_UE_rx_timestamp[UE_id][CC_id],
+ (int)((sim.last_UE_rx_timestamp[UE_id][CC_id]/(sptti*10))&1023),
+ subframe);
+
+ sim.last_UE_rx_timestamp[UE_id][CC_id] += read_size;
+ sample_count += read_size;
+
+
+
+
+ }
+
+ VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_SIM_UE_TRX_READ,0);
+ return(nsamps);
+}
+
+
+int ru_trx_write(openair0_device *device,openair0_timestamp timestamp, void **buff, int nsamps, int cc, int flags) {
+
+ int ru_id = device->Mod_id;
+
+ LTE_DL_FRAME_PARMS *frame_parms = &RC.ru[ru_id]->frame_parms;
+
+ pthread_mutex_lock(&sim.subframe_mutex);
+ LOG_D(SIM,"[TXPATH] ru_trx_write: RU %d mask %d\n",ru_id,sim.subframe_ru_mask);
+ pthread_mutex_unlock(&sim.subframe_mutex);
+
+ // compute amplitude of TX signal from first symbol in subframe
+ // note: assumes that the packet is an entire subframe
+
+ sim.ru_amp[ru_id] = 0;
+ for (int aa=0; aanb_tx; aa++) {
+ sim.ru_amp[ru_id] += (double)signal_energy((int32_t*)buff[aa],frame_parms->ofdm_symbol_size)/(12*frame_parms->N_RB_DL);
+ }
+ sim.ru_amp[ru_id] = sqrt(sim.ru_amp[ru_id]);
+
+ LOG_D(PHY,"Setting amp for RU %d to %f (%d)\n",ru_id,sim.ru_amp[ru_id], dB_fixed((double)signal_energy((int32_t*)buff[0],frame_parms->ofdm_symbol_size)));
+ // tell top-level we are done
+ pthread_mutex_lock(&sim.subframe_mutex);
+ sim.subframe_ru_mask|=(1<rfdevice.Mod_id = ru_id;
+ ru->rfdevice.CC_id = 0;
+ ru->rfdevice.trx_start_func = ru_trx_start;
+ ru->rfdevice.trx_read_func = ru_trx_read;
+ ru->rfdevice.trx_write_func = ru_trx_write;
+ ru->rfdevice.trx_end_func = ru_trx_end;
+ ru->rfdevice.trx_stop_func = ru_trx_stop;
+ ru->rfdevice.trx_set_freq_func = ru_trx_set_freq;
+ ru->rfdevice.trx_set_gains_func = ru_trx_set_gains;
+ sim.last_ru_rx_timestamp[ru_id][0] = 0;
+
+ }
+}
+
+void init_ue_devices(PHY_VARS_UE *UE) {
+
+ AssertFatal(UE!=NULL,"UE context is not allocated\n");
+ printf("Initializing UE %d.%d\n",UE->Mod_id,UE->CC_id);
+ UE->rfdevice.Mod_id = UE->Mod_id;
+ UE->rfdevice.CC_id = UE->CC_id;
+ UE->rfdevice.trx_start_func = UE_trx_start;
+ UE->rfdevice.trx_read_func = UE_trx_read;
+ UE->rfdevice.trx_write_func = UE_trx_write;
+ UE->rfdevice.trx_end_func = UE_trx_end;
+ UE->rfdevice.trx_stop_func = UE_trx_stop;
+ UE->rfdevice.trx_set_freq_func = UE_trx_set_freq;
+ UE->rfdevice.trx_set_gains_func = UE_trx_set_gains;
+ sim.last_UE_rx_timestamp[UE->Mod_id][UE->CC_id] = 0;
+}
+
+void init_ocm(double snr_dB,double sinr_dB)
+{
+ module_id_t UE_id, ru_id;
+ int CC_id;
+
+ randominit(0);
+ set_taus_seed(0);
+
+
+ init_channel_vars ();//fp, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
+
+ // initialize channel descriptors
+ LOG_I(PHY,"Initializing channel descriptors (nb_RU %d, nb_UE %d)\n",RC.nb_RU,NB_UE_INST);
+ for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) {
+ for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
+ for (CC_id=0; CC_idframe_parms.N_RB_DL);
+ sim.RU2UE[ru_id][UE_id][CC_id] =
+ new_channel_desc_scm(RC.ru[ru_id]->nb_tx,
+ PHY_vars_UE_g[UE_id][CC_id]->frame_parms.nb_antennas_rx,
+ AWGN,
+ N_RB2sampling_rate(RC.ru[ru_id]->frame_parms.N_RB_DL),
+ N_RB2channel_bandwidth(RC.ru[ru_id]->frame_parms.N_RB_DL),
+ 0.0,
+ 0,
+ 0);
+ random_channel(sim.RU2UE[ru_id][UE_id][CC_id],0);
+ LOG_D(OCM,"[SIM] Initializing channel (%s) from UE %d to ru %d\n", "AWGN",UE_id, ru_id);
+
+
+ sim.UE2RU[UE_id][ru_id][CC_id] =
+ new_channel_desc_scm(PHY_vars_UE_g[UE_id][CC_id]->frame_parms.nb_antennas_tx,
+ RC.ru[ru_id]->nb_rx,
+ AWGN,
+ N_RB2sampling_rate(RC.ru[ru_id]->frame_parms.N_RB_UL),
+ N_RB2channel_bandwidth(RC.ru[ru_id]->frame_parms.N_RB_UL),
+ 0.0,
+ 0,
+ 0);
+
+ random_channel(sim.UE2RU[UE_id][ru_id][CC_id],0);
+
+ // to make channel reciprocal uncomment following line instead of previous. However this only works for SISO at the moment. For MIMO the channel would need to be transposed.
+ //UE2RU[UE_id][ru_id] = RU2UE[ru_id][UE_id];
+
+ AssertFatal(sim.RU2UE[ru_id][UE_id][CC_id]!=NULL,"RU2UE[%d][%d][%d] is null\n",ru_id,UE_id,CC_id);
+ AssertFatal(sim.UE2RU[UE_id][ru_id][CC_id]!=NULL,"UE2RU[%d][%d][%d] is null\n",UE_id,ru_id,CC_id);
+ //pathloss: -132.24 dBm/15kHz RE + target SNR - eNB TX power per RE
+ if (ru_id == (UE_id % RC.nb_RU)) {
+ sim.RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
+ sim.UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
+ } else {
+ sim.RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
+ sim.UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
+ }
+
+ LOG_I(OCM,"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)\n",ru_id,UE_id,CC_id,
+ sim.RU2UE[ru_id][UE_id][CC_id]->path_loss_dB,
+ RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower,snr_dB);
+
+
+ }
+ }
+ }
+}
+
+
+void update_ocm(double snr_dB,double sinr_dB)
+{
+ module_id_t UE_id, ru_id;
+ int CC_id;
+
+
+ for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) {
+ for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
+ for (CC_id=0; CC_idpath_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
+ sim.UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
+ } else {
+ sim.RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
+ sim.UE2RU[UE_id][ru_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
+ }
+
+ LOG_D(OCM,"Path loss from eNB %d to UE %d (CCid %d)=> %f dB (eNB TX %d, SNR %f)\n",ru_id,UE_id,CC_id,
+ sim.RU2UE[ru_id][UE_id][CC_id]->path_loss_dB,
+ RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower,snr_dB);
+
+ }
+ }
+ }
+}
+
+
+void init_channel_vars(void)
+{
+
+ int i;
+
+ memset(sim.RU_output_mask,0,sizeof(int)*NUMBER_OF_UE_MAX);
+ for (i=0;iframe_parms,(sf+4)%10)!=SF_UL) ? sim.subframe_ru_mask : ((1<frame_parms.frame_type == FDD || subframe_select(&RC.ru[0]->frame_parms,(sf+4)%10)!=SF_DL) ? sim.subframe_UE_mask : ((1<frame_parms.samples_per_tti;
+ LOG_D(SIM,"RU %d/%d: TS %"PRIi64"\n",ru_id,CC_id,sim.current_ru_rx_timestamp[ru_id][CC_id]);
+ }
+ for (int UE_inst = 0; UE_instframe_parms.samples_per_tti;
+ LOG_D(SIM,"UE %d/%d: TS %"PRIi64"\n",UE_inst,CC_id,sim.current_UE_rx_timestamp[UE_inst][CC_id]);
+ }
+ if (oai_exit == 1) return((void*)NULL);
+ }
+ }
+
+ return((void*)NULL);
+}
diff --git a/targets/SIMU/USER/cor_SF_sim.h b/targets/RT/USER/rfsim.h
similarity index 74%
rename from targets/SIMU/USER/cor_SF_sim.h
rename to targets/RT/USER/rfsim.h
index 35b75564e8..c5361724c9 100644
--- a/targets/SIMU/USER/cor_SF_sim.h
+++ b/targets/RT/USER/rfsim.h
@@ -18,14 +18,19 @@
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
+#ifndef __RFSIM__H__
+#define __RFSIM__H__
+#include "lte-softmodem.h"
+#include "openair1/SIMULATION/TOOLS/sim.h"
+#include "platform_constants.h"
+#include "common/ran_context.h"
+#include "PHY/defs_UE.h"
+#include "PHY/defs_eNB.h"
-#include
-#include
-#include
-//#include
-#include
-#include
+void init_ocm(double snr_dB,double sinr_dB);
-double **init_SF (int map_length, int map_height, double decor_dist, double variance); //,double decor,double var);
-double **createMat (int nbRow, int nbCol);
-void destroyMat(double **mat1,int row,int col);
+void update_ocm(double snr_dB,double sinr_dB);
+
+void init_channel_vars(void);
+
+#endif
diff --git a/targets/RT/USER/rru_if4p5_simulator.gtkw b/targets/RT/USER/rru_if4p5_simulator.gtkw
new file mode 100644
index 0000000000..40ed3b5c7d
--- /dev/null
+++ b/targets/RT/USER/rru_if4p5_simulator.gtkw
@@ -0,0 +1,42 @@
+[*]
+[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
+[*] Tue Jun 5 12:44:02 2018
+[*]
+[dumpfile] "/tmp/openair_dump_UE.vcd"
+[dumpfile_mtime] "Tue Jun 5 12:38:07 2018"
+[dumpfile_size] 21826387
+[savefile] "/home/knopp/oai/openairinterface5g/targets/RT/USER/rru_if4p5_simulator.gtkw"
+[timestart] 6591570000
+[size] 1301 716
+[pos] 309 0
+*-22.793451 29983948856 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
+[sst_width] 312
+[signals_width] 262
+[sst_expanded] 1
+[sst_vpaned_height] 294
+@29
+functions.UE_trx_read
+@28
+functions.trx_read
+functions.trx_write
+@24
+variables.trx_write_flags[63:0]
+@28
+functions.trx_write_if
+functions.send_if4
+functions.trx_read_if
+functions.recv_if4
+@24
+variables.trx_ts[63:0]
+variables.trx_tst[63:0]
+variables.frame_number_RX0_RU[63:0]
+variables.subframe_number_RX0_RU[63:0]
+variables.frame_number_TX0_RU[63:0]
+variables.subframe_number_TX0_RU[63:0]
+@28
+functions.do_DL_sig
+functions.do_UL_sig
+functions.phy_procedures_ru_feprx0
+functions.phy_procedures_ru_feptx_ofdm0
+[pattern_trace] 1
+[pattern_trace] 0
diff --git a/targets/RT/USER/rru_if4p5_usrp.gtkw b/targets/RT/USER/rru_if4p5_usrp.gtkw
index 1a13e6d15f..93bac49812 100644
--- a/targets/RT/USER/rru_if4p5_usrp.gtkw
+++ b/targets/RT/USER/rru_if4p5_usrp.gtkw
@@ -1,23 +1,23 @@
[*]
[*] GTKWave Analyzer v3.3.58 (w)1999-2014 BSI
-[*] Sun Jan 15 07:26:50 2017
+[*] Tue Jun 5 09:36:17 2018
[*]
-[dumpfile] "/tmp/openair_dump_eNB.vcd"
-[dumpfile_mtime] "Sun Jan 15 07:04:19 2017"
-[dumpfile_size] 18140627
-[savefile] "/home/uprru1/oai/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw"
-[timestart] 29977510000
+[dumpfile] "/tmp/openair_dump_UE.vcd"
+[dumpfile_mtime] "Tue Jun 5 09:22:52 2018"
+[dumpfile_size] 23057775
+[savefile] "/home/knopp/oai/openairinterface5g/targets/RT/USER/rru_if4p5_usrp.gtkw"
+[timestart] 25050480000
[size] 1301 716
[pos] 309 0
*-21.793451 29983948856 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-[sst_width] 284
+[sst_width] 312
[signals_width] 262
[sst_expanded] 1
[sst_vpaned_height] 294
@28
functions.trx_read
functions.trx_write
-@25
+@24
variables.trx_write_flags[63:0]
@28
functions.trx_write_if
@@ -27,23 +27,10 @@ functions.recv_if4
@24
variables.trx_ts[63:0]
variables.trx_tst[63:0]
-@28
-functions.eNB_thread_rxtx0
-@24
-variables.frame_number_RX0_eNB[63:0]
-variables.subframe_number_RX0_eNB[63:0]
-variables.frame_number_TX0_eNB[63:0]
-variables.subframe_number_TX0_eNB[63:0]
-@28
-functions.eNB_thread_rxtx1
-@24
-variables.frame_number_RX1_eNB[63:0]
-variables.subframe_number_RX1_eNB[63:0]
-variables.frame_number_TX1_eNB[63:0]
-variables.subframe_number_TX1_eNB[63:0]
-@28
-functions.phy_eNB_ofdm_mod_l
-functions.phy_eNB_slot_fep
-functions.phy_enb_prach_rx
+variables.frame_number_RX0_RU[63:0]
+variables.subframe_number_RX0_RU[63:0]
+variables.frame_number_TX0_RU[63:0]
+@25
+variables.subframe_number_TX0_RU[63:0]
[pattern_trace] 1
[pattern_trace] 0
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE/Makefile b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE/Makefile
deleted file mode 100644
index c8ea4ea5c3..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-all: oaisim nasmesh
-
-oaisim:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && make LINK_ENB_PDCP_TO_IP_DRIVER=1 -j2 )
-nasmesh:
- (cd $(OPENAIR2_DIR) && make nasmesh_netlink.ko)
- (cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL/ && make)
-
-one_eNB_one_UE: oaisim nasmesh
-
-userclean: clean oaisim nasmesh
-
-clean:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && make cleanall)
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE/start_enb b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE/start_enb
deleted file mode 100755
index 9274c93ca9..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE/start_enb
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/bin/sh
-
-sudo kill -9 `ps -ef | grep oaisim | awk '{print $2}'`
-sudo pkill oaisim
-
-# set params
-EMULATION_DEV_INTERFACE="eth0"
-EMULATION_MULTICAST_GROUP=1
-EMULATION_LOG_LEVEL=7 # 3 = error, 5 info, 7 debug, trace= 9
-#OAI_LOCAL_ADDRESS="10.0.1.1"
-#OAI_REMOTE_ADDRESS="10.0.1.2"
-#EMULATION_DEV_ADDRESS= `hostname -I cut -f1 -d' '`
-EMULATION_DEV_ADDRESS=`LC_ALL=C ifconfig $EMULATION_DEV_INTERFACE | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'`
-
-echo "Setting Emulation Interface to $EMULATION_DEV_INTERFACE ($EMULATION_DEV_ADDRESS)"
-
-#funcs
-test_install_package() {
- # usage: test_install_package package_name
- if [ $# -eq 1 ]; then
- dpkg -s "$1" > /dev/null 2>&1 && {
- echo "$1 is installed."
- } || {
- echo "$1 is not installed."
- sudo apt-get install --assume-yes $1
- }
- fi
-}
-
-#PGM provide a reliable mutlicast data transport"
-test_install_package libpgm-dev
-test_install_package libpgm-5.1-0
-
-PGM_FOUND=`dpkg-query -W -f='${Status}' libpgm-dev 2>/dev/null | grep -c "ok installed" `
-
-if [ $PGM_FOUND = 1 ]; then
- PGM=-D$EMULATION_DEV_ADDRESS
-else
- PGM=" "
-fi
-
-# check the compilation
-echo "Bringup eNB interface"
-sudo rmmod nasmesh
-make all
-sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
-
-#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
-#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
-echo "Make sure that eth0 is the interface between the machines, otherwise change"
-sudo ip route add 239.0.0.160/28 dev $EMULATION_DEV_INTERFACE
-
-# when running as a suduoers, the following lines are not needed
-#sudo ifconfig oai0 $OAI_LOCAL_ADDRESS netmask 255.255.255.0 broadcast 10.0.1.255
-#echo "applying DRB classification"
-#echo "$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s $OAI_LOCAL_ADDRESS -t $OAI_REMOTE_ADDRESS -r 1"
-#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s $OAI_LOCAL_ADDRESS -t $OAI_REMOTE_ADDRESS -r 1
-
-if [ -z $1 ]; then
-echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM > /dev/null"
-sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM > /dev/null
-else
- if [ $1 = "all" ]; then
- echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM"
- sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM
- else
- echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM | grep -i $1"
- sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM | grep -i $1
- fi
-fi
-echo "End"
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE/start_ue b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE/start_ue
deleted file mode 100755
index b014717b31..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE/start_ue
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-
-sudo kill -9 `ps -ef | grep oaisim | awk '{print $2}'`
-sudo pkill oaisim
-
-# set params
-EMULATION_DEV_INTERFACE="eth0"
-EMULATION_MULTICAST_GROUP=1
-EMULATION_LOG_LEVEL=7 # 3 = error, 5 info, 7 debug, trace= 9
-#OAI_LOCAL_ADDRESS="10.0.1.2"
-#OAI_REMOTE_ADDRESS="10.0.1.1"
-#EMULATION_DEV_ADDRESS= `hostname -I cut -f1 -d' '`
-EMULATION_DEV_ADDRESS=`LC_ALL=C ifconfig $EMULATION_DEV_INTERFACE | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'`
-
-echo "Setting Emulation Interface to $EMULATION_DEV_INTERFACE ($EMULATION_DEV_ADDRESS)"
-
-#funcs
-test_install_package() {
- # usage: test_install_package package_name
- if [ $# -eq 1 ]; then
- dpkg -s "$1" > /dev/null 2>&1 && {
- echo "$1 is installed."
- } || {
- echo "$1 is not installed."
- sudo apt-get install --assume-yes $1
- }
- fi
-}
-#PGM provide a reliable mutlicast data transport"
-test_install_package libpgm-dev
-test_install_package libpgm-5.1-0
-PGM_FOUND=`dpkg-query -W -f='${Status}' libpgm-dev 2>/dev/null | grep -c "ok installed" `
-if [ $PGM_FOUND = 1 ]; then
- PGM=-D$EMULATION_DEV_ADDRESS
-else
- PGM=" "
-fi
-
-echo "Building"
-sudo rmmod nasmesh
-make nasmesh all
-sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
-
-
-#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
-#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
-echo "Make sure that eth0 is the interface between the machines, otherwise change"
-sudo ip route add 239.0.0.160/28 dev $EMULATION_DEV_INTERFACE
-
-# when running as a suduoers, the following lines are not needed
-#sudo ifconfig oai0 $OAI_LOCAL_ADDRES netmask 255.255.255.0 broadcast 10.0.1.255
-#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s $OAI_LOCAL_ADDRESS -t $OAI_REMOTE_ADDRESS -r 1
-
-# running oaisim
-if [ -z $1 ]; then
-echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM > /dev/null"
-sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM > /dev/null
-else
- if [ $1 = "all" ]; then
- echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM "
- sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM
- else
- echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM | grep -i $1"
- sudo -E $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g$EMULATION_MULTICAST_GROUP -l$EMULATION_LOG_LEVEL $PGM | grep -i $1
- fi
-fi
-echo "End"
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/AT_serial_bouchon.py b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/AT_serial_bouchon.py
deleted file mode 100755
index 4c1a505542..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/AT_serial_bouchon.py
+++ /dev/null
@@ -1,209 +0,0 @@
-#!/usr/bin/python
-
-import os, sys, warnings
-import serial
-
-def sendToTTY(lineP):
- sys.stdout.write("\nSend:\n" + lineP+"\n")
- g_ser.write(lineP)
- g_ser.flush()
-
-
-
-g_ser = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)
-
-buffer = ''
-while True:
- buffer += g_ser.read(1)
- #sys.stdout.write("buffer is now:\n" + buffer+"\n")
- buffer = buffer.lstrip('\r')
- if '\r' in buffer:
- at_received, buffer = buffer.split('\r')[-2:]
-
- at_received = at_received.strip('\n')
- at_received = at_received.strip('\r')
-
- if at_received == '\n' or at_received == '' or at_received == '\r':
- break
- else:
- sys.stdout.write("Receive stripped:\n" + at_received+"\n")
- # Q0 = enable codes
- # Q1 = disable codes
- if at_received == 'ATE0Q0V1':
- sendToTTY('\rOK\r')
-
- # ATS0, Automatic Answer
- # This S-parameter controls the automatic answering feature of the modem
- # 0 automatic answering is disabled
- # 1 - 255 enable automatic answering on the ring number specified
- # here value received is 0
- elif at_received.startswith('ATS0='):
- sendToTTY('\rOK\r')
-
- # AT+CMEEReport mobile equipment error
- #0 Disable +CME ERROR result code. Use ERROR instead.
- #1 Enable +CME ERROR result code and use numeric values
- #2 Enable +CME ERROR result code and use verbose values
- # here value received is 1
- elif at_received.startswith('AT+CMEE='):
- sendToTTY('\rOK\r')
-
- # Network registration events
- # AT+CREGNetwork registration (ver. 2)
- # Description:
- # Controls the presentation of an unsolicited result code +CREG :
- # when =1 and there is a change in the ME network registration status or
- # code +CREG: [,,] when =2 and there is a change of thenetwork cell.
- # Read command returns the status of result code presentation and an integer ,
- # which shows whether the network has currently indicated the registration of the ME.
- # Location information elements and are returned only when =2 and ME
- # is registered in the network.
- # :
- # 0 Disable network registration unsolicited result code. Default value
- # 1 Enable network registration unsolicited result code,+CREG:
- # 2 Enable network registration and location information unsolicited result code, +CREG:[,,]
- # :
- # 0 not registered new operator to registered and not searching
- # 1 registered, home network
- # 2 not registered, currently searching a new operator to register with
- # 3 registration denied
- # 4 unknown
- # 5 registered, roaming
- elif at_received == 'AT+CREG=2':
- sendToTTY('\rOK\r')
- sendToTTY('+CREG: 1,00C3,01021A02 \r')
-
- elif at_received == 'AT+CREG=1':
- sendToTTY('\rOK\r')
- sendToTTY('+CREG: 1\r')
-
- elif at_received == 'AT+CREG?':
- sendToTTY('+CREG: 1,00C3,01021A02\r\nOK\r')
-
-
-
- # GPRS registration events
- # +CGREGNetwork registration reporting
- # Packet domain network registration status AT+CGPADDRShow PDP address
- # Description:
- # Controls the presentation of the unsolicited result code +CGREG:
- # when ='1' and there is a change in the ME GPRS network registration status or
- # +CGREG: [,,] when ='2' and there is achange of the network cell.
- # ---
- # Note: If the GPRS MT also supports circuit mode services,
- # AT+CREG and the +CREG result code apply to the registration status and location
- # information for those services. The read command returns the status of result
- # code presentation and an integer which shows whether the network has
- # currently indicated the registration of the ME.
- # Location information elements and are returned only when =2
- # and ME is registered in the network.
- elif at_received == 'AT+CGREG=1':
- sendToTTY('\rOK\r')
- sendToTTY('+CGREG: 1\r')
-
- elif at_received == 'AT+CGREG?':
- sendToTTY('+CGREG: 0,1\r\nOK\r')
-
-
-
- # Call Waiting notifications
- elif at_received == 'AT+CCWA=1':
- sendToTTY('\rOK\r')
-
- # Alternating voice/data off
- elif at_received == 'AT+CMOD=0':
- sendToTTY('\rOK\r')
-
- # +CSSU unsolicited supp service notifications
- elif at_received == 'AT+CSSN=0,1':
- sendToTTY('\rOK\r')
-
- # no connected at_received identification
- elif at_received == 'AT+COLP=0':
- sendToTTY('+COLP:0\r\nOK\r')
-
- # HEX character set
- # AT+CSCSSelect TE character set (ver. 3)
- elif at_received == 'AT+CSCS=\"HEX\"':
- sendToTTY('\rOK\r')
-
- # USSD unsolicited
- # AT+CUSD Unstructured supplementary service data (ver. 2)
- #
- # 0 Disable result code presentation in the TA.Defaultvalue
- # 1 Enable result code presentation in the TA
- # 2 Terminate (abort) USSD dialogue. This value is not applicable to the read command response. Notsupported
- elif at_received == 'AT+CUSD=1':
- sendToTTY('\rOK\r')
-
- # Enable +CGEV GPRS event notifications, but don't buffer
- # AT+CGEREPPacket domain event reporting (ver. 1)
- elif at_received == 'AT+CGEREP=1,0':
- sendToTTY('\rOK\r')
-
- # SMS PDU mode
- # AT+CMGF Message format (ver. 1)
- elif at_received == 'AT+CMGF=0':
- sendToTTY('\rOK\r')
-
- elif at_received == 'AT+CPIN?':
- sendToTTY('\r+CPIN: READY\r\nOK\r')
- #sendToTTY('\rOK\r')
-
- # AT+CFUNSet phone functionality (ver. 2)
- # 0 Minimum functionality, that is, the phone is turnedoff. Default value
- # 1 Full functionality, that is, the phone is turned on
- # 2 Disable phone transmit RF circuits only. Notsupported
- # 3 Disable phone receive RF circuits only. Notsupported
- # 4 Disable phone transmit and receive RF circuits.Note: This is often referred to as "flight mode"
- # 5 GSM only (WCDMA radio off)
- # 6 WCDMA only (GSM radio off)
- elif at_received == 'AT+CFUN?':
- sendToTTY('+CFUN: 1\r\nOK\r')
-
- elif at_received == 'AT+CFUN=1':
- sendToTTY('\rOK\r')
-
- # AT+CLCCList current calls
- # Description:
- # Returns the list of current calls. If command succeeds but no calls areavailable, no information response is sent to TE
- elif at_received == 'AT+CLCC':
- sendToTTY('+CLCC: \r\nOK\r')
-
- # AT+COPSOperator selection (ver. 2)
- # AT+COPS=[[,[,[,AcT]]]]
- #
- # Description
- # 0 Automatic ( field is ignored.) Default value
- # 1 Manual ( field will be present)
- # 2 Deregister from network. Not supported
- # 3 Set only (for read command +COPS?), donot attempt registration/deregistration ( field is ignored).
- # This value is not applicable in readcommand response
- # 4 Manual/automatic ( field will be present). Ifmanual selection fails, automatic mode (=0)is entered
- elif at_received == 'AT+COPS=3,0;+COPS?;+COPS=3,1;+COPS?;+COPS=3,2;+COPS?':
- sendToTTY('+COPS: 0,0, \"Free - Mobile\"\r\n+COPS: 0,1, \"Free\"\r\n+COPS: 0,2, \"310170\"\r\nOK\r')
-
- elif at_received == 'AT+COPS?':
- #sendToTTY('+COPS: 0,0, \"Free - Mobile\"\r\n+COPS: 0,1, \"Free\"\r\n+COPS: 0,2, \"310170\"\r\nOK\r')
- sendToTTY('+COPS: 0,0, \"Free - Mobile\"\r\nOK\r')
-
- elif at_received == 'AT+COPS=0':
- #sendToTTY('+COPS: 0,0, \"Free - Mobile\"\r\n+COPS: 0,1, \"Free\"\r\n+COPS: 0,2, \"310170\"\r\nOK\r')
- sendToTTY('+COPS: 0,0, \"Free - Mobile\"\r\nOK\r')
-
- # IMEI
- elif at_received == 'AT+CGSN':
- sendToTTY('+CGSN:534500314160207\r\nOK\r')
-
- # Signal quality (ver.1)
- # Returns received signal strength indication and channel bit errorrate from the phone.
- elif at_received == 'AT+CSQ':
- #31,7
- sendToTTY('+CSQ:8,7\r\nOK\r')
-
-
-
- else:
- sendToTTY('\rOK\r')
-
-
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/Makefile b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/Makefile
deleted file mode 100755
index c89992e7e4..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-all: oaisim naslite_netlink_ether
-
-oaisim:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && make oaisim OAI_NW_DRIVER_TYPE_ETHERNET=1 PDCP_USE_NETLINK=1)
-naslite_netlink_ether:
- (cd $(OPENAIR2_DIR) && make naslite_netlink_ether.ko)
- (cd $(OPENAIR2_DIR)/NAS/DRIVER/LITE/RB_TOOL/ && make)
-
-remserial:
- (cd $(OPENAIR3_DIR)/UTILS/REMSERIAL-1.4.UDP && make all)
- (cp -upv $(OPENAIR3_DIR)/UTILS/REMSERIAL-1.4.UDP/remserial /usr/bin/remserial.udp)
-
-one_eNB_one_UE: oaisim naslite_netlink_ether
-
-userclean: clean oaisim naslite_netlink_ether
-
-clean:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && make clean)
- (cd $(OPENAIR2_DIR)/NAS/DRIVER/LITE && make clean)
- (cd $(OPENAIR2_DIR) && make clean)
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_enb b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_enb
deleted file mode 100755
index 010917b7cf..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_enb
+++ /dev/null
@@ -1,86 +0,0 @@
-#!/bin/sh
-echo "Bringup eNB interface"
-
-ip link set oai0 down
-rmmod nasmesh
-make naslite_netlink_ether oaisim
-insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/nasmesh.ko nas_IMEI=3,9,1,8,3,6,6,2,0,0,0,0,0,0
-
-#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
-#route add -net 224.0.0.0 netmask 240.0.0.0 dev eth2
-#ip addr add dev eth1 192.168.14.145/24 broadcast 192.168.14.255
-ip link set oai0 broadcast ff:ff:ff:ff:ff:ff
-#ip route add 192.168.14.0/24 dev eth2
-ip route add 224.0.0.160/28 dev eth1
-ip link set oai0 up
-sleep 1
-
-EXTIF="eth0"
-INTIF="oai0"
-IPTABLES=/sbin/iptables
-#IPTABLES=/usr/local/sbin/iptables
-DEPMOD=/sbin/depmod
-MODPROBE=/sbin/modprobe
-echo " External Interface: $EXTIF"
-echo " Internal Interface: $INTIF"
-echo "----------------------------------------------------------------------"
-echo -en "ip_tables, "
-$MODPROBE ip_tables
-echo -en "ip_conntrack, "
-$MODPROBE ip_conntrack
-echo -en "ip_conntrack_irc, "
-$MODPROBE ip_conntrack_irc
-echo -en "iptable_nat, "
-$MODPROBE iptable_nat
-echo -e " Done loading modules.\n"
-echo " Enabling forwarding.."
-echo "1" > /proc/sys/net/ipv4/ip_forward
-echo " Enabling DynamicAddr.."
-echo "1" > /proc/sys/net/ipv4/ip_dynaddr
-echo " Clearing any existing rules and setting default policy.."
-$IPTABLES -P INPUT ACCEPT
-$IPTABLES -F INPUT
-$IPTABLES -P OUTPUT ACCEPT
-$IPTABLES -F OUTPUT
-$IPTABLES -P FORWARD DROP
-$IPTABLES -F FORWARD
-$IPTABLES -t nat -F
-$IPTABLES -t mangle -F
-$IPTABLES -t filter -F
-echo " FWD: Allow all connections OUT and only existing and related ones IN"
-$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
-$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
-#$IPTABLES -A FORWARD -j LOG
-echo " Enabling SNAT (MASQUERADE) functionality on $EXTIF"
-$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
-
-
-
-ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
-sleep 1
-#$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 3
-ip addr add dev oai0 2001:1::1/64
-# -a -> Add RB
-# -d -> Delete RB
-# -cxx -> lcr (uid of a cx_entity)
-# -ixx -> instance
-# -zxx -> dscp
-# -fxxx -> classref (uid of a classifier entry) if fn is used , fn is used for send classifier and n+1 for receive classifier
-# -sxxx -> source ipv4 address
-# -txxx -> destination ipv4 address
-# -x -> source ipv6 address
-# -y -> destination ipv6 address
-# -r -> radio bearer id
-echo "rb_tool -a -c0 -i0 -f0 -z0 -x 2001:1::1/128 -y 2001:1::2/128 -r 1"
-$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -i0 -f0 -z0 -x 2001:1::1/128 -y 2001:1::2/128 -r 1
-
-echo "rb_tool -a -c0 -i0 -f2 -z63 -s 10.0.1.1/32 -t 10.0.1.2/32 -r 1"
-$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -i0 -f2 -z64 -s 10.0.1.1/32 -t 10.0.1.2/32 -r 1
-
-echo "rb_tool -a -c0 -i0 -f2 -z63 -s 10.0.1.1/32 -t 10.0.1.2/32 -r 1"
-$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -i0 -f4 -z64 -s 0.0.0.0/32 -t 0.0.0.0/32 -r 1
-
-echo "to see eNB stats, please run : watch_enb script"
-echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g3 -l3 > /dev/null"
-nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g3 -l3 | grep RLC
-echo "End"
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_enb_v2 b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_enb_v2
deleted file mode 100755
index 5a03ff1385..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_enb_v2
+++ /dev/null
@@ -1,320 +0,0 @@
-#!/bin/bash
-#
-#------------------------------------------------
-MAKE_IP_DRIVER_TARGET="naslite_netlink_ether"
-MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim"
-IP_DRIVER_NAME=oai_nw_drv
-###########################################################
-# CONFIGURE OPTIONS
-EMULIF="eth1"
-LTEIF="oai0"
-EXTIF="eth0"
-INTIF=$LTEIF
-#----------------------------------------------------------
-LTE_NETWORK_CIDR="10.0.1.0/24"
-ENB_IPv4="10.0.1.1"
-ENB_IPv6="2001:1::1"
-ENB_IPv6_CIDR=$ENB_IPv6"/64"
-ENB_IPv4_CIDR=$ENB_IPv4"/24"
-ENB_IF_ID="3,9,1,8,3,6,6,2,0,0,0,0,0,0"
-#----------------------------------------------------------
-UE_IPv4="10.0.1.2"
-UE_IPv6="2001:1::2"
-UE_IPv6_CIDR=$UE_IPv6"/64"
-UE_IPv4_CIDR=$UE_IPv4"/24"
-#----------------------------------------------------------
-
-# +-------+ +-------+
-# | eNB | EMULIF | UE |
-# | +---------------------+ |
-# | | | |
-# | | | |
-# | | | |
-# | | | |
-# | | | |
-# | | | |
-# | | LTEIF | |
-# | +.................... + |
-# | |ENB_IPv4 UE_IPv4_CIDR| |
-# +-------+ LTE link over +-------+
-# UDP over ethernet
-###########################################################
-IPTABLES=/sbin/iptables
-THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
-declare -x OPENAIR_DIR=""
-declare -x OPENAIR1_DIR=""
-declare -x OPENAIR2_DIR=""
-declare -x OPENAIR3_DIR=""
-declare -x OPENAIR_TARGETS=""
-###########################################################
-
-
-black='\E[30m'
-red='\E[31m'
-green='\E[32m'
-yellow='\E[33m'
-blue='\E[34m'
-magenta='\E[35m'
-cyan='\E[36m'
-white='\E[37m'
-
-ROOT_UID=0
-E_NOTROOT=67
-
-
-cecho() # Color-echo
- # arg1 = message
- # arg2 = color
-{
-local default_msg="No Message."
- message=${1:-$default_msg}
- color=${2:-$black}
- echo -e "$color"
- echo -n "$message"
- tput sgr0
- echo
- return
-}
-
-echo_error() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $red
-}
-
-echo_warning() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $yellow
-}
-
-echo_success() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $green
-}
-
-set_openair() {
- path=`pwd`
- declare -i length_path
- declare -i index
- length_path=${#path}
-
- index=`echo $path | grep -b -o 'targets' | cut -d: -f1`
- #echo ${path%$token*}
- if [[ $index -lt $length_path && index -gt 0 ]]
- then
- declare -x OPENAIR_DIR
- index=`expr $index - 1`
- openair_path=`echo $path | cut -c1-$index`
- #openair_path=`echo ${path:0:$index}`
- export OPENAIR_DIR=$openair_path
- export OPENAIR1_DIR=$openair_path/openair1
- export OPENAIR2_DIR=$openair_path/openair2
- export OPENAIR3_DIR=$openair_path/openair3
- export OPENAIR_TARGETS=$openair_path/targets
- return 0
- fi
- return -1
-}
-
-bash_exec() {
- output=$($1 2>&1)
- result=$?
- if [ $result -eq 0 ]
- then
- echo_success "$1"
- else
- echo_error "$1: $output"
- fi
-}
-
-wait_process_started () {
- if [ -z "$1" ]
- then
- echo_error "WAITING FOR PROCESS START: NO PROCESS"
- return 1
- fi
- ps -C $1 > /dev/null 2>&1
- while [ $? -ne 0 ]; do
- echo_warning "WAITING FOR $1 START"
- sleep 2
- ps -C $1 > /dev/null 2>&1
- done
- echo_success "PROCESS $1 STARTED"
- return 0
-}
-
-assert() {
- # If condition false
- # exit from script with error message
- E_PARAM_ERR=98
- E_PARAM_FAILED=99
-
- if [ -z "$2" ] # Not enought parameters passed.
- then
- return $E_PARAM_ERR
- fi
-
- lineno=$2
- if [ ! $1 ]
- then
- echo "Assertion failed: \"$1\""
- echo "File \"$0\", line $lineno"
- exit $E_ASSERT_FAILED
- fi
-}
-
-#bash_exec "set_openair"
-set_openair
-cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
-cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
-cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
-cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
-cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
-
-
-echo "Bringup UE interface"
-bash_exec "rmmod $IP_DRIVER_NAME"
-cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET....." $green
-bash_exec "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET"
-bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/$IP_DRIVER_NAME.ko oai_nw_drv_IMEI=$ENB_IF_ID"
-
-
-echo " Enabling proxy ARP.."
-bash_exec "sysctl -w net.ipv4.conf.all.proxy_arp=1"
-assert "`sysctl -n net.ipv4.conf.all.proxy_arp` -eq 1" $LINENO
-
-echo " Enabling ipv4 forwarding.."
-bash_exec "sysctl -w net.ipv4.ip_forward=1"
-assert "`sysctl -n net.ipv4.ip_forward` -eq 1" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.all.forwarding=1"
-assert "`sysctl -n net.ipv4.conf.all.forwarding` -eq 1" $LINENO
-
-echo " Enabling ipv6 forwarding.."
-bash_exec "sysctl -w net.ipv6.conf.all.forwarding=1"
-assert "`sysctl -n net.ipv6.conf.all.forwarding` -eq 1" $LINENO
-
-echo " Enabling DynamicAddr.."
-bash_exec "sysctl -w net.ipv4.ip_dynaddr=1"
-assert " `sysctl -n net.ipv4.ip_dynaddr` -eq 1" $LINENO
-
-bash_exec "ip route flush cache"
-bash_exec "ip route add 239.0.0.160/28 dev $EMULIF"
-
-bash_exec "ip link set $LTEIF broadcast ff:ff:ff:ff:ff:ff"
-bash_exec "ip link set $LTEIF up"
-sleep 1
-
-
-assert " -x $IPTABLES " $LINENO
-
-bash_exec "$IPTABLES -P INPUT ACCEPT"
-bash_exec "$IPTABLES -F INPUT"
-bash_exec "$IPTABLES -P OUTPUT ACCEPT"
-bash_exec "$IPTABLES -F OUTPUT"
-bash_exec "$IPTABLES -P FORWARD DROP"
-bash_exec "$IPTABLES -F FORWARD"
-bash_exec "$IPTABLES -t nat -F"
-bash_exec "$IPTABLES -t mangle -F"
-bash_exec "$IPTABLES -t filter -F"
-
-
-
-echo " External Interface: $EXTIF"
-echo " Internal Interface: $INTIF"
-
-bash_exec "modprobe ip_tables"
-bash_exec "modprobe ip_conntrack"
-bash_exec "modprobe ip_conntrack_ftp"
-bash_exec "modprobe nf_conntrack_h323"
-bash_exec "modprobe nf_conntrack_irc"
-bash_exec "modprobe nf_conntrack_pptp"
-bash_exec "modprobe nf_conntrack_proto_gre"
-bash_exec "modprobe nf_conntrack_proto_sctp"
-bash_exec "modprobe nf_conntrack_tftp"
-bash_exec "modprobe nf_conntrack_sip"
-bash_exec "modprobe iptable_nat"
-bash_exec "modprobe x_tables"
-
-
-bash_exec "sysctl -w net.ipv4.conf.all.log_martians=1"
-assert " `sysctl -n net.ipv4.conf.all.log_martians` -eq 1" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.$LTEIF.log_martians=1"
-assert " `sysctl -n net.ipv4.conf.$LTEIF.log_martians` -eq 1" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.$EXTIF.log_martians=1"
-assert " `sysctl -n net.ipv4.conf.$EXTIF.log_martians` -eq 1" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.$INTIF.log_martians=1"
-assert " `sysctl -n net.ipv4.conf.$INTIF.log_martians` -eq 1" $LINENO
-
-echo " Disabling reverse path filtering"
-bash_exec "sysctl -w net.ipv4.conf.all.rp_filter=0"
-assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.$LTEIF.rp_filter=0"
-assert " `sysctl -n net.ipv4.conf.$LTEIF.rp_filter` -eq 0" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.$EXTIF.rp_filter=0"
-assert " `sysctl -n net.ipv4.conf.$EXTIF.rp_filter` -eq 0" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.$INTIF.rp_filter=0"
-assert " `sysctl -n net.ipv4.conf.$INTIF.rp_filter` -eq 0" $LINENO
-
-
-bash_exec "$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT"
-bash_exec "$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT"
-bash_exec "$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE"
-
-bash_exec "ip route flush cache"
-
-
-bash_exec "ip addr add dev $LTEIF $ENB_IPv4_CIDR"
-sleep 1
-bash_exec "ip addr add dev $LTEIF $ENB_IPv6_CIDR"
-sleep 1
-
-# -a -> Add RB
-# -d -> Delete RB
-# -cxx -> lcr
-# -ixx -> instance
-# -zxx -> dscp
-# -fxxx -> classref (uid of a classifier entry) if fn is used , fn is used for send classifier and n+1 for receive classifier
-# -sxxx -> source ipv4 address
-# -txxx -> destination ipv4 address
-# -x -> source ipv6 address
-# -y -> destination ipv6 address
-# -r -> radio bearer id
-bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f0 -i0 -z0 -x $ENB_IPv6 -y $UE_IPv6 -r 1"
-bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f2 -i0 -z64 -s $ENB_IPv4/32 -t $UE_IPv4/32 -r 1"
-bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f4 -i0 -z64 -s 0.0.0.0/32 -t 0.0.0.0/32 -r 1"
-sleep 1
-
-echo "#####################################################################"
-echo "iptables -t nat -nvL"
-echo "---------------------------------------------------------------------"
-iptables -t nat -nvL
-echo "#####################################################################"
-echo "ip route show table main"
-echo "---------------------------------------------------------------------"
-ip route show table main
-
-echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g3 -l3 > /dev/null"
-nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p2 -g3 -l3 > /dev/null
-
-
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_ue b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_ue
deleted file mode 100755
index 12644d7533..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_ue
+++ /dev/null
@@ -1,259 +0,0 @@
-#!/bin/bash
-#
-#------------------------------------------------
-MAKE_IP_DRIVER_TARGET="naslite_netlink_ether"
-MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim"
-IP_DRIVER_NAME=oai_nw_drv
-###########################################################
-# CONFIGURE OPTIONS
-EMULIF="eth0"
-LTEIF="oai0"
-
-#----------------------------------------------------------
-LTE_NETWORK_CIDR="10.0.1.0/24"
-ENB_IPv4="10.0.1.1"
-ENB_IPv6="2001:1::1"
-#----------------------------------------------------------
-UE_IPv4="10.0.1.2"
-UE_IPv6="2001:1::2"
-UE_IPv6_CIDR=$UE_IPv6"/64"
-UE_IPv4_CIDR=$UE_IPv4"/24"
-UE_IMEI="3,9,1,8,3,6,7,3,0,0,0,0,0,0"
-#----------------------------------------------------------
-
-# +-------+ +-------+
-# | eNB | EMULIF | UE |
-# | +---------------------+ +
-# | | | |
-# | | | |
-# | | | |
-# | | | |
-# | | | +
-# | | | |
-# | | LTEIF | |
-# | +.................... + |
-# | |ENB_IPv4 UE_IPv4_CIDR| |
-# +-------+ LTE link over +-------+
-
-###########################################################
-IPTABLES=/sbin/iptables
-THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
-declare -x OPENAIR_DIR=""
-declare -x OPENAIR1_DIR=""
-declare -x OPENAIR2_DIR=""
-declare -x OPENAIR3_DIR=""
-declare -x OPENAIR_TARGETS=""
-###########################################################
-
-
-black='\E[30m'
-red='\E[31m'
-green='\E[32m'
-yellow='\E[33m'
-blue='\E[34m'
-magenta='\E[35m'
-cyan='\E[36m'
-white='\E[37m'
-
-ROOT_UID=0
-E_NOTROOT=67
-
-
-cecho() # Color-echo
- # arg1 = message
- # arg2 = color
-{
-local default_msg="No Message."
- message=${1:-$default_msg}
- color=${2:-$black}
- echo -e "$color"
- echo -n "$message"
- tput sgr0
- echo
- return
-}
-
-echo_error() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $red
-}
-
-echo_warning() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $yellow
-}
-
-echo_success() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $green
-}
-
-set_openair() {
- path=`pwd`
- declare -i length_path
- declare -i index
- length_path=${#path}
-
- index=`echo $path | grep -b -o 'targets' | cut -d: -f1`
- #echo ${path%$token*}
- if [[ $index -lt $length_path && index -gt 0 ]]
- then
- declare -x OPENAIR_DIR
- index=`expr $index - 1`
- openair_path=`echo $path | cut -c1-$index`
- #openair_path=`echo ${path:0:$index}`
- export OPENAIR_DIR=$openair_path
- export OPENAIR1_DIR=$openair_path/openair1
- export OPENAIR2_DIR=$openair_path/openair2
- export OPENAIR3_DIR=$openair_path/openair3
- export OPENAIR_TARGETS=$openair_path/targets
- return 0
- fi
- return -1
-}
-
-bash_exec() {
- output=$($1 2>&1)
- result=$?
- if [ $result -eq 0 ]
- then
- echo_success "$1"
- else
- echo_error "$1: $output"
- fi
-}
-
-wait_process_started () {
- if [ -z "$1" ]
- then
- echo_error "WAITING FOR PROCESS START: NO PROCESS"
- return 1
- fi
- ps -C $1 > /dev/null 2>&1
- while [ $? -ne 0 ]; do
- echo_warning "WAITING FOR $1 START"
- sleep 2
- ps -C $1 > /dev/null 2>&1
- done
- echo_success "PROCESS $1 STARTED"
- return 0
-}
-
-assert() {
- # If condition false
- # exit from script with error message
- E_PARAM_ERR=98
- E_PARAM_FAILED=99
-
- if [ -z "$2" ] # Not enought parameters passed.
- then
- return $E_PARAM_ERR
- fi
-
- lineno=$2
- if [ ! $1 ]
- then
- echo "Assertion failed: \"$1\""
- echo "File \"$0\", line $lineno"
- exit $E_ASSERT_FAILED
- fi
-}
-
-ctrl_c() {
- bash_exec "pkill oaisim"
- bash_exec "ip link set $LTEIF down"
-
- bash_exec "rmmod $IP_DRIVER_NAME"
-
- bash_exec "$IPTABLES -P INPUT ACCEPT"
- bash_exec "$IPTABLES -F INPUT"
- bash_exec "$IPTABLES -P OUTPUT ACCEPT"
- bash_exec "$IPTABLES -F OUTPUT"
- bash_exec "$IPTABLES -P FORWARD ACCEPT"
- bash_exec "$IPTABLES -F FORWARD"
- bash_exec "$IPTABLES -t nat -F"
- bash_exec "$IPTABLES -t mangle -F"
- bash_exec "$IPTABLES -t filter -F"
- bash_exec "ip route flush cache"
-}
-
-#bash_exec "set_openair"
-set_openair
-cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
-cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
-cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
-cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
-cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
-
-echo "Bringup UE interface"
-bash_exec "rmmod $IP_DRIVER_NAME"
-cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET ....." $green
-bash_exec "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET "
-bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/$IP_DRIVER_NAME.ko oai_nw_drv_IMEI=$UE_IMEI"
-
-bash_exec "ip route flush cache"
-bash_exec "ip route add 239.0.0.160/28 dev $EMULIF"
-
-bash_exec "ip link set $LTEIF broadcast ff:ff:ff:ff:ff:ff"
-bash_exec "ip link set $LTEIF up"
-sleep 1
-bash_exec "ip addr add dev $LTEIF $UE_IPv4_CIDR"
-bash_exec "ip addr add dev $LTEIF $UE_IPv6_CIDR"
-
-# -a -> Add RB
-# -d -> Delete RB
-# -cxx -> lcr
-# -ixx -> instance
-# -zxx -> dscp
-# -fxxx -> classref (uid of a classifier entry) if fn is used , fn is used for send classifier and n+1 for receive classifier
-# -sxxx -> source ipv4 address
-# -txxx -> destination ipv4 address
-# -x -> source ipv6 address
-# -y -> destination ipv6 address
-# -r -> radio bearer id
-bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f0 -i0 -z0 -x $UE_IPv6 -y $ENB_IPv6 -r 1"
-bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f2 -i0 -z64 -s $UE_IPv4/32 -t $ENB_IPv4/32 -r 1"
-bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f4 -i0 -z64 -s 0.0.0.0/32 -t 0.0.0.0/32 -r 1"
-sleep 1
-
-bash_exec "sysctl -w net.ipv4.conf.all.log_martians=1"
-assert " `sysctl -n net.ipv4.conf.all.log_martians` -eq 1" $LINENO
-
-echo " Disabling reverse path filtering"
-bash_exec "sysctl -w net.ipv4.conf.all.rp_filter=0"
-assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO
-
-
-bash_exec "ip route flush cache"
-
-echo "#####################################################################"
-echo "ip route show table main"
-echo "---------------------------------------------------------------------"
-ip route show table main
-
-trap ctrl_c INT
-
-echo "to see UE stats, please run : watch_ue script"
-echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g3 -l3 > /dev/null"
-nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g3 -l3 > /dev/null
-#gdb $OPENAIR_TARGETS/SIMU/USER/oaisim
-echo "End"
-ctrl_c
-
-
-
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_ue_cx2android b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_ue_cx2android
deleted file mode 100755
index 2e54ae6148..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_1UE_OAI_DRIVER_ETHERNET/start_ue_cx2android
+++ /dev/null
@@ -1,426 +0,0 @@
-#!/bin/bash
-#
-#------------------------------------------------
-MAKE_IP_DRIVER_TARGET="naslite_netlink_ether"
-MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim"
-MAKE_REMSERIAL_TARGET="remserial"
-IP_DRIVER_NAME=oai_nw_drv
-###########################################################
-# CONFIGURE OPTIONS
-EMULIF="eth0"
-LTEIF="oai0"
-
-INTIF="ppp0"
-EXTIF=$LTEIF
-#----------------------------------------------------------
-LTE_NETWORK_CIDR="10.0.1.0/24"
-ENB_IPv4="10.0.1.1"
-ENB_IPv6="2001:1::1"
-#----------------------------------------------------------
-UE_IPv4="10.0.1.2"
-UE_IPv6="2001:1::2"
-UE_IPv6_CIDR=$UE_IPv6"/64"
-UE_IPv4_CIDR=$UE_IPv4"/24"
-UE_IMEI="3,9,1,8,3,6,7,3,0,0,0,0,0,0"
-#----------------------------------------------------------
-USE_PPP="yes"
-PPP_OPTIONS="proxyarp passive nodetach ipcp-accept-remote"
-PPP_DEVICE="ttyPPP_DROID"
-PPP_SPEED="460800"
-UE_PPP_IPv4="192.168.15.1"
-TERMINAL_PPP_IPv4="192.168.15.175"
-REMSERIAL_UDP_PORT="23001"
-#----------------------------------------------------------
-
-# +-------+ +-------+ +-------+
-# | eNB | EMULIF | UE |INTIF |ANDROID|
-# | +---------------------+ +---------------------+ TERMIN|
-# | | | | ppp link over | AL |
-# | | | | UDP over ethernet | |
-# | | | | (remserial) | |
-# | | | | | |
-# | | | +---serial link-------+ |
-# | | | | for AT commands | |
-# | | LTEIF | | | |
-# | +.................... + | | |
-# | |ENB_IPv4 UE_IPv4_CIDR| | | |
-# +-------+ LTE link over +-------+ +-------+
-
-###########################################################
-IPTABLES=/sbin/iptables
-THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
-declare -x OPENAIR_DIR=""
-declare -x OPENAIR1_DIR=""
-declare -x OPENAIR2_DIR=""
-declare -x OPENAIR3_DIR=""
-declare -x OPENAIR_TARGETS=""
-###########################################################
-
-
-black='\E[30m'
-red='\E[31m'
-green='\E[32m'
-yellow='\E[33m'
-blue='\E[34m'
-magenta='\E[35m'
-cyan='\E[36m'
-white='\E[37m'
-
-ROOT_UID=0
-E_NOTROOT=67
-
-
-cecho() # Color-echo
- # arg1 = message
- # arg2 = color
-{
-local default_msg="No Message."
- message=${1:-$default_msg}
- color=${2:-$black}
- echo -e "$color"
- echo -n "$message"
- tput sgr0
- echo
- return
-}
-
-echo_error() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $red
-}
-
-echo_warning() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $yellow
-}
-
-echo_success() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $green
-}
-
-set_openair() {
- path=`pwd`
- declare -i length_path
- declare -i index
- length_path=${#path}
-
- index=`echo $path | grep -b -o 'targets' | cut -d: -f1`
- #echo ${path%$token*}
- if [[ $index -lt $length_path && index -gt 0 ]]
- then
- declare -x OPENAIR_DIR
- index=`expr $index - 1`
- openair_path=`echo $path | cut -c1-$index`
- #openair_path=`echo ${path:0:$index}`
- export OPENAIR_DIR=$openair_path
- export OPENAIR1_DIR=$openair_path/openair1
- export OPENAIR2_DIR=$openair_path/openair2
- export OPENAIR3_DIR=$openair_path/openair3
- export OPENAIR_TARGETS=$openair_path/targets
- return 0
- fi
- return -1
-}
-
-bash_exec() {
- output=$($1 2>&1)
- result=$?
- if [ $result -eq 0 ]
- then
- echo_success "$1"
- else
- echo_error "$1: $output"
- fi
-}
-
-wait_process_started () {
- if [ -z "$1" ]
- then
- echo_error "WAITING FOR PROCESS START: NO PROCESS"
- return 1
- fi
- ps -C $1 > /dev/null 2>&1
- while [ $? -ne 0 ]; do
- echo_warning "WAITING FOR $1 START"
- sleep 2
- ps -C $1 > /dev/null 2>&1
- done
- echo_success "PROCESS $1 STARTED"
- return 0
-}
-
-assert() {
- # If condition false
- # exit from script with error message
- E_PARAM_ERR=98
- E_PARAM_FAILED=99
-
- if [ -z "$2" ] # Not enought parameters passed.
- then
- return $E_PARAM_ERR
- fi
-
- lineno=$2
- if [ ! $1 ]
- then
- echo "Assertion failed: \"$1\""
- echo "File \"$0\", line $lineno"
- exit $E_ASSERT_FAILED
- fi
-}
-
-ctrl_c() {
- bash_exec "pkill oaisim"
- if [ "$USE_PPP"x = yesx ]; then
- bash_exec "pkill remserial.bash"
- bash_exec "pkill ppp_android.bash"
- fi
- bash_exec "pkill AT_serial_bouchon.py"
- bash_exec "ip link set $LTEIF down"
-
- bash_exec "ip route del default via $ENB_IPv4 dev $EXTIF table int2lte"
- bash_exec "ip route flush table int2lte"
- bash_exec "ip rule del prio 1000"
-
- bash_exec "rmmod $IP_DRIVER_NAME"
-
- bash_exec "$IPTABLES -P INPUT ACCEPT"
- bash_exec "$IPTABLES -F INPUT"
- bash_exec "$IPTABLES -P OUTPUT ACCEPT"
- bash_exec "$IPTABLES -F OUTPUT"
- bash_exec "$IPTABLES -P FORWARD ACCEPT"
- bash_exec "$IPTABLES -F FORWARD"
- bash_exec "$IPTABLES -t nat -F"
- bash_exec "$IPTABLES -t mangle -F"
- bash_exec "$IPTABLES -t filter -F"
- bash_exec "ip route flush cache"
-}
-
-#bash_exec "set_openair"
-set_openair
-cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
-cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
-cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
-cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
-cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
-
-echo "Bringup UE interface"
-bash_exec "rmmod $IP_DRIVER_NAME"
-cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET $MAKE_REMSERIAL_TARGET....." $green
-bash_exec "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET $MAKE_REMSERIAL_TARGET"
-bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/$IP_DRIVER_NAME.ko oai_nw_drv_IMEI=$UE_IMEI"
-
-
-echo " Enabling ipv4 forwarding.."
-bash_exec "sysctl -w net.ipv4.ip_forward=1"
-assert "`sysctl -n net.ipv4.ip_forward` -eq 1" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.all.forwarding=1"
-assert "`sysctl -n net.ipv4.conf.all.forwarding` -eq 1" $LINENO
-
-echo " Enabling ipv6 forwarding.."
-bash_exec "sysctl -w net.ipv6.conf.all.forwarding=1"
-assert "`sysctl -n net.ipv6.conf.all.forwarding` -eq 1" $LINENO
-
-
-if [ "$USE_PPP"x = yesx ]; then
- echo " PPP enabled.."
- command -v pppd > /dev/null 2>&1 || { echo_error "pppd executable needed - please install it"; exit 1;}
- command -v remserial.udp > /dev/null 2>&1 || { echo_error "remserial.udp executable needed - please install it"; exit 1;}
- #generate pppd script
- rm -f /tmp/ppp_android.bash
- bash_exec "touch /tmp/ppp_android.bash"
- if [ ! -f /tmp/ppp_android.bash ]; then
- echo_error "Cannot generate /tmp/ppp_android.bash file, exiting"
- exit 1
- fi
- echo "#!/bin/bash" >> /tmp/ppp_android.bash
- echo "pppd $PPP_OPTIONS $UE_PPP_IPv4:$TERMINAL_PPP_IPv4 /dev/$PPP_DEVICE $PPP_SPEED" >> /tmp/ppp_android.bash
- bash_exec "chmod 777 /tmp/ppp_android.bash"
- assert " -x /tmp/ppp_android.bash " $LINENO
-
- #generate remserial script
- rm -f /tmp/remserial.bash
- bash_exec "touch /tmp/remserial.bash"
- if [ ! -f /tmp/remserial.bash ]; then
- echo_error "Cannot generate /tmp/remserial.bash file, exiting"
- exit 1
- fi
- echo "#!/bin/bash" >> /tmp/remserial.bash
- echo "remserial.udp -s \"$PPP_SPEED raw\" -p $REMSERIAL_UDP_PORT -l /dev/$PPP_DEVICE /dev/ptmx" >> /tmp/remserial.bash
- bash_exec "chmod 777 /tmp/remserial.bash"
- assert " -x /tmp/remserial.bash " $LINENO
-fi
-
-xterm -e $THIS_SCRIPT_PATH/AT_serial_bouchon.py &
-wait_process_started AT_serial_bouchon.py
-
-if [ "$USE_PPP"x = yesx ]; then
- xterm -e /tmp/remserial.bash &
- wait_process_started remserial.bash
-
- xterm -e /tmp/ppp_android.bash &
- wait_process_started ppp_android.bash
-fi
-
-
-assert " -x $IPTABLES " $LINENO
-
-bash_exec "ip route del default via $ENB_IPv4 dev $EXTIF table int2lte"
-bash_exec "ip route flush table int2lte"
-bash_exec "ip rule del prio 1000"
-
-bash_exec "$IPTABLES -P INPUT ACCEPT"
-bash_exec "$IPTABLES -F INPUT"
-bash_exec "$IPTABLES -P OUTPUT ACCEPT"
-bash_exec "$IPTABLES -F OUTPUT"
-bash_exec "$IPTABLES -P FORWARD DROP"
-bash_exec "$IPTABLES -F FORWARD"
-bash_exec "$IPTABLES -t nat -F"
-bash_exec "$IPTABLES -t mangle -F"
-bash_exec "$IPTABLES -t filter -F"
-
-bash_exec "ip route flush cache"
-bash_exec "ip route add 239.0.0.160/28 dev $EMULIF"
-
-bash_exec "ip link set $LTEIF broadcast ff:ff:ff:ff:ff:ff"
-bash_exec "ip link set $LTEIF up"
-sleep 1
-bash_exec "ip addr add dev $LTEIF $UE_IPv4_CIDR"
-bash_exec "ip addr add dev $LTEIF $UE_IPv6_CIDR"
-
-echo " Enabling proxy ARP.."
-bash_exec "sysctl -w net.ipv4.conf.all.proxy_arp=1"
-assert "`sysctl -n net.ipv4.conf.all.proxy_arp` -eq 1" $LINENO
-
-
-# -a -> Add RB
-# -d -> Delete RB
-# -cxx -> lcr
-# -ixx -> instance
-# -zxx -> dscp
-# -fxxx -> classref (uid of a classifier entry) if fn is used , fn is used for send classifier and n+1 for receive classifier
-# -sxxx -> source ipv4 address
-# -txxx -> destination ipv4 address
-# -x -> source ipv6 address
-# -y -> destination ipv6 address
-# -r -> radio bearer id
-bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f0 -i0 -z0 -x $UE_IPv6 -y $ENB_IPv6 -r 3"
-bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f2 -i0 -z64 -s $UE_IPv4/32 -t $ENB_IPv4/32 -r 3"
-bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c0 -f4 -i0 -z64 -s 0.0.0.0/32 -t 0.0.0.0/32 -r 3"
-sleep 1
-
-echo " External Interface: $EXTIF"
-echo " Internal Interface: $INTIF"
-
-bash_exec "modprobe ip_tables"
-bash_exec "modprobe ip_conntrack"
-bash_exec "modprobe ip_conntrack_ftp"
-bash_exec "modprobe nf_conntrack_h323"
-bash_exec "modprobe nf_conntrack_irc"
-bash_exec "modprobe nf_conntrack_pptp"
-bash_exec "modprobe nf_conntrack_proto_gre"
-bash_exec "modprobe nf_conntrack_proto_sctp"
-bash_exec "modprobe nf_conntrack_tftp"
-bash_exec "modprobe nf_conntrack_sip"
-bash_exec "modprobe iptable_nat"
-bash_exec "modprobe x_tables"
-
-echo " Enabling DynamicAddr.."
-bash_exec "sysctl -w net.ipv4.ip_dynaddr=1"
-assert " `sysctl -n net.ipv4.ip_dynaddr` -eq 1" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.all.log_martians=1"
-assert " `sysctl -n net.ipv4.conf.all.log_martians` -eq 1" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.$LTEIF.log_martians=1"
-assert " `sysctl -n net.ipv4.conf.$LTEIF.log_martians` -eq 1" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.$EMULIF.log_martians=1"
-assert " `sysctl -n net.ipv4.conf.$EMULIF.log_martians` -eq 1" $LINENO
-
-if [ ! "$USE_PPP"x = yesx ]; then
- bash_exec "sysctl -w net.ipv4.conf.$INTIF.log_martians=1"
- assert " `sysctl -n net.ipv4.conf.$INTIF.log_martians` -eq 1" $LINENO
-fi
-echo " Disabling reverse path filtering"
-bash_exec "sysctl -w net.ipv4.conf.all.rp_filter=0"
-assert " `sysctl -n net.ipv4.conf.all.rp_filter` -eq 0" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.$LTEIF.rp_filter=0"
-assert " `sysctl -n net.ipv4.conf.$LTEIF.rp_filter` -eq 0" $LINENO
-
-bash_exec "sysctl -w net.ipv4.conf.$EMULIF.rp_filter=0"
-assert " `sysctl -n net.ipv4.conf.$EMULIF.rp_filter` -eq 0" $LINENO
-
-if [ ! "$USE_PPP"x = yesx ]; then
- bash_exec "sysctl -w net.ipv4.conf.$INTIF.rp_filter=0"
- assert " `sysctl -n net.ipv4.conf.$INTIF.rp_filter` -eq 0" $LINENO
-fi
-
-bash_exec "$IPTABLES -t mangle -A PREROUTING -i $INTIF -j MARK --set-mark 22"
-
-bash_exec "$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT"
-bash_exec "$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT"
-bash_exec "$IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE"
-
-bash_exec "ip route add 127.0.0.0/8 dev lo table int2lte"
-bash_exec "ip route add $LTE_NETWORK_CIDR dev $EXTIF table int2lte scope link"
-bash_exec "ip route add default via $ENB_IPv4 dev $EXTIF table int2lte scope global"
-
-bash_exec "ip route flush cache"
-
-bash_exec "ip rule add fwmark 22 lookup int2lte prio 1000"
-
-echo "#####################################################################"
-echo "iptables -t nat -nvL"
-echo "---------------------------------------------------------------------"
-iptables -t nat -nvL
-echo "#####################################################################"
-echo "iptables -t mangle -nvL"
-echo "---------------------------------------------------------------------"
-iptables -t mangle -nvL
-echo "#####################################################################"
-echo "iptables -t filter -nvL"
-echo "---------------------------------------------------------------------"
-iptables -t filter -nvL
-echo "#####################################################################"
-echo "ip rule show"
-echo "---------------------------------------------------------------------"
-ip rule show
-echo "#####################################################################"
-echo "ip route show table int2lte"
-echo "---------------------------------------------------------------------"
-ip route show table int2lte
-echo "#####################################################################"
-echo "ip route show table main"
-echo "---------------------------------------------------------------------"
-ip route show table main
-
-trap ctrl_c INT
-
-echo "to see UE stats, please run : watch_ue script"
-echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g3 -l3 > /dev/null"
-nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p2 -g3 -l3 > /dev/null
-#gdb $OPENAIR_TARGETS/SIMU/USER/oaisim
-echo "End"
-ctrl_c
-
-
-
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/Makefile b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/Makefile
deleted file mode 100644
index 7e14cfa8de..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-all: oaisim nasmesh
-
-userclean: clean oaisim nasmesh
-
-oaisim:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && make LINK_ENB_PDCP_TO_IP_DRIVER=1 -j2)
-nasmesh:
- (cd $(OPENAIR2_DIR) && make nasmesh_netlink.ko)
- (cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL/ && make)
-
-clean:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && make clean)
-
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/start_enb b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/start_enb
deleted file mode 100755
index 0f22fecbef..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/start_enb
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-echo "Bringup eNB interface"
-
-sudo rmmod nasmesh
-make all
-sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
-
-#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
-#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
-sudo ip route add 239.0.0.160/28 dev eth0
-
-
-sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
-
-$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
-$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 12
-
-#xterm -T ENB -hold -e ping 10.0.1.2&
-#xterm -T ENB -hold -e ping 10.0.1.3&
-
-if [ -z $1 ]; then
-echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l3 > /dev/null"
-nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l3 > /dev/null
-else
- if [ $1 = "all" ]; then
- echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l7"
- nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l7
- else
- echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l7 | grep -i $1"
- nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -u0 -M0 -p3 -g3 -l7 | grep -i $1
- fi
-fi
-
-echo "End"
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/start_ue1 b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/start_ue1
deleted file mode 100755
index 15b45b7b24..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/start_ue1
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-echo "Bringup UE interface"
-sudo rmmod nasmesh
-make all
-sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
-
-#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
-#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
-sudo ip route add 239.0.0.160/28 dev eth0
-
-
-sudo ifconfig oai0 10.0.1.2 netmask 255.255.255.0 broadcast 10.0.1.255
-
-$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.2 -t 10.0.1.1 -r 1
-
-#xterm -T UE1 -hold -e ping 10.0.1.1&
-
-if [ -z $1 ]; then
-echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l3 > /dev/null"
-nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l3 > /dev/null
-else
- if [ $1 = "all" ]; then
- echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l7"
- nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l7
- else
- echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l7 | grep -i $1"
- nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M1 -p3 -g3 -l7 | grep -i $1
- fi
-fi
-
-echo "End"
diff --git a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/start_ue2 b/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/start_ue2
deleted file mode 100755
index 5cf1bb3712..0000000000
--- a/targets/SIMU/EXAMPLES/ETH_EMUL_1eNB_2UE/start_ue2
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh
-echo "Bringup UE interface"
-sudo rmmod nasmesh
-make all
-sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
-
-#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
-#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
-sudo ip route add 239.0.0.160/28 dev eth0
-
-sudo ifconfig oai0 10.0.1.3 netmask 255.255.255.0 broadcast 10.0.1.255
-
-$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.3 -t 10.0.1.1 -r 1
-
-#xterm -T UE2 -hold -e ping 10.0.1.1&
-
-if [ -z $1 ]; then
-echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l3 > /dev/null"
-nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l3 > /dev/null
-else
- if [ $1 = "all" ]; then
- echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l7"
- nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l7
- else
- echo "nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l7 | grep -i $1"
- nice -10 $OPENAIR_TARGETS/SIMU/USER/oaisim -b0 -M2 -p3 -g3 -l7 | grep -i $1
- fi
-fi
-
-echo "End"
diff --git a/targets/SIMU/EXAMPLES/OSD/README.txt b/targets/SIMU/EXAMPLES/OSD/README.txt
deleted file mode 100644
index e46362510c..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/README.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-
-This is the folder used by the OCG(openair config generation) to parse a xml-based scenario defined by the user in the WEBXML directory, and produce emulation results in the RESULTS directory.
-
-Please make sure that you have correctly set the OPENAIR_TARGETS variables.
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_0.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_0.xml
deleted file mode 100644
index 3b41cc8ca3..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_0.xml
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
- urban
-
- 2.0
- -50
-
- Rayleigh1
-
- 5
- 7.68
- 1.9
-
-
- 5
- 3
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 1
- 1
-
- homogeneous
- macrocell
-
-
-
- random
-
- 1
-
- fixed
-
- 1
- 200
- 0.1
- 5.0
- 0.1
- 10
-
-
- sumo-gui
- $OPENAIR2_DIR/UTIL/OMG/SUMO/SCENARIOS/scen.sumo.cfg
- 0
- 10
- 10
- 127.0.1.1
- 8883
-
-
-
- random
-
- 1
-
-
- fixed
-
-
-
-
-
-
- 0
- gaming_OA
- 1
- 400
- 2000
-
-
-
-
-
- 0.9
- 0.1
- 100
-
-
- 0.1
- 0.1
- 10000
-
-
- 100
-
- 2
- udp
- ipv6
- 0
- 400
- 2000
-
- uniform
- 100
- 1000
- 1
- 7
-
- gaussian
- 200
- 500
- 5
- 4
-
-
- 8080
-
-
-
-
-
- 5000
-
-
-
- enable
- disable
-
-
-
- 1
-
-
-
-
-
- 1
-
-
- 1
-
-
-
- EURECOM
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_1.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_1.xml
deleted file mode 100644
index 82cf2e80f8..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_1.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- 500
-
- debug
-
-
- EMU-TEST
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_10.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_10.xml
deleted file mode 100644
index edf6ad1019..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_10.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
- 5000
- 5000
-
-
-
-
- 3
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
- 0
- random
- 1:3
-
-
-
- 1:2
- udp
- ipv6
- 0
-
- poisson
- 7.3
-
- unifrom
- 100
- 500
-
-
-
-
- 3
- tcp
- ipv4
- 0
-
- fixed
- 100
-
- exponential
- 2.2
-
-
-
-
-
-
- 0
-
-
- 1
-
-
- info
- 1
-
- 1234
-
-
-
- OTG_3
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_11.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_11.xml
deleted file mode 100644
index 189ecebeb7..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_11.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-
-
-
- urban
-
- 2.0
- -50
-
- Rayleigh1
-
- 5
- 7.68
- 1.9
-
-
- 5
- 3
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 5000
- 5000
-
- homogeneous
- macrocell
-
-
-
- random
-
- 1
-
- STATIC
-
- 1
- 200
- 0.1
- 5.0
- 0.1
- 10
-
-
- sumo-gui
- $OPENAIR2_DIR/UTIL/OMG/SUMO/SCENARIOS/scen.sumo.cfg
- 0
- 10
- 10
- 127.0.1.1
- 8883
-
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
- 1
- mcbr
- 0
-
-
-
- 0
- udp
- ipv6
- 1
-
- poisson
- 100
- 1000
- 4.5
- 7.3
- 30
- 15
-
- uniform
- 100
- 500
- 5.3
- 2.2
- 0.5
- 30
-
-
-
-
-
-
- 0
-
-
- enable
- enable
- enable
-
-
- warning
- 1
-
- 1234
-
-
-
- OCM_OMG_OTG_1
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_120.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_120.xml
deleted file mode 100644
index 6b84283808..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_120.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- scbr
- 1
- 100
- 55000
-
-
-
-
-
- 1
- udp
- 100
- 55000
- ipv4
- 0
- uniform
- 1
- 10
- uniform
- 10
- 100
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_121.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_121.xml
deleted file mode 100644
index 93e9575137..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_121.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- scbr
- 1
- 100
- 55000
-
-
-
-
-
- 1
- udp
- 100
- 55000
- ipv4
- 0
- uniform
- 1
- 10
- uniform
- 100
- 500
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_122.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_122.xml
deleted file mode 100644
index 8ee129e560..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_122.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
- 0
- scbr
- 1
- 100
- 55000
-
-
-
-
-
- 1
- udp
- 100
- 55000
- ipv4
- 0
- uniform
- 10
- 100
- unifrom
- 10
- 100
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_123.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_123.xml
deleted file mode 100644
index 614908e1f0..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_123.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
- 0
- scbr
- 1
- 100
- 55000
-
-
-
-
-
- 1
- udp
- 100
- 55000
- ipv4
- 0
- uniform
- 10
- 100
- uniform
- 100
- 1000
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_124.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_124.xml
deleted file mode 100644
index 855d93aafe..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_124.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
- 0
- scbr
- 1
- 100
- 55000
-
-
-
-
-
- 1
- udp
- 100
- 55000
- ipv4
- 0
- uniform
- 10
- 100
- uniform
- 1000
- 6000
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_125.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_125.xml
deleted file mode 100644
index 93378a8856..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_125.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- scbr
- 1
- 100
- 55000
-
-
-
-
-
- 1
- udp
- 100
- 55000
- ipv4
- 0
- uniform
- 100
- 1000
- uniform
- 10
- 100
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_126.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_126.xml
deleted file mode 100644
index 01f16cdae9..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_126.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- scbr
- 1
- 100
- 55000
-
-
-
-
-
- 1
- udp
- 100
- 55000
- ipv4
- 0
- uniform
- 100
- 1000
- uniform
- 100
- 1000
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_127.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_127.xml
deleted file mode 100644
index 8e3b0ee4f2..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_127.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- scbr
- 1
- 100
- 55000
-
-
-
-
-
- 1
- udp
- 100
- 55000
- ipv4
- 0
- uniform
- 100
- 1000
- uniform
- 1000
- 9000
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_128.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_128.xml
deleted file mode 100644
index 1e015ac23e..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_128.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- scbr
- 1
- 100
- 55000
-
-
-
-
-
- 1
- udp
- 100
- 55000
- ipv4
- 0
- uniform
- 1000
- 10000
- uniform
- 10
- 100
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_129.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_129.xml
deleted file mode 100644
index 004ad957fe..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_129.xml
+++ /dev/null
@@ -1,106 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- scbr
- 1
- 100
- 55000
-
-
-
-
-
- 1
- udp
- 100
- 55000
- ipv4
- 0
- uniform
- 1000
- 10000
- uniform
- 100
- 1000
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_13.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_13.xml
deleted file mode 100644
index 4b42383449..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_13.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
- 500
- 500
-
-
-
-
- 3
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
-
-
-
- 0
- tcp
- ipv4
- 1:3
- disable
- 1
- uniform
- 30
- 50
- uniform
- 512
- 1024
-
-
-
-
-
-
- 10000
- enabled
- enable
-
- enable
- enable
- enable
-
-
- debug
- 1
-
- 1234
-
-
-
- OTG_2
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_14.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_14.xml
deleted file mode 100644
index 1039c643dc..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_14.xml
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-
- 500
- 500
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
-
-
-
- 0
- tcp
- ipv4
- 1
- disable
- 1
- uniform
- 500
- 500
- uniform
- 1000
- 1500
-
-
-
-
-
-
-
- 0
- enable
- enable
-
- enable
- enable
- disable
-
-
- trace
- 1
-
- 1234
-
-
-
- OTG_2
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_15.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_15.xml
deleted file mode 100644
index 0aa4fa1ca1..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_15.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
- 500
- 500
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
- 0.6
- 10
- 200
- 1
- tcp
- ipv4
- 0
- enable
- 1
- uniform
- 80
- 100
- uniform
- 100
- 200
-
-
-
-
-
- 0.6
- 10
- 200
- 0
- tcp
- ipv4
- 1
- enable
- 1
- uniform
- 1000
- 2000
- uniform
- 100
- 200
-
-
-
-
-
- 100000
- enable
- enable
-
- enable
- enable
- enable
-
-
- trace
- 1
-
- 1234
-
-
-
- OTG_2
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_16.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_16.xml
deleted file mode 100644
index ceda1c309c..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_16.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
- 500
- 500
-
-
-
-
- 3
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
-
-
-
- 70
- 0.1
- 0.8
- 50
- 13
- 230
- 1:3
- udp
- ipv6
- 0
- enable
- 1
- uniform
- 4.5
- pareto
- 0.5
- 30
-
-
-
-
-
- 1000
- enable
- enable
-
- enable
- enable
- enable
-
-
- trace
- 1
-
- 1234
-
-
-
- OTG_2
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_17.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_17.xml
deleted file mode 100644
index 0dbc30e3ff..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_17.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
- 500
- 500
-
-
-
-
- 3
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
-
-
-
- 70
- 0.1
- 0.2
- 100
- 200
- 230
- 1:3
- udp
- ipv6
- 0
- enable
- 1
- uniform
- 100
- 200
- pareto
- 0.5
- 30
-
-
-
-
-
- 3000
- enable
- enable
-
- enable
- enable
- enable
-
-
- trace
- 1
-
- 1234
-
-
-
- OTG_2
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_18.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_18.xml
deleted file mode 100644
index ed4b8395bb..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_18.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
- 500
- 500
-
-
-
-
- 3
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- m2m_traffic
- enable
- 1
- 1:3
-
-
-
-
-
- 5000
- enable
- enable
-
- enable
- enable
- enable
-
-
- trace
- 1
-
- 1234
-
-
-
- OTG_2
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_19.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_19.xml
deleted file mode 100644
index e422beb3c4..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_19.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
- 500
- 500
-
-
-
-
- 3
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
-
-
- 0
- tcp
- ipv4
- 1:3
- enable
- 1
- uniform
- 400
- 500
- uniform
- 80
- 150
- 60
- 70
- 0.2
- 0.1
- 0.2
- 0.1
- 0.3
- 0.1
- 0.2
- 100
- 120
- 150
- 500
-
-
-
-
-
- 0
- enable
- enable
-
- enable
- enable
- enable
-
-
- debug
- 1
-
- 1234
-
-
-
- OTG_2
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_2.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_2.xml
deleted file mode 100644
index c2aae58b56..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_2.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
- free_space
-
- 2
- -50
-
-
-
-
-
- -90
-
-
-
- -90
-
-
-
-
-
-
- 1000
- 1000
-
-
-
-
- random
-
- 2
-
- RWP
-
-
-
- random
-
- 2
-
- STATIC
-
-
-
-
-
- 0
-
- debug
-
-
- OCM_OMG_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_20.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_20.xml
deleted file mode 100644
index b8f35407c1..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_20.xml
+++ /dev/null
@@ -1,87 +0,0 @@
-
-
-
-
- 2.0
-
- AWGN
-
- 1.9
-
-
-
-
- 500
- 500
-
-
-
-
- 4
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- udp
- ipv6
- 1:3
- disable
- uniform
- 40
- 50
- fixed
- 1400
- 1400
-
-
-
- 1:3
- udp
- ipv6
- 0
- 200
- 7000
- disable
- fixed
- 40
- 50
- uniform
- 256
- 768
-
-
-
-
-
- 30000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
- 1
-
- 1234
-
-
-
- MEDIEVAL_OTG_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_21.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_21.xml
deleted file mode 100644
index 19c85d6b0b..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_21.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-
-
-
- 500
- 500
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 1
- alarm_temperature
- disable
- 1
- 0
-
-
-
-
-
- 10000
- enable
- enable
-
- enable
- enable
- enable
-
-
- trace
- 1
-
- 1234
-
-
-
- OTG_2
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_22.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_22.xml
deleted file mode 100644
index 90685f8a60..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_22.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 7
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
-
-
- 1:7
- udp
- 0
- 8000
- ipv4
- 0
- fixed
- 30
- 2000
- fixed
- 100
- 200
-
-
-
-
-
- 10000
- disable
-
- enable
- enable
- enable
-
-
- trace
- medium
-
- 2014
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_26.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_26.xml
deleted file mode 100755
index 5f84eca3cc..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_26.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
-
- 2.0
- -100
-
- AWGN
-
- 1.9
- 1
-
-
-
-
-
- 1000
- 1000
-
-
-
-
- 7
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- udp
- ipv6
- 1:7
- 1000
- 10000
-
- disable
- uniform
- 50
- 100
- uniform
- 128
- 1400
-
-
-
- 1:7
- udp
- ipv6
- 0
- 0
- 10000
- disable
- uniform
- 100
- 150
- uniform
- 256
- 768
-
-
-
-
-
- 15000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
- 1
-
- 0
-
-
-
- MEDIEVAL_OTG_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_27.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_27.xml
deleted file mode 100644
index 74ef5e772f..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_27.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
- 2.0
-
- AWGN
-
- 1.9
-
-
-
-
- 1000
- 1000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- udp
- ipv4
- 1
- 1000
- 10000
-
- disable
- fixed
- 1000
- 1000
- fixed
- 32
- 32
-
-
-
- 1
- udp
- ipv6
- 0
- 1000
- 10000
- disable
- fixed
- 1000
- 1000
- uniform
- 32
- 32
-
-
-
-
-
- 15000
- disable
-
- enable
- enable
- enable
-
-
- debug
- medium
- 1
-
- 0
-
-
-
- MEDIEVAL_OTG_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_29.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_29.xml
deleted file mode 100644
index 5810f14ad0..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_29.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
- free_space
-
- 2
- -50
-
- AWGN
-
- 5
- 7.68
- 1.9
- 1
-
-
- 0
- 1
- 1.13
- 0
- 43
-
-
- 0
- 0
- 20
-
-
-
-
-
-
- 500
- 500
-
-
-
- random
-
- 2
-
- STATIC
-
-
-
- random
-
- 2
-
-
- STATIC
-
-
-
-
-
-
-
- 0
- 2
- fixed
- 10
- fixed
- 125
-
-
-
- 2
- 0
- fixed
- 10
- fixed
- 125
-
-
-
-
-
- 10000
-
-
- enable
- enable
- enable
-
-
-
- debug
- medium
- 1
-
- 1234
-
-
-
- LOLA_SCHED_1
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_3.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_3.xml
deleted file mode 100644
index 85bc55d4bc..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_3.xml
+++ /dev/null
@@ -1,63 +0,0 @@
-
-
-
-
-
- free_space
-
- 2
- -50
-
- Rice1
-
-
- 5
- 7.68
- 1.9
-
-
-
- -90
-
-
- -90
-
-
-
-
-
-
- 500
- 500
-
-
-
- random
-
- 1
-
- STATIC
-
-
-
- random
-
- 1
-
-
- STATIC
-
-
-
-
-
- 5000
-
- debug
-
-
-
- OCM_OMG_2
-
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_33.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_33.xml
deleted file mode 100644
index 569dada42c..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_33.xml
+++ /dev/null
@@ -1,93 +0,0 @@
-
-
-
- 500
- 500
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
-
-
- 0
- voip_g729
- 1
-
-
- 1
- voip_g729
- 0
-
-
-
- 0
- voip_g711
- 1
-
-
- 1
- voip_g711
- 0
-
-
-
- 1
- iqsim_mango
- 0
- disable
-
-
- 0
- iqsim_mango
- 1
-
-
-
- 1
- iqsim_newsteo
- 0
-
-
- 0
- iqsim_newsteo
- 1
-
-
-
-
- 10000
- enable
- enable
-
- enable
- enable
- disable
-
-
- info
- 1
-
- 1234
-
-
-
- OTG_2
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_34.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_34.xml
deleted file mode 100644
index 2018130d93..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_34.xml
+++ /dev/null
@@ -1,53 +0,0 @@
-
-
-
-
- 500
- 500
-
-
-
- random
-
- 1
-
- RWP
-
- 5
- 5
- 0.1
- 5.0
- 0.1
- 10
-
-
-
- random
-
- 1
-
-
- STATIC
-
-
-
-
-
-
- 10000
-
- 1
- enable
- enable
-
-
- info
- medium
- 1
-
- 0
-
-
-
- eMBMS_1
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_4.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_4.xml
deleted file mode 100644
index 45ae081a93..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_4.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
-
-
- 100
- 100
-
-
-
- random
-
- 1
-
- RWP
-
- RESTRICTED
-
-
- 0.01
- 10
- 0.01
- 10
- 0.01
- 10
-
-
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
- 1000
-
-
- OMG_OMV
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_40.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_40.xml
deleted file mode 100644
index c7fdcc4de6..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_40.xml
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-
- urban
-
- 3.67
- -128
-
- Rayleigh1
-
- 7.68
- 1.9
- 6
-
-
- 0
- 1
- 0
- 0
- 43
-
-
- 0
- 0
- 20
-
-
-
-
-
-
- 5000
- 5000
-
-
-
- random
-
- 1
-
- TRACE
- static_2ues.tr
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
-
- 0
- 1
- fixed
- 10
- fixed
- 1000
-
-
-
-
-
- 10000
- disable
-
- 1
-
-
- info
- high
- 1
-
- 7111
-
-
-
- OCM_OMG_OTG_REF_1
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_41.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_41.xml
deleted file mode 100644
index d568b8b7de..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_41.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
- urban
-
- 3.67
- -128
-
- AWGN
-
- 7.68
- 1.9
- 1
-
-
- 0
- 1
- 0
- 0
- 43
-
-
- 0
- 0
- 20
-
-
-
-
-
-
- 5000
- 5000
-
-
-
- random
-
- 1
-
- TRACE
- static_2ues.tr
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- 1
- fixed
- 10
- fixed
- 1500
-
-
-
-
- 1
- 0
- fixed
- 10
- fixed
- 1000
-
-
-
-
- 10000
-
-
- 1
-
-
- info
- medium
- 1
-
- 7111
-
-
-
- OCM_OMG_OTG_REF_1
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml
deleted file mode 100644
index cbec73e902..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_42.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
- urban
-
- 3.67
-
- -120
-
- AWGN
-
- 7.68
- 1.9
- 1
-
-
- 0
- 1
- 0
- 0
- 15
-
-
- 0
- 0
- 0
-
-
-
-
-
-
- 10000 //2400
- 10000 //2400
-
-
-
- random
-
- 1
-
- TRACE
- handover.tr
-
-
-
- random
-
- 3
-
- TRACE
- hexagonal_eNBs.tr
-
-
-
-
-
- 10000
-
-
- debug
- high
- 1
-
- 1234
-
-
-
- HO_1
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_43.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_43.xml
deleted file mode 100644
index f4a95c2a2a..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_43.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-
--
-
-
- urban
-
- 3.67
- -111
-
- Rayleigh1
-
- 7.68
- 1.9
- 1
-
-
- 0
- 1
- 0
- 0
- 15
-
-
- 0
- 0
- 20
-
-
-
-
-
-
- 800
- 800
-
-
-
- random
-
- 1
-
- TRACE
- static_1ue.tr
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
- 1200
- disable
-
-
- info
- low
- 1
-
- 69
-
-
-
- eMBMS_OMG_REF_1
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_5.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_5.xml
deleted file mode 100644
index 32526c6f6e..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_5.xml
+++ /dev/null
@@ -1,104 +0,0 @@
-
-
-
- urban
-
- 2.67
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 1000
- 1000
-
-
-
- random
-
- 2
-
- RWP
-
- 1
- 2
- 0.1
- 15.0
-
-
-
- random
-
- 1
-
-
- STATIC
-
-
-
-
-
-
- 0
- mcbr
- 1:2
- 100
- 6000
-
-
-
- 1:2
- udp
- 100
- 6000
- ipv4
- 0
- uniform
- 10
- 100
- uniform
- 64
- 1024
-
-
-
-
-
- 10000
-
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 0
-
-
-
- OCM_OMG_OTG
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_6.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_6.xml
deleted file mode 100644
index 89c4646cce..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_6.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
- 5000
- 5000
-
-
-
-
- 1
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
- 0
-
- debug
- high
- 10
-
- 1234
-
-
- 1
- 0
-
-
-
- CLI
-
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_60.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_60.xml
deleted file mode 100644
index 2b85350097..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_60.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
-
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
-
- 500
- 500
-
-
-
-
- 1
-
- STATIC
-
-
-
- fixed
-
- 10
- 10
-
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
- voip_g729
- 1
-
-
- 0
- scbr
- 1
-
-
- 1
- voip_g729
- 0
-
-
-
-
-
- 10000
- enable
- enable
-
- enable
- enable
- enable
- enable
-
-
- debug
- low
-
-
-
-TEST1
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_7.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_7.xml
deleted file mode 100644
index 6105cd1137..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_7.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
- 700
- 700
-
-
-
- random
-
- 8
-
- SUMO
-
- 1
- 20
- 0.1
- 5.0
- 0.1
- 10
-
-
- sumo-gui
- $OPENAIR2_DIR/UTIL/OMG/SUMO/SCENARIOS/traci.scen.sumo.cfg
- 0
- 10000
- 1
- 127.0.1.1
- 8890
-
-
-
- random
-
- 1
-
-
- STATIC
-
-
-
-
-
-
- 10000
-
- info
- 1
-
- 974930
-
-
-
- OMG_SUMO
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_70.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_70.xml
deleted file mode 100644
index 0bb408788f..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_70.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
- urban
-
- 2
- -100
-
- AWGN
-
- 5
- 7.68
- 1.9
-
-
- 5
- 1
- 1.13
- 16
- 40
-
-
- 1
- 5
- 20
-
-
-
-
-
-
- 2000
- 2000
-
-
-
-
- 2
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
-
- 0
-
- scbr
- 1:2
-
-
-
-
-
- 1:2
- udp
- 0
- 55000
- ipv4
- 0
- uniform
- 100
- 1000
- uniform
- 100
- 1000
-
-
-
-
-
- 60000
- disable
-
- enable
- enable
- enable
-
-
- info
- low
-
- 2013
-
-
-
-
-
- 10
-
-
-
- CBA_1
-
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_8.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_8.xml
deleted file mode 100644
index f13b06ab34..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_8.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
- 5000
- 5000
-
-
-
-
- 4
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
- 0
- mcbr
- 1:3
-
-
- 1:3
- scbr
- 1:3
-
-
-
-
- 30000
-
- 1
-
-
- debug
- medium
- 1
-
- 1234
-
-
-
- OTG_1
-
diff --git a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_9.xml b/targets/SIMU/EXAMPLES/OSD/WEBXML/template_9.xml
deleted file mode 100644
index 6dcee26270..0000000000
--- a/targets/SIMU/EXAMPLES/OSD/WEBXML/template_9.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
- 5000
- 5000
-
-
-
-
- 3
-
- STATIC
-
-
- random
-
- 1
-
- STATIC
-
-
-
-
-
-
- 0
- gaming_OA
- 3
-
-
- 1:3
- udp
- ipv6
- 0
-
- gaussian
- 100
- 1000
- 4.5
-
- pareto
- 0.5
- 30
-
-
-
-
-
-
- 5000
-
-
- 1
-
-
- debug
- 1
-
- 1234
-
-
-
- OTG_2
-
diff --git a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/Makefile b/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/Makefile
deleted file mode 100644
index 6fdf92b93e..0000000000
--- a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/Makefile
+++ /dev/null
@@ -1,46 +0,0 @@
-#ifdef cygwin
-#cyg=cygwin
-#endif
-
-help:
- @echo "make one_eNB_two_UE_nas: compiles the code and performs a simulation with IP traffic between two virtual nodes (Linux only)"
- @echo "make one_eNB_one_UE: compiles the code and performs a small simulation (30 frames) with 1 eNB and 1 UE and checks that RLC data is transported between the two nodes after the connection setup"
- @echo "make one_eNB_four_UE: comples the code and performs a small simulation (60 frames) with 1 eNB and 4 UE and checks that all 4 UEs have established a complete connection (RRC output is traced)"
- @echo "make clean: Removes all .o files"
-
-all: help
-
-oaisim:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && $(MAKE) oaisim LINK_ENB_PDCP_TO_IP_DRIVER=1 OAI_NW_DRIVER_TYPE_ETHERNET=1 DEBUG=1)
-oaisim_nas:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && $(MAKE) oaisim OAI_NW_DRIVER_TYPE_ETHERNET=1 LINK_ENB_PDCP_TO_IP_DRIVER=1)
-nasmesh:
- (cd $(OPENAIR2_DIR) && make nasmesh_netlink_address_fix.ko)
- (cd $(OPENAIR2_DIR)/NAS/DRIVER/MESH/RB_TOOL && make)
-
-one_eNB_one_UE_nas: oaisim_nas nasmesh
- ./start_one_eNB_multi_UE_nas 1
-
-one_eNB_two_UE_nas: oaisim_nas nasmesh
- ./start_one_eNB_multi_UE_nas 2
-
-one_eNB_three_UE_nas: oaisim_nas nasmesh
- ./start_one_eNB_multi_UE_nas 3
-
-one_eNB_one_UE : oaisim
- ../../USER/oaisim -n30 | egrep SEND_SDU
-
-one_eNB_four_UE : oaisim
- ../../USER/oaisim -n60 -u4 | egrep "\[RRC\]"
-
-one_eNB_one_UE_PHY : oaisim_nas nasmesh
- ./start_one_eNB_two_UE_PHY_nas 2
-
-clean:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && make clean)
-
-echo_vars:
- echo $(OPENAIR1_DIR)
- echo $(OPENAIR2_DIR)
- echo $(OPENAIR3_DIR)
- echo $(OPENAIR_TARGETS)
diff --git a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/start_one_eNB_multi_UE_nas b/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/start_one_eNB_multi_UE_nas
deleted file mode 100755
index df8357c610..0000000000
--- a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/start_one_eNB_multi_UE_nas
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-echo "Bringup eNB interface"
-
-sudo rmmod nasmesh
-sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
-
-#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
-#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
-sudo ip route add 224.0.0.160/28 dev eth0
-
-
-echo "bring up oai0 interface for enb"
-sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
-echo "bring up oai1 interface for ue 1"
-sudo ifconfig oai1 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255
-
-# enb -> ue1
-$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
-# ue1 -> enb
-$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i1 -z0 -s 10.0.2.2 -t 10.0.2.1 -r 1
-
-if [ $1 -ge 2 ]; then
- echo "bring up oai2 interface for ue 2"
- sudo ifconfig oai2 10.0.3.3 netmask 255.255.255.0 broadcast 10.0.3.255
-
-# enb -> ue2
- $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 12
-# ue2 -> enb
- $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i2 -z0 -s 10.0.3.3 -t 10.0.3.1 -r 1
-fi
-
-if [ $1 -ge 3 ]; then
- echo "bring up oai3 interface for ue 3"
- sudo ifconfig oai3 10.0.4.4 netmask 255.255.255.0 broadcast 10.0.4.255
-
-# enb -> ue2
- $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.1.1 -t 10.0.1.4 -r 23
-# ue2 -> enb
- $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i3 -z0 -s 10.0.4.4 -t 10.0.4.1 -r 1
-fi
-
-if [ $1 -ge 4 ]; then
-
- echo "add oai interfaces for more UEs here"
-
-fi
-
-echo "start the emulation with 1eNB and" $1 "UE"
-echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -a -V -u" $1 ">/dev/null"
-$OPENAIR_TARGETS/SIMU/USER/oaisim -a -V -u $1 > /dev/null
-
-
-echo "End"
diff --git a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/start_one_eNB_two_UE_PHY_nas b/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/start_one_eNB_two_UE_PHY_nas
deleted file mode 100755
index 2646a7902f..0000000000
--- a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB/start_one_eNB_two_UE_PHY_nas
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-echo "Bringup eNB interface"
-
-sudo rmmod nasmesh
-sudo insmod $OPENAIR2_DIR/NAS/DRIVER/MESH/nasmesh.ko
-
-#avoid conflict with reserved multicast addresses (224.0.0.11,224.0.0.13, 224.0.0.16)
-#sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
-sudo ip route add 224.0.0.160/28 dev eth0
-
-
-echo "bring up oai0 interface for enb"
-sudo ifconfig oai0 10.0.1.1 netmask 255.255.255.0 broadcast 10.0.1.255
-echo "bring up oai1 interface for ue 1"
-sudo ifconfig oai1 10.0.2.2 netmask 255.255.255.0 broadcast 10.0.2.255
-
-# enb -> ue1
-$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i0 -z0 -s 10.0.1.1 -t 10.0.1.2 -r 1
-# ue1 -> enb
-$OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c0 -i1 -z0 -s 10.0.2.2 -t 10.0.2.1 -r 1
-
-if [ $1 -ge 2 ]; then
- echo "bring up oai2 interface for ue 2"
- sudo ifconfig oai2 10.0.3.3 netmask 255.255.255.0 broadcast 10.0.3.255
-
-# enb -> ue2
- $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i0 -z0 -s 10.0.1.1 -t 10.0.1.3 -r 12
-# ue2 -> enb
- $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c1 -i2 -z0 -s 10.0.3.3 -t 10.0.3.1 -r 1
-fi
-
-if [ $1 -ge 3 ]; then
- echo "bring up oai3 interface for ue 3"
- sudo ifconfig oai3 10.0.4.4 netmask 255.255.255.0 broadcast 10.0.4.255
-
-# enb -> ue2
- $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i0 -z0 -s 10.0.1.1 -t 10.0.1.4 -r 23
-# ue2 -> enb
- $OPENAIR2_DIR/NAS/DRIVER/MESH/RB_TOOL/rb_tool -a -c2 -i3 -z0 -s 10.0.4.4 -t 10.0.4.1 -r 1
-fi
-
-if [ $1 -ge 4 ]; then
-
- echo "add oai interfaces for more UEs here"
-
-fi
-
-echo "start the emulation with 1eNB and 2 UE"
-echo "$OPENAIR_TARGETS/SIMU/USER/oaisim -c40 > /dev/null"
-$OPENAIR_TARGETS/SIMU/USER/oaisim -c40 > /dev/null
-
-
-echo "End"
diff --git a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB_OAI_LITE/Makefile b/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB_OAI_LITE/Makefile
deleted file mode 100755
index 7cff6e66e6..0000000000
--- a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB_OAI_LITE/Makefile
+++ /dev/null
@@ -1,31 +0,0 @@
-
-all: oaisim naslite_netlink_ether
-
-oaisim:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && $(MAKE) oaisim OAI_NW_DRIVER_TYPE_ETHERNET=1 LINK_ENB_PDCP_TO_IP_DRIVER=1)
-
-naslite_netlink_ether:
- (cd $(OPENAIR2_DIR) && $(MAKE) naslite_netlink_ether.ko)
- (cd $(OPENAIR2_DIR)/NAS/DRIVER/LITE/RB_TOOL/ && $(MAKE))
-
-userclean: clean oaisim naslite_netlink_ether
-
-one_eNB_one_UE_nas: oaisim naslite_netlink_ether
- /bin/bash ./start_one_eNB_multi_UE_nas 1
-
-one_eNB_two_UE_nas: oaisim naslite_netlink_ether
- /bin/bash ./start_one_eNB_multi_UE_nas 2
-
-one_eNB_three_UE_nas: oaisim naslite_netlink_ether
- /bin/bash ./start_one_eNB_multi_UE_nas 3
-
-clean:
- (cd $(OPENAIR_TARGETS)/SIMU/USER && $(MAKE) clean)
- (cd $(OPENAIR2_DIR)/NAS/DRIVER/LITE && $(MAKE) clean)
-
-echo_vars:
- echo $(OPENAIR1_DIR)
- echo $(OPENAIR2_DIR)
- echo $(OPENAIR3_DIR)
- echo $(OPENAIR_TARGETS)
-
diff --git a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB_OAI_LITE/start_one_eNB_multi_UE_nas b/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB_OAI_LITE/start_one_eNB_multi_UE_nas
deleted file mode 100755
index 9074794228..0000000000
--- a/targets/SIMU/EXAMPLES/VIRT_EMUL_1eNB_OAI_LITE/start_one_eNB_multi_UE_nas
+++ /dev/null
@@ -1,531 +0,0 @@
-#!/bin/bash
-echo "Bash version ${BASH_VERSION}..."
-
-declare GENERATE_SEQ_DIAGRAM="no"
-declare LOG_FILE_LTE="no"
-#------------------------------------------------
-declare MAKE_IP_DRIVER_TARGET="naslite_netlink_ether"
-declare MAKE_LTE_ACCESS_STRATUM_TARGET="oaisim"
-declare IP_DRIVER_NAME="oai_nw_drv"
-#------------------------------------------------
-declare -a NAS_IMEI=( 3 9 1 8 3 6 6 2 0 0 0 0 0 0 )
-# first value is for ENB, then UE0, UE1, etc.
-declare -a MARKING=( 1 2 3 4 5 6 7 8 9 10 11 12 14 15 16 )
-# BE CAREFULL MAY NOT WORK WITH OTHER VALUES (TO DO)
-declare -i NUM_ENB=1
-#------------------------------------------------
-# Notes:
-# We would like to remove the ipv4 addresses swap in the IP driver code for oai virtualized.
-# Let's say oai0 has ipv4 @ 10.0.1.1, oai1 has ipv4 @ 10.0.2.2 etc.
-# In the past when we generated some local traffic on the computer and wanted to make it go
-# through for example oai1 to oai0, the ipv4 destination address was 10.0.2.1
-# meaning 10.0.2.2 wants to send a paquet to 10.0.1.1,
-# so ip_destination[2] has the digit corresponding to the source
-# so ip_destination[3] has the digit corresponding to the destination
-# then in the driver we modified at the receiving side (oai0 here) the ip source and destination
-# addresses in this way:
-# Originating packet: SRC 10.0.X.X -> 10.0.2.1
-# Resulting modified packet at the receiving side: SRC 10.0.1.2 -> 10.0.1.1
-# So the packet could be accepted by the device (same dest @) and the fake source was was recorded (1.2).
-# So the response to this packet could return to the interface by where the request was pulled.
-# But this solution lead to recompute checksums of packets in the driver.
-#
-# So here we describe a solution where packets are not modified by the IP driver but by the kernel:
-#
-# +---------------+ +---------------+ +---------------+
-# |APP "VIRTUALLY"| |APP "VIRTUALLY"| |APP "VIRTUALLY"| etc
-# |running on eNB | |running on UE0 | |running on UE1 |
-# |sending traffic| | | | |
-# | to UE 1 | | | | |
-# +---------------+ +---------------+ +---------------+
-# | ^ | ^ | ^
-# | | | | | |
-# Tx packet (n1) | | | Tx packet (n2) |
-# XXXX->10.0.1.3 | | | XXXX->10.0.1.3 |
-# | | | | | |
-# | Rx packet (n2) | | | Rx packet (n1)
-# | 10.0.1.3->10.0.1.1 | | | 10.0.3.1->10.0.3.3
-# V | V | V |
-# +-----------------------------------------------------------------------------+
-# | IPTABLES Table mangle chain OUTPUT TARGET MARK OPERATION setmark |
-# | On packets coming from applications |
-# |-----------------------------------------------------------------------------|
-# | Example for packet n1: |
-# | iptables -t mangle -A OUTPUT --dst 10.0.1.3 -j MARK --set-mark 0x0103 |
-# +-----------------------------------------------------------------------------+
-# | | | | | |
-# Tx packet (n1) | | | | |
-# XXXX->10.0.1.3 | | | | |
-# mark 0x0103 | | | | |
-# | | | | | |
-# V | V | V |
-# +-----------------------------------------------------------------------------+
-# | IPTABLES Table nat chain POSTROUTING TARGET SNAT OPERATION --to Fake IP SRC|
-# | On packets coming from applications |
-# |-----------------------------------------------------------------------------|
-# | Example for packet n1: |
-# | iptables -t nat -A POSTROUTING -m mark --mark 0x0103 -j SNAT --to 10.0.3.1 |
-# +-----------------------------------------------------------------------------+
-# | | | | | |
-# | | | | | Rx packet (n1)
-# | | | | | 10.0.3.1->10.0.3.3
-# | | | | | mark 0x0103
-# | | | | | |
-# +-----------------------------------------------------------------------------+
-# | IPTABLES Table mangle chain PREROUTING TARGET MARK OPERATION setmark |
-# | On packets coming from applications |
-# |-----------------------------------------------------------------------------|
-# | Example for packet n1: |
-# | iptables -t nat -A PREROUTING -m mark --mark 0x0103 -j DNAT --to 10.0.3.3 |
-# +-----------------------------------------------------------------------------+
-# | ^ | ^ | ^
-# | | | | | |
-# Tx packet (n1) | | | | Rx packet (n1)
-# 10.0.3.1->10.0.1.3 | | | 10.0.3.1->10.0.1.3
-# mark 0x0103 | | | | mark 0x0103
-# | | | | | |
-# +-----------------------------------------------------------------------------+
-# | IPTABLES Table mangle chain PREROUTING TARGET MARK OPERATION setmark |
-# | On packets coming from applications |
-# |-----------------------------------------------------------------------------|
-# | Example for packet n1: |
-# | iptables -t mangle -A PREROUTING --dst 10.0.1.3 -j MARK --set-mark 0x0103 |
-# +-----------------------------------------------------------------------------+
-# | ^ | ^ | ^
-# | | | | | Rx packet (n1)
-# | | | | | 10.0.3.1->10.0.1.3
-# | | | | | |
-# |10.0.1.1| |10.0.2.2| |10.0.3.3|
-# V | V | V |
-# +----------+ +----------+ +----------+
-# | oai0 | | oai1 | | oai2 |
-# | (eNB) | | (UE0) | | (UE1) |
-# +----------+ +----------+ +----------+
-
-####################################################################################
-# HERE IS A DISPLAY OF THE CONTENT OF THE NAT TABLE FOR THE DESCRIBED SETTING
-####################################################################################
-# Chain PREROUTING (policy ACCEPT 1108 packets, 242K bytes)
-# pkts bytes target prot opt in out source destination
-# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x102 to:10.0.2.2
-# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x103 to:10.0.3.3
-# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x201 to:10.0.1.1
-# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x203 to:10.0.3.3
-# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x301 to:10.0.1.1
-# 0 0 DNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x302 to:10.0.2.2
-#
-# Chain POSTROUTING (policy ACCEPT 2118 packets, 175K bytes)
-# pkts bytes target prot opt in out source destination
-# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x102 to:10.0.2.1
-# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x103 to:10.0.3.1
-# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x201 to:10.0.1.2
-# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x203 to:10.0.3.2
-# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x301 to:10.0.1.3
-# 0 0 SNAT all -- * * 0.0.0.0/0 0.0.0.0/0 mark match 0x302 to:10.0.2.3
-#
-# Chain OUTPUT (policy ACCEPT 2133 packets, 186K bytes)
-# pkts bytes target prot opt in out source destination
-####################################################################################
-# HERE IS A DISPLAY OF THE CONTENT OF THE MANGLE TABLE FOR THE DESCRIBED SETTING
-####################################################################################
-#root@hades:~# iptables -t mangle -nvL
-# Chain PREROUTING (policy ACCEPT 2008K packets, 316M bytes)
-# pkts bytes target prot opt in out source destination
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.1.2 MARK xset 0x102/0xffffffff
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.1.3 MARK xset 0x103/0xffffffff
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.2.1 MARK xset 0x201/0xffffffff
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.2.3 MARK xset 0x203/0xffffffff
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.3.1 MARK xset 0x301/0xffffffff
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.3.2 MARK xset 0x302/0xffffffff
-#
-# Chain INPUT (policy ACCEPT 2008K packets, 316M bytes)
-# pkts bytes target prot opt in out source destination
-#
-# Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
-# pkts bytes target prot opt in out source destination
-#
-# Chain OUTPUT (policy ACCEPT 1989K packets, 331M bytes)
-# pkts bytes target prot opt in out source destination
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.1.2 MARK xset 0x102/0xffffffff
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.1.3 MARK xset 0x103/0xffffffff
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.2.1 MARK xset 0x201/0xffffffff
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.2.3 MARK xset 0x203/0xffffffff
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.3.1 MARK xset 0x301/0xffffffff
-# 0 0 MARK all -- * * 0.0.0.0/0 10.0.3.2 MARK xset 0x302/0xffffffff
-#
-# Chain POSTROUTING (policy ACCEPT 1990K packets, 331M bytes)
-# pkts bytes target prot opt in out source destination
-#
-####################################################################################
-# We also avoid the manipulation of ipv4 ARP packets by setting ourselves the neighbour cache:
-####################################################################################
-#root@hades:~# ip neigh show
-#...
-#10.0.3.1 dev oai1 lladdr 00:39:18:36:62:00 PERMANENT
-#10.0.2.1 dev oai1 lladdr 00:39:18:36:62:00 PERMANENT
-#10.0.1.1 dev oai1 lladdr 00:39:18:36:62:00 PERMANENT
-#...
-#10.0.1.2 dev oai0 lladdr 00:39:18:36:62:01 PERMANENT
-#10.0.2.2 dev oai0 lladdr 00:39:18:36:62:01 PERMANENT
-#10.0.3.2 dev oai0 lladdr 00:39:18:36:62:01 PERMANENT
-#...
-#10.0.1.3 dev oai0 lladdr 00:39:18:36:62:02 PERMANENT
-#10.0.2.3 dev oai0 lladdr 00:39:18:36:62:02 PERMANENT
-#10.0.3.3 dev oai0 lladdr 00:39:18:36:62:02 PERMANENT
-
-#
-
-###########################################################
-IPTABLES=/sbin/iptables
-THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
-declare -x OPENAIR_DIR=""
-declare -x OPENAIR1_DIR=""
-declare -x OPENAIR2_DIR=""
-declare -x OPENAIR3_DIR=""
-declare -x OPENAIR_TARGETS=""
-###########################################################
-
-
-black='\E[30m'
-red='\E[31m'
-green='\E[32m'
-yellow='\E[33m'
-blue='\E[34m'
-magenta='\E[35m'
-cyan='\E[36m'
-white='\E[37m'
-
-ROOT_UID=0
-E_NOTROOT=67
-
-
-cecho() # Color-echo
- # arg1 = message
- # arg2 = color
-{
-local default_msg="No Message."
- message=${1:-$default_msg}
- color=${2:-$black}
- echo -e "$color"
- echo -n "$message"
- tput sgr0
- echo
- return
-}
-
-echo_error() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $red
-}
-
-echo_warning() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $yellow
-}
-
-echo_success() {
-local my_string=""
- until [ -z "$1" ]
- do
- my_string="$my_string$1"
- shift
- done
- cecho "$my_string" $green
-}
-
-set_openair() {
- path=`pwd`
- declare -i length_path
- declare -i index
- length_path=${#path}
-
- index=`echo $path | grep -b -o 'targets' | cut -d: -f1`
- #echo ${path%$token*}
- if [[ $index -lt $length_path && index -gt 0 ]]
- then
- declare -x OPENAIR_DIR
- index=`expr $index - 1`
- openair_path=`echo $path | cut -c1-$index`
- #openair_path=`echo ${path:0:$index}`
- export OPENAIR_DIR=$openair_path
- export OPENAIR1_DIR=$openair_path/openair1
- export OPENAIR2_DIR=$openair_path/openair2
- export OPENAIR3_DIR=$openair_path/openair3
- export OPENAIR_TARGETS=$openair_path/targets
- return 0
- fi
- return -1
-}
-
-bash_exec() {
- output=$($1 2>&1)
- result=$?
- if [ $result -eq 0 ]
- then
- echo_success "$1"
- else
- echo_error "$1: $output"
- fi
-}
-
-wait_process_started () {
- if [ -z "$1" ]
- then
- echo_error "WAITING FOR PROCESS START: NO PROCESS"
- return 1
- fi
- ps -C $1 > /dev/null 2>&1
- while [ $? -ne 0 ]; do
- echo_warning "WAITING FOR $1 START"
- sleep 2
- ps -C $1 > /dev/null 2>&1
- done
- echo_success "PROCESS $1 STARTED"
- return 0
-}
-
-assert() {
- # If condition false
- # exit from script with error message
- E_PARAM_ERR=98
- E_PARAM_FAILED=99
-
- if [ -z "$2" ] # Not enought parameters passed.
- then
- return $E_PARAM_ERR
- fi
-
- lineno=$2
- if [ ! $1 ]
- then
- echo "Assertion failed: \"$1\""
- echo "File \"$0\", line $lineno"
- exit $E_ASSERT_FAILED
- fi
-}
-
-ctrl_c() {
- bash_exec "pkill oaisim"
- bash_exec "ip link set $LTEIF down"
-
- bash_exec "rmmod $IP_DRIVER_NAME"
-
- bash_exec "$IPTABLES -P INPUT ACCEPT"
- bash_exec "$IPTABLES -F INPUT"
- bash_exec "$IPTABLES -P OUTPUT ACCEPT"
- bash_exec "$IPTABLES -F OUTPUT"
- bash_exec "$IPTABLES -P FORWARD ACCEPT"
- bash_exec "$IPTABLES -F FORWARD"
- bash_exec "$IPTABLES -t nat -F"
- bash_exec "$IPTABLES -t mangle -F"
- bash_exec "$IPTABLES -t filter -F"
- bash_exec "ip route flush cache"
-}
-
-
-set_openair
-cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
-cecho "OPENAIR1_DIR = $OPENAIR1_DIR" $green
-cecho "OPENAIR2_DIR = $OPENAIR2_DIR" $green
-cecho "OPENAIR3_DIR = $OPENAIR3_DIR" $green
-cecho "OPENAIR_TARGETS = $OPENAIR_TARGETS" $green
-
-
-declare -i NUM_MOBILES
-declare -i INSTANCE
-declare -i IP_SOURCE
-declare -i IP_DEST
-declare -i IP
-declare -i RB_ID
-declare -i CLASSIFIER_ID
-
-
-trap ctrl_c INT
-
-bash_exec "ip route flush cache"
-bash_exec "$IPTABLES -P INPUT ACCEPT"
-bash_exec "$IPTABLES -F INPUT"
-bash_exec "$IPTABLES -P OUTPUT ACCEPT"
-bash_exec "$IPTABLES -F OUTPUT"
-bash_exec "$IPTABLES -P FORWARD DROP"
-bash_exec "$IPTABLES -F FORWARD"
-bash_exec "$IPTABLES -t nat -F"
-bash_exec "$IPTABLES -t mangle -F"
-bash_exec "$IPTABLES -t filter -F"
-
-
-NUM_MOBILES=$1
-
-for ((i=0 ; i < `expr $NUM_MOBILES + $NUM_ENB`; i++ ))
-do
- TEST_OAI=`/sbin/ifconfig | grep oai$i | awk '{print $1}'`
- if [ "$TEST_OAI" = oai"$i"x ]; then
- bash_exec "ip link set oai$i down"
- fi
-done
-
-
-
-echo "Bringup OAI network interfaces"
-
-bash_exec "rmmod $IP_DRIVER_NAME"
-cecho "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET....." $green
-bash_exec "make $MAKE_IP_DRIVER_TARGET $MAKE_LTE_ACCESS_STRATUM_TARGET"
-bash_exec "insmod $OPENAIR2_DIR/NAS/DRIVER/LITE/$IP_DRIVER_NAME.ko oai_nw_drv_IMEI=${NAS_IMEI[0]},${NAS_IMEI[1]},${NAS_IMEI[2]},${NAS_IMEI[3]},${NAS_IMEI[4]},${NAS_IMEI[5]},${NAS_IMEI[6]},${NAS_IMEI[7]},${NAS_IMEI[8]},${NAS_IMEI[9]},${NAS_IMEI[10]},${NAS_IMEI[11]},${NAS_IMEI[12]},${NAS_IMEI[13]}"
-
-
-NUM_MOBILES=$1
-IP=1
-
-########################
-# #
-# CONFIGURE OAI IF #
-# #
-########################
-for ((i=0 ; i < `expr $NUM_MOBILES + $NUM_ENB`; i++ ))
-do
- bash_exec "ip link set oai$i broadcast ff:ff:ff:ff:ff:ff"
- bash_exec "ip link set oai$i up"
- sleep 1
-
- bash_exec "ifconfig oai$i 10.0.$IP.$IP netmask 255.255.255.0 broadcast 10.0.$IP.255"
-
- sleep 1
- bash_exec "ip addr add dev oai$i 2001:$IP::$IP/64"
-
- # avoid arp in virtualization
- for ((j=0 ; j <= $NUM_MOBILES ; j++ ))
- do
- if [[ $i -ne $j ]]
- then
- bash_exec "ip neighbour add to 10.0.$IP.$IP lladdr 00:${NAS_IMEI[0]}${NAS_IMEI[1]}:${NAS_IMEI[2]}${NAS_IMEI[3]}:${NAS_IMEI[4]}${NAS_IMEI[5]}:${NAS_IMEI[6]}${NAS_IMEI[7]}:${NAS_IMEI[8]}$i nud permanent dev oai$j"
- fi
- done
- let IP=IP+1
-done
-
-for ((src=0 ; src < `expr $NUM_ENB + $NUM_MOBILES` ; src++))
-do
- let IP_SRC=$src+1
- for ((dst=0 ; dst < `expr $NUM_ENB + $NUM_MOBILES` ; dst++))
- do
- if [[ $src -ne $dst ]]
- then
- let IP_DST=$dst+1
- let marksrc=${MARKING[$src]}
- marksrc16=`printf '%02x' $marksrc`
- let markdst=${MARKING[$dst]}
- markdst16=`printf '%02x' $markdst`
- bash_exec "iptables -t mangle -A OUTPUT --dst 10.0.$IP_SRC.$IP_DST -j MARK --set-mark 0x$marksrc16$markdst16"
- bash_exec "iptables -t nat -A POSTROUTING -m mark --mark 0x$marksrc16$markdst16 -j SNAT --to 10.0.$IP_DST.$IP_SRC"
-
- # we can use same mark since not same path (PREROUTING)
- bash_exec "iptables -t mangle -A PREROUTING --dst 10.0.$IP_SRC.$IP_DST -j MARK --set-mark 0x$marksrc16$markdst16"
- bash_exec "iptables -t nat -A PREROUTING -m mark --mark 0x$marksrc16$markdst16 -j DNAT --to 10.0.$IP_DST.$IP_DST"
- fi
- done
-done
-
-echo "########################################################################################"
-echo "# IPTABLES MANGLE #"
-echo "########################################################################################"
-iptables -t mangle -nvL
-echo "########################################################################################"
-echo "# IPTABLES NAT #"
-echo "########################################################################################"
-iptables -t nat -nvL
-
-########################
-# #
-# CONFIGURE RABS #
-# #
-########################
-# Loop Cx 0 -> NUM_MOBILES - 1 for configuring default RABS on eNB
-CLASSIFIER_ID=4
-for ((instance=0 ; instance < $NUM_ENB ; instance++ ))
-do
- let IP_SRC=instance+1
- for ((cx=0 ; cx < $NUM_MOBILES ; cx++ ))
- do
- let IP_DEST=cx+2
- if [[ $IP_SRC -ne $IP_DEST ]]
- then
- # ON eNB
- let RB_ID=(cx*8)+3
- bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c$cx -i$instance -f$CLASSIFIER_ID -z0 -s 10.0.$IP_DEST.$IP_SRC/32 -t 10.0.$IP_SRC.$IP_DEST/32 -r $RB_ID"
- let CLASSIFIER_ID=CLASSIFIER_ID+2
-
- # ON UE
- let IP_SOURCE=instance+1
- let instance_ue=cx+$NUM_ENB
- RB_ID=3
- bash_exec "$OPENAIR2_DIR/NAS/DRIVER/LITE/RB_TOOL/rb_tool -a -c$instance -i$instance_ue -f$CLASSIFIER_ID -z0 -s 10.0.$IP_SRC.$IP_DEST/32 -t 10.0.$IP_DEST.$IP_SRC/32 -r $RB_ID"
- let CLASSIFIER_ID=CLASSIFIER_ID+2
-
- # ON eNB
- bash_exec "ip neighbour add to 10.0.$IP_SRC.$IP_DEST lladdr 00:${NAS_IMEI[0]}${NAS_IMEI[1]}:${NAS_IMEI[2]}${NAS_IMEI[3]}:${NAS_IMEI[4]}${NAS_IMEI[5]}:${NAS_IMEI[6]}${NAS_IMEI[7]}:${NAS_IMEI[8]}$instance_ue nud permanent dev oai$instance"
-
- # ON UE
- bash_exec "ip neighbour add to 10.0.$IP_DEST.$IP_SRC lladdr 00:${NAS_IMEI[0]}${NAS_IMEI[1]}:${NAS_IMEI[2]}${NAS_IMEI[3]}:${NAS_IMEI[4]}${NAS_IMEI[5]}:${NAS_IMEI[6]}${NAS_IMEI[7]}:${NAS_IMEI[8]}$instance nud permanent dev oai$instance_ue"
- fi
- done
-done
-
-
-IP=1
-for ((i=0 ; i < `expr $NUM_MOBILES + $NUM_ENB`; i++ ))
-do
- # avoid arp in virtualization
- for ((j=0 ; j <= $NUM_MOBILES ; j++ ))
- do
- if [[ $i -ne $j ]]
- then
- bash_exec "ip neighbour add to 10.0.$IP.$IP lladdr 00:${NAS_IMEI[0]}${NAS_IMEI[1]}:${NAS_IMEI[2]}${NAS_IMEI[3]}:${NAS_IMEI[4]}${NAS_IMEI[5]}:${NAS_IMEI[6]}${NAS_IMEI[7]}:${NAS_IMEI[8]}$i nud permanent dev oai$j"
- fi
- done
- let IP=IP+1
-done
-
-# echo "start the emulation with 1eNB and" $1 "UE"
-if [ "$GENERATE_SEQ_DIAGRAM"x = yesx ]; then
- if [ -e /tmp/msc_log.txt ]; then
- bash_exec "rm -f /tmp/msc_log.txt"
- fi
-
- if [ "$LOG_FILE_LTE"x = yesx ]; then
- if [ -e /tmp/lte_log.txt ]; then
- bash_exec "rm -f /tmp/lte_log.txt"
- fi
- $OPENAIR_TARGETS/SIMU/USER/oaisim -a -u $1 > /tmp/lte_log.txt
- chmod 777 /tmp/lte_log.txt
- cat /tmp/lte_log.txt | grep MSC_ > /tmp/msc_log.txt
- else
- $OPENAIR_TARGETS/SIMU/USER/oaisim -a -u $1 | grep MSC_ > /tmp/msc_log.txt
- fi
- chmod 777 /tmp/msc_log.txt
- echo "End of emulation, now generating sequence diagrams..."
- $OPENAIR_TARGETS/SCRIPTS/msc_gen.py /tmp/msc_log.txt
-else
- if [ "$LOG_FILE_LTE"x = yesx ]; then
- if [ -e /tmp/lte_log.txt ]; then
- bash_exec "rm -f /tmp/lte_log.txt"
- fi
- $OPENAIR_TARGETS/SIMU/USER/oaisim -a -u $1 > /tmp/lte_log.txt
- chmod 777 /tmp/lte_log.txt
- else
- $OPENAIR_TARGETS/SIMU/USER/oaisim -a -u $1 -F -P wireshark > /tmp/lte_log.txt
- fi
- echo "End of emulation"
-fi
-
-
diff --git a/targets/SIMU/PROC/Process.c b/targets/SIMU/PROC/Process.c
deleted file mode 100644
index 9b529fd593..0000000000
--- a/targets/SIMU/PROC/Process.c
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "SIMULATION/TOOLS/defs.h"
-#include "SIMULATION/RF/defs.h"
-#include "PHY/types.h"
-#include "PHY/defs.h"
-#include "PHY/extern.h"
-#include "MAC_INTERFACE/extern.h"
-
-#ifdef OPENAIR2
-#include "LAYER2/MAC/defs.h"
-#include "LAYER2/MAC/extern.h"
-#include "PHY_INTERFACE/extern.h"
-#endif
-
-#include "../USER/oaisim.h"
-#include "channel_sim_proc.h"
-#include "interface.h"
-#include "Tsync.h"
-#include "Process.h"
-
-#define FILENAMEMAX 255
-
-//#define DEBUG_SIM
-void Process_Func(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
- node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms)
-{
-
- if(node_idlte_ue_common_vars.txdata,&PHY_vars_UE_g[0]->lte_ue_common_vars.rxdata,frame_parms);
-
- // Interface_init(port,node_id);
- char p_input[FILENAMEMAX];
- int fd_pipe;
- int fd_channel;
- mkfifo("/tmp/channel", 0666);
- fd_channel=open("/tmp/channel",O_RDWR,0);
- sprintf(p_input,"/tmp/pipe_%d",node_id);
- mkfifo(p_input, 0666);
- fd_pipe=open(p_input,O_RDWR,0);
- // IntInitAll();
- mac_xface->frame=0;
-
- while(1) {
- // wait_4slot(&slot,&mac_xface->frame);
- read(fd_pipe,&slot,sizeof(slot));
-
- last_slot = (slot - 1)%20;
-
- if (last_slot <0)
- last_slot+=20;
-
- next_slot = (slot + 1)%20;
-
- direction = subframe_select(frame_parms,next_slot>>1);
-#ifdef DEBUG_SIM
- printf("\n\n[SIM] EMU PHY procedures UE %d for frame %d, slot %d (subframe %d)\n",
- UE_id,mac_xface->frame, slot, (next_slot >> 1));
-#endif
-
- if (PHY_vars_UE_g[UE_id]->UE_mode[0] != NOT_SYNCHED) {
- if ((mac_xface->frame)>0) {
- phy_procedures_UE_lte ((last_slot),(next_slot), PHY_vars_UE_g[UE_id], 0, abstraction_flag);
- }
- } else {
- if (((mac_xface->frame)>0) && ((last_slot) == (SLOTS_PER_FRAME-1))) {
- initial_sync(PHY_vars_UE_g[UE_id]);
- }
- }
-
-
- if( direction == SF_UL || (direction == SF_S && next_slot%2!=0)) {
- do_OFDM_mod(PHY_vars_UE_g[UE_id]->lte_ue_common_vars.txdataF,PHY_vars_UE_g[UE_id]->lte_ue_common_vars.txdata,next_slot,&PHY_vars_UE_g[UE_id]->lte_frame_parms);
- }
-
- write(fd_channel,&node_id,sizeof(node_id));
-
- // send_exec_complete(CHANNEL_PORT);
- if(slot==19)
- (mac_xface->frame)++;
-
- }
-
-}
-
-void eNB_Inst(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
- node_desc_t *enb_data[NUMBER_OF_eNB_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms)
-{
- int next_slot,last_slot,slot=0,UE_id=0,eNB_id=0;
- lte_subframe_t direction;
- printf("eNB [ %d ] Starts \n",node_id);
-
- // init_mmap(node_id,frame_parms, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
- init_channel_vars (frame_parms, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
- mmap_enb(node_id,PHY_vars_eNB_g[0]->lte_eNB_common_vars.txdata,PHY_vars_eNB_g[0]->lte_eNB_common_vars.rxdata,frame_parms);
-
- // Interface_init(port,node_id);
- // IntInitAll();
- char p_input[FILENAMEMAX];
- int fd_pipe;
- int fd_channel;
-
- mkfifo("/tmp/channel", 0666);
- fd_channel=open("/tmp/channel",O_RDWR,0);
- sprintf(p_input,"/tmp/pipe_%d",node_id);
- mkfifo(p_input, 0666);
- fd_pipe=open(p_input, O_RDWR,0);
- mac_xface->frame=0;
-
- while(1) {
- // wait_4slot(&slot,&mac_xface->frame);
- read(fd_pipe,&slot,sizeof(slot));
-
- last_slot = (slot - 1)%20;
-
- if (last_slot <0)
- last_slot+=20;
-
- next_slot = (slot + 1)%20;
- direction = subframe_select(frame_parms,next_slot>>1);
-#ifdef DEBUG_SIM
- printf
- ("\n\n [SIM]EMU PHY procedures eNB %d for frame %d, slot %d (subframe %d) (rxdataF_ext %p) Nid_cell %d\n",
- eNB_id, mac_xface->frame, slot, next_slot >> 1,
- PHY_vars_eNB_g[0]->lte_eNB_ulsch_vars[0]->rxdataF_ext, PHY_vars_eNB_g[eNB_id]->lte_frame_parms.Nid_cell);
-#endif
- phy_procedures_eNB_lte (last_slot, next_slot, PHY_vars_eNB_g[eNB_id], abstraction_flag);
-
- if( direction == SF_DL || (direction == SF_S && next_slot%2==0)) {
- do_OFDM_mod(PHY_vars_eNB_g[eNB_id]->lte_eNB_common_vars.txdataF[0],
- PHY_vars_eNB_g[eNB_id]->lte_eNB_common_vars.txdata[0],
- next_slot,
- &PHY_vars_eNB_g[eNB_id]->lte_frame_parms);
- }
-
- write(fd_channel,&node_id,sizeof(node_id));
-
- // send_exec_complete(CHANNEL_PORT);
- if(slot==19)
- (mac_xface->frame)++;
- }
-
-}
-
-void Channel_Inst(int node_id,int port,double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
- double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
- channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms)
-{
-
- // Interface_init(port,node_id);
- // IntInitAll();
- mkfifo("/tmp/channel", 0666);
- fd_channel=open("/tmp/channel", O_RDWR ,0);
-
- int next_slot,last_slot,slot=0,UE_id=0,eNB_id=0;
- lte_subframe_t direction;
- char in_buffer[100];
-
- int ci,ji=0;
-
- for(ci=0; cithread_id=NUM_THREAD_DOWNLINK;
- u2e_t[UE_id][eNB_id]->eNB_id=eNB_id;
- u2e_t[UE_id][eNB_id]->UE_id=UE_id;
- u2e_t[UE_id][eNB_id]->r_re0=r_re0_d[UE_id][eNB_id];
- u2e_t[UE_id][eNB_id]->r_im0=r_im0_d[UE_id][eNB_id];
- u2e_t[UE_id][eNB_id]->r_re=r_re[NB_eNB_INST+UE_id];
- u2e_t[UE_id][eNB_id]->r_im=r_im[NB_eNB_INST+UE_id];
- u2e_t[UE_id][eNB_id]->s_im=s_im[eNB_id];
- u2e_t[UE_id][eNB_id]->s_re=s_re[eNB_id];
- u2e_t[UE_id][eNB_id]->eNB2UE=eNB2UE[eNB_id][UE_id];
- u2e_t[UE_id][eNB_id]->UE2eNB=UE2eNB[UE_id][eNB_id];
- u2e_t[UE_id][eNB_id]->enb_data=enb_data[eNB_id];
- u2e_t[UE_id][eNB_id]->ue_data=ue_data[UE_id];
- u2e_t[UE_id][eNB_id]->next_slot=&next_slot;
- u2e_t[UE_id][eNB_id]->abstraction_flag=&abstraction_flag;
- u2e_t[UE_id][eNB_id]->frame_parms=frame_parms;
-
- for (int i=0;i<3;i++)
- {
- u2e_t[UE_id][eNB_id]->tx_data[i]=tx[eNB_id][i];
- u2e_t[UE_id][eNB_id]->rx_data[i]=rx[NB_eNB_INST+UE_id][i];
- }
-
- if(pthread_cond_init (&downlink_cond[eNB_id][UE_id], NULL)) exit(1);
-
- if(pthread_mutex_lock(&downlink_mutex[eNB_id][UE_id])) exit(1);
-
- pthread_create (&cthr_d[UE_id][eNB_id], NULL, do_DL_sig_channel_T,(void*)(u2e_t[UE_id][eNB_id]));
- NUM_THREAD_DOWNLINK++;
- }
- }
-
- NUM_THREAD_UPLINK=0;
-
- for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
- for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
- e2u_t[eNB_id][UE_id]->thread_id=NUM_THREAD_UPLINK;
- e2u_t[eNB_id][UE_id]->eNB_id=eNB_id;
- e2u_t[eNB_id][UE_id]->UE_id=UE_id;
- e2u_t[eNB_id][UE_id]->r_re=r_re[eNB_id];
- e2u_t[eNB_id][UE_id]->r_im=r_im[eNB_id];
- e2u_t[eNB_id][UE_id]->r_re0=r_re0_u[eNB_id][UE_id];
- e2u_t[eNB_id][UE_id]->r_im0=r_im0_u[eNB_id][UE_id];
- e2u_t[eNB_id][UE_id]->s_im=s_im[NB_eNB_INST+UE_id];
- e2u_t[eNB_id][UE_id]->s_re=s_re[NB_eNB_INST+UE_id];
- e2u_t[eNB_id][UE_id]->eNB2UE=eNB2UE[eNB_id][UE_id];
- e2u_t[eNB_id][UE_id]->UE2eNB=UE2eNB[UE_id][eNB_id];
- e2u_t[eNB_id][UE_id]->enb_data=enb_data[eNB_id];
- e2u_t[eNB_id][UE_id]->ue_data=ue_data[UE_id];
- e2u_t[eNB_id][UE_id]->next_slot=&next_slot;
- e2u_t[eNB_id][UE_id]->abstraction_flag=&abstraction_flag;
- e2u_t[eNB_id][UE_id]->frame_parms=frame_parms;
- for (int i=0;i<3;i++)
- {
- e2u_t[eNB_id][UE_id]->tx_data[i]=tx[NB_eNB_INST+UE_id][i];
- e2u_t[eNB_id][UE_id]->rx_data[i]=rx[eNB_id][i];
- }
-
- if(pthread_cond_init (&uplink_cond[UE_id][eNB_id], NULL)) exit(1);
-
- if(pthread_mutex_lock(&uplink_mutex[UE_id][eNB_id])) exit(1);
-
- pthread_create (&cthr_u[eNB_id][UE_id], NULL, do_UL_sig_channel_T,(void*)e2u_t[eNB_id][UE_id]);
- NUM_THREAD_UPLINK++;
- }
- }
-}
-
-void Channel_DL(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
- double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
- channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
- int slot)
-{
-
- int count=0;
- int next_slot,last_slot,UE_id=0,eNB_id=0;
- lte_subframe_t direction;
- s32 **txdata,**rxdata;
- double tx_pwr, rx_pwr;
- s32 rx_pwr2;
- u32 i;
- u32 slot_offset;
-
- for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
- write(fd_NB[eNB_id],&slot,sizeof(slot));
- count++;
- //send_exec_msg(mac_xface->frame,slot,eNB_PORT+eNB_id);
- }
-
-
- while(count--) {
- int dummy=1;
- read(fd_channel,&dummy,sizeof(dummy));
- //wait_4Msg();
- }
-
-
-
-
- for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
- frame_parms = &PHY_vars_eNB_g[eNB_id]->lte_frame_parms;
- slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
- txdata =tx[eNB_id][0];
- tx_pwr = dac_fixed_gain(s_re[eNB_id],
- s_im[eNB_id],
- txdata,
- slot_offset,
- frame_parms->nb_antennas_tx,
- frame_parms->samples_per_tti>>1,
- 14,
- 40);
- printf("[SIM][DL] eNB %d: tx_pwr %f dB for slot %d (subframe %d)\n",eNB_id,10*log10(tx_pwr),nslot,nslot>>1);
- }
-
- _COT=0;
-
- for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
- for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
- if(pthread_cond_signal(&downlink_cond[eNB_id][UE_id])) exit(1);
-
- if(pthread_mutex_unlock(&downlink_mutex[eNB_id][UE_id])) exit(1);
- }
- }
-
- if(pthread_cond_wait(&downlink_cond_channel, &downlink_mutex_channel)) exit(1);
-
- for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
- Clean_Param(r_re[NB_eNB_INST+UE_id],r_im[NB_eNB_INST+UE_id],frame_parms);
-
- for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
- Channel_Out(SF_DL,eNB_id,UE_id,r_re[NB_eNB_INST+UE_id],r_im[NB_eNB_INST+UE_id],r_re0_d[UE_id][eNB_id],r_im0_d[UE_id][eNB_id],frame_parms);
- // adc_channel(eNB_id,UE_id,r_re[NB_eNB_INST+UE_id],r_im[NB_eNB_INST+UE_id]);
-
- }
- }
-
- count=0;
-
- for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++)
- if (mac_xface->frame >= (UE_id * 10)) {
- write(fd_NB[NB_eNB_INST+UE_id],&slot,sizeof(slot));
- //send_exec_msg(mac_xface->frame,slot,UE_PORT+UE_id);
- count++;
- }
-
- while(count--) {
- int dummy=1;
- read(fd_channel,&dummy,sizeof(dummy));
- //wait_4Msg();
- }
-
-}
-
-
-void Channel_UL(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
- double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
- channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
- int slot)
-{
- int count=0;
- int next_slot,last_slot,UE_id=0,eNB_id=0;
- lte_subframe_t direction;
- s32 **txdata,**rxdata;
- double tx_pwr, rx_pwr;
- s32 rx_pwr2;
- u32 i;
- u32 slot_offset;
-
- for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++)
- if (mac_xface->frame >= (UE_id * 10)) {
- write(fd_NB[NB_eNB_INST+UE_id],&slot,sizeof(slot));
- //send_exec_msg(mac_xface->frame,slot,UE_PORT+UE_id);
- count++;
- }
-
- while(count--) {
- int dummy=1;
- read(fd_channel,&dummy,sizeof(dummy));
- //wait_4Msg();
- }
-
-
-
- for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
- frame_parms = &PHY_vars_UE_g[UE_id]->lte_frame_parms;
- slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
- txdata =tx[NB_eNB_INST+UE_id][0]; //PHY_vars_UE_g[UE_id]->lte_ue_common_vars.txdata;
- tx_pwr = dac_fixed_gain(s_re[NB_eNB_INST+UE_id],
- s_im[NB_eNB_INST+UE_id],
- txdata,
- slot_offset,
- frame_parms->nb_antennas_tx,
- frame_parms->samples_per_tti>>1,
- 14,
- 18);
- printf("[SIM][UL] UE %d tx_pwr %f dB for slot %d (subframe %d)\n",UE_id,10*log10(tx_pwr),nslot,nslot>>1);
- rx_pwr = signal_energy_fp(s_re[NB_eNB_INST+UE_id],s_im[NB_eNB_INST+UE_id],frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
- printf("[SIM][UL] UE %d tx_pwr %f dB for slot %d (subframe %d)\n",UE_id,10*log10(rx_pwr),nslot,nslot>>1);
- }
-
- _COT_U=0;
-
- for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
- for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
- if ( pthread_cond_signal(&uplink_cond[UE_id][eNB_id])) exit(1);
-
- if ( pthread_mutex_unlock(&uplink_mutex[UE_id][eNB_id])) exit(1);
- }
- }
-
- if ( pthread_cond_wait(&uplink_cond_channel, &uplink_mutex_channel)) exit(1);
-
- for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
- Clean_Param(r_re[eNB_id],r_im[eNB_id],frame_parms);
-
- for (UE_id = 0; UE_id < (NB_UE_INST); UE_id++) {
- Channel_Out(SF_UL,eNB_id,UE_id,r_re[eNB_id],r_im[eNB_id],r_re0_u[eNB_id][UE_id],r_im0_u[eNB_id][UE_id],frame_parms);
- printf("[SIM][DL] eNB %d: tx_pwr %f dB for slot %d (subframe %d)\n",eNB_id,10*log10(tx_pwr),next_slot,next_slot>>1);
- }
- }
-
-
- count=0;
-
- for (eNB_id=0; eNB_id<(NB_eNB_INST); eNB_id++) {
- write(fd_NB[eNB_id],&slot,sizeof(slot));
- // send_exec_msg(mac_xface->frame,slot,eNB_PORT+eNB_id);
- count++;
- }
-
- while(count--) {
- int dummy=1;
- read(fd_channel,&dummy,sizeof(dummy));
- // wait_4Msg();
- }
-
-}
-
-void Channel_Func(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
- double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
- channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
- int slot)
-{
- int last_slot;
- lte_subframe_t direction;
-
- last_slot = (slot - 1)%20;
-
- if (last_slot <0)
- last_slot+=20;
-
- nslot = (slot + 1)%20;
-
- direction = subframe_select(frame_parms,nslot>>1);
-
- if( direction == SF_DL || (direction == SF_S && nslot%2==0)) {
- Channel_DL(s_re,s_im,r_re,r_im,r_re0,r_im0,r_re0_d,r_im0_d,r_re0_u,r_im0_u,eNB2UE,UE2eNB,enb_data,ue_data,abstraction_flag,frame_parms,slot);
- } else {
- Channel_UL(s_re,s_im,r_re,r_im,r_re0,r_im0,r_re0_d,r_im0_d,r_re0_u,r_im0_u,eNB2UE,UE2eNB,enb_data,ue_data,abstraction_flag,frame_parms,slot);
- }
-}
diff --git a/targets/SIMU/PROC/Process.h b/targets/SIMU/PROC/Process.h
deleted file mode 100644
index 71383f945f..0000000000
--- a/targets/SIMU/PROC/Process.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-#ifndef __PROCESS_H__
-# define __PROCESS_H__
-
-#include "interface.h"
-
-int32_t **tx[MAX_eNB+MAX_UE][3],**rx[MAX_eNB+MAX_UE][3];
-int nslot;
-
-void Process_Func(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
- node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms);
-
-void UE_Inst(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
- node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms);
-
-void eNB_Inst(int node_id,int port,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,
- node_desc_t *enb_data[NUMBER_OF_eNB_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms);
-
-void Channel_Inst(int node_id,int port,double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
- double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
- channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms);
-
-void Channel_DL(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
- double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
- channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
- int slot);
-
-void Channel_UL(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
- double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
- channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
- int slot);
-
-void Channel_Func(double **s_re[MAX_eNB+MAX_UE],double **s_im[MAX_eNB+MAX_UE],double **r_re[MAX_eNB+MAX_UE],double **r_im[MAX_eNB+MAX_UE],double **r_re0,double **r_im0,
- double **r_re0_d[MAX_UE][MAX_eNB],double **r_im0_d[MAX_UE][MAX_eNB],double **r_re0_u[MAX_eNB][MAX_UE],double **r_im0_u[MAX_eNB][MAX_UE],channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
- channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
- int slot);
-
-
-#endif
diff --git a/targets/SIMU/PROC/SCRIPT/Run.py b/targets/SIMU/PROC/SCRIPT/Run.py
deleted file mode 100755
index 9520508ff7..0000000000
--- a/targets/SIMU/PROC/SCRIPT/Run.py
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/usr/bin/env python
-import subprocess
-import optparse
-import re
-
-OPT=" "
-TERMINAL="gnome-terminal -x "
-TIME="time"
-
-def runBash(cmd):
- p = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
- out = p.stdout.read().strip()
- return out
-
-def main():
- global OPT,TIME,TERMINAL
- subprocess.call('ps | nawk \'/oaisim/ {system("kill " $1)}\'', shell=True)
- p = optparse.OptionParser()
- p.add_option('--eNB', '-b', default="1")
- p.add_option('--UE', '-u', default="1")
- p.add_option('--frame','-n', default="100")
- p.add_option('--terminal','-t', default="1")
- p.add_option('--time','--time', default="0")
- options, arguments = p.parse_args()
- print '---- Configuration ---- '
- print 'Number of eNB : %s' % options.eNB
- print 'Number of UE : %s' % options.UE
- if(options.terminal=='1'):
- OPT+=TERMINAL
- if(options.time=='1'):
- OPT+=TIME
-
- #CHANNEL= 'valgrind --tool=callgrind --collect-bus=yes --branch-sim=yes $OPENAIR_TARGETS/SIMU/USER/oaisim -X0 -b%s -u%s -n%s' % (options.eNB,options.UE,options.frame)
- CHANNEL= '$OPENAIR_TARGETS/SIMU/USER/oaisim -X0 -b%s -u%s -n%s' % (options.eNB,options.UE,options.frame)
- #subprocess.call(CHANNEL, shell=True)
- print CHANNEL
-
- nb_enb=int(options.eNB)
- nb_ue=int(options.UE)
- frame=int(options.frame)
-
- for x in xrange(0,nb_enb):
- ENB='%s $OPENAIR_TARGETS/SIMU/USER/oaisim -X1 -i%s &' % (OPT,x)
- print ENB
- subprocess.call(ENB,shell=True)
- subprocess.call('sleep 1', shell=True)
-
- for x in xrange(0,nb_ue):
- UE='%s $OPENAIR_TARGETS/SIMU/USER/oaisim -X2 -i%s &' % (OPT,x)
- print UE
- subprocess.call(UE,shell=True)
- subprocess.call('sleep 1', shell=True)
-
- # subprocess.call('sleep 2', shell=True)
- subprocess.call(CHANNEL, shell=True)
- # subprocess.call('ps | nawk \'/oaisim/ {system("kill " $1)}\'', shell=True)
-
-if __name__ == '__main__':
- main()
-
-
diff --git a/targets/SIMU/PROC/Tsync.h b/targets/SIMU/PROC/Tsync.h
deleted file mode 100644
index a6ffe11def..0000000000
--- a/targets/SIMU/PROC/Tsync.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-/*
- * Tsync.h
- *
- */
-#include
-#ifndef TSYNC_H_
-#define TSYNC_H_
-
-#define COMPILER_BARRIER() __asm__ __volatile__ ("" ::: "memory")
-int mycount;
-pthread_mutex_t exclusive;
-pthread_mutex_t downlink_mutex[MAX_eNB][MAX_UE];
-pthread_mutex_t downlink_mutex_channel;
-pthread_cond_t downlink_cond[MAX_eNB][MAX_UE];
-pthread_cond_t downlink_cond_channel;
-
-pthread_mutex_t uplink_mutex[MAX_UE][MAX_eNB];
-pthread_mutex_t uplink_mutex_channel;
-pthread_cond_t uplink_cond[MAX_UE][MAX_eNB];
-pthread_cond_t uplink_cond_channel;
-
-int COT;
-int COT_U;
-
-volatile int _COT;
-volatile int _COT_U;
-
-
-int NUM_THREAD_DOWNLINK;
-int NUM_THREAD_UPLINK;
-
-ch_thread *e2u_t[MAX_UE][MAX_eNB];
-ch_thread *u2e_t[MAX_UE][MAX_eNB];
-
-pthread_t cthr_u[MAX_eNB][MAX_UE];
-pthread_t cthr_d[MAX_eNB][MAX_UE];
-
-int fd_NB[MAX_eNB+MAX_UE];
-int fd_channel;
-
-
-#endif /* TSYNC_H_ */
diff --git a/targets/SIMU/PROC/channel_sim_proc.c b/targets/SIMU/PROC/channel_sim_proc.c
deleted file mode 100644
index dd0adec0d2..0000000000
--- a/targets/SIMU/PROC/channel_sim_proc.c
+++ /dev/null
@@ -1,677 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "SIMULATION/TOOLS/defs.h"
-#include "SIMULATION/RF/defs.h"
-#include "PHY/types.h"
-#include "PHY/defs.h"
-#include "PHY/extern.h"
-#include "MAC_INTERFACE/extern.h"
-
-#ifdef OPENAIR2
-#include "LAYER2/MAC/defs.h"
-#include "LAYER2/MAC/extern.h"
-#include "UTIL/LOG/log_if.h"
-#include "RRC/LITE/extern.h"
-#include "PHY_INTERFACE/extern.h"
-#endif
-
-#include "../USER/oaisim.h"
-
-#include "channel_sim_proc.h"
-#include "interface.h"
-#include "Tsync.h"
-#include "Process.h"
-#define RF
-//#define DEBUG_SIM
-
-
-void init_rre(LTE_DL_FRAME_PARMS *frame_parms,double ***r_re0,double ***r_im0)
-{
-
- int i;
-
- (*r_re0) = malloc(2*sizeof(double*));
- (*r_im0) = malloc(2*sizeof(double*));
-
- for (i=0; i<2; i++) {
- (*r_re0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- bzero((*r_re0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- (*r_im0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- bzero((*r_im0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- }
-
-
-}
-
-void mmap_enb(int id,int **tx_data[3],int **rx_data[3],LTE_DL_FRAME_PARMS *frame_parms)
-{
-
-
- int i;
- int fd[20];
- int result;
- unsigned int FILESIZE;
-
- FILESIZE=FRAME_LENGTH_COMPLEX_SAMPLES*(sizeof(s32));
-
- char buffer[100];
- int j=0,k=0;
-
- char sect=1;
-
- for(k=0; keNB_id);
- UE_i=(cthread->UE_id);
- r_re0=cthread->r_re0;
- r_re=cthread->r_re;
- r_im=cthread->r_im;
- r_im0=cthread->r_im0;
- s_im=cthread->s_im;
- s_re=cthread->s_re;
- eNB2UE[eNB_i][UE_i]=cthread->eNB2UE;
- enb_data[0]=(cthread->enb_data);
- enb_data_2[eNB_i]=cthread->enb_data;
-
- ue_data[UE_i]=cthread->ue_data;
- frame_parms=cthread->frame_parms;
- next_slot=(cthread->next_slot);
- abstraction_flag=*(cthread->abstraction_flag);
- thread_id=(cthread->thread_id);
-
- for (int i=0;i<3;i++)
- {
- tx_data[i]=cthread->tx_data[i];
- rx_data[i]=cthread->rx_data[i];
- }
-
- s32 att_eNB_id=-1;
- s32 **txdata,**rxdata;
-
- double tx_pwr, rx_pwr;
- s32 rx_pwr2;
- u32 i,aa;
- u32 slot_offset;
-
- while(1) {
-
- if(pthread_cond_wait(&downlink_cond[eNB_i][UE_i], &downlink_mutex[eNB_i][UE_i])) exit(1);
-
- slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
- // pthread_mutex_lock(&exclusive);
-
- multipath_channel(eNB2UE[eNB_i][UE_i],s_re,s_im,r_re0,r_im0,
- frame_parms->samples_per_tti>>1,0);
-
-
- rx_pwr = signal_energy_fp2(eNB2UE[eNB_i][UE_i]->ch[0],eNB2UE[eNB_i][UE_i]->channel_length)*eNB2UE[eNB_i][UE_i]->channel_length;
-
- printf("[SIM][DL] Channel eNB %d => UE %d : tx_power %f dBm, path_loss %f dB\n",
- eNB_i,UE_i,
- enb_data_2[eNB_i]->tx_power_dBm,
- eNB2UE[eNB_i][UE_i]->path_loss_dB);
- printf("[SIM][DL] Channel eNB %d => UE %d : Channel gain %f dB (%f)\n",eNB_i,UE_i,10*log10(rx_pwr),rx_pwr);
-
- rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
-
- printf("[SIM][DL] UE %d : rx_pwr %f dB for slot %d (subframe %d)\n",UE_i,10*log10(rx_pwr),nslot,nslot>>1);
-
- if (eNB2UE[eNB_i][UE_i]->first_run == 1)
- eNB2UE[eNB_i][UE_i]->first_run = 0;
-
- rf_rx(r_re0,
- r_im0,
- NULL,
- NULL,
- 0,
- frame_parms->nb_antennas_rx,
- frame_parms->samples_per_tti>>1,
- 1e3/eNB2UE[eNB_i][UE_i]->BW, // sampling time (ns)
- 0.0, // freq offset (Hz) (-20kHz..20kHz)
- 0.0, // drift (Hz) NOT YET IMPLEMENTED
- ue_data[UE_i]->rx_noise_level, // noise_figure NOT YET IMPLEMENTED
- 110.00 - 66.227, // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
- 200, // IP3_dBm (dBm)
- &eNB2UE[eNB_i][UE_i]->ip, // initial phase
- 30.0e3, // pn_cutoff (kHz)
- -500.0, // pn_amp (dBc) default: 50
- 0.0, // IQ imbalance (dB),
- 0.0); // IQ phase imbalance (rad)
-
- rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
-
- printf("[SIM][DL] UE %d : ADC in (eNB %d) %f dB for slot %d (subframe %d)\n",UE_i,eNB_i,10*log10(rx_pwr),nslot,nslot>>1);
- //count = __sync_add_and_fetch(&_COT, 1);
- //COMPILER_BARRIER();
-
- if (pthread_mutex_lock(&downlink_mutex_channel)) exit(1);
-
- _COT++;
-
- if(_COT==NUM_THREAD_DOWNLINK) {
- // if(count==NUM_THREAD_DOWNLINK){
- if(pthread_cond_signal(&downlink_cond_channel)) exit(1);
- }
-
- if(pthread_mutex_unlock(&downlink_mutex_channel)) exit(1);
-
- // pthread_mutex_unlock(&exclusive);
- }
-
-
-}
-
-void do_UL_sig_channel_T(void *param)
-{
-
- ch_thread* cthread = (ch_thread*)param;
- int count=0;
- u8 eNB_i,UE_i;
- double **r_re0,**r_re,**r_im,**r_im0,**s_re,**s_im;
- channel_desc_t *UE2eNB[8][3];
- node_desc_t *enb_data2[3];
- node_desc_t *ue_data[8];
- u16 next_slot,abstraction_flag;
- LTE_DL_FRAME_PARMS *frame_parms;
- int thread_id;
-
- eNB_i=(cthread->eNB_id);
- UE_i=(cthread->UE_id);
- r_re0=cthread->r_re0;
- r_re=cthread->r_re;
- r_im=cthread->r_im;
- r_im0=cthread->r_im0;
- s_im=cthread->s_im;
- s_re=cthread->s_re;
- UE2eNB[UE_i][eNB_i]=cthread->UE2eNB;
- enb_data2[eNB_i]=cthread->enb_data;
- ue_data[UE_i]=cthread->ue_data;
- next_slot=*(cthread->next_slot);
- abstraction_flag=*(cthread->abstraction_flag);
- frame_parms=cthread->frame_parms;
- thread_id=(cthread->thread_id);
-
- s32 **txdata,**rxdata;
-
- u8 UE_id=0,eNB_id=0,aa;
- double tx_pwr, rx_pwr;
- s32 rx_pwr2;
- u32 i;
- u32 slot_offset;
- double nf = 0; //currently unused
-
-
- while(1) {
-
- slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
-
- if(pthread_cond_wait(&uplink_cond[UE_i][eNB_i], &uplink_mutex[UE_i][eNB_i])) exit(1);//[UE_i][eNB_i]);
-
- // pthread_mutex_lock(&exclusive);
-
- multipath_channel(UE2eNB[UE_i][eNB_i],s_re,s_im,r_re0,r_im0,
- frame_parms->samples_per_tti>>1,0);
-
- printf("[SIM][UL] Channel UE %d => eNB %d : %f dB\n",UE_i,eNB_i,10*log10(rx_pwr));
-
- rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
-
- printf("[SIM][UL] eNB %d : eNB out %f dB for slot %d (subframe %d), sptti %d\n",eNB_i,10*log10(rx_pwr),nslot,nslot>>1,frame_parms->samples_per_tti);
-
- if (UE2eNB[UE_i][eNB_i]->first_run == 1)
- UE2eNB[UE_i][eNB_i]->first_run = 0;
-
-
- // RF model
- rf_rx(r_re0,
- r_im0,
- NULL,
- NULL,
- 0,
- frame_parms->nb_antennas_rx,
- frame_parms->samples_per_tti>>1,
- (UE_id==0) ? (1.0/7.68e6 * 1e9) : 1e9, // sampling time (ns) + set noise bandwidth to 0 for UE>0 (i.e. no noise except for first UE)
- 0.0, // freq offset (Hz) (-20kHz..20kHz)
- 0.0, // drift (Hz) NOT YET IMPLEMENTED
- nf, // noise_figure NOT YET IMPLEMENTED
- 150.00 - 66.227, // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
- 200, // IP3_dBm (dBm)
- &UE2eNB[UE_i][eNB_i]->ip, // initial phase
- 30.0e3, // pn_cutoff (kHz)
- -500.0, // pn_amp (dBc) default: 50
- 0.0, // IQ imbalance (dB),
- 0.0); // IQ phase imbalance (rad)
-
-
- rx_pwr = signal_energy_fp(r_re,r_im,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
-
- printf("[SIM][UL] rx_pwr (ADC in) %f dB for slot %d (subframe %d)\n",10*log10(rx_pwr),nslot,nslot>>1);
-
- // count = __sync_add_and_fetch(&_COT_U, 1);
- // COMPILER_BARRIER();
-
- if (pthread_mutex_lock(&uplink_mutex_channel)) exit(1);
-
- _COT_U++;
-
- if(_COT_U==NUM_THREAD_UPLINK) {
- //if(count==NUM_THREAD_UPLINK){
- if (pthread_cond_signal(&uplink_cond_channel)) exit(1);
- }
-
- if(pthread_mutex_unlock(&uplink_mutex_channel)) exit(1);
-
- // pthread_mutex_unlock(&exclusive);
-
- }
-
-}
-
-void Clean_Param(double **r_re,double **r_im,LTE_DL_FRAME_PARMS *frame_parms)
-{
- u32 i,aa;
-
- for (i=0; i<(frame_parms->samples_per_tti>>1); i++) {
- for (aa=0; aanb_antennas_rx; aa++) {
- r_re[aa][i]=0.0;
- r_im[aa][i]=0.0;
- }
- }
-}
-
-void Channel_Out(lte_subframe_t direction,int eNB_id,int UE_id,double **r_re,double **r_im,double **r_re0,double **r_im0,LTE_DL_FRAME_PARMS *frame_parms)
-{
- u32 i,aa;
- double alpha=0.0;
- u32 slot_offset;
- frame_parms = &PHY_vars_UE_g[0]->lte_frame_parms;
- slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
- s32 rx_pwr2;
- s32 **rxdata;
-
- if(eNB_id==(UE_id % NB_eNB_INST))
- alpha=1;
-
- for (i=0; i<(frame_parms->samples_per_tti>>1); i++) {
- for (aa=0; aanb_antennas_rx; aa++) {
- r_re[aa][i]+=(r_re0[aa][i]*alpha);
- r_im[aa][i]+=(r_im0[aa][i]*alpha);
-
- }
- }
-
- rxdata=rx[eNB_id][0];
-
- if (direction == SF_DL ) {
- frame_parms = &PHY_vars_eNB_g[0]->lte_frame_parms;
- slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
- adc(r_re,
- r_im,
- 0,
- slot_offset,
- rx[NB_eNB_INST+UE_id][0],
- frame_parms->nb_antennas_rx,
- frame_parms->samples_per_tti>>1,
- 12);
- } else {
- frame_parms = &PHY_vars_UE_g[0]->lte_frame_parms;
- slot_offset = (nslot)*(frame_parms->samples_per_tti>>1);
- adc(r_re,
- r_im,
- 0,
- slot_offset,
- rx[eNB_id][0],
- frame_parms->nb_antennas_rx,
- frame_parms->samples_per_tti>>1,
- 12);
- }
-
-
- rx_pwr2 = signal_energy(rxdata[0]+slot_offset,frame_parms->samples_per_tti>>1);
- // printf("[SIM][DL/UL] UE/eNB %d : rx_pwr (ADC out) %f dB (%d) for slot %d (subframe %d), writing to %p\n",UE_id, 10*log10((double)rx_pwr2),rx_pwr2,nslot,nslot>>1,rxdata);
-}
-
-/*
-void do_UL_sig_channel(u8 eNB_i,u8 UE_i,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX],u16 next_slot,u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms) {
-
- s32 **txdata,**rxdata;
-
- u8 UE_id=0,eNB_id=0,aa;
- double tx_pwr, rx_pwr;
- s32 rx_pwr2;
- u32 i;
- u32 slot_offset;
- double nf = 0; //currently unused
-
- slot_offset = (next_slot)*(frame_parms->samples_per_tti>>1);
-
- multipath_channel(UE2eNB[UE_i][eNB_i],s_re,s_im,r_re0,r_im0,
- frame_parms->samples_per_tti>>1,0);
-
-
- rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
-
- if (UE2eNB[UE_i][eNB_i]->first_run == 1)
- UE2eNB[UE_i][eNB_i]->first_run = 0;
-
-
- // RF model
- rf_rx(r_re0,
- r_im0,
- NULL,
- NULL,
- 0,
- frame_parms->nb_antennas_rx,
- frame_parms->samples_per_tti>>1,
- (UE_id==0) ? (1.0/7.68e6 * 1e9) : 1e9, // sampling time (ns) + set noise bandwidth to 0 for UE>0 (i.e. no noise except for first UE)
- 0.0, // freq offset (Hz) (-20kHz..20kHz)
- 0.0, // drift (Hz) NOT YET IMPLEMENTED
- nf, // noise_figure NOT YET IMPLEMENTED
- 150.00 - 66.227, // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
- 200, // IP3_dBm (dBm)
- &UE2eNB[UE_i][eNB_i]->ip, // initial phase
- 30.0e3, // pn_cutoff (kHz)
- -500.0, // pn_amp (dBc) default: 50
- 0.0, // IQ imbalance (dB),
- 0.0); // IQ phase imbalance (rad)
-
-
- rx_pwr = signal_energy_fp(r_re,r_im,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
- printf("[SIM][UL] rx_pwr (ADC in) %f dB for slot %d (subframe %d)\n",10*log10(rx_pwr),next_slot,next_slot>>1);
-
-}
-*/
-
-/*
-void do_DL_sig_channel(u8 eNB_i,u8 UE_i,double **r_re0,double **r_im0,double **r_re,double **r_im,double **s_re,double **s_im,channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX],
-node_desc_t *enb_data[NUMBER_OF_eNB_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX], u16 next_slot,u8 abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms) {
- s32 att_eNB_id=-1;
- s32 **txdata,**rxdata;
-
- u8 eNB_id=0,UE_id=0;
- double tx_pwr, rx_pwr;
- s32 rx_pwr2;
- u32 i,aa;
- u32 slot_offset;
-
-
- multipath_channel(eNB2UE[eNB_i][UE_i],s_re,s_im,r_re0,r_im0,
- frame_parms->samples_per_tti>>1,0);
-
- rx_pwr = signal_energy_fp2(eNB2UE[eNB_i][UE_i]->ch[0],eNB2UE[eNB_i][UE_i]->channel_length)*eNB2UE[eNB_i][UE_i]->channel_length;
-
-
- printf("[SIM][DL] Channel eNB %d => UE %d : tx_power %f dBm, path_loss %f dB\n",
- eNB_i,UE_i,
- enb_data[eNB_id]->tx_power_dBm,
- eNB2UE[eNB_id][UE_id]->path_loss_dB);
- printf("[SIM][DL] Channel eNB %d => UE %d : Channel gain %f dB (%f)\n",eNB_id,UE_id,10*log10(rx_pwr),rx_pwr);
-
- rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
- printf("[SIM][DL] UE %d : rx_pwr %f dB for slot %d (subframe %d)\n",UE_id,10*log10(rx_pwr),next_slot,next_slot>>1);
-
- if (eNB2UE[eNB_id][UE_id]->first_run == 1)
- eNB2UE[eNB_id][UE_id]->first_run = 0;
-
- rf_rx(r_re0,
- r_im0,
- NULL,
- NULL,
- 0,
- frame_parms->nb_antennas_rx,
- frame_parms->samples_per_tti>>1,
- 1e3/eNB2UE[eNB_i][UE_i]->BW, // sampling time (ns)
- 0.0, // freq offset (Hz) (-20kHz..20kHz)
- 0.0, // drift (Hz) NOT YET IMPLEMENTED
- ue_data[UE_id]->rx_noise_level, // noise_figure NOT YET IMPLEMENTED
- 110.00 - 66.227, // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
- 200, // IP3_dBm (dBm)
- &eNB2UE[eNB_i][UE_i]->ip, // initial phase
- 30.0e3, // pn_cutoff (kHz)
- -500.0, // pn_amp (dBc) default: 50
- 0.0, // IQ imbalance (dB),
- 0.0); // IQ phase imbalance (rad)
-
- rx_pwr = signal_energy_fp(r_re0,r_im0,frame_parms->nb_antennas_rx,frame_parms->samples_per_tti>>1,0);
- printf("[SIM][DL] UE %d : ADC in (eNB %d) %f dB for slot %d (subframe %d)\n",UE_id,eNB_id,10*log10(rx_pwr),next_slot,next_slot>>1);
-
-}
-
-*/
-
-
-/*
-void init_mmap_channel(int id,LTE_DL_FRAME_PARMS *frame_parms, double ***s_re,double ***s_im,double ***r_re,double ***r_im,double ***r_re0,double ***r_im0) {
-
- int i;
- int fd[20];
- int result;
- double *map;
- unsigned int FILESIZE;
-
- FILESIZE=FRAME_LENGTH_COMPLEX_SAMPLES*(sizeof(double));
-
- (*s_re) = malloc(2*sizeof(double*));
- (*s_im) = malloc(2*sizeof(double*));
- (*r_re) = malloc(2*sizeof(double*));
- (*r_im) = malloc(2*sizeof(double*));
- (*r_re0) = malloc(2*sizeof(double*));
- (*r_im0) = malloc(2*sizeof(double*));
-
- char buffer[100];
- int j=0;
- for (i=0;i<2;i++) {
-
- sprintf(buffer,"/tmp/s_re_%d_%d.bin",id,i);
- fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
- result = lseek(fd[j], FILESIZE-1, SEEK_SET);
- result = write(fd[j], "", 1);
- (*s_re)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
-
- j++;
-
- sprintf(buffer,"/tmp/s_im_%d_%d.bin",id,i);
- fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
- result = lseek(fd[j], FILESIZE-1, SEEK_SET);
- result = write(fd[j], "", 1);
- (*s_im)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
-
- j++;
-
- sprintf(buffer,"/tmp/r_re_%d_%d.bin",id,i);
- fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
- result = lseek(fd[j], FILESIZE-1, SEEK_SET);
- result = write(fd[j], "", 1);
- (*r_re)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
-
- j++;
-
-
- sprintf(buffer,"/tmp/r_im_%d_%d.bin",id,i);
- fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
- result = lseek(fd[j], FILESIZE-1, SEEK_SET);
- result = write(fd[j], "", 1);
- (*r_im)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
-
- j++;
- }
-
- for (i=0;i<2;i++) {
- (*r_re0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- bzero((*r_re0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- (*r_im0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- bzero((*r_im0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- }
-
-}
-
-void init_mmap(int id,LTE_DL_FRAME_PARMS *frame_parms, double ***s_re,double ***s_im,double ***r_re,double ***r_im,double ***r_re0,double ***r_im0) {
-
- int i;
- int fd[20];
- int result;
- double *map;
- unsigned int FILESIZE;
-
- FILESIZE=FRAME_LENGTH_COMPLEX_SAMPLES*(sizeof(double));
-
- *s_re = malloc(2*sizeof(double*));
- *s_im = malloc(2*sizeof(double*));
- *r_re = malloc(2*sizeof(double*));
- *r_im = malloc(2*sizeof(double*));
- *r_re0 = malloc(2*sizeof(double*));
- *r_im0 = malloc(2*sizeof(double*));
- char buffer[100];
- int j=0;
- for (i=0;i<2;i++) {
-
- sprintf(buffer,"/tmp/s_re_%d_%d.bin",id,i);
- fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
- result = lseek(fd[j], FILESIZE-1, SEEK_SET);
- result = write(fd[j], "", 1);
- (*s_re)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
-
- j++;
-
- sprintf(buffer,"/tmp/s_im_%d_%d.bin",id,i);
- fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
- result = lseek(fd[j], FILESIZE-1, SEEK_SET);
- result = write(fd[j], "", 1);
- (*s_im)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
-
- j++;
-
- sprintf(buffer,"/tmp/r_re_%d_%d.bin",id,i);
- fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
- result = lseek(fd[j], FILESIZE-1, SEEK_SET);
- result = write(fd[j], "", 1);
- (*r_re)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
-
- j++;
-
- sprintf(buffer,"/tmp/r_im_%d_%d.bin",id,i);
- fd[j] = open(buffer, O_RDWR | O_CREAT | O_TRUNC, (mode_t)0600);
- result = lseek(fd[j], FILESIZE-1, SEEK_SET);
- result = write(fd[j], "", 1);
- (*r_im)[i] = mmap(0, FILESIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd[j], 0);
-
- j++;
- }
-
- for (i=0;i<2;i++) {
-
- (*r_re0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- bzero((*r_re0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- (*r_im0)[i] = malloc(FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- bzero((*r_im0)[i],FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(double));
- }
-
-
-}
-*/
-
diff --git a/targets/SIMU/PROC/channel_sim_proc.h b/targets/SIMU/PROC/channel_sim_proc.h
deleted file mode 100644
index 1d5b53a189..0000000000
--- a/targets/SIMU/PROC/channel_sim_proc.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-/*
- * channel_sim_proc.h
- *
- */
-
-#ifndef CHANNEL_SIM_PROC_H_
-#define CHANNEL_SIM_PROC_H_
-
-void mmap_enb(int id,int **tx_data[3],int **rx_data[3],LTE_DL_FRAME_PARMS *frame_parms);
-
-void mmap_ue(int id,int ***tx_data,int ***rx_data,LTE_DL_FRAME_PARMS *frame_parms);
-
-void Clean_Param(double **r_re,double **r_im,LTE_DL_FRAME_PARMS *frame_parms);
-
-void do_DL_sig_channel_T(void *param);
-
-void do_UL_sig_channel_T(void *param);
-
-void init_rre(LTE_DL_FRAME_PARMS *frame_parms,double ***r_re0,double ***r_im0);
-
-void Channel_Out(lte_subframe_t direction,int eNB_id,int UE_id,double **r_re,double **r_im,double **r_re0,double **r_im0,LTE_DL_FRAME_PARMS *frame_parms);
-
-#endif /* CHANNEL_SIM_PROC_H_ */
-
diff --git a/targets/SIMU/PROC/interface.h b/targets/SIMU/PROC/interface.h
deleted file mode 100644
index 4c00d9d6f3..0000000000
--- a/targets/SIMU/PROC/interface.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-#ifndef __INTERFACE_H__
-# define __INTERFACE_H__
-
-
-typedef struct {
- void* pointer;
-} memory_reference_t2;
-
-
-
-typedef struct {
- memory_reference_t2 mem_ref;
-} obj_ref_t2;
-
-typedef struct {
- obj_ref_t2 *gm;
-} HO;
-
-
-typedef struct {
- void* pointer;
- int port;
- int Exec_Msg_Flag;
- int node_id;
- int node_role ;
- int next_slot;
- int last_slot;
- int frame;
- int sub_frame;
- int slot;
- int Exec_FLAG;
- int EResp_FLAG;
- int ue_id;
-} s_t;
-
-HO Instance[3];
-
-
-typedef struct {
- int thread_id;
- int eNB_id;
- int UE_id;
- double **s_re;
- double **s_im;
- double **r_re;
- double **r_im;
- double **r_re0;
- double **r_im0;
- struct channel_desc_t *eNB2UE;
- struct channel_desc_t *UE2eNB;
- struct node_desc_t *enb_data;
- struct node_desc_t *ue_data;
- int *next_slot;
- int *abstraction_flag;
- struct LTE_DL_FRAME_PARMS *frame_parms;
- int **tx_data[3];
- int **rx_data[3];
-} ch_thread;
-
-
-#define CHANNEL_PORT 37800
-#define eNB_PORT 38800
-#define UE_PORT 39800
-#define MAX_eNB 20
-#define MAX_UE 20
-#endif
diff --git a/targets/SIMU/USER/.ue.nvram b/targets/SIMU/USER/.ue.nvram
deleted file mode 100644
index 17469c87ad..0000000000
Binary files a/targets/SIMU/USER/.ue.nvram and /dev/null differ
diff --git a/targets/SIMU/USER/.ue_emm.nvram b/targets/SIMU/USER/.ue_emm.nvram
deleted file mode 100644
index e858ba8cce..0000000000
Binary files a/targets/SIMU/USER/.ue_emm.nvram and /dev/null differ
diff --git a/targets/SIMU/USER/.usim.nvram b/targets/SIMU/USER/.usim.nvram
deleted file mode 100644
index 4e9adcd0d3..0000000000
Binary files a/targets/SIMU/USER/.usim.nvram and /dev/null differ
diff --git a/targets/SIMU/USER/Makefile b/targets/SIMU/USER/Makefile
deleted file mode 100644
index ec5f5eb0cc..0000000000
--- a/targets/SIMU/USER/Makefile
+++ /dev/null
@@ -1,503 +0,0 @@
-# Include some shared directives
-include $(OPENAIR_TARGETS)/Makerules
-
-default: oaisim
-
-include $(OPENAIR_TARGETS)/Makefile.common
-
-TOP_DIR = $(OPENAIR1_DIR)
-OPENAIR1_TOP = $(OPENAIR1_DIR)
-OPENAIR2_TOP = $(OPENAIR2_DIR)
-OPENAIR3_TOP = $(OPENAIR3_DIR)
-OPENAIR3 = $(OPENAIR3_DIR)
-
-ifeq ($(DEBUG),1)
-CFLAGS += -g -ggdb -DDEBUG_PHY -DDEBUG_MEAS
-CFLAGS += -DRRC_MSG_PRINT
-CFLAGS += -DPDCP_MSG_PRINT
-CFLAGS += -DTRACE_RLC_UM_PDU
-CFLAGS += -DTRACE_RLC_AM_PDU
-else
-CFLAGS += -DTRACE_RLC_UM_PDU
-CFLAGS += -DTRACE_RLC_AM_PDU
-endif
-
-ifeq ($(MSG_PRINT),1)
-CFLAGS += -DRRC_MSG_PRINT
-CFLAGS += -DPDCP_MSG_PRINT
-endif
-
-
-CFLAGS += -Wpointer-sign
-CFLAGS += -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 $(CPUFLAGS) -I/usr/include/X11 #-Wno-packed-bitfield-compat
-
-ASN1_MSG_INC = $(OPENAIR2_DIR)/RRC/LITE/MESSAGES
-
-CFLAGS += -DOPENAIR_LTE #-DOFDMA_ULSCH -DIFFT_FPGA -DIFFT_FPGA_UE
-CFLAGS += -DMAC_CONTEXT=1 -DPHY_CONTEXT=1 #-DRLC_UM_TEST_TRAFFIC=1
-#CFLAGS += -DLLR8
-CFLAGS += -DPACKAGE_NAME='"oaisim"'
-
-ifndef OPENAIR2
-OPENAIR2=1
-endif
-
-ifdef DEBUG
-DISABLE_XER_PRINT=0
-MSG_PRINT=1
-endif
-
-ifeq ($(LOCALIZATION), 1)
-CFLAGS += -DLOCALIZATION
-endif
-
-ifeq ($(LINUX_LIST), 1)
-CFLAGS += -DLINUX_LIST
-endif
-
-ifdef TRAFFIC_TM5
-CFLAGS += -DRLC_UM_TEST_TRAFFIC=1 #-DFULL_BUFFER=1
-endif
-
-# activate OCG and libxml only under linux
-ifeq ($(linux),1)
-CFLAGS += $(LIBXML2_CFLAGS) -L/usr/local/lib -I/usr/include/atlas -L/usr/X11R6/lib
-OCG_FLAG =1
-CFLAGS += -DLINUX
-endif
-
-ifdef SMBV
-CFLAGS += -DSMBV
-endif
-
-ifeq ($(XFORMS), 1)
-CFLAGS += -DXFORMS
-endif
-
-ifdef DB
-# Check if libmysqlclient is installed and use it if found to store simulation data for postprocessing
-ENABLE_DB = $(shell if [ `dpkg -l | grep libmysqlclient -c` = "0" ]; then echo "0" ; else echo "1" ; fi )
-ifeq ($(ENABLE_DB), 1)
-CFLAGS +=-I/usr/include/mysql -L/usr/lib/mysql -DENABLE_DB_STATS
-DB_LDFLAGS = -lmysqlclient
-endif
-endif
-
-ifdef PRINT_STATS
-CFLAGS += -DPRINT_STATS
-endif
-
-ifndef rrc_cellular
-rrc_cellular = 0
-rrc_cellular_eNB = 0
-rrc_cellular_UE = 0
-else
- ifeq ($(eNB_flag),1)
- rrc_cellular_eNB=1
- endif
- ifeq ($(UE_flag),1)
- rrc_cellular_UE=1
- endif
-endif
-
-ifdef LS
-CFLAGS += -DLARGE_SCALE
-endif
-
-# ln -sf EUTRA-RRC-Definitions-a20.asn EUTRA-RRC-Definitions.asn
-# make cleanasn1
-#make all Rel10=1
-
-ifdef CBA
-CFLAGS += -DRel10
-CFLAGS += -DCBA
-$(info "Rel10=1 CBA=1")
-
-else ifdef Rel10
-CFLAGS += -DRel10
-$(info "Rel10=1")
-else # default is rel 8
-$(info "Rel8=1")
-CFLAGS += -DRel8
-endif
-
-#CFLAGS += -DMAX_NUM_CCs=1
-
-ifeq ($(RLC_STOP_ON_LOST_PDU), 1)
-CFLAGS += -DRLC_STOP_ON_LOST_PDU
-endif
-ifeq ($(STOP_ON_IP_TRAFFIC_OVERLOAD), 1)
-CFLAGS += -DSTOP_ON_IP_TRAFFIC_OVERLOAD
-endif
-
-
-ifeq ($(USE_3GPP_ADDR_AS_LINK_ADDR), 1)
-CFLAGS += -DUSE_3GPP_ADDR_AS_LINK_ADDR
-endif
-endif
-
-
-
-ifeq ($(LINK_ENB_PDCP_TO_IP_DRIVER), 1)
-CFLAGS += -DPDCP_USE_NETLINK -DLINUX
-NAS_FLAG=1
-endif
-
-ifeq ($(LINK_ENB_PDCP_TO_GTPV1U), 1)
-CFLAGS += -DLINK_ENB_PDCP_TO_GTPV1U
-endif
-
-ifdef TEST_OMG
-CFLAGS += -DTEST_OMG
-#CFLAGS += -DDEBUG_OMG
-endif
-# after the execution, a profiling output "gmon.out" will be created,
-#then we need to run "gprof ./oaisim > gmon.txt" in the same directory as "gmon.out"
-# you could also use the script "grpof2dot.py gmon.txt" for visual diagrams
-ifdef GPROF
-CFLAGS += -pg
-endif
-
-#require kernel patch for oai driver to enable address autoconfiguration (IPv6 only)
-ifdef ADDCONF
-CFLAGS+=-DADDRCONF
-endif
-
-ifdef OAI_NW_DRIVER_TYPE_ETHERNET
-CFLAGS+=-DOAI_NW_DRIVER_TYPE_ETHERNET
-endif
-
-CFLAGS += -DENABLE_USE_CPU_EXECUTION_TIME
-ifndef DISABLE_XER_PRINT
-CFLAGS += -DXER_PRINT
-endif
-
-ifdef SECU
-ifeq ($(NETTLE_FOUND), 0)
-$(warning "Nettle library >= 2.5 is not installed on your system, nettle-dev lib needed, continuing with security disabled")
-SECU=0
-else
-ifeq ($(OPENSSL_FOUND), 0)
-$(warning "openssl library is not installed on your system, openssl lib needed, continuing with security disabled")
-SECU=0
-else
-CFLAGS += -DENABLE_SECURITY
-LIBS += $(OPENSSL_LIBS) $(NETTLE_LIBS)
-endif
-endif
-endif
-
-include $(OPENAIR1_DIR)/PHY/Makefile.inc
-include $(OPENAIR1_DIR)/SCHED/Makefile.inc
-include $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc
-include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
-include $(OPENAIR1_DIR)/SIMULATION/ETH_TRANSPORT/Makefile.inc
-include $(OPENAIR2_DIR)/RRC/NAS/Makefile.inc
-include $(OPENAIR2_DIR)/UTIL/Makefile.inc
-include $(OPENAIR3_DIR)/RAL-LTE/Makefile.inc
-include $(OPENAIR2_DIR)/ENB_APP/Makefile.inc
-
-
-INCLUDES += -I$(TOP_DIR)
-INCLUDES += $(L2_incl)
-INCLUDES += $(ENB_APP_incl)
-INCLUDES += $(UTIL_incl)
-INCLUDES += $(UTILS_incl)
-INCLUDES += -I$(ASN1_MSG_INC)
-INCLUDES += -I$(COMMON_UTILS_DIR)/collection
-
-SIMULATION_OBJS = $(TOP_DIR)/SIMULATION/TOOLS/gauss.o
-SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/random_channel.o
-SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/rangen_double.o
-SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/taus.o
-SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/multipath_channel.o
-SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/TOOLS/abstraction.o
-SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/rf.o
-SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/adc.o
-SIMULATION_OBJS += $(TOP_DIR)/SIMULATION/RF/dac.o
-
-ASN1_RRC_MSG_OBJS1=$(addprefix $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/, $(ASN1_MSG_OBJS))
-
-OAISIM_OBJS_COMMON = $(OPENAIR_TARGETS)/SIMU/USER/channel_sim.o
-OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/init_lte.o
-OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/oaisim_config.o
-OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/sinr_sim.o
-OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/cor_SF_sim.o
-OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/oaisim_functions.o
-OAISIM_OBJS_COMMON += $(OPENAIR_TARGETS)/SIMU/USER/event_handler.o
-
-OAISIM_OBJS = $(OPENAIR_TARGETS)/SIMU/USER/oaisim.o
-
-ifeq ($(XFORMS), 1)
-TOOLS_OBJS += $(OPENAIR1_DIR)/PHY/TOOLS/lte_phy_scope.o
-endif
-
-ifdef PAD
-CFLAGS += -DPAD
-endif
-
-OAISIM_PAD_OBJS = $(OPENAIR_TARGETS)/SIMU/USER/discrete_event_generator.o
-OAISIM_PAD_OBJS += $(OPENAIR_TARGETS)/SIMU/USER/threadpool.o
-OAISIM_PAD_OBJS += $(OPENAIR_TARGETS)/SIMU/USER/oaisim_pad.o
-#deactivate the log offloading
-ifndef LOG_THREAD
-CFLAGS +=-DLOG_NO_THREAD
-endif
-
-ifdef PROC
-INT_OBJS += $(OPENAIR_TARGETS)/SIMU/PROC/channel_sim_proc.o
-INT_OBJS += $(OPENAIR_TARGETS)/SIMU/PROC/Process.o
-CFLAGS += -DPROC
-endif
-
-CFLAGS += -DENABLE_VCD_FIFO
-CFLAGS += -DENABLE_NEW_MULTICAST
-ifdef NAS
-CFLAGS += -DPDCP_USE_NETLINK_QUEUES
-endif
-# CFLAGS += -DENABLE_LOG_FIFO
-
-# Check if libpgm is installed and use it if found instead of the unreliable
-# multicast
-ifeq ($(PGM_FOUND), 1)
-CFLAGS += $(PGM_CFLAGS)
-LIBS += $(PGM_LIBS)
-endif
-
-OBJ += $(PHY_OBJS) $(SIMULATION_OBJS) $(ETHERNET_TRANSPORT_OBJS) $(TOOLS_OBJS) $(SCHED_OBJS) $(STATS_OBJS) $(NAS_OBJS)
-OBJ += $(INT_OBJS) $(UTIL_OBJ) $(UTILS_OBJS) $(OAISIM_OBJS_COMMON) $(ENB_APP_OBJS)
-ifeq ($(OPENAIR2),1)
-OBJ += $(L2_OBJS)
-endif
-
-LFDS_OBJ_DIR = $(subst $(OPENAIR_DIR),$(OBJS_DIR),$(LFDS_DIR))
-LFDS_LIB = $(LFDS_OBJ_DIR)/bin/liblfds611.a
-LIBS += $(LFDS_LIB)
-SHARED_DEPENDENCIES += $(LFDS_LIB)
-
-all: oaisim
-
-pad: oaisim_pad
-
-userclean: cleanall oaisim
-
-objsdir:
- @if [ ! -d $(OBJS_DIR) ]; then mkdir -p $(OBJS_DIR); fi
-
-printvars:
- @echo rrc_cellular variable is $(rrc_cellular)
- @echo EXTRA_CFLAGS = $(EXTRA_CFLAGS)
- @echo OAI Config generator is $(OCG_FLAG)
- @echo OAI NETLINK FLAG is $(NAS_FLAG)
- @echo SSE3 proc is $(SSE3PROC)
- @echo L2 objs are $(L2_OBJS)
- @echo eNB_flag is $(eNB_flag)
- @echo UE_flag is $(UE_flag)
- @echo S1AP objs: $(S1AP_BUILT_OBJS)
- @echo X2AP objs: $(X2AP_BUILT_OBJS)
- @echo CFLAGS: $(CFLAGS)
- @echo Enable PGM: $(PGM_FOUND)
-
-##UTIL_YAC_C = $(OPENAIR2_TOP)/UTIL/enb_parser.o
-##$(UTIL_LEX_C) = $(subst $(OPENAIR_DIR), $(OBJS_DIR), $(OBJ) $(OAISIM_OBJS) $(ASN1_RRC_MSG_OBJS1))
-
-
-OAISIM_COMPILED_OBJECTS = $(subst $(OPENAIR_DIR), $(OBJS_DIR), $(OBJ) $(OAISIM_OBJS) $(ASN1_RRC_MSG_OBJS1))
-
--include $(ITTI_MESSAGES_XML:.xml=.d)
--include $(OAISIM_PAD_OBJS:.o=.d)
--include $(OAISIM_COMPILED_OBJECTS:.o=.d)
-
-ifdef ENABLE_ITTI
-$(OAISIM_COMPILED_OBJECTS): $(ITTI_MESSAGES_H)
-
-oaisim_pad.o: $(ITTI_MESSAGES_H)
-endif
-
-$(OAISIM_COMPILED_OBJECTS): | objsdir
-
-.SECONDEXPANSION:
-$(OAISIM_COMPILED_OBJECTS) $(OAISIM_PAD_OBJS): %.o : $$(subst $(OBJS_DIR), $(OPENAIR_DIR), $$*.c)
- @echo Compiling $<
- @if [ ! -d $(dir $@) ]; then mkdir -p $(dir $@); fi;
- @$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DPHY_CONTEXT=1 $(INCLUDES) -o $@ $<
- @$(CC) -MM $(CFLAGS) $(EXTRA_CFLAGS) -DPHY_CONTEXT=1 $(INCLUDES) $< > $*.d
- @mv -f $*.d $*.d.tmp
- @sed -e 's|.*:|$*.o:|' < $*.d.tmp > $*.d
- @sed -e 's/.*://' -e 's/\\$$//' < $*.d.tmp | fmt -1 | \
- sed -e 's/^ *//' -e 's/$$/:/' >> $*.d
- @rm -f $*.d.tmp
-
-$(LFDS_LIB):
- @if [ ! -d $(LFDS_OBJ_DIR)/bin ]; then mkdir -p $(LFDS_OBJ_DIR)/bin; fi;
- @if [ ! -d $(LFDS_OBJ_DIR)/obj ]; then mkdir -p $(LFDS_OBJ_DIR)/obj; fi;
- $(MAKE) -C $(LFDS_DIR) -f makefile.linux OUTDIR=$(LFDS_OBJ_DIR)
-
-oaisim_pad: $(OBJ) $(OAISIM_PAD_OBJS) $(ASN1_RRC_MSG_OBJS1)
- @echo "Linking oaisim_pad ..."
- @$(MPICC) $(INCLUDES) $(S1AP_Incl) $(X2AP_Incl) -o oaisim_pad $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(OAISIM_PAD_OBJS) $(ASN1_RRC_MSG_OBJS1) \
- -lpthread -llapack_atlas -lforms -lrt -lconfig $(LIBS) $(DB_LDFLAGS)
-
-oaisim: $(OAISIM_COMPILED_OBJECTS) $(SHARED_DEPENDENCIES)
- @echo "Linking oaisim ..."
- @$(CC) $(INCLUDES) $(S1AP_Incl) $(X2AP_Incl) -o oaisim $(CFLAGS) $(EXTRA_CFLAGS) $(OAISIM_COMPILED_OBJECTS) \
- -lpthread -llapack_atlas -lforms -lrt -lconfig $(LIBS) $(DB_LDFLAGS)
-
-ifeq ($(rrc_cellular_eNB),1)
- mv oaisim oaisim_eNB
-endif
-ifeq ($(rrc_cellular_UE),1)
- mv oaisim oaisim_UE
-endif
-
-oaisimCROWN: $(OBJ) $(ASN1_RRC_MSG_OBJS1) oaisimCROWN.c
- @echo "Compiling oaisimCROWN.c ..."
- @$(CC) oaisimCROWN.c $(INCLUDES) $(S1AP_Incl) $(X2AP_Incl) -o oaisimCROWN $(CFLAGS) $(EXTRA_CFLAGS) $(OBJ) $(ASN1_RRC_MSG_OBJS1) -lm -lblas -lpthread -llapack_atlas -lforms $(LIBXML2_LIBS) -lX11 -lXpm -lrt -lconfig
-
-oai_nw_drv:
- (cd $(OPENAIR2_DIR) && $(MAKE) oai_nw_drv.ko)
- (cp $(OPENAIR2_DIR)/NAS/DRIVER/LITE/oai_nw_drv.ko . )
-oai_nw_drv_clean:
- (cd $(OPENAIR2_DIR)/NAS/DRIVER/LITE && $(MAKE) clean)
-nasmesh_fix:
- (cd $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/RB_TOOL && $(MAKE) clean && $(MAKE))
- (cd $(OPENAIR2_DIR) && $(MAKE) clean && $(MAKE) nasmesh_netlink_address_fix.ko)
-nasmesh_fix_uninstall:
- (sudo rmmod nasmesh.ko)
-nasmesh_fix_install:
- (sudo insmod $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/nasmesh.ko)
-nasmesh_fix_reinstall:
- (sudo rmmod nasmesh.ko)
- (sudo insmod $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/nasmesh.ko)
-nasmesh_nl:
- (cd $(OPENAIR2_DIR)/NETWORK_RIVER/MESH/RB_TOOL && $(MAKE))
- (cd $(OPENAIR2_DIR) && $(MAKE) nasmesh_netlink.ko)
- (sudo insmod $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/nasmesh.ko)
-rb_tool:
- (cd $(OPENAIR2_DIR)/NETWORK_DRIVER/MESH/RB_TOOL && $(MAKE))
-
-nasmesh_install:
- (sudo rmmod nasmesh)
- (sudo insmod $(OPENAIR2_DIR)/NAS/DRIVER/MESH/nasmesh.ko)
-nasmesh_clean:
- (cd $(OPENAIR2_DIR) && $(MAKE) clean)
-nas_sim_mt_cellular:
- ( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make nasmt_sim CELLULAR=1 NO_RRM=1)
-
-nas_sim_rg_cellular:
- ( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make nasrg_sim MASTER=1 CELLULAR=1 NO_RRM=1)
-
-rrm_std_cellular:
- ( cd $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR && make cell_rrm CELL_RRM=1 CELLULAR=1 NO_RRM=1)
-
-cleanall: common-cleanall clean cleanasn1
-
-cleanalmostall: clean
- rm -f $(ASN1_RRC_MSG_OBJS1)
-
-clean: common-clean
- @$(RM_F_V) oaisim
- @$(RM_F_V) oaisim_pad
-# @$(RM_F_V) $(ITTI_MESSAGES_H) $(ITTI_MESSAGES_XML) $(ITTI_MESSAGES_XML:.xml=.d)
- @$(RM_F_V) $(OAISIM_PAD_OBJS)
- @$(RM_F_V) $(OAISIM_PAD_OBJS:.o=.d)
- @$(RM_F_V) $(OAISIM_COMPILED_OBJECTS)
- @$(RM_F_V) $(OAISIM_COMPILED_OBJECTS:.o=.d)
- @$(RM_F_V) *.exe*
- @$(RM_F_V) $(ASN1_MSG_INC)/asn1_msg.o
-
-cleanl1:
- @$(RM_F_V) LOG_THREAD oaisim
- @$(RM_F_V) $(PHY_OBJS) $(SCHED_OBJS)
- @$(RM_F_V) *.o
- @$(RM_F_V) *.exe
-
-cleanl2:
- @$(RM_F_V) $(L2_OBJS)
- @$(RM_F_V) $(ASN1_MSG_INC)/asn1_msg.o
-
-cleanasn1:
- @$(RM_F_V) $(ASN1_RRC_MSG_OBJS1)
- $(shell cd $(OPENAIR2_DIR)/RRC/LITE/MESSAGES ; rm -f $(ASN_MODULE_SOURCES) $(ASN_MODULE_HEADERS) *.o *.d)
- @$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.am.sample
- @$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/Makefile.inc.generated
- @$(RM_F_V) $(OPENAIR2_DIR)/RRC/LITE/MESSAGES/asn1c/ASN1_files/.lock-rel*
-
-cleancell:
- @$(RM_F_V) $(OPENAIR2_DIR)/RRC/CELLULAR/*.o
- @$(RM_F_V) $(OPENAIR2_DIR)/RRC/CELLULAR/*.d
- @$(RM_F_V) $(OPENAIR2_DIR)/RRC/L2_INTERFACE/*.o
- @$(RM_F_V) $(OPENAIR2_DIR)/RRC/L2_INTERFACE/*.d
- @$(RM_F_V) $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR/*.o
- @$(RM_F_V) $(OPENAIR2_DIR)/NAS/SIMU_CELLULAR/*.d
-
-cleanlfds:
- $(MAKE) -C $(LFDS_DIR) -f makefile.linux clean
-
-cppcheck:
- @echo "cppcheck oaisim ..."
- cppcheck $(INCLUDES) ${OBJ:.o=.c} ${OAISIM_OBJS,.o=.c} ${ASN1_RRC_MSG_OBJS1,.o=.c}
-print:
- @echo "OBJ " $(OBJ)
- @echo "OAISIM_OBJS " $(OAISIM_OBJS)
- @echo "OAISIM_PAD_OBJS " $(OAISIM_PAD_OBJS)
- @echo "OCG_FLAG are " $(OCG_FLAG)
- @echo "CFLAGS are " $(CFLAGS)
- @echo "EXTRA_CFLAGS are" $(EXTRA_CFLAGS)
- @echo "COMMON_CFLAGS are" $(COMMON_CFLAGS)
- @echo "L2 includes are" $(L2_incl)
- @echo "INCLUDES are" $(INCLUDES)
- @echo "S1AP Includes are" $(S1AP_Incl)
- @echo "X2AP Includes are" $(X2AP_Incl)
- @echo "TOP_DIR Include is" I$(TOP_DIR)
- @echo "UTIL includes are" $(UTIL_incl)
- @echo "UTILS includes are" $(UTILS_incl)
- @echo "IS_REL8 is " $(IS_REL8)
- @echo "IS_REL10 is " $(IS_REL10)
- @echo "ENABLE_DB is " $(ENABLE_DB)
- @echo "Libs are" $(LIBS)
- @echo "NAS" $(NAS)
-
-showcflags:
- @echo oaisim cflags: $(CFLAGS)
- @echo oaisim includes: $(INCLUDES)
- @if [ -d $(S1AP_DIR) ]; then $(MAKE) -C $(S1AP_DIR) -f Makefile.eNB showcflags; fi
- @if [ -d $(X2AP_DIR) ]; then $(MAKE) -C $(X2AP_DIR) -f Makefile.inc showcflags; fi
-
-otg_all: otg_latency otg_gp
-
-# need to check if the file exists before calling otgplot
-otg_latency:
- export TITLE="Application OWD(ms)"
- cp /tmp/otg_latency.dat /tmp/onewaydelay.dat
- $(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/otg_latency.dat" "[$(COL1):$(COL2)]"
-otg_latency_bg:
- export TITLE="Background OWD(ms)"
- $(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/otg_latency_bg.dat" "[$(COL1):$(COL2)]"
-otg_gp:
- export TITLE="Application Goodput(Kb/s)"
- cp /tmp/otg_goodput.dat /tmp/goodput.dat
- $(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/goodput.dat" "[$(COL1):$(COL2)]"
-otg_gp_bg:
- export TITLE="Background Goodput(Kb/s)"
- $(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/otg_goodput_bg.dat" "[$(COL1):$(COL2)]"
-otg_jitter:
- export TITLE="Aplication Jitter(ms)"
- $(OPENAIR2_DIR)/UTIL/OTG/OTGplot "/tmp/otg_jitter.dat" "[$(COL1):$(COL2)]"
-
-pexpect = $(shell if [ `dpkg -l | grep pexpect -c` = "0" ]; then echo "0" ; else echo "1" ; fi )
-
-pre-ci:
- @echo "Pre-commit check"
-
-ifeq ($(pexpect), 1)
-ifndef PW
- @echo "Usage: make pre-ci PW=mypassword"
- @echo "Password is used to access the local host through ssh."
- python $(OPENAIR_TARGETS)/TEST/OAI/test01.py
-else
- python $(OPENAIR_TARGETS)/TEST/OAI/test01.py -w $(PW)
-endif
-else
- @echo "Python pexpect package is missing, please install"
-endif
diff --git a/targets/SIMU/USER/channel_sim.c b/targets/SIMU/USER/channel_sim.c
deleted file mode 100644
index cd22771601..0000000000
--- a/targets/SIMU/USER/channel_sim.c
+++ /dev/null
@@ -1,618 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "SIMULATION/TOOLS/sim.h"
-#include "SIMULATION/RF/rf.h"
-#include "PHY/types.h"
-#include "PHY/defs_eNB.h"
-#include "PHY/phy_extern.h"
-#include "PHY/phy_extern_ue.h"
-
-#include "LAYER2/MAC/mac.h"
-#include "LAYER2/MAC/mac_extern.h"
-#include "UTIL/LOG/log_if.h"
-#include "UTIL/LOG/log_extern.h"
-#include "RRC/LTE/rrc_extern.h"
-#include "PHY_INTERFACE/phy_interface_extern.h"
-#include "UTIL/OCG/OCG.h"
-#include "UTIL/OPT/opt.h" // to test OPT
-
-#include "UTIL/FIFO/types.h"
-
-#ifdef XFORMS
-#include "forms.h"
-#include "phy_procedures_sim_form.h"
-#endif
-
-#include "oaisim.h"
-
-#define RF
-#define DEBUG_SIM
-/*
-#undef LOG_D
-#define LOG_D(A,B,C...) printf(B,C)
-*/
-
-int number_rb_ul;
-int first_rbUL ;
-
-extern Signal_buffers_t *signal_buffers_g;
-
-
-double r_re_DL[NUMBER_OF_UE_MAX][2][30720];
-double r_im_DL[NUMBER_OF_UE_MAX][2][30720];
-double r_re_UL[NUMBER_OF_eNB_MAX][2][30720];
-double r_im_UL[NUMBER_OF_eNB_MAX][2][30720];
-int RU_output_mask[NUMBER_OF_UE_MAX];
-int UE_output_mask[NUMBER_OF_RU_MAX];
-pthread_mutex_t RU_output_mutex[NUMBER_OF_UE_MAX];
-pthread_mutex_t UE_output_mutex[NUMBER_OF_RU_MAX];
-
-double ru_amp[NUMBER_OF_RU_MAX];
-
-void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs],
- node_desc_t *enb_data[NUMBER_OF_RU_MAX],
- node_desc_t *ue_data[NUMBER_OF_UE_MAX],
- uint16_t subframe,
- uint32_t offset,
- uint32_t length,
- uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *ue_frame_parms,
- uint8_t UE_id,
- int CC_id)
-{
-
- int32_t att_eNB_id=-1;
- int32_t **txdata,**rxdata;
-
- uint32_t eNB_id,ru_id=0;
- double tx_pwr;
- double rx_pwr;
- int32_t rx_pwr2;
- uint32_t i,aa;
- uint32_t sf_offset;
-
- double min_path_loss=-200;
- uint8_t hold_channel=0;
- uint8_t nb_antennas_rx = RU2UE[0][0][CC_id]->nb_rx; // number of rx antennas at UE
- uint8_t nb_antennas_tx = RU2UE[0][0][CC_id]->nb_tx; // number of tx antennas at eNB
-
- double s_re0[30720];
- double s_re1[30720];
- double *s_re[2];
- double s_im0[30720];
- double s_im1[30720];
- double *s_im[2];
- double r_re00[30720];
- double r_re01[30720];
- double *r_re0[2];
- double r_im00[30720];
- double r_im01[30720];
- double *r_im0[2];
- LTE_DL_FRAME_PARMS *frame_parms;
-
- s_re[0] = s_re0;
- s_im[0] = s_im0;
- s_re[1] = s_re1;
- s_im[1] = s_im1;
-
- r_re0[0] = r_re00;
- r_im0[0] = r_im00;
- r_re0[1] = r_re01;
- r_im0[1] = r_im01;
-
- if (subframe==0)
- hold_channel = 0;
- else
- hold_channel = 1;
-
- if (abstraction_flag != 0) {
- //for (UE_id=0;UE_idframe_parms;
-
- random_channel(RU2UE[ru_id][UE_id][CC_id],abstraction_flag);
- /*
- for (i=0;inb_taps;i++)
- printf("RU2UE[%d][%d]->a[0][%d] = (%f,%f)\n",eNB_id,UE_id,i,RU2UE[eNB_id][UE_id]->a[0][i].x,RU2UE[eNB_id][UE_id]->a[0][i].y);
- */
- freq_channel(RU2UE[ru_id][UE_id][CC_id], frame_parms->N_RB_DL,frame_parms->N_RB_DL*12+1);
- }
-
- // find out which eNB the UE is attached to
- /*
- for (eNB_id=0; eNB_idpdcch_vars[0][0]->crnti,RC.eNB[eNB_id][CC_id])>=0) {
- // UE with UE_id is connected to eNb with eNB_id
- att_eNB_id=eNB_id;
- LOG_D(OCM,"A: UE attached to eNB (UE%d->eNB%d)\n",UE_id,eNB_id);
- }
- }
- */
- // if UE is not attached yet, find assume its the eNB with the smallest pathloss
- if (att_eNB_id<0) {
- for (eNB_id=0; eNB_idRU_list[ru]->idx;
- if (min_path_losspath_loss_dB) {
- min_path_loss = RU2UE[ru_id][UE_id][CC_id]->path_loss_dB;
- att_eNB_id=eNB_id;
- LOG_D(OCM,"B: UE attached to eNB (UE%d->eNB%d)\n",UE_id,eNB_id);
- }
- }
- }
- }
-
- if (att_eNB_id<0) {
- LOG_E(OCM,"Cannot find eNB for UE %d, return\n",UE_id);
- return; //exit(-1);
- }
-
-#ifdef DEBUG_SIM
- rx_pwr = signal_energy_fp2(RU2UE[att_eNB_id][UE_id][CC_id]->ch[0],
- RU2UE[att_eNB_id][UE_id][CC_id]->channel_length)*RU2UE[att_eNB_id][UE_id][CC_id]->channel_length;
- LOG_D(OCM,"Channel (CCid %d) eNB %d => UE %d : tx_power %d dBm, path_loss %f dB\n",
- CC_id,att_eNB_id,UE_id,
- frame_parms->pdsch_config_common.referenceSignalPower,
- RU2UE[att_eNB_id][UE_id][CC_id]->path_loss_dB);
-#endif
-
- //dlsch_abstraction(PHY_vars_UE_g[UE_id]->sinr_dB, rb_alloc, 8);
- // fill in perfect channel estimates
- channel_desc_t *desc1 = RU2UE[att_eNB_id][UE_id][CC_id];
- int32_t **dl_channel_est = PHY_vars_UE_g[UE_id][CC_id]->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[0];
- // double scale = pow(10.0,(enb_data[att_eNB_id]->tx_power_dBm + RU2UE[att_eNB_id][UE_id]->path_loss_dB + (double) PHY_vars_UE_g[UE_id]->rx_total_gain_dB)/20.0);
- double scale = pow(10.0,(frame_parms->pdsch_config_common.referenceSignalPower+RU2UE[att_eNB_id][UE_id][CC_id]->path_loss_dB + (double) PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB)/20.0);
- LOG_D(OCM,"scale =%lf (%d dB)\n",scale,(int) (20*log10(scale)));
- // freq_channel(desc1,frame_parms->N_RB_DL,nb_samples);
- //LOG_M("channel.m","ch",desc1->ch[0],desc1->channel_length,1,8);
- //LOG_M("channelF.m","chF",desc1->chF[0],nb_samples,1,8);
- int count,count1,a_rx,a_tx;
-
- for(a_tx=0; a_txsymbols_per_tti/2;count++)
- for (count=0; count<1; count++) {
- for (count1=0; count1N_RB_DL*12; count1++) {
- ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count1+(count*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(desc1->chF[a_rx+(a_tx*nb_antennas_rx)][count1].x*scale);
- ((int16_t *) dl_channel_est[(a_tx<<1)+a_rx])[2*count1+1+(count*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(desc1->chF[a_rx+(a_tx*nb_antennas_rx)][count1].y*scale) ;
- }
- }
- }
- }
-
- // calculate the SNR for the attached eNB (this assumes eNB always uses PMI stored in eNB_UE_stats; to be improved)
- init_snr(RU2UE[att_eNB_id][UE_id][CC_id], enb_data[att_eNB_id], ue_data[UE_id], PHY_vars_UE_g[UE_id][CC_id]->sinr_dB, &PHY_vars_UE_g[UE_id][CC_id]->N0,
- PHY_vars_UE_g[UE_id][CC_id]->transmission_mode[att_eNB_id], RC.eNB[att_eNB_id][CC_id]->UE_stats[UE_id].DL_pmi_single,
- RC.eNB[att_eNB_id][CC_id]->mu_mimo_mode[UE_id].dl_pow_off,RC.eNB[att_eNB_id][CC_id]->frame_parms.N_RB_DL);
-
- // calculate sinr here
- for (eNB_id = 0; eNB_id < NB_eNB_INST; eNB_id++) {
- if (att_eNB_id != eNB_id) {
- calculate_sinr(RU2UE[eNB_id][UE_id][CC_id], enb_data[eNB_id], ue_data[UE_id], PHY_vars_UE_g[UE_id][CC_id]->sinr_dB,
- RC.eNB[att_eNB_id][CC_id]->frame_parms.N_RB_DL);
- }
- }
- } // hold channel
- }
- else { //abstraction_flag
-
-
- pthread_mutex_lock(&RU_output_mutex[UE_id]);
-
- if (RU_output_mask[UE_id] == 0) { // This is the first eNodeB for this UE, clear the buffer
- for (aa=0; aaframe_parms.samples_per_tti)*sizeof(double));
- memset((void*)r_im_DL[UE_id][aa],0,(RC.ru[0]->frame_parms.samples_per_tti)*sizeof(double));
- }
- }
- pthread_mutex_unlock(&RU_output_mutex[UE_id]);
-
- for (ru_id=0; ru_idcommon.txdata;
- frame_parms = &RC.ru[ru_id]->frame_parms;
-
- sf_offset = (subframe*frame_parms->samples_per_tti) + offset;
- LOG_D(EMU,">>>>>>>>>>>>>>>>>TXPATH: RU %d : DL_sig reading TX for subframe %d (sf_offset %d, length %d) from %p\n",ru_id,subframe,sf_offset,length,txdata[0]+sf_offset);
- int length_meas = frame_parms->ofdm_symbol_size;
- if (sf_offset+length <= frame_parms->samples_per_tti*10) {
-
- tx_pwr = dac_fixed_gain(s_re,
- s_im,
- txdata,
- sf_offset,
- nb_antennas_tx,
- length,
- sf_offset,
- length_meas,
- 14,
- frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
- 0,
- &ru_amp[ru_id],
- frame_parms->N_RB_DL*12);
-
- }
- else {
- tx_pwr = dac_fixed_gain(s_re,
- s_im,
- txdata,
- sf_offset,
- nb_antennas_tx,
- (frame_parms->samples_per_tti*10)-sf_offset,
- sf_offset,
- length_meas,
- 14,
- frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
- 0,
- &ru_amp[ru_id],
- frame_parms->N_RB_DL*12);
-
- tx_pwr = dac_fixed_gain(s_re,
- s_im,
- txdata,
- sf_offset,
- nb_antennas_tx,
- length+sf_offset-(frame_parms->samples_per_tti*10),
- sf_offset,
- length_meas,
- 14,
- frame_parms->pdsch_config_common.referenceSignalPower, // dBm/RE
- 0,
- &ru_amp[ru_id],
- frame_parms->N_RB_DL*12);
- }
-#ifdef DEBUG_SIM
- LOG_D(PHY,"[SIM][DL] subframe %d: txp (time) %d dB\n",
- subframe,dB_fixed(signal_energy(&txdata[0][sf_offset],length_meas)));
-
- LOG_D(OCM,"[SIM][DL] RU %d (CCid %d): tx_pwr %.1f dBm/RE (target %d dBm/RE), for subframe %d\n",
- ru_id,CC_id,
- 10*log10(tx_pwr),
- frame_parms->pdsch_config_common.referenceSignalPower,
- subframe);
-
-#endif
- tx_pwr = signal_energy_fp(s_re,s_im,nb_antennas_tx,
- lengthN_RB_DL);
-
- //RU2UE[eNB_id][UE_id]->path_loss_dB = 0;
- multipath_channel(RU2UE[ru_id][UE_id][CC_id],s_re,s_im,r_re0,r_im0,
- length,hold_channel);
-#ifdef DEBUG_SIM
- rx_pwr = signal_energy_fp2(RU2UE[ru_id][UE_id][CC_id]->ch[0],
- RU2UE[ru_id][UE_id][CC_id]->channel_length)*RU2UE[ru_id][UE_id][CC_id]->channel_length;
- LOG_D(OCM,"[SIM][DL] Channel RU %d => UE %d (CCid %d): Channel gain %f dB (%f)\n",ru_id,UE_id,CC_id,10*log10(rx_pwr),rx_pwr);
-#endif
-
-
-#ifdef DEBUG_SIM
-
- for (i=0; ichannel_length; i++)
- LOG_D(OCM,"channel(%d,%d)[%d] : (%f,%f)\n",ru_id,UE_id,i,RU2UE[ru_id][UE_id][CC_id]->ch[0][i].x,RU2UE[ru_id][UE_id][CC_id]->ch[0][i].y);
-
-#endif
-
- LOG_D(OCM,"[SIM][DL] Channel RU %d => UE %d (CCid %d): tx_power %.1f dBm/RE, path_loss %1.f dB\n",
- ru_id,UE_id,CC_id,
- (double)frame_parms->pdsch_config_common.referenceSignalPower,
- // enb_data[eNB_id]->tx_power_dBm,
- RU2UE[ru_id][UE_id][CC_id]->path_loss_dB);
-
-#ifdef DEBUG_SIM
- rx_pwr = signal_energy_fp(r_re0,r_im0,nb_antennas_rx,
- lengthN_RB_DL);
- LOG_D(OCM,"[SIM][DL] UE %d : rx_pwr %f dBm/RE (%f dBm RSSI,tx %f dB)for subframe %d (length %d)\n",UE_id,
- 10*log10(rx_pwr),
- 10*log10(rx_pwr*(double)frame_parms->N_RB_DL*12),
- 10*log10(tx_pwr),subframe,
- lengthsampling_rate*1e6)-174,
- 10*log10(RU2UE[ru_id][UE_id][CC_id]->sampling_rate*1e6*12*frame_parms->N_RB_DL/(double)frame_parms->ofdm_symbol_size)-174,
- subframe);
-#endif
-
- if (RU2UE[ru_id][UE_id][CC_id]->first_run == 1)
- RU2UE[ru_id][UE_id][CC_id]->first_run = 0;
-
-
- // RF model
-#ifdef DEBUG_SIM
- LOG_D(OCM,"[SIM][DL] UE %d (CCid %d): rx_gain %d dB (-ADC %f) for subframe %d\n",UE_id,CC_id,PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB,
- PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB-66.227,subframe);
-#endif
-
- rf_rx_simple(r_re0,
- r_im0,
- nb_antennas_rx,
- length,
- 1e3/RU2UE[ru_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
- rx_pwr = signal_energy_fp(r_re0,r_im0,
- nb_antennas_rx,
- lengthN_RB_DL);
- LOG_D(OCM,"[SIM][DL] UE %d : ADC in (RU %d) %f dBm/RE for subframe %d\n",
- UE_id,ru_id,
- 10*log10(rx_pwr),subframe);
-#endif
-
-
- pthread_mutex_lock(&RU_output_mutex[UE_id]);
- for (i=0; isamples_per_tti; i++) {
- for (aa=0; aaN_RB_DL);
- LOG_D(OCM,"[SIM][DL] UE %d : ADC in %f dBm/RE for subframe %d\n",UE_id,10*log10(rx_pwr),subframe);
-#endif
-
- rxdata = PHY_vars_UE_g[UE_id][CC_id]->common_vars.rxdata;
- sf_offset = (subframe*frame_parms->samples_per_tti)+offset;
-
-
- adc(r_re_p,
- r_im_p,
- 0,
- sf_offset,
- rxdata,
- nb_antennas_rx,
- length,
- 12);
-
-#ifdef DEBUG_SIM
- rx_pwr2 = signal_energy(rxdata[0]+sf_offset,lengthN_RB_DL);
- LOG_D(OCM,"[SIM][DL] UE %d : rx_pwr (ADC out) %f dB/RE (%d) for subframe %d, writing to %p, length %d\n",UE_id, 10*log10((double)rx_pwr2),rx_pwr2,subframe,rxdata,lengthN_RB_DL) ,subframe);
-#else
- UNUSED_VARIABLE(rx_pwr2);
- UNUSED_VARIABLE(tx_pwr);
- UNUSED_VARIABLE(rx_pwr);
-#endif
-
- } // RU_output_mask
- pthread_mutex_unlock(&RU_output_mutex[UE_id]);
- } // ru_id
-
- }
-
-}
-
-
-void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM_CCs],
- node_desc_t *enb_data[NUMBER_OF_RU_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],
- uint16_t subframe,uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
- uint32_t frame,int ru_id,uint8_t CC_id)
-{
-
- int32_t **txdata,**rxdata;
- uint8_t UE_id=0;
-
- uint8_t nb_antennas_rx = UE2RU[0][0][CC_id]->nb_rx; // number of rx antennas at eNB
- uint8_t nb_antennas_tx = UE2RU[0][0][CC_id]->nb_tx; // number of tx antennas at UE
-
- double tx_pwr, rx_pwr;
- int32_t rx_pwr2;
- uint32_t i,aa;
- uint32_t sf_offset;
-
- uint8_t hold_channel=0;
-
- double s_re0[30720];
- double s_re1[30720];
- double *s_re[2];
- double s_im0[30720];
- double s_im1[30720];
- double *s_im[2];
- double r_re00[30720];
- double r_re01[30720];
- double *r_re0[2];
- double r_im00[30720];
- double r_im01[30720];
- double *r_im0[2];
-
- s_re[0] = s_re0;
- s_im[0] = s_im0;
- s_re[1] = s_re1;
- s_im[1] = s_im1;
-
- r_re0[0] = r_re00;
- r_im0[0] = r_im00;
- r_re0[1] = r_re01;
- r_im0[1] = r_im01;
-
- if (abstraction_flag!=0) {
- } else { //without abstraction
-
- pthread_mutex_lock(&UE_output_mutex[ru_id]);
- // Clear RX signal for eNB = eNB_id
- for (i=0; isamples_per_tti; i++) {
- for (aa=0; aacommon_vars.txdata;
- AssertFatal(txdata != NULL,"txdata is null\n");
- sf_offset = subframe*frame_parms->samples_per_tti;
- if (((double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe] +
- UE2RU[UE_id][ru_id][CC_id]->path_loss_dB) <= -125.0) {
- // don't simulate a UE that is too weak
- LOG_D(OCM,"[SIM][UL] ULPOWERS UE %d tx_pwr %d dBm (num_RE %d) for subframe %d (sf_offset %d)\n",
- UE_id,
- PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
- PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
- subframe,sf_offset);
- } else {
- tx_pwr = dac_fixed_gain((double**)s_re,
- (double**)s_im,
- txdata,
- sf_offset,
- nb_antennas_tx,
- frame_parms->samples_per_tti,
- sf_offset,
- frame_parms->ofdm_symbol_size,
- 14,
- (double)PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe]-10*log10((double)PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]),
- 1,
- NULL,
- PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]); // This make the previous argument the total power
- LOG_D(OCM,"[SIM][UL] ULPOWERS UE %d tx_pwr %f dBm (target %d dBm, num_RE %d) for subframe %d (sf_offset %d)\n",
- UE_id,
- 10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe]),
- PHY_vars_UE_g[UE_id][CC_id]->tx_power_dBm[subframe],
- PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe],
- subframe,sf_offset);
-
-
- multipath_channel(UE2RU[UE_id][ru_id][CC_id],s_re,s_im,r_re0,r_im0,
- frame_parms->samples_per_tti,hold_channel);
-
-
- rx_pwr = signal_energy_fp2(UE2RU[UE_id][ru_id][CC_id]->ch[0],
- UE2RU[UE_id][ru_id][CC_id]->channel_length)*UE2RU[UE_id][ru_id][CC_id]->channel_length;
-
- LOG_D(OCM,"[SIM][UL] subframe %d Channel UE %d => RU %d : %f dB (hold %d,length %d, PL %f)\n",subframe,UE_id,ru_id,10*log10(rx_pwr),
- hold_channel,UE2RU[UE_id][ru_id][CC_id]->channel_length,
- UE2RU[UE_id][ru_id][CC_id]->path_loss_dB);
-
- rx_pwr = signal_energy_fp(r_re0,r_im0,nb_antennas_rx,frame_parms->samples_per_tti,0);
- LOG_D(OCM,"[SIM][UL] RU %d (%d/%d rx antennas) : rx_pwr %f dBm (tx_pwr - PL %f) for subframe %d, sptti %d\n",
- ru_id,nb_antennas_rx,UE2RU[UE_id][ru_id][CC_id]->nb_rx,10*log10(rx_pwr),10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe])+UE2RU[UE_id][ru_id][CC_id]->path_loss_dB,subframe,frame_parms->samples_per_tti);
- /*
- if (abs(10*log10(rx_pwr)-10*log10(tx_pwr*PHY_vars_UE_g[UE_id][CC_id]->tx_total_RE[subframe])-UE2RU[UE_id][ru_id][CC_id]->path_loss_dB)>3) {
- LOG_M("txsig_re.m","s_re",s_re[0],frame_parms->samples_per_tti,1,7);
- LOG_M("txsig_im.m","s_im",s_im[0],frame_parms->samples_per_tti,1,7);
- LOG_M("rxsig_re.m","r_re",r_re0[0],frame_parms->samples_per_tti,1,7);
- LOG_M("rxsig_im.m","r_im",r_im0[0],frame_parms->samples_per_tti,1,7);
- exit(-1);
- }*/
-
- if (UE2RU[UE_id][ru_id][CC_id]->first_run == 1)
- UE2RU[UE_id][ru_id][CC_id]->first_run = 0;
-
-
- pthread_mutex_lock(&UE_output_mutex[ru_id]);
- for (aa=0; aasamples_per_tti; i++) {
- r_re_UL[ru_id][aa][i]+=r_re0[aa][i];
- r_im_UL[ru_id][aa][i]+=r_im0[aa][i];
- }
- }
- pthread_mutex_unlock(&UE_output_mutex[ru_id]);
- }
- } //UE_id
-
- double *r_re_p[2] = {r_re_UL[ru_id][0],r_re_UL[ru_id][1]};
- double *r_im_p[2] = {r_im_UL[ru_id][0],r_im_UL[ru_id][1]};
-
- rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,frame_parms->samples_per_tti,0);
- LOG_D(OCM,"[SIM][UL] RU %d (%d/%d rx antennas) : rx_pwr %f dBm (before RF) for subframe %d, gain %f\n",
- ru_id,nb_antennas_rx,nb_antennas_rx,10*log10(rx_pwr),subframe,
- (double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx - 66.227);
- rf_rx_simple(r_re_p,
- r_im_p,
- nb_antennas_rx,
- frame_parms->samples_per_tti,
- 1e3/UE2RU[0][ru_id][CC_id]->sampling_rate, // sampling time (ns)
- (double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx - 66.227); // rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
-
- //#ifdef DEBUG_SIM
- rx_pwr = signal_energy_fp(r_re_p,r_im_p,nb_antennas_rx,frame_parms->samples_per_tti,0);//*(double)frame_parms->ofdm_symbol_size/(12.0*frame_parms->N_RB_DL;
- LOG_D(OCM,"[SIM][UL] rx_pwr (ADC in) %f dB for subframe %d (rx_gain %f)\n",10*log10(rx_pwr),subframe,
- (double)RC.ru[ru_id]->max_rxgain-(double)RC.ru[ru_id]->att_rx);
- //#endif
-
- rxdata = RC.ru[ru_id]->common.rxdata;
- sf_offset = subframe*frame_parms->samples_per_tti;
-
-
- adc(r_re_p,
- r_im_p,
- 0,
- sf_offset,
- rxdata,
- nb_antennas_rx,
- frame_parms->samples_per_tti,
- 12);
-
-#ifdef DEBUG_SIM
- rx_pwr2 = signal_energy(rxdata[0]+sf_offset,frame_parms->samples_per_tti)*(double)frame_parms->ofdm_symbol_size/(12.0*frame_parms->N_RB_DL);
- LOG_D(OCM,"[SIM][UL] RU %d rx_pwr (ADC out) %f dB (%d) for subframe %d (offset %d) = %p\n",ru_id,10*log10((double)rx_pwr2),rx_pwr2,subframe,sf_offset,rxdata[0]+sf_offset);
-#else
- UNUSED_VARIABLE(tx_pwr);
- UNUSED_VARIABLE(rx_pwr);
- UNUSED_VARIABLE(rx_pwr2);
-#endif
-
- } // abstraction_flag==0
-
-}
-
-
-void init_channel_vars(LTE_DL_FRAME_PARMS *frame_parms, double ***s_re,double ***s_im,double ***r_re,double ***r_im,double ***r_re0,double ***r_im0)
-{
-
- int i;
-
- memset(RU_output_mask,0,sizeof(int)*NUMBER_OF_UE_MAX);
- for (i=0;i
-#include
-// #include "UTIL/LOG/log.h"
-#include "event_handler.h"
-
-//extern frame_t frame;
-//End_Of_Sim_Event end_event; //Could later be a list of condition_events (if the end condition is more complicated)
-
-Event_List_t event_list;
-
-void add_event(Event_t event)
-{
-
- Event_elt_t * counter = event_list.head;
- Event_elt_t * previous = counter;
- Event_elt_t * elt = malloc(sizeof(Event_elt_t));
-
- while (counter != NULL) {
- if ((counter->event).frame > event.frame) break;
- //else if ((counter->event).next_slot > event.next_slot) break;
- else {
- previous = counter;
- counter = counter->next;
- }
- }
-
- elt->event = event;
-
- //printf("%" PRIu8 "testestest \n", *((uint8_t *) event.value));
- if (event_list.head != NULL)
- event_list_add_element(elt, previous, &event_list);
- else
- event_list_add_head(elt, &event_list);
-
-}
-
-void schedule(Operation_Type_t op, Event_Type_t type, int frame, char * key, void * value, int ue, int lcid)
-{
- Event_t event;
- event.frame = frame;
-
- if (key == NULL) { //Global model update
- event.key = NULL;
- } else { //Update of a single parameter
- event.key = malloc (sizeof(char) * (strlen(key)+1));
- strcpy(event.key, key);
- }
-
- event.value = value;
- //printf("%" PRIu8 "testestest \n",*((uint8_t *)value));
- event.type = type;
- event.optype = op;
- event.lcid = lcid;
- event.ue = ue;
- add_event(event);
-}
-
-void schedule_delayed(Operation_Type_t op, Event_Type_t type, char * key, void* value, char * date, int ue, int lcid)
-{
- printf("Delayed schedule");
- printf("date %s\n", date);
- // first get the time from the system
- struct tm *pdh;
- time_t intps;
- intps=time(NULL);
- pdh = localtime(&intps);
- char *date_cpy = malloc (sizeof (char) * 256);
- strncpy( date_cpy, date, 256 );
- date_cpy[255] = 0; // terminate string
- // second count the frame to reach the time
- char *heure = NULL;
- int heure_int;
- int minute_int;
- int heure_diff;
- int minute_diff;
- int ms_diff;
- int frame;
-
-
- char *minute = NULL;
- heure = strtok(date_cpy,"h");
- //heure = strchr(date,'h');
- printf("hour char : %s", heure);
-
- minute = strchr(date,'h');
- printf("minute char : %s", minute+1);
-
- free( date_cpy );
- date_cpy = 0;
-
- heure_int = atoi(heure);
-
- minute_int = atoi(minute+1);
- heure_diff = heure_int - pdh->tm_hour;
- minute_diff = minute_int - pdh->tm_min;
- ms_diff = heure_diff*3600*1000 + minute_diff*60*1000;
- frame = ms_diff/10;
-
- /*char stTemp[2];
- int valeur_a_en_entier;
-
- sprintf(stTemp,"%c",a);
- valeur_a_en_entier = atoi(stTemp);*/
- // third schedule with the classic function
- printf("schedule_frame %d\n",frame);
- printf("test pdh hr : %d\n", pdh->tm_hour);
- printf("test heure_diff : %d\n", heure_diff);
- printf("test minute_diff : %d\n", minute_diff);
-
- if(frame >= 0) {
- schedule(op,type,frame,key,value,lcid,ue);
- }
-}
-
-/*
- * this function can reschedule events in the future to build a desired (more dynamic) scenario
- * TODO: make sure that OCG OAI_Emulation is decoupled with the local vars
- *
- * For ET_MAC parameters are first set in the OAI_emulation (OCG) structure and then
- * duplicated in the eNB_mac_inst structure
- *
- * If you want to modifiy a parameter for all UEs, put -1 in the lcid and the ue field when you call
- * the schedule function
- */
-void schedule_events()
-{
-
- /*
- * Step 1: vars needed for future changes
- */
-
- // overall config associated with OAI_ET
- // OAI_Emulation * oai_frame_1000;
-
- // specific config
- /*
- * associated with SYS_ET
- */
- //Environment_System_Config * system_frame_200;
- /*
- * associated with TOPO_ET
- */
- //Topology_Config *topology_frame_10;
- /*
- * associated with APP_ET
- */
- //Application_Config *application_frame_20;
- /*
- * associated with EMU_ET
- */
- //Emulation_Config * emulation_frame_100;
- uint8_t a;
-
- Mac_config* mac_config;
- Mac_config* mac_config2;
- Mac_config* mac_config3;
- Mac_config* mac_config4;
- Mac_config* mac_config5;
- int i=0;
-
- mac_config = NULL;
- mac_config2 = NULL;
- mac_config3 = NULL;
- mac_config4 = NULL;
- mac_config5 = NULL;
- mac_config = malloc(sizeof(Mac_config));
- mac_config2= malloc(sizeof(Mac_config));
- mac_config3= malloc(sizeof(Mac_config));
- mac_config4= malloc(sizeof(Mac_config));
- mac_config5= malloc(sizeof(Mac_config));
-
- a = 5;
-
- //uint16_t *priority[11];//={1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2};
-
-
- //int tab[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX];
- Application_Config* application_config;
- application_config = malloc(sizeof(Application_Config));
-
- for(i=0; icustomized_traffic.aggregation_level[i]=i;
- }
-
- mac_config->DCI_aggregation_min = a;
- mac_config->DLSCH_dci_size_bits = a;
-
- /*
- * Step 2: set the desired future changes in the vars
- */
- // i.e. optionally provide an XML file and update OCG vars
-
- //mob_frame_10 -> ...
- //application_frame_30 -> ...
-
- /*
- * Step 3: schedule the execution of changes
- */
-
- // general OAI dynamic configuration
-
- //schedule(OAI_ET, 1000, NULL, oai_frame_1000);
- //schedule(SYS_ET, 200, NULL, system_frame_200);
- //schedule(READ, TOPO_ET, 10, NULL, "");
- //schedule(APP_ET, 20, NULL, application_frame_20);
- //schedule(EMU_ET, 100, NULL,emulation_frame_100);
-
- // protocol dynamic configuration
- schedule(READ, MAC_ET, 115, NULL, "",0,0);
- //schedule(READ, MAC_ET, 400, NULL, "");
- //schedule(READ, MAC_ET, 500, NULL, "");
- //schedule(WRITE, MAC_ET, 100, NULL, "");
- //schedule(READ, TOPO_ET,110,NULL,"",0,0);
- //double b = (double) 45;
- //schedule(READ, APP_ET,111,NULL,"",0,0);
- //schedule(READ, SYS_ET,112,NULL,"",0,0);
- //schedule(READ, EMU_ET,113,NULL,"",-1,-1);
-
- //schedule(WRITE, MAC_ET, 122, "DCI_aggregation_min", mac_config);
- //schedule(WRITE, MAC_ET, 123, "max_allowed_rbs", mac_config);
- //schedule(WRITE, MAC_ET, 125, "max_mcs", mac_config);
- int j=0;
-
- for(i=0; ievent;
-
- if (event.frame == frame) {
- //printf("%" PRIu8 "testestest \n", *((uint8_t *) event.value));
- switch (event.type) {
- case OAI_ET:
- update_oai_model(event.key, event.value);
- user_defined_event = event_list_remove_head(&event_list);
- break;
-
- case SYS_ET:
- update_sys_model(event);
- user_defined_event = event_list_remove_head(&event_list);
- break;
-
- case TOPO_ET:
- update_topo_model(event); //implement it with assigning the new values to that of oai_emulation & second thing is to ensure mob model is always read from oai_emulation
- user_defined_event = event_list_remove_head(&event_list);
- break;
-
- case APP_ET:
- update_app_model(event);
- user_defined_event = event_list_remove_head(&event_list);
- break;
-
- case EMU_ET:
- update_emu_model(event);
- user_defined_event = event_list_remove_head(&event_list);
- break;
-
- case MAC_ET:
- update_mac(event);
- user_defined_event = event_list_remove_head(&event_list);
- break;
-
- default :
- break;
- }
- } else {
- break;
- }
- }
-
-}
-
-
-void update_mac(Event_t event)
-{
- LOG_I(EMU,"A NEW MAC MODEL\n");
- int i = 0;
- UE_list_t *UE_list = 0;
- int enb_module_id=0;
- int cc_id =0;
- eNB_MAC_INST *eNB_mac_inst = get_eNB_mac_inst(enb_module_id);
- OAI_Emulation *oai_emulation = get_OAI_emulation();
-
- if(event.optype == READ) {
-
- printf("eNB_stats\n\n\n");
-
- if(event.key==NULL) {
-
- LOG_I(EMU,"num_dlactive_UEs :");
- printf("%" PRIu16 "\n",eNB_mac_inst->eNB_stats[cc_id].num_dlactive_UEs);
- LOG_I(EMU,"available_prbs :");
- printf("%" PRIu16 "\n",eNB_mac_inst->eNB_stats[cc_id].available_prbs);
- LOG_I(EMU,"total_available_prbs :");
- printf("%" PRIu32 "\n", eNB_mac_inst->eNB_stats[cc_id].total_available_prbs);
- LOG_I(EMU,"available_ncces :");
- printf("%" PRIu16 "\n",eNB_mac_inst->eNB_stats[cc_id].available_ncces);
- LOG_I(EMU,"dlsch_bitrate :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].dlsch_bitrate);
- LOG_I(EMU,"dlsch_bytes_tx :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].dlsch_bytes_tx);
- LOG_I(EMU,"dlsch_pdus_tx :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].dlsch_pdus_tx);
- LOG_I(EMU,"total_dlsch_bitrate :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].total_dlsch_bitrate);
- LOG_I(EMU,"total_dlsch_bytes_tx :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].total_dlsch_bytes_tx);
- LOG_I(EMU,"total_dlsch_pdus_tx :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].total_dlsch_pdus_tx);
- LOG_I(EMU,"ulsch_bitrate :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].ulsch_bitrate);
- LOG_I(EMU,"ulsch_bytes_rx :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].ulsch_bytes_rx);
- LOG_I(EMU,"ulsch_pdus_rx :");
- printf("%" PRIu64 "\n",eNB_mac_inst->eNB_stats[cc_id].ulsch_pdus_rx);
- } else if(!strcmp((char *) event.key, "num_dlactive_UEs")) {
- LOG_I(EMU,"num_dlactive_UEs :");
- printf("%" PRIu16 "\n",eNB_mac_inst->eNB_stats[cc_id].num_dlactive_UEs);
- } else if(!strcmp((char *) event.key, "available_prbs")) {
- LOG_I(EMU,"available_prbs :");
- printf("%" PRIu16 "\n",eNB_mac_inst->eNB_stats[cc_id].available_prbs);
- } else if(!strcmp((char *) event.key, "total_available_prbs")) {
- LOG_I(EMU,"total_available_prbs :");
- printf("%" PRIu32 "\n", eNB_mac_inst->eNB_stats[cc_id].total_available_prbs);
- } else if(!strcmp((char *) event.key, "available_ncces")) {
- LOG_I(EMU,"available_ncces :");
- printf("%" PRIu16 "\n",eNB_mac_inst->eNB_stats[cc_id].available_ncces);
- } else if(!strcmp((char *) event.key, "dlsch_bitrate")) {
- LOG_I(EMU,"dlsch_bitrate :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].dlsch_bitrate);
- } else if(!strcmp((char *) event.key, "dlsch_bytes_tx")) {
- LOG_I(EMU,"dlsch_bytes_tx :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].dlsch_bytes_tx);
- } else if(!strcmp((char *) event.key, "dlsch_pdus_tx")) {
- LOG_I(EMU,"dlsch_pdus_tx :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].dlsch_pdus_tx);
- } else if(!strcmp((char *) event.key, "total_dlsch_bitrate")) {
- LOG_I(EMU,"total_dlsch_bitrate :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].total_dlsch_bitrate);
- } else if(!strcmp((char *) event.key, "total_dlsch_bytes_tx")) {
- LOG_I(EMU,"total_dlsch_bytes_tx :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].total_dlsch_bytes_tx);
- } else if(!strcmp((char *) event.key, "total_dlsch_pdus_tx")) {
- LOG_I(EMU,"total_dlsch_pdus_tx :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].total_dlsch_pdus_tx);
- } else if(!strcmp((char *) event.key, "ulsch_bitrate")) {
- LOG_I(EMU,"ulsch_bitrate :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].ulsch_bitrate);
- } else if(!strcmp((char *) event.key, "ulsch_bytes_rx")) {
- LOG_I(EMU,"ulsch_bytes_rx :");
- printf("%" PRIu32 "\n",eNB_mac_inst->eNB_stats[cc_id].ulsch_bytes_rx);
- } else if(!strcmp((char *) event.key, "ulsch_pdus_rx")) {
- LOG_I(EMU,"ulsch_pdus_rx :");
- printf("%" PRIu64 "\n",eNB_mac_inst->eNB_stats[cc_id].ulsch_pdus_rx);
- }
- } else if(event.optype == WRITE) {
- LOG_I(EMU,"WRITE OPERATION \n");
-
-
- if(event.key==NULL && event.value!=NULL) {
-
- if((Mac_config *) event.value !=NULL && validate_mac(event)) {
-
- Mac_config* mac_config;
- mac_config = (Mac_config *) event.value;
- LOG_I(EMU,"update complete mac params \n");
-
- if(event.ue == -1 && event.lcid == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
- /*
- if(&mac_config[i].DCI_aggregation_min) {
- LOG_I(EMU,"update dci aggregation min\n");
- oai_emulation->mac_config[i].DCI_aggregation_min= mac_config[i].DCI_aggregation_min;
-
- UE_list->UE_template[0][i].DCI_aggregation_min = oai_emulation->mac_config[i].DCI_aggregation_min;
- LOG_I(EMU,"DCI_aggregation_min UE %d: \n",i);
- LOG_I(EMU,"%" PRIu8,UE_list->UE_template[0][i].DCI_aggregation_min);
- }
-
- if(&mac_config[i].DLSCH_dci_size_bits !=NULL) {
- oai_emulation->mac_config[i].DLSCH_dci_size_bits= mac_config[i].DLSCH_dci_size_bits;
- UE_list->UE_template[0][i].DLSCH_dci_size_bits = oai_emulation->mac_config[i].DLSCH_dci_size_bits;
- LOG_I(EMU,"DLSCH_dci_size_bits UE %d: \n",i);
- LOG_I(EMU,"%" PRIu8,UE_list->UE_template[0][i].DLSCH_dci_size_bits);
- }
- */
-
- if(mac_config[i].priority !=NULL) {
- LOG_I(EMU,"update priority \n");
- int j;
- for(j=0; jmac_config[i].priority[j]= mac_config[i].priority[j];
- UE_list->UE_sched_ctrl[i].priority[j] = oai_emulation->mac_config[i].priority[j];
- LOG_I(EMU,"priority UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].priority[j]);
- }
- }
- }
-
- if(&mac_config[i].ul_bandwidth !=NULL) {
-
- int j=0;
-
- for(j=0; jmac_config[i].ul_bandwidth[j]= mac_config[i].ul_bandwidth[j];
- UE_list->UE_sched_ctrl[i].ul_bandwidth[j] = oai_emulation->mac_config[i].ul_bandwidth[j];
- LOG_I(EMU,"ul_bandwidth UE %d LCID %d:", i, j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].ul_bandwidth[j]);
- }
- }
-
- if(&mac_config[i].dl_bandwidth !=NULL) {
- int j=0;
-
- for(j=0; jmac_config[i].dl_bandwidth[j]= mac_config[i].dl_bandwidth[j];
- UE_list->UE_sched_ctrl[i].dl_bandwidth[j] = oai_emulation->mac_config[i].dl_bandwidth[j];
- LOG_I(EMU,"ul_bandwidth UE %d LCID %d:", i, j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].dl_bandwidth[j]);
- }
- }
-
- if(&mac_config[i].ue_AggregatedMaximumBitrateDL !=NULL) {
- oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateDL= mac_config[i].ue_AggregatedMaximumBitrateDL;
- UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateDL = oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateDL;
- LOG_I(EMU,"ue_AggregatedMaximumBitrateDL UE %d:",i );
- LOG_I(EMU,"%" PRIu64 "\n",UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateDL);
- }
-
- if(&mac_config[i].ue_AggregatedMaximumBitrateUL !=NULL) {
- oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateUL= mac_config[i].ue_AggregatedMaximumBitrateUL;
- UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateUL = oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateUL;
- LOG_I(EMU,"ue_AggregatedMaximumBitrateUL UE %d:",i);
- LOG_I(EMU,"%" PRIu64 "\n",UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateUL);
- }
-
- if(&mac_config[i].cqiSchedInterval !=NULL) {
- oai_emulation->mac_config[i].cqiSchedInterval= mac_config[i].cqiSchedInterval;
- UE_list->UE_sched_ctrl[i].cqiSchedInterval = oai_emulation->mac_config[i].cqiSchedInterval;
- LOG_I(EMU,"cqiSchedInterval UE %d:",i);
- LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].cqiSchedInterval);
- }
-
- if(&mac_config[i].mac_ContentionResolutionTimer !=NULL) {
- oai_emulation->mac_config[i].mac_ContentionResolutionTimer= mac_config[i].mac_ContentionResolutionTimer;
- UE_list->UE_sched_ctrl[i].mac_ContentionResolutionTimer = oai_emulation->mac_config[i].mac_ContentionResolutionTimer;
- LOG_I(EMU,"mac_ContentionResolutionTimer UE %d:", i);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].mac_ContentionResolutionTimer);
- }
-
- if(mac_config->max_allowed_rbs !=NULL) {
- int j=0;
-
- for(j=0; jmac_config[i].max_allowed_rbs[j]= mac_config[i].max_allowed_rbs[j];
- UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0] = oai_emulation->mac_config[i].max_allowed_rbs[j];
- LOG_I(EMU,"max_allowed_rbs UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0]);
- }
- }
-
- if(mac_config[i].max_mcs !=NULL) {
- int j=0;
-
- for(j=0; jmac_config[i].max_mcs[j]= mac_config[i].max_mcs[j];
- UE_list->UE_sched_ctrl[i].max_mcs[j] = oai_emulation->mac_config[i].max_mcs[j];
- LOG_I(EMU,"max_mcs UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].max_mcs[j]);
- }
-
- }
- }
- } else {
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
- LOG_I(EMU,"update complete mac params \n");
- i = event.ue;
- int j = event.lcid;
- /*
- if(&mac_config[i].DCI_aggregation_min) {
- LOG_I(EMU,"update dci aggregation min\n");
- oai_emulation->mac_config[i].DCI_aggregation_min= mac_config[i].DCI_aggregation_min;
- // duplication dans le ue template, vérifier la validité avant
- UE_list->UE_template[0][i].DCI_aggregation_min = oai_emulation->mac_config[i].DCI_aggregation_min;
- LOG_I(EMU,"DCI_aggregation_min UE %d: \n",i);
- LOG_I(EMU,"%" PRIu8,UE_list->UE_template[0][i].DCI_aggregation_min);
- }
-
- if(&mac_config[i].DLSCH_dci_size_bits !=NULL) {
- oai_emulation->mac_config[i].DLSCH_dci_size_bits= mac_config[i].DLSCH_dci_size_bits;
- UE_list->UE_template[0][i].DLSCH_dci_size_bits = oai_emulation->mac_config[i].DLSCH_dci_size_bits;
- LOG_I(EMU,"DLSCH_dci_size_bits UE %d: \n",i);
- LOG_I(EMU,"%" PRIu8,UE_list->UE_template[0][i].DLSCH_dci_size_bits);
- }
- */
- if(mac_config[i].priority !=NULL) {
- LOG_I(EMU,"update priority \n");
-
-
- if(&mac_config[i].priority[j]!=NULL) {
- oai_emulation->mac_config[i].priority[j]= mac_config[i].priority[j];
- UE_list->UE_sched_ctrl[i].priority[j] = oai_emulation->mac_config[i].priority[j];
- LOG_I(EMU,"priority UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].priority[j]);
- }
-
- }
-
- if(&mac_config[i].ul_bandwidth !=NULL) {
- // faire boucle par ue puis par lcid
-
-
-
- oai_emulation->mac_config[i].ul_bandwidth[j]= mac_config[i].ul_bandwidth[j];
- UE_list->UE_sched_ctrl[i].ul_bandwidth[j] = oai_emulation->mac_config[i].ul_bandwidth[j];
- LOG_I(EMU,"ul_bandwidth UE %d LCID %d:", i, j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].ul_bandwidth[j]);
-
- }
-
- if(&mac_config[i].dl_bandwidth !=NULL) {
- oai_emulation->mac_config[i].dl_bandwidth[j]= mac_config[i].dl_bandwidth[j];
- UE_list->UE_sched_ctrl[i].dl_bandwidth[j] = oai_emulation->mac_config[i].dl_bandwidth[j];
- LOG_I(EMU,"ul_bandwidth UE %d LCID %d:", i, j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].dl_bandwidth[j]);
-
- }
-
- if(&mac_config[i].min_ul_bandwidth !=NULL) {
- // faire boucle par ue puis par lcid
- oai_emulation->mac_config[i].min_ul_bandwidth[j]= mac_config[i].min_ul_bandwidth[j];
- UE_list->UE_sched_ctrl[i].min_ul_bandwidth[j] = oai_emulation->mac_config[i].min_ul_bandwidth[j];
- LOG_I(EMU,"min_ul_bandwidth UE %d LCID %d:", i, j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].min_ul_bandwidth[j]);
-
- }
-
- if(&mac_config[i].min_dl_bandwidth !=NULL) {
- oai_emulation->mac_config[i].min_dl_bandwidth[j]= mac_config[i].min_dl_bandwidth[j];
- UE_list->UE_sched_ctrl[i].min_dl_bandwidth[j] = oai_emulation->mac_config[i].min_dl_bandwidth[j];
- LOG_I(EMU,"min_dl_bandwidth UE %d LCID %d:", i, j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].min_dl_bandwidth[j]);
-
- }
-
- if(&mac_config[i].ue_AggregatedMaximumBitrateDL !=NULL) {
- oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateDL= mac_config[i].ue_AggregatedMaximumBitrateDL;
- UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateDL = oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateDL;
- LOG_I(EMU,"ue_AggregatedMaximumBitrateDL UE %d:",i );
- LOG_I(EMU,"%" PRIu64 "\n",UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateDL);
- }
-
- if(&mac_config[i].ue_AggregatedMaximumBitrateUL !=NULL) {
- oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateUL= mac_config[i].ue_AggregatedMaximumBitrateUL;
- UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateUL = oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateUL;
- LOG_I(EMU,"ue_AggregatedMaximumBitrateUL UE %d:",i);
- LOG_I(EMU,"%" PRIu64 "\n",UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateUL);
- }
-
- if(&mac_config[i].cqiSchedInterval !=NULL) {
- oai_emulation->mac_config[i].cqiSchedInterval= mac_config[i].cqiSchedInterval;
- UE_list->UE_sched_ctrl[i].cqiSchedInterval = oai_emulation->mac_config[i].cqiSchedInterval;
- LOG_I(EMU,"cqiSchedInterval UE %d:",i);
- LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].cqiSchedInterval);
- }
-
- if(&mac_config[i].mac_ContentionResolutionTimer !=NULL) {
- oai_emulation->mac_config[i].mac_ContentionResolutionTimer= mac_config[i].mac_ContentionResolutionTimer;
- UE_list->UE_sched_ctrl[i].mac_ContentionResolutionTimer = oai_emulation->mac_config[i].mac_ContentionResolutionTimer;
- LOG_I(EMU,"mac_ContentionResolutionTimer UE %d:", i);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].mac_ContentionResolutionTimer);
- }
-
- if(mac_config->max_allowed_rbs !=NULL) {
-
- oai_emulation->mac_config[i].max_allowed_rbs[j]= mac_config[i].max_allowed_rbs[j];
- UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0] = oai_emulation->mac_config[i].max_allowed_rbs[j];
- LOG_I(EMU,"max_allowed_rbs UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0]);
-
- }
-
- if(mac_config[i].max_mcs !=NULL) {
- oai_emulation->mac_config[i].max_mcs[j]= mac_config[i].max_mcs[j];
- UE_list->UE_sched_ctrl[i].max_mcs[j] = oai_emulation->mac_config[i].max_mcs[j];
- LOG_I(EMU,"max_mcs UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].max_mcs[j]);
-
- }
- }
- }
- } else if(!strcmp((char *) event.key, "priority") && event.value!=NULL && validate_mac(event)) {
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
- int j=0;
- LOG_I(EMU,"priority update \n");
- if(event.ue == -1) {
- for(i=0; imac_config[i].priority[j]= mac_config[i].priority[j];
- UE_list->UE_sched_ctrl[i].priority[j] = oai_emulation->mac_config[i].priority[j];
- LOG_I(EMU,"priority UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].priority[j]);
- }
- }
- }
- } else {
- oai_emulation->mac_config[event.ue].priority[event.lcid]= mac_config[event.ue].priority[event.lcid];
- UE_list->UE_sched_ctrl[event.ue].priority[event.lcid] = oai_emulation->mac_config[event.ue].priority[event.lcid];
- LOG_I(EMU,"priority UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[event.ue].priority[event.lcid]);
- }
- } else if(!strcmp((char *) event.key, "DCI_aggregation_min") && event.value!=NULL && validate_mac(event)) {
- //Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- //mac_config = (Mac_config *) event.value;
-
- LOG_I(EMU,"DCI_aggregation_min update \n");
-
- if(event.ue == -1) {
- UE_list = &eNB_mac_inst->UE_list;
- /*
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
- oai_emulation->mac_config[i].DCI_aggregation_min=mac_config[i].DCI_aggregation_min;
- UE_list->UE_template[0][i].DCI_aggregation_min = oai_emulation->mac_config[i].DCI_aggregation_min;
- LOG_I(EMU,"DCI_aggregation_min UE %d : \n", i);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_template[0][i].DCI_aggregation_min);
- }*/
- } else {
- /* oai_emulation->mac_config[event.ue].DCI_aggregation_min=mac_config[event.ue].DCI_aggregation_min;
- UE_list->UE_template[0][event.ue].DCI_aggregation_min = oai_emulation->mac_config[event.ue].DCI_aggregation_min;
- LOG_I(EMU,"DCI_aggregation_min UE %d : \n", event.ue);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_template[0][event.ue].DCI_aggregation_min);*/
- }
- } else if(!strcmp((char *) event.key, "DLSCH_dci_size_bits") && event.value!=NULL && validate_mac(event)) {
- //Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- //mac_config = (Mac_config *) event.value;
-
-
- LOG_I(EMU,"DLSCH_dci_size_bits update \n");
-
- if(event.ue == -1) {
- UE_list = &eNB_mac_inst->UE_list;
- /*
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
- oai_emulation->mac_config[i].DLSCH_dci_size_bits=mac_config[i].DLSCH_dci_size_bits;
- UE_list->UE_template[0][i].DLSCH_dci_size_bits = oai_emulation->mac_config[i].DLSCH_dci_size_bits;
- LOG_I(EMU,"DLSCH_dci_size_bits UE %d: \n", i);
- LOG_I(EMU,"%" PRIu8,UE_list->UE_template[0][i].DLSCH_dci_size_bits);
- }*/
- } else {
- /* oai_emulation->mac_config[event.ue].DLSCH_dci_size_bits=mac_config[event.ue].DLSCH_dci_size_bits;
- UE_list->UE_template[0][event.ue].DLSCH_dci_size_bits = oai_emulation->mac_config[event.ue].DLSCH_dci_size_bits;
- LOG_I(EMU,"DLSCH_dci_size_bits UE %d: \n", event.ue);
- LOG_I(EMU,"%" PRIu8,UE_list->UE_template[0][event.ue].DLSCH_dci_size_bits);*/
- }
-
- } else if(!strcmp((char *) event.key, "ul_bandwidth") && event.value!=NULL) {
-
-
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
- int j=0;
-
- if(event.ue == -1 && event.lcid == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
-
-
- for(j=0; jmac_config[i].ul_bandwidth[j]= mac_config[i].ul_bandwidth[j];
- UE_list->UE_sched_ctrl[i].ul_bandwidth[j] = oai_emulation->mac_config[i].ul_bandwidth[j];
- LOG_I(EMU,"ul_bandwidth UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].ul_bandwidth[j]);
- }
- }
-
- }
- } else {
- oai_emulation->mac_config[event.ue].ul_bandwidth[event.lcid]= mac_config[event.ue].ul_bandwidth[event.lcid];
- UE_list->UE_sched_ctrl[event.ue].ul_bandwidth[event.lcid] = oai_emulation->mac_config[event.ue].ul_bandwidth[event.lcid];
- LOG_I(EMU,"ul_bandwidth UE %d LCID %d:",event.ue, event.lcid);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[event.ue].ul_bandwidth[event.lcid]);
- }
-
- } else if(!strcmp((char *) event.key, "dl_bandwidth") && event.value!=NULL && validate_mac(event)) {
-
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
- int j=0;
-
- if(event.ue == -1 && event.lcid == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
- if(event.value + i !=NULL) {
-
- for(j=0; jmac_config[i].dl_bandwidth[j]= mac_config[i].dl_bandwidth[j];
- UE_list->UE_sched_ctrl[i].dl_bandwidth[j] = oai_emulation->mac_config[i].dl_bandwidth[j];
- LOG_I(EMU,"dl_bandwidth UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].dl_bandwidth[j]);
- }
- }
- }
- }
- } else {
- oai_emulation->mac_config[event.ue].dl_bandwidth[event.lcid]= mac_config[event.ue].dl_bandwidth[event.lcid];
- UE_list->UE_sched_ctrl[event.ue].dl_bandwidth[event.lcid] = oai_emulation->mac_config[event.ue].dl_bandwidth[event.lcid];
- LOG_I(EMU,"dl_bandwidth UE %d LCID %d:",event.ue, event.lcid);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[event.ue].dl_bandwidth[event.lcid]);
- }
- } else if(!strcmp((char *) event.key, "min_ul_bandwidth") && event.value!=NULL) {
-
-
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
- int j=0;
-
- if(event.ue == -1 && event.lcid == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
-
-
- for(j=0; jmac_config[i].min_ul_bandwidth[j]= mac_config[i].min_ul_bandwidth[j];
- UE_list->UE_sched_ctrl[i].min_ul_bandwidth[j] = oai_emulation->mac_config[i].min_ul_bandwidth[j];
- LOG_I(EMU,"min_ul_bandwidth UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].min_ul_bandwidth[j]);
- }
- }
-
- }
- } else {
- oai_emulation->mac_config[event.ue].min_ul_bandwidth[event.lcid]= mac_config[event.ue].min_ul_bandwidth[event.lcid];
- UE_list->UE_sched_ctrl[event.ue].min_ul_bandwidth[event.lcid] = oai_emulation->mac_config[event.ue].min_ul_bandwidth[event.lcid];
- LOG_I(EMU,"min_ul_bandwidth UE %d LCID %d:",event.ue, event.lcid);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[event.ue].min_ul_bandwidth[event.lcid]);
- }
-
- } else if(!strcmp((char *) event.key, "min_dl_bandwidth") && event.value!=NULL && validate_mac(event)) {
-
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
- int j=0;
-
- if(event.ue == -1 && event.lcid == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
- if(event.value + i !=NULL) {
-
- for(j=0; jmac_config[i].min_dl_bandwidth[j]= mac_config[i].min_dl_bandwidth[j];
- UE_list->UE_sched_ctrl[i].min_dl_bandwidth[j] = oai_emulation->mac_config[i].min_dl_bandwidth[j];
- LOG_I(EMU,"min_dl_bandwidth UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].min_dl_bandwidth[j]);
- }
- }
- }
- }
- } else {
- oai_emulation->mac_config[event.ue].min_dl_bandwidth[event.lcid]= mac_config[event.ue].min_dl_bandwidth[event.lcid];
- UE_list->UE_sched_ctrl[event.ue].min_dl_bandwidth[event.lcid] = oai_emulation->mac_config[event.ue].min_dl_bandwidth[event.lcid];
- LOG_I(EMU,"min_dl_bandwidth UE %d LCID %d:",event.ue, event.lcid);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[event.ue].min_dl_bandwidth[event.lcid]);
- }
- } else if(!strcmp((char *) event.key, "ue_AggregatedMaximumBitrateDL") && event.value!=NULL && validate_mac(event)) {
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
-
- LOG_I(EMU,"ue_AggregatedMaximumBitrateDL update \n");
-
- if(event.ue == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
- oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateDL= mac_config[i].ue_AggregatedMaximumBitrateDL;
- UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateDL = oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateDL;
- LOG_I(EMU,"ue_AggregatedMaximumBitrateDL UE %d:\n",event.ue);
- LOG_I(EMU,"%" PRIu64 "\n",UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateDL);
- }
- } else {
- oai_emulation->mac_config[event.ue].ue_AggregatedMaximumBitrateDL= mac_config[event.ue].ue_AggregatedMaximumBitrateDL;
- UE_list->UE_sched_ctrl[event.ue].ue_AggregatedMaximumBitrateDL = oai_emulation->mac_config[event.ue].ue_AggregatedMaximumBitrateDL;
- LOG_I(EMU,"ue_AggregatedMaximumBitrateDL UE %d:\n",event.ue);
- LOG_I(EMU,"%" PRIu64 "\n",UE_list->UE_sched_ctrl[event.ue].ue_AggregatedMaximumBitrateDL);
- }
-
- } else if(!strcmp((char *) event.key, "ue_AggregatedMaximumBitrateUL") && event.value!=NULL && validate_mac(event)) {
-
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
-
- LOG_I(EMU,"ue_AggregatedMaximumBitrateUL update \n");
-
- if(event.ue == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
- oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateUL= mac_config[i].ue_AggregatedMaximumBitrateUL;
- UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateUL = oai_emulation->mac_config[i].ue_AggregatedMaximumBitrateUL;
- LOG_I(EMU,"ue_AggregatedMaximumBitrateUL UE %d:\n",i);
- LOG_I(EMU,"%" PRIu64 "\n",UE_list->UE_sched_ctrl[i].ue_AggregatedMaximumBitrateUL);
- }
- } else {
- oai_emulation->mac_config[event.ue].ue_AggregatedMaximumBitrateUL= mac_config[event.ue].ue_AggregatedMaximumBitrateUL;
- UE_list->UE_sched_ctrl[event.ue].ue_AggregatedMaximumBitrateUL = oai_emulation->mac_config[event.ue].ue_AggregatedMaximumBitrateUL;
- LOG_I(EMU,"ue_AggregatedMaximumBitrateUL UE %d:\n",event.ue);
- LOG_I(EMU,"%" PRIu64 "\n",UE_list->UE_sched_ctrl[event.ue].ue_AggregatedMaximumBitrateUL);
- }
-
- } else if(!strcmp((char *) event.key, "cqiSchedInterval") && event.value!=NULL && validate_mac(event)) {
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
-
- LOG_I(EMU,"cqiSchedInterval update \n");
-
- if(event.ue == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
- oai_emulation->mac_config[i].cqiSchedInterval= mac_config[i].cqiSchedInterval;
- UE_list->UE_sched_ctrl[i].cqiSchedInterval = oai_emulation->mac_config[i].cqiSchedInterval;
- LOG_I(EMU,"cqiSchedInterval UE %d:\n", i);
- LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].cqiSchedInterval);
- }
- } else {
- oai_emulation->mac_config[event.ue].cqiSchedInterval= mac_config[event.ue].cqiSchedInterval;
- UE_list->UE_sched_ctrl[event.ue].cqiSchedInterval = oai_emulation->mac_config[event.ue].cqiSchedInterval;
- LOG_I(EMU,"cqiSchedInterval UE %d:\n", event.ue);
- LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[event.ue].cqiSchedInterval);
- }
- } else if(!strcmp((char *) event.key, "mac_ContentionResolutionTimer") && event.value!=NULL && validate_mac(event)) {
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
- LOG_I(EMU,"mac_ContentionResolutionTimer update \n");
-
- if(event.ue == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
- oai_emulation->mac_config[i].mac_ContentionResolutionTimer= mac_config[i].mac_ContentionResolutionTimer;
- UE_list->UE_sched_ctrl[i].mac_ContentionResolutionTimer = oai_emulation->mac_config[i].mac_ContentionResolutionTimer;
- LOG_I(EMU,"mac_ContentionResolutionTimer UE %d:\n", i);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[i].mac_ContentionResolutionTimer);
- }
- } else {
- oai_emulation->mac_config[event.ue].mac_ContentionResolutionTimer= mac_config[event.ue].mac_ContentionResolutionTimer;
- UE_list->UE_sched_ctrl[event.ue].mac_ContentionResolutionTimer = oai_emulation->mac_config[event.ue].mac_ContentionResolutionTimer;
- LOG_I(EMU,"mac_ContentionResolutionTimer UE %d:\n", event.ue);
- LOG_I(EMU,"%" PRIu8 "\n",UE_list->UE_sched_ctrl[event.ue].mac_ContentionResolutionTimer);
- }
- } else if(!strcmp((char *) event.key, "max_allowed_rbs") && event.value!=NULL && validate_mac(event)) {
-
-
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
- int j=0;
-
- if(event.ue == -1 && event.lcid == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
- if(event.value + i !=NULL) {
-
- for(j=0; jmac_config[i].max_allowed_rbs[j]= mac_config[i].max_allowed_rbs[j];
- UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0] = oai_emulation->mac_config[i].max_allowed_rbs[j];
- LOG_I(EMU,"max_allowed_rbs UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].max_rbs_allowed_slice[j][0]);
- }
- }
- }
- }
- } else {
- oai_emulation->mac_config[event.ue].max_allowed_rbs[event.lcid]= mac_config[event.ue].max_allowed_rbs[event.lcid];
- UE_list->UE_sched_ctrl[event.ue].max_rbs_allowed_slice[event.lcid][0] = oai_emulation->mac_config[event.ue].max_allowed_rbs[event.lcid];
- LOG_I(EMU,"max_allowed_rbs UE %d LCID %d:",event.ue,event.lcid);
- LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[event.ue].max_rbs_allowed_slice[event.lcid][0]);
- }
-
- } else if(!strcmp((char *) event.key, "max_mcs") && event.value!=NULL && validate_mac(event)) {
-
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
- int j=0;
-
- if(event.ue == -1 && event.lcid == -1) {
- UE_list = &eNB_mac_inst->UE_list;
-
- for(i=UE_list->head; i>=0; i=UE_list->next[i]) {
-
- for(j=0; jmac_config[i].max_mcs[j]= mac_config[i].max_mcs[j];
- UE_list->UE_sched_ctrl[i].max_mcs[j] = oai_emulation->mac_config[i].max_mcs[j];
- LOG_I(EMU,"max_mcs UE %d LCID %d:",i,j);
- LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[i].max_mcs[j]);
- }
- }
-
- }
- } else {
- oai_emulation->mac_config[event.ue].max_mcs[event.lcid]= mac_config[event.ue].max_mcs[event.lcid];
- UE_list->UE_sched_ctrl[event.ue].max_mcs[event.lcid] = oai_emulation->mac_config[event.ue].max_mcs[event.lcid];
- LOG_I(EMU,"max_mcs UE %d LCID %d:",event.ue,event.lcid);
- LOG_I(EMU,"%" PRIu16 "\n",UE_list->UE_sched_ctrl[event.ue].max_mcs[event.lcid]);
- }
- }
- }
-
-
-}
-
-void update_oai_model(char * key, void * value)
-{
-
-}
-
-void update_sys_model(Event_t event)
-{
-
-
- printf("\n\n\nA NEW SYS MODEL\n\n\n");
- OAI_Emulation *oai_emulation;
- oai_emulation = get_OAI_emulation();
- int i=0;
-
- if(event.optype == READ) {
- if(event.key == NULL) {
- LOG_I(EMU,"wall_penetration_loss_dB %G\n",oai_emulation->environment_system_config.wall_penetration_loss_dB);
- LOG_I(EMU,"system_bandwidth_MB %G\n",oai_emulation->environment_system_config.system_bandwidth_MB);
- LOG_I(EMU,"system_frequency_GHz %G\n",oai_emulation->environment_system_config.system_frequency_GHz);
-
- //Fading
- LOG_I(EMU,"fading.large_scale.selected_option %s\n",oai_emulation->environment_system_config.fading.large_scale.selected_option);
- LOG_I(EMU,"fading.large_scale.free_space %d\n",oai_emulation->environment_system_config.fading.large_scale.free_space);
- LOG_I(EMU,"fading.large_scale.urban %d\n",oai_emulation->environment_system_config.fading.large_scale.urban);
- LOG_I(EMU,"fading.large_scale.rural %d\n",oai_emulation->environment_system_config.fading.large_scale.rural);
-
- LOG_I(EMU,"fading.small_scale.selected_option %s\n",oai_emulation->environment_system_config.fading.small_scale.selected_option);
- LOG_I(EMU,"fading.small_scale.SCM_A %d\n",oai_emulation->environment_system_config.fading.small_scale.SCM_A);
- LOG_I(EMU,"fading.small_scale.SCM_B %d\n",oai_emulation->environment_system_config.fading.small_scale.SCM_B);
- LOG_I(EMU,"fading.small_scale.SCM_C %d\n",oai_emulation->environment_system_config.fading.small_scale.SCM_C);
- LOG_I(EMU,"fading.small_scale.SCM_D %d\n",oai_emulation->environment_system_config.fading.small_scale.SCM_D);
- LOG_I(EMU,"fading.small_scale.rayleigh_8tap %d\n",oai_emulation->environment_system_config.fading.small_scale.rayleigh_8tap);
- LOG_I(EMU,"fading.small_scale.EPA %d\n",oai_emulation->environment_system_config.fading.small_scale.EPA);
- LOG_I(EMU,"fading.small_scale.EVA %d\n",oai_emulation->environment_system_config.fading.small_scale.EVA);
- LOG_I(EMU,"fading.small_scale.ETU %d\n",oai_emulation->environment_system_config.fading.small_scale.ETU);
-
- LOG_I(EMU,"shadowing.decorrelation_distance_m %G\n",oai_emulation->environment_system_config.fading.shadowing.decorrelation_distance_m);
- LOG_I(EMU,"shadowing.variance_dB %G\n",oai_emulation->environment_system_config.fading.shadowing.variance_dB);
- LOG_I(EMU,"shadowing.inter_site_correlation %G\n",oai_emulation->environment_system_config.fading.shadowing.inter_site_correlation);
-
- LOG_I(EMU,"free_space_model_parameters.pathloss_exponent %G\n",oai_emulation->environment_system_config.fading.free_space_model_parameters.pathloss_exponent);
- LOG_I(EMU,"free_space_model_parameters.pathloss_0_dB %G\n",oai_emulation->environment_system_config.fading.free_space_model_parameters.pathloss_0_dB);
-
- LOG_I(EMU,"ricean_8tap.rice_factor_dB %d\n",oai_emulation->environment_system_config.fading.ricean_8tap.rice_factor_dB);
-
- //Antenna
- LOG_I(EMU,"antenna.eNB_antenna.number_of_sectors %d\n",oai_emulation->environment_system_config.antenna.eNB_antenna.number_of_sectors);
- LOG_I(EMU,"antenna.eNB_antenna.beam_width_dB %G\n",oai_emulation->environment_system_config.antenna.eNB_antenna.beam_width_dB);
- LOG_I(EMU,"antenna.eNB_antenna.antenna_gain_dBi %G\n",oai_emulation->environment_system_config.antenna.eNB_antenna.antenna_gain_dBi);
- LOG_I(EMU,"antenna.eNB_antenna.tx_power_dBm %G\n",oai_emulation->environment_system_config.antenna.eNB_antenna.tx_power_dBm);
- LOG_I(EMU,"antenna.eNB_antenna.rx_noise_level_dB %G\n",oai_emulation->environment_system_config.antenna.eNB_antenna.rx_noise_level_dB);
-
- for (i = 0; i<3; i++) {
- LOG_I(EMU,"antenna.eNB_antenna.alpha_rad %d %G\n",i,oai_emulation->environment_system_config.antenna.eNB_antenna.alpha_rad[i]);
- }
-
- for (i = 0; i<3; i++) {
- LOG_I(EMU,"antenna.eNB_antenna.antenna_orientation_degree %d %G\n",i,oai_emulation->environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[i]);
- }
-
- LOG_I(EMU,"antenna.UE_antenna.antenna_gain_dBi %G\n",oai_emulation->environment_system_config.antenna.UE_antenna.antenna_gain_dBi);
- LOG_I(EMU,"antenna.UE_antenna.tx_power_dBm %G\n",oai_emulation->environment_system_config.antenna.UE_antenna.tx_power_dBm);
- LOG_I(EMU,"antenna.UE_antenna.rx_noise_level_dB %G\n",oai_emulation->environment_system_config.antenna.UE_antenna.rx_noise_level_dB);
- } else if(!strcmp((char *) event.key, "wall_penetration_loss_dB")) {
- LOG_I(EMU,"wall_penetration_loss_dB %G\n",oai_emulation->environment_system_config.wall_penetration_loss_dB);
- } else if(!strcmp((char *) event.key, "system_bandwidth_MB")) {
- LOG_I(EMU,"system_bandwidth_MB %G\n",oai_emulation->environment_system_config.system_bandwidth_MB);
- } else if(!strcmp((char *) event.key, "system_frequency_GHz")) {
- LOG_I(EMU,"system_frequency_GHz %G\n",oai_emulation->environment_system_config.system_frequency_GHz);
- } else if(!strcmp((char *) event.key, "fading.large_scale.selected_option")) {
- LOG_I(EMU,"fading.large_scale.selected_option %s\n",oai_emulation->environment_system_config.fading.large_scale.selected_option);
- } else if(!strcmp((char *) event.key, "fading.large_scale.free_space")) {
- LOG_I(EMU,"fading.large_scale.free_space %d\n",oai_emulation->environment_system_config.fading.large_scale.free_space);
- } else if(!strcmp((char *) event.key, "fading.large_scale.urban")) {
- LOG_I(EMU,"fading.large_scale.urban %d\n",oai_emulation->environment_system_config.fading.large_scale.urban);
- } else if(!strcmp((char *) event.key, "fading.large_scale.rural")) {
- LOG_I(EMU,"fading.large_scale.rural %d\n",oai_emulation->environment_system_config.fading.large_scale.rural);
- } else if(!strcmp((char *) event.key, "fading.small_scale.selected_option")) {
- LOG_I(EMU,"fading.small_scale.selected_option %s\n",oai_emulation->environment_system_config.fading.small_scale.selected_option);
- } else if(!strcmp((char *) event.key, "fading.small_scale.SCM_A")) {
- LOG_I(EMU,"fading.small_scale.SCM_A %d\n",oai_emulation->environment_system_config.fading.small_scale.SCM_A);
- } else if(!strcmp((char *) event.key, "fading.small_scale.SCM_B")) {
- LOG_I(EMU,"fading.small_scale.SCM_B %d\n",oai_emulation->environment_system_config.fading.small_scale.SCM_B);
- } else if(!strcmp((char *) event.key, "fading.small_scale.SCM_C")) {
- LOG_I(EMU,"fading.small_scale.SCM_C %d\n",oai_emulation->environment_system_config.fading.small_scale.SCM_C);
- } else if(!strcmp((char *) event.key, "fading.small_scale.SCM_D")) {
- LOG_I(EMU,"fading.small_scale.SCM_D %d\n",oai_emulation->environment_system_config.fading.small_scale.SCM_D);
- } else if(!strcmp((char *) event.key, "fading.small_scale.rayleigh_8tap")) {
- LOG_I(EMU,"fading.small_scale.rayleigh_8tap %d\n",oai_emulation->environment_system_config.fading.small_scale.rayleigh_8tap);
- } else if(!strcmp((char *) event.key, "fading.small_scale.EPA")) {
- LOG_I(EMU,"fading.small_scale.EPA %d\n",oai_emulation->environment_system_config.fading.small_scale.EPA);
- } else if(!strcmp((char *) event.key, "fading.small_scale.EVA")) {
- LOG_I(EMU,"fading.small_scale.EVA %d\n",oai_emulation->environment_system_config.fading.small_scale.EVA);
- } else if(!strcmp((char *) event.key, "fading.small_scale.ETU")) {
- LOG_I(EMU,"fading.small_scale.ETU %d\n",oai_emulation->environment_system_config.fading.small_scale.ETU);
- } else if(!strcmp((char *) event.key, "shadowing.decorrelation_distance_m")) {
- LOG_I(EMU,"shadowing.decorrelation_distance_m %G\n",oai_emulation->environment_system_config.fading.shadowing.decorrelation_distance_m);
- } else if(!strcmp((char *) event.key, "shadowing.variance_dB")) {
- LOG_I(EMU,"shadowing.variance_dB %G\n",oai_emulation->environment_system_config.fading.shadowing.variance_dB);
- } else if(!strcmp((char *) event.key, "shadowing.inter_site_correlation")) {
- LOG_I(EMU,"shadowing.inter_site_correlation %G\n",oai_emulation->environment_system_config.fading.shadowing.inter_site_correlation);
- } else if(!strcmp((char *) event.key, "free_space_model_parameters.pathloss_exponent")) {
- LOG_I(EMU,"free_space_model_parameters.pathloss_exponent %G\n",oai_emulation->environment_system_config.fading.free_space_model_parameters.pathloss_exponent);
- } else if(!strcmp((char *) event.key, "free_space_model_parameters.pathloss_0_dB")) {
- LOG_I(EMU,"free_space_model_parameters.pathloss_0_dB %G\n",oai_emulation->environment_system_config.fading.free_space_model_parameters.pathloss_0_dB);
- } else if(!strcmp((char *) event.key, "ricean_8tap.rice_factor_dB")) {
- LOG_I(EMU,"ricean_8tap.rice_factor_dB %d\n",oai_emulation->environment_system_config.fading.ricean_8tap.rice_factor_dB);
- } else if(!strcmp((char *) event.key, "antenna.eNB_antenna.number_of_sectors")) {
- LOG_I(EMU,"antenna.eNB_antenna.number_of_sectors %d\n",oai_emulation->environment_system_config.antenna.eNB_antenna.number_of_sectors);
- } else if(!strcmp((char *) event.key, "antenna.eNB_antenna.beam_width_dB")) {
- LOG_I(EMU,"antenna.eNB_antenna.beam_width_dB %G\n",oai_emulation->environment_system_config.antenna.eNB_antenna.beam_width_dB);
- } else if(!strcmp((char *) event.key, "antenna.eNB_antenna.antenna_gain_dBi")) {
- LOG_I(EMU,"antenna.eNB_antenna.antenna_gain_dBi %G\n",oai_emulation->environment_system_config.antenna.eNB_antenna.antenna_gain_dBi);
- } else if(!strcmp((char *) event.key, "antenna.eNB_antenna.tx_power_dBm")) {
- LOG_I(EMU,"antenna.eNB_antenna.tx_power_dBm %G\n",oai_emulation->environment_system_config.antenna.eNB_antenna.tx_power_dBm);
- } else if(!strcmp((char *) event.key, "antenna.eNB_antenna.rx_noise_level_dB")) {
- LOG_I(EMU,"antenna.eNB_antenna.rx_noise_level_dB %G\n",oai_emulation->environment_system_config.antenna.eNB_antenna.rx_noise_level_dB);
- } else if(!strcmp((char *) event.key, "antenna.eNB_antenna.alpha_rad")) {
- for (i = 0; i<3; i++) {
- LOG_I(EMU,"antenna.eNB_antenna.alpha_rad %d %G\n",i,oai_emulation->environment_system_config.antenna.eNB_antenna.alpha_rad[i]);
- }
- } else if(!strcmp((char *) event.key, "antenna.eNB_antenna.antenna_orientation_degree")) {
- for (i = 0; i<3; i++) {
- LOG_I(EMU,"antenna.eNB_antenna.antenna_orientation_degree %d %G\n",i,oai_emulation->environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[i]);
- }
- } else if(!strcmp((char *) event.key, "antenna.UE_antenna.antenna_gain_dBi")) {
- LOG_I(EMU,"antenna.UE_antenna.antenna_gain_dBi %G\n",oai_emulation->environment_system_config.antenna.UE_antenna.antenna_gain_dBi);
- } else if(!strcmp((char *) event.key, "antenna.UE_antenna.tx_power_dBm")) {
- LOG_I(EMU,"antenna.UE_antenna.tx_power_dBm %G\n",oai_emulation->environment_system_config.antenna.UE_antenna.tx_power_dBm);
- } else if(!strcmp((char *) event.key, "antenna.UE_antenna.rx_noise_level_dB")) {
- LOG_I(EMU,"antenna.UE_antenna.rx_noise_level_dB %G\n",oai_emulation->environment_system_config.antenna.UE_antenna.rx_noise_level_dB);
- }
- } else if(event.optype == WRITE) {
- if(event.key == NULL && event.value!=NULL) {
- Environment_System_Config* new_env_config = (Environment_System_Config *) event.value;
- oai_emulation->environment_system_config.wall_penetration_loss_dB = new_env_config->wall_penetration_loss_dB;
- oai_emulation->environment_system_config.system_bandwidth_MB = new_env_config->system_bandwidth_MB;
- oai_emulation->environment_system_config.system_frequency_GHz = new_env_config->system_frequency_GHz;
-
- //Fading
- sprintf(oai_emulation->environment_system_config.fading.large_scale.selected_option,"%s",new_env_config->fading.large_scale.selected_option);
- oai_emulation->environment_system_config.fading.large_scale.free_space = new_env_config->fading.large_scale.free_space;
- oai_emulation->environment_system_config.fading.large_scale.urban = new_env_config->fading.large_scale.urban;
- oai_emulation->environment_system_config.fading.large_scale.rural = new_env_config->fading.large_scale.rural;
-
- sprintf(oai_emulation->environment_system_config.fading.small_scale.selected_option,"%s",new_env_config->fading.small_scale.selected_option);
- oai_emulation->environment_system_config.fading.small_scale.SCM_A = new_env_config->fading.small_scale.SCM_A;
- oai_emulation->environment_system_config.fading.small_scale.SCM_B = new_env_config->fading.small_scale.SCM_B;
- oai_emulation->environment_system_config.fading.small_scale.SCM_C = new_env_config->fading.small_scale.SCM_C;
- oai_emulation->environment_system_config.fading.small_scale.SCM_D = new_env_config->fading.small_scale.SCM_D;
- oai_emulation->environment_system_config.fading.small_scale.rayleigh_8tap = new_env_config->fading.small_scale.rayleigh_8tap;
- oai_emulation->environment_system_config.fading.small_scale.EPA = new_env_config->fading.small_scale.EPA;
- oai_emulation->environment_system_config.fading.small_scale.EVA = new_env_config->fading.small_scale.EVA;
- oai_emulation->environment_system_config.fading.small_scale.ETU = new_env_config->fading.small_scale.ETU;
-
- oai_emulation->environment_system_config.fading.shadowing.decorrelation_distance_m = new_env_config->fading.shadowing.decorrelation_distance_m;
- oai_emulation->environment_system_config.fading.shadowing.variance_dB = new_env_config->fading.shadowing.variance_dB;
- oai_emulation->environment_system_config.fading.shadowing.inter_site_correlation = new_env_config->fading.shadowing.inter_site_correlation;
-
- oai_emulation->environment_system_config.fading.free_space_model_parameters.pathloss_exponent = new_env_config->fading.free_space_model_parameters.pathloss_exponent;
- oai_emulation->environment_system_config.fading.free_space_model_parameters.pathloss_0_dB = new_env_config->fading.free_space_model_parameters.pathloss_0_dB;
-
- oai_emulation->environment_system_config.fading.ricean_8tap.rice_factor_dB = new_env_config->fading.ricean_8tap.rice_factor_dB;
-
- //Antenna
- oai_emulation->environment_system_config.antenna.eNB_antenna.number_of_sectors = new_env_config->antenna.eNB_antenna.number_of_sectors;
- oai_emulation->environment_system_config.antenna.eNB_antenna.beam_width_dB = new_env_config->antenna.eNB_antenna.beam_width_dB;
- oai_emulation->environment_system_config.antenna.eNB_antenna.antenna_gain_dBi = new_env_config->antenna.eNB_antenna.antenna_gain_dBi;
- oai_emulation->environment_system_config.antenna.eNB_antenna.tx_power_dBm = new_env_config->antenna.eNB_antenna.tx_power_dBm;
- oai_emulation->environment_system_config.antenna.eNB_antenna.rx_noise_level_dB = new_env_config->antenna.eNB_antenna.rx_noise_level_dB;
-
- for (i = 0; i<3; i++) {
- oai_emulation->environment_system_config.antenna.eNB_antenna.alpha_rad[i] = new_env_config->antenna.eNB_antenna.alpha_rad[i];
- }
-
- for (i = 0; i<3; i++) {
- oai_emulation->environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[i] = new_env_config->antenna.eNB_antenna.antenna_orientation_degree[i];
- }
-
- oai_emulation->environment_system_config.antenna.UE_antenna.antenna_gain_dBi = new_env_config->antenna.UE_antenna.antenna_gain_dBi;
- oai_emulation->environment_system_config.antenna.UE_antenna.tx_power_dBm = new_env_config->antenna.UE_antenna.tx_power_dBm;
- oai_emulation->environment_system_config.antenna.UE_antenna.rx_noise_level_dB = new_env_config->antenna.UE_antenna.rx_noise_level_dB;
- }
- }
-}
-
-void update_topo_model(Event_t event)
-{
-
- printf("\n\n\nA NEW MOB MODEL\n\n\n");
- OAI_Emulation *oai_emulation;
- oai_emulation = get_OAI_emulation();
-
- if(event.optype == READ) {
- if(event.key == NULL) {
- //read all values
- LOG_I(EMU,"UE Mobility type %s\n",oai_emulation->topology_config.mobility.UE_mobility.UE_mobility_type.selected_option);
- LOG_I(EMU,"eNB Mobility type %s\n",oai_emulation->topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option);
- LOG_I(EMU,"grid_trip_type %s\n",oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_trip_type.selected_option);
- LOG_I(EMU,"UE_moving_dynamics_min_speed_mps %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_speed_mps);
- LOG_I(EMU,"UE_moving_dynamics_min_sleep_ms %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_sleep_ms);
- LOG_I(EMU,"UE_moving_dynamics_max_sleep_ms %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_sleep_ms);
- LOG_I(EMU,"UE_moving_dynamics_max_speed_mps %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_speed_mps);
- LOG_I(EMU,"UE_moving_dynamics_min_journey_time_ms %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_journey_time_ms);
- LOG_I(EMU,"UE_moving_dynamics_max_journey_time_ms %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms);
- LOG_I(EMU,"grid_map_horizontal_grid %d\n",oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_map.horizontal_grid);
- LOG_I(EMU,"grid_map_vertical_grid %d\n",oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_map.vertical_grid);
- LOG_I(EMU,"UE_initial_distribution_selected_option %s\n",oai_emulation->topology_config.mobility.UE_mobility.UE_initial_distribution.selected_option);
- LOG_I(EMU,"random_UE_distribution_number_of_nodes %d\n",oai_emulation->topology_config.mobility.UE_mobility.random_UE_distribution.number_of_nodes);
- LOG_I(EMU,"concentrated_UE_distribution_number_of_nodes %d\n",oai_emulation->topology_config.mobility.UE_mobility.concentrated_UE_distribution.number_of_nodes);
- LOG_I(EMU,"random_grid_number_of_nodes %d\n",oai_emulation->topology_config.mobility.UE_mobility.grid_UE_distribution.random_grid.number_of_nodes);
- LOG_I(EMU,"border_grid_number_of_nodes %d\n",oai_emulation->topology_config.mobility.UE_mobility.grid_UE_distribution.border_grid.number_of_nodes);
- LOG_I(EMU,"eNB_initial_distribution_selected_option %s\n",oai_emulation->topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option);
- LOG_I(EMU,"random_eNB_distribution_number_of_cells %d\n",oai_emulation->topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells);
- LOG_I(EMU,"hexagonal_eNB_distribution_number_of_cells %d\n",oai_emulation->topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells);
-
- LOG_I(EMU,"hexagonal_eNB_distribution_inter_eNB_distance_km %G\n",oai_emulation->topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km);
- LOG_I(EMU,"grid_eNB_distribution_number_of_grid_x %d\n",oai_emulation->topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_x);
- LOG_I(EMU,"grid_eNB_distribution_number_of_grid_y %d\n",oai_emulation->topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_y);
-
- LOG_I(EMU,"trace_config_trace_mobility_file %s\n",oai_emulation->topology_config.mobility.eNB_mobility.trace_config.trace_mobility_file);
- LOG_I(EMU,"trace_config_trace_mobility_file %s\n",oai_emulation->topology_config.mobility.UE_mobility.trace_config.trace_mobility_file);
- LOG_I(EMU,"sumo_config_command %s\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.command);
- LOG_I(EMU,"sumo_config_file %s\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.file);
-
- LOG_I(EMU,"sumo_config_start %d\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.start);
- LOG_I(EMU,"sumo_config_end %d\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.end);
- LOG_I(EMU,"sumo_config_step %d\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.step); // 1000ms
- LOG_I(EMU,"sumo_config_hport %d\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.hport);
- } else if(!strcmp((char *) event.key, "UE_mobility_type")) {
- LOG_I(EMU,"UE Mobility type %s\n",oai_emulation->topology_config.mobility.UE_mobility.UE_mobility_type.selected_option);
- } else if(!strcmp((char *) event.key, "eNB_mobility_type")) {
- LOG_I(EMU,"eNB Mobility type %s\n",oai_emulation->topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option);
- } else if(!strcmp((char *) event.key, "grid_trip_type")) {
- LOG_I(EMU,"grid_trip_type %s\n",oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_trip_type.selected_option);
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_min_speed_mps")) {
- LOG_I(EMU,"UE_moving_dynamics_min_speed_mps %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_speed_mps);
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_min_sleep_ms")) {
- LOG_I(EMU,"UE_moving_dynamics_min_sleep_ms %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_sleep_ms);
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_max_sleep_ms")) {
- LOG_I(EMU,"UE_moving_dynamics_max_sleep_ms %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_sleep_ms);
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_max_speed_mps")) {
- LOG_I(EMU,"UE_moving_dynamics_max_speed_mps %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_speed_mps);
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_min_journey_time_ms")) {
- LOG_I(EMU,"UE_moving_dynamics_min_journey_time_ms %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_journey_time_ms);
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_max_journey_time_ms")) {
- LOG_I(EMU,"UE_moving_dynamics_max_journey_time_ms %G\n",oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms);
- } else if(!strcmp((char *) event.key, "grid_map_horizontal_grid")) {
- LOG_I(EMU,"grid_map_horizontal_grid %d\n",oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_map.horizontal_grid);
- } else if(!strcmp((char *) event.key, "grid_map_vertical_grid")) {
- LOG_I(EMU,"grid_map_vertical_grid %d\n",oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_map.vertical_grid);
- } else if(!strcmp((char *) event.key, "UE_initial_distribution_selected_option")) {
- LOG_I(EMU,"UE_initial_distribution_selected_option %s\n",oai_emulation->topology_config.mobility.UE_mobility.UE_initial_distribution.selected_option);
- } else if(!strcmp((char *) event.key, "random_UE_distribution_number_of_nodes")) {
- LOG_I(EMU,"random_UE_distribution_number_of_nodes %d\n",oai_emulation->topology_config.mobility.UE_mobility.random_UE_distribution.number_of_nodes);
- } else if(!strcmp((char *) event.key, "concentrated_UE_distribution_number_of_nodes")) {
- LOG_I(EMU,"concentrated_UE_distribution_number_of_nodes %d\n",oai_emulation->topology_config.mobility.UE_mobility.concentrated_UE_distribution.number_of_nodes);
- } else if(!strcmp((char *) event.key, "random_grid_number_of_nodes")) {
- LOG_I(EMU,"random_grid_number_of_nodes %d\n",oai_emulation->topology_config.mobility.UE_mobility.grid_UE_distribution.random_grid.number_of_nodes);
- } else if(!strcmp((char *) event.key, "order_grid_number_of_nodes")) {
- LOG_I(EMU,"border_grid_number_of_nodes %d\n",oai_emulation->topology_config.mobility.UE_mobility.grid_UE_distribution.border_grid.number_of_nodes);
- } else if(!strcmp((char *) event.key, "eNB_initial_distribution_selected_option")) {
- LOG_I(EMU,"eNB_initial_distribution_selected_option %s\n",oai_emulation->topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option);
- } else if(!strcmp((char *) event.key, "random_eNB_distribution_number_of_cells")) {
- LOG_I(EMU,"random_eNB_distribution_number_of_cells %d\n",oai_emulation->topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells);
- } else if(!strcmp((char *) event.key, "hexagonal_eNB_distribution_number_of_cells")) {
- LOG_I(EMU,"hexagonal_eNB_distribution_number_of_cells %d\n",oai_emulation->topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells);
- } else if(!strcmp((char *) event.key, "hexagonal_eNB_distribution_inter_eNB_distance_km")) {
- LOG_I(EMU,"hexagonal_eNB_distribution_inter_eNB_distance_km %G\n",oai_emulation->topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km);
- } else if(!strcmp((char *) event.key, "grid_eNB_distribution_number_of_grid_x")) {
- LOG_I(EMU,"grid_eNB_distribution_number_of_grid_x %d\n",oai_emulation->topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_x);
- } else if(!strcmp((char *) event.key, "grid_eNB_distribution_number_of_grid_y")) {
- LOG_I(EMU,"grid_eNB_distribution_number_of_grid_y %d\n",oai_emulation->topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_y);
- } else if(!strcmp((char *) event.key, "eNB_mobility_trace_config_trace_mobility_file")) {
- LOG_I(EMU,"eNB_trace_config_trace_mobility_file %s\n",oai_emulation->topology_config.mobility.eNB_mobility.trace_config.trace_mobility_file);
- } else if(!strcmp((char *) event.key, "UE_mobility_trace_config_trace_mobility_file")) {
- LOG_I(EMU,"UE_trace_config_trace_mobility_file %s\n",oai_emulation->topology_config.mobility.UE_mobility.trace_config.trace_mobility_file);
- } else if(!strcmp((char *) event.key, "sumo_config_command")) {
- LOG_I(EMU,"sumo_config_command %s\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.command);
- } else if(!strcmp((char *) event.key, "sumo_config_file")) {
- LOG_I(EMU,"sumo_config_file %s\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.file);
- } else if(!strcmp((char *) event.key, "sumo_config_start")) {
- LOG_I(EMU,"sumo_config_start %d\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.start);
- } else if(!strcmp((char *) event.key, "sumo_config_end")) {
- LOG_I(EMU,"sumo_config_end %d\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.end);
- } else if(!strcmp((char *) event.key, "sumo_config_step")) {
- LOG_I(EMU,"sumo_config_step %d\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.step); // 1000ms
- } else if(!strcmp((char *) event.key, "sumo_config_hport")) {
- LOG_I(EMU,"sumo_config_hport %d\n",oai_emulation->topology_config.mobility.UE_mobility.sumo_config.hport);
- }
- } else if(event.optype == WRITE && event.value !=NULL) {
- Mobility * new_mobility_model = (Mobility *) event.value;
-
- if(event.key == NULL) {
- //global model update
-
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.UE_mobility_type.selected_option, "%s", new_mobility_model->UE_mobility.UE_mobility_type.selected_option);
- oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_map.horizontal_grid = new_mobility_model->UE_mobility.grid_walk.grid_map.horizontal_grid;
- oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_map.vertical_grid = new_mobility_model->UE_mobility.grid_walk.grid_map.vertical_grid;
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_trip_type.selected_option, "%s", new_mobility_model->UE_mobility.grid_walk.grid_trip_type.selected_option);
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.UE_initial_distribution.selected_option, "%s", new_mobility_model->UE_mobility.UE_initial_distribution.selected_option);
- oai_emulation->topology_config.mobility.UE_mobility.random_UE_distribution.number_of_nodes = new_mobility_model->UE_mobility.random_UE_distribution.number_of_nodes;
- oai_emulation->topology_config.mobility.UE_mobility.concentrated_UE_distribution.number_of_nodes = new_mobility_model->UE_mobility.concentrated_UE_distribution.number_of_nodes;
- oai_emulation->topology_config.mobility.UE_mobility.grid_UE_distribution.random_grid.number_of_nodes = new_mobility_model->UE_mobility.grid_UE_distribution.random_grid.number_of_nodes;
- oai_emulation->topology_config.mobility.UE_mobility.grid_UE_distribution.border_grid.number_of_nodes = new_mobility_model->UE_mobility.grid_UE_distribution.border_grid.number_of_nodes;
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_speed_mps = new_mobility_model->UE_mobility.UE_moving_dynamics.min_speed_mps;
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_speed_mps = new_mobility_model->UE_mobility.UE_moving_dynamics.max_speed_mps;
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_sleep_ms = new_mobility_model->UE_mobility.UE_moving_dynamics.min_sleep_ms;
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_sleep_ms = new_mobility_model->UE_mobility.UE_moving_dynamics.max_sleep_ms;
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_journey_time_ms = new_mobility_model->UE_mobility.UE_moving_dynamics.min_journey_time_ms;
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms = new_mobility_model->UE_mobility.UE_moving_dynamics.max_journey_time_ms;
- sprintf(oai_emulation->topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option, "%s", new_mobility_model->eNB_mobility.eNB_mobility_type.selected_option);
- sprintf(oai_emulation->topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option, "%s", new_mobility_model->eNB_mobility.eNB_initial_distribution.selected_option);
- oai_emulation->topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells = new_mobility_model->eNB_mobility.random_eNB_distribution.number_of_cells;
- oai_emulation->topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells = new_mobility_model->eNB_mobility.hexagonal_eNB_distribution.number_of_cells;
- oai_emulation->topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km = new_mobility_model->eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km;
- oai_emulation->topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_x = new_mobility_model->eNB_mobility.grid_eNB_distribution.number_of_grid_x;
- oai_emulation->topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_y = new_mobility_model->eNB_mobility.grid_eNB_distribution.number_of_grid_y;
-
- sprintf(oai_emulation->topology_config.mobility.eNB_mobility.trace_config.trace_mobility_file,"static_1enb.tr");
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.trace_config.trace_mobility_file,"static_2ues.tr");
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.sumo_config.command,"sumo");
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.sumo_config.file,"%s/UTIL/OMG/SUMO/SCENARIOS/scen.sumo.cfg",getenv("OPENAIR2_DIR"));
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.sumo_config.hip,"127.0.1.1");
-
- oai_emulation->topology_config.mobility.UE_mobility.sumo_config.start = new_mobility_model->UE_mobility.sumo_config.start;
- oai_emulation->topology_config.mobility.UE_mobility.sumo_config.end = new_mobility_model->UE_mobility.sumo_config.end;
- oai_emulation->topology_config.mobility.UE_mobility.sumo_config.step = new_mobility_model->UE_mobility.sumo_config.step; // 1000ms
- oai_emulation->topology_config.mobility.UE_mobility.sumo_config.hport = new_mobility_model->UE_mobility.sumo_config.hport;
- } else {
- // event.key is not NULL
- if(!strcmp((char *) event.key, "UE_mobility_type")) {
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.UE_mobility_type.selected_option, "%s", new_mobility_model->UE_mobility.UE_mobility_type.selected_option);
-
- } else if(!strcmp((char *) event.key, "eNB_mobility_type")) {
- sprintf(oai_emulation->topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option, "%s", new_mobility_model->eNB_mobility.eNB_mobility_type.selected_option);
- } else if(!strcmp((char *) event.key, "grid_trip_type")) {
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_trip_type.selected_option, "%s", new_mobility_model->UE_mobility.grid_walk.grid_trip_type.selected_option);
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_min_speed_mps")) {
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_speed_mps = new_mobility_model->UE_mobility.UE_moving_dynamics.min_speed_mps;
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_min_sleep_ms")) {
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_sleep_ms = new_mobility_model->UE_mobility.UE_moving_dynamics.min_sleep_ms;
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_max_sleep_ms")) {
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_sleep_ms = new_mobility_model->UE_mobility.UE_moving_dynamics.max_sleep_ms;
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_max_speed_mps")) {
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_speed_mps = new_mobility_model->UE_mobility.UE_moving_dynamics.max_speed_mps;
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_min_journey_time_ms")) {
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.min_journey_time_ms = new_mobility_model->UE_mobility.UE_moving_dynamics.min_journey_time_ms;
- } else if(!strcmp((char *) event.key, "UE_moving_dynamics_max_journey_time_ms")) {
- oai_emulation->topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms = new_mobility_model->UE_mobility.UE_moving_dynamics.max_journey_time_ms;
- } else if(!strcmp((char *) event.key, "grid_map_horizontal_grid")) {
- oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_map.horizontal_grid = new_mobility_model->UE_mobility.grid_walk.grid_map.horizontal_grid;
- } else if(!strcmp((char *) event.key, "grid_map_vertical_grid")) {
- oai_emulation->topology_config.mobility.UE_mobility.grid_walk.grid_map.vertical_grid = new_mobility_model->UE_mobility.grid_walk.grid_map.vertical_grid;
- } else if(!strcmp((char *) event.key, "UE_initial_distribution_selected_option")) {
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.UE_initial_distribution.selected_option, "%s", new_mobility_model->UE_mobility.UE_initial_distribution.selected_option);
- } else if(!strcmp((char *) event.key, "random_UE_distribution_number_of_nodes")) {
- oai_emulation->topology_config.mobility.UE_mobility.random_UE_distribution.number_of_nodes = new_mobility_model->UE_mobility.random_UE_distribution.number_of_nodes;
- } else if(!strcmp((char *) event.key, "concentrated_UE_distribution_number_of_nodes")) {
- oai_emulation->topology_config.mobility.UE_mobility.concentrated_UE_distribution.number_of_nodes = new_mobility_model->UE_mobility.concentrated_UE_distribution.number_of_nodes;
- } else if(!strcmp((char *) event.key, "random_grid_number_of_nodes")) {
- oai_emulation->topology_config.mobility.UE_mobility.grid_UE_distribution.random_grid.number_of_nodes = new_mobility_model->UE_mobility.grid_UE_distribution.random_grid.number_of_nodes;
- } else if(!strcmp((char *) event.key, "border_grid_number_of_nodes")) {
- oai_emulation->topology_config.mobility.UE_mobility.grid_UE_distribution.border_grid.number_of_nodes = new_mobility_model->UE_mobility.grid_UE_distribution.border_grid.number_of_nodes;
- } else if(!strcmp((char *) event.key, "eNB_initial_distribution_selected_option")) {
- sprintf(oai_emulation->topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option, "%s", new_mobility_model->eNB_mobility.eNB_initial_distribution.selected_option);
- } else if(!strcmp((char *) event.key, "random_eNB_distribution_number_of_cells")) {
- oai_emulation->topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells = new_mobility_model->eNB_mobility.random_eNB_distribution.number_of_cells;
- } else if(!strcmp((char *) event.key, "hexagonal_eNB_distribution_number_of_cells")) {
- oai_emulation->topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells = new_mobility_model->eNB_mobility.hexagonal_eNB_distribution.number_of_cells;
- } else if(!strcmp((char *) event.key, "hexagonal_eNB_distribution_inter_eNB_distance_km")) {
- oai_emulation->topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km = new_mobility_model->eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km;
- } else if(!strcmp((char *) event.key, "grid_eNB_distribution_number_of_grid_x")) {
- oai_emulation->topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_x = new_mobility_model->eNB_mobility.grid_eNB_distribution.number_of_grid_x;
- } else if(!strcmp((char *) event.key, "grid_eNB_distribution_number_of_grid_y")) {
- oai_emulation->topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_y = new_mobility_model->eNB_mobility.grid_eNB_distribution.number_of_grid_y;
- } else if(!strcmp((char *) event.key, "eNB_mobility_trace_config_trace_mobility_file")) {
- sprintf(oai_emulation->topology_config.mobility.eNB_mobility.trace_config.trace_mobility_file,"static_1enb.tr");
- } else if(!strcmp((char *) event.key, "UE_mobility_trace_config_trace_mobility_file")) {
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.trace_config.trace_mobility_file,"static_2ues.tr");
- } else if(!strcmp((char *) event.key, "sumo_config_command")) {
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.sumo_config.command,"sumo");
- } else if(!strcmp((char *) event.key, "sumo_config_file")) {
- snprintf( oai_emulation->topology_config.mobility.UE_mobility.sumo_config.file, 256, "%s/UTIL/OMG/SUMO/SCENARIOS/scen.sumo.cfg", getenv("OPENAIR2_DIR") );
- } else if(!strcmp((char *) event.key, "sumo_config_start")) {
- oai_emulation->topology_config.mobility.UE_mobility.sumo_config.start = new_mobility_model->UE_mobility.sumo_config.start;
- } else if(!strcmp((char *) event.key, "sumo_config_end")) {
- oai_emulation->topology_config.mobility.UE_mobility.sumo_config.end = new_mobility_model->UE_mobility.sumo_config.end;
- } else if(!strcmp((char *) event.key, "sumo_config_step")) {
- oai_emulation->topology_config.mobility.UE_mobility.sumo_config.step = new_mobility_model->UE_mobility.sumo_config.step;
- } else if(!strcmp((char *) event.key, "sumo_config_hport")) {
- oai_emulation->topology_config.mobility.UE_mobility.sumo_config.hport = new_mobility_model->UE_mobility.sumo_config.hport;
- } else if(!strcmp((char *) event.key, "sumo_config.hip")) {
- sprintf(oai_emulation->topology_config.mobility.UE_mobility.sumo_config.hip,"127.0.1.1");
- }
- }
-
- }
-
-}
-
-void update_app_model(Event_t event)
-{
-
-
- printf("\n\n\nA NEW APP MODEL\n\n\n");
- OAI_Emulation *oai_emulation;
- oai_emulation = get_OAI_emulation();
- int i=0;
-
- if(event.optype == READ) {
- if(event.key == NULL) {
- //print all values
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"predefined_traffic.source_id %d: %s\n",i,oai_emulation->application_config.predefined_traffic.source_id[i]);
- LOG_I(EMU,"predefined_traffic.background %d %s\n",i,oai_emulation->application_config.predefined_traffic.background[i]);
- LOG_I(EMU,"predefined_traffic.aggregation_level %d %d\n",i,oai_emulation->application_config.predefined_traffic.aggregation_level[i]);
-
- if(oai_emulation->application_config.predefined_traffic.destination_id[i]!=NULL)
- LOG_I(EMU,"predefined_traffic.destination_id %d %s\n",i,oai_emulation->application_config.predefined_traffic.destination_id[i]);
-
- if(oai_emulation->application_config.customized_traffic.source_id[i]!=NULL)
- LOG_I(EMU,"customized_traffic.source_id %d %s\n",i,oai_emulation->application_config.customized_traffic.source_id[i]);
-
- if(oai_emulation->application_config.customized_traffic.destination_id[i]!=NULL)
- LOG_I(EMU,"customized_traffic.destination_id %d %s\n",i,oai_emulation->application_config.customized_traffic.destination_id[i]);
-
- if(oai_emulation->application_config.customized_traffic.transport_protocol[i]!=NULL)
- LOG_I(EMU,"customized_traffic.transport_protocol %d %s\n",i,oai_emulation->application_config.customized_traffic.transport_protocol[i]);
-
- if(oai_emulation->application_config.customized_traffic.background[i]!=NULL)
- LOG_I(EMU,"customized_traffic.background %d %s\n",i,oai_emulation->application_config.customized_traffic.background[i]);
-
- if(oai_emulation->application_config.customized_traffic.ip_version[i]!=NULL)
- LOG_I(EMU,"customized_traffic.ip_version %d %s\n",i,oai_emulation->application_config.customized_traffic.ip_version[i]);
-
- LOG_I(EMU,"customized_traffic.aggregation_level %d %d\n",i,oai_emulation->application_config.customized_traffic.aggregation_level[i]);
-
- if(oai_emulation->application_config.customized_traffic.idt_dist[i]!=NULL)
- LOG_I(EMU,"customized_traffic.idt_dist %d %s\n",i,oai_emulation->application_config.customized_traffic.idt_dist[i]);
-
- LOG_I(EMU,"customized_traffic.idt_min_ms %d %d\n",i,oai_emulation->application_config.customized_traffic.idt_min_ms[i]);
- LOG_I(EMU,"customized_traffic.idt_max_ms %d %d\n",i,oai_emulation->application_config.customized_traffic.idt_max_ms[i]);
- LOG_I(EMU,"customized_traffic.idt_standard_deviation %d %G\n",i,oai_emulation->application_config.customized_traffic.idt_standard_deviation[i]);
- LOG_I(EMU,"customized_traffic.idt_lambda %d %G\n",i,oai_emulation->application_config.customized_traffic.idt_lambda[i]);
- LOG_I(EMU,"customized_traffic.size_dist %d %s\n",i,oai_emulation->application_config.customized_traffic.size_dist[i]);
- LOG_I(EMU,"customized_traffic.size_min_byte %d %d\n",i,oai_emulation->application_config.customized_traffic.size_min_byte[i]);//
- LOG_I(EMU,"customized_traffic.size_max_byte %d %d\n",i,oai_emulation->application_config.customized_traffic.size_max_byte[i]);//
- LOG_I(EMU,"customized_traffic.size_standard_deviation %d %G\n",i,oai_emulation->application_config.customized_traffic.size_standard_deviation[i]);//
- LOG_I(EMU,"customized_traffic.size_lambda %d %G\n",i,oai_emulation->application_config.customized_traffic.size_lambda[i]);
- LOG_I(EMU,"ustomized_traffic.stream %d %d\n",i,oai_emulation->application_config.customized_traffic.stream[i]);
- LOG_I(EMU,"customized_traffic.destination_port %d %d\n",i,oai_emulation->application_config.customized_traffic.destination_port[i]);
- LOG_I(EMU,"customized_traffic.prob_off_pu %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_off_pu[i]);
- LOG_I(EMU,"customized_traffic.prob_off_ed %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_off_ed[i]);
- LOG_I(EMU,"customized_traffic.prob_off_pe %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_off_pe[i]);
- LOG_I(EMU,"customized_traffic.prob_pu_ed %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_pu_ed[i]);//
- LOG_I(EMU,"customized_traffic.prob_pu_pe %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_pu_pe[i]);
- LOG_I(EMU,"customized_traffic.prob_ed_pe %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_ed_pe[i]);
- LOG_I(EMU,"customized_traffic.prob_ed_pu %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_ed_pu[i]);
- LOG_I(EMU,"customized_traffic.holding_time_off_ed %d %d\n",i,oai_emulation->application_config.customized_traffic.holding_time_off_ed[i]);
- LOG_I(EMU,"customized_traffic.holding_time_off_pu %d %d\n",i,oai_emulation->application_config.customized_traffic.holding_time_off_pu[i]);
- LOG_I(EMU,"customized_traffic.holding_time_off_pe %d %d\n",i,oai_emulation->application_config.customized_traffic.holding_time_off_pe[i]);
- LOG_I(EMU,"customized_traffic.holding_time_pe_off %d %d\n",i,oai_emulation->application_config.customized_traffic.holding_time_pe_off[i]);
- LOG_I(EMU,"customized_traffic.pu_size_pkts %d %d\n",i,oai_emulation->application_config.customized_traffic.pu_size_pkts[i]);
- LOG_I(EMU,"customized_traffic.ed_size_pkts %d %d\n",i,oai_emulation->application_config.customized_traffic.ed_size_pkts[i]);
-
- }
- } else if(!strcmp((char *) event.key, "predefined_traffic.source_id")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"predefined_traffic.source_id %d: %s\n",i,oai_emulation->application_config.predefined_traffic.source_id[i]);
- }
- } else if(!strcmp((char *) event.key, "predefined_traffic.background")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"predefined_traffic.background %d %s\n",i,oai_emulation->application_config.predefined_traffic.background[i]);
- }
- } else if(!strcmp((char *) event.key, "predefined_traffic.aggregation_level")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"predefined_traffic.aggregation_level %d %d\n",i,oai_emulation->application_config.predefined_traffic.aggregation_level[i]);
- }
- } else if(!strcmp((char *) event.key, "predefined_traffic.destination_id")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.predefined_traffic.destination_id[i]!=NULL)
- LOG_I(EMU,"predefined_traffic.destination_id %d %s\n",i,oai_emulation->application_config.predefined_traffic.destination_id[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.source_id")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.source_id[i]!=NULL)
- LOG_I(EMU,"customized_traffic.source_id %d %s\n",i,oai_emulation->application_config.customized_traffic.source_id[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.destination_id")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.destination_id[i]!=NULL)
- LOG_I(EMU,"customized_traffic.destination_id %d %s\n",i,oai_emulation->application_config.customized_traffic.destination_id[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.transport_protocol")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.transport_protocol[i]!=NULL)
- LOG_I(EMU,"customized_traffic.transport_protocol %d %s\n",i,oai_emulation->application_config.customized_traffic.transport_protocol[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.background")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.background[i]!=NULL)
- LOG_I(EMU,"customized_traffic.background %d %s\n",i,oai_emulation->application_config.customized_traffic.background[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.ip_version")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.ip_version[i]!=NULL)
- LOG_I(EMU,"customized_traffic.ip_version %d %s\n",i,oai_emulation->application_config.customized_traffic.ip_version[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.aggregation_level")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.aggregation_level %d %d\n",i,oai_emulation->application_config.customized_traffic.aggregation_level[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.idt_dist")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.idt_dist[i]!=NULL)
- LOG_I(EMU,"customized_traffic.idt_dist %d %s\n",i,oai_emulation->application_config.customized_traffic.idt_dist[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.idt_min_ms")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.idt_min_ms %d %d\n",i,oai_emulation->application_config.customized_traffic.idt_min_ms[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.idt_max_ms")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.idt_max_ms %d %d\n",i,oai_emulation->application_config.customized_traffic.idt_max_ms[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.idt_standard_deviation")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.idt_standard_deviation %d %G\n",i,oai_emulation->application_config.customized_traffic.idt_standard_deviation[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.idt_lambda")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.idt_lambda %d %G\n",i,oai_emulation->application_config.customized_traffic.idt_lambda[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_dist")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.size_dist %d %s\n",i,oai_emulation->application_config.customized_traffic.size_dist[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_min_byte")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.size_min_byte %d %d\n",i,oai_emulation->application_config.customized_traffic.size_min_byte[i]);//
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_min_byte")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.size_min_byte %d %d\n",i,oai_emulation->application_config.customized_traffic.size_min_byte[i]);//
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_max_byte")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.size_max_byte %d %d\n",i,oai_emulation->application_config.customized_traffic.size_max_byte[i]);//
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_standard_deviation")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.size_standard_deviation %d %G\n",i,oai_emulation->application_config.customized_traffic.size_standard_deviation[i]);//
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_lambda")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.size_lambda %d %G\n",i,oai_emulation->application_config.customized_traffic.size_lambda[i]);
- }
- } else if(!strcmp((char *) event.key, "ustomized_traffic.stream")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"ustomized_traffic.stream %d %d\n",i,oai_emulation->application_config.customized_traffic.stream[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.destination_port")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.destination_port %d %d\n",i,oai_emulation->application_config.customized_traffic.destination_port[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_off_pu")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.prob_off_pu %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_off_pu[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_off_ed")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.prob_off_ed %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_off_ed[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_off_pe")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.prob_off_pe %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_off_pe[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_pu_ed")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.prob_pu_ed %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_pu_ed[i]);//
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_pu_pe")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.prob_pu_pe %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_pu_pe[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_ed_pe")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.prob_ed_pe %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_ed_pe[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_ed_pu")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.prob_ed_pu %d %G\n",i,oai_emulation->application_config.customized_traffic.prob_ed_pu[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.holding_time_off_ed")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.holding_time_off_ed %d %d\n",i,oai_emulation->application_config.customized_traffic.holding_time_off_ed[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.holding_time_off_pu")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.holding_time_off_pu %d %d\n",i,oai_emulation->application_config.customized_traffic.holding_time_off_pu[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.holding_time_off_pe")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.holding_time_off_pe %d %d\n",i,oai_emulation->application_config.customized_traffic.holding_time_off_pe[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.holding_time_pe_off")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.holding_time_pe_off %d %d\n",i,oai_emulation->application_config.customized_traffic.holding_time_pe_off[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.pu_size_pkts")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.pu_size_pkts %d %d\n",i,oai_emulation->application_config.customized_traffic.pu_size_pkts[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.ed_size_pkts")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- LOG_I(EMU,"customized_traffic.ed_size_pkts %d %d\n",i,oai_emulation->application_config.customized_traffic.ed_size_pkts[i]);
- }
- }
- } else if(event.optype == WRITE && event.value!=NULL) {
- Application_Config * new_app_config = (Application_Config *) event.value;
-
- if(event.key == NULL) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- sprintf(oai_emulation->application_config.predefined_traffic.source_id[i],"%s",new_app_config->predefined_traffic.source_id[i]);
- // LOG_I(EMU,"predefined_traffic.application_type %d: %s\n",i,oai_emulation->application_config.predefined_traffic.application_type[i]);
- sprintf(oai_emulation->application_config.predefined_traffic.background[i],"%s",new_app_config->predefined_traffic.background[i]);
- oai_emulation->application_config.predefined_traffic.aggregation_level[i] = new_app_config->predefined_traffic.aggregation_level[i];
-
- if(oai_emulation->application_config.predefined_traffic.destination_id[i]!=NULL)
- sprintf(oai_emulation->application_config.predefined_traffic.destination_id[i],"%s",new_app_config->predefined_traffic.destination_id[i]);
-
- if(oai_emulation->application_config.customized_traffic.source_id[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.source_id[i],"%s",new_app_config->customized_traffic.source_id[i]);
-
- if(oai_emulation->application_config.customized_traffic.destination_id[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.destination_id[i],"%s",new_app_config->customized_traffic.destination_id[i]);
-
- if(oai_emulation->application_config.customized_traffic.transport_protocol[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.transport_protocol[i],"%s",new_app_config->customized_traffic.transport_protocol[i]);
-
- if(oai_emulation->application_config.customized_traffic.background[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.background[i],"%s",new_app_config->customized_traffic.background[i]);
-
- if(oai_emulation->application_config.customized_traffic.ip_version[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.ip_version[i],"%s",new_app_config->customized_traffic.ip_version[i]);
-
- oai_emulation->application_config.customized_traffic.aggregation_level[i] = new_app_config->customized_traffic.aggregation_level[i];
-
- if(oai_emulation->application_config.customized_traffic.idt_dist[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.idt_dist[i],"%s",new_app_config->customized_traffic.idt_dist[i]);
-
- oai_emulation->application_config.customized_traffic.idt_min_ms[i] = new_app_config->customized_traffic.idt_min_ms[i];
- oai_emulation->application_config.customized_traffic.idt_max_ms[i] = new_app_config->customized_traffic.idt_max_ms[i];
- oai_emulation->application_config.customized_traffic.idt_standard_deviation[i] = new_app_config->customized_traffic.idt_standard_deviation[i];
- oai_emulation->application_config.customized_traffic.idt_lambda[i] = new_app_config->customized_traffic.idt_lambda[i];
- sprintf(oai_emulation->application_config.customized_traffic.size_dist[i],"%s",new_app_config->customized_traffic.size_dist[i]);
- oai_emulation->application_config.customized_traffic.size_min_byte[i] = new_app_config->customized_traffic.size_min_byte[i];//
- oai_emulation->application_config.customized_traffic.size_max_byte[i] = new_app_config->customized_traffic.size_max_byte[i];//
- oai_emulation->application_config.customized_traffic.size_standard_deviation[i] = new_app_config->customized_traffic.size_standard_deviation[i];//
- oai_emulation->application_config.customized_traffic.size_lambda[i] = new_app_config->customized_traffic.size_lambda[i];
- oai_emulation->application_config.customized_traffic.stream[i] = new_app_config->customized_traffic.stream[i];
- oai_emulation->application_config.customized_traffic.destination_port[i] = new_app_config->customized_traffic.destination_port[i];
- oai_emulation->application_config.customized_traffic.prob_off_pu[i] = new_app_config->customized_traffic.prob_off_pu[i];
- oai_emulation->application_config.customized_traffic.prob_off_ed[i] = new_app_config->customized_traffic.prob_off_ed[i];
- oai_emulation->application_config.customized_traffic.prob_off_pe[i] = new_app_config->customized_traffic.prob_off_pe[i];
- oai_emulation->application_config.customized_traffic.prob_pu_ed[i] = new_app_config->customized_traffic.prob_pu_ed[i];//
- oai_emulation->application_config.customized_traffic.prob_pu_pe[i] = new_app_config->customized_traffic.prob_pu_pe[i];
- oai_emulation->application_config.customized_traffic.prob_ed_pe[i] = new_app_config->customized_traffic.prob_ed_pe[i];
- oai_emulation->application_config.customized_traffic.prob_ed_pu[i] = new_app_config->customized_traffic.prob_ed_pu[i];
- oai_emulation->application_config.customized_traffic.holding_time_off_ed[i] = new_app_config->customized_traffic.holding_time_off_ed[i];
- oai_emulation->application_config.customized_traffic.holding_time_off_pu[i] = new_app_config->customized_traffic.holding_time_off_pu[i];
- oai_emulation->application_config.customized_traffic.holding_time_off_pe[i] = new_app_config->customized_traffic.holding_time_off_pe[i];
- oai_emulation->application_config.customized_traffic.holding_time_pe_off[i] = new_app_config->customized_traffic.holding_time_pe_off[i];
- oai_emulation->application_config.customized_traffic.pu_size_pkts[i] = new_app_config->customized_traffic.pu_size_pkts[i];
- oai_emulation->application_config.customized_traffic.ed_size_pkts[i] = new_app_config->customized_traffic.ed_size_pkts[i];
-
- }
-
- } else if(!strcmp((char *) event.key, "predefined_traffic.source_id")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- sprintf(oai_emulation->application_config.predefined_traffic.source_id[i],"%s",new_app_config->predefined_traffic.source_id[i]);
- }
- } else if(!strcmp((char *) event.key, "predefined_traffic.background")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- sprintf(oai_emulation->application_config.predefined_traffic.background[i],"%s",new_app_config->predefined_traffic.background[i]);
- }
- } else if(!strcmp((char *) event.key, "predefined_traffic.aggregation_level")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.predefined_traffic.aggregation_level[i] = new_app_config->predefined_traffic.aggregation_level[i];
- }
- } else if(!strcmp((char *) event.key, "predefined_traffic.destination_id")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.predefined_traffic.destination_id[i]!=NULL)
- sprintf(oai_emulation->application_config.predefined_traffic.destination_id[i],"%s",new_app_config->predefined_traffic.destination_id[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.source_id")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.source_id[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.source_id[i],"%s",new_app_config->customized_traffic.source_id[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.destination_id")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.destination_id[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.destination_id[i],"%s",new_app_config->customized_traffic.destination_id[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.transport_protocol")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.transport_protocol[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.transport_protocol[i],"%s",new_app_config->customized_traffic.transport_protocol[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.background")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.background[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.background[i],"%s",new_app_config->customized_traffic.background[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.ip_version")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.ip_version[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.ip_version[i],"%s",*((char **) event.value));
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.aggregation_level")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.aggregation_level[i] = new_app_config->customized_traffic.aggregation_level[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.idt_dist")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- if(oai_emulation->application_config.customized_traffic.idt_dist[i]!=NULL)
- sprintf(oai_emulation->application_config.customized_traffic.idt_dist[i],"%s",new_app_config->customized_traffic.idt_dist[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.idt_min_ms")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.idt_min_ms[i] = new_app_config->customized_traffic.idt_min_ms[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.idt_max_ms")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.idt_max_ms[i] = new_app_config->customized_traffic.idt_max_ms[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.idt_standard_deviation")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.idt_standard_deviation[i] = new_app_config->customized_traffic.idt_standard_deviation[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.idt_lambda")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.idt_lambda[i] = new_app_config->customized_traffic.idt_lambda[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_dist")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- sprintf(oai_emulation->application_config.customized_traffic.size_dist[i],"%s",new_app_config->customized_traffic.size_dist[i]);
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_min_byte")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.size_min_byte[i] = new_app_config->customized_traffic.size_min_byte[i];//
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_max_byte")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.size_max_byte[i] = new_app_config->customized_traffic.size_max_byte[i];//
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_standard_deviation")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.size_standard_deviation[i] = new_app_config->customized_traffic.size_standard_deviation[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.size_lambda")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.size_lambda[i] = new_app_config->customized_traffic.size_lambda[i];
- }
- } else if(!strcmp((char *) event.key, "ustomized_traffic.stream")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.stream[i] = new_app_config->customized_traffic.stream[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.destination_port")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.destination_port[i] = new_app_config->customized_traffic.destination_port[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_off_pu")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.prob_off_pu[i] = new_app_config->customized_traffic.prob_off_pu[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_off_ed")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.prob_off_ed[i] = new_app_config->customized_traffic.prob_off_ed[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_off_pe")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.prob_off_pe[i] = new_app_config->customized_traffic.prob_off_pe[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_pu_ed")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.prob_pu_ed[i] = new_app_config->customized_traffic.prob_pu_ed[i];//
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_pu_pe")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.prob_pu_pe[i] = new_app_config->customized_traffic.prob_pu_pe[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_ed_pe")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.prob_ed_pe[i] = new_app_config->customized_traffic.prob_ed_pe[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.prob_ed_pu")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.prob_ed_pu[i] = new_app_config->customized_traffic.prob_ed_pu[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.holding_time_off_ed")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.holding_time_off_ed[i] = new_app_config->customized_traffic.holding_time_off_ed[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.holding_time_off_pu")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.holding_time_off_pu[i] = new_app_config->customized_traffic.holding_time_off_pu[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.holding_time_off_pe")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.holding_time_off_pe[i] = new_app_config->customized_traffic.holding_time_off_pe[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.holding_time_pe_off")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.holding_time_pe_off[i] = new_app_config->customized_traffic.holding_time_pe_off[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.pu_size_pkts")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.pu_size_pkts[i] = new_app_config->customized_traffic.pu_size_pkts[i];
- }
- } else if(!strcmp((char *) event.key, "customized_traffic.ed_size_pkts")) {
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation->application_config.customized_traffic.ed_size_pkts[i] = new_app_config->customized_traffic.ed_size_pkts[i];
- }
- }
-
- }
-}
-
-void update_emu_model(Event_t event)
-{
- // Emulation_Config emulation_config; /*!< \brief Emulation configuration */
-
-
- printf("\n\n\nA NEW EMU MODEL\n\n\n");
- OAI_Emulation *oai_emulation;
- oai_emulation = get_OAI_emulation();
-
- if(event.optype == READ) {
- if(event.key == NULL) {
- LOG_I(EMU,"emulation_time_ms %G\n",oai_emulation->emulation_config.emulation_time_ms);
- LOG_I(EMU,"curve %s\n",oai_emulation->emulation_config.curve);
- LOG_I(EMU,"brackground_stats %s\n",oai_emulation->emulation_config.background_stats);
-
- //performance metrics
- LOG_I(EMU,"performance_metrics.throughput %s\n",oai_emulation->emulation_config.performance_metrics.throughput);
- LOG_I(EMU,"performance_metrics.latency %s\n",oai_emulation->emulation_config.performance_metrics.latency);
- LOG_I(EMU,"performance_metrics.loss_rate %s\n",oai_emulation->emulation_config.performance_metrics.loss_rate);
- LOG_I(EMU,"performance_metrics.owd_radio_access %s\n",oai_emulation->emulation_config.performance_metrics.owd_radio_access);
- LOG_I(EMU,"performance_metrics.signalling_overhead %d\n",oai_emulation->emulation_config.performance_metrics.signalling_overhead);
-
- //Layer
- LOG_I(EMU,"layer.phy %d\n",oai_emulation->emulation_config.layer.phy);
- LOG_I(EMU,"layer.mac %d\n",oai_emulation->emulation_config.layer.mac);
- LOG_I(EMU,"layer.rlc %d\n",oai_emulation->emulation_config.layer.rlc);
- LOG_I(EMU,"layer.rrc %d\n",oai_emulation->emulation_config.layer.rrc);
- LOG_I(EMU,"layer.pdcp %d\n",oai_emulation->emulation_config.layer.pdcp);
- LOG_I(EMU,"layer.omg %d\n",oai_emulation->emulation_config.layer.omg);
- LOG_I(EMU,"layer.emu %d\n",oai_emulation->emulation_config.layer.emu);
- LOG_I(EMU,"layer.otg %d\n",oai_emulation->emulation_config.layer.otg);
-
- //Log_emu
- LOG_I(EMU,"log_emu.level %s\n",oai_emulation->emulation_config.log_emu.level);
- LOG_I(EMU,"log_emu.verbosity %s\n",oai_emulation->emulation_config.log_emu.verbosity);
- LOG_I(EMU,"log_emu.interval %d\n",oai_emulation->emulation_config.log_emu.interval);
-
- //Packet_trace
- LOG_I(EMU,"packet_trace.enabled %d\n",oai_emulation->emulation_config.packet_trace.enabled);
- LOG_I(EMU,"packet_trace.start_time %u\n",oai_emulation->emulation_config.packet_trace.start_time);
- LOG_I(EMU,"packet_trace.end_time %u\n",oai_emulation->emulation_config.packet_trace.end_time);
-
- //Seed
- LOG_I(EMU,"seed.value %d\n",oai_emulation->emulation_config.seed.value);
-
- } else if (!strcmp((char *) event.key, "emulation_time_ms")) {
- LOG_I(EMU,"emulation_time_ms %G\n",oai_emulation->emulation_config.emulation_time_ms);
- } else if (!strcmp((char *) event.key, "curve")) {
- LOG_I(EMU,"curve %s\n",oai_emulation->emulation_config.curve);
- } else if (!strcmp((char *) event.key, "brackground_stats")) {
- LOG_I(EMU,"brackground_stats %s\n",oai_emulation->emulation_config.background_stats);
- } else if (!strcmp((char *) event.key, "performance_metrics.throughput")) {
- LOG_I(EMU,"performance_metrics.throughput %s\n",oai_emulation->emulation_config.performance_metrics.throughput);
- } else if (!strcmp((char *) event.key, "performance_metrics.latency")) {
- LOG_I(EMU,"performance_metrics.latency %s\n",oai_emulation->emulation_config.performance_metrics.latency);
- } else if (!strcmp((char *) event.key, "performance_metrics.loss_rate")) {
- LOG_I(EMU,"performance_metrics.loss_rate %s\n",oai_emulation->emulation_config.performance_metrics.loss_rate);
- } else if (!strcmp((char *) event.key, "performance_metrics.owd_radio_access")) {
- LOG_I(EMU,"performance_metrics.owd_radio_access %s\n",oai_emulation->emulation_config.performance_metrics.owd_radio_access);
- } else if (!strcmp((char *) event.key, "performance_metrics.signalling_overhead")) {
- LOG_I(EMU,"performance_metrics.signalling_overhead %d\n",oai_emulation->emulation_config.performance_metrics.signalling_overhead);
- } else if (!strcmp((char *) event.key, "layer.phy")) {
- LOG_I(EMU,"layer.phy %d\n",oai_emulation->emulation_config.layer.phy);
- } else if (!strcmp((char *) event.key, "layer.mac")) {
- LOG_I(EMU,"layer.mac %d\n",oai_emulation->emulation_config.layer.mac);
- } else if (!strcmp((char *) event.key, "layer.rlc")) {
- LOG_I(EMU,"layer.rlc %d\n",oai_emulation->emulation_config.layer.rlc);
- } else if (!strcmp((char *) event.key, "layer.rrc")) {
- LOG_I(EMU,"layer.rrc %d\n",oai_emulation->emulation_config.layer.rrc);
- } else if (!strcmp((char *) event.key, "layer.pdcp")) {
- LOG_I(EMU,"layer.pdcp %d\n",oai_emulation->emulation_config.layer.pdcp);
- } else if (!strcmp((char *) event.key, "layer.omg")) {
- LOG_I(EMU,"layer.omg %d\n",oai_emulation->emulation_config.layer.omg);
- } else if (!strcmp((char *) event.key, "layer.emu")) {
- LOG_I(EMU,"layer.emu %d\n",oai_emulation->emulation_config.layer.emu);
- } else if (!strcmp((char *) event.key, "layer.otg")) {
- LOG_I(EMU,"layer.otg %d\n",oai_emulation->emulation_config.layer.otg);
- } else if (!strcmp((char *) event.key, "log_emu.level")) {
- LOG_I(EMU,"log_emu.level %s\n",oai_emulation->emulation_config.log_emu.level);
- } else if (!strcmp((char *) event.key, "log_emu.verbosity")) {
- LOG_I(EMU,"log_emu.verbosity %s\n",oai_emulation->emulation_config.log_emu.verbosity);
- } else if (!strcmp((char *) event.key, "log_emu.interval")) {
- LOG_I(EMU,"log_emu.interval %d\n",oai_emulation->emulation_config.log_emu.interval);
- } else if (!strcmp((char *) event.key, "packet_trace.enabled")) {
- LOG_I(EMU,"packet_trace.enabled %d\n",oai_emulation->emulation_config.packet_trace.enabled);
- } else if (!strcmp((char *) event.key, "packet_trace.start_time")) {
- LOG_I(EMU,"packet_trace.start_time %u\n",oai_emulation->emulation_config.packet_trace.start_time);
- } else if (!strcmp((char *) event.key, "packet_trace.end_time")) {
- LOG_I(EMU,"packet_trace.end_time %u\n",oai_emulation->emulation_config.packet_trace.end_time);
- } else if (!strcmp((char *) event.key, "customized_traffic_ed_size_pkts")) {
- LOG_I(EMU,"seed.value %d\n",oai_emulation->emulation_config.seed.value);
- }
- } else if(event.optype == WRITE && event.value!=NULL) {
- Emulation_Config * new_emu_config = (Emulation_Config *) event.value;
-
- if(event.key==NULL) {
- //update all parameters
-
- oai_emulation->emulation_config.emulation_time_ms = new_emu_config->emulation_time_ms;
- sprintf(oai_emulation->emulation_config.curve,"%s",new_emu_config->curve);
- sprintf(oai_emulation->emulation_config.background_stats,"%s",new_emu_config->background_stats);
-
- //performance metrics
- sprintf(oai_emulation->emulation_config.performance_metrics.throughput,"%s",new_emu_config->performance_metrics.throughput);
- sprintf(oai_emulation->emulation_config.performance_metrics.latency,"%s",new_emu_config->performance_metrics.latency);
- sprintf(oai_emulation->emulation_config.performance_metrics.loss_rate,"%s",new_emu_config->performance_metrics.loss_rate);
- sprintf(oai_emulation->emulation_config.performance_metrics.owd_radio_access,"%s",new_emu_config->performance_metrics.owd_radio_access);
- oai_emulation->emulation_config.performance_metrics.signalling_overhead = new_emu_config->performance_metrics.signalling_overhead;
-
- //Layer
- oai_emulation->emulation_config.layer.phy = new_emu_config->layer.phy;
- oai_emulation->emulation_config.layer.mac = new_emu_config->layer.mac;
- oai_emulation->emulation_config.layer.rlc = new_emu_config->layer.rlc;
- oai_emulation->emulation_config.layer.rrc = new_emu_config->layer.rrc;
- oai_emulation->emulation_config.layer.pdcp = new_emu_config->layer.pdcp;
- oai_emulation->emulation_config.layer.omg = new_emu_config->layer.omg;
- oai_emulation->emulation_config.layer.emu = new_emu_config->layer.emu;
- oai_emulation->emulation_config.layer.otg = new_emu_config->layer.otg;
-
- //Log_emu
- sprintf(oai_emulation->emulation_config.log_emu.level,"%s",new_emu_config->log_emu.level);
- sprintf(oai_emulation->emulation_config.log_emu.verbosity,"%s",new_emu_config->log_emu.verbosity);
- oai_emulation->emulation_config.log_emu.interval = new_emu_config->log_emu.interval;
-
- //Packet_trace
- oai_emulation->emulation_config.packet_trace.enabled = new_emu_config->packet_trace.enabled ;
- oai_emulation->emulation_config.packet_trace.start_time = new_emu_config->packet_trace.start_time;
- oai_emulation->emulation_config.packet_trace.end_time = new_emu_config->packet_trace.end_time;
-
- //Seed
- oai_emulation->emulation_config.seed.value = new_emu_config->packet_trace.end_time;
- } else if(event.key != NULL) {
-
- if (!strcmp((char *) event.key, "emulation_time_ms")) {
- oai_emulation->emulation_config.emulation_time_ms = new_emu_config->emulation_time_ms;
- } else if (!strcmp((char *) event.key, "curve")) {
- sprintf(oai_emulation->emulation_config.curve,"%s",new_emu_config->curve);
- } else if (!strcmp((char *) event.key, "brackground_stats")) {
- sprintf(oai_emulation->emulation_config.background_stats,"%s",new_emu_config->background_stats);
- } else if (!strcmp((char *) event.key, "performance_metrics.throughput")) {
- sprintf(oai_emulation->emulation_config.performance_metrics.throughput,"%s",new_emu_config->performance_metrics.throughput);
- } else if (!strcmp((char *) event.key, "performance_metrics.latency")) {
- sprintf(oai_emulation->emulation_config.performance_metrics.latency,"%s",new_emu_config->performance_metrics.latency);
- } else if (!strcmp((char *) event.key, "performance_metrics.loss_rate")) {
- sprintf(oai_emulation->emulation_config.performance_metrics.loss_rate,"%s",new_emu_config->performance_metrics.loss_rate);
- } else if (!strcmp((char *) event.key, "performance_metrics.owd_radio_access")) {
- sprintf(oai_emulation->emulation_config.performance_metrics.owd_radio_access,"%s",new_emu_config->performance_metrics.owd_radio_access);
- } else if (!strcmp((char *) event.key, "performance_metrics.signalling_overhead")) {
- oai_emulation->emulation_config.performance_metrics.signalling_overhead = new_emu_config->performance_metrics.signalling_overhead;
- } else if (!strcmp((char *) event.key, "layer.phy")) {
- oai_emulation->emulation_config.layer.phy = new_emu_config->layer.phy;
- } else if (!strcmp((char *) event.key, "layer.mac")) {
- oai_emulation->emulation_config.layer.mac = new_emu_config->layer.mac;
- } else if (!strcmp((char *) event.key, "layer.rlc")) {
- oai_emulation->emulation_config.layer.rlc = new_emu_config->layer.rlc;
- } else if (!strcmp((char *) event.key, "layer.rrc")) {
- oai_emulation->emulation_config.layer.rrc = new_emu_config->layer.rrc;
- } else if (!strcmp((char *) event.key, "layer.pdcp")) {
- oai_emulation->emulation_config.layer.pdcp = new_emu_config->layer.pdcp;
- } else if (!strcmp((char *) event.key, "layer.omg")) {
- oai_emulation->emulation_config.layer.omg = new_emu_config->layer.omg;
- } else if (!strcmp((char *) event.key, "layer.emu")) {
- oai_emulation->emulation_config.layer.emu = new_emu_config->layer.emu;
- } else if (!strcmp((char *) event.key, "layer.otg")) {
- oai_emulation->emulation_config.layer.otg = new_emu_config->layer.otg;
- } else if (!strcmp((char *) event.key, "log_emu.level")) {
- sprintf(oai_emulation->emulation_config.log_emu.level,"%s",new_emu_config->log_emu.level);
- } else if (!strcmp((char *) event.key, "log_emu.verbosity")) {
- sprintf(oai_emulation->emulation_config.log_emu.verbosity,"%s",new_emu_config->log_emu.verbosity);
- } else if (!strcmp((char *) event.key, "log_emu.interval")) {
- oai_emulation->emulation_config.log_emu.interval = new_emu_config->log_emu.interval;
- } else if (!strcmp((char *) event.key, "packet_trace.enabled")) {
- oai_emulation->emulation_config.packet_trace.enabled = new_emu_config->packet_trace.enabled ;
- } else if (!strcmp((char *) event.key, "packet_trace.start_time")) {
- oai_emulation->emulation_config.packet_trace.start_time = new_emu_config->packet_trace.start_time;
- } else if (!strcmp((char *) event.key, "packet_trace.end_time")) {
- oai_emulation->emulation_config.packet_trace.end_time = new_emu_config->packet_trace.end_time;
- } else if (!strcmp((char *) event.key, "customized_traffic_ed_size_pkts")) {
- oai_emulation->emulation_config.seed.value = new_emu_config->packet_trace.end_time;
- }
- }
- }
-
-}
-
-
-int validate_mac(Event_t event)
-{
- int i=0;
-
- if(event.key ==NULL && event.value!=NULL) {
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
-
- if(event.ue == -1 && event.lcid == -1) {
- for(i=0; i0 && mac_config[i].ue_AggregatedMaximumBitrateDL<10000000000))
- return 0;
- }
-
- if(&mac_config[i].ue_AggregatedMaximumBitrateUL !=NULL) {
- if(!(mac_config[i].ue_AggregatedMaximumBitrateUL>0 && mac_config[i].ue_AggregatedMaximumBitrateUL<10000000000))
- return 0;
- }
-
- if(&mac_config[i].cqiSchedInterval !=NULL ) {
- if(!(mac_config[i].cqiSchedInterval==1 || mac_config[i].cqiSchedInterval==2 || mac_config[i].cqiSchedInterval==5 || mac_config[i].cqiSchedInterval==10 || mac_config[i].cqiSchedInterval==20
- || mac_config[i].cqiSchedInterval==32 || mac_config[i].cqiSchedInterval==40 || mac_config[i].cqiSchedInterval==64 || mac_config[i].cqiSchedInterval==80 || mac_config[i].cqiSchedInterval==128
- || mac_config[i].cqiSchedInterval==160))
- return 0;
- }
-
- if(&mac_config[i].mac_ContentionResolutionTimer !=NULL) {
- if(!(mac_config[i].mac_ContentionResolutionTimer==8 || mac_config[i].mac_ContentionResolutionTimer==16 || mac_config[i].mac_ContentionResolutionTimer==24
- || mac_config[i].mac_ContentionResolutionTimer==32 || mac_config[i].mac_ContentionResolutionTimer==40 || mac_config[i].mac_ContentionResolutionTimer==48
- || mac_config[i].mac_ContentionResolutionTimer==56 || mac_config[i].mac_ContentionResolutionTimer==64))
- return 0;
- }
-
- if(mac_config->max_allowed_rbs !=NULL) {
- int j=0;
-
- for(j=0; j=0 && mac_config[i].max_mcs[j]<=27))
- return 0;
- }
-
- }
- }
- }
- }
-
- if(event.key==NULL && event.value!=NULL && event.ue!=-1 && event.lcid!=-1) {
- //check one param
-
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
-
- i = event.ue;
- int j = event.lcid;
-
- if(&mac_config[i].DCI_aggregation_min) {
- if(mac_config[i].DCI_aggregation_min<=0) {
- return 0;
- }
-
- }
-
- if(&mac_config[i].DLSCH_dci_size_bits !=NULL) {
- if(mac_config[i].DLSCH_dci_size_bits <=0) {
- return 0;
- }
- }
-
- if(mac_config[i].priority !=NULL) {
- if(&mac_config[i].priority[j]!=NULL) {
- if(mac_config[i].priority[j]<=0) {
- return 0;
- }
- }
-
- }
-
- if(&mac_config[i].ul_bandwidth !=NULL) {
-
- if(!(mac_config[i].ul_bandwidth[j]==6 || mac_config[i].ul_bandwidth[j]==15 || mac_config[i].ul_bandwidth[j]==25 || mac_config[i].ul_bandwidth[j]==50 || mac_config[i].ul_bandwidth[j]==75
- || mac_config[i].ul_bandwidth[j]==100))
- return 0;
-
- }
-
- if(&mac_config[i].dl_bandwidth !=NULL) {
-
- if(!(mac_config[i].dl_bandwidth[j]==6 || mac_config[i].dl_bandwidth[j]==15 || mac_config[i].dl_bandwidth[j]==25 || mac_config[i].dl_bandwidth[j]==50 || mac_config[i].dl_bandwidth[j]==75
- || mac_config[i].dl_bandwidth[j]==100))
- return 0;
-
- }
-
- if(&mac_config[i].min_ul_bandwidth !=NULL) {
-
- if(!(mac_config[i].min_ul_bandwidth[j]==6 || mac_config[i].min_ul_bandwidth[j]==15 || mac_config[i].min_ul_bandwidth[j]==25 || mac_config[i].min_ul_bandwidth[j]==50
- || mac_config[i].min_ul_bandwidth[j]==75 || mac_config[i].min_ul_bandwidth[j]==100))
- return 0;
-
- }
-
- if(&mac_config[i].min_dl_bandwidth !=NULL) {
-
- if(!(mac_config[i].min_dl_bandwidth[j]==6 || mac_config[i].min_dl_bandwidth[j]==15 || mac_config[i].min_dl_bandwidth[j]==25 || mac_config[i].min_dl_bandwidth[j]==50
- || mac_config[i].min_dl_bandwidth[j]==75 || mac_config[i].min_dl_bandwidth[j]==100))
- return 0;
-
- }
-
- if(&mac_config[i].ue_AggregatedMaximumBitrateDL !=NULL) {
- if(!(mac_config[i].ue_AggregatedMaximumBitrateDL>0 && mac_config[i].ue_AggregatedMaximumBitrateDL<10000000000))
- return 0;
- }
-
- if(&mac_config[i].ue_AggregatedMaximumBitrateUL !=NULL) {
- if(!(mac_config[i].ue_AggregatedMaximumBitrateUL>0 && mac_config[i].ue_AggregatedMaximumBitrateUL<10000000000))
- return 0;
- }
-
- if(&mac_config[i].cqiSchedInterval !=NULL) {
- if(!(mac_config[i].cqiSchedInterval==1 || mac_config[i].cqiSchedInterval==2 || mac_config[i].cqiSchedInterval==5 || mac_config[i].cqiSchedInterval==10 || mac_config[i].cqiSchedInterval==20
- || mac_config[i].cqiSchedInterval==32 || mac_config[i].cqiSchedInterval==40 || mac_config[i].cqiSchedInterval==64 || mac_config[i].cqiSchedInterval==80 || mac_config[i].cqiSchedInterval==128
- || mac_config[i].cqiSchedInterval==160))
- return 0;
- }
-
- if(&mac_config[i].mac_ContentionResolutionTimer !=NULL) {
- if(!(mac_config[i].mac_ContentionResolutionTimer==8 || mac_config[i].mac_ContentionResolutionTimer==16 || mac_config[i].mac_ContentionResolutionTimer==24
- || mac_config[i].mac_ContentionResolutionTimer==32 || mac_config[i].mac_ContentionResolutionTimer==40 || mac_config[i].mac_ContentionResolutionTimer==48
- || mac_config[i].mac_ContentionResolutionTimer==56 || mac_config[i].mac_ContentionResolutionTimer==64))
- return 0;
-
- }
-
- if(mac_config->max_allowed_rbs !=NULL) {
-
- if(mac_config[i].max_allowed_rbs[j]<=0)
- return 0;
-
- }
-
- if(mac_config[i].max_mcs !=NULL) {
- if(!(mac_config[i].max_mcs[j]>=0 && mac_config[i].max_mcs[j]<=27))
- return 0;
- }
-
-
- }
-
- if(event.key!=NULL && event.value!=NULL) {
- //printf("check one param");
- if(!strcmp((char *) event.key, "priority") && event.value!=NULL) {
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
- int j=0;
-
- if(event.ue == -1 && event.lcid ==-1) {
- for(i=0; i0 && mac_config[i].ue_AggregatedMaximumBitrateDL<10000000000))
- return 0;
- }
- } else {
- i = event.ue;
-
- if(!(mac_config[i].ue_AggregatedMaximumBitrateDL>0 && mac_config[i].ue_AggregatedMaximumBitrateDL<10000000000))
- return 0;
- }
-
- } else if(!strcmp((char *) event.key, "ue_AggregatedMaximumBitrateUL") && event.value!=NULL) {
-
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
-
-
-
- if(event.ue == -1) {
- for(i=0; i0 && mac_config[i].ue_AggregatedMaximumBitrateUL<10000000000))
- return 0;
- }
- } else {
- i = event.ue;
-
- if(!(mac_config[i].ue_AggregatedMaximumBitrateUL>0 && mac_config[i].ue_AggregatedMaximumBitrateUL<10000000000))
- return 0;
- }
-
- } else if(!strcmp((char *) event.key, "cqiSchedInterval") && event.value!=NULL) {
- Mac_config* mac_config;// = malloc(sizeof(Mac_config)*16);
- mac_config = (Mac_config *) event.value;
-
- if(event.ue == -1) {
- for(i=0; i=0 && mac_config[i].max_mcs[j]<=27))
- return 0;
-
- }
- }
-
- }
- } else {
- i = event.ue;
- j = event.lcid;
-
- if(!(mac_config[i].max_mcs[j]>=0 && mac_config[i].max_mcs[j]<=27))
- return 0;
-
- }
- }
-
- }
-
- return 1;
-
-
-}
-
diff --git a/targets/SIMU/USER/event_handler.h b/targets/SIMU/USER/event_handler.h
deleted file mode 100644
index d6579fd411..0000000000
--- a/targets/SIMU/USER/event_handler.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-/*! \file event_handler.h
-* \brief primitives to handle event acting on oai
-* \author Navid Nikaein and Mohamed Said MOSLI BOUKSIAA,
-* \date 2014
-* \version 0.5
-* @ingroup _oai
-*/
-
-#include "oaisim.h"
-#include "UTIL/FIFO/pad_list.h"
-
-
-
-void add_event(Event_t event);
-
-void schedule(Operation_Type_t op, Event_Type_t type, int frame, char * key, void* value, int ue, int lcid);
-
-void schedule_delayed(Operation_Type_t op, Event_Type_t type, char * key, void* value, char * time, int ue, int lcid);
-
-void schedule_events(void);
-
-void execute_events(frame_t frame);
-
-
-void update_oai_model(char * key, void * value);
-
-void update_sys_model(Event_t event);
-
-void update_topo_model(Event_t event);
-
-void update_app_model(Event_t event);
-
-void update_emu_model(Event_t event);
-
-void update_mac(Event_t event);
-
-int validate_mac(Event_t event);
-
-
-/*
-void schedule_end_of_simulation(End_Of_Sim_Event_Type type, int value);
-
-int end_of_simulation();
-*/
diff --git a/targets/SIMU/USER/files/MI_16qam.csv b/targets/SIMU/USER/files/MI_16qam.csv
deleted file mode 100644
index 3cdbecc270..0000000000
--- a/targets/SIMU/USER/files/MI_16qam.csv
+++ /dev/null
@@ -1,3 +0,0 @@
--20,-19.8,-19.6,-19.4,-19.2,-19,-18.8,-18.6,-18.4,-18.2,-18,-17.8,-17.6,-17.4,-17.2,-17,-16.8,-16.6,-16.4,-16.2,-16,-15.8,-15.6,-15.4,-15.2,-15,-14.8,-14.6,-14.4,-14.2,-14,-13.8,-13.6,-13.4,-13.2,-13,-12.8,-12.6,-12.4,-12.2,-12,-11.8,-11.6,-11.4,-11.2,-11,-10.8,-10.6,-10.4,-10.2,-10,-9.8,-9.6,-9.4,-9.2,-9,-8.8,-8.6,-8.4,-8.2,-8,-7.8,-7.6,-7.4,-7.2,-7,-6.8,-6.6,-6.4,-6.2,-6,-5.8,-5.6,-5.4,-5.2,-5,-4.8,-4.6,-4.4,-4.2,-4,-3.8,-3.6,-3.4,-3.2,-3,-2.8,-2.6,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,0.8,1,1.2,1.4,1.6,1.8,2,2.2,2.4,2.6,2.8,3,3.2,3.4,3.6,3.8,4,4.2,4.4,4.6,4.8,5,5.2,5.4,5.6,5.8,6,6.2,6.4,6.6,6.8,7,7.2,7.4,7.6,7.8,8,8.2,8.4,8.6,8.8,9,9.2,9.4,9.6,9.8,10,10.2,10.4,10.6,10.8,11,11.2,11.4,11.6,11.8,12,12.2,12.4,12.6,12.8,13,13.2,13.4,13.6,13.8,14,14.2,14.4,14.6,14.8,15,15.2,15.4,15.6,15.8,16,16.2,16.4,16.6,16.8,17,17.2,17.4,17.6,17.8,18,18.2,18.4,18.6,18.8,19,19.2
-0.014138,0.014992,0.015845,0.016699,0.017553,0.018407,0.01923,0.020054,0.020878,0.021701,0.022525,0.02368,0.024834,0.025989,0.027144,0.028299,0.029822,0.031346,0.03287,0.034393,0.035917,0.03769,0.039464,0.041237,0.043011,0.044784,0.047124,0.049465,0.051806,0.054146,0.056487,0.059209,0.061931,0.064654,0.067376,0.070098,0.073673,0.077247,0.080822,0.084396,0.087971,0.092295,0.09662,0.10094,0.10527,0.10959,0.11501,0.12043,0.12585,0.13127,0.13669,0.14362,0.15054,0.15747,0.1644,0.17133,0.17954,0.18776,0.19598,0.2042,0.21241,0.2223,0.23219,0.24208,0.25197,0.26186,0.27399,0.28613,0.29827,0.31041,0.32255,0.33706,0.35158,0.36609,0.38061,0.39513,0.41234,0.42955,0.44676,0.46397,0.48118,0.50187,0.52256,0.54325,0.56394,0.58463,0.60797,0.63131,0.65465,0.678,0.70134,0.72903,0.75673,0.78442,0.81212,0.83981,0.86994,0.90007,0.9302,0.96033,0.99047,1.0241,1.0577,1.0914,1.125,1.1587,1.1954,1.2321,1.2688,1.3054,1.3421,1.3818,1.4214,1.4611,1.5007,1.5404,1.5828,1.6253,1.6678,1.7102,1.7527,1.7968,1.8408,1.8849,1.929,1.9731,2.0189,2.0647,2.1105,2.1563,2.2022,2.2501,2.298,2.346,2.3939,2.4418,2.4901,2.5384,2.5867,2.6349,2.6832,2.7321,2.7811,2.83,2.8789,2.9279,2.9751,3.0224,3.0697,3.117,3.1643,3.2083,3.2524,3.2964,3.3404,3.3844,3.4235,3.4626,3.5017,3.5407,3.5798,3.6112,3.6426,3.674,3.7054,3.7368,3.7602,3.7835,3.8068,3.8302,3.8535,3.8685,3.8836,3.8986,3.9137,3.9288,3.9372,3.9456,3.954,3.9624,3.9708,3.9747,3.9786,3.9825,3.9864,3.9903,3.9918,3.9932,3.9947,3.9961,3.9975,3.9979,3.9983,3.9987,3.9991,3.9995,4
-0.0035344,0.0037479,0.0039613,0.0041748,0.0043882,0.0046017,0.0048076,0.0050135,0.0052194,0.0054254,0.0056313,0.0059199,0.0062086,0.0064973,0.006786,0.0070746,0.0074556,0.0078365,0.0082174,0.0085983,0.0089792,0.0094226,0.0098659,0.010309,0.010753,0.011196,0.011781,0.012366,0.012951,0.013537,0.014122,0.014802,0.015483,0.016163,0.016844,0.017525,0.018418,0.019312,0.020205,0.021099,0.021993,0.023074,0.024155,0.025236,0.026317,0.027398,0.028753,0.030108,0.031463,0.032818,0.034173,0.035904,0.037636,0.039368,0.0411,0.042831,0.044886,0.04694,0.048994,0.051049,0.053103,0.055575,0.058047,0.06052,0.062992,0.065464,0.068498,0.071533,0.074568,0.077602,0.080637,0.084266,0.087895,0.091524,0.095153,0.098782,0.10308,0.10739,0.11169,0.11599,0.12029,0.12547,0.13064,0.13581,0.14098,0.14616,0.15199,0.15783,0.16366,0.1695,0.17533,0.18226,0.18918,0.19611,0.20303,0.20995,0.21749,0.22502,0.23255,0.24008,0.24762,0.25603,0.26444,0.27285,0.28126,0.28967,0.29884,0.30801,0.31719,0.32636,0.33554,0.34545,0.35536,0.36527,0.37518,0.3851,0.39571,0.40632,0.41694,0.42755,0.43817,0.44919,0.46021,0.47123,0.48226,0.49328,0.50473,0.51618,0.52763,0.53909,0.55054,0.56252,0.57451,0.58649,0.59847,0.61046,0.62253,0.6346,0.64667,0.65874,0.67081,0.68304,0.69527,0.7075,0.71973,0.73196,0.74379,0.75561,0.76743,0.77925,0.79108,0.80208,0.81309,0.8241,0.8351,0.84611,0.85588,0.86565,0.87541,0.88518,0.89495,0.9028,0.91065,0.9185,0.92635,0.93421,0.94004,0.94587,0.95171,0.95754,0.96337,0.96714,0.9709,0.97466,0.97843,0.98219,0.98429,0.98639,0.9885,0.9906,0.9927,0.99368,0.99465,0.99563,0.99661,0.99758,0.99794,0.9983,0.99866,0.99902,0.99938,0.99948,0.99958,0.99968,0.99978,0.99988,1
diff --git a/targets/SIMU/USER/files/MI_16qam.txt b/targets/SIMU/USER/files/MI_16qam.txt
deleted file mode 100644
index 5671a89426..0000000000
--- a/targets/SIMU/USER/files/MI_16qam.txt
+++ /dev/null
@@ -1,3 +0,0 @@
--20;-19.8;-19.6;-19.4;-19.2;-19;-18.8;-18.6;-18.4;-18.2;-18;-17.8;-17.6;-17.4;-17.2;-17;-16.8;-16.6;-16.4;-16.2;-16;-15.8;-15.6;-15.4;-15.2;-15;-14.8;-14.6;-14.4;-14.2;-14;-13.8;-13.6;-13.4;-13.2;-13;-12.8;-12.6;-12.4;-12.2;-12;-11.8;-11.6;-11.4;-11.2;-11;-10.8;-10.6;-10.4;-10.2;-10;-9.8;-9.6;-9.4;-9.2;-9;-8.8;-8.6;-8.4;-8.2;-8;-7.8;-7.6;-7.4;-7.2;-7;-6.8;-6.6;-6.4;-6.2;-6;-5.8;-5.6;-5.4;-5.2;-5;-4.8;-4.6;-4.4;-4.2;-4;-3.8;-3.6;-3.4;-3.2;-3;-2.8;-2.6;-2.4;-2.2;-2;-1.8;-1.6;-1.4;-1.2;-1;-0.8;-0.6;-0.4;-0.2;0;0.2;0.4;0.6;0.8;1;1.2;1.4;1.6;1.8;2;2.2;2.4;2.6;2.8;3;3.2;3.4;3.6;3.8;4;4.2;4.4;4.6;4.8;5;5.2;5.4;5.6;5.8;6;6.2;6.4;6.6;6.8;7;7.2;7.4;7.6;7.8;8;8.2;8.4;8.6;8.8;9;9.2;9.4;9.6;9.8;10;10.2;10.4;10.6;10.8;11;11.2;11.4;11.6;11.8;12;12.2;12.4;12.6;12.8;13;13.2;13.4;13.6;13.8;14;14.2;14.4;14.6;14.8;15;15.2;15.4;15.6;15.8;16;16.2;16.4;16.6;16.8;17;17.2;17.4;17.6;17.8;18;18.2;18.4;18.6;18.8;19;19.2
-0.014138;0.014992;0.015845;0.016699;0.017553;0.018407;0.01923;0.020054;0.020878;0.021701;0.022525;0.02368;0.024834;0.025989;0.027144;0.028299;0.029822;0.031346;0.03287;0.034393;0.035917;0.03769;0.039464;0.041237;0.043011;0.044784;0.047124;0.049465;0.051806;0.054146;0.056487;0.059209;0.061931;0.064654;0.067376;0.070098;0.073673;0.077247;0.080822;0.084396;0.087971;0.092295;0.09662;0.10094;0.10527;0.10959;0.11501;0.12043;0.12585;0.13127;0.13669;0.14362;0.15054;0.15747;0.1644;0.17133;0.17954;0.18776;0.19598;0.2042;0.21241;0.2223;0.23219;0.24208;0.25197;0.26186;0.27399;0.28613;0.29827;0.31041;0.32255;0.33706;0.35158;0.36609;0.38061;0.39513;0.41234;0.42955;0.44676;0.46397;0.48118;0.50187;0.52256;0.54325;0.56394;0.58463;0.60797;0.63131;0.65465;0.678;0.70134;0.72903;0.75673;0.78442;0.81212;0.83981;0.86994;0.90007;0.9302;0.96033;0.99047;1.0241;1.0577;1.0914;1.125;1.1587;1.1954;1.2321;1.2688;1.3054;1.3421;1.3818;1.4214;1.4611;1.5007;1.5404;1.5828;1.6253;1.6678;1.7102;1.7527;1.7968;1.8408;1.8849;1.929;1.9731;2.0189;2.0647;2.1105;2.1563;2.2022;2.2501;2.298;2.346;2.3939;2.4418;2.4901;2.5384;2.5867;2.6349;2.6832;2.7321;2.7811;2.83;2.8789;2.9279;2.9751;3.0224;3.0697;3.117;3.1643;3.2083;3.2524;3.2964;3.3404;3.3844;3.4235;3.4626;3.5017;3.5407;3.5798;3.6112;3.6426;3.674;3.7054;3.7368;3.7602;3.7835;3.8068;3.8302;3.8535;3.8685;3.8836;3.8986;3.9137;3.9288;3.9372;3.9456;3.954;3.9624;3.9708;3.9747;3.9786;3.9825;3.9864;3.9903;3.9918;3.9932;3.9947;3.9961;3.9975;3.9979;3.9983;3.9987;3.9991;3.9995;4
-0.0035344;0.0037479;0.0039613;0.0041748;0.0043882;0.0046017;0.0048076;0.0050135;0.0052194;0.0054254;0.0056313;0.0059199;0.0062086;0.0064973;0.006786;0.0070746;0.0074556;0.0078365;0.0082174;0.0085983;0.0089792;0.0094226;0.0098659;0.010309;0.010753;0.011196;0.011781;0.012366;0.012951;0.013537;0.014122;0.014802;0.015483;0.016163;0.016844;0.017525;0.018418;0.019312;0.020205;0.021099;0.021993;0.023074;0.024155;0.025236;0.026317;0.027398;0.028753;0.030108;0.031463;0.032818;0.034173;0.035904;0.037636;0.039368;0.0411;0.042831;0.044886;0.04694;0.048994;0.051049;0.053103;0.055575;0.058047;0.06052;0.062992;0.065464;0.068498;0.071533;0.074568;0.077602;0.080637;0.084266;0.087895;0.091524;0.095153;0.098782;0.10308;0.10739;0.11169;0.11599;0.12029;0.12547;0.13064;0.13581;0.14098;0.14616;0.15199;0.15783;0.16366;0.1695;0.17533;0.18226;0.18918;0.19611;0.20303;0.20995;0.21749;0.22502;0.23255;0.24008;0.24762;0.25603;0.26444;0.27285;0.28126;0.28967;0.29884;0.30801;0.31719;0.32636;0.33554;0.34545;0.35536;0.36527;0.37518;0.3851;0.39571;0.40632;0.41694;0.42755;0.43817;0.44919;0.46021;0.47123;0.48226;0.49328;0.50473;0.51618;0.52763;0.53909;0.55054;0.56252;0.57451;0.58649;0.59847;0.61046;0.62253;0.6346;0.64667;0.65874;0.67081;0.68304;0.69527;0.7075;0.71973;0.73196;0.74379;0.75561;0.76743;0.77925;0.79108;0.80208;0.81309;0.8241;0.8351;0.84611;0.85588;0.86565;0.87541;0.88518;0.89495;0.9028;0.91065;0.9185;0.92635;0.93421;0.94004;0.94587;0.95171;0.95754;0.96337;0.96714;0.9709;0.97466;0.97843;0.98219;0.98429;0.98639;0.9885;0.9906;0.9927;0.99368;0.99465;0.99563;0.99661;0.99758;0.99794;0.9983;0.99866;0.99902;0.99938;0.99948;0.99958;0.99968;0.99978;0.99988;1
diff --git a/targets/SIMU/USER/files/MI_4qam.csv b/targets/SIMU/USER/files/MI_4qam.csv
deleted file mode 100644
index a2f43a0bbd..0000000000
--- a/targets/SIMU/USER/files/MI_4qam.csv
+++ /dev/null
@@ -1,3 +0,0 @@
--20,-19.8,-19.6,-19.4,-19.2,-19,-18.8,-18.6,-18.4,-18.2,-18,-17.8,-17.6,-17.4,-17.2,-17,-16.8,-16.6,-16.4,-16.2,-16,-15.8,-15.6,-15.4,-15.2,-15,-14.8,-14.6,-14.4,-14.2,-14,-13.8,-13.6,-13.4,-13.2,-13,-12.8,-12.6,-12.4,-12.2,-12,-11.8,-11.6,-11.4,-11.2,-11,-10.8,-10.6,-10.4,-10.2,-10,-9.8,-9.6,-9.4,-9.2,-9,-8.8,-8.6,-8.4,-8.2,-8,-7.8,-7.6,-7.4,-7.2,-7,-6.8,-6.6,-6.4,-6.2,-6,-5.8,-5.6,-5.4,-5.2,-5,-4.8,-4.6,-4.4,-4.2,-4,-3.8,-3.6,-3.4,-3.2,-3,-2.8,-2.6,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,0.8,1,1.2,1.4,1.6,1.8,2,2.2,2.4,2.6,2.8,3,3.2,3.4,3.6,3.8,4,4.2,4.4,4.6,4.8,5,5.2,5.4,5.6,5.8,6,6.2,6.4,6.6,6.8,7,7.2,7.4,7.6,7.8,8,8.2,8.4,8.6,8.8,9,9.2,9.4,9.6,9.8,10,10.2,10.4,10.6,10.8,11,11.2,11.4,11.6,11.8,12,12.2
-0.014938,0.015535,0.016131,0.016727,0.017324,0.01792,0.018791,0.019662,0.020533,0.021404,0.022276,0.023689,0.025102,0.026515,0.027928,0.029341,0.030588,0.031835,0.033082,0.034329,0.035575,0.03748,0.039384,0.041289,0.043193,0.045098,0.047475,0.049853,0.05223,0.054607,0.056985,0.059606,0.062228,0.06485,0.067472,0.070094,0.07367,0.077247,0.080824,0.0844,0.087977,0.092384,0.096792,0.1012,0.10561,0.11001,0.11567,0.12133,0.12699,0.13265,0.13831,0.14512,0.15193,0.15874,0.16555,0.17236,0.18045,0.18854,0.19663,0.20472,0.21282,0.22319,0.23357,0.24395,0.25433,0.26471,0.27602,0.28733,0.29863,0.30994,0.32125,0.33583,0.35041,0.36499,0.37957,0.39415,0.4114,0.42865,0.4459,0.46315,0.4804,0.50048,0.52055,0.54063,0.5607,0.58078,0.60421,0.62764,0.65107,0.6745,0.69793,0.72389,0.74984,0.7758,0.80176,0.82771,0.85656,0.88541,0.91425,0.9431,0.97194,1.0031,1.0343,1.0655,1.0967,1.1279,1.1592,1.1905,1.2218,1.2531,1.2845,1.3156,1.3467,1.3778,1.4089,1.44,1.4699,1.4999,1.5298,1.5598,1.5897,1.6156,1.6414,1.6672,1.6931,1.7189,1.7397,1.7606,1.7814,1.8022,1.823,1.839,1.8549,1.8708,1.8868,1.9027,1.9124,1.922,1.9317,1.9414,1.9511,1.9569,1.9628,1.9687,1.9745,1.9804,1.9831,1.9857,1.9884,1.991,1.9937,1.9947,1.9957,1.9967,1.9977,1.9986,1.9989,1.9991,1.9993,1.9996,1.9998,2
-0.0074691,0.0077673,0.0080654,0.0083636,0.0086618,0.00896,0.0093955,0.0098311,0.010267,0.010702,0.011138,0.011844,0.012551,0.013257,0.013964,0.014671,0.015294,0.015917,0.016541,0.017164,0.017788,0.01874,0.019692,0.020644,0.021597,0.022549,0.023738,0.024926,0.026115,0.027304,0.028492,0.029803,0.031114,0.032425,0.033736,0.035047,0.036835,0.038623,0.040412,0.0422,0.043988,0.046192,0.048396,0.050599,0.052803,0.055007,0.057836,0.060666,0.063496,0.066325,0.069155,0.07256,0.075965,0.07937,0.082775,0.08618,0.090225,0.094271,0.098317,0.10236,0.10641,0.1116,0.11679,0.12198,0.12717,0.13235,0.13801,0.14366,0.14932,0.15497,0.16063,0.16792,0.17521,0.1825,0.18979,0.19708,0.2057,0.21433,0.22295,0.23158,0.2402,0.25024,0.26028,0.27031,0.28035,0.29039,0.3021,0.31382,0.32553,0.33725,0.34897,0.36194,0.37492,0.3879,0.40088,0.41386,0.42828,0.4427,0.45713,0.47155,0.48597,0.50156,0.51715,0.53275,0.54834,0.56393,0.57959,0.59525,0.61091,0.62657,0.64223,0.65779,0.67334,0.68889,0.70445,0.72,0.73497,0.74994,0.76492,0.77989,0.79486,0.80778,0.8207,0.83362,0.84654,0.85946,0.86987,0.88029,0.8907,0.90111,0.91152,0.91948,0.92745,0.93542,0.94338,0.95135,0.95619,0.96102,0.96586,0.9707,0.97554,0.97847,0.9814,0.98433,0.98727,0.9902,0.99153,0.99286,0.99419,0.99552,0.99685,0.99735,0.99784,0.99834,0.99883,0.99932,0.99944,0.99956,0.99967,0.99979,0.9999,1
diff --git a/targets/SIMU/USER/files/MI_4qam.txt b/targets/SIMU/USER/files/MI_4qam.txt
deleted file mode 100644
index ba1b46094a..0000000000
--- a/targets/SIMU/USER/files/MI_4qam.txt
+++ /dev/null
@@ -1,3 +0,0 @@
--20;-19.8;-19.6;-19.4;-19.2;-19;-18.8;-18.6;-18.4;-18.2;-18;-17.8;-17.6;-17.4;-17.2;-17;-16.8;-16.6;-16.4;-16.2;-16;-15.8;-15.6;-15.4;-15.2;-15;-14.8;-14.6;-14.4;-14.2;-14;-13.8;-13.6;-13.4;-13.2;-13;-12.8;-12.6;-12.4;-12.2;-12;-11.8;-11.6;-11.4;-11.2;-11;-10.8;-10.6;-10.4;-10.2;-10;-9.8;-9.6;-9.4;-9.2;-9;-8.8;-8.6;-8.4;-8.2;-8;-7.8;-7.6;-7.4;-7.2;-7;-6.8;-6.6;-6.4;-6.2;-6;-5.8;-5.6;-5.4;-5.2;-5;-4.8;-4.6;-4.4;-4.2;-4;-3.8;-3.6;-3.4;-3.2;-3;-2.8;-2.6;-2.4;-2.2;-2;-1.8;-1.6;-1.4;-1.2;-1;-0.8;-0.6;-0.4;-0.2;0;0.2;0.4;0.6;0.8;1;1.2;1.4;1.6;1.8;2;2.2;2.4;2.6;2.8;3;3.2;3.4;3.6;3.8;4;4.2;4.4;4.6;4.8;5;5.2;5.4;5.6;5.8;6;6.2;6.4;6.6;6.8;7;7.2;7.4;7.6;7.8;8;8.2;8.4;8.6;8.8;9;9.2;9.4;9.6;9.8;10;10.2;10.4;10.6;10.8;11;11.2;11.4;11.6;11.8;12;12.2
-0.014938;0.015535;0.016131;0.016727;0.017324;0.01792;0.018791;0.019662;0.020533;0.021404;0.022276;0.023689;0.025102;0.026515;0.027928;0.029341;0.030588;0.031835;0.033082;0.034329;0.035575;0.03748;0.039384;0.041289;0.043193;0.045098;0.047475;0.049853;0.05223;0.054607;0.056985;0.059606;0.062228;0.06485;0.067472;0.070094;0.07367;0.077247;0.080824;0.0844;0.087977;0.092384;0.096792;0.1012;0.10561;0.11001;0.11567;0.12133;0.12699;0.13265;0.13831;0.14512;0.15193;0.15874;0.16555;0.17236;0.18045;0.18854;0.19663;0.20472;0.21282;0.22319;0.23357;0.24395;0.25433;0.26471;0.27602;0.28733;0.29863;0.30994;0.32125;0.33583;0.35041;0.36499;0.37957;0.39415;0.4114;0.42865;0.4459;0.46315;0.4804;0.50048;0.52055;0.54063;0.5607;0.58078;0.60421;0.62764;0.65107;0.6745;0.69793;0.72389;0.74984;0.7758;0.80176;0.82771;0.85656;0.88541;0.91425;0.9431;0.97194;1.0031;1.0343;1.0655;1.0967;1.1279;1.1592;1.1905;1.2218;1.2531;1.2845;1.3156;1.3467;1.3778;1.4089;1.44;1.4699;1.4999;1.5298;1.5598;1.5897;1.6156;1.6414;1.6672;1.6931;1.7189;1.7397;1.7606;1.7814;1.8022;1.823;1.839;1.8549;1.8708;1.8868;1.9027;1.9124;1.922;1.9317;1.9414;1.9511;1.9569;1.9628;1.9687;1.9745;1.9804;1.9831;1.9857;1.9884;1.991;1.9937;1.9947;1.9957;1.9967;1.9977;1.9986;1.9989;1.9991;1.9993;1.9996;1.9998;2
-0.0074691;0.0077673;0.0080654;0.0083636;0.0086618;0.00896;0.0093955;0.0098311;0.010267;0.010702;0.011138;0.011844;0.012551;0.013257;0.013964;0.014671;0.015294;0.015917;0.016541;0.017164;0.017788;0.01874;0.019692;0.020644;0.021597;0.022549;0.023738;0.024926;0.026115;0.027304;0.028492;0.029803;0.031114;0.032425;0.033736;0.035047;0.036835;0.038623;0.040412;0.0422;0.043988;0.046192;0.048396;0.050599;0.052803;0.055007;0.057836;0.060666;0.063496;0.066325;0.069155;0.07256;0.075965;0.07937;0.082775;0.08618;0.090225;0.094271;0.098317;0.10236;0.10641;0.1116;0.11679;0.12198;0.12717;0.13235;0.13801;0.14366;0.14932;0.15497;0.16063;0.16792;0.17521;0.1825;0.18979;0.19708;0.2057;0.21433;0.22295;0.23158;0.2402;0.25024;0.26028;0.27031;0.28035;0.29039;0.3021;0.31382;0.32553;0.33725;0.34897;0.36194;0.37492;0.3879;0.40088;0.41386;0.42828;0.4427;0.45713;0.47155;0.48597;0.50156;0.51715;0.53275;0.54834;0.56393;0.57959;0.59525;0.61091;0.62657;0.64223;0.65779;0.67334;0.68889;0.70445;0.72;0.73497;0.74994;0.76492;0.77989;0.79486;0.80778;0.8207;0.83362;0.84654;0.85946;0.86987;0.88029;0.8907;0.90111;0.91152;0.91948;0.92745;0.93542;0.94338;0.95135;0.95619;0.96102;0.96586;0.9707;0.97554;0.97847;0.9814;0.98433;0.98727;0.9902;0.99153;0.99286;0.99419;0.99552;0.99685;0.99735;0.99784;0.99834;0.99883;0.99932;0.99944;0.99956;0.99967;0.99979;0.9999;1
diff --git a/targets/SIMU/USER/files/MI_64qam.csv b/targets/SIMU/USER/files/MI_64qam.csv
deleted file mode 100644
index d24cd371d3..0000000000
--- a/targets/SIMU/USER/files/MI_64qam.csv
+++ /dev/null
@@ -1,3 +0,0 @@
--20,-19.8,-19.6,-19.4,-19.2,-19,-18.8,-18.6,-18.4,-18.2,-18,-17.8,-17.6,-17.4,-17.2,-17,-16.8,-16.6,-16.4,-16.2,-16,-15.8,-15.6,-15.4,-15.2,-15,-14.8,-14.6,-14.4,-14.2,-14,-13.8,-13.6,-13.4,-13.2,-13,-12.8,-12.6,-12.4,-12.2,-12,-11.8,-11.6,-11.4,-11.2,-11,-10.8,-10.6,-10.4,-10.2,-10,-9.8,-9.6,-9.4,-9.2,-9,-8.8,-8.6,-8.4,-8.2,-8,-7.8,-7.6,-7.4,-7.2,-7,-6.8,-6.6,-6.4,-6.2,-6,-5.8,-5.6,-5.4,-5.2,-5,-4.8,-4.6,-4.4,-4.2,-4,-3.8,-3.6,-3.4,-3.2,-3,-2.8,-2.6,-2.4,-2.2,-2,-1.8,-1.6,-1.4,-1.2,-1,-0.8,-0.6,-0.4,-0.2,0,0.2,0.4,0.6,0.8,1,1.2,1.4,1.6,1.8,2,2.2,2.4,2.6,2.8,3,3.2,3.4,3.6,3.8,4,4.2,4.4,4.6,4.8,5,5.2,5.4,5.6,5.8,6,6.2,6.4,6.6,6.8,7,7.2,7.4,7.6,7.8,8,8.2,8.4,8.6,8.8,9,9.2,9.4,9.6,9.8,10,10.2,10.4,10.6,10.8,11,11.2,11.4,11.6,11.8,12,12.2,12.4,12.6,12.8,13,13.2,13.4,13.6,13.8,14,14.2,14.4,14.6,14.8,15,15.2,15.4,15.6,15.8,16,16.2,16.4,16.6,16.8,17,17.2,17.4,17.6,17.8,18,18.2,18.4,18.6,18.8,19,19.2,19.4,19.6,19.8,20,20.2,20.4,20.6,20.8,21,21.2,21.4,21.6,21.8,22,22.2,22.4,22.6,22.8,23,23.2,23.4,23.6,23.8,24,24.2,24.4,24.6,24.8,25,25.2
-0.014329,0.015063,0.015797,0.016531,0.017266,0.018,0.01893,0.01986,0.020791,0.021721,0.022651,0.023849,0.025047,0.026245,0.027443,0.028642,0.03008,0.031518,0.032957,0.034395,0.035834,0.037611,0.039388,0.041166,0.042943,0.04472,0.046979,0.049237,0.051496,0.053755,0.056013,0.058941,0.061869,0.064797,0.067725,0.070653,0.074193,0.077734,0.081274,0.084814,0.088355,0.092706,0.097057,0.10141,0.10576,0.11011,0.11555,0.121,0.12644,0.13188,0.13733,0.14408,0.15084,0.1576,0.16435,0.17111,0.17937,0.18763,0.19589,0.20415,0.21241,0.22245,0.23248,0.24252,0.25256,0.2626,0.27469,0.28678,0.29888,0.31097,0.32306,0.33766,0.35225,0.36685,0.38144,0.39604,0.41344,0.43084,0.44824,0.46564,0.48304,0.50338,0.52372,0.54407,0.56441,0.58475,0.60833,0.63192,0.6555,0.67908,0.70266,0.73007,0.75747,0.78488,0.81228,0.83969,0.86999,0.9003,0.9306,0.96091,0.99121,1.0254,1.0595,1.0937,1.1279,1.162,1.1993,1.2365,1.2737,1.3109,1.3482,1.3887,1.4293,1.4699,1.5104,1.551,1.5939,1.6368,1.6797,1.7226,1.7655,1.8112,1.8568,1.9025,1.9482,1.9938,2.041,2.0882,2.1353,2.1825,2.2296,2.2795,2.3293,2.3791,2.4289,2.4788,2.53,2.5813,2.6326,2.6839,2.7351,2.7877,2.8403,2.8929,2.9455,2.9981,3.0522,3.1063,3.1604,3.2145,3.2686,3.3237,3.3788,3.4339,3.489,3.5441,3.6003,3.6564,3.7125,3.7686,3.8247,3.8815,3.9384,3.9952,4.052,4.1089,4.1662,4.2235,4.2808,4.3381,4.3954,4.4527,4.5099,4.5671,4.6244,4.6816,4.7375,4.7934,4.8492,4.9051,4.961,5.0138,5.0666,5.1195,5.1723,5.2251,5.2722,5.3192,5.3662,5.4132,5.4603,5.4992,5.538,5.5769,5.6158,5.6547,5.684,5.7134,5.7427,5.772,5.8013,5.821,5.8408,5.8605,5.8803,5.9,5.9114,5.9229,5.9343,5.9458,5.9572,5.9628,5.9684,5.974,5.9796,5.9852,5.9874,5.9895,5.9917,5.9938,5.996,5.9967,5.9973,5.998,5.9986,5.9993,6
-0.0023882,0.0025106,0.0026329,0.0027552,0.0028776,0.0029999,0.003155,0.00331,0.0034651,0.0036202,0.0037752,0.0039749,0.0041746,0.0043742,0.0045739,0.0047736,0.0050133,0.0052531,0.0054928,0.0057325,0.0059723,0.0062685,0.0065647,0.0068609,0.0071571,0.0074534,0.0078298,0.0082062,0.0085827,0.0089591,0.0093356,0.0098236,0.010312,0.0108,0.011288,0.011776,0.012366,0.012956,0.013546,0.014136,0.014726,0.015451,0.016176,0.016901,0.017627,0.018352,0.019259,0.020166,0.021073,0.02198,0.022888,0.024014,0.02514,0.026266,0.027392,0.028519,0.029895,0.031272,0.032648,0.034025,0.035401,0.037074,0.038747,0.04042,0.042094,0.043767,0.045782,0.047797,0.049813,0.051828,0.053844,0.056276,0.058709,0.061141,0.063574,0.066006,0.068906,0.071806,0.074706,0.077606,0.080506,0.083897,0.087287,0.090678,0.094068,0.097458,0.10139,0.10532,0.10925,0.11318,0.11711,0.12168,0.12625,0.13081,0.13538,0.13995,0.145,0.15005,0.1551,0.16015,0.1652,0.1709,0.17659,0.18228,0.18798,0.19367,0.19988,0.20608,0.21229,0.21849,0.22469,0.23146,0.23822,0.24498,0.25174,0.2585,0.26565,0.2728,0.27995,0.2871,0.29425,0.30186,0.30947,0.31708,0.32469,0.3323,0.34016,0.34803,0.35589,0.36375,0.37161,0.37991,0.38822,0.39652,0.40482,0.41313,0.42167,0.43022,0.43876,0.44731,0.45586,0.46462,0.47338,0.48215,0.49091,0.49968,0.50869,0.51771,0.52673,0.53575,0.54476,0.55395,0.56313,0.57232,0.58151,0.59069,0.60004,0.6094,0.61875,0.6281,0.63745,0.64692,0.6564,0.66587,0.67534,0.68481,0.69437,0.70392,0.71347,0.72302,0.73257,0.74211,0.75165,0.76119,0.77073,0.78026,0.78958,0.79889,0.80821,0.81752,0.82683,0.83564,0.84444,0.85325,0.86205,0.87085,0.87869,0.88653,0.89437,0.90221,0.91004,0.91653,0.92301,0.92949,0.93597,0.94245,0.94734,0.95223,0.95711,0.962,0.96688,0.97017,0.97346,0.97675,0.98004,0.98333,0.98524,0.98715,0.98906,0.99096,0.99287,0.9938,0.99474,0.99567,0.9966,0.99754,0.9979,0.99826,0.99862,0.99897,0.99933,0.99944,0.99955,0.99966,0.99977,0.99988,1
diff --git a/targets/SIMU/USER/files/MI_64qam.txt b/targets/SIMU/USER/files/MI_64qam.txt
deleted file mode 100644
index 9b6365eea0..0000000000
--- a/targets/SIMU/USER/files/MI_64qam.txt
+++ /dev/null
@@ -1,3 +0,0 @@
--20;-19.8;-19.6;-19.4;-19.2;-19;-18.8;-18.6;-18.4;-18.2;-18;-17.8;-17.6;-17.4;-17.2;-17;-16.8;-16.6;-16.4;-16.2;-16;-15.8;-15.6;-15.4;-15.2;-15;-14.8;-14.6;-14.4;-14.2;-14;-13.8;-13.6;-13.4;-13.2;-13;-12.8;-12.6;-12.4;-12.2;-12;-11.8;-11.6;-11.4;-11.2;-11;-10.8;-10.6;-10.4;-10.2;-10;-9.8;-9.6;-9.4;-9.2;-9;-8.8;-8.6;-8.4;-8.2;-8;-7.8;-7.6;-7.4;-7.2;-7;-6.8;-6.6;-6.4;-6.2;-6;-5.8;-5.6;-5.4;-5.2;-5;-4.8;-4.6;-4.4;-4.2;-4;-3.8;-3.6;-3.4;-3.2;-3;-2.8;-2.6;-2.4;-2.2;-2;-1.8;-1.6;-1.4;-1.2;-1;-0.8;-0.6;-0.4;-0.2;0;0.2;0.4;0.6;0.8;1;1.2;1.4;1.6;1.8;2;2.2;2.4;2.6;2.8;3;3.2;3.4;3.6;3.8;4;4.2;4.4;4.6;4.8;5;5.2;5.4;5.6;5.8;6;6.2;6.4;6.6;6.8;7;7.2;7.4;7.6;7.8;8;8.2;8.4;8.6;8.8;9;9.2;9.4;9.6;9.8;10;10.2;10.4;10.6;10.8;11;11.2;11.4;11.6;11.8;12;12.2;12.4;12.6;12.8;13;13.2;13.4;13.6;13.8;14;14.2;14.4;14.6;14.8;15;15.2;15.4;15.6;15.8;16;16.2;16.4;16.6;16.8;17;17.2;17.4;17.6;17.8;18;18.2;18.4;18.6;18.8;19;19.2;19.4;19.6;19.8;20;20.2;20.4;20.6;20.8;21;21.2;21.4;21.6;21.8;22;22.2;22.4;22.6;22.8;23;23.2;23.4;23.6;23.8;24;24.2;24.4;24.6;24.8;25;25.2
-0.014329;0.015063;0.015797;0.016531;0.017266;0.018;0.01893;0.01986;0.020791;0.021721;0.022651;0.023849;0.025047;0.026245;0.027443;0.028642;0.03008;0.031518;0.032957;0.034395;0.035834;0.037611;0.039388;0.041166;0.042943;0.04472;0.046979;0.049237;0.051496;0.053755;0.056013;0.058941;0.061869;0.064797;0.067725;0.070653;0.074193;0.077734;0.081274;0.084814;0.088355;0.092706;0.097057;0.10141;0.10576;0.11011;0.11555;0.121;0.12644;0.13188;0.13733;0.14408;0.15084;0.1576;0.16435;0.17111;0.17937;0.18763;0.19589;0.20415;0.21241;0.22245;0.23248;0.24252;0.25256;0.2626;0.27469;0.28678;0.29888;0.31097;0.32306;0.33766;0.35225;0.36685;0.38144;0.39604;0.41344;0.43084;0.44824;0.46564;0.48304;0.50338;0.52372;0.54407;0.56441;0.58475;0.60833;0.63192;0.6555;0.67908;0.70266;0.73007;0.75747;0.78488;0.81228;0.83969;0.86999;0.9003;0.9306;0.96091;0.99121;1.0254;1.0595;1.0937;1.1279;1.162;1.1993;1.2365;1.2737;1.3109;1.3482;1.3887;1.4293;1.4699;1.5104;1.551;1.5939;1.6368;1.6797;1.7226;1.7655;1.8112;1.8568;1.9025;1.9482;1.9938;2.041;2.0882;2.1353;2.1825;2.2296;2.2795;2.3293;2.3791;2.4289;2.4788;2.53;2.5813;2.6326;2.6839;2.7351;2.7877;2.8403;2.8929;2.9455;2.9981;3.0522;3.1063;3.1604;3.2145;3.2686;3.3237;3.3788;3.4339;3.489;3.5441;3.6003;3.6564;3.7125;3.7686;3.8247;3.8815;3.9384;3.9952;4.052;4.1089;4.1662;4.2235;4.2808;4.3381;4.3954;4.4527;4.5099;4.5671;4.6244;4.6816;4.7375;4.7934;4.8492;4.9051;4.961;5.0138;5.0666;5.1195;5.1723;5.2251;5.2722;5.3192;5.3662;5.4132;5.4603;5.4992;5.538;5.5769;5.6158;5.6547;5.684;5.7134;5.7427;5.772;5.8013;5.821;5.8408;5.8605;5.8803;5.9;5.9114;5.9229;5.9343;5.9458;5.9572;5.9628;5.9684;5.974;5.9796;5.9852;5.9874;5.9895;5.9917;5.9938;5.996;5.9967;5.9973;5.998;5.9986;5.9993;6
-0.0023882;0.0025106;0.0026329;0.0027552;0.0028776;0.0029999;0.003155;0.00331;0.0034651;0.0036202;0.0037752;0.0039749;0.0041746;0.0043742;0.0045739;0.0047736;0.0050133;0.0052531;0.0054928;0.0057325;0.0059723;0.0062685;0.0065647;0.0068609;0.0071571;0.0074534;0.0078298;0.0082062;0.0085827;0.0089591;0.0093356;0.0098236;0.010312;0.0108;0.011288;0.011776;0.012366;0.012956;0.013546;0.014136;0.014726;0.015451;0.016176;0.016901;0.017627;0.018352;0.019259;0.020166;0.021073;0.02198;0.022888;0.024014;0.02514;0.026266;0.027392;0.028519;0.029895;0.031272;0.032648;0.034025;0.035401;0.037074;0.038747;0.04042;0.042094;0.043767;0.045782;0.047797;0.049813;0.051828;0.053844;0.056276;0.058709;0.061141;0.063574;0.066006;0.068906;0.071806;0.074706;0.077606;0.080506;0.083897;0.087287;0.090678;0.094068;0.097458;0.10139;0.10532;0.10925;0.11318;0.11711;0.12168;0.12625;0.13081;0.13538;0.13995;0.145;0.15005;0.1551;0.16015;0.1652;0.1709;0.17659;0.18228;0.18798;0.19367;0.19988;0.20608;0.21229;0.21849;0.22469;0.23146;0.23822;0.24498;0.25174;0.2585;0.26565;0.2728;0.27995;0.2871;0.29425;0.30186;0.30947;0.31708;0.32469;0.3323;0.34016;0.34803;0.35589;0.36375;0.37161;0.37991;0.38822;0.39652;0.40482;0.41313;0.42167;0.43022;0.43876;0.44731;0.45586;0.46462;0.47338;0.48215;0.49091;0.49968;0.50869;0.51771;0.52673;0.53575;0.54476;0.55395;0.56313;0.57232;0.58151;0.59069;0.60004;0.6094;0.61875;0.6281;0.63745;0.64692;0.6564;0.66587;0.67534;0.68481;0.69437;0.70392;0.71347;0.72302;0.73257;0.74211;0.75165;0.76119;0.77073;0.78026;0.78958;0.79889;0.80821;0.81752;0.82683;0.83564;0.84444;0.85325;0.86205;0.87085;0.87869;0.88653;0.89437;0.90221;0.91004;0.91653;0.92301;0.92949;0.93597;0.94245;0.94734;0.95223;0.95711;0.962;0.96688;0.97017;0.97346;0.97675;0.98004;0.98333;0.98524;0.98715;0.98906;0.99096;0.99287;0.9938;0.99474;0.99567;0.9966;0.99754;0.9979;0.99826;0.99862;0.99897;0.99933;0.99944;0.99955;0.99966;0.99977;0.99988;1
diff --git a/targets/SIMU/USER/init_lte.c b/targets/SIMU/USER/init_lte.c
deleted file mode 100644
index 13b9026640..0000000000
--- a/targets/SIMU/USER/init_lte.c
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "init_lte.h"
-
-#include "PHY/phy_extern.h"
-
-#include "LAYER2/MAC/mac.h"
-#include "LAYER2/MAC/mac_extern.h"
-#include "UTIL/LOG/log_if.h"
-#include "PHY_INTERFACE/phy_interface.h"
-
-
-/*
-PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
- uint8_t eNB_id,
- uint8_t Nid_cell,
- node_function_t node_function,
- uint8_t abstraction_flag)
-{
-
- int i,j;
- PHY_VARS_eNB* PHY_vars_eNB = malloc(sizeof(PHY_VARS_eNB));
- memset(PHY_vars_eNB,0,sizeof(PHY_VARS_eNB));
- PHY_vars_eNB->Mod_id=eNB_id;
- memcpy(&(PHY_vars_eNB->frame_parms), frame_parms, sizeof(LTE_DL_FRAME_PARMS));
- PHY_vars_eNB->frame_parms.Nid_cell = ((Nid_cell/3)*3)+((eNB_id+Nid_cell)%3);
- PHY_vars_eNB->frame_parms.nushift = PHY_vars_eNB->frame_parms.Nid_cell%6;
- phy_init_lte_eNB(PHY_vars_eNB,0,abstraction_flag);
-
- LOG_I(PHY,"init eNB: Node Function %d\n",node_function);
- LOG_I(PHY,"init eNB: Nid_cell %d\n", frame_parms->Nid_cell);
- LOG_I(PHY,"init eNB: frame_type %d,tdd_config %d\n", frame_parms->frame_type,frame_parms->tdd_config);
- LOG_I(PHY,"init eNB: number of ue max %d number of enb max %d number of harq pid max %d\n",
- NUMBER_OF_UE_MAX, NUMBER_OF_eNB_MAX, NUMBER_OF_HARQ_PID_MAX);
- LOG_I(PHY,"init eNB: N_RB_DL %d\n", frame_parms->N_RB_DL);
- LOG_I(PHY,"init eNB: prach_config_index %d\n", frame_parms->prach_config_common.prach_ConfigInfo.prach_ConfigIndex);
-
- if (node_function >= NGFI_RRU_IF5)
- // For RRU, don't allocate DLSCH/ULSCH Transport channel buffers
- return (PHY_vars_eNB);
-
-
- for (i=0; idlsch[i][j] = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL,abstraction_flag,frame_parms);
- if (!PHY_vars_eNB->dlsch[i][j]) {
- LOG_E(PHY,"Can't get eNB dlsch structures for UE %d \n", i);
- exit(-1);
- } else {
- LOG_D(PHY,"dlsch[%d][%d] => %p\n",i,j,PHY_vars_eNB->dlsch[i][j]);
- PHY_vars_eNB->dlsch[i][j]->rnti=0;
- }
- }
-
-
- LOG_I(PHY,"Allocating Transport Channel Buffer for ULSCH, UE %d\n",i);
- PHY_vars_eNB->ulsch[1+i] = new_eNB_ulsch(MAX_TURBO_ITERATIONS,frame_parms->N_RB_UL, abstraction_flag);
-
- if (!PHY_vars_eNB->ulsch[1+i]) {
- LOG_E(PHY,"Can't get eNB ulsch structures\n");
- exit(-1);
- }
-
- // this is the transmission mode for the signalling channels
- // this will be overwritten with the real transmission mode by the RRC once the UE is connected
- PHY_vars_eNB->transmission_mode[i] = frame_parms->nb_antenna_ports_eNB==1 ? 1 : 2;
-#ifdef LOCALIZATION
- PHY_vars_eNB->ulsch[1+i]->aggregation_period_ms = 5000; // 5000 milliseconds // could be given as an argument (TBD))
- struct timeval ts;
- gettimeofday(&ts, NULL);
- PHY_vars_eNB->ulsch[1+i]->reference_timestamp_ms = ts.tv_sec * 1000 + ts.tv_usec / 1000;
- int j;
-
- for (j=0; j<10; j++) {
- initialize(&PHY_vars_eNB->ulsch[1+i]->loc_rss_list[j]);
- initialize(&PHY_vars_eNB->ulsch[1+i]->loc_rssi_list[j]);
- initialize(&PHY_vars_eNB->ulsch[1+i]->loc_subcarrier_rss_list[j]);
- initialize(&PHY_vars_eNB->ulsch[1+i]->loc_timing_advance_list[j]);
- initialize(&PHY_vars_eNB->ulsch[1+i]->loc_timing_update_list[j]);
- }
-
- initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_rss_list);
- initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_rssi_list);
- initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_subcarrier_rss_list);
- initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_timing_advance_list);
- initialize(&PHY_vars_eNB->ulsch[1+i]->tot_loc_timing_update_list);
-#endif
- }
-
- // ULSCH for RA
- PHY_vars_eNB->ulsch[0] = new_eNB_ulsch(MAX_TURBO_ITERATIONS, frame_parms->N_RB_UL, abstraction_flag);
-
- if (!PHY_vars_eNB->ulsch[0]) {
- LOG_E(PHY,"Can't get eNB ulsch structures\n");
- exit(-1);
- }
- PHY_vars_eNB->dlsch_SI = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, abstraction_flag, frame_parms);
- LOG_D(PHY,"eNB %d : SI %p\n",eNB_id,PHY_vars_eNB->dlsch_SI);
- PHY_vars_eNB->dlsch_ra = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, abstraction_flag, frame_parms);
- LOG_D(PHY,"eNB %d : RA %p\n",eNB_id,PHY_vars_eNB->dlsch_ra);
- PHY_vars_eNB->dlsch_MCH = new_eNB_dlsch(1,8,NSOFT,frame_parms->N_RB_DL, 0, frame_parms);
- LOG_D(PHY,"eNB %d : MCH %p\n",eNB_id,PHY_vars_eNB->dlsch_MCH);
-
-
- PHY_vars_eNB->rx_total_gain_dB=130;
-
- for(i=0; imu_mimo_mode[i].dl_pow_off = 2;
-
- PHY_vars_eNB->check_for_total_transmissions = 0;
-
- PHY_vars_eNB->check_for_MUMIMO_transmissions = 0;
-
- PHY_vars_eNB->FULL_MUMIMO_transmissions = 0;
-
- PHY_vars_eNB->check_for_SUMIMO_transmissions = 0;
-
- PHY_vars_eNB->frame_parms.pucch_config_common.deltaPUCCH_Shift = 1;
-
- return (PHY_vars_eNB);
-}
-*/
-
-
-/*
-
-PHY_VARS_RN* init_lte_RN(LTE_DL_FRAME_PARMS *frame_parms,
- uint8_t RN_id,
- uint8_t eMBMS_active_state)
-{
-
- int i;
- PHY_VARS_RN* PHY_vars_RN = malloc(sizeof(PHY_VARS_RN));
- memset(PHY_vars_RN,0,sizeof(PHY_VARS_RN));
- PHY_vars_RN->Mod_id=RN_id;
-
- 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,NSOFT,MAX_TURBO_ITERATIONS_MBSFN,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,NSOFT,MAX_TURBO_ITERATIONS,frame_parms->N_RB_DL, 0);
- LOG_D(PHY,"eNB %d : MCH[0] %p\n",RN_id,PHY_vars_RN->dlsch_rn_MCH[0]);
- }
-
- return (PHY_vars_RN);
-}
-
-void init_lte_vars(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs],
- uint8_t frame_type,
- uint8_t tdd_config,
- uint8_t tdd_config_S,
- uint8_t extended_prefix_flag,
- uint8_t N_RB_DL,
- uint16_t Nid_cell,
- uint8_t cooperation_flag,
- uint8_t nb_antenna_ports,
- uint8_t abstraction_flag,
- int nb_antennas_rx,
- int nb_antennas_tx,
- int nb_antennas_rx_ue,
- uint8_t eMBMS_active_state)
-{
-
- uint8_t eNB_id,UE_id,CC_id;
- int i;
-
-
- mac_xface = malloc(sizeof(MAC_xface));
-
- memset(mac_xface, 0, sizeof(MAC_xface));
-
- LOG_I(PHY,"init lte parms: Nid_cell %d, Frame type %d, N_RB_DL %d\n",Nid_cell,frame_type,N_RB_DL);
-
- for (CC_id=0; CC_idframe_type = frame_type;
- (frame_parms[CC_id])->tdd_config = tdd_config;
- (frame_parms[CC_id])->tdd_config_S = tdd_config_S;
- (frame_parms[CC_id])->N_RB_DL = N_RB_DL;
- (frame_parms[CC_id])->N_RB_UL = (frame_parms[CC_id])->N_RB_DL;
- (frame_parms[CC_id])->phich_config_common.phich_resource = oneSixth;
- (frame_parms[CC_id])->phich_config_common.phich_duration = normal;
- (frame_parms[CC_id])->Ncp = extended_prefix_flag;
- (frame_parms[CC_id])->Ncp_UL = extended_prefix_flag;
- (frame_parms[CC_id])->Nid_cell = Nid_cell;
- (frame_parms[CC_id])->nushift = (Nid_cell%6);
- (frame_parms[CC_id])->nb_antennas_tx = nb_antennas_tx;
- (frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx;
- (frame_parms[CC_id])->nb_antenna_ports_eNB = nb_antenna_ports;
- (frame_parms[CC_id])->mode1_flag = (frame_parms[CC_id])->nb_antenna_ports_eNB==1 ? 1 : 0;
-
- init_frame_parms(frame_parms[CC_id],1);
-
- (frame_parms[CC_id])->pusch_config_common.ul_ReferenceSignalsPUSCH.cyclicShift = 0;//n_DMRS1 set to 0
- (frame_parms[CC_id])->pusch_config_common.ul_ReferenceSignalsPUSCH.groupHoppingEnabled = 1;
- (frame_parms[CC_id])->pusch_config_common.ul_ReferenceSignalsPUSCH.sequenceHoppingEnabled = 0;
- (frame_parms[CC_id])->pusch_config_common.ul_ReferenceSignalsPUSCH.groupAssignmentPUSCH = 0;
- init_ul_hopping(frame_parms[CC_id]);
- }
-
-
- // phy_init_top(frame_parms[0]);
-
- phy_init_lte_top(frame_parms[0]);
-
- RC.nb_inst = NB_eNB_INST;
- RC.nb_CC = (int *)malloc(MAX_NUM_CCs*sizeof(int));
- RC.nb_RU = NB_RU;
- for (i=0;iMod_id=eNB_id;
- RC.eNB[eNB_id][CC_id]->CC_id=CC_id;
- }
- }
-
-
- PHY_vars_UE_g = (PHY_VARS_UE***)malloc(NB_UE_INST*sizeof(PHY_VARS_UE**));
-
- for (UE_id=0; UE_idnb_antennas_tx = 1;
- (frame_parms[CC_id])->nb_antennas_rx = nb_antennas_rx_ue;
- PHY_vars_UE_g[UE_id][CC_id] = init_lte_UE(frame_parms[CC_id], UE_id,abstraction_flag);
- PHY_vars_UE_g[UE_id][CC_id]->Mod_id=UE_id;
- PHY_vars_UE_g[UE_id][CC_id]->CC_id=CC_id;
- }
- }
-
-// if (NB_RN_INST > 0) {
-// PHY_vars_RN_g = malloc(NB_RN_INST*sizeof(PHY_VARS_RN*));
-
-// for (RN_id=0; RN_id
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "event_handler.h"
-#include "SIMULATION/RF/rf.h"
-#include "PHY/types.h"
-#include "PHY/defs_eNB.h"
-#include "PHY/defs_UE.h"
-#include "PHY/LTE_TRANSPORT/transport_proto.h"
-#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
-#include "PHY/phy_vars.h"
-#include "PHY/phy_vars_ue.h"
-#include "SCHED/sched_common_vars.h"
-
-#include "LAYER2/MAC/mac.h"
-#include "LAYER2/MAC/mac_proto.h"
-#include "LAYER2/MAC/mac_vars.h"
-#include "pdcp.h"
-#include "RRC/LTE/rrc_vars.h"
-#include "RRC/NAS/nas_config.h"
-
-#include "system.h"
-
-
-#include "PHY/TOOLS/lte_phy_scope.h"
-
-
-#ifdef SMBV
-// Rohde&Schwarz SMBV100A vector signal generator
-#include "PHY/TOOLS/smbv.h"
-char smbv_fname[] = "smbv_config_file.smbv";
-unsigned short smbv_nframes = 4; // how many frames to configure 1,..,4
-unsigned short config_frames[4] = {2,9,11,13};
-unsigned char smbv_frame_cnt = 0;
-uint8_t config_smbv = 0;
-char smbv_ip[16];
-#endif
-
-#include "flexran_agent.h"
-
-
-#include "oaisim_functions.h"
-
-#include "oaisim.h"
-#include "oaisim_config.h"
-#include "UTIL/OCG/OCG_extern.h"
-#include "cor_SF_sim.h"
-#include "UTIL/OMG/omg_constants.h"
-#include "UTIL/FIFO/pad_list.h"
-#include "enb_app.h"
-
-#include "../PROC/interface.h"
-#include "../PROC/channel_sim_proc.h"
-#include "../PROC/Tsync.h"
-#include "../PROC/Process.h"
-
-#include "UTIL/LOG/vcd_signal_dumper.h"
-#include "UTIL/OTG/otg_kpi.h"
-#include "assertions.h"
-
-#if defined(ENABLE_ITTI)
-# include "intertask_interface.h"
-# include "create_tasks.h"
-# include "intertask_interface_init.h"
-#endif
-
-#include "T.h"
-
-/*
- DCI0_5MHz_TDD0_t UL_alloc_pdu;
- DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
- DCI2_5MHz_2A_L10PRB_TDD_t DLSCH_alloc_pdu1;
- DCI2_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu2;
-*/
-
-#define UL_RB_ALLOC computeRIV(lte_frame_parms->N_RB_UL,0,24)
-#define CCCH_RB_ALLOC computeRIV(lte_frame_parms->N_RB_UL,0,3)
-#define RA_RB_ALLOC computeRIV(lte_frame_parms->N_RB_UL,0,3)
-#define DLSCH_RB_ALLOC 0x1fff
-
-#define DECOR_DIST 100
-#define SF_VAR 10
-
-//constant for OAISIM soft realtime calibration
-//#define SF_DEVIATION_OFFSET_NS 100000 /*= 0.1ms : should be as a number of UE */
-//#define SLEEP_STEP_US 100 /* = 0.01ms could be adaptive, should be as a number of UE */
-//#define K 2 /* averaging coefficient */
-//#define TARGET_SF_TIME_NS 1000000 /* 1ms = 1000000 ns */
-
-uint8_t usim_test = 0;
-
-frame_t frame = 0;
-char stats_buffer[16384];
-channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs];
-channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM_CCs];
-//Added for PHY abstraction
-node_desc_t *enb_data[NUMBER_OF_RU_MAX];
-node_desc_t *ue_data[NUMBER_OF_UE_MAX];
-
-pthread_cond_t sync_cond;
-pthread_mutex_t sync_mutex;
-int sync_var=-1;
-
-pthread_mutex_t subframe_mutex;
-int subframe_ru_mask=0,subframe_UE_mask=0;
-
-openair0_config_t openair0_cfg[MAX_CARDS];
-uint32_t downlink_frequency[MAX_NUM_CCs][4];
-int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
-openair0_rf_map rf_map[MAX_NUM_CCs];
-
-#if defined(ENABLE_ITTI)
-volatile int start_eNB = 0;
-volatile int start_UE = 0;
-#endif
-volatile int oai_exit = 0;
-
-
-//int32_t **rxdata;
-//int32_t **txdata;
-
-uint16_t sf_ahead=4;
-uint8_t nfapi_mode = 0;
-
-// Added for PHY abstraction
-extern node_list* ue_node_list;
-extern node_list* enb_node_list;
-extern int pdcp_period, omg_period;
-
-extern double **s_re, **s_im, **r_re, **r_im, **r_re0, **r_im0;
-int map1, map2;
-extern double **ShaF;
-double snr_dB, sinr_dB, snr_direction; //,sinr_direction;
-extern double snr_step;
-extern uint8_t set_sinr;
-extern uint8_t ue_connection_test;
-extern uint8_t set_seed;
-extern uint8_t target_dl_mcs;
-extern uint8_t target_ul_mcs;
-extern uint8_t abstraction_flag;
-extern uint8_t ethernet_flag;
-extern uint16_t Nid_cell;
-
-
-double cpuf;
-#include "threads_t.h"
-threads_t threads= {-1,-1,-1,-1,-1,-1,-1};
-
-//#ifdef XFORMS
-int otg_enabled;
-int xforms=0;
-//#endif
-
-time_stats_t oaisim_stats;
-time_stats_t oaisim_stats_f;
-time_stats_t dl_chan_stats;
-time_stats_t ul_chan_stats;
-
-int emulate_rf = 0;
-int numerology = 0;
-int codingw = 0;
-int fepw = 0;
-
-// this should reflect the channel models in openair1/SIMULATION/TOOLS/defs.h
-mapping small_scale_names[] = {
- { "custom", custom }, { "SCM_A", SCM_A },
- { "SCM_B", SCM_B }, { "SCM_C", SCM_C },
- { "SCM_D", SCM_D }, { "EPA", EPA },
- { "EVA", EVA }, { "ETU", ETU },
- { "MBSFN", MBSFN }, { "Rayleigh8", Rayleigh8 },
- { "Rayleigh1", Rayleigh1 }, { "Rayleigh1_800", Rayleigh1_800 },
- { "Rayleigh1_corr", Rayleigh1_corr }, { "Rayleigh1_anticorr", Rayleigh1_anticorr },
- { "Rice8", Rice8 }, { "Rice1", Rice1 }, { "Rice1_corr", Rice1_corr },
- { "Rice1_anticorr", Rice1_anticorr }, { "AWGN", AWGN }, { NULL,-1 }
-};
-#if !defined(ENABLE_ITTI)
-static void *
-sigh (void *arg);
-#endif
-void
-oai_shutdown (void);
-
-void reset_opp_meas_oaisim (void);
-
-void wait_eNBs(void)
-{
- return;
-}
-
-void
-help (void)
-{
- printf ("Usage: oaisim -h -a -F -C tdd_config -K [log_file] -V [vcd_file] -R N_RB_DL -e -x transmission_mode -m target_dl_mcs -r(ate_adaptation) -n n_frames -s snr_dB -k ricean_factor -t max_delay -f forgetting factor -A channel_model -z cooperation_flag -u nb_local_ue -U UE mobility -b nb_local_enb -B eNB_mobility -M ethernet_flag -p nb_master -g multicast_group -l log_level -c ocg_enable -T traffic model -D multicast network device\n");
-
- printf ("-h provides this help message!\n");
- printf ("-a Activates PHY abstraction mode\n");
- printf ("-A set the multipath channel simulation, options are: SCM_A, SCM_B, SCM_C, SCM_D, EPA, EVA, ETU, Rayleigh8, Rayleigh1, Rayleigh1_corr,Rayleigh1_anticorr, Rice8,, Rice1, AWGN \n");
- printf ("-b Set the number of local eNB\n");
- printf ("-B Set the mobility model for eNB, options are: STATIC, RWP, RWALK, \n");
- printf ("-c [1,2,3,4] Activate the config generator (OCG) to process the scenario descriptor, or give the scenario manually: -c template_1.xml \n");
- printf ("-C [0-6] Sets TDD configuration\n");
- printf ("-e Activates extended prefix mode\n");
- printf ("-E Random number generator seed\n");
- printf ("-f Set the forgetting factor for time-variation\n");
- printf ("-F Activates FDD transmission (TDD is default)\n");
- printf ("-g Set multicast group ID (0,1,2,3) - valid if M is set\n");
- printf ("-G Enable background traffic \n");
- printf ("-H Enable handover operation (default disabled) \n");
- printf ("-I Enable CLI interface (to connect use telnet localhost 1352)\n");
- printf ("-k Set the Ricean factor (linear)\n");
- printf ("-K [log_file] Enable ITTI logging into log_file\n");
- printf ("-l Set the global log level (8:trace, 7:debug, 6:info, 4:warn, 3:error) \n");
- printf ("-L [0-1] 0 to disable new link adaptation, 1 to enable new link adapatation\n");
- printf ("-m Gives a fixed DL mcs for eNB scheduler\n");
- printf ("-M Set the machine ID for Ethernet-based emulation\n");
- printf ("-n Set the number of frames for the simulation. 0 for no limit\n");
- printf ("-O [enb_conf_file] eNB configuration file name\n");
- printf ("-p Set the total number of machine in emulation - valid if M is set\n");
- printf ("-P [trace type] Enable protocol analyzer. Possible values for OPT:\n");
- printf (" - wireshark: Enable tracing of layers above PHY using an UDP socket\n");
- printf (" - pcap: Enable tracing of layers above PHY to a pcap file\n");
- printf (" - tshark: Not implemented yet\n");
- printf ("-q Enable Openair performance profiler \n");
- printf ("-Q Activate and set the MBMS service: 0 : not used (default eMBMS disabled), 1: eMBMS and RRC Connection enabled, 2: eMBMS relaying and RRC Connection enabled, 3: eMBMS enabled, RRC Connection disabled, 4: eMBMS relaying enabled, RRC Connection disabled\n");
- printf ("-R [6,15,25,50,75,100] Sets N_RB_DL\n");
- printf ("-r Activates rate adaptation (DL for now)\n");
- printf ("-s snr_dB set a fixed (average) SNR, this deactivates the openair channel model generator (OCM)\n");
- printf ("-S snir_dB set a fixed (average) SNIR, this deactivates the openair channel model generator (OCM)\n");
- printf ("-t Gives a fixed UL mcs for eNB scheduler\n");
- printf ("-T activate the traffic generator. Valide options are m2m,scbr,mcbr,bcbr,auto_pilot,bicycle_race,open_arena,team_fortress,m2m_traffic,auto_pilot_l,auto_pilot_m,auto_pilot_h,auto_pilot_e,virtual_game_l,virtual_game_m,virtual_game_h,virtual_game_f,alarm_humidity,alarm_smoke,alarm_temperature,openarena_dl,openarena_ul,voip_g711,voip_g729,video_vbr_10mbps,video_vbr_4mbps,video_vbr_2mbp,video_vbr_768kbps,video_vbr_384kbps,video_vbr_192kpbs,background_users\n");
- printf ("-u Set the number of local UE\n");
- printf ("-U Set the mobility model for UE, options are: STATIC, RWP, RWALK\n");
- printf ("-V [vcd_file] Enable VCD dump into vcd_file\n");
- printf ("-w number of CBA groups, if not specified or zero, CBA is inactive\n");
-#ifdef SMBV
- printf ("-W IP address to connect to Rohde&Schwarz SMBV100A and configure SMBV from config file. -W0 uses default IP 192.168.12.201\n");
-#else
- printf ("-W [Rohde&Schwarz SMBV100A functions disabled. Recompile with SMBV=1]\n");
-#endif
- printf ("-x deprecated. Set the transmission mode in config file!\n");
- printf ("-y Set the number of receive antennas at the UE (1 or 2)\n");
- printf ("-Y Set the global log verbosity (none, low, medium, high, full) \n");
- printf ("-z Set the cooperation flag (0 for no cooperation, 1 for delay diversity and 2 for distributed alamouti\n");
- printf ("-Z Reserved\n");
- printf ("--xforms Activate the grapical scope\n");
-
-}
-
-pthread_t log_thread;
-
-void
-log_thread_init (void)
-{
- //create log_list
- //log_list_init(&log_list);
-#ifndef LOG_NO_THREAD
-
- log_shutdown = 0;
-
- if ((pthread_mutex_init (&log_lock, NULL) != 0)
- || (pthread_cond_init (&log_notify, NULL) != 0)) {
- return;
- }
-
- if (pthread_create (&log_thread, NULL, log_thread_function, (void*) NULL)
- != 0) {
- log_thread_finalize ();
- return;
- }
-
-#endif
-
-}
-
-//Call it after the last LOG call
-int
-log_thread_finalize (void)
-{
- int err = 0;
-
-#ifndef LOG_NO_THREAD
-
- if (pthread_mutex_lock (&log_lock) != 0) {
- return -1;
- }
-
- log_shutdown = 1;
-
- /* Wake up LOG thread */
- if ((pthread_cond_broadcast (&log_notify) != 0)
- || (pthread_mutex_unlock (&log_lock) != 0)) {
- err = -1;
- }
-
- if (pthread_join (log_thread, NULL) != 0) {
- err = -1;
- }
-
- if (pthread_mutex_unlock (&log_lock) != 0) {
- err = -1;
- }
-
- if (!err) {
- //log_list_free(&log_list);
- pthread_mutex_lock (&log_lock);
- pthread_mutex_destroy (&log_lock);
- pthread_cond_destroy (&log_notify);
- }
-
-#endif
-
- return err;
-}
-
-#if defined(ENABLE_ITTI)
-static void set_cli_start(module_id_t module_idP, uint8_t start)
-{
- if (module_idP < NB_eNB_INST) {
- oai_emulation.info.cli_start_enb[module_idP] = start;
- } else {
- oai_emulation.info.cli_start_ue[module_idP - NB_eNB_INST] = start;
- }
-}
-#endif
-
-#ifdef OPENAIR2
-int omv_write(int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_Flow_Unit omv_data)
-{
- module_id_t i;
- omv_data.end = 0;
-
- //omv_data.total_num_nodes = NB_UE_INST + NB_eNB_INST;
- for (i = 0; i < NB_eNB_INST; i++) {
- if (enb_node_list != NULL) {
- omv_data.geo[i].x = (enb_node_list->node->x_pos < 0.0) ? 0.0 : enb_node_list->node->x_pos;
- omv_data.geo[i].y = (enb_node_list->node->y_pos < 0.0) ? 0.0 : enb_node_list->node->y_pos;
- omv_data.geo[i].z = 1.0;
- omv_data.geo[i].mobility_type = oai_emulation.info.omg_model_enb;
- omv_data.geo[i].node_type = 0; //eNB
- enb_node_list = enb_node_list->next;
- omv_data.geo[i].Neighbors = 0;
-/*
- for (j = NB_RU; j < NB_UE_INST + NB_RU; j++) {
- if (is_UE_active (i, j - NB_RU) == 1) {
- omv_data.geo[i].Neighbor[omv_data.geo[i].Neighbors] = j;
- omv_data.geo[i].Neighbors++;
- LOG_D(
- OMG,
- "[RU %d][UE %d] is_UE_active(i,j) %d geo (x%d, y%d) num neighbors %d\n", i, j-NB_RU, is_UE_active(i,j-NB_RU), omv_data.geo[i].x, omv_data.geo[i].y, omv_data.geo[i].Neighbors);
- }
- }
-*/
- }
- }
-
- for (i = NB_RU; i < NB_UE_INST + NB_RU; i++) {
- if (ue_node_list != NULL) {
- omv_data.geo[i].x = (ue_node_list->node->x_pos < 0.0) ? 0.0 : ue_node_list->node->x_pos;
- omv_data.geo[i].y = (ue_node_list->node->y_pos < 0.0) ? 0.0 : ue_node_list->node->y_pos;
- omv_data.geo[i].z = 1.0;
- omv_data.geo[i].mobility_type = oai_emulation.info.omg_model_ue;
- omv_data.geo[i].node_type = 1; //UE
- //trial
- omv_data.geo[i].state = 1;
- omv_data.geo[i].rnti = 88;
- omv_data.geo[i].connected_eNB = 0;
- omv_data.geo[i].RSRP = 66;
- omv_data.geo[i].RSRQ = 55;
- omv_data.geo[i].Pathloss = 44;
- omv_data.geo[i].RSSI[0] = 33;
- omv_data.geo[i].RSSI[1] = 22;
-
- if ((sizeof(omv_data.geo[0].RSSI) / sizeof(omv_data.geo[0].RSSI[0])) > 2) {
- omv_data.geo[i].RSSI[2] = 11;
- }
-
- ue_node_list = ue_node_list->next;
- omv_data.geo[i].Neighbors = 0;
-/*
- for (j = 0; j < NB_RU; j++) {
- if (is_UE_active (j, i - NB_RU) == 1) {
- omv_data.geo[i].Neighbor[omv_data.geo[i].Neighbors] = j;
- omv_data.geo[i].Neighbors++;
- LOG_D(
- OMG,
- "[UE %d][RU %d] is_UE_active %d geo (x%d, y%d) num neighbors %d\n", i-NB_RU, j, is_UE_active(j,i-NB_RU), omv_data.geo[i].x, omv_data.geo[i].y, omv_data.geo[i].Neighbors);
- }
- }
-*/
- }
- }
-
- LOG_E(OMG, "pfd %d \n", pfd);
-
- if (write (pfd, &omv_data, sizeof(struct Data_Flow_Unit)) == -1)
- perror ("write omv failed");
-
- return 1;
-}
-
-void omv_end(int pfd, Data_Flow_Unit omv_data)
-{
- omv_data.end = 1;
-
- if (write (pfd, &omv_data, sizeof(struct Data_Flow_Unit)) == -1)
- perror ("write omv failed");
-}
-#endif
-
-#ifdef OPENAIR2
-int pfd[2]; // fd for omv : fixme: this could be a local var
-#endif
-
-#ifdef OPENAIR2
-static Data_Flow_Unit omv_data;
-#endif //ALU
-static module_id_t UE_inst = 0;
-static module_id_t eNB_inst = 0;
-static module_id_t ru_id;
-
-Packet_OTG_List_t *otg_pdcp_buffer;
-
-typedef enum l2l1_task_state_e {
- L2L1_WAITTING, L2L1_RUNNING, L2L1_TERMINATED,
-} l2l1_task_state_t;
-
-l2l1_task_state_t l2l1_state = L2L1_WAITTING;
-
-extern openair0_timestamp current_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs];
-extern openair0_timestamp current_UE_rx_timestamp[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
-extern openair0_timestamp last_eNB_rx_timestamp[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
-extern openair0_timestamp last_UE_rx_timestamp[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
-
-/*------------------------------------------------------------------------------*/
-void *
-l2l1_task (void *args_p)
-{
-
- int CC_id;
-
- // Framing variables
- int32_t sf;
-
- //char fname[64], vname[64];
-
- //#ifdef XFORMS
- // current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0)
- // at eNB 0, an UL scope for every UE
- FD_lte_phy_scope_ue *form_ue[MAX_NUM_CCs][NUMBER_OF_UE_MAX];
- FD_lte_phy_scope_enb *form_enb[NUMBER_OF_UE_MAX];
- char title[255];
- char xname[32] = "oaisim";
- int xargc = 1;
- char *xargv[1];
- //#endif
-
-#undef PRINT_STATS /* this undef is to avoid gcc warnings */
-#define PRINT_STATS
-#ifdef PRINT_STATS
- //int len;
- FILE *UE_stats[NUMBER_OF_UE_MAX];
- FILE *UE_stats_th[NUMBER_OF_UE_MAX];
- FILE *eNB_stats[NUMBER_OF_eNB_MAX];
- FILE *eNB_avg_thr;
- FILE *eNB_l2_stats;
- char UE_stats_filename[255];
- char eNB_stats_filename[255];
- char UE_stats_th_filename[255];
- char eNB_stats_th_filename[255];
-#endif
-
-
- if (xforms==1) {
- xargv[0] = xname;
- fl_initialize (&xargc, xargv, NULL, 0, 0);
- eNB_inst = 0;
- for (UE_inst = 0; UE_inst < NB_UE_INST; UE_inst++) {
- for (CC_id=0;CC_idlte_phy_scope_ue, FL_PLACE_HOTSPOT, FL_FULLBORDER, title);
-
- if (PHY_vars_UE_g[UE_inst][CC_id]->use_ia_receiver == 1) {
- fl_set_button(form_ue[CC_id][UE_inst]->button_0,1);
- fl_set_object_label(form_ue[CC_id][UE_inst]->button_0, "IA Receiver ON");
- fl_set_object_color(form_ue[CC_id][UE_inst]->button_0, FL_GREEN, FL_GREEN);
- }
-
- }
- }
- }
-
-
-#ifdef PRINT_STATS
-
- for (UE_inst=0; UE_inst 0) &&
- (oai_emulation.info.node_function[0] < NGFI_RAU_IF4p5)) {
- /* Wait for the initialize message */
- do {
- if (message_p != NULL) {
- result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
- AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
- }
-
- itti_receive_msg (TASK_L2L1, &message_p);
- msg_name = ITTI_MSG_NAME (message_p);
- LOG_I(EMU, "TASK_L2L1 received %s in state L2L1_WAITTING\n", msg_name);
-
- switch (ITTI_MSG_ID(message_p)) {
- case INITIALIZE_MESSAGE:
- l2l1_state = L2L1_RUNNING;
- start_eNB = 1;
- break;
-
- case ACTIVATE_MESSAGE:
- set_cli_start(ITTI_MSG_INSTANCE (message_p), 1);
- break;
-
- case DEACTIVATE_MESSAGE:
- set_cli_start(ITTI_MSG_INSTANCE (message_p), 0);
- break;
-
- case TERMINATE_MESSAGE:
- l2l1_state = L2L1_TERMINATED;
- break;
-
- default:
- LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
- break;
- }
- } while (l2l1_state == L2L1_WAITTING);
-
- result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
- AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
- }
-
-#endif
-
-
-
- start_meas (&oaisim_stats);
-
- for (frame = 0;
- (l2l1_state != L2L1_TERMINATED) &&
- ((oai_emulation.info.n_frames_flag == 0) ||
- (frame < oai_emulation.info.n_frames));
- frame++) {
-
-#if defined(ENABLE_ITTI)
-
- do {
- // Checks if a message has been sent to L2L1 task
- itti_poll_msg (TASK_L2L1, &message_p);
-
- if (message_p != NULL) {
- msg_name = ITTI_MSG_NAME (message_p);
- LOG_I(EMU, "TASK_L2L1 received %s\n", msg_name);
-
- switch (ITTI_MSG_ID(message_p)) {
- case ACTIVATE_MESSAGE:
- set_cli_start(ITTI_MSG_INSTANCE (message_p), 1);
- break;
-
- case DEACTIVATE_MESSAGE:
- set_cli_start(ITTI_MSG_INSTANCE (message_p), 0);
- break;
-
- case TERMINATE_MESSAGE:
- l2l1_state = L2L1_TERMINATED;
- break;
-
- case MESSAGE_TEST:
- break;
-
- default:
- LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
- break;
- }
-
- result = itti_free (ITTI_MSG_ORIGIN_ID(message_p), message_p);
- AssertFatal (result == EXIT_SUCCESS, "Failed to free memory (%d)!\n", result);
- }
- } while(message_p != NULL);
-
-#endif
-
- //Run the aperiodic user-defined events
- if (oai_emulation.info.oeh_enabled == 1)
- execute_events (frame);
-
- if (ue_connection_test == 1) {
- if ((frame % 20) == 0) {
- snr_dB += snr_direction;
- sinr_dB -= snr_direction;
- }
-
- if (snr_dB == -20) {
- snr_direction = snr_step;
- } else if (snr_dB == 20) {
- snr_direction = -snr_step;
- }
- }
-
- oai_emulation.info.frame = frame;
- //oai_emulation.info.time_ms += 1;
- oai_emulation.info.time_s += 0.01; // emu time in s, each frame lasts for 10 ms // JNote: TODO check the coherency of the time and frame (I corrected it to 10 (instead of 0.01)
-
- //update_omg (frame); // frequency is defined in the omg_global params configurable by the user
- //update_omg_ocm ();
-
-#ifdef OPENAIR2
-
- // check if pipe is still open
- if ((oai_emulation.info.omv_enabled == 1)) {
- omv_write (pfd[1], enb_node_list, ue_node_list, omv_data);
- }
-
-#endif
-
-
-
- for (sf = 0; sf < 10; sf++) {
- LOG_D(EMU,"************************* Subframe %d\n",sf);
- start_meas (&oaisim_stats_f);
-
- wait_for_slot_isr ();
-
-#if defined(ENABLE_ITTI)
- itti_update_lte_time(frame % MAX_FRAME_NUMBER, sf<<1);
-#endif
-
- oai_emulation.info.time_ms = frame * 10 + sf;
-
-#ifdef PROC
-
- if(Channel_Flag==1)
- Channel_Func(s_re2,s_im2,r_re2,r_im2,r_re02,r_im02,r_re0_d,r_im0_d,r_re0_u,r_im0_u,RU2UE,UE2RU,enb_data,ue_data,abstraction_flag,frame_parms,sf<<1);
-
- if(Channel_Flag==0)
-#endif
- { // SUBFRAME INNER PART
-#if defined(ENABLE_ITTI)
- log_set_instance_type (LOG_INSTANCE_ENB);
-#endif
-
-
- CC_id=0;
- int all_done=0;
- while (all_done==0) {
-
- pthread_mutex_lock(&subframe_mutex);
- int subframe_ru_mask_local = (subframe_select(&RC.ru[0]->frame_parms,(sf+4)%10)!=SF_UL) ? subframe_ru_mask : ((1<frame_parms.frame_type == FDD || subframe_select(&RC.ru[0]->frame_parms,(sf+4)%10)!=SF_DL) ? subframe_UE_mask : ((1<frame_parms.samples_per_tti;
- LOG_D(EMU,"RU %d/%d: TS %"PRIi64"\n",ru_id,CC_id,current_ru_rx_timestamp[ru_id][CC_id]);
- }
- for (UE_inst = 0; UE_instframe_parms.samples_per_tti;
- LOG_D(EMU,"UE %d/%d: TS %"PRIi64"\n",UE_inst,CC_id,current_UE_rx_timestamp[UE_inst][CC_id]);
- }
-
- for (eNB_inst = oai_emulation.info.first_enb_local;
- (eNB_inst
- < (oai_emulation.info.first_enb_local
- + oai_emulation.info.nb_enb_local));
- eNB_inst++) {
- if (oai_emulation.info.cli_start_enb[eNB_inst] != 0) {
-
- /*
- LOG_D(EMU,
- "PHY procedures eNB %d for frame %d, subframe %d TDD %d/%d Nid_cell %d\n",
- eNB_inst,
- frame % MAX_FRAME_NUMBER,
- sf,
- PHY_vars_eNB_g[eNB_inst][0]->frame_parms.frame_type,
- PHY_vars_eNB_g[eNB_inst][0]->frame_parms.tdd_config,
- PHY_vars_eNB_g[eNB_inst][0]->frame_parms.Nid_cell);
-
- */
-#ifdef PRINT_STATS
-
- if((sf==9) && frame%10==0)
- if(eNB_avg_thr)
- fprintf(eNB_avg_thr,"%d %d\n",RC.eNB[eNB_inst][0]->proc.proc_rxtx[sf&1].frame_tx,
- (RC.eNB[eNB_inst][0]->total_system_throughput)/((RC.eNB[eNB_inst][0]->proc.proc_rxtx[sf&1].frame_tx+1)*10));
- /*
- if (eNB_stats[eNB_inst]) {
- len = dump_eNB_stats(RC.eNB[eNB_inst][0], stats_buffer, 0);
- rewind (eNB_stats[eNB_inst]);
- fwrite (stats_buffer, 1, len, eNB_stats[eNB_inst]);
- fflush(eNB_stats[eNB_inst]);
- }
-#ifdef OPENAIR2
- if (eNB_l2_stats) {
- len = dump_eNB_l2_stats (stats_buffer, 0);
- rewind (eNB_l2_stats);
- fwrite (stats_buffer, 1, len, eNB_l2_stats);
- fflush(eNB_l2_stats);
- }
-
-#endif
-*/
-#endif
- }
- }// eNB_inst loop
-
-
-#if defined(ENABLE_ITTI)
- log_set_instance_type (LOG_INSTANCE_UE);
-#endif
-
-
- if ((sf == 0) && ((frame % MAX_FRAME_NUMBER) == 0) && (abstraction_flag == 0)
- && (oai_emulation.info.n_frames == 1)) {
-
- LOG_M ("dlchan0.m",
- "dlch0",
- &(PHY_vars_UE_g[0][0]->common_vars.common_vars_rx_data_per_thread[0].dl_ch_estimates[0][0][0]),
- (6
- * (PHY_vars_UE_g[0][0]->frame_parms.ofdm_symbol_size)),
- 1, 1);
- LOG_M ("dlchan1.m",
- "dlch1",
- &(PHY_vars_UE_g[0][0]->common_vars.common_vars_rx_data_per_thread[0].dl_ch_estimates[1][0][0]),
- (6
- * (PHY_vars_UE_g[0][0]->frame_parms.ofdm_symbol_size)),
- 1, 1);
- LOG_M ("dlchan2.m",
- "dlch2",
- &(PHY_vars_UE_g[0][0]->common_vars.common_vars_rx_data_per_thread[0].dl_ch_estimates[2][0][0]),
- (6
- * (PHY_vars_UE_g[0][0]->frame_parms.ofdm_symbol_size)),
- 1, 1);
- LOG_M ("pbch_rxF_comp0.m",
- "pbch_comp0",
- PHY_vars_UE_g[0][0]->pbch_vars[0]->rxdataF_comp[0],
- 6 * 12 * 4, 1, 1);
- LOG_M ("pbch_rxF_llr.m", "pbch_llr",
- PHY_vars_UE_g[0][0]->pbch_vars[0]->llr,
- (PHY_vars_UE_g[0][0]->frame_parms.Ncp == 0) ? 1920 : 1728, 1,
- 4);
- }
-
- stop_meas (&oaisim_stats_f);
- } // SUBFRAME INNER PART
-
-
- }
- //update_ocm ();
- /*
- if ((frame >= 10) && (frame <= 11) && (abstraction_flag == 0)
-#ifdef PROC
- &&(Channel_Flag==0)
-#endif
- ) {
- sprintf (fname, "UEtxsig%d.m", frame % MAX_FRAME_NUMBER);
- sprintf (vname, "txs%d", frame % MAX_FRAME_NUMBER);
- LOG_M (fname,
- vname,
- PHY_vars_UE_g[0][0]->common_vars.txdata[0],
- PHY_vars_UE_g[0][0]->frame_parms.samples_per_tti
- * 10,
- 1, 1);
- sprintf (fname, "eNBtxsig%d.m", frame % MAX_FRAME_NUMBER);
- sprintf (vname, "txs%d", frame % MAX_FRAME_NUMBER);
- LOG_M (fname,
- vname,
- PHY_vars_eNB_g[0][0]->common_vars.txdata[0][0],
- PHY_vars_UE_g[0][0]->frame_parms.samples_per_tti
- * 10,
- 1, 1);
- sprintf (fname, "eNBtxsigF%d.m", frame % MAX_FRAME_NUMBER);
- sprintf (vname, "txsF%d", frame % MAX_FRAME_NUMBER);
- LOG_M (fname,
- vname,
- PHY_vars_eNB_g[0][0]->common_vars.txdataF[0][0],
- PHY_vars_eNB_g[0][0]->frame_parms.symbols_per_tti
- * PHY_vars_eNB_g[0][0]->frame_parms.ofdm_symbol_size,
- 1, 1);
- sprintf (fname, "UErxsig%d.m", frame % MAX_FRAME_NUMBER);
- sprintf (vname, "rxs%d", frame % MAX_FRAME_NUMBER);
- LOG_M (fname,
- vname,
- PHY_vars_UE_g[0][0]->common_vars.rxdata[0],
- PHY_vars_UE_g[0][0]->frame_parms.samples_per_tti
- * 10,
- 1, 1);
- sprintf (fname, "eNBrxsig%d.m", frame % MAX_FRAME_NUMBER);
- sprintf (vname, "rxs%d", frame % MAX_FRAME_NUMBER);
- LOG_M (fname,
- vname,
- PHY_vars_eNB_g[0][0]->common_vars.rxdata[0][0],
- PHY_vars_UE_g[0][0]->frame_parms.samples_per_tti
- * 10,
- 1, 1);
- }
- */
-
- //#ifdef XFORMS
- if (xforms==1) {
- eNB_inst = 0;
-
- for (UE_inst = 0; UE_inst < NB_UE_INST; UE_inst++) {
- for (CC_id=0;CC_id0) {
- pthread_cond_wait(&RC.ru_cond,&RC.ru_mutex);
- }
-
- // copy frame parameters from RU to UEs
- for (i=0;iframe_parms.N_RB_DL = RC.ru[0]->frame_parms.N_RB_DL;
- PHY_vars_UE_g[i][0]->frame_parms.N_RB_UL = RC.ru[0]->frame_parms.N_RB_UL;
- PHY_vars_UE_g[i][0]->frame_parms.nb_antennas_tx = 1;
- PHY_vars_UE_g[i][0]->frame_parms.nb_antennas_rx = 1;
- // set initially to 2, it will be revised after initial synchronization
- PHY_vars_UE_g[i][0]->frame_parms.nb_antenna_ports_eNB = 2;
- PHY_vars_UE_g[i][0]->frame_parms.tdd_config = 1;
- PHY_vars_UE_g[i][0]->frame_parms.dl_CarrierFreq = RC.ru[0]->frame_parms.dl_CarrierFreq;
- PHY_vars_UE_g[i][0]->frame_parms.ul_CarrierFreq = RC.ru[0]->frame_parms.ul_CarrierFreq;
- PHY_vars_UE_g[i][0]->frame_parms.eutra_band = RC.ru[0]->frame_parms.eutra_band;
- LOG_I(PHY,"Initializing UE %d frame parameters from RU information: N_RB_DL %d, p %d, dl_Carrierfreq %u, ul_CarrierFreq %u, eutra_band %d\n",
- i,
- PHY_vars_UE_g[i][0]->frame_parms.N_RB_DL,
- PHY_vars_UE_g[i][0]->frame_parms.nb_antenna_ports_eNB,
- PHY_vars_UE_g[i][0]->frame_parms.dl_CarrierFreq,
- PHY_vars_UE_g[i][0]->frame_parms.ul_CarrierFreq,
- PHY_vars_UE_g[i][0]->frame_parms.eutra_band);
-
- current_UE_rx_timestamp[i][0] = RC.ru[0]->frame_parms.samples_per_tti + RC.ru[0]->frame_parms.ofdm_symbol_size + RC.ru[0]->frame_parms.nb_prefix_samples0;
-
- }
-
-
-
-
- for (ru_id=0;ru_idframe_parms.samples_per_tti;
-
- printf("RUs are ready, let's go\n");
-}
-
-void init_UE(int,int,int,int);
-void init_RU(const char*);
-
-void set_UE_defaults(int nb_ue) {
-
- for (int UE_id = 0;UE_idpdcch_vars[i][0]->dciFormat = 0;
- PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[i][0]->agregationLevel = 0xFF;
- }
- PHY_vars_UE_g[UE_id][CC_id]->current_dlsch_cqi[0] = 10;
- PHY_vars_UE_g[UE_id][CC_id]->tx_power_max_dBm = 23;
- }
- }
-}
-
-
-static void print_current_directory(void)
-{
- char dir[8192]; /* arbitrary size (should be big enough) */
- if (getcwd(dir, 8192) == NULL)
- printf("ERROR getting working directory\n");
- else
- printf("working directory: %s\n", dir);
-}
-
-void init_devices(void);
-
-int main (int argc, char **argv)
-{
-
- clock_t t;
-
- print_current_directory();
-
- start_background_system();
-
-#ifdef SMBV
- // Rohde&Schwarz SMBV100A vector signal generator
- strcpy(smbv_ip,DEFAULT_SMBV_IP);
-#endif
-
-#ifdef PROC
- int node_id;
- int port,Process_Flag=0,wgt,Channel_Flag=0,temp;
-#endif
-
- //default parameters
- oai_emulation.info.n_frames = MAX_FRAME_NUMBER; //1024; //10;
- oai_emulation.info.n_frames_flag = 0; //fixme
- snr_dB = 30;
- NB_UE_INST = 1;
-
- //Default values if not changed by the user in get_simulation_options();
- pdcp_period = 1;
- omg_period = 1;
- //Clean ip rule table
- for(int i =0; i>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU initialization done <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");
-
-#ifndef PACKAGE_VERSION
-# define PACKAGE_VERSION "UNKNOWN-EXPERIMENTAL"
-#endif
- LOG_I(EMU, "Version: %s\n", PACKAGE_VERSION);
-
-#if defined(ENABLE_ITTI)
-
- // Handle signals until all tasks are terminated
- itti_wait_tasks_end();
-
-#else
-
- if (oai_emulation.info.nb_enb_local > 0) {
- eNB_app_task (NULL); // do nothing for the moment
- }
-
- l2l1_task (NULL);
-#endif
- t = clock () - t;
- LOG_I(EMU, "Duration of the simulation: %f seconds\n",
- ((float) t) / CLOCKS_PER_SEC);
-
- LOG_N(EMU,
- ">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU Ending <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");
-
- raise (SIGINT);
- // oai_shutdown ();
-
- return (0);
-}
-
-void
-reset_opp_meas_oaisim (void)
-{
- uint8_t eNB_id = 0, UE_id = 0;
-
- reset_meas (&oaisim_stats);
- reset_meas (&oaisim_stats_f); // frame
-
- // init time stats here (including channel)
- reset_meas (&dl_chan_stats);
- reset_meas (&ul_chan_stats);
-
- for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
- reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc[0]);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc[1]);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[0]);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[1]);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_tx);
-
- // reset_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_demod_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->rx_dft_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_channel_estimation_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_freq_offset_estimation_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[0]);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[1]);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_rate_unmatching_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_turbo_decoding_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_deinterleaving_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_llr_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_unscrambling_stats);
-
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_init_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_alpha_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_beta_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_gamma_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_ext_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_intl1_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_intl2_stats);
-
- reset_meas (&PHY_vars_UE_g[UE_id][0]->tx_prach);
-
- reset_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_mod_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_encoding_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_modulation_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_segmentation_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_rate_matching_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_turbo_encoding_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_interleaving_stats);
- reset_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_multiplexing_stats);
-
-
- /*
- * L2 functions
- */
-
- // UE MAC
- reset_meas (&UE_mac_inst[UE_id].ue_scheduler); // total
- reset_meas (&UE_mac_inst[UE_id].tx_ulsch_sdu); // inlcude rlc_data_req + mac header gen
- reset_meas (&UE_mac_inst[UE_id].rx_dlsch_sdu); // include mac_rrc_data_ind or mac_rlc_status_ind+mac_rlc_data_ind and mac header parser
- reset_meas (&UE_mac_inst[UE_id].ue_query_mch);
- reset_meas (&UE_mac_inst[UE_id].rx_mch_sdu); // include rld_data_ind+ parse mch header
- reset_meas (&UE_mac_inst[UE_id].rx_si); // include rlc_data_ind + mac header parser
-
- reset_meas (&UE_pdcp_stats[UE_id].pdcp_run);
- reset_meas (&UE_pdcp_stats[UE_id].data_req);
- reset_meas (&UE_pdcp_stats[UE_id].data_ind);
- reset_meas (&UE_pdcp_stats[UE_id].apply_security);
- reset_meas (&UE_pdcp_stats[UE_id].validate_security);
- reset_meas (&UE_pdcp_stats[UE_id].pdcp_ip);
- reset_meas (&UE_pdcp_stats[UE_id].ip_pdcp);
-
-
- }
-
- for (eNB_id = 0; eNB_id < NB_eNB_INST; eNB_id++) {
-
- for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
- reset_meas (&RU2UE[eNB_id][UE_id][0]->random_channel);
- reset_meas (&RU2UE[eNB_id][UE_id][0]->interp_time);
- reset_meas (&RU2UE[eNB_id][UE_id][0]->interp_freq);
- reset_meas (&RU2UE[eNB_id][UE_id][0]->convolution);
- reset_meas (&UE2RU[UE_id][eNB_id][0]->random_channel);
- reset_meas (&UE2RU[UE_id][eNB_id][0]->interp_time);
- reset_meas (&UE2RU[UE_id][eNB_id][0]->interp_freq);
- reset_meas (&UE2RU[UE_id][eNB_id][0]->convolution);
- }
-
- reset_meas (&RC.eNB[eNB_id][0]->phy_proc);
- reset_meas (&RC.eNB[eNB_id][0]->phy_proc_rx);
- reset_meas (&RC.eNB[eNB_id][0]->phy_proc_tx);
- reset_meas (&RC.eNB[eNB_id][0]->rx_prach);
-
- reset_meas (&RC.eNB[eNB_id][0]->ofdm_mod_stats);
- reset_meas (&RC.eNB[eNB_id][0]->dlsch_encoding_stats);
- reset_meas (&RC.eNB[eNB_id][0]->dlsch_modulation_stats);
- reset_meas (&RC.eNB[eNB_id][0]->dlsch_scrambling_stats);
- reset_meas (&RC.eNB[eNB_id][0]->dlsch_rate_matching_stats);
- reset_meas (&RC.eNB[eNB_id][0]->dlsch_turbo_encoding_stats);
- reset_meas (&RC.eNB[eNB_id][0]->dlsch_interleaving_stats);
-
- // reset_meas (&RC.eNB[eNB_id][0]->ofdm_demod_stats);
- //reset_meas(&RC.eNB[eNB_id]->rx_dft_stats);
- //reset_meas(&RC.eNB[eNB_id]->ulsch_channel_estimation_stats);
- //reset_meas(&RC.eNB[eNB_id]->ulsch_freq_offset_estimation_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_decoding_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_demodulation_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_rate_unmatching_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_turbo_decoding_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_deinterleaving_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_demultiplexing_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_llr_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_tc_init_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_tc_alpha_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_tc_beta_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_tc_gamma_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_tc_ext_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_tc_intl1_stats);
- reset_meas (&RC.eNB[eNB_id][0]->ulsch_tc_intl2_stats);
-#ifdef LOCALIZATION
- reset_meas(&RC.eNB[eNB_id][0]->localization_stats);
-#endif
-
- /*
- * L2 functions
- */
- // eNB MAC
- reset_meas (&RC.mac[eNB_id]->eNB_scheduler); // total
- reset_meas (&RC.mac[eNB_id]->schedule_si); // only schedule + tx
- reset_meas (&RC.mac[eNB_id]->schedule_ra); // only ra
- reset_meas (&RC.mac[eNB_id]->schedule_ulsch); // onlu ulsch
- reset_meas (&RC.mac[eNB_id]->fill_DLSCH_dci); // only dci
- reset_meas (&RC.mac[eNB_id]->schedule_dlsch_preprocessor); // include rlc_data_req + MAC header gen
- reset_meas (&RC.mac[eNB_id]->schedule_dlsch); // include rlc_data_req + MAC header gen + pre-processor
- reset_meas (&RC.mac[eNB_id]->schedule_mch); // only embms
- reset_meas (&RC.mac[eNB_id]->rx_ulsch_sdu); // include rlc_data_ind + mac header parser
-
- reset_meas (&eNB_pdcp_stats[eNB_id].pdcp_run);
- reset_meas (&eNB_pdcp_stats[eNB_id].data_req);
- reset_meas (&eNB_pdcp_stats[eNB_id].data_ind);
- reset_meas (&eNB_pdcp_stats[eNB_id].apply_security);
- reset_meas (&eNB_pdcp_stats[eNB_id].validate_security);
- reset_meas (&eNB_pdcp_stats[eNB_id].pdcp_ip);
- reset_meas (&eNB_pdcp_stats[eNB_id].ip_pdcp);
-
- }
-}
-
-void
-print_opp_meas_oaisim (void)
-{
-
- uint8_t eNB_id = 0, UE_id = 0;
-
- print_meas (&oaisim_stats, "[OAI][total_exec_time]", &oaisim_stats,
- &oaisim_stats);
- print_meas (&oaisim_stats_f, "[OAI][SF_exec_time]", &oaisim_stats,
- &oaisim_stats_f);
-
- print_meas (&dl_chan_stats, "[DL][chan_stats]", &oaisim_stats,
- &oaisim_stats_f);
- print_meas (&ul_chan_stats, "[UL][chan_stats]", &oaisim_stats,
- &oaisim_stats_f);
-
- for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
- for (ru_id = 0; ru_id < NB_RU; ru_id++) {
- print_meas (&RU2UE[ru_id][UE_id][0]->random_channel,
- "[DL][random_channel]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RU2UE[ru_id][UE_id][0]->interp_time,
- "[DL][interp_time]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RU2UE[ru_id][UE_id][0]->interp_freq,
- "[DL][interp_freq]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RU2UE[ru_id][UE_id][0]->convolution,
- "[DL][convolution]", &oaisim_stats, &oaisim_stats_f);
-
- print_meas (&UE2RU[UE_id][ru_id][0]->random_channel,
- "[UL][random_channel]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE2RU[UE_id][ru_id][0]->interp_time,
- "[UL][interp_time]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE2RU[UE_id][ru_id][0]->interp_freq,
- "[UL][interp_freq]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE2RU[UE_id][ru_id][0]->convolution,
- "[UL][convolution]", &oaisim_stats, &oaisim_stats_f);
- }
- }
-
- for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
- print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc[0], "[UE][total_phy_proc[0]]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc[1], "[UE][total_phy_proc[1]]",
- &oaisim_stats, &oaisim_stats_f);
-
-
- print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[0],
- "[UE][total_phy_proc_rx[0]]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_rx[1],
- "[UE][total_phy_proc_rx[1]]", &oaisim_stats, &oaisim_stats_f);
- // print_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_demod_stats,
- // "[UE][ofdm_demod]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->rx_dft_stats, "[UE][rx_dft]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_channel_estimation_stats,
- "[UE][channel_est]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_freq_offset_estimation_stats,
- "[UE][freq_offset]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_llr_stats, "[UE][llr]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_unscrambling_stats,
- "[UE][unscrambling]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[0],
- "[UE][decoding[0]]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_decoding_stats[1],
- "[UE][decoding[1]]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_rate_unmatching_stats,
- "[UE][rate_unmatching]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_deinterleaving_stats,
- "[UE][deinterleaving]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_turbo_decoding_stats,
- "[UE][turbo_decoding]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_init_stats,
- "[UE][ |_tc_init]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_alpha_stats,
- "[UE][ |_tc_alpha]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_beta_stats,
- "[UE][ |_tc_beta]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_gamma_stats,
- "[UE][ |_tc_gamma]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_ext_stats,
- "[UE][ |_tc_ext]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_intl1_stats,
- "[UE][ |_tc_intl1]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->dlsch_tc_intl2_stats,
- "[UE][ |_tc_intl2]", &oaisim_stats, &oaisim_stats_f);
-
- print_meas (&PHY_vars_UE_g[UE_id][0]->phy_proc_tx,
- "[UE][total_phy_proc_tx]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->ofdm_mod_stats, "[UE][ofdm_mod]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_modulation_stats,
- "[UE][modulation]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_encoding_stats,
- "[UE][encoding]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_segmentation_stats,
- "[UE][segmentation]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_rate_matching_stats,
- "[UE][rate_matching]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_turbo_encoding_stats,
- "[UE][turbo_encoding]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_interleaving_stats,
- "[UE][interleaving]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&PHY_vars_UE_g[UE_id][0]->ulsch_multiplexing_stats,
- "[UE][multiplexing]", &oaisim_stats, &oaisim_stats_f);
-
- }
-
- for (eNB_id = 0; eNB_id < NB_eNB_INST; eNB_id++) {
- print_meas (&RC.eNB[eNB_id][0]->phy_proc,
- "[eNB][total_phy_proc]", &oaisim_stats, &oaisim_stats_f);
-
- print_meas (&RC.eNB[eNB_id][0]->phy_proc_tx,
- "[eNB][total_phy_proc_tx]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ofdm_mod_stats,
- "[eNB][ofdm_mod]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->dlsch_modulation_stats,
- "[eNB][modulation]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->dlsch_scrambling_stats,
- "[eNB][scrambling]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->dlsch_encoding_stats,
- "[eNB][encoding]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->dlsch_interleaving_stats,
- "[eNB][|_interleaving]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->dlsch_rate_matching_stats,
- "[eNB][|_rate_matching]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->dlsch_turbo_encoding_stats,
- "[eNB][|_turbo_encoding]", &oaisim_stats, &oaisim_stats_f);
-
- print_meas (&RC.eNB[eNB_id][0]->phy_proc_rx,
- "[eNB][total_phy_proc_rx]", &oaisim_stats, &oaisim_stats_f);
- // print_meas (&RC.eNB[eNB_id][0]->ofdm_demod_stats,
- // "[eNB][ofdm_demod]", &oaisim_stats, &oaisim_stats_f);
- //print_meas(&RC.eNB[eNB_id][0]->ulsch_channel_estimation_stats,"[eNB][channel_est]");
- //print_meas(&RC.eNB[eNB_id][0]->ulsch_freq_offset_estimation_stats,"[eNB][freq_offset]");
- //print_meas(&RC.eNB[eNB_id][0]->rx_dft_stats,"[eNB][rx_dft]");
- print_meas (&RC.eNB[eNB_id][0]->ulsch_demodulation_stats,
- "[eNB][demodulation]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_decoding_stats,
- "[eNB][decoding]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_deinterleaving_stats,
- "[eNB][|_deinterleaving]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_demultiplexing_stats,
- "[eNB][|_demultiplexing]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_rate_unmatching_stats,
- "[eNB][|_rate_unmatching]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_turbo_decoding_stats,
- "[eNB][|_turbo_decoding]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_tc_init_stats,
- "[eNB][ |_tc_init]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_tc_alpha_stats,
- "[eNB][ |_tc_alpha]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_tc_beta_stats,
- "[eNB][ |_tc_beta]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_tc_gamma_stats,
- "[eNB][ |_tc_gamma]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_tc_ext_stats,
- "[eNB][ |_tc_ext]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_tc_intl1_stats,
- "[eNB][ |_tc_intl1]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.eNB[eNB_id][0]->ulsch_tc_intl2_stats,
- "[eNB][ |_tc_intl2]", &oaisim_stats, &oaisim_stats_f);
-
- print_meas (&RC.eNB[eNB_id][0]->rx_prach, "[eNB][rx_prach]",
- &oaisim_stats, &oaisim_stats_f);
-
-#ifdef LOCALIZATION
- print_meas(&RC.eNB[eNB_id][0]->localization_stats, "[eNB][LOCALIZATION]",&oaisim_stats,&oaisim_stats_f);
-#endif
- }
-
- for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
-
- print_meas (&UE_mac_inst[UE_id].ue_scheduler, "[UE][mac_scheduler]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE_mac_inst[UE_id].tx_ulsch_sdu, "[UE][tx_ulsch_sdu]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE_mac_inst[UE_id].rx_dlsch_sdu, "[UE][rx_dlsch_sdu]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE_mac_inst[UE_id].ue_query_mch, "[UE][query_MCH]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE_mac_inst[UE_id].rx_mch_sdu, "[UE][rx_mch_sdu]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE_mac_inst[UE_id].rx_si, "[UE][rx_si]", &oaisim_stats,
- &oaisim_stats_f);
-
- print_meas (&UE_pdcp_stats[UE_id].pdcp_run, "[UE][total_pdcp_run]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE_pdcp_stats[UE_id].data_req, "[UE][DL][pdcp_data_req]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE_pdcp_stats[UE_id].data_ind, "[UE][UL][pdcp_data_ind]",
- &oaisim_stats, &oaisim_stats_f);
-
- print_meas (&UE_pdcp_stats[UE_id].apply_security,
- "[UE][DL][apply_security]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE_pdcp_stats[UE_id].validate_security,
- "[UE][UL][validate_security]", &oaisim_stats,
- &oaisim_stats_f);
- print_meas (&UE_pdcp_stats[UE_id].ip_pdcp, "[UE][DL][ip_pdcp]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&UE_pdcp_stats[UE_id].pdcp_ip, "[UE][UL][pdcp_ip]",
- &oaisim_stats, &oaisim_stats_f);
-
- }
-
- for (eNB_id = 0; eNB_id < NB_eNB_INST; eNB_id++) {
-
- print_meas (&RC.mac[eNB_id]->eNB_scheduler, "[eNB][mac_scheduler]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.mac[eNB_id]->schedule_si, "[eNB][DL][SI]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.mac[eNB_id]->schedule_ra, "[eNB][DL][RA]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.mac[eNB_id]->fill_DLSCH_dci,
- "[eNB][DL/UL][fill_DCI]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.mac[eNB_id]->schedule_dlsch_preprocessor,
- "[eNB][DL][preprocessor]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.mac[eNB_id]->schedule_dlsch,
- "[eNB][DL][schedule_tx_dlsch]", &oaisim_stats,
- &oaisim_stats_f);
- print_meas (&RC.mac[eNB_id]->schedule_mch, "[eNB][DL][mch]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.mac[eNB_id]->schedule_ulsch, "[eNB][UL][ULSCH]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&RC.mac[eNB_id]->rx_ulsch_sdu,
- "[eNB][UL][rx_ulsch_sdu]", &oaisim_stats, &oaisim_stats_f);
-
- print_meas (&eNB_pdcp_stats[eNB_id].pdcp_run, "[eNB][pdcp_run]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&eNB_pdcp_stats[eNB_id].data_req,
- "[eNB][DL][pdcp_data_req]", &oaisim_stats, &oaisim_stats_f);
- print_meas (&eNB_pdcp_stats[eNB_id].data_ind,
- "[eNB][UL][pdcp_data_ind]", &oaisim_stats, &oaisim_stats_f);
-
- print_meas (&eNB_pdcp_stats[eNB_id].apply_security,
- "[eNB][DL][apply_security]", &oaisim_stats,
- &oaisim_stats_f);
- print_meas (&eNB_pdcp_stats[eNB_id].validate_security,
- "[eNB][UL][validate_security]", &oaisim_stats,
- &oaisim_stats_f);
- print_meas (&eNB_pdcp_stats[eNB_id].ip_pdcp, "[eNB][DL][ip_pdcp]",
- &oaisim_stats, &oaisim_stats_f);
- print_meas (&eNB_pdcp_stats[eNB_id].pdcp_ip, "[eNB][UL][pdcp_ip]",
- &oaisim_stats, &oaisim_stats_f);
-
- }
-
-}
-
-#if !defined(ENABLE_ITTI)
-static void *
-sigh (void *arg)
-{
-
- int signum;
- sigset_t sigcatch;
- sigemptyset (&sigcatch);
- sigaddset (&sigcatch, SIGHUP);
- sigaddset (&sigcatch, SIGINT);
- sigaddset (&sigcatch, SIGTERM);
- sigaddset (&sigcatch, SIGQUIT);
-
- for (;;) {
- sigwait (&sigcatch, &signum);
-
- //sigwait(&sigblock, &signum);
- switch (signum) {
- case SIGHUP:
- case SIGINT:
- case SIGTERM:
- case SIGQUIT:
- fprintf (stderr, "received signal %d \n", signum);
- // no need for mutx: when ITTI not used, this variable is only accessed by this function
- l2l1_state = L2L1_TERMINATED;
- break;
-
- default:
- fprintf (stderr, "Unexpected signal %d \n", signum);
- exit (-1);
- break;
- }
- }
-
- pthread_exit (NULL);
-}
-#endif /* !defined(ENABLE_ITTI) */
-
-void
-oai_shutdown (void)
-{
- static int done = 0;
-
- if (done)
- return;
-
- free (otg_pdcp_buffer);
- otg_pdcp_buffer = 0;
-
-#ifdef SMBV
-
- // Rohde&Schwarz SMBV100A vector signal generator
- if (config_smbv) {
- smbv_send_config (smbv_fname,smbv_ip);
- }
-
-#endif
-
- if (oai_emulation.info.opp_enabled == 1)
- print_opp_meas_oaisim ();
-
-
-#ifdef PROC
-
- if (abstraction_flag == 0 && Channel_Flag==0 && Process_Flag==0)
-#else
- if (abstraction_flag == 0)
-#endif
- {
- /*
- #ifdef IFFT_FPGA
- free(txdataF2[0]);
- free(txdataF2[1]);
- free(txdataF2);
- free(txdata[0]);
- free(txdata[1]);
- free(txdata);
- #endif
- */
- /*
- for (int i = 0; i < 2; i++) {
- free (s_re[i]);
- free (s_im[i]);
- free (r_re[i]);
- free (r_im[i]);
- }
-
- free (s_re);
- free (s_im);
- free (r_re);
- free (r_im);
- s_re = 0;
- s_im = 0;
- r_re = 0;
- r_im = 0;*/
-
- lte_sync_time_free ();
- }
-
- // added for PHY abstraction
- if (oai_emulation.info.ocm_enabled == 1) {
- for (eNB_inst = 0; eNB_inst < NUMBER_OF_eNB_MAX; eNB_inst++) {
- free (enb_data[eNB_inst]);
- enb_data[eNB_inst] = 0;
- }
-
- for (UE_inst = 0; UE_inst < NUMBER_OF_UE_MAX; UE_inst++) {
- free (ue_data[UE_inst]);
- ue_data[UE_inst] = 0;
- }
- } //End of PHY abstraction changes
-
-
- if ((oai_emulation.info.ocm_enabled == 1) && (ethernet_flag == 0)
- && (ShaF != NULL)) {
- destroyMat (ShaF, map1, map2);
- ShaF = 0;
- }
-
- if (opt_enabled == 1)
- terminate_opt ();
-
- for (int i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++)
- if (oai_emulation.info.oai_ifup[i] == 1) {
- char interfaceName[8];
- snprintf (interfaceName, sizeof(interfaceName), "oai%d", i);
- bringInterfaceUp (interfaceName, 0);
- }
-
- log_thread_finalize ();
- logClean ();
- VCD_SIGNAL_DUMPER_CLOSE ();
-
- done = 1; // prevent next invokation of this function
-
- LOG_N(EMU,
- ">>>>>>>>>>>>>>>>>>>>>>>>>>> OAIEMU shutdown <<<<<<<<<<<<<<<<<<<<<<<<<<\n\n");
-}
-
-eNB_MAC_INST*
-get_eNB_mac_inst (module_id_t module_idP)
-{
- return (RC.mac[module_idP]);
-}
-
-OAI_Emulation*
-get_OAI_emulation ()
-{
- return &oai_emulation;
-}
-
-
-// dummy function declarations
-
-void *rrc_enb_task(void *args_p)
-{
- return NULL;
-}
-
diff --git a/targets/SIMU/USER/oaisim.h b/targets/SIMU/USER/oaisim.h
deleted file mode 100644
index 1ddc093983..0000000000
--- a/targets/SIMU/USER/oaisim.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "SIMULATION/TOOLS/sim.h"
-#include "SIMULATION/RF/rf.h"
-#include "PHY/types.h"
-#include "PHY/defs_eNB.h"
-#include "PHY/defs_UE.h"
-#include "oaisim_config.h"
-#include "init_lte.h"
-
-#ifdef OPENAIR2
-#include "LAYER2/MAC/mac.h"
-#include "UTIL/OMV/structures.h"
-#endif
-
-eNB_MAC_INST* get_eNB_mac_inst(module_id_t module_idP);
-OAI_Emulation* get_OAI_emulation(void);
-void init_channel_vars(LTE_DL_FRAME_PARMS *frame_parms, double ***s_re,double ***s_im,double ***r_re,double ***r_im,double ***r_re0,double ***r_im0);
-
-void do_UL_sig(channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM_CCs],
- node_desc_t *enb_data[NUMBER_OF_RU_MAX],node_desc_t *ue_data[NUMBER_OF_UE_MAX],
- uint16_t subframe,uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,
- uint32_t frame,int eNB_id,uint8_t CC_id);
-
-void do_DL_sig(channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs],
- node_desc_t *enb_data[NUMBER_OF_RU_MAX],
- node_desc_t *ue_data[NUMBER_OF_UE_MAX],
- uint16_t subframe,
- uint32_t offset,
- uint32_t length,
- uint8_t abstraction_flag,LTE_DL_FRAME_PARMS *frame_parms,uint8_t UE_id,int CC_id);
-
-void init_ue(node_desc_t *ue_data, UE_Antenna ue_ant);//Abstraction changes
-void init_enb(node_desc_t *enb_data, eNB_Antenna enb_ant);//Abstraction changes
-void extract_position(node_list* input_node_list, node_desc_t**, int nb_nodes);//Abstraction changes
-void get_beta_map(void);//Abstraction changes
-void get_MIESM_param(void);
-
-void init_snr(channel_desc_t *, node_desc_t *, node_desc_t *, double*, double*, uint8_t, uint16_t, uint8_t, uint16_t);//Abstraction changes
-void init_snr_up(channel_desc_t *, node_desc_t *, node_desc_t *, double*, double*, uint16_t, uint16_t);//Abstraction changes
-void calculate_sinr(channel_desc_t *, node_desc_t *, node_desc_t *, double *sinr_dB, uint16_t);//Abstraction changes
-void get_beta_map(void);
-int dlsch_abstraction_EESM(double* sinr_dB, uint32_t rb_alloc[4], uint8_t mcs, uint8_t); //temporary testing for PHY abstraction
-int dlsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint32_t rb_alloc[4], uint8_t mcs,uint8_t);
-int ulsch_abstraction_MIESM(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nb_rb, uint16_t first_rb);
-int ulsch_abstraction(double* sinr_dB,uint8_t TM, uint8_t mcs,uint16_t nb_rb, uint16_t first_rb);
-
-void calc_path_loss(node_desc_t* node_tx, node_desc_t* node_rx, channel_desc_t *ch_desc, Environment_System_Config env_desc, double **SF);
-
-void do_OFDM_mod(int32_t **txdataF, int32_t **txdata, frame_t frame, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms);
-
-void reset_opp_meas(void);
-void print_opp_meas(void);
-
-#ifdef OPENAIR2
-int omv_write (int pfd, node_list* enb_node_list, node_list* ue_node_list, Data_Flow_Unit omv_data);
-void omv_end (int pfd, Data_Flow_Unit omv_data);
-#endif
-
-
-
-
-
-
-
-
diff --git a/targets/SIMU/USER/oaisim_config.c b/targets/SIMU/USER/oaisim_config.c
deleted file mode 100644
index 17ed9ff571..0000000000
--- a/targets/SIMU/USER/oaisim_config.c
+++ /dev/null
@@ -1,1349 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-/*! \file oaisim_config.c
-* \brief Configuration of oaisim
-* \author Navid Nikaein
-* \date 2013-2015
-* \version 1.0
-* \company Eurecom
-* \email: openair_tech@eurecom.fr
-* \note
-* \warning
-*/
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include "oaisim_config.h"
-#include "OCG.h"
-#include "OCG_extern.h"
-#include "UTIL/OMG/omg.h"
-#include "UTIL/OMG/grid.h"
-#include "UTIL/OTG/otg_tx.h"
-#include "UTIL/OTG/otg.h"
-#include "UTIL/OTG/otg_externs.h"
-#include "oml.h"
-#include "msc.h"
-#if ENABLE_RAL
-#include "lteRALenb.h"
-#include "lteRALue.h"
-#endif
-
-#if defined(ENABLE_ITTI)
-# include "intertask_interface_init.h"
-#endif
-
-
-mapping omg_model_names[] = {
- {"STATIC", STATIC},
- {"RWP", RWP},
- {"RWALK", RWALK},
- {"TRACE", TRACE},
- {"SUMO", SUMO},
- {"STEADY_RWP", STEADY_RWP},
- {"MAX_NUM_MOB_TYPES", MAX_NUM_MOB_TYPES},
- {NULL, -1}
-};
-// subtypes for RWP in grid map
-mapping omg_rwp_names[] = {
- {"MIN_RWP_TYPES", MIN_RWP_TYPES},
- {"RESTRICTED_RWP",RESTIRICTED_RWP},
- {"CONNECTED_DOMAIN", CONNECTED_DOMAIN},
- {"MAX_RWP_TYPES", MAX_RWP_TYPES},
- {NULL, -1}
-};
-
-void ocg_config_proto(void);
-
-void init_oai_emulation(void)
-{
-
- int i;
- int CC_id;
-
- oai_emulation.environment_system_config.fading.large_scale.selected_option = "free_space";
- oai_emulation.environment_system_config.fading.free_space_model_parameters.pathloss_exponent = 3.00;
- oai_emulation.environment_system_config.fading.free_space_model_parameters.pathloss_0_dB = -100;
- oai_emulation.environment_system_config.fading.small_scale.selected_option = "AWGN";
- oai_emulation.environment_system_config.fading.ricean_8tap.rice_factor_dB = 0;
- oai_emulation.environment_system_config.fading.shadowing.decorrelation_distance_m = 0;
- oai_emulation.environment_system_config.fading.shadowing.variance_dB = 0;
- oai_emulation.environment_system_config.fading.shadowing.inter_site_correlation = 0;
- oai_emulation.environment_system_config.antenna.eNB_antenna.number_of_sectors = 1;
- oai_emulation.environment_system_config.antenna.eNB_antenna.beam_width_dB = 1.13;
- oai_emulation.environment_system_config.antenna.eNB_antenna.alpha_rad[0] = 0;
- oai_emulation.environment_system_config.antenna.eNB_antenna.alpha_rad[1] = 0;
- oai_emulation.environment_system_config.antenna.eNB_antenna.alpha_rad[2] = 0;
- oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_gain_dBi = 0;
- oai_emulation.environment_system_config.antenna.eNB_antenna.tx_power_dBm = 15;
- oai_emulation.environment_system_config.antenna.eNB_antenna.rx_noise_level_dB = 0;
- oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[0] = 0;
- oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[1] = 0;
- oai_emulation.environment_system_config.antenna.eNB_antenna.antenna_orientation_degree[2] = 0;
- oai_emulation.environment_system_config.antenna.UE_antenna.antenna_gain_dBi = 0;
- oai_emulation.environment_system_config.antenna.UE_antenna.tx_power_dBm = 20;
- oai_emulation.environment_system_config.antenna.UE_antenna.rx_noise_level_dB = 0; // noise figure
- oai_emulation.environment_system_config.wall_penetration_loss_dB = 5;
- oai_emulation.environment_system_config.system_bandwidth_MB = 7.68;
- oai_emulation.environment_system_config.system_frequency_GHz = 1.9;
-
- oai_emulation.topology_config.area.x_m = 1000;
- oai_emulation.topology_config.area.y_m = 1000;
- oai_emulation.topology_config.network_type.selected_option = "homogeneous";
- oai_emulation.topology_config.cell_type.selected_option = "macrocell";
- oai_emulation.topology_config.relay.number_of_relays = 0;
- oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option = "STATIC";
- oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.selected_option="MAX_RWP_TYPES";
- //oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.horizontal_grid = 1;
- //oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.vertical_grid = 1;
- oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_trip_type.selected_option = "random_destination";
- oai_emulation.topology_config.mobility.UE_mobility.UE_initial_distribution.selected_option = "random";
- oai_emulation.topology_config.mobility.UE_mobility.random_UE_distribution.number_of_nodes = 1;
- oai_emulation.topology_config.mobility.UE_mobility.concentrated_UE_distribution.number_of_nodes = 1;
- oai_emulation.topology_config.mobility.UE_mobility.grid_UE_distribution.random_grid.number_of_nodes = 1;
- oai_emulation.topology_config.mobility.UE_mobility.grid_UE_distribution.border_grid.number_of_nodes = 1;
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_speed_mps = 0.1;
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_speed_mps = 20.0;
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_sleep_ms = 0.1;
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_sleep_ms = 5.0;
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_journey_time_ms = 0.1;
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms = 10.0;
- oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option = "STATIC";
- oai_emulation.topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option = "random";
- oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_x = 1;
- oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_y = 1;
- oai_emulation.topology_config.mobility.eNB_mobility.random_eNB_distribution.number_of_cells = 1;
- oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.number_of_cells = 1;
- oai_emulation.topology_config.mobility.eNB_mobility.hexagonal_eNB_distribution.inter_eNB_distance_km = 1;
- oai_emulation.topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_x = 1;
- oai_emulation.topology_config.mobility.eNB_mobility.grid_eNB_distribution.number_of_grid_y = 1;
- oai_emulation.topology_config.mobility.eNB_mobility.trace_config.trace_mobility_file = (char*) malloc(256);
- sprintf(oai_emulation.topology_config.mobility.eNB_mobility.trace_config.trace_mobility_file,"static_1enb.tr");
- oai_emulation.topology_config.mobility.UE_mobility.trace_config.trace_mobility_file = (char*) malloc(256);
- sprintf(oai_emulation.topology_config.mobility.UE_mobility.trace_config.trace_mobility_file,"static_2ues.tr");
- oai_emulation.topology_config.mobility.UE_mobility.sumo_config.command = (char*) malloc(20);
- sprintf(oai_emulation.topology_config.mobility.UE_mobility.sumo_config.command,"sumo");
- oai_emulation.topology_config.mobility.UE_mobility.sumo_config.file = (char*) malloc(256);
- snprintf( oai_emulation.topology_config.mobility.UE_mobility.sumo_config.file, 256, "%s/UTIL/OMG/SUMO/SCENARIOS/scen.sumo.cfg", getenv("OPENAIR2_DIR") );
- oai_emulation.topology_config.mobility.UE_mobility.sumo_config.start=0;
- oai_emulation.topology_config.mobility.UE_mobility.sumo_config.end=0;
- oai_emulation.topology_config.mobility.UE_mobility.sumo_config.step=1; // 1000ms
- oai_emulation.topology_config.mobility.UE_mobility.sumo_config.hip = (char*) malloc(40);
- sprintf(oai_emulation.topology_config.mobility.UE_mobility.sumo_config.hip,"127.0.1.1");
- oai_emulation.topology_config.mobility.UE_mobility.sumo_config.hport = 8883;
-
- oai_emulation.application_config.packet_gen_type = "substract_string";
-
- for (i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) {
- oai_emulation.application_config.predefined_traffic.source_id[i] = "1:10";
- oai_emulation.application_config.predefined_traffic.application_type[i] = "no_predefined_traffic";
- oai_emulation.application_config.predefined_traffic.background[i] = "disable";
- oai_emulation.application_config.predefined_traffic.aggregation_level[i] = 1;
- oai_emulation.application_config.predefined_traffic.flow_start[i] = 0;
- oai_emulation.application_config.predefined_traffic.flow_duration[i] = 1000;//uniform_dist((i+1)*100,0xffff);
-
- oai_emulation.application_config.predefined_traffic.destination_id[i] = 0;
-
- oai_emulation.application_config.customized_traffic.source_id[i] = "1";
- oai_emulation.application_config.customized_traffic.destination_id[i] = "2";
- oai_emulation.application_config.customized_traffic.transport_protocol[i] = "udp";
- oai_emulation.application_config.customized_traffic.background[i] = "disable";
- oai_emulation.application_config.customized_traffic.m2m[i] = "disable";
- oai_emulation.application_config.customized_traffic.ip_version[i] = "ipv4";
- oai_emulation.application_config.customized_traffic.aggregation_level[i] = 1;
- oai_emulation.application_config.customized_traffic.flow_start[i] = 0;// (i+1)*30;
- oai_emulation.application_config.customized_traffic.flow_duration[i] = 1000;// uniform_dist((i+1)*100,0xffff);
- oai_emulation.application_config.customized_traffic.idt_dist[i] = "uniform";
- oai_emulation.application_config.customized_traffic.idt_min_ms[i] = 100;
- oai_emulation.application_config.customized_traffic.idt_max_ms[i] = 1000;
- oai_emulation.application_config.customized_traffic.idt_standard_deviation[i] = 1;
- oai_emulation.application_config.customized_traffic.idt_lambda[i] = 1;
- oai_emulation.application_config.customized_traffic.size_dist[i] = "uniform";
- oai_emulation.application_config.customized_traffic.size_min_byte[i] = 200;
- oai_emulation.application_config.customized_traffic.size_max_byte[i] = 500;
- oai_emulation.application_config.customized_traffic.size_standard_deviation[i] = 1;
- oai_emulation.application_config.customized_traffic.size_lambda[i] = 1;
- oai_emulation.application_config.customized_traffic.stream[i] = 1;
- oai_emulation.application_config.customized_traffic.destination_port[i] = 8080;
- oai_emulation.application_config.customized_traffic.prob_off_pu[i]= 0;
- oai_emulation.application_config.customized_traffic.prob_off_ed[i]= 0;
- oai_emulation.application_config.customized_traffic.prob_off_pe[i]= 0;
- oai_emulation.application_config.customized_traffic.prob_pu_ed[i]= 0;
- oai_emulation.application_config.customized_traffic.prob_pu_pe[i]= 0;
- oai_emulation.application_config.customized_traffic.prob_ed_pe[i]= 0;
- oai_emulation.application_config.customized_traffic.prob_ed_pu[i]= 0;
- oai_emulation.application_config.customized_traffic.holding_time_off_ed[i]= 0;
- oai_emulation.application_config.customized_traffic.holding_time_off_pu[i]= 0;
- oai_emulation.application_config.customized_traffic.holding_time_off_pe[i]= 0;
- oai_emulation.application_config.customized_traffic.holding_time_pe_off[i]= 0;
- oai_emulation.application_config.customized_traffic.pu_size_pkts[i]= 0;
- oai_emulation.application_config.customized_traffic.ed_size_pkts[i]= 0;
- }
-
- /* protocol config */
- oai_emulation.protocol_config.eNB_mac_config.num_groups=1;
-
-
- oai_emulation.emulation_config.emulation_time_ms = 0;
- oai_emulation.emulation_config.curve = "disable";
- oai_emulation.emulation_config.background_stats = "disable";
- oai_emulation.emulation_config.performance_metrics.throughput = "disable";
- oai_emulation.emulation_config.performance_metrics.latency ="disable";
- oai_emulation.emulation_config.performance_metrics.loss_rate ="disable";
- oai_emulation.emulation_config.performance_metrics.owd_radio_access = "disable";
- oai_emulation.emulation_config.layer.phy = 0;
- oai_emulation.emulation_config.layer.mac = 0;
- oai_emulation.emulation_config.layer.rlc = 0;
- oai_emulation.emulation_config.layer.pdcp = 0;
- oai_emulation.emulation_config.layer.rrc = 0;
- oai_emulation.emulation_config.layer.omg = 0;
- oai_emulation.emulation_config.layer.otg = 0;
- oai_emulation.emulation_config.layer.emu = 1;
-
- oai_emulation.emulation_config.log_emu.level = "debug";
- oai_emulation.emulation_config.log_emu.verbosity = "low";
- oai_emulation.emulation_config.log_emu.interval = 1;
- oai_emulation.emulation_config.packet_trace.enabled = 0;
- oai_emulation.emulation_config.seed.value = 0; // 0 means randomly generated by OAI
-
- oai_emulation.info.ocg_ok = 0;
-
-
- // phy related params :
- oai_emulation.info.n_frames=MAX_FRAME_NUMBER; // number of frames simulated by default
- oai_emulation.info.n_frames_flag=0; // if set, then let the emulation goes to infinity
-
- //status
- oai_emulation.info.is_primary_master=0;
- oai_emulation.info.master_list=0;
- oai_emulation.info.nb_ue_remote=0;
- oai_emulation.info.nb_enb_remote=0;
- oai_emulation.info.nb_rn_remote=0;
- oai_emulation.info.first_ue_local=0;
- oai_emulation.info.first_enb_local=0;
- oai_emulation.info.first_rn_local=0;
- oai_emulation.info.master_id=0;
- oai_emulation.info.nb_ue_local= 1;//default 1 UE
- oai_emulation.info.nb_enb_local= 0;//default 0 eNB (to be loaded from config)
- oai_emulation.info.nb_ru_local= 0;//default 0 ru (to be loaded from config)
- oai_emulation.info.nb_rn_local= 0;//default 0 RN : currently only applicable for eMBMS
- oai_emulation.info.ethernet_flag=0;
- oai_emulation.info.ocm_enabled=1;// flag ?
- oai_emulation.info.ocg_enabled=0;// flag c
- oai_emulation.info.otg_enabled=0;// flag T
- oai_emulation.info.opt_enabled=0; // P flag
- oai_emulation.info.opt_mode=-1; // arg for P flag
- oai_emulation.info.cli_enabled=0;// I flag
- oai_emulation.info.omv_enabled =0; // v flag
- oai_emulation.info.vcd_enabled=0;
- oai_emulation.info.opp_enabled=0;
- oai_emulation.info.oeh_enabled=0;
-
- oai_emulation.info.cba_group_active=0;
- oai_emulation.info.cba_backoff=30;
- oai_emulation.info.eMBMS_active_state=0;
- oai_emulation.info.handover_active=0;
- oai_emulation.info.omg_model_enb=STATIC; //default to static mobility model
- oai_emulation.info.omg_model_rn=STATIC; //default to static mobility model
- oai_emulation.info.omg_model_ue=STATIC; //default to static mobility model
- oai_emulation.info.omg_rwp_type = RESTIRICTED_RWP;
- oai_emulation.info.omg_model_ue_current=STATIC; //default to static mobility model
- oai_emulation.info.otg_traffic="no_predefined_traffic";
- oai_emulation.info.otg_bg_traffic_enabled = 0; // G flag
- oai_emulation.info.max_predefined_traffic_config_index = 0;
- oai_emulation.info.max_customized_traffic_config_index = 0;
- oai_emulation.info.frame = 0; // frame counter of emulation
- oai_emulation.info.time_s = 0; // time of emulation
- oai_emulation.info.time_ms = 0; // time of emulation
- oai_emulation.info.seed = time(NULL); // time-based random seed , , included in ocg report
-
- oai_emulation.info.cli_num_enb= NUMBER_OF_eNB_MAX;
- oai_emulation.info.cli_num_ue= NUMBER_OF_UE_MAX;
-
- oai_emulation.info.slot_isr = 0;
- oai_emulation.info.slot_sfd = -1;
-
- //for (i=0; i < oai_emulation.info.cli_num_enb; i++)
- for (i=0; i < NUMBER_OF_eNB_MAX; i++)
- oai_emulation.info.cli_start_enb[i]=1;
-
- // for (i=0; i < oai_emulation.info.cli_num_ue; i++)
- for (i=0; i < NUMBER_OF_UE_MAX; i++)
- oai_emulation.info.cli_start_ue[i]=1;
-
- for (i=0; i < NUMBER_OF_eNB_MAX+NUMBER_OF_UE_MAX; i++)
- oai_emulation.info.oai_ifup[i]=0;
-
- oai_emulation.info.nb_master =0;
- oai_emulation.info.ethernet_id =0;
- oai_emulation.info.multicast_group =0;
- oai_emulation.info.multicast_ifname=NULL;
- oai_emulation.info.g_log_level = LOG_INFO;
- oai_emulation.info.g_log_verbosity = 0x15;
- oai_emulation.info.g_log_verbosity_option = "medium";
-
- for (CC_id=0; CC_idlog_component[OTG].filelog=1;
- g_log->log_component[OTG_LATENCY].filelog=1;
- g_log->log_component[OTG_OWD].filelog = 1;*/
- ocg_config_app(); // packet generator
- }
-
- // add a var to control this, and pass this var to OMG
- set_component_filelog(OMG);
- LOG_I(OMG,"setting OMG file log \n");
-
-}
-
-int olg_config(void)
-{
- int comp;
- int ocg_log_level = map_str_to_int(log_level_names, oai_emulation.emulation_config.log_emu.level);
- int ocg_log_verbosity = map_str_to_int(log_verbosity_names, oai_emulation.emulation_config.log_emu.verbosity);
- // fix me:
- oai_emulation.info.g_log_level = ((oai_emulation.info.ocg_enabled == 1) && (ocg_log_level != -1)) ? ocg_log_level : oai_emulation.info.g_log_level;
- oai_emulation.info.g_log_verbosity = (((oai_emulation.info.ocg_enabled == 1) && (ocg_log_verbosity != -1)) ? ocg_log_verbosity :
- map_str_to_int(log_verbosity_names, oai_emulation.info.g_log_verbosity_option));
- set_glog(oai_emulation.info.g_log_level, oai_emulation.info.g_log_verbosity ); //g_glog
-
- // component, log level, log interval
- for (comp = PHY; comp < MAX_LOG_COMPONENTS ; comp++)
- set_comp_log(comp,
- oai_emulation.info.g_log_level,
- oai_emulation.info.g_log_verbosity,
- oai_emulation.emulation_config.log_emu.interval);
-
- LOG_I(EMU, "OCG log level %d, oai log level%d \n ",ocg_log_level, oai_emulation.info.g_log_level);
- LOG_N(EMU,"global log level is set to (%s,%d) with vebosity (%s, 0x%x) and frequency %d\n",
- map_int_to_str (log_level_names, oai_emulation.info.g_log_level),
- oai_emulation.info.g_log_level,
- map_int_to_str (log_verbosity_names,oai_emulation.info.g_log_verbosity),
- oai_emulation.info.g_log_verbosity,
- oai_emulation.emulation_config.log_emu.interval );
-
-
- /*
- // if perf eval then reset the otg log level
- set_comp_log(PHY, LOG_EMERG, 0x15,1);
- set_comp_log(EMU, LOG_EMERG, 0x15,1);
- set_comp_log(OCG, LOG_EMERG, 0x15,1);
- set_comp_log(OCM, LOG_EMERG, 0x15,1);
- set_comp_log(OTG, LOG_EMERG, 0x15,1);
- set_comp_log(MAC, LOG_EMERG, 0x15,1);
- set_comp_log(OMG, LOG_EMERG, 0x15,1);
- set_comp_log(OPT, LOG_EMERG, 0x15,1);
- set_comp_log(PDCP, LOG_DEBUG, LOG_MED,1);
- set_comp_log(RLC, LOG_DEBUG, LOG_MED,1);
- set_comp_log(RRC, LOG_DEBUG, LOG_MED,1);
- */
-#if defined(ENABLE_USE_MME)
- set_comp_log(UDP_, LOG_DEBUG, LOG_MED,1);
- set_comp_log(GTPU, LOG_DEBUG, LOG_MED,1);
- set_comp_log(SPGW, LOG_DEBUG, LOG_MED,1);
- set_comp_log(S1AP, LOG_DEBUG, LOG_MED,1);
- set_comp_log(SCTP, LOG_DEBUG, LOG_MED,1);
-#endif
-
-#if ENABLE_RAL
- set_comp_log(RAL_ENB, LOG_TRACE, LOG_MED,1);
- set_comp_log(RAL_UE, LOG_TRACE, LOG_MED,1);
- set_log(RAL_ENB, LOG_DEBUG, 1);
- set_log(RAL_UE, LOG_DEBUG, 1);
-#endif
-
-
- //set_log(OCG, LOG_DEBUG, 1);
- //set_log(EMU, LOG_INFO, 20);
- set_log(MAC, LOG_DEBUG, 1);
- set_log(RLC, LOG_TRACE, 1);
- //set_log(PHY, LOG_DEBUG, 1);
- set_log(PDCP, LOG_TRACE, 1);
- set_log(RRC, LOG_DEBUG, 1);
- //set_log(OCM, LOG_INFO, 20);
- //set_log(OTG, LOG_INFO, 1);
- set_comp_log(OCG, LOG_ERR, 0x15,1);
- set_comp_log(EMU, LOG_DEBUG, 0x15,20);
- set_comp_log(MAC, LOG_TRACE, 0x15,1);
- set_comp_log(RLC, LOG_TRACE, 0x15,1);
- set_comp_log(PHY, LOG_TRACE, 0x15, 1);
- set_comp_log(PDCP, LOG_DEBUG, 0x15,1);
- set_comp_log(RRC, LOG_DEBUG, 0x15,1);
- set_comp_log(OCM, LOG_DEBUG, 0x15,20);
- set_comp_log(OTG, LOG_DEBUG, 0x15,1);
- set_comp_log(OMG, LOG_NOTICE, 0x15,1);
- set_comp_log(OPT, LOG_ERR, 0x15,1);
-
-
- // set_comp_log(MAC, LOG_TRACE, LOG_FULL,1);
- return 1;
-}
-
-int ocg_config_env(void)
-{
- // int func related to channel desc from oaisim.c could be moved here
- int CC_id;
-
- if (oai_emulation.info.ocg_enabled) {
- for (CC_id=0; CC_id 6) || (oai_emulation.info.tdd_config[CC_id] < 0)) {
- LOG_E(EMU,"TDD config %d out of range, set it to 3\n",oai_emulation.info.tdd_config[CC_id]);
- oai_emulation.info.tdd_config[CC_id]=3;
- } else
- LOG_I(EMU,"TDD config is set to %d\n",oai_emulation.info.tdd_config[CC_id]);
- }
- }
- }
-
- return 1;
-}
-int ocg_config_topo(void)
-{
-
- int i;
- // omg
- init_omg_global_params();
-
- // setup params for openair mobility generator
- //common params
- for(i=0; i < MAX_NUM_NODE_TYPES; i++) {
-
- omg_param_list[i].min_x = 0;
- omg_param_list[i].max_x = oai_emulation.topology_config.area.x_m;
- omg_param_list[i].min_y = 0;
- omg_param_list[i].max_y= oai_emulation.topology_config.area.y_m;
- // init values
- omg_param_list[i].min_speed = 0.1;
- omg_param_list[i].max_speed = 20.0;
- omg_param_list[i].min_journey_time = 0.1;
- omg_param_list[i].max_journey_time = 10.0;
- omg_param_list[i].min_azimuth = 0; // ???
- omg_param_list[i].max_azimuth = 360; // ???
- omg_param_list[i].min_sleep = 0.1;
- omg_param_list[i].max_sleep = 8.0;
- omg_param_list[i].nodes_type = i;
- omg_param_list[i].nodes=0;
- omg_param_list[i].mobility_type=STATIC;
-
- // init OMG for eNBs
-
- if(i==eNB) {
- if ((oai_emulation.info.omg_model_enb = map_str_to_int(omg_model_names, oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option))== -1)
- oai_emulation.info.omg_model_enb = STATIC;
-
- LOG_I(OMG,"eNB mobility model is (%s, %d)\n",
- oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option,
- oai_emulation.info.omg_model_enb);
-
- omg_param_list[i].mobility_type = oai_emulation.info.omg_model_enb;
- omg_param_list[i].nodes = oai_emulation.info.nb_enb_local + oai_emulation.info.nb_rn_local;
- omg_param_list[i].seed = oai_emulation.info.seed; // specific seed for enb and ue to avoid node overlapping
-
-
- if (oai_emulation.info.omg_model_enb == TRACE) {
- omg_param_list[i].mobility_file = (char*) malloc(256);// user-specific trace file "%s/UTIL/OMG/mobility.txt",getenv("OPENAIR2_DIR")
- //memset(oai_emulation.topology_config.mobility.UE_mobility.trace_config.trace_mobility_file,0,256);
- //sprintf(omg_param_list.mobility_file,"%s",oai_emulation.topology_config.mobility.UE_mobility.trace_config.trace_mobility_file);
- sprintf(omg_param_list[i].mobility_file,"%s/UTIL/OMG/TRACE/%s",
- getenv("OPENAIR2_DIR"),
- oai_emulation.topology_config.mobility.eNB_mobility.trace_config.trace_mobility_file);
- LOG_I(OMG,"TRACE file at %s\n", omg_param_list[i].mobility_file);
- // notify the user if the file is not found
- }
-
-
-
- if (strcmp(oai_emulation.topology_config.mobility.eNB_mobility.eNB_initial_distribution.selected_option, "fixed") == 0) {
- omg_param_list[i].user_fixed = true;
- omg_param_list[i].fixed_x = (double)oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_x;
- omg_param_list[i].fixed_y = (double)oai_emulation.topology_config.mobility.eNB_mobility.fixed_eNB_distribution.pos_y;
- }
-
- /*// at this moment, we use the above moving dynamics for mobile eNB
- if (omg_param_list.nodes >0 )
- init_mobility_generator(omg_param_list);*/
-
- } else if (i== UE) { // init OMG for UE
-
-
- // input of OMG: STATIC: 0, RWP: 1, RWALK 2, or TRACE 3, or SUMO or STEADY_RWP
- if ((oai_emulation.info.omg_model_ue = map_str_to_int(omg_model_names, oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option))== -1)
- oai_emulation.info.omg_model_ue = STATIC;
-
- LOG_I(OMG,"UE mobility model is (%s, %d)\n",
- oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option,
- oai_emulation.info.omg_model_ue);
-
- if (oai_emulation.info.omg_model_ue == RWP) {
- oai_emulation.info.omg_rwp_type = map_str_to_int(omg_rwp_names,oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.selected_option);
-
- if (oai_emulation.info.omg_rwp_type == -1) {
- LOG_I(OMG,"Apply standard RWP model \n");
- } else {
- LOG_I(OMG,"Apply %s mobility model (%d) \n", oai_emulation.topology_config.mobility.UE_mobility.grid_walk.grid_map.selected_option,
- oai_emulation.info.omg_rwp_type);
- omg_param_list[i].rwp_type= oai_emulation.info.omg_rwp_type;
- omg_param_list[i].max_vertices =
- max_vertices_ongrid (omg_param_list[i]);
-
- omg_param_list[i].max_block_num =
- max_connecteddomains_ongrid (omg_param_list[i]);
- }
- }
-
- omg_param_list[i].mobility_type = oai_emulation.info.omg_model_ue;
- omg_param_list[i].nodes = oai_emulation.info.nb_ue_local+ oai_emulation.info.nb_rn_local;
- omg_param_list[i].seed = oai_emulation.info.seed + oai_emulation.info.nb_ue_local; //fixme: specific seed for enb and ue to avoid node overlapping
-
- omg_param_list[i].min_speed = (oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_speed_mps == 0) ? 0.1 :
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_speed_mps;
-
- omg_param_list[i].max_speed = (oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_speed_mps == 0) ? 0.1 :
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_speed_mps;
-
- omg_param_list[i].min_journey_time = (oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_journey_time_ms == 0) ? 0.1 :
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_journey_time_ms;
-
- omg_param_list[i].max_journey_time = (oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms == 0) ? 0.1 :
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_journey_time_ms;
-
- omg_param_list[i].min_azimuth = 0.1; // wait for advanced OSD
- omg_param_list[i].max_azimuth = 360;
-
- omg_param_list[i].min_sleep = (oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_sleep_ms == 0) ? 0.1 :
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.min_sleep_ms;
-
- omg_param_list[i].max_sleep = (oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_sleep_ms == 0) ? 0.1 :
- oai_emulation.topology_config.mobility.UE_mobility.UE_moving_dynamics.max_sleep_ms;
-
-
- if (oai_emulation.info.omg_model_ue == TRACE) {
- omg_param_list[i].mobility_file = (char*) malloc(256);// user-specific trace file "%s/UTIL/OMG/mobility.txt",getenv("OPENAIR2_DIR")
- //memset(oai_emulation.topology_config.mobility.UE_mobility.trace_config.trace_mobility_file,0,256);
- //sprintf(omg_param_list.mobility_file,"%s",oai_emulation.topology_config.mobility.UE_mobility.trace_config.trace_mobility_file);
- snprintf( omg_param_list[i].mobility_file, 256, "%s/UTIL/OMG/TRACE/%s",
- getenv("OPENAIR2_DIR"),
- oai_emulation.topology_config.mobility.UE_mobility.trace_config.trace_mobility_file);
- LOG_I(OMG,"TRACE file at %s\n", omg_param_list[i].mobility_file);
-
- } else if (oai_emulation.info.omg_model_ue == SUMO) {
- omg_param_list[i].sumo_command = (char*) malloc(20);
- sprintf(omg_param_list[i].sumo_command, "%s", oai_emulation.topology_config.mobility.UE_mobility.sumo_config.command);
- omg_param_list[i].sumo_config = (char*) malloc(256);
- sprintf(omg_param_list[i].sumo_config, "%s", oai_emulation.topology_config.mobility.UE_mobility.sumo_config.file);
- omg_param_list[i].sumo_start = oai_emulation.topology_config.mobility.UE_mobility.sumo_config.start;
-
- if (oai_emulation.topology_config.mobility.UE_mobility.sumo_config.end > 0 )
- omg_param_list[i].sumo_end = oai_emulation.topology_config.mobility.UE_mobility.sumo_config.end;
- else
- omg_param_list[i].sumo_end = (oai_emulation.info.n_frames_flag == 1 ) ? oai_emulation.info.n_frames : MAX_FRAME_NUMBER ; // fixme: the else case is infinity
-
- omg_param_list[i].sumo_step = oai_emulation.topology_config.mobility.UE_mobility.sumo_config.step=1; // 1000ms
- omg_param_list[i].sumo_host = (char*) malloc(40);
- sprintf(omg_param_list[i].sumo_host,"%s",oai_emulation.topology_config.mobility.UE_mobility.sumo_config.hip);
- omg_param_list[i].sumo_port = oai_emulation.topology_config.mobility.UE_mobility.sumo_config.hport ;
- LOG_D(OMG, "opt (%s,%d) cmd (%s,%s) config_file (%s,%s) hip (%s,%s) \n",
- oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option,oai_emulation.info.omg_model_ue,
- omg_param_list[i].sumo_command, oai_emulation.topology_config.mobility.UE_mobility.sumo_config.command,
- omg_param_list[i].sumo_config, oai_emulation.topology_config.mobility.UE_mobility.sumo_config.file,
- omg_param_list[i].sumo_host, oai_emulation.topology_config.mobility.UE_mobility.sumo_config.hip);
- }
-
- }
-
- if (oai_emulation.topology_config.omv == 1 )
- oai_emulation.info.omv_enabled = 1;
-
- }//for
-
-
- init_mobility_generator(omg_param_list);
-
- return 1;
-}
-
-
-
-int ocg_config_app(void)
-{
-
- char colon[] = ":";
- char comma[] = ",";
- char tmp_source_id[128];
- char tmp_destination_id[128];
- char *check_format1;
- char *check_format2;
- char *check_format1_dst;
- char *source_id_start = NULL;
- char *source_id_end = NULL;
- char *destination_id_start;
- char *destination_id_end;
- int sid_start;
- int sid_end;
- int did_start;
- int did_end;
- char *per_source_id;
- int source_id_index;
- int destination_id_index;
- int i,j,k,l;
-
- int predefined_traffic_config_index;
- int customized_traffic_config_index;
- unsigned int state;
-
- init_all_otg(oai_emulation.info.n_frames);
- g_otg->seed= oai_emulation.info.seed;
- g_otg->num_nodes = oai_emulation.info.nb_enb_local + oai_emulation.info.nb_ue_local;
- g_otg->throughput_metric =map_str_to_int(switch_names,oai_emulation.emulation_config.performance_metrics.throughput);
- g_otg->latency_metric =map_str_to_int(switch_names,oai_emulation.emulation_config.performance_metrics.latency);
- g_otg->loss_metric =map_str_to_int(switch_names,oai_emulation.emulation_config.performance_metrics.loss_rate);
- g_otg->owd_radio_access =map_str_to_int(switch_names,oai_emulation.emulation_config.performance_metrics.owd_radio_access);
- g_otg->curve=map_str_to_int(switch_names,oai_emulation.emulation_config.curve);
- g_otg->background_stats=map_str_to_int(switch_names,oai_emulation.emulation_config.background_stats);
-
- g_otg->packet_gen_type=map_str_to_int(packet_gen_names,oai_emulation.application_config.packet_gen_type);
-
- LOG_I(OTG,"Metrics: Throuput %s(%d), One-way latency %s(%d) for %s, loss rate %s(%d), online curves %s(%d)\n",
- oai_emulation.emulation_config.performance_metrics.throughput,g_otg->throughput_metric,
- oai_emulation.emulation_config.performance_metrics.latency,g_otg->latency_metric,
- (g_otg->owd_radio_access==1)? "Radio Access Network" : "End to End",
- oai_emulation.emulation_config.performance_metrics.loss_rate,g_otg->loss_metric,
- oai_emulation.emulation_config.curve,g_otg->curve );
-
- for (i=0; inum_nodes; i++) {
-
- for (j=0; jnum_nodes; j++) {
- // g_otg->duration[i][j]=oai_emulation.emulation_config.emulation_time_ms;
- g_otg->dst_port[i][j]=oai_emulation.application_config.customized_traffic.destination_port[i];
- g_otg->dst_ip[i][j]=oai_emulation.application_config.customized_traffic.destination_id[i];
-
- for (k=0; kip_v[i][j][k]=map_str_to_int(otg_ip_version_names, oai_emulation.application_config.customized_traffic.ip_version[i]);
- g_otg->trans_proto[i][j][k]=map_str_to_int(otg_transport_protocol_names, oai_emulation.application_config.customized_traffic.transport_protocol[i]);
- g_otg->application_type[i][j][k]=map_str_to_int(otg_app_type_names, "no_predefined_traffic");
- g_otg->aggregation_level[i][j][k]=oai_emulation.application_config.customized_traffic.aggregation_level[i];
-
- g_otg->flow_start[i][j][k]=flow_start_time(i,j,oai_emulation.info.n_frames,
- oai_emulation.application_config.customized_traffic.flow_start[i+j],
- oai_emulation.application_config.customized_traffic.flow_duration[i+j]);
- g_otg->flow_duration[i][j][k]=oai_emulation.application_config.customized_traffic.flow_duration[i+j];
-
- for (l=0; lidt_dist[i][j][k][l]=map_str_to_int(otg_distribution_names, "no_customized_traffic");
- g_otg->idt_min[i][j][k][l]=oai_emulation.application_config.customized_traffic.idt_min_ms[i];
- g_otg->idt_max[i][j][k][l]=oai_emulation.application_config.customized_traffic.idt_max_ms[i];
- g_otg->idt_std_dev[i][j][k][l]=oai_emulation.application_config.customized_traffic.idt_standard_deviation[i];
- g_otg->idt_lambda[i][j][k][l]=oai_emulation.application_config.customized_traffic.idt_lambda[i];
- g_otg->idt_scale[i][j][k][l]=oai_emulation.application_config.customized_traffic.idt_scale[i];
- g_otg->idt_shape[i][j][k][l]=oai_emulation.application_config.customized_traffic.idt_shape[i];
- g_otg->size_dist[i][j][k][l]=map_str_to_int(otg_distribution_names, "no_customized_traffic");
- g_otg->size_min[i][j][k][l]=oai_emulation.application_config.customized_traffic.size_min_byte[i];
- g_otg->size_max[i][j][k][l]=oai_emulation.application_config.customized_traffic.size_max_byte[i];
- g_otg->size_std_dev[i][j][k][l]=oai_emulation.application_config.customized_traffic.size_standard_deviation[i];
- g_otg->size_lambda[i][j][k][l]=oai_emulation.application_config.customized_traffic.size_lambda[i];
- g_otg->size_scale[i][j][k][l]=oai_emulation.application_config.customized_traffic.size_scale[i];
- g_otg->size_shape[i][j][k][l]=oai_emulation.application_config.customized_traffic.size_shape[i];
- }
- }
- }
- }
-
- LOG_D(OTG,"initializing the RNG with %s %d\n",(g_otg->seed==0)?"Random Seed" : "Fixed Seed", g_otg->seed);
- init_seeds(g_otg->seed); // initialize all the nodes, then configure the nodes the user specifically did in the XML in the following
-
- LOG_I(OTG,"oai_emulation.info.max_predefined_traffic_config_index = %d\n", oai_emulation.info.max_predefined_traffic_config_index);
- LOG_I(OTG,"oai_emulation.info.max_customized_traffic_config_index = %d\n", oai_emulation.info.max_customized_traffic_config_index);
-
-
- if (oai_emulation.info.ocg_ok) {
- ///// for the predefined traffic
- for (predefined_traffic_config_index = 1;
- predefined_traffic_config_index <= oai_emulation.info.max_predefined_traffic_config_index;
- predefined_traffic_config_index++) {
-
- LOG_I(OTG,"OCG_config_OTG: predefined no. %d\n", predefined_traffic_config_index);
-
- //strcpy(tmp_source_id, oai_emulation.application_config.predefined_traffic.source_id[predefined_traffic_config_index]);
- //strcpy(tmp_destination_id, oai_emulation.application_config.predefined_traffic.destination_id[predefined_traffic_config_index]);
- strncpy(tmp_source_id, oai_emulation.application_config.predefined_traffic.source_id[predefined_traffic_config_index], sizeof(tmp_source_id));
- tmp_source_id[sizeof(tmp_source_id) - 1] = 0; // terminate string
- strncpy(tmp_destination_id, oai_emulation.application_config.predefined_traffic.destination_id[predefined_traffic_config_index], sizeof(tmp_destination_id));
- tmp_destination_id[sizeof(tmp_destination_id) - 1] = 0; // terminate string
- check_format1 = strstr(tmp_source_id, colon);
- check_format2 = strstr(tmp_source_id, comma);
- check_format1_dst = strstr(tmp_destination_id, colon);
-
-
- if (check_format1 != NULL) { // format 1:10
- source_id_start = strtok(tmp_source_id, colon);
- source_id_end = strtok(NULL, colon);
-
- sid_start = atoi(source_id_start);
- sid_end = atoi(source_id_end);
-
- //destination_id_index = atoi(oai_emulation.application_config.predefined_traffic.destination_id[predefined_traffic_config_index]);
- if (check_format1_dst != NULL) { // format 1:10
- destination_id_start = strtok(tmp_destination_id, colon);
- destination_id_end = strtok(NULL, colon);
-
- did_start = atoi(destination_id_start);
- did_end = atoi(destination_id_end);
- } else {
- did_start = atoi(oai_emulation.application_config.predefined_traffic.destination_id[predefined_traffic_config_index]);
- did_end = atoi(oai_emulation.application_config.predefined_traffic.destination_id[predefined_traffic_config_index]);
- }
-
- for (destination_id_index = did_start; destination_id_index <= did_end; destination_id_index++) {
- for (source_id_index = sid_start; source_id_index <= sid_end; source_id_index++) {
- if (g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] == 0) { // no app is defined for this pair src.dst
- g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] = map_str_to_int(otg_app_type_names,
- oai_emulation.application_config.predefined_traffic.application_type[predefined_traffic_config_index]);
-
- g_otg->background[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] =map_str_to_int(switch_names,
- oai_emulation.application_config.predefined_traffic.background[predefined_traffic_config_index]);
- g_otg->aggregation_level[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.predefined_traffic.aggregation_level[predefined_traffic_config_index];
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]= flow_start_time(source_id_index,destination_id_index,
- oai_emulation.info.n_frames,oai_emulation.application_config.predefined_traffic.flow_start[predefined_traffic_config_index],
- oai_emulation.application_config.predefined_traffic.flow_duration[predefined_traffic_config_index]);
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.predefined_traffic.flow_duration[predefined_traffic_config_index];
-
- LOG_I(OTG,"predef (1):: OCG_config_OTG [MAX UE=%d] [MAX eNB=%d]: FORMAT (%d:%d) source = %d, dest = %d, Application ID = %d background %d, Aggregation=%d , m2m= %d, flow start/duration %d/%d \n",
- oai_emulation.info.nb_ue_local, oai_emulation.info.nb_enb_local, sid_start, sid_end, source_id_index, destination_id_index,
- g_otg->application_idx[source_id_index][destination_id_index],
- g_otg->background[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->aggregation_level[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->m2m[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]);
- g_otg->application_idx[source_id_index][destination_id_index]+=1;
- }
- }
- }
- } else if (check_format2 != NULL) { // format 1,2,3,5
- per_source_id = strtok(tmp_source_id, comma);
- destination_id_index = atoi(oai_emulation.application_config.predefined_traffic.destination_id[predefined_traffic_config_index]);
-
- while (per_source_id != NULL) {
- source_id_index = atoi(per_source_id);
-
- if (g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] == 0) { // no app is defined for this pair src.dst
- g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] = map_str_to_int(otg_app_type_names,
- oai_emulation.application_config.predefined_traffic.application_type[predefined_traffic_config_index]);
- g_otg->background[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] =map_str_to_int(switch_names,
- oai_emulation.application_config.predefined_traffic.background[predefined_traffic_config_index]);
- g_otg->aggregation_level[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.predefined_traffic.aggregation_level[predefined_traffic_config_index];
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=flow_start_time(source_id_index, destination_id_index,
- oai_emulation.info.n_frames,oai_emulation.application_config.predefined_traffic.flow_start[predefined_traffic_config_index],
- oai_emulation.application_config.predefined_traffic.flow_duration[predefined_traffic_config_index]);
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.predefined_traffic.flow_duration[predefined_traffic_config_index];
- g_otg->application_idx[source_id_index][destination_id_index]+=1;
- }
-
- per_source_id = strtok(NULL, comma);
-
- }
- } else { // single node configuration
- source_id_index = atoi(oai_emulation.application_config.predefined_traffic.source_id[predefined_traffic_config_index]);
- //destination_id_index = atoi(oai_emulation.application_config.predefined_traffic.destination_id[predefined_traffic_config_index]);
- sid_start = atoi(oai_emulation.application_config.predefined_traffic.source_id[predefined_traffic_config_index]);
- sid_end = atoi(oai_emulation.application_config.predefined_traffic.source_id[predefined_traffic_config_index]);
-
- if (check_format1_dst != NULL) { // format 1:10
- destination_id_start = strtok(tmp_destination_id, colon);
- destination_id_end = strtok(NULL, colon);
-
- did_start = atoi(destination_id_start);
- did_end = atoi(destination_id_end);
- } else {
- did_start = atoi(oai_emulation.application_config.predefined_traffic.destination_id[predefined_traffic_config_index]);
- did_end = atoi(oai_emulation.application_config.predefined_traffic.destination_id[predefined_traffic_config_index]);
- }
-
- for (destination_id_index = did_start; destination_id_index <= did_end; destination_id_index++) {
- for (source_id_index = sid_start; source_id_index <= sid_end; source_id_index++) {
- if (g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] == 0) { // no app is defined for this pair src.dst
- g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] = map_str_to_int(otg_app_type_names,
- oai_emulation.application_config.predefined_traffic.application_type[predefined_traffic_config_index]);
- g_otg->background[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] =map_str_to_int(switch_names,
- oai_emulation.application_config.predefined_traffic.background[predefined_traffic_config_index]);
- g_otg->aggregation_level[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.predefined_traffic.aggregation_level[predefined_traffic_config_index];
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=flow_start_time(source_id_index,destination_id_index,
- oai_emulation.info.n_frames,oai_emulation.application_config.predefined_traffic.flow_start[predefined_traffic_config_index],
- oai_emulation.application_config.predefined_traffic.flow_duration[predefined_traffic_config_index]);
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.predefined_traffic.flow_duration[predefined_traffic_config_index];
-
- LOG_I(OTG,"predef (2):: OCG_config_OTG: [MAX UE=%d] [MAX eNB=%d]: FORMAT (%d:%d) source = %d, dest = %d, Application ID %d, type %d, Background=%d, Aggregation=%d, m2m=%d, start/duration %d/%d\n",
- oai_emulation.info.nb_ue_local, oai_emulation.info.nb_enb_local, sid_start, sid_end, source_id_index, destination_id_index,
- g_otg->application_idx[source_id_index][destination_id_index],
- g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->background[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->aggregation_level[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->m2m[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]);
- g_otg->application_idx[source_id_index][destination_id_index]+=1;
- }
- }
- }
- }
-
- init_predef_traffic(oai_emulation.info.nb_ue_local, oai_emulation.info.nb_enb_local);
- }
-
- ///////// for the customized traffic
- for (customized_traffic_config_index = 1;
- customized_traffic_config_index <= oai_emulation.info.max_customized_traffic_config_index;
- customized_traffic_config_index++) {
-
- LOG_I(OTG,"OCG_config_OTG: customized no. %d, max_customized %d \n", customized_traffic_config_index, oai_emulation.info.max_customized_traffic_config_index);
- strcpy(tmp_source_id, oai_emulation.application_config.customized_traffic.source_id[customized_traffic_config_index]);
-
- check_format1 = strstr(tmp_source_id, colon);
- check_format2 = strstr(tmp_source_id, comma);
-
- strcpy(tmp_destination_id, oai_emulation.application_config.customized_traffic.destination_id[customized_traffic_config_index]);
- check_format1_dst = strstr(tmp_destination_id, colon);
- state=PE_STATE;
-
- if (check_format1 != NULL) { // format 1:10
- source_id_start = strtok(tmp_source_id, colon);
- source_id_end = strtok(NULL, colon) ;
-
- sid_start = atoi(source_id_start);
- sid_end = atoi(source_id_end);
-
- if (check_format1_dst != NULL) { // format 1:10
- destination_id_start = strtok(tmp_destination_id, colon);
- destination_id_end = strtok(NULL, colon);
-
- did_start = atoi(destination_id_start);
- did_end = atoi(destination_id_end);
- } else {
- did_start = atoi(oai_emulation.application_config.customized_traffic.destination_id[customized_traffic_config_index]);
- did_end = atoi(oai_emulation.application_config.customized_traffic.destination_id[customized_traffic_config_index]);
- }
-
- for (destination_id_index = did_start; destination_id_index <= did_end; destination_id_index++) {
- for (source_id_index = sid_start; source_id_index <= sid_end; source_id_index++) {
- if (g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] == 0) { // no app is defined for this pair src.dst
- g_otg->background[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] = map_str_to_int(switch_names,
- oai_emulation.application_config.customized_traffic.background[customized_traffic_config_index]);
- g_otg->m2m[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] =map_str_to_int(switch_names,
- oai_emulation.application_config.customized_traffic.m2m[customized_traffic_config_index]);
- g_otg->trans_proto[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] = map_str_to_int(otg_transport_protocol_names,
- oai_emulation.application_config.customized_traffic.transport_protocol[customized_traffic_config_index]);
- g_otg->ip_v[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] = map_str_to_int(otg_ip_version_names,
- oai_emulation.application_config.customized_traffic.ip_version[customized_traffic_config_index]);
- g_otg->aggregation_level[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.aggregation_level[customized_traffic_config_index];
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]= flow_start_time(source_id_index,destination_id_index,
- oai_emulation.info.n_frames,oai_emulation.application_config.customized_traffic.flow_start[customized_traffic_config_index],
- oai_emulation.application_config.customized_traffic.flow_duration[customized_traffic_config_index]);
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.flow_duration[customized_traffic_config_index];
- g_otg->idt_dist[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] = map_str_to_int(otg_distribution_names,
- oai_emulation.application_config.customized_traffic.idt_dist[customized_traffic_config_index]);
- // printf("[OTG] config index %d dist %s\n", customized_traffic_config_index,oai_emulation.application_config.customized_traffic.idt_dist[customized_traffic_config_index]);
- g_otg->idt_min[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_min_ms[customized_traffic_config_index];
- g_otg->idt_max[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_max_ms[customized_traffic_config_index];
- g_otg->idt_std_dev[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_standard_deviation[customized_traffic_config_index];
- g_otg->idt_lambda[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_lambda[customized_traffic_config_index];
- g_otg->idt_scale[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_scale[customized_traffic_config_index];
- g_otg->idt_shape[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_shape[customized_traffic_config_index];
- g_otg->size_dist[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] = map_str_to_int(otg_distribution_names,
- oai_emulation.application_config.customized_traffic.size_dist[customized_traffic_config_index]);
- g_otg->size_min[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_min_byte[customized_traffic_config_index];
- g_otg->size_max[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_max_byte[customized_traffic_config_index];
- g_otg->size_std_dev[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_standard_deviation[customized_traffic_config_index];
- g_otg->size_lambda[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_lambda[customized_traffic_config_index];
- g_otg->size_scale[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_scale[customized_traffic_config_index];
- g_otg->size_shape[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_shape[customized_traffic_config_index];
- g_otg->dst_port[source_id_index][destination_id_index] = oai_emulation.application_config.customized_traffic.destination_port[customized_traffic_config_index];
- g_otg->pu_size_pkts[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.pu_size_pkts[customized_traffic_config_index];
- g_otg->ed_size_pkts[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.ed_size_pkts[customized_traffic_config_index];
- g_otg->prob_off_pu[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_off_pu[customized_traffic_config_index];
- g_otg->prob_off_ed[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_off_ed[customized_traffic_config_index];
- g_otg->prob_off_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_off_pe[customized_traffic_config_index];
- g_otg->prob_pu_ed[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_pu_ed[customized_traffic_config_index];
- g_otg->prob_pu_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_pu_pe[customized_traffic_config_index];
- g_otg->prob_ed_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_ed_pe[customized_traffic_config_index];
- g_otg->prob_ed_pu[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_ed_pu[customized_traffic_config_index];
- g_otg->holding_time_off_ed[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_off_ed[customized_traffic_config_index];
- g_otg->holding_time_off_pu[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_off_pu[customized_traffic_config_index];
- g_otg->holding_time_off_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_off_pe[customized_traffic_config_index];
- g_otg->holding_time_pe_off[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_pe_off[customized_traffic_config_index];
-
- LOG_I(OTG,"customized:: OCG_config_OTG: (1) FORMAT (%d:%d) source = %d, dest = %d, Application = %d, state %d, background %d IDT DIST %d start/duration %d/%d\n", sid_start, sid_end, source_id_index,
- destination_id_index,
- g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- state,
- g_otg->background[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->idt_dist[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state],
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]);
-
- g_otg->application_idx[source_id_index][destination_id_index]+=1;
- }
- }
- }
-
- } else if (check_format2 != NULL) { // format 1,2,3,5
- per_source_id = strtok(tmp_source_id, comma);
- destination_id_index = atoi(oai_emulation.application_config.customized_traffic.destination_id[customized_traffic_config_index]);
-
- while (per_source_id != NULL) {
- source_id_index = atoi(per_source_id);
-
- if (g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] == 0) { // no app is defined for this pair src.dst
-
- g_otg->background[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] =map_str_to_int(switch_names,
- oai_emulation.application_config.customized_traffic.background[customized_traffic_config_index]);
- g_otg->m2m[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] =map_str_to_int(switch_names,
- oai_emulation.application_config.customized_traffic.m2m[customized_traffic_config_index]);
- g_otg->trans_proto[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] = map_str_to_int(otg_transport_protocol_names,
- oai_emulation.application_config.customized_traffic.transport_protocol[customized_traffic_config_index]);
- g_otg->ip_v[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] = map_str_to_int(otg_ip_version_names,
- oai_emulation.application_config.customized_traffic.ip_version[customized_traffic_config_index]);
- g_otg->aggregation_level[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.aggregation_level[customized_traffic_config_index];
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=flow_start_time(source_id_index,destination_id_index,
- oai_emulation.info.n_frames,oai_emulation.application_config.customized_traffic.flow_start[customized_traffic_config_index],
- oai_emulation.application_config.customized_traffic.flow_duration[customized_traffic_config_index]);
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.flow_duration[customized_traffic_config_index];
- g_otg->idt_dist[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] = map_str_to_int(otg_distribution_names,
- oai_emulation.application_config.customized_traffic.idt_dist[customized_traffic_config_index]);
- g_otg->idt_min[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_min_ms[customized_traffic_config_index];
- g_otg->idt_max[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_max_ms[customized_traffic_config_index];
- g_otg->idt_std_dev[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_standard_deviation[customized_traffic_config_index];
- g_otg->idt_lambda[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_lambda[customized_traffic_config_index];
- g_otg->idt_scale[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_scale[customized_traffic_config_index];
- g_otg->idt_shape[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_shape[customized_traffic_config_index];
- g_otg->size_dist[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] = map_str_to_int(otg_distribution_names,
- oai_emulation.application_config.customized_traffic.size_dist[customized_traffic_config_index]);
- g_otg->size_min[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_min_byte[customized_traffic_config_index];
- g_otg->size_max[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_max_byte[customized_traffic_config_index];
- g_otg->size_std_dev[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_standard_deviation[customized_traffic_config_index];
- g_otg->size_lambda[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_lambda[customized_traffic_config_index];
- g_otg->size_scale[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_scale[customized_traffic_config_index];
- g_otg->size_shape[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_shape[customized_traffic_config_index];
- g_otg->dst_port[source_id_index][destination_id_index] = oai_emulation.application_config.customized_traffic.destination_port[customized_traffic_config_index];
- g_otg->pu_size_pkts[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.pu_size_pkts[customized_traffic_config_index];
- g_otg->ed_size_pkts[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.ed_size_pkts[customized_traffic_config_index];
- g_otg->prob_off_pu[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_off_pu[customized_traffic_config_index];
- g_otg->prob_off_ed[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_off_ed[customized_traffic_config_index];
- g_otg->prob_off_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_off_pe[customized_traffic_config_index];
- g_otg->prob_pu_ed[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_pu_ed[customized_traffic_config_index];
- g_otg->prob_pu_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_pu_pe[customized_traffic_config_index];
- g_otg->prob_ed_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_ed_pe[customized_traffic_config_index];
- g_otg->prob_ed_pu[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_ed_pu[customized_traffic_config_index];
- g_otg->holding_time_off_ed[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_off_ed[customized_traffic_config_index];
- g_otg->holding_time_off_pu[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_off_pu[customized_traffic_config_index];
- g_otg->holding_time_off_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_off_pe[customized_traffic_config_index];
- g_otg->holding_time_pe_off[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_pe_off[customized_traffic_config_index];
-
-
- LOG_I(OTG,"customized:: OCG_config_OTG: (2) FORMAT (%s:%s) source = %d, dest = %d, dist type for size = %d [TODO: check code, printed value may not be correct, checks the indexes of the arry access] start/duration %d/%d\n", source_id_start, source_id_end, source_id_index,
- destination_id_index, g_otg->size_dist[source_id_index][destination_id_index][0][0],
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]);
- per_source_id = strtok(NULL, comma);
- g_otg->application_idx[source_id_index][destination_id_index]+=1;
- }
- }
- } else { // single node configuration
- source_id_index = atoi(oai_emulation.application_config.customized_traffic.source_id[customized_traffic_config_index]);
- //destination_id_index = atoi(oai_emulation.application_config.customized_traffic.destination_id[customized_traffic_config_index]);
-
- sid_start = atoi(oai_emulation.application_config.customized_traffic.source_id[customized_traffic_config_index]);
- sid_end = atoi(oai_emulation.application_config.customized_traffic.source_id[customized_traffic_config_index]);
-
- if (check_format1_dst != NULL) { // format 1:10
- destination_id_start = strtok(tmp_destination_id, colon);
- destination_id_end = strtok(NULL, colon);
-
- did_start = atoi(destination_id_start);
- did_end = atoi(destination_id_end);
- } else {
- did_start = atoi(oai_emulation.application_config.customized_traffic.destination_id[customized_traffic_config_index]);
- did_end = atoi(oai_emulation.application_config.customized_traffic.destination_id[customized_traffic_config_index]);
- }
-
- for (destination_id_index = did_start; destination_id_index <= did_end; destination_id_index++) {
- for (source_id_index = sid_start; source_id_index <= sid_end; source_id_index++) {
-
- if (g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] == 0) { // no app is defined for this pair src.dst
-
- g_otg->background[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] =map_str_to_int(switch_names,
- oai_emulation.application_config.customized_traffic.background[customized_traffic_config_index]);
- g_otg->m2m[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] =map_str_to_int(switch_names,
- oai_emulation.application_config.customized_traffic.m2m[customized_traffic_config_index]);
-
- /* LOG_I(OTG, "[src %d][dst %d][app %d]test_m2m %d \n",source_id_index, destination_id_index , g_otg->application_idx[source_id_index][destination_id_index] , g_otg->m2m[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] );
- */
-
- g_otg->trans_proto[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] = map_str_to_int(otg_transport_protocol_names,
- oai_emulation.application_config.customized_traffic.transport_protocol[customized_traffic_config_index]);
- g_otg->ip_v[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]] = map_str_to_int(otg_ip_version_names,
- oai_emulation.application_config.customized_traffic.ip_version[customized_traffic_config_index]);
- g_otg->aggregation_level[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.aggregation_level[customized_traffic_config_index];
-
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=flow_start_time(source_id_index,destination_id_index,
- oai_emulation.info.n_frames,oai_emulation.application_config.customized_traffic.flow_start[customized_traffic_config_index],
- oai_emulation.application_config.customized_traffic.flow_duration[customized_traffic_config_index]);
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.flow_duration[customized_traffic_config_index];
-
- g_otg->idt_dist[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] = map_str_to_int(otg_distribution_names,
- oai_emulation.application_config.customized_traffic.idt_dist[customized_traffic_config_index]);
- g_otg->idt_min[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_min_ms[customized_traffic_config_index];
- g_otg->idt_max[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_max_ms[customized_traffic_config_index];
- g_otg->idt_std_dev[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_standard_deviation[customized_traffic_config_index];
- g_otg->idt_lambda[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_lambda[customized_traffic_config_index];
- g_otg->idt_scale[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_scale[customized_traffic_config_index];
- g_otg->idt_shape[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.idt_shape[customized_traffic_config_index];
- g_otg->size_dist[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] = map_str_to_int(otg_distribution_names,
- oai_emulation.application_config.customized_traffic.size_dist[customized_traffic_config_index]);
- g_otg->size_min[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_min_byte[customized_traffic_config_index];
- g_otg->size_max[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_max_byte[customized_traffic_config_index];
- g_otg->size_std_dev[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_standard_deviation[customized_traffic_config_index];
- g_otg->size_lambda[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_lambda[customized_traffic_config_index];
- g_otg->size_scale[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_scale[customized_traffic_config_index];
- g_otg->size_shape[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state] =
- oai_emulation.application_config.customized_traffic.size_shape[customized_traffic_config_index];
- g_otg->dst_port[source_id_index][destination_id_index] = oai_emulation.application_config.customized_traffic.destination_port[customized_traffic_config_index];
- g_otg->pu_size_pkts[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.pu_size_pkts[customized_traffic_config_index];
- g_otg->ed_size_pkts[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.ed_size_pkts[customized_traffic_config_index];
- g_otg->prob_off_pu[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_off_pu[customized_traffic_config_index];
- g_otg->prob_off_ed[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_off_ed[customized_traffic_config_index];
- g_otg->prob_off_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_off_pe[customized_traffic_config_index];
- g_otg->prob_pu_ed[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_pu_ed[customized_traffic_config_index];
- g_otg->prob_pu_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_pu_pe[customized_traffic_config_index];
- g_otg->prob_ed_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_ed_pe[customized_traffic_config_index];
- g_otg->prob_ed_pu[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.prob_ed_pu[customized_traffic_config_index];
- g_otg->holding_time_off_ed[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_off_ed[customized_traffic_config_index];
- g_otg->holding_time_off_pu[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_off_pu[customized_traffic_config_index];
- g_otg->holding_time_off_pe[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_off_pe[customized_traffic_config_index];
- g_otg->holding_time_pe_off[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]=
- oai_emulation.application_config.customized_traffic.holding_time_pe_off[customized_traffic_config_index];
-
- LOG_I(OTG,"OCG_config_OTG (single node config): source = %d, dest = %d\n", source_id_index, destination_id_index);
- LOG_I(OTG,"customized:: OCG_config_OTG:(3) FORMAT (%d:%d) source = %d, dest = %d, Application = %d, IDT dist %d flow start %d duration %d \n",
- did_start, did_end, source_id_index, destination_id_index,
- g_otg->application_type[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->idt_dist[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]][state],
- g_otg->flow_start[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]],
- g_otg->flow_duration[source_id_index][destination_id_index][g_otg->application_idx[source_id_index][destination_id_index]]);
- g_otg->application_idx[source_id_index][destination_id_index]+=1;
-
- }
- }
- }
- }
- }
- }
-
-
- if ((oai_emulation.info.max_predefined_traffic_config_index == 0) &&
- (oai_emulation.info.max_customized_traffic_config_index == 0) &&
- (oai_emulation.info.otg_enabled==1)) { // OCG not used to configure OTG, but -T option is used, so config here
- LOG_I(OTG,"configure OTG through options %s\n", oai_emulation.info.otg_traffic);
-
- for (i=0; inum_nodes; i++) {
- for (j=0; jnum_nodes; j++) {
- g_otg->application_idx[i][j]=1;
-
- for (k=0; kapplication_idx[i][j]; k++) {
-
- g_otg->application_type[i][j][k] = map_str_to_int(otg_app_type_names, oai_emulation.info.otg_traffic);
- g_otg->background[i][j][k]=oai_emulation.info.otg_bg_traffic_enabled;
- g_otg->packet_gen_type=SUBSTRACT_STRING;
- g_otg->flow_start[i][j][k]=flow_start_time(i,j,oai_emulation.info.n_frames,
- oai_emulation.application_config.customized_traffic.flow_start[i+j],
- oai_emulation.application_config.customized_traffic.flow_duration[i+j]);
- g_otg->flow_duration[i][j][k]=oai_emulation.application_config.customized_traffic.flow_duration[i+j];
- LOG_I(OTG,"predefined traffic:: source = %d, dest = %d, Application = %d, start %d duration %d \n",
- i,j, g_otg->application_type[i][j][k],g_otg->flow_start[i][j][k],g_otg->flow_duration[i][j][k]);
- }
- }
- }
-
- init_predef_traffic(oai_emulation.info.nb_ue_local, oai_emulation.info.nb_enb_local);
-
- for (i=0; iapplication_type[i][j][k] = map_str_to_int( otg_multicast_app_type_names, oai_emulation.info.otg_traffic);
- }
- }
- }
-
- init_predef_multicast_traffic();
- LOG_I(OTG,"initilizae multicast traffic %s\n",oai_emulation.info.otg_traffic);
-
- }
-
- return 1;
-}
-
-int flow_start_time(int sid, int did, uint32_t n_frames, uint32_t start, uint32_t duration)
-{
-
- int offset0=uniform_dist(1,10);
- int offset1=uniform_dist(10,100);
- int offset2=uniform_dist(100,1000);
- int interval = 300;
- int flow_start_margin_1=0;
- int flow_start_margin_2=0;
-
- // return user-defined flow start time
- if (start > 0 )
- return start;
-
- //determine the flow start time
- start = (sid+did+1)*interval;
- flow_start_margin_1 = 10*n_frames - (start + offset1 + duration);
- flow_start_margin_2 = 10*n_frames - (start + offset2 + duration);
-
- //LOG_I(OTG,"nframes %d start %d margin_1 %d margin_2 %d\n",n_frames, start,flow_start_margin_1, flow_start_margin_2);
- if (flow_start_margin_2 > 0 )
- return uniform_dist(start, start+offset2);
- else if (flow_start_margin_1 > 0 )
- return uniform_dist(start, start+offset1);
- else
- return uniform_dist(start, start+offset0);
-
-}
-
-
-int ocg_config_emu(void)
-{
-
- if (oai_emulation.emulation_config.emulation_time_ms != 0) {
- oai_emulation.info.n_frames = (int) oai_emulation.emulation_config.emulation_time_ms / 10; // configure the number of frame
- oai_emulation.info.n_frames_flag = 1;
- }
-
- if (oai_emulation.info.n_frames_flag) {
- LOG_I(OCG, "number of frames in emulation is set to %d\n", oai_emulation.info.n_frames);
- } else {
- LOG_I(OCG, "number of frames in emulation is set to infinity\n");
- }
-
- oai_emulation.info.seed = (oai_emulation.emulation_config.seed.value == 0) ? oai_emulation.info.seed : oai_emulation.emulation_config.seed.value;
- LOG_I (OCG,"The seed value is set to %d \n", oai_emulation.info.seed );
-
- if (oai_emulation.info.cli_enabled == 1) {
- if (cli_server_init(cli_server_recv) < 0) {
- LOG_E(EMU,"cli server init failed \n");
- exit(-1);
- }
-
- LOG_I(EMU, "OAI CLI is enabled\n");
- LOG_I(EMU,"eNB start state is %d, UE start state %d\n",
- oai_emulation.info.cli_start_enb[0],
- oai_emulation.info.cli_start_ue[0]);
- }
-
- if (oai_emulation.info.opp_enabled)
- opp_enabled = 1;
-
- //bin/LOG_I(OCG, "OPT output file directory = %s\n", oai_emulation.info.output_path);
- oai_emulation.info.opt_enabled = ( oai_emulation.emulation_config.packet_trace.enabled == 0) ? oai_emulation.info.opt_enabled : oai_emulation.emulation_config.packet_trace.enabled;
-
- if (oai_emulation.info.opt_enabled == 1) {
- radio_type_t radio_type;
- opt_enabled = 1;
-
- if (oai_emulation.info.frame_type[0] == FDD) {
- radio_type = RADIO_TYPE_FDD;
- } else {
- radio_type = RADIO_TYPE_TDD;
- }
-
- opt_type = oai_emulation.info.opt_mode;
-
- if (init_opt(NULL, NULL, NULL, radio_type) == -1) {
- LOG_E(OPT,"failed to run OPT \n");
- }
- }
-
- return 1;
-}
-
-void ocg_config_proto(void)
-{
-
- LOG_I(MAC,"num groups is set to %d\n",oai_emulation.protocol_config.eNB_mac_config.num_groups);
-
-}
-
diff --git a/targets/SIMU/USER/oaisim_config.h b/targets/SIMU/USER/oaisim_config.h
deleted file mode 100644
index a403252d06..0000000000
--- a/targets/SIMU/USER/oaisim_config.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-/*! \file oaisim_config.h
-* \brief configure an emulation
-* \author navid nikaein & Lusheng Wang
-* \date 2006-2010
-* \version 4.0
-* \company Eurecom
-* \email: openair_tech@eurecom.fr
-* \note this a note
-* \bug this is a bug
-* \warning this is a warning
-*/
-
-//-----------------------------------begin group-----------------------------
-/** @defgroup _oaisim The sturcture of OAISIM
-
-The current sturcture of oaisim is shown by the figure.
-
-\image html new_OCG_structure.png "new_OCG_structure"
-
-
- * @{*/
-
-/* @}*/
-
-#include "UTIL/LOG/log_if.h"
-#include "UTIL/LOG/log_extern.h"
-#include "UTIL/OCG/OCG.h"
-#include "UTIL/OPT/opt.h" // to test OPT
-#include "UTIL/OMG/omg.h"
-#include "UTIL/CLI/cli_if.h"
-#include "PHY/defs_eNB.h"
-#include "PHY/phy_extern.h"
-
-/** @defgroup _init_oai Initial oaisim
- * @ingroup _fn
- * @brief Initialize all the parameters before start an emulation
- * @{*/
-void init_oai_emulation(void);
-/* @}*/
-
-/** @defgroup _config_oaisim All the configurations for an emulation
- * @ingroup _fn
- * @brief This is the function that calls all the other configuration functions
- * @{*/
-void oaisim_config(void);
-/* @}*/
-
-
-/** @defgroup _config_module Configuration functions for various modules
- * @ingroup _fn
- * @brief There are the functions to configure different various modules in the emulator
- * @{*/
-int olg_config(void);
-int ocg_config_env(void);
-int ocg_config_omg(void);
-int ocg_config_topo(void);
-int ocg_config_app(void);
-int ocg_config_emu(void);
-
-int flow_start_time(int sid, int did, uint32_t n_frames, uint32_t start, uint32_t duration);
-/* @}*/
-
diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c
deleted file mode 100644
index c159f11371..0000000000
--- a/targets/SIMU/USER/oaisim_functions.c
+++ /dev/null
@@ -1,1628 +0,0 @@
-/*
- * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The OpenAirInterface Software Alliance licenses this file to You under
- * the OAI Public License, Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.openairinterface.org/?page_id=698
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *-------------------------------------------------------------------------------
- * For more information about the OpenAirInterface (OAI) Software Alliance:
- * contact@openairinterface.org
- */
-
-/*! \file oaisim_functions.c
-* \brief function primitives of oaisim
-* \author Navid Nikaein
-* \date 2013-2015
-* \version 1.0
-* \company Eurecom
-* \email: openair_tech@eurecom.fr
-* \note
-* \warning
-*/
-
-
-#include
-#include