full IF4p5 simulation working

This commit is contained in:
Raymond Knopp
2018-04-29 09:35:23 -07:00
parent 596736afae
commit ea784f2b4b
82 changed files with 711 additions and 849 deletions
+33 -57
View File
@@ -635,12 +635,6 @@ add_boolean_option(DEBUG_PHY False "Enable PHY layer debugging opt
add_boolean_option(DEBUG_PHY_PROC False "Enable debugging of PHY layer procedures") add_boolean_option(DEBUG_PHY_PROC False "Enable debugging of PHY layer procedures")
add_boolean_option(DEBUG_DLSCH False "Enable debugging of DLSCH physical layer channel") add_boolean_option(DEBUG_DLSCH False "Enable debugging of DLSCH physical layer channel")
##########################
# 802.21 options
##########################
add_boolean_option(ENABLE_RAL False "ENABLE 802.21 INTERFACE")
add_boolean_option(USE_3GPP_ADDR_AS_LINK_ADDR False "As per attribute name")
########################## ##########################
# NAS LAYER OPTIONS # NAS LAYER OPTIONS
########################## ##########################
@@ -743,9 +737,6 @@ include_directories("${OPENAIR2_DIR}/LAYER2/RLC/TM_v9.3.0")
include_directories("${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0") include_directories("${OPENAIR2_DIR}/LAYER2/PDCP_v10.1.0")
include_directories("${OPENAIR2_DIR}/RRC/LTE/MESSAGES") include_directories("${OPENAIR2_DIR}/RRC/LTE/MESSAGES")
include_directories("${OPENAIR2_DIR}/RRC/LTE") include_directories("${OPENAIR2_DIR}/RRC/LTE")
include_directories("${OPENAIR3_DIR}/RAL-LTE/INTERFACE-802.21/INCLUDE")
include_directories("${OPENAIR3_DIR}/RAL-LTE/LTE_RAL_ENB/INCLUDE")
include_directories("${OPENAIR3_DIR}/RAL-LTE/LTE_RAL_UE/INCLUDE")
include_directories("${OPENAIR_DIR}/common/utils") include_directories("${OPENAIR_DIR}/common/utils")
include_directories("${OPENAIR_DIR}/common/utils/itti") include_directories("${OPENAIR_DIR}/common/utils/itti")
include_directories("${OPENAIR3_DIR}/NAS/COMMON") include_directories("${OPENAIR3_DIR}/NAS/COMMON")
@@ -963,17 +954,21 @@ set(SECU_CN_SRC
) )
add_library(SECU_CN ${SECU_CN_SRC}) add_library(SECU_CN ${SECU_CN_SRC})
# Scheduler # Physical Channel Procedures Scheduling
################################" ################################"
set(SCHED_SRC set(SCHED_SRC
${OPENAIR1_DIR}/SCHED/fapi_l1.c ${OPENAIR1_DIR}/SCHED/fapi_l1.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_eNb.c ${OPENAIR1_DIR}/SCHED/phy_procedures_lte_eNb.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c ${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
${OPENAIR1_DIR}/SCHED/prach_procedures.c
${OPENAIR1_DIR}/SCHED/ru_procedures.c
) )
add_library(SCHED_LIB ${SCHED_SRC}) add_library(SCHED_LIB ${SCHED_SRC})
set(SCHED_SRC_RU
${OPENAIR1_DIR}/SCHED/ru_procedures.c
${OPENAIR1_DIR}/SCHED/prach_procedures.c
)
add_library(SCHED_RU_LIB ${SCHED_SRC_RU})
set(SCHED_SRC_UE set(SCHED_SRC_UE
${OPENAIR1_DIR}/SCHED_UE/phy_procedures_lte_ue.c ${OPENAIR1_DIR}/SCHED_UE/phy_procedures_lte_ue.c
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c ${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
@@ -1114,24 +1109,29 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/phich.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pcfich.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pucch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/pmch.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_demodulation.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_decoding.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/ulsch_decoding.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/rar_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools.c ${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/uci_tools.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c
${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz.c
${OPENAIR1_DIR}/PHY/MODULATION/beamforming.c
${OPENAIR1_DIR}/PHY/MODULATION/compute_bf_weights.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/freq_equalization.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_adjust_sync_eNB.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_eNB_measurements.c ${OPENAIR1_DIR}/PHY/LTE_ESTIMATION/lte_eNB_measurements.c
${OPENAIR1_DIR}/PHY/INIT/lte_init.c ${OPENAIR1_DIR}/PHY/INIT/lte_init.c
)
set(PHY_SRC_RU
# actual source
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if4_tools.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/if5_tools.c
${OPENAIR1_DIR}/PHY/MODULATION/slot_fep_ul.c
${OPENAIR1_DIR}/PHY/MODULATION/ul_7_5_kHz.c
${OPENAIR1_DIR}/PHY/MODULATION/beamforming.c
${OPENAIR1_DIR}/PHY/MODULATION/compute_bf_weights.c
${OPENAIR1_DIR}/PHY/INIT/lte_init_ru.c ${OPENAIR1_DIR}/PHY/INIT/lte_init_ru.c
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/prach.c
) )
set(PHY_SRC_UE set(PHY_SRC_UE
@@ -1181,6 +1181,7 @@ endif ()
add_library(PHY_COMMON ${PHY_SRC_COMMON}) add_library(PHY_COMMON ${PHY_SRC_COMMON})
add_library(PHY ${PHY_SRC}) add_library(PHY ${PHY_SRC})
add_library(PHY_UE ${PHY_SRC_UE}) add_library(PHY_UE ${PHY_SRC_UE})
add_library(PHY_RU ${PHY_SRC_RU})
#Layer 2 library #Layer 2 library
##################### #####################
@@ -1333,32 +1334,6 @@ include_directories(${NFAPI_USER_DIR})
# L3 Libs # L3 Libs
########################## ##########################
set(RAL_LTE_DIR ${OPENAIR3_DIR}/RAL-LTE/)
if (${ENABLE_RAL})
set(RAL_LTE_SRC
${RRC_DIR}/rrc_UE_ral.c
${RRC_DIR}/rrc_eNB_ral.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_action.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_main.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_mih_msg.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_parameters.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_process.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_rrc_msg.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_subscribe.c
${RAL_LTE_DIR}LTE_RAL_ENB/SRC/lteRALenb_thresholds.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_action.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_main.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_mih_msg.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_parameters.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_process.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_rrc_msg.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_subscribe.c
${RAL_LTE_DIR}LTE_RAL_UE/SRC/lteRALue_thresholds.c
)
add_library(RAL ${RAL_LTE_SRC})
set(RAL_LIB RAL)
endif()
# CN libs # CN libs
########################## ##########################
@@ -1909,7 +1884,7 @@ add_executable(lte-softmodem
target_link_libraries (lte-softmodem target_link_libraries (lte-softmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB PHY_COMMON PHY LFDS L2 RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl) -Wl,--end-group z dl)
@@ -1945,7 +1920,7 @@ add_executable(lte-softmodem-nos1
) )
target_link_libraries (lte-softmodem-nos1 target_link_libraries (lte-softmodem-nos1
-Wl,--start-group -Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB PHY_COMMON PHY LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB} RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB}
${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7 ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl ) -Wl,--end-group z dl )
@@ -1981,7 +1956,7 @@ add_executable(lte-uesoftmodem
target_link_libraries (lte-uesoftmodem target_link_libraries (lte-uesoftmodem
-Wl,--start-group -Wl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_UE_LIB PHY_COMMON PHY_UE 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
${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MSC_LIB} ${RAL_LIB} ${NAS_UE_LIB} ${ITTI_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7
-Wl,--end-group z dl) -Wl,--end-group z dl)
@@ -2014,7 +1989,7 @@ add_executable(lte-uesoftmodem-nos1
) )
target_link_libraries (lte-uesoftmodem-nos1 target_link_libraries (lte-uesoftmodem-nos1
-Wl,--start-group -Wl,--start-group
RRC_LIB SECU_CN SECU_OSA UTIL HASHTABLE SCHED_UE_LIB PHY_COMMON PHY_UE 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 ${MSC_LIB} ${RAL_LIB} ${ITTI_LIB}
${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 ${MIH_LIB} ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7
-Wl,--end-group z dl ) -Wl,--end-group z dl )
@@ -2056,12 +2031,12 @@ add_executable(oaisim
${rrc_h} ${rrc_h}
${s1ap_h} ${s1ap_h}
${x2ap_h} ${x2ap_h}
# ${OPENAIR_BIN_DIR}/messages_xml.h ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-ru.c ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c ${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c
${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c # ${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c
${OPENAIR_TARGETS}/SIMU/USER/sinr_sim.c ${OPENAIR_TARGETS}/SIMU/USER/sinr_sim.c
${OPENAIR_TARGETS}/SIMU/USER/cor_SF_sim.c ${OPENAIR_TARGETS}/SIMU/USER/cor_SF_sim.c
${OPENAIR_TARGETS}/SIMU/USER/oaisim_functions.c ${OPENAIR_TARGETS}/SIMU/USER/oaisim_functions.c
@@ -2084,7 +2059,7 @@ add_executable(oaisim
target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER) target_include_directories(oaisim PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim target_link_libraries (oaisim
-Wl,-ldl,--start-group -Wl,-ldl,--start-group
RRC_LIB S1AP_LIB S1AP_ENB X2AP_LIB SECU_CN UTIL HASHTABLE SCTP_CLIENT UDP SCHED_UE_LIB PHY_COMMON PHY_UE LFDS L2_UE ${MSC_LIB} LIB_NAS_UE SIMU SECU_OSA ${ITTI_LIB} ${MIH_LIB} 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 ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} ${FLEXRAN_AGENT_LIB} LFDS7
-Wl,--end-group z dl) -Wl,--end-group z dl)
@@ -2102,12 +2077,13 @@ add_executable(oaisim_nos1
${rrc_h} ${rrc_h}
${s1ap_h} ${s1ap_h}
${x2ap_h} ${x2ap_h}
# ${OPENAIR_BIN_DIR}/messages_xml.h ${OPENAIR_BIN_DIR}/messages_xml.h
${OPENAIR_TARGETS}/RT/USER/lte-ue.c ${OPENAIR_TARGETS}/RT/USER/lte-ue.c
${OPENAIR_TARGETS}/RT/USER/lte-ru.c ${OPENAIR_TARGETS}/RT/USER/lte-ru.c
${OPENAIR1_DIR}/SCHED/prach_procedures.c
${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c ${OPENAIR_TARGETS}/RT/USER/rt_wrapper.c
${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c ${OPENAIR_TARGETS}/SIMU/USER/channel_sim.c
${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c # ${OPENAIR_TARGETS}/SIMU/USER/oaisim_config.c
${OPENAIR_TARGETS}/SIMU/USER/sinr_sim.c ${OPENAIR_TARGETS}/SIMU/USER/sinr_sim.c
${OPENAIR_TARGETS}/SIMU/USER/cor_SF_sim.c ${OPENAIR_TARGETS}/SIMU/USER/cor_SF_sim.c
${OPENAIR_TARGETS}/SIMU/USER/oaisim_functions.c ${OPENAIR_TARGETS}/SIMU/USER/oaisim_functions.c
@@ -2126,7 +2102,7 @@ add_executable(oaisim_nos1
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER) target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim_nos1 target_link_libraries (oaisim_nos1
-Wl,--start-group -Wl,--start-group
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_UE_LIB PHY_COMMON PHY_UE LFDS ${MSC_LIB} ${ITTI_LIB} SIMU L2_UE ${FLPT_MSG_LIB} ${ASYNC_IF_LIB} LFDS7 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 ) -Wl,--end-group z dl )
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES}) target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
@@ -2151,7 +2127,7 @@ add_executable(dlsim_tm4
${T_SOURCE} ${T_SOURCE}
) )
target_link_libraries (dlsim_tm4 target_link_libraries (dlsim_tm4
-Wl,--start-group SIMU UTIL SCHED_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group -Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY LFDS ${ITTI_LIB} -Wl,--end-group
pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB}
) )
@@ -2167,7 +2143,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
) )
target_link_libraries (${myExe} target_link_libraries (${myExe}
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_UE_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group -Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY PHY_UE LFDS ${ITTI_LIB} LFDS7 -Wl,--end-group
pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl pthread m rt ${CONFIG_LIBRARIES} ${ATLAS_LIBRARIES} ${XFORMS_LIBRARIES} ${T_LIB} dl
) )
endforeach(myExe) endforeach(myExe)
+3
View File
@@ -49,6 +49,9 @@ extern RAN_CONTEXT_t RC;
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "openair2/LAYER2/MAC/mac_proto.h" #include "openair2/LAYER2/MAC/mac_proto.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#define NUM_P5_PHY 2 #define NUM_P5_PHY 2
#define _GNU_SOURCE #define _GNU_SOURCE
@@ -41,6 +41,7 @@
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
#ifndef TEST_DEBUG #ifndef TEST_DEBUG
#include "PHY/impl_defs_top.h"
#include "PHY/defs_common.h" #include "PHY/defs_common.h"
#include "PHY/CODING/coding_defs.h" #include "PHY/CODING/coding_defs.h"
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
+3
View File
@@ -23,6 +23,9 @@
#include "phy_init.h" #include "phy_init.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "PHY/CODING/coding_extern.h" #include "PHY/CODING/coding_extern.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
void generate_64qam_table(void) void generate_64qam_table(void)
{ {
+1
View File
@@ -25,6 +25,7 @@
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h" #include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "SIMULATION/TOOLS/sim.h" #include "SIMULATION/TOOLS/sim.h"
#include "RadioResourceConfigCommonSIB.h" #include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h" #include "RadioResourceConfigDedicated.h"
+3
View File
@@ -30,6 +30,9 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "phy_init.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
extern PHY_VARS_eNB *eNB; extern PHY_VARS_eNB *eNB;
extern PHY_VARS_UE *UE; extern PHY_VARS_UE *UE;
@@ -24,7 +24,7 @@
#include "PHY/phy_extern_ue.h" #include "PHY/phy_extern_ue.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "lte_estimation_defs.h" #include "lte_estimation.h"
#define DEBUG_PHY #define DEBUG_PHY
@@ -21,7 +21,7 @@
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation_defs.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
@@ -26,7 +26,7 @@
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h" #include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "T.h" #include "T.h"
#include "lte_estimation_defs.h" #include "lte_estimation.h"
// round(exp(sqrt(-1)*(pi/2)*[0:1:N-1]/N)*pow2(15)) // round(exp(sqrt(-1)*(pi/2)*[0:1:N-1]/N)*pow2(15))
static int16_t ru_90[2*128] = {32767, 0,32766, 402,32758, 804,32746, 1206,32729, 1608,32706, 2009,32679, 2411,32647, 2811,32610, 3212,32568, 3612,32522, 4011,32470, 4410,32413, 4808,32352, 5205,32286, 5602,32214, 5998,32138, 6393,32058, 6787,31972, 7180,31881, 7571,31786, 7962,31686, 8351,31581, 8740,31471, 9127,31357, 9512,31238, 9896,31114, 10279,30986, 10660,30853, 11039,30715, 11417,30572, 11793,30425, 12167,30274, 12540,30118, 12910,29957, 13279,29792, 13646,29622, 14010,29448, 14373,29269, 14733,29086, 15091,28899, 15447,28707, 15800,28511, 16151,28311, 16500,28106, 16846,27897, 17190,27684, 17531,27467, 17869,27246, 18205,27020, 18538,26791, 18868,26557, 19195,26320, 19520,26078, 19841,25833, 20160,25583, 20475,25330, 20788,25073, 21097,24812, 21403,24548, 21706,24279, 22006,24008, 22302,23732, 22595,23453, 22884,23170, 23170,22884, 23453,22595, 23732,22302, 24008,22006, 24279,21706, 24548,21403, 24812,21097, 25073,20788, 25330,20475, 25583,20160, 25833,19841, 26078,19520, 26320,19195, 26557,18868, 26791,18538, 27020,18205, 27246,17869, 27467,17531, 27684,17190, 27897,16846, 28106,16500, 28311,16151, 28511,15800, 28707,15447, 28899,15091, 29086,14733, 29269,14373, 29448,14010, 29622,13646, 29792,13279, 29957,12910, 30118,12540, 30274,12167, 30425,11793, 30572,11417, 30715,11039, 30853,10660, 30986,10279, 31114,9896, 31238,9512, 31357,9127, 31471,8740, 31581,8351, 31686,7962, 31786,7571, 31881,7180, 31972,6787, 32058,6393, 32138,5998, 32214,5602, 32286,5205, 32352,4808, 32413,4410, 32470,4011, 32522,3612, 32568,3212, 32610,2811, 32647,2411, 32679,2009, 32706,1608, 32729,1206, 32746,804, 32758,402, 32766}; static int16_t ru_90[2*128] = {32767, 0,32766, 402,32758, 804,32746, 1206,32729, 1608,32706, 2009,32679, 2411,32647, 2811,32610, 3212,32568, 3612,32522, 4011,32470, 4410,32413, 4808,32352, 5205,32286, 5602,32214, 5998,32138, 6393,32058, 6787,31972, 7180,31881, 7571,31786, 7962,31686, 8351,31581, 8740,31471, 9127,31357, 9512,31238, 9896,31114, 10279,30986, 10660,30853, 11039,30715, 11417,30572, 11793,30425, 12167,30274, 12540,30118, 12910,29957, 13279,29792, 13646,29622, 14010,29448, 14373,29269, 14733,29086, 15091,28899, 15447,28707, 15800,28511, 16151,28311, 16500,28106, 16846,27897, 17190,27684, 17531,27467, 17869,27246, 18205,27020, 18538,26791, 18868,26557, 19195,26320, 19520,26078, 19841,25833, 20160,25583, 20475,25330, 20788,25073, 21097,24812, 21403,24548, 21706,24279, 22006,24008, 22302,23732, 22595,23453, 22884,23170, 23170,22884, 23453,22595, 23732,22302, 24008,22006, 24279,21706, 24548,21403, 24812,21097, 25073,20788, 25330,20475, 25583,20160, 25833,19841, 26078,19520, 26320,19195, 26557,18868, 26791,18538, 27020,18205, 27246,17869, 27467,17531, 27684,17190, 27897,16846, 28106,16500, 28311,16151, 28511,15800, 28707,15447, 28899,15091, 29086,14733, 29269,14373, 29448,14010, 29622,13646, 29792,13279, 29957,12910, 30118,12540, 30274,12167, 30425,11793, 30572,11417, 30715,11039, 30853,10660, 30986,10279, 31114,9896, 31238,9512, 31357,9127, 31471,8740, 31581,8351, 31686,7962, 31786,7571, 31881,7180, 31972,6787, 32058,6393, 32138,5998, 32214,5602, 32286,5205, 32352,4808, 32413,4410, 32470,4011, 32522,3612, 32568,3212, 32610,2811, 32647,2411, 32679,2009, 32706,1608, 32729,1206, 32746,804, 32758,402, 32766};
+1
View File
@@ -44,6 +44,7 @@
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_TRANSPORT/transport_extern.h" #include "PHY/LTE_TRANSPORT/transport_extern.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#define DEBUG_DCI_ENCODING 1 //#define DEBUG_DCI_ENCODING 1
//#define DEBUG_DCI_DECODING 1 //#define DEBUG_DCI_DECODING 1
+1 -1
View File
@@ -46,7 +46,7 @@
//#define DEBUG_DCI //#define DEBUG_DCI
#include "dci_tools_common_extern.h" #include "dci_tools_common_extern.h"
#include "transport_proto.h"
int8_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type) int8_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type)
{ {
@@ -38,7 +38,8 @@
#endif #endif
#include "assertions.h" #include "assertions.h"
#include "nfapi_interface.h" #include "nfapi_interface.h"
#include "transport_common_proto.h"
#include "SCHED/sched_common.h"
//#define DEBUG_HARQ //#define DEBUG_HARQ
@@ -36,6 +36,7 @@
#include "PHY/CODING/lte_interleaver_inline.h" #include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_TRANSPORT/transport_eNB.h" #include "PHY/LTE_TRANSPORT/transport_eNB.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
//#define DEBUG_DLSCH_MODULATION //#define DEBUG_DLSCH_MODULATION
#define NEW_ALLOC_RE #define NEW_ALLOC_RE
@@ -189,7 +189,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
void init_scrambling_lut() { void init_scrambling_lut(void) {
uint32_t s; uint32_t s;
int i=0,j; int i=0,j;
@@ -242,7 +242,7 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
} }
} }
void init_unscrambling_lut() { void init_unscrambling_lut(void) {
uint32_t s; uint32_t s;
int i=0,j; int i=0,j;
+1
View File
@@ -42,6 +42,7 @@
#include "assertions.h" #include "assertions.h"
#include "T.h" #include "T.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#define DEBUG_DCI_ENCODING 1 //#define DEBUG_DCI_ENCODING 1
//#define DEBUG_DCI_DECODING 1 //#define DEBUG_DCI_DECODING 1
@@ -30,6 +30,7 @@
* \warning * \warning
*/ */
#include "PHY/defs_common.h" #include "PHY/defs_common.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#define DEBUG_GROUPHOP 1 //#define DEBUG_GROUPHOP 1
+1
View File
@@ -36,6 +36,7 @@
#include "transport_proto.h" #include "transport_proto.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#define DEBUG_PBCH 1 //#define DEBUG_PBCH 1
//#define DEBUG_PBCH_ENCODING //#define DEBUG_PBCH_ENCODING
+1
View File
@@ -31,6 +31,7 @@
*/ */
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#define DEBUG_PCFICH //#define DEBUG_PCFICH
extern uint8_t pcfich_b[4][32]; extern uint8_t pcfich_b[4][32];
+2
View File
@@ -34,6 +34,8 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/impl_defs_top.h" #include "PHY/impl_defs_top.h"
#include "T.h" #include "T.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "transport_common_proto.h"
//#define DEBUG_PHICH 1 //#define DEBUG_PHICH 1
+1
View File
@@ -30,6 +30,7 @@
* \warning * \warning
*/ */
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
void generate_pilots(PHY_VARS_eNB *eNB, void generate_pilots(PHY_VARS_eNB *eNB,
int32_t **txdataF, int32_t **txdataF,
+1 -1
View File
@@ -31,7 +31,7 @@
*/ */
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
int generate_mbsfn_pilot(PHY_VARS_eNB *eNB, int generate_mbsfn_pilot(PHY_VARS_eNB *eNB,
eNB_rxtx_proc_t *proc, eNB_rxtx_proc_t *proc,
@@ -35,6 +35,7 @@
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "T.h" #include "T.h"
@@ -157,6 +157,8 @@ void generate_pcfich_reg_mapping(LTE_DL_FRAME_PARMS *frame_parms);
void generate_phich_reg_mapping(LTE_DL_FRAME_PARMS *frame_parms); void generate_phich_reg_mapping(LTE_DL_FRAME_PARMS *frame_parms);
uint32_t check_phich_reg(LTE_DL_FRAME_PARMS *frame_parms,uint32_t kprime,uint8_t lprime,uint8_t mi);
void generate_RIV_tables(void); void generate_RIV_tables(void);
/** \brief This routine provides the relationship between a PHICH TXOp and its corresponding PUSCH subframe (Table 8.3.-1 from 36.213). /** \brief This routine provides the relationship between a PHICH TXOp and its corresponding PUSCH subframe (Table 8.3.-1 from 36.213).
@@ -267,9 +269,16 @@ uint64_t pmi2hex_2Ar1(uint32_t pmi);
uint64_t pmi2hex_2Ar2(uint32_t pmi); uint64_t pmi2hex_2Ar2(uint32_t pmi);
uint8_t get_pmi(uint8_t N_RB_DL,MIMO_mode_t mode, uint32_t pmi_alloc,uint16_t rb);
// DL power control functions // DL power control functions
double get_pa_dB(uint8_t pa); double get_pa_dB(uint8_t pa);
void init_scrambling_lut(void);
void init_unscrambling_lut(void);
uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms, uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t prach_ConfigIndex, uint8_t prach_ConfigIndex,
uint8_t n_ra_prboffset, uint8_t n_ra_prboffset,
@@ -535,6 +535,7 @@ void pdcch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
int8_t* llr, int8_t* llr,
uint32_t length); uint32_t length);
void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms, void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
int mbsfn_flag, int mbsfn_flag,
LTE_eNB_DLSCH_t *dlsch, LTE_eNB_DLSCH_t *dlsch,
@@ -606,6 +607,9 @@ double computeRhoB_eNB(uint8_t pa,
void conv_eMTC_rballoc(uint16_t resource_block_coding,
uint32_t N_RB_DL,
uint32_t *rb_alloc);
int8_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type); int8_t find_dlsch(uint16_t rnti, PHY_VARS_eNB *eNB,find_type_t type);
@@ -43,6 +43,7 @@
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
//#define DEBUG_ULSCH_DECODING //#define DEBUG_ULSCH_DECODING
#include "targets/RT/USER/rt_wrapper.h" #include "targets/RT/USER/rt_wrapper.h"
#include "transport_proto.h"
extern int codingw; extern int codingw;
@@ -35,6 +35,9 @@
#include "transport_eNB.h" #include "transport_eNB.h"
//#define DEBUG_ULSCH //#define DEBUG_ULSCH
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
#include "transport_common_proto.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "T.h" #include "T.h"
@@ -1103,7 +1106,7 @@ void ulsch_channel_level(int32_t **drs_ch_estimates_ext,
int ulsch_power_LUT[750]; int ulsch_power_LUT[750];
void init_ulsch_power_LUT() { void init_ulsch_power_LUT(void) {
int i; int i;
+6 -6
View File
@@ -1263,7 +1263,7 @@ void compute_llr_offset(LTE_DL_FRAME_PARMS *frame_parms,
pdsch_vars->llr_offset[pdcch_vars->num_pdcch_symbols] = 0; pdsch_vars->llr_offset[pdcch_vars->num_pdcch_symbols] = 0;
LOG_I(PHY,"compute_llr_offset: nb RB %d - Qm %d \n", nb_rb_alloc, dlsch0_harq->Qm); LOG_D(PHY,"compute_llr_offset: nb RB %d - Qm %d \n", nb_rb_alloc, dlsch0_harq->Qm);
//dlsch0_harq->rb_alloc_even; //dlsch0_harq->rb_alloc_even;
//dlsch0_harq->rb_alloc_odd; //dlsch0_harq->rb_alloc_odd;
@@ -1293,14 +1293,14 @@ void compute_llr_offset(LTE_DL_FRAME_PARMS *frame_parms,
if(symbol < (frame_parms->symbols_per_tti-1)) if(symbol < (frame_parms->symbols_per_tti-1))
pdsch_vars->llr_offset[symbol+1] = pdsch_vars->llr_offset[symbol] + llr_offset; pdsch_vars->llr_offset[symbol+1] = pdsch_vars->llr_offset[symbol] + llr_offset;
LOG_I(PHY,"Granted Re subframe %d / symbol %d => %d (%d RBs)\n", subframe, symbol_mod, granted_re,dlsch0_harq->nb_rb); LOG_D(PHY,"Granted Re subframe %d / symbol %d => %d (%d RBs)\n", subframe, symbol_mod, granted_re,dlsch0_harq->nb_rb);
LOG_I(PHY,"Pbch/PSS/SSS Re subframe %d / symbol %d => %d \n", subframe, symbol_mod, pbch_pss_sss_re); LOG_D(PHY,"Pbch/PSS/SSS Re subframe %d / symbol %d => %d \n", subframe, symbol_mod, pbch_pss_sss_re);
LOG_I(PHY,"CRS Re Per PRB subframe %d / symbol %d => %d \n", subframe, symbol_mod, crs_re); LOG_D(PHY,"CRS Re Per PRB subframe %d / symbol %d => %d \n", subframe, symbol_mod, crs_re);
LOG_I(PHY,"Data Re subframe %d / symbol %d => %d \n", subframe, symbol_mod, data_re); LOG_D(PHY,"Data Re subframe %d / symbol %d => %d \n", subframe, symbol_mod, data_re);
LOG_I(PHY,"Data Re subframe %d-symbol %d => llr length %d, llr offset %d \n", subframe, symbol, LOG_D(PHY,"Data Re subframe %d-symbol %d => llr length %d, llr offset %d \n", subframe, symbol,
pdsch_vars->llr_length[symbol], pdsch_vars->llr_offset[symbol]); pdsch_vars->llr_length[symbol], pdsch_vars->llr_offset[symbol]);
} }
} }
+114 -123
View File
@@ -39,6 +39,8 @@
#include "SIMULATION/TOOLS/sim.h" // for taus #include "SIMULATION/TOOLS/sim.h" // for taus
#include "PHY/sse_intrin.h" #include "PHY/sse_intrin.h"
#include "PHY/LTE_TRANSPORT/transport_extern.h" #include "PHY/LTE_TRANSPORT/transport_extern.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "SCHED/sched_common.h"
#include "assertions.h" #include "assertions.h"
#include "T.h" #include "T.h"
@@ -155,11 +157,11 @@ void pdcch_demapping(uint16_t *llr,uint16_t *wbar,LTE_DL_FRAME_PARMS *frame_parm
// if REG is allocated to PHICH, skip it // if REG is allocated to PHICH, skip it
if (check_phich_reg(frame_parms,kprime,lprime,mi) == 1) { if (check_phich_reg(frame_parms,kprime,lprime,mi) == 1) {
// printf("dci_demapping : skipping REG %d (RE %d)\n",(lprime==0)?kprime/6 : kprime>>2,kprime); // printf("dci_demapping : skipping REG %d (RE %d)\n",(lprime==0)?kprime/6 : kprime>>2,kprime);
if ((lprime == 0)&&((kprime%6)==0)) if ((lprime == 0)&&((kprime%6)==0))
re_offset0+=4; re_offset0+=4;
} else { // not allocated to PHICH/PCFICH } else { // not allocated to PHICH/PCFICH
// printf("dci_demapping: REG %d\n",(lprime==0)?kprime/6 : kprime>>2); // printf("dci_demapping: REG %d\n",(lprime==0)?kprime/6 : kprime>>2);
if (lprime == 0) { if (lprime == 0) {
// first symbol, or second symbol+4 TX antennas skip pilots // first symbol, or second symbol+4 TX antennas skip pilots
kprime_mod12 = kprime%12; kprime_mod12 = kprime%12;
@@ -170,7 +172,7 @@ void pdcch_demapping(uint16_t *llr,uint16_t *wbar,LTE_DL_FRAME_PARMS *frame_parm
for (i=0; i<4; i++) { for (i=0; i<4; i++) {
wbar[mprime] = llr[tti_offset0+i]; wbar[mprime] = llr[tti_offset0+i];
#ifdef DEBUG_DCI_DECODING #ifdef DEBUG_DCI_DECODING
// LOG_I(PHY,"PDCCH demapping mprime %d.%d <= llr %d (symbol %d re %d) -> (%d,%d)\n",mprime/4,i,tti_offset0+i,symbol_offset,re_offset0,*(char*)&wbar[mprime],*(1+(char*)&wbar[mprime])); LOG_I(PHY,"PDCCH demapping mprime %d.%d <= llr %d (symbol %d re %d) -> (%d,%d)\n",mprime/4,i,tti_offset0+i,symbol_offset,re_offset0,*(char*)&wbar[mprime],*(1+(char*)&wbar[mprime]));
#endif #endif
mprime++; mprime++;
re_offset0++; re_offset0++;
@@ -335,7 +337,7 @@ int32_t pdcch_llr(LTE_DL_FRAME_PARMS *frame_parms,
else else
*pdcch_llr8 = (char)(*rxF); *pdcch_llr8 = (char)(*rxF);
// printf("%d %d => %d\n",i,*rxF,*pdcch_llr8); // printf("rxF->llr : %d %d => %d\n",i,*rxF,*pdcch_llr8);
rxF++; rxF++;
pdcch_llr8++; pdcch_llr8++;
} }
@@ -396,7 +398,7 @@ void pdcch_channel_level(int32_t **dl_ch_estimates_ext,
((int32_t*)&avg128P)[2] + ((int32_t*)&avg128P)[2] +
((int32_t*)&avg128P)[3])/(nb_rb*12); ((int32_t*)&avg128P)[3])/(nb_rb*12);
// printf("Channel level : %d\n",avg[(aatx<<1)+aarx]); // printf("Channel level : %d\n",avg[(aatx<<1)+aarx]);
} }
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
@@ -510,7 +512,6 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
int nushiftmod3 = frame_parms->nushift%3; int nushiftmod3 = frame_parms->nushift%3;
uint8_t symbol_mod; uint8_t symbol_mod;
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
#ifdef DEBUG_DCI_DECODING #ifdef DEBUG_DCI_DECODING
LOG_I(PHY, "extract_rbs_single: symbol_mod %d\n",symbol_mod); LOG_I(PHY, "extract_rbs_single: symbol_mod %d\n",symbol_mod);
@@ -563,9 +564,9 @@ void pdcch_extract_rbs_single(int32_t **rxdataF,
(i!=(nushiftmod3+6)) && (i!=(nushiftmod3+6)) &&
(i!=(nushiftmod3+9))) { (i!=(nushiftmod3+9))) {
rxF_ext[j]=rxF[i]; rxF_ext[j]=rxF[i];
// printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j])); //printf("extract rb %d, re %d => (%d,%d)\n",rb,i,*(short *)&rxF_ext[j],*(1+(short*)&rxF_ext[j]));
dl_ch0_ext[j++]=dl_ch0[i]; dl_ch0_ext[j++]=dl_ch0[i];
// printf("ch %d => (%d,%d)\n",i,*(short *)&dl_ch0[i],*(1+(short*)&dl_ch0[i])); //printf("ch %d => (%d,%d)\n",i,*(short *)&dl_ch0[i],*(1+(short*)&dl_ch0[i]));
} }
} }
@@ -1289,8 +1290,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
uint8_t subframe, uint8_t subframe,
uint8_t eNB_id, uint8_t eNB_id,
MIMO_mode_t mimo_mode, MIMO_mode_t mimo_mode,
uint32_t high_speed_flag, uint32_t high_speed_flag)
uint8_t is_secondary_ue)
{ {
LTE_UE_COMMON *common_vars = &ue->common_vars; LTE_UE_COMMON *common_vars = &ue->common_vars;
@@ -1302,34 +1302,26 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
uint8_t n_pdcch_symbols; uint8_t n_pdcch_symbols;
uint8_t mi = get_mi(frame_parms,subframe); uint8_t mi = get_mi(frame_parms,subframe);
//printf("In rx_pdcch, subframe %d, eNB_id %d, pdcch_vars %d \n",subframe,eNB_id,pdcch_vars); // printf("In rx_pdcch, subframe %d, eNB_id %d, pdcch_vars %d, handling symbol 0 \n",subframe,eNB_id,pdcch_vars);
// procress ofdm symbol 0 // procress ofdm symbol 0
if (is_secondary_ue == 1) { if (frame_parms->nb_antenna_ports_eNB>1) {
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF, pdcch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id+1], //add 1 to eNB_id to compensate for the shifted B/F'd pilots from the SeNB common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext, pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
0, 0,
high_speed_flag, high_speed_flag,
frame_parms); frame_parms);
} else if (frame_parms->nb_antenna_ports_eNB>1) { } else {
pdcch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF, pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id], common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext, pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
0, 0,
high_speed_flag, high_speed_flag,
frame_parms); frame_parms);
} else { }
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext,
0,
high_speed_flag,
frame_parms);
}
// compute channel level based on ofdm symbol 0 // compute channel level based on ofdm symbol 0
pdcch_channel_level(pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_channel_level(pdcch_vars[eNB_id]->dl_ch_estimates_ext,
@@ -1345,7 +1337,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
log2_maxh = (log2_approx(avgs)/2) + 5; //+frame_parms->nb_antennas_rx; log2_maxh = (log2_approx(avgs)/2) + 5; //+frame_parms->nb_antennas_rx;
#ifdef UE_DEBUG_TRACE #ifdef UE_DEBUG_TRACE
LOG_D(PHY,"subframe %d: pdcch log2_maxh = %d (%d,%d)\n",subframe,log2_maxh,avgP[0],avgs); LOG_I(PHY,"subframe %d: pdcch log2_maxh = %d (%d,%d)\n",subframe,log2_maxh,avgP[0],avgs);
#endif #endif
T(T_UE_PHY_PDCCH_ENERGY, T_INT(eNB_id), T_INT(frame%1024), T_INT(subframe), T(T_UE_PHY_PDCCH_ENERGY, T_INT(eNB_id), T_INT(frame%1024), T_INT(subframe),
@@ -1363,9 +1355,10 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
if (subframe==5) if (subframe==5) {
write_output("rxF_comp_d.m","rxF_c_d",&pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1); printf("Writing output s0\n");
write_output("rxF_comp_d0.m","rxF_c_d",&pdcch_vars[eNB_id]->rxdataF_comp[0][0*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
}
#endif #endif
if (frame_parms->nb_antennas_rx > 1) { if (frame_parms->nb_antennas_rx > 1) {
@@ -1379,6 +1372,10 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
else else
pdcch_alamouti(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,0); pdcch_alamouti(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,0);
pdcch_llr(frame_parms,
pdcch_vars[eNB_id]->rxdataF_comp,
(char *)pdcch_vars[eNB_id]->llr,
0);
// decode pcfich here and find out pdcch ofdm symbol number // decode pcfich here and find out pdcch ofdm symbol number
@@ -1387,6 +1384,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
pdcch_vars[eNB_id], pdcch_vars[eNB_id],
mimo_mode); mimo_mode);
// printf("In rx_pdcch, subframe %d, num_pdcch_symbols %d \n",subframe,n_pdcch_symbols);
if (n_pdcch_symbols>3) if (n_pdcch_symbols>3)
n_pdcch_symbols=1; n_pdcch_symbols=1;
@@ -1400,54 +1398,47 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
#ifdef DEBUG_DCI_DECODING #ifdef DEBUG_DCI_DECODING
LOG_I(PHY,"demapping: subframe %d, mi %d, tdd_config %d\n",subframe,get_mi(frame_parms,subframe),frame_parms->tdd_config); if (subframe==5) LOG_I(PHY,"demapping: subframe %d, num_pdcch_symbols %d\n",subframe,n_pdcch_symbols);
#endif #endif
// process pdcch ofdm symbol 1 and 2 if necessary // process pdcch ofdm symbol 1 and 2 if necessary
for (int s=1; s<n_pdcch_symbols; s++){ for (int s=1; s<n_pdcch_symbols; s++){
if (is_secondary_ue == 1) { // printf("In rx_pdcch, subframe %d, eNB_id %d, pdcch_vars %d, handling symbol %d \n",subframe,eNB_id,pdcch_vars,s);
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF, if (frame_parms->nb_antenna_ports_eNB>1) {
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id+1], //add 1 to eNB_id to compensate for the shifted B/F'd pilots from the SeNB pdcch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
pdcch_vars[eNB_id]->rxdataF_ext, common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->rxdataF_ext,
s, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
high_speed_flag, s,
frame_parms); high_speed_flag,
} else if (frame_parms->nb_antenna_ports_eNB>1) { frame_parms);
pdcch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s,
high_speed_flag,
frame_parms);
} else { } else {
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF, pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id], common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext, pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s, s,
high_speed_flag, high_speed_flag,
frame_parms); frame_parms);
} }
pdcch_channel_compensation(pdcch_vars[eNB_id]->rxdataF_ext, pdcch_channel_compensation(pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
pdcch_vars[eNB_id]->rxdataF_comp, pdcch_vars[eNB_id]->rxdataF_comp,
(aatx>1) ? pdcch_vars[eNB_id]->rho : NULL, (aatx>1) ? pdcch_vars[eNB_id]->rho : NULL,
frame_parms, frame_parms,
s, s,
log2_maxh); // log2_maxh+I0_shift log2_maxh); // log2_maxh+I0_shift
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
if (subframe==5) if (subframe==5) {
write_output("rxF_comp_d.m","rxF_c_d",&pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1); write_output("rxF_comp_ds.m","rxF_c_ds",&pdcch_vars[eNB_id]->rxdataF_comp[0][s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
}
#endif #endif
if (frame_parms->nb_antennas_rx > 1) { if (frame_parms->nb_antennas_rx > 1) {
@@ -1456,44 +1447,44 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
s); s);
} }
if (mimo_mode == SISO) if (mimo_mode == SISO)
pdcch_siso(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,s); pdcch_siso(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,s);
else else
pdcch_alamouti(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,s); pdcch_alamouti(frame_parms,pdcch_vars[eNB_id]->rxdataF_comp,s);
// printf("subframe %d computing llrs for symbol %d : %p\n",subframe,s,pdcch_vars[eNB_id]->llr);
pdcch_llr(frame_parms, pdcch_llr(frame_parms,
pdcch_vars[eNB_id]->rxdataF_comp, pdcch_vars[eNB_id]->rxdataF_comp,
(char *)pdcch_vars[eNB_id]->llr, (char *)pdcch_vars[eNB_id]->llr,
s); s);
/*#ifdef DEBUG_PHY /*#ifdef DEBUG_PHY
write_output("llr8_seq.m","llr8",&pdcch_vars[eNB_id]->llr[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4); write_output("llr8_seq.m","llr8",&pdcch_vars[eNB_id]->llr[s*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,4);
#endif*/ #endif*/
}
pdcch_demapping(pdcch_vars[eNB_id]->llr,
pdcch_vars[eNB_id]->wbar,
frame_parms,
n_pdcch_symbols,
get_mi(frame_parms,subframe));
pdcch_deinterleaving(frame_parms,
(uint16_t*)pdcch_vars[eNB_id]->e_rx,
pdcch_vars[eNB_id]->wbar,
n_pdcch_symbols,
mi);
pdcch_unscrambling(frame_parms,
subframe,
pdcch_vars[eNB_id]->e_rx,
get_nCCE(n_pdcch_symbols,frame_parms,mi)*72);
pdcch_vars[eNB_id]->num_pdcch_symbols = n_pdcch_symbols;
} // if ((frame&1) ==0 && subframe==5) exit(-1);
return(0);
pdcch_demapping(pdcch_vars[eNB_id]->llr,
pdcch_vars[eNB_id]->wbar,
frame_parms,
n_pdcch_symbols,
get_mi(frame_parms,subframe));
pdcch_deinterleaving(frame_parms,
(uint16_t*)pdcch_vars[eNB_id]->e_rx,
pdcch_vars[eNB_id]->wbar,
n_pdcch_symbols,
mi);
pdcch_unscrambling(frame_parms,
subframe,
pdcch_vars[eNB_id]->e_rx,
get_nCCE(n_pdcch_symbols,frame_parms,mi)*72);
pdcch_vars[eNB_id]->num_pdcch_symbols = n_pdcch_symbols;
return(0);
} }
@@ -1520,10 +1511,10 @@ void pdcch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
} }
// printf("unscrambling %d : e %d, c %d => ",i,llr[i],((s>>(i&0x1f))&1)); // if (subframe == 5) printf("unscrambling %d : e %d, c %d => ",i,llr[i],((s>>(i&0x1f))&1));
if (((s>>(i%32))&1)==0) if (((s>>(i%32))&1)==0)
llr[i] = -llr[i]; llr[i] = -llr[i];
// printf("%d\n",llr[i]); // if (subframe == 5) printf("%d\n",llr[i]);
} }
} }
@@ -1637,7 +1628,7 @@ void dci_decoding(uint8_t DCI_LENGTH,
#ifdef DEBUG_DCI_DECODING #ifdef DEBUG_DCI_DECODING
LOG_I(PHY," Doing DCI Rate Matching RCC %d, w %p\n",RCC,w); LOG_I(PHY," Doing DCI Rate Matching RCC %d, w %p\n",RCC,w_rx);
#endif #endif
lte_rate_matching_cc_rx(RCC,coded_bits,w_rx,dummy_w_rx,e); lte_rate_matching_cc_rx(RCC,coded_bits,w_rx,dummy_w_rx,e);
@@ -1647,10 +1638,10 @@ void dci_decoding(uint8_t DCI_LENGTH,
&w_rx[0]); &w_rx[0]);
#ifdef DEBUG_DCI_DECODING #ifdef DEBUG_DCI_DECODING
if (DCI_LENGTH==27 && ((1<<aggregation_level) == 4))
for (i=0; i<16+DCI_LENGTH; i++) for (int i=0; i<16+DCI_LENGTH; i++)
LOG_I(PHY," DCI %d : (%d,%d,%d)\n",i,*(d_rx+96+(3*i)),*(d_rx+97+(3*i)),*(d_rx+98+(3*i))); LOG_I(PHY," DCI %d : (%d,%d,%d)\n",i,*(d_rx+96+(3*i)),*(d_rx+97+(3*i)),*(d_rx+98+(3*i)));
#endif #endif
memset(decoded_output,0,2+((16+DCI_LENGTH)>>3)); memset(decoded_output,0,2+((16+DCI_LENGTH)>>3));
@@ -36,6 +36,7 @@
#include "SCHED/sched_common_extern.h" #include "SCHED/sched_common_extern.h"
#include "SIMULATION/TOOLS/sim.h" #include "SIMULATION/TOOLS/sim.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
//#define DEBUG_DLSCH_DECODING //#define DEBUG_DLSCH_DECODING
//#define UE_DEBUG_TRACE 1 //#define UE_DEBUG_TRACE 1
+1 -1
View File
@@ -98,7 +98,7 @@ int32_t generate_prach( PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe, uint1
#else //normal case (simulation) #else //normal case (simulation)
prach_start = subframe*ue->frame_parms.samples_per_tti-ue->N_TA_offset; prach_start = subframe*ue->frame_parms.samples_per_tti-ue->N_TA_offset;
LOG_I(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id, LOG_D(PHY,"[UE %d] prach_start %d, rx_offset %d, hw_timing_advance %d, N_TA_offset %d\n", ue->Mod_id,
prach_start, prach_start,
ue->rx_offset, ue->rx_offset,
ue->hw_timing_advance, ue->hw_timing_advance,
@@ -19,7 +19,7 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file PHY/LTE_TRANSPORT/proto.h /*! \file PHY/LTE_UE_TRANSPORT/transport_proto_ue.h
* \brief Function prototypes for PHY physical/transport channel processing and generation V8.6 2009-03 * \brief Function prototypes for PHY physical/transport channel processing and generation V8.6 2009-03
* \author R. Knopp, F. Kaltenberger * \author R. Knopp, F. Kaltenberger
* \date 2011 * \date 2011
@@ -32,6 +32,7 @@
#ifndef __LTE_TRANSPORT_PROTO_UE__H__ #ifndef __LTE_TRANSPORT_PROTO_UE__H__
#define __LTE_TRANSPORT_PROTO_UE__H__ #define __LTE_TRANSPORT_PROTO_UE__H__
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include <math.h> #include <math.h>
#include "nfapi_interface.h" #include "nfapi_interface.h"
@@ -64,6 +65,7 @@ void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch);
LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag); LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char N_RB_UL, uint8_t abstraction_flag);
void fill_UE_dlsch_MCH(PHY_VARS_UE *ue,int mcs,int ndi,int rvidx,int eNB_id);
int rx_pmch(PHY_VARS_UE *phy_vars_ue, int rx_pmch(PHY_VARS_UE *phy_vars_ue,
unsigned char eNB_id, unsigned char eNB_id,
@@ -1026,8 +1028,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
uint8_t subframe, uint8_t subframe,
uint8_t eNB_id, uint8_t eNB_id,
MIMO_mode_t mimo_mode, MIMO_mode_t mimo_mode,
uint32_t high_speed_flag, uint32_t high_speed_flag);
uint8_t is_secondary_ue);
/*! \brief Extract PSS and SSS resource elements /*! \brief Extract PSS and SSS resource elements
@param phy_vars_ue Pointer to UE variables @param phy_vars_ue Pointer to UE variables
+2 -2
View File
@@ -19,8 +19,8 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#ifndef __MODULATION_DEFS__H__ #ifndef __MODULATION_COMMON__H__
#define __MODULATION_DEFS__H__ #define __MODULATION_COMMON__H__
#include "PHY/defs_common.h" #include "PHY/defs_common.h"
/** @addtogroup _PHY_MODULATION_ /** @addtogroup _PHY_MODULATION_
* @{ * @{
+1 -1
View File
@@ -34,7 +34,7 @@ This section deals with basic functions for OFDM Modulation.
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "modulation_common.h" #include "modulation_common.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
//#define DEBUG_OFDM_MOD //#define DEBUG_OFDM_MOD
@@ -32,6 +32,7 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "SCHED/sched_common_extern.h" #include "SCHED/sched_common_extern.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
void get_Msg3_alloc(LTE_DL_FRAME_PARMS *frame_parms, void get_Msg3_alloc(LTE_DL_FRAME_PARMS *frame_parms,
unsigned char current_subframe, unsigned char current_subframe,
+1 -1
View File
@@ -34,6 +34,7 @@
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "SCHED/sched_eNB.h" #include "SCHED/sched_eNB.h"
#include "SCHED/sched_common_extern.h" #include "SCHED/sched_common_extern.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "nfapi_interface.h" #include "nfapi_interface.h"
#include "fapi_l1.h" #include "fapi_l1.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
@@ -139,7 +140,6 @@ void pmch_procedures(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
MCH_PDU *mch_pduP=NULL; MCH_PDU *mch_pduP=NULL;
MCH_PDU mch_pdu;
// uint8_t sync_area=255; // uint8_t sync_area=255;
#endif #endif
+2 -1
View File
@@ -33,9 +33,10 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "SCHED/sched_eNB.h" #include "SCHED/sched_eNB.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h" #include "PHY/LTE_TRANSPORT/if4_tools.h"
#include "PHY/LTE_TRANSPORT/if5_tools.h" #include "PHY/LTE_TRANSPORT/if5_tools.h"
#include "PHY/LTE_TRANSPORT/transport_common_proto.h"
#include "LAYER2/MAC/mac.h" #include "LAYER2/MAC/mac.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
+1
View File
@@ -30,6 +30,7 @@
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY_INTERFACE/phy_interface.h" #include "PHY_INTERFACE/phy_interface.h"
#include "sched_common.h"
enum THREAD_INDEX { OPENAIR_THREAD_INDEX = 0, enum THREAD_INDEX { OPENAIR_THREAD_INDEX = 0,
TOP_LEVEL_SCHEDULER_THREAD_INDEX, TOP_LEVEL_SCHEDULER_THREAD_INDEX,
+10 -5
View File
@@ -40,6 +40,9 @@
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "SCHED_UE/sched_UE.h" #include "SCHED_UE/sched_UE.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
//#define DEBUG_PHY_PROC //#define DEBUG_PHY_PROC
#ifndef PUCCH #ifndef PUCCH
@@ -1408,7 +1411,7 @@ void ue_prach_procedures(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uin
ue->prach_resources[eNB_id]->ra_PreambleIndex = 19; ue->prach_resources[eNB_id]->ra_PreambleIndex = 19;
} }
LOG_I(PHY,"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d,PL %d, P0_PRACH %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n", LOG_D(PHY,"[UE %d][RAPROC] Frame %d, Subframe %d : Generating PRACH, preamble %d,PL %d, P0_PRACH %d, TARGET_RECEIVED_POWER %d dBm, PRACH TDD Resource index %d, RA-RNTI %d\n",
ue->Mod_id, ue->Mod_id,
frame_tx, frame_tx,
subframe_tx, subframe_tx,
@@ -2767,15 +2770,17 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
subframe_rx, subframe_rx,
eNB_id, eNB_id,
ue->frame_parms.nb_antenna_ports_eNB==1?SISO:ALAMOUTI, ue->frame_parms.nb_antenna_ports_eNB==1?SISO:ALAMOUTI,
ue->high_speed_flag, ue->high_speed_flag);
ue->is_secondary_ue);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_OUT);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_FUNCTION_IN);
//printf("Decode SIB frame param agregation + DCI %d %d \n",agregationLevel,dciFormat); /*printf("Decode SIB frame param aggregation + DCI %d %d, num_pdcch_symbols %d\n",
ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->agregationLevel,
ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->dciFormat,
ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols);
*/
//agregation level == FF means no configuration on //agregation level == FF means no configuration on
if(ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->agregationLevel == 0xFF || ue->decode_SIB) if(ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->agregationLevel == 0xFF || ue->decode_SIB)
{ {
+1 -1
View File
@@ -34,7 +34,7 @@
#include "SCHED_UE/sched_UE.h" #include "SCHED_UE/sched_UE.h"
#include "SCHED/sched_common_extern.h" #include "SCHED/sched_common_extern.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,uint8_t eNB_id,PUCCH_FMT_t pucch_fmt) int16_t pucch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t subframe,uint8_t eNB_id,PUCCH_FMT_t pucch_fmt)
{ {
+1
View File
@@ -35,6 +35,7 @@
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/phy_extern_ue.h" #include "PHY/phy_extern_ue.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_pid) int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_pid)
{ {
+1
View File
@@ -33,6 +33,7 @@
#include "PHY/defs_UE.h" #include "PHY/defs_UE.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h" #include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/phy_extern_ue.h" #include "PHY/phy_extern_ue.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
void srs_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t *pnb_rb_srs, uint8_t abstraction_flag) void srs_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t *pnb_rb_srs, uint8_t abstraction_flag)
{ {
+5 -6
View File
@@ -32,6 +32,8 @@
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
//#define DEBUG_CH //#define DEBUG_CH
#include "assertions.h"
extern void print_shorts(char *s,__m128i *x); extern void print_shorts(char *s,__m128i *x);
void fill_channel_desc(channel_desc_t *chan_desc, void fill_channel_desc(channel_desc_t *chan_desc,
@@ -1210,10 +1212,8 @@ int random_channel(channel_desc_t *desc, uint8_t abstraction_flag) {
struct complex anew[NB_ANTENNAS_TX*NB_ANTENNAS_RX],acorr[NB_ANTENNAS_TX*NB_ANTENNAS_RX]; struct complex anew[NB_ANTENNAS_TX*NB_ANTENNAS_RX],acorr[NB_ANTENNAS_TX*NB_ANTENNAS_RX];
struct complex phase, alpha, beta; struct complex phase, alpha, beta;
if ((desc->nb_tx>NB_ANTENNAS_TX) || (desc->nb_rx > NB_ANTENNAS_RX)) { AssertFatal(desc->nb_tx<=NB_ANTENNAS_TX && desc->nb_rx <= NB_ANTENNAS_RX,
LOG_E(PHY,"random_channel.c: Error: temporary buffer for channel not big enough (%d,%d)\n",desc->nb_tx,desc->nb_rx); "random_channel.c: Error: temporary buffer for channel not big enough (%d,%d)\n",desc->nb_tx,desc->nb_rx);
return(-1);
}
start_meas(&desc->random_channel); start_meas(&desc->random_channel);
for (i=0;i<(int)desc->nb_taps;i++) { for (i=0;i<(int)desc->nb_taps;i++) {
@@ -1372,8 +1372,7 @@ double N_RB2sampling_rate(uint16_t N_RB)
break; break;
default: default:
LOG_E(PHY,"Unknown N_PRB\n"); AssertFatal(1==0,"Unknown N_PRB %d",N_RB);
return(-1);
} }
return(sampling_rate); return(sampling_rate);
+2
View File
@@ -69,9 +69,11 @@
#ifdef LARGE_SCALE #ifdef LARGE_SCALE
# define MAX_MOBILES_PER_ENB 128 # define MAX_MOBILES_PER_ENB 128
# define MAX_MOBILES_PER_ENB_NB_IoT 128
# define MAX_eNB 2 # define MAX_eNB 2
#else #else
# define MAX_MOBILES_PER_ENB 16 # define MAX_MOBILES_PER_ENB 16
# define MAX_MOBILES_PER_ENB_NB_IoT 16
# define MAX_eNB 2 # define MAX_eNB 2
#endif #endif
@@ -836,7 +836,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
Protocol__FlexHeader *header = NULL; Protocol__FlexHeader *header = NULL;
int i, j, UE_id; int i, j, UE_id;
int available_harq[NUMBER_OF_UE_MAX]; int available_harq[MAX_MOBILES_PER_ENB];
const int xid = *((int *)params); const int xid = *((int *)params);
@@ -854,7 +854,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
frame_t frame; frame_t frame;
sub_frame_t subframe; sub_frame_t subframe;
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
available_harq[i] = -1; available_harq[i] = -1;
} }
@@ -878,7 +878,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
sf_trigger_msg->n_dl_info = 0; sf_trigger_msg->n_dl_info = 0;
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
if (RC.mac && RC.mac[mod_id] && RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid == 1) { if (RC.mac && RC.mac[mod_id] && RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid == 1) {
available_harq[i] = j; available_harq[i] = j;
@@ -904,7 +904,7 @@ int flexran_agent_mac_sf_trigger(mid_t mod_id, const void *params, Protocol__Fle
goto error; goto error;
i = -1; i = -1;
//Fill the status of the current HARQ process for each UE //Fill the status of the current HARQ process for each UE
for(UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { for(UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (available_harq[UE_id] < 0) { if (available_harq[UE_id] < 0) {
continue; continue;
} else { } else {
@@ -1262,7 +1262,7 @@ void flexran_agent_init_mac_agent(mid_t mod_id) {
//Allow RINGBUFFER_SIZE messages to be stored in the ringbuffer at any time //Allow RINGBUFFER_SIZE messages to be stored in the ringbuffer at any time
dl_mac_config_array[mod_id] = malloc( sizeof(struct lfds700_ringbuffer_element) * num_elements); dl_mac_config_array[mod_id] = malloc( sizeof(struct lfds700_ringbuffer_element) * num_elements);
lfds700_ringbuffer_init_valid_on_current_logical_core( &ringbuffer_state[mod_id], dl_mac_config_array[mod_id], num_elements, &ps[mod_id], NULL ); lfds700_ringbuffer_init_valid_on_current_logical_core( &ringbuffer_state[mod_id], dl_mac_config_array[mod_id], num_elements, &ps[mod_id], NULL );
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
for (j = 0; j < 8; j++) { for (j = 0; j < 8; j++) {
if (RC.mac && RC.mac[mod_id]) if (RC.mac && RC.mac[mod_id])
RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid = 0; RC.mac[mod_id]->UE_list.eNB_UE_stats[UE_PCCID(mod_id,i)][i].harq_pid = 0;
@@ -37,7 +37,7 @@ unsigned int pdcp_agent_registered[NUM_MAX_ENB];
/*Array containing the Agent-PDCP interfaces*/ /*Array containing the Agent-PDCP interfaces*/
AGENT_PDCP_xface *agent_pdcp_xface[NUM_MAX_ENB]; AGENT_PDCP_xface *agent_pdcp_xface[NUM_MAX_ENB];
// NUMBER_OF_UE_MAX // MAX_MOBILES_PER_ENB
void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id, void flexran_agent_pdcp_aggregate_stats(const mid_t mod_id,
const mid_t ue_id, const mid_t ue_id,
+1
View File
@@ -46,6 +46,7 @@
# include "gtpv1u_eNB_task.h" # include "gtpv1u_eNB_task.h"
# endif # endif
#include "openair1/PHY/INIT/phy_init.h"
extern unsigned char NB_eNB_INST; extern unsigned char NB_eNB_INST;
#endif #endif
+4 -1
View File
@@ -48,6 +48,7 @@
#include "LAYER2/MAC/mac_extern.h" #include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/mac_proto.h" #include "LAYER2/MAC/mac_proto.h"
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "PHY/INIT/phy_init.h"
#include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h" #include "targets/ARCH/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
#include "nfapi_vnf.h" #include "nfapi_vnf.h"
#include "nfapi_pnf.h" #include "nfapi_pnf.h"
@@ -295,8 +296,10 @@ void RCconfig_macrlc() {
RC.nb_macrlc_inst=MacRLC_ParamList.numelt; RC.nb_macrlc_inst=MacRLC_ParamList.numelt;
mac_top_init_eNB(); mac_top_init_eNB();
for (j=0;j<RC.nb_macrlc_inst;j++) { RC.nb_mac_CC = (int*)malloc(RC.nb_macrlc_inst*sizeof(int));
for (j=0;j<RC.nb_macrlc_inst;j++) {
RC.nb_mac_CC[j] = *(MacRLC_ParamList.paramarray[j][MACRLC_CC_IDX].iptr);
//RC.mac[j]->phy_test = *(MacRLC_ParamList.paramarray[j][MACRLC_PHY_TEST_IDX].iptr); //RC.mac[j]->phy_test = *(MacRLC_ParamList.paramarray[j][MACRLC_PHY_TEST_IDX].iptr);
//printf("PHY_TEST = %d,%d\n", RC.mac[j]->phy_test, j); //printf("PHY_TEST = %d,%d\n", RC.mac[j]->phy_test, j);
+1 -1
View File
@@ -1207,7 +1207,7 @@ void flexran_set_pdcp_rx_stat_window(const mid_t mod_id, const mid_t ue_id, uint
/*PDCP num tx pdu status flexRAN*/ /*PDCP num tx pdu status flexRAN*/
uint32_t flexran_get_pdcp_tx(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){ uint32_t flexran_get_pdcp_tx(const mid_t mod_id, const mid_t ue_id, const lcid_t lcid){
if (mod_id <0 || mod_id> MAX_NUM_CCs || ue_id<0 || ue_id> NUMBER_OF_UE_MAX || lcid<0 || lcid>NB_RB_MAX) if (mod_id <0 || mod_id> MAX_NUM_CCs || ue_id<0 || ue_id> MAX_MOBILES_PER_ENB || lcid<0 || lcid>NB_RB_MAX)
return -1; return -1;
return Pdcp_stats_tx[mod_id][ue_id][lcid]; return Pdcp_stats_tx[mod_id][ue_id][lcid];
} }
+6 -6
View File
@@ -98,7 +98,7 @@ typedef enum{
DL DL
}message_direction_t; }message_direction_t;
#define MAX_NUMBER_OF_UE_MAX_NB_IoT 20 #define MAX_MAX_MOBILES_PER_ENB_NB_IoT 20
#define SCH_PAYLOAD_SIZE_MAX_NB_IoT 320 #define SCH_PAYLOAD_SIZE_MAX_NB_IoT 320
#define MAX_NUMBER_OF_SIBs_NB_IoT 16 #define MAX_NUMBER_OF_SIBs_NB_IoT 16
@@ -233,17 +233,17 @@ typedef struct{
typedef struct { typedef struct {
/// DCI template and MAC connection parameters for UEs /// DCI template and MAC connection parameters for UEs
UE_TEMPLATE_NB_IoT UE_template_NB_IoT[MAX_NUMBER_OF_UE_MAX_NB_IoT]; UE_TEMPLATE_NB_IoT UE_template_NB_IoT[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
/// NPDCCH Period and searching space info /// NPDCCH Period and searching space info
NPDCCH_config_dedicated_NB_IoT_t NPDCCH_config_dedicated; NPDCCH_config_dedicated_NB_IoT_t NPDCCH_config_dedicated;
//int next[MAX_NUMBER_OF_UE_MAX_NB_IoT]; //int next[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
// -1:No UE in list // -1:No UE in list
int head; int head;
// -1:No UE in list // -1:No UE in list
int tail; int tail;
int num_UEs; int num_UEs;
//boolean_t active[MAX_NUMBER_OF_UE_MAX_NB_IoT]; //boolean_t active[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
} UE_list_NB_IoT_t; } UE_list_NB_IoT_t;
@@ -261,7 +261,7 @@ typedef struct{
// flag to indicate scheduling type1 NPDCCH CSS with different CE level // flag to indicate scheduling type1 NPDCCH CSS with different CE level
uint8_t flag_type1_css[3]; uint8_t flag_type1_css[3];
// flag to indicate scheduling NPDCCH USS with UE list // flag to indicate scheduling NPDCCH USS with UE list
uint8_t flag_uss[MAX_NUMBER_OF_UE_MAX_NB_IoT]; uint8_t flag_uss[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
// flag to indicate scheduling sib1/MIB // flag to indicate scheduling sib1/MIB
uint8_t flag_fix_scheduling; uint8_t flag_fix_scheduling;
// number of the type2 css to schedule in this period // number of the type2 css to schedule in this period
@@ -494,7 +494,7 @@ typedef struct eNB_MAC_INST_NB_IoT_s {
RA_template_list_t RA_msg3_list; RA_template_list_t RA_msg3_list;
RA_template_list_t RA_msg4_list; RA_template_list_t RA_msg4_list;
RA_TEMPLATE_NB_IoT RA_template[MAX_NUMBER_OF_UE_MAX_NB_IoT]; RA_TEMPLATE_NB_IoT RA_template[MAX_MAX_MOBILES_PER_ENB_NB_IoT];
//int32_t last_tx_subframe; //int32_t last_tx_subframe;
+79 -82
View File
@@ -105,9 +105,8 @@ schedule_SRS(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
if ((1 << tmp) & deltaTSFC) { if ((1 << tmp) & deltaTSFC) {
// This is an SRS subframe, loop over UEs // This is an SRS subframe, loop over UEs
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE) if (!RC.mac[module_idP]->UE_list.active[UE_id]) continue;
continue;
ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body; ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
// drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet // drop the allocation if the UE hasn't send RRCConnectionSetupComplete yet
if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue; if (mac_eNB_get_rrc_status(module_idP,UE_RNTI(module_idP, UE_id)) < RRC_CONNECTED) continue;
@@ -167,9 +166,8 @@ schedule_CSI(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
cc = &eNB->common_channels[CC_id]; cc = &eNB->common_channels[CC_id];
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_list->active[UE_id] != TRUE) if (!UE_list->active[UE_id]) continue;
continue;
ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body; ul_req = &RC.mac[module_idP]->UL_req[CC_id].ul_config_request_body;
@@ -253,8 +251,8 @@ schedule_SR(module_id_t module_idP, frame_t frameP, sub_frame_t subframeP)
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP; RC.mac[module_idP]->UL_req[CC_id].sfn_sf = (frameP << 4) + subframeP;
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (RC.mac[module_idP]->UE_list.active[UE_id] != TRUE) continue; if (!RC.mac[module_idP]->UE_list.active[UE_id]) continue;
ul_req = &RC.mac[module_idP]->UL_req[CC_id]; ul_req = &RC.mac[module_idP]->UL_req[CC_id];
ul_req_body = &ul_req->ul_config_request_body; ul_req_body = &ul_req->ul_config_request_body;
@@ -532,92 +530,91 @@ eNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frameP,
} }
// refresh UE list based on UEs dropped by PHY in previous subframe // refresh UE list based on UEs dropped by PHY in previous subframe
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (UE_list->active[i] != TRUE) if (UE_list->active[i]) {
continue;
rnti = UE_RNTI(module_idP, i); rnti = UE_RNTI(module_idP, i);
CC_id = UE_PCCID(module_idP, i); CC_id = UE_PCCID(module_idP, i);
if (((frameP&127) == 0) && (subframeP == 0)) { if (((frameP&127) == 0) && (subframeP == 0)) {
LOG_I(MAC, LOG_I(MAC,
"UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d\n", "UE rnti %x : %s, PHR %d dB DL CQI %d PUSCH SNR %d PUCCH SNR %d\n",
rnti, rnti,
UE_list->UE_sched_ctrl[i].ul_out_of_sync == UE_list->UE_sched_ctrl[i].ul_out_of_sync ==
0 ? "in synch" : "out of sync", 0 ? "in synch" : "out of sync",
UE_list->UE_template[CC_id][i].phr_info, UE_list->UE_template[CC_id][i].phr_info,
UE_list->UE_sched_ctrl[i].dl_cqi[CC_id], UE_list->UE_sched_ctrl[i].dl_cqi[CC_id],
(UE_list->UE_sched_ctrl[i].pusch_snr[CC_id] - 128) / 2, (UE_list->UE_sched_ctrl[i].pusch_snr[CC_id] - 128) / 2,
(UE_list->UE_sched_ctrl[i].pucch1_snr[CC_id] - 128) / 2); (UE_list->UE_sched_ctrl[i].pucch1_snr[CC_id] - 128) / 2);
} }
RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP * 10) + RC.eNB[module_idP][CC_id]->pusch_stats_bsr[i][(frameP * 10) +
subframeP] = -63; subframeP] = -63;
if (i == UE_list->head) if (i == UE_list->head)
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME
(VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR, (VCD_SIGNAL_DUMPER_VARIABLES_UE0_BSR,
RC.eNB[module_idP][CC_id]-> RC.eNB[module_idP][CC_id]->
pusch_stats_bsr[i][(frameP * 10) + subframeP]); pusch_stats_bsr[i][(frameP * 10) + subframeP]);
// increment this, it is cleared when we receive an sdu // increment this, it is cleared when we receive an sdu
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ul_inactivity_timer++; RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ul_inactivity_timer++;
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].cqi_req_timer++; RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].cqi_req_timer++;
LOG_D(MAC, "UE %d/%x : ul_inactivity %d, cqi_req %d\n", i, rnti, LOG_D(MAC, "UE %d/%x : ul_inactivity %d, cqi_req %d\n", i, rnti,
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i]. RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].
ul_inactivity_timer, ul_inactivity_timer,
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].cqi_req_timer); RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].cqi_req_timer);
check_ul_failure(module_idP, CC_id, i, frameP, subframeP); check_ul_failure(module_idP, CC_id, i, frameP, subframeP);
if (RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer > 0) { if (RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer > 0) {
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer++; RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer++;
if(RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer >= if(RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer >=
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer_thres) { RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer_thres) {
RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer = 0; RC.mac[module_idP]->UE_list.UE_sched_ctrl[i].ue_reestablishment_reject_timer = 0;
for (int ue_id_l = 0; ue_id_l < NUMBER_OF_UE_MAX; ue_id_l++) { for (int ue_id_l = 0; ue_id_l < MAX_MOBILES_PER_ENB; ue_id_l++) {
if (reestablish_rnti_map[ue_id_l][0] == rnti) { if (reestablish_rnti_map[ue_id_l][0] == rnti) {
// clear currentC-RNTI from map // clear currentC-RNTI from map
reestablish_rnti_map[ue_id_l][0] = 0; reestablish_rnti_map[ue_id_l][0] = 0;
reestablish_rnti_map[ue_id_l][1] = 0; reestablish_rnti_map[ue_id_l][1] = 0;
break; break;
}
} }
} // Note: This should not be done in the MAC!
// Note: This should not be done in the MAC! for (int ii=0; ii<MAX_MOBILES_PER_ENB; ii++) {
for (int ii=0; ii<NUMBER_OF_UE_MAX; ii++) { LTE_eNB_ULSCH_t *ulsch = RC.eNB[module_idP][CC_id]->ulsch[ii];
LTE_eNB_ULSCH_t *ulsch = RC.eNB[module_idP][CC_id]->ulsch[ii]; if((ulsch != NULL) && (ulsch->rnti == rnti)){
if((ulsch != NULL) && (ulsch->rnti == rnti)){ LOG_I(MAC, "clean_eNb_ulsch UE %x \n", rnti);
LOG_I(MAC, "clean_eNb_ulsch UE %x \n", rnti); clean_eNb_ulsch(ulsch);
clean_eNb_ulsch(ulsch); }
} }
} for (int ii=0; ii<MAX_MOBILES_PER_ENB; ii++) {
for (int ii=0; ii<NUMBER_OF_UE_MAX; ii++) { LTE_eNB_DLSCH_t *dlsch = RC.eNB[module_idP][CC_id]->dlsch[ii][0];
LTE_eNB_DLSCH_t *dlsch = RC.eNB[module_idP][CC_id]->dlsch[ii][0]; if((dlsch != NULL) && (dlsch->rnti == rnti)){
if((dlsch != NULL) && (dlsch->rnti == rnti)){ LOG_I(MAC, "clean_eNb_dlsch UE %x \n", rnti);
LOG_I(MAC, "clean_eNb_dlsch UE %x \n", rnti); clean_eNb_dlsch(dlsch);
clean_eNb_dlsch(dlsch); }
} }
}
for(int j = 0; j < 10; j++){
for(int j = 0; j < 10; j++){ nfapi_ul_config_request_body_t *ul_req_tmp = NULL;
nfapi_ul_config_request_body_t *ul_req_tmp = NULL; ul_req_tmp = &RC.mac[module_idP]->UL_req_tmp[CC_id][j].ul_config_request_body;
ul_req_tmp = &RC.mac[module_idP]->UL_req_tmp[CC_id][j].ul_config_request_body; if(ul_req_tmp){
if(ul_req_tmp){ int pdu_number = ul_req_tmp->number_of_pdus;
int pdu_number = ul_req_tmp->number_of_pdus; for(int pdu_index = pdu_number-1; pdu_index >= 0; pdu_index--){
for(int pdu_index = pdu_number-1; pdu_index >= 0; pdu_index--){ if(ul_req_tmp->ul_config_pdu_list[pdu_index].ulsch_pdu.ulsch_pdu_rel8.rnti == rnti){
if(ul_req_tmp->ul_config_pdu_list[pdu_index].ulsch_pdu.ulsch_pdu_rel8.rnti == rnti){ LOG_I(MAC, "remove UE %x from ul_config_pdu_list %d/%d\n", rnti, pdu_index, pdu_number);
LOG_I(MAC, "remove UE %x from ul_config_pdu_list %d/%d\n", rnti, pdu_index, pdu_number); if(pdu_index < pdu_number -1){
if(pdu_index < pdu_number -1){ memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index], &ul_req_tmp->ul_config_pdu_list[pdu_index+1], (pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t));
memcpy(&ul_req_tmp->ul_config_pdu_list[pdu_index], &ul_req_tmp->ul_config_pdu_list[pdu_index+1], (pdu_number-1-pdu_index) * sizeof(nfapi_ul_config_request_pdu_t)); }
ul_req_tmp->number_of_pdus--;
} }
ul_req_tmp->number_of_pdus--;
} }
} }
} }
}
rrc_mac_remove_ue(module_idP,rnti); rrc_mac_remove_ue(module_idP,rnti);
}
} }
} }
} }
PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES, PROTOCOL_CTXT_SET_BY_MODULE_ID(&ctxt, module_idP, ENB_FLAG_YES,
NOT_A_RNTI, frameP, subframeP, NOT_A_RNTI, frameP, subframeP,
module_idP); module_idP);
+4 -4
View File
@@ -1476,18 +1476,18 @@ initiate_ra_proc(module_id_t module_idP,
/* TODO: find better procedure to allocate RNTI */ /* TODO: find better procedure to allocate RNTI */
do { do {
#if defined(USRP_REC_PLAY) // deterministic rnti in usrp record/playback mode #if defined(USRP_REC_PLAY) // deterministic rnti in usrp record/playback mode
static int drnti[NUMBER_OF_UE_MAX] = { 0xbda7, 0x71da, 0x9c40, 0xc350, 0x2710, 0x4e20, 0x7530, 0x1388, 0x3a98, 0x61a8, 0x88b8, 0xafc8, 0xd6d8, 0x1b58, 0x4268, 0x6978 }; static int drnti[MAX_MOBILES_PER_ENB] = { 0xbda7, 0x71da, 0x9c40, 0xc350, 0x2710, 0x4e20, 0x7530, 0x1388, 0x3a98, 0x61a8, 0x88b8, 0xafc8, 0xd6d8, 0x1b58, 0x4268, 0x6978 };
int j = 0; int j = 0;
int nb_ue = 0; int nb_ue = 0;
for (j = 0; j < NUMBER_OF_UE_MAX; j++) { for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
if (UE_RNTI(module_idP, j) > 0) { if (UE_RNTI(module_idP, j) > 0) {
nb_ue++; nb_ue++;
} else { } else {
break; break;
} }
} }
if (nb_ue >= NUMBER_OF_UE_MAX) { if (nb_ue >= MAX_MOBILES_PER_ENB) {
printf("No more free RNTI available, increase NUMBER_OF_UE_MAX\n"); printf("No more free RNTI available, increase MAX_MOBILES_PER_ENB\n");
abort(); abort();
} }
ra[i].rnti = drnti[nb_ue]; ra[i].rnti = drnti[nb_ue];
+1 -1
View File
@@ -1773,7 +1773,7 @@ void schedule_PCH(module_id_t module_idP,frame_t frameP,sub_frame_t subframeP)
vrb_map = (void*)&cc->vrb_map; vrb_map = (void*)&cc->vrb_map;
n_rb_dl = to_prb(cc->mib->message.dl_Bandwidth); n_rb_dl = to_prb(cc->mib->message.dl_Bandwidth);
dl_req = &eNB->DL_req[CC_id].dl_config_request_body; dl_req = &eNB->DL_req[CC_id].dl_config_request_body;
for (uint16_t i = 0; i < NUMBER_OF_UE_MAX; i++) { for (uint16_t i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (UE_PF_PO[CC_id][i].enable_flag != TRUE) { if (UE_PF_PO[CC_id][i].enable_flag != TRUE) {
continue; continue;
} }
+1 -1
View File
@@ -647,7 +647,7 @@ schedule_MBMS(module_id_t module_idP, uint8_t CC_id, frame_t frameP,
(char *) (char *)
&mch_buffer &mch_buffer
[sdu_length_total]); [sdu_length_total]);
//sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(NUMBER_OF_UE_MAX+1)), (char*)&mch_buffer[sdu_length_total]); //sdu_lengths[num_sdus] = mac_rlc_data_req(module_idP,frameP, MBMS_FLAG_NO, MTCH+(MAX_NUM_RB*(MAX_MOBILES_PER_ENB+1)), (char*)&mch_buffer[sdu_length_total]);
LOG_I(MAC, LOG_I(MAC,
"[eNB %d][MBMS USER-PLANE] CC_id %d Got %d bytes for MTCH %d\n", "[eNB %d][MBMS USER-PLANE] CC_id %d Got %d bytes for MTCH %d\n",
module_idP, CC_id, sdu_lengths[num_sdus], MTCH); module_idP, CC_id, sdu_lengths[num_sdus], MTCH);
@@ -1667,7 +1667,7 @@ void init_ue_sched_info(void)
for (i = 0; i < NUMBER_OF_eNB_MAX; i++) { for (i = 0; i < NUMBER_OF_eNB_MAX; i++) {
for (k = 0; k < MAX_NUM_CCs; k++) { for (k = 0; k < MAX_NUM_CCs; k++) {
for (j = 0; j < NUMBER_OF_UE_MAX; j++) { for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
// init DL // init DL
eNB_dlsch_info[i][k][j].weight = 0; eNB_dlsch_info[i][k][j].weight = 0;
eNB_dlsch_info[i][k][j].subframe = 0; eNB_dlsch_info[i][k][j].subframe = 0;
@@ -1698,7 +1698,7 @@ int find_UE_id(module_id_t mod_idP, rnti_t rntiP)
int UE_id; int UE_id;
UE_list_t *UE_list = &RC.mac[mod_idP]->UE_list; UE_list_t *UE_list = &RC.mac[mod_idP]->UE_list;
for (UE_id = 0; UE_id < NUMBER_OF_UE_MAX; UE_id++) { for (UE_id = 0; UE_id < MAX_MOBILES_PER_ENB; UE_id++) {
if (UE_list->active[UE_id] != TRUE) if (UE_list->active[UE_id] != TRUE)
continue; continue;
if (UE_list->UE_template[UE_PCCID(mod_idP, UE_id)][UE_id].rnti == if (UE_list->UE_template[UE_PCCID(mod_idP, UE_id)][UE_id].rnti ==
@@ -1839,7 +1839,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP, int harq_pidP
mod_idP, cc_idP, rntiP, UE_list->avail, UE_list->num_UEs); mod_idP, cc_idP, rntiP, UE_list->avail, UE_list->num_UEs);
dump_ue_list(UE_list, 0); dump_ue_list(UE_list, 0);
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (UE_list->active[i] == TRUE) if (UE_list->active[i] == TRUE)
continue; continue;
UE_id = i; UE_id = i;
@@ -2325,9 +2325,7 @@ int get_bw_index(module_id_t module_id, uint8_t CC_id)
{ {
int bw_index = 0; int bw_index = 0;
int N_RB_DL = int N_RB_DL = to_prb(RC.mac[module_id]->common_channels[CC_id].mib->message.dl_Bandwidth);
to_prb(RC.mac[module_id]->common_channels[CC_id].mib->
message.dl_Bandwidth);
switch (N_RB_DL) { switch (N_RB_DL) {
case 6: // 1.4 MHz case 6: // 1.4 MHz
@@ -2360,9 +2358,7 @@ int get_bw_index(module_id_t module_id, uint8_t CC_id)
int get_min_rb_unit(module_id_t module_id, uint8_t CC_id) int get_min_rb_unit(module_id_t module_id, uint8_t CC_id)
{ {
int min_rb_unit = 0; int min_rb_unit = 0;
int N_RB_DL = int N_RB_DL = to_prb(RC.mac[module_id]->common_channels[CC_id].mib->message.dl_Bandwidth);
to_prb(RC.mac[module_id]->common_channels[CC_id].mib->
message.dl_Bandwidth);
switch (N_RB_DL) { switch (N_RB_DL) {
case 6: // 1.4 MHz case 6: // 1.4 MHz
+1 -1
View File
@@ -140,7 +140,7 @@ rx_sdu(const module_id_t enb_mod_idP,
start_meas(&mac->rx_ulsch_sdu); start_meas(&mac->rx_ulsch_sdu);
if ((UE_id > NUMBER_OF_UE_MAX) || (UE_id == -1)) if ((UE_id > MAX_MOBILES_PER_ENB) || (UE_id == -1))
for (ii = 0; ii < NB_RB_MAX; ii++) { for (ii = 0; ii < NB_RB_MAX; ii++) {
rx_lengths[ii] = 0; rx_lengths[ii] = 0;
} }
+2 -2
View File
@@ -52,8 +52,8 @@ extern UE_RRC_INST *UE_rrc_inst;
extern UE_MAC_INST *UE_mac_inst; extern UE_MAC_INST *UE_mac_inst;
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8 extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8 extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
+2 -2
View File
@@ -103,8 +103,8 @@ int pCC_id[NUMBER_OF_eNB_MAX];
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8 eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8 eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][MAX_MOBILES_PER_ENB]; // eNBxUE = 8x8
#ifdef OPENAIR2 #ifdef OPENAIR2
+2 -2
View File
@@ -120,7 +120,7 @@ void mac_top_init_eNB(void)
UE_list->head_ul = -1; UE_list->head_ul = -1;
UE_list->avail = 0; UE_list->avail = 0;
for (list_el = 0; list_el < NUMBER_OF_UE_MAX - 1; list_el++) { for (list_el = 0; list_el < MAX_MOBILES_PER_ENB - 1; list_el++) {
UE_list->next[list_el] = list_el + 1; UE_list->next[list_el] = list_el + 1;
UE_list->next_ul[list_el] = list_el + 1; UE_list->next_ul[list_el] = list_el + 1;
} }
@@ -144,7 +144,7 @@ void mac_init_cell_params(int Mod_idP, int CC_idP)
UE_template = UE_template =
(UE_TEMPLATE *) & RC.mac[Mod_idP]->UE_list.UE_template[CC_idP][0]; (UE_TEMPLATE *) & RC.mac[Mod_idP]->UE_list.UE_template[CC_idP][0];
for (j = 0; j < NUMBER_OF_UE_MAX; j++) { for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
UE_template[j].rnti = 0; UE_template[j].rnti = 0;
// initiallize the eNB to UE statistics // initiallize the eNB to UE statistics
memset(&RC.mac[Mod_idP]->UE_list.eNB_UE_stats[CC_idP][j], 0, memset(&RC.mac[Mod_idP]->UE_list.eNB_UE_stats[CC_idP][j], 0,
+8 -11
View File
@@ -307,7 +307,7 @@ maxround(module_id_t Mod_id, uint16_t rnti, int frame,
UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list; UE_list_t *UE_list = &RC.mac[Mod_id]->UE_list;
COMMON_channels_t *cc; COMMON_channels_t *cc;
for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
cc = &RC.mac[Mod_id]->common_channels[CC_id]; cc = &RC.mac[Mod_id]->common_channels[CC_id];
@@ -617,7 +617,7 @@ void dlsch_scheduler_pre_processor_accounting(module_id_t Mod_id,
UE_sched_ctrl *ue_sched_ctl; UE_sched_ctrl *ue_sched_ctl;
COMMON_channels_t *cc; COMMON_channels_t *cc;
for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
total_ue_count[CC_id] = 0; total_ue_count[CC_id] = 0;
total_rbs_used[CC_id] = 0; total_rbs_used[CC_id] = 0;
average_rbs_per_user[CC_id] = 0; average_rbs_per_user[CC_id] = 0;
@@ -1020,7 +1020,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
UE_sched_ctrl *ue_sched_ctl1, *ue_sched_ctl2; UE_sched_ctrl *ue_sched_ctl1, *ue_sched_ctl2;
#endif #endif
for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
if (mbsfn_flag[CC_id] > 0) // If this CC is allocated for MBSFN skip it here if (mbsfn_flag[CC_id] > 0) // If this CC is allocated for MBSFN skip it here
continue; continue;
@@ -1071,7 +1071,7 @@ dlsch_scheduler_pre_processor(module_id_t Mod_id,
#ifdef TM5 #ifdef TM5
// This has to be revisited!!!! // This has to be revisited!!!!
for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[Mod_id]; CC_id++) {
i1 = 0; i1 = 0;
i2 = 0; i2 = 0;
i3 = 0; i3 = 0;
@@ -1428,7 +1428,7 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
// we need to distribute RBs among UEs // we need to distribute RBs among UEs
// step1: reset the vars // step1: reset the vars
for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
total_allocated_rbs[CC_id] = 0; total_allocated_rbs[CC_id] = 0;
total_remaining_rbs[CC_id] = 0; total_remaining_rbs[CC_id] = 0;
average_rbs_per_user[CC_id] = 0; average_rbs_per_user[CC_id] = 0;
@@ -1601,7 +1601,7 @@ ulsch_scheduler_pre_processor(module_id_t module_idP,
/* this logging is wrong, ue_sched_ctl may not be valid here /* this logging is wrong, ue_sched_ctl may not be valid here
* TODO: fix * TODO: fix
*/ */
for (CC_id = 0; CC_id < NFAPI_CC_MAX; CC_id++) { for (CC_id = 0; CC_id < RC.nb_mac_CC[module_idP]; CC_id++) {
if (total_allocated_rbs[CC_id] > 0) { if (total_allocated_rbs[CC_id] > 0) {
LOG_D(MAC, "[eNB %d] total RB allocated for all UEs = %d/%d\n", LOG_D(MAC, "[eNB %d] total RB allocated for all UEs = %d/%d\n",
@@ -1660,12 +1660,9 @@ assign_max_mcs_min_rb(module_id_t module_idP, int slice_id, int frameP,
// This is the actual CC_id in the list // This is the actual CC_id in the list
CC_id = UE_list->ordered_ULCCids[n][UE_id]; CC_id = UE_list->ordered_ULCCids[n][UE_id];
if (CC_id >= NFAPI_CC_MAX) {
LOG_E(MAC, "CC_id %u should be < %u, loop n=%u < numactiveULCCs[%u]=%u",
CC_id, NFAPI_CC_MAX, n, UE_id, UE_list->numactiveULCCs[UE_id]);
}
AssertFatal(CC_id < NFAPI_CC_MAX,
AssertFatal(CC_id < RC.nb_mac_CC[module_idP],
"CC_id %u should be < %u, loop n=%u < numactiveULCCs[%u]=%u", "CC_id %u should be < %u, loop n=%u < numactiveULCCs[%u]=%u",
CC_id, NFAPI_CC_MAX, n, UE_id, CC_id, NFAPI_CC_MAX, n, UE_id,
UE_list->numactiveULCCs[UE_id]); UE_list->numactiveULCCs[UE_id]);
+13 -13
View File
@@ -393,7 +393,7 @@ boolean_t pdcp_data_req(
* so we return TRUE afterwards * so we return TRUE afterwards
*/ */
for (pdcp_uid=0; pdcp_uid< NUMBER_OF_UE_MAX;pdcp_uid++){ for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB;pdcp_uid++){
if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti ) if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti )
break; break;
} }
@@ -808,7 +808,7 @@ pdcp_data_ind(
* XXX Following two actions are identical, is there a merge error? * XXX Following two actions are identical, is there a merge error?
*/ */
for (pdcp_uid=0; pdcp_uid< NUMBER_OF_UE_MAX;pdcp_uid++){ for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB;pdcp_uid++){
if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti ){ if (pdcp_enb[ctxt_pP->module_id].rnti[pdcp_uid] == ctxt_pP->rnti ){
break; break;
} }
@@ -856,7 +856,7 @@ void pdcp_update_stats(const protocol_ctxt_t* const ctxt_pP){
// these stats are measured for both eNB and UE on per seond basis // these stats are measured for both eNB and UE on per seond basis
for (rb_id =0; rb_id < NB_RB_MAX; rb_id ++){ for (rb_id =0; rb_id < NB_RB_MAX; rb_id ++){
for (pdcp_uid=0; pdcp_uid< NUMBER_OF_UE_MAX;pdcp_uid++){ for (pdcp_uid=0; pdcp_uid< MAX_MOBILES_PER_ENB;pdcp_uid++){
//printf("frame %d and subframe %d \n", pdcp_enb[ctxt_pP->module_id].frame, pdcp_enb[ctxt_pP->module_id].subframe); //printf("frame %d and subframe %d \n", pdcp_enb[ctxt_pP->module_id].frame, pdcp_enb[ctxt_pP->module_id].subframe);
// tx stats // tx stats
if (Pdcp_stats_tx_window_ms[ctxt_pP->module_id][pdcp_uid] > 0 && if (Pdcp_stats_tx_window_ms[ctxt_pP->module_id][pdcp_uid] > 0 &&
@@ -1060,14 +1060,14 @@ pdcp_run (
void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP){ void pdcp_add_UE(const protocol_ctxt_t* const ctxt_pP){
int i, ue_flag=1; //, ret=-1; to be decied later int i, ue_flag=1; //, ret=-1; to be decied later
for (i=0; i < NUMBER_OF_UE_MAX; i++){ for (i=0; i < MAX_MOBILES_PER_ENB; i++){
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == ctxt_pP->rnti) { if (pdcp_enb[ctxt_pP->module_id].rnti[i] == ctxt_pP->rnti) {
ue_flag=-1; ue_flag=-1;
break; break;
} }
} }
if (ue_flag == 1 ){ if (ue_flag == 1 ){
for (i=0; i < NUMBER_OF_UE_MAX ; i++){ for (i=0; i < MAX_MOBILES_PER_ENB ; i++){
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == 0 ){ if (pdcp_enb[ctxt_pP->module_id].rnti[i] == 0 ){
pdcp_enb[ctxt_pP->module_id].rnti[i]=ctxt_pP->rnti; pdcp_enb[ctxt_pP->module_id].rnti[i]=ctxt_pP->rnti;
pdcp_enb[ctxt_pP->module_id].uid[i]=i; pdcp_enb[ctxt_pP->module_id].uid[i]=i;
@@ -1095,7 +1095,7 @@ pdcp_remove_UE(
int i; int i;
// check and remove SRBs first // check and remove SRBs first
for(int i = 0;i<NUMBER_OF_UE_MAX;i++){ for(int i = 0;i<MAX_MOBILES_PER_ENB;i++){
if(pdcp_eNB_UE_instance_to_rnti[i] == ctxt_pP->rnti){ if(pdcp_eNB_UE_instance_to_rnti[i] == ctxt_pP->rnti){
pdcp_eNB_UE_instance_to_rnti[i] = NOT_A_RNTI; pdcp_eNB_UE_instance_to_rnti[i] = NOT_A_RNTI;
break; break;
@@ -1116,7 +1116,7 @@ pdcp_remove_UE(
(void)h_rc; /* remove gcc warning "set but not used" */ (void)h_rc; /* remove gcc warning "set but not used" */
// remove ue for pdcp enb inst // remove ue for pdcp enb inst
for (i=0; i < NUMBER_OF_UE_MAX; i++) { for (i=0; i < MAX_MOBILES_PER_ENB; i++) {
if (pdcp_enb[ctxt_pP->module_id].rnti[i] == ctxt_pP->rnti ) { if (pdcp_enb[ctxt_pP->module_id].rnti[i] == ctxt_pP->rnti ) {
LOG_I(PDCP, "remove uid is %d/%d %x\n", i, LOG_I(PDCP, "remove uid is %d/%d %x\n", i,
pdcp_enb[ctxt_pP->module_id].uid[i], pdcp_enb[ctxt_pP->module_id].uid[i],
@@ -1553,16 +1553,16 @@ pdcp_config_req_asn1 (
//pdcp_eNB_UE_instance_to_rnti[ctxtP->module_id] = ctxt_pP->rnti; //pdcp_eNB_UE_instance_to_rnti[ctxtP->module_id] = ctxt_pP->rnti;
// pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti; // pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti;
if( srb_flagP == SRB_FLAG_NO ) { if( srb_flagP == SRB_FLAG_NO ) {
for(int i = 0;i<NUMBER_OF_UE_MAX;i++){ for(int i = 0;i<MAX_MOBILES_PER_ENB;i++){
if(pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] == NOT_A_RNTI){ if(pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] == NOT_A_RNTI){
break; break;
} }
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % NUMBER_OF_UE_MAX; pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
} }
pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti; pdcp_eNB_UE_instance_to_rnti[pdcp_eNB_UE_instance_to_rnti_index] = ctxt_pP->rnti;
pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % NUMBER_OF_UE_MAX; pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
} }
//pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % NUMBER_OF_UE_MAX; //pdcp_eNB_UE_instance_to_rnti_index = (pdcp_eNB_UE_instance_to_rnti_index + 1) % MAX_MOBILES_PER_ENB;
} else { } else {
pdcp_pP->is_ue = TRUE; pdcp_pP->is_ue = TRUE;
pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti; pdcp_UE_UE_module_id_to_rnti[ctxt_pP->module_id] = ctxt_pP->rnti;
@@ -2009,7 +2009,7 @@ void pdcp_layer_init(void)
pdcp_coll_p = hashtable_create ((maxDRB + 2) * 16, NULL, pdcp_free); pdcp_coll_p = hashtable_create ((maxDRB + 2) * 16, NULL, pdcp_free);
AssertFatal(pdcp_coll_p != NULL, "UNRECOVERABLE error, PDCP hashtable_create failed"); AssertFatal(pdcp_coll_p != NULL, "UNRECOVERABLE error, PDCP hashtable_create failed");
for (instance = 0; instance < NUMBER_OF_UE_MAX; instance++) { for (instance = 0; instance < MAX_MOBILES_PER_ENB; instance++) {
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
for (service_id = 0; service_id < maxServiceCount; service_id++) { for (service_id = 0; service_id < maxServiceCount; service_id++) {
@@ -2047,7 +2047,7 @@ void pdcp_layer_init(void)
memset(Pdcp_stats_tx_window_ms, 0, sizeof(Pdcp_stats_tx_window_ms)); memset(Pdcp_stats_tx_window_ms, 0, sizeof(Pdcp_stats_tx_window_ms));
memset(Pdcp_stats_rx_window_ms, 0, sizeof(Pdcp_stats_rx_window_ms)); memset(Pdcp_stats_rx_window_ms, 0, sizeof(Pdcp_stats_rx_window_ms));
for (i =0; i< MAX_NUM_CCs ; i ++){ for (i =0; i< MAX_NUM_CCs ; i ++){
for (j=0; j< NUMBER_OF_UE_MAX;j++){ for (j=0; j< MAX_MOBILES_PER_ENB;j++){
Pdcp_stats_tx_window_ms[i][j]=100; Pdcp_stats_tx_window_ms[i][j]=100;
Pdcp_stats_rx_window_ms[i][j]=100; Pdcp_stats_rx_window_ms[i][j]=100;
} }
+37 -37
View File
@@ -94,34 +94,34 @@ extern int pdcp_instance_cnt;
int init_pdcp_thread(void); int init_pdcp_thread(void);
void cleanup_pdcp_thread(void); void cleanup_pdcp_thread(void);
public_pdcp(uint32_t Pdcp_stats_tx_window_ms[MAX_NUM_CCs][NUMBER_OF_UE_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_window_ms[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]);
public_pdcp(uint32_t Pdcp_stats_tx_bytes[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_bytes[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_bytes_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_bytes_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_bytes_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_bytes_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_sn[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_sn[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_throughput_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_throughput_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_aiat[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_aiat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_aiat_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_aiat_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_aiat_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_aiat_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_tx_iat[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_tx_iat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_window_ms[MAX_NUM_CCs][NUMBER_OF_UE_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_window_ms[MAX_NUM_CCs][MAX_MOBILES_PER_ENB]);
public_pdcp(uint32_t Pdcp_stats_rx[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_bytes[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_bytes[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_bytes_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_bytes_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_bytes_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_bytes_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_sn[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_sn[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_goodput_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_goodput_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_aiat[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_aiat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_aiat_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_aiat_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_aiat_tmp_w[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_iat[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_iat[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(uint32_t Pdcp_stats_rx_outoforder[MAX_NUM_CCs][NUMBER_OF_UE_MAX][NB_RB_MAX]); public_pdcp(uint32_t Pdcp_stats_rx_outoforder[MAX_NUM_CCs][MAX_MOBILES_PER_ENB][NB_RB_MAX]);
public_pdcp(void pdcp_update_perioidical_stats(const protocol_ctxt_t* const ctxt_pP)); public_pdcp(void pdcp_update_perioidical_stats(const protocol_ctxt_t* const ctxt_pP));
@@ -131,8 +131,8 @@ public_pdcp(void pdcp_update_perioidical_stats(const protocol_ctxt_t* const ctx
//public_pdcp(uint64_t *pdcp_size_packet); //public_pdcp(uint64_t *pdcp_size_packet);
typedef struct pdcp_enb_s { typedef struct pdcp_enb_s {
// used for eNB stats generation // used for eNB stats generation
uint16_t uid[NUMBER_OF_UE_MAX]; uint16_t uid[MAX_MOBILES_PER_ENB];
rnti_t rnti[NUMBER_OF_UE_MAX]; rnti_t rnti[MAX_MOBILES_PER_ENB];
uint16_t num_ues; uint16_t num_ues;
uint64_t sfn; uint64_t sfn;
@@ -482,19 +482,19 @@ typedef struct pdcp_missing_pdu_info_t {
protected_pdcp(signed int pdcp_2_nas_irq;) protected_pdcp(signed int pdcp_2_nas_irq;)
public_pdcp(pdcp_stats_t UE_pdcp_stats[NUMBER_OF_UE_MAX];) public_pdcp(pdcp_stats_t UE_pdcp_stats[MAX_MOBILES_PER_ENB];)
public_pdcp(pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];) public_pdcp(pdcp_stats_t eNB_pdcp_stats[NUMBER_OF_eNB_MAX];)
//protected_pdcp(pdcp_t pdcp_array_srb_ue[NUMBER_OF_UE_MAX][2];) //protected_pdcp(pdcp_t pdcp_array_srb_ue[MAX_MOBILES_PER_ENB][2];)
//protected_pdcp(pdcp_t pdcp_array_drb_ue[NUMBER_OF_UE_MAX][maxDRB];) //protected_pdcp(pdcp_t pdcp_array_drb_ue[MAX_MOBILES_PER_ENB][maxDRB];)
//public_pdcp(pdcp_t pdcp_array_srb_eNB[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][2];) //public_pdcp(pdcp_t pdcp_array_srb_eNB[NUMBER_OF_eNB_MAX][MAX_MOBILES_PER_ENB][2];)
//protected_pdcp(pdcp_t pdcp_array_drb_eNB[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX][maxDRB];) //protected_pdcp(pdcp_t pdcp_array_drb_eNB[NUMBER_OF_eNB_MAX][MAX_MOBILES_PER_ENB][maxDRB];)
// for UE code conly // for UE code conly
protected_pdcp(rnti_t pdcp_UE_UE_module_id_to_rnti[NUMBER_OF_UE_MAX];) protected_pdcp(rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];)
protected_pdcp(rnti_t pdcp_eNB_UE_instance_to_rnti[NUMBER_OF_UE_MAX];) // for noS1 mode protected_pdcp(rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB];) // for noS1 mode
protected_pdcp(unsigned int pdcp_eNB_UE_instance_to_rnti_index;) protected_pdcp(unsigned int pdcp_eNB_UE_instance_to_rnti_index;)
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
public_pdcp(pdcp_mbms_t pdcp_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h public_pdcp(pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_pdcp(pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h public_pdcp(pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
#endif #endif
protected_pdcp(sdu_size_t pdcp_output_sdu_bytes_to_write;) protected_pdcp(sdu_size_t pdcp_output_sdu_bytes_to_write;)
+2 -2
View File
@@ -73,7 +73,7 @@ extern struct nlmsghdr *nas_nlh_rx;
extern struct iovec nas_iov_tx; extern struct iovec nas_iov_tx;
extern struct iovec nas_iov_rx; extern struct iovec nas_iov_rx;
#ifdef UE_NAS_USE_TUN #ifdef UE_NAS_USE_TUN
extern int nas_sock_fd[NUMBER_OF_UE_MAX]; extern int nas_sock_fd[MAX_MOBILES_PER_ENB];
#else #else
extern int nas_sock_fd; extern int nas_sock_fd;
#endif #endif
@@ -852,7 +852,7 @@ void pdcp_fifo_read_input_sdus_from_otg (const protocol_ctxt_t* const ctxt_pP)
ctxt_pP->subframe, ctxt_pP->subframe,
ctxt_pP->module_id); ctxt_pP->module_id);
for (dst_id = 0; dst_id<NUMBER_OF_UE_MAX; dst_id++) { for (dst_id = 0; dst_id<MAX_MOBILES_PER_ENB; dst_id++) {
ctxt.rnti = oai_emulation.info.eNB_ue_module_id_to_rnti[ctxt.module_id][dst_id]; ctxt.rnti = oai_emulation.info.eNB_ue_module_id_to_rnti[ctxt.module_id][dst_id];
} }
+1 -1
View File
@@ -615,7 +615,7 @@ rlc_module_init (void)
rlc_coll_p = hashtable_create ((maxDRB + 2) * 16, NULL, rb_free_rlc_union); rlc_coll_p = hashtable_create ((maxDRB + 2) * 16, NULL, rb_free_rlc_union);
AssertFatal(rlc_coll_p != NULL, "UNRECOVERABLE error, RLC hashtable_create failed"); AssertFatal(rlc_coll_p != NULL, "UNRECOVERABLE error, RLC hashtable_create failed");
for (module_id1=0; module_id1 < NUMBER_OF_UE_MAX; module_id1++) { for (module_id1=0; module_id1 < MAX_MOBILES_PER_ENB; module_id1++) {
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
for (k=0; k < RLC_MAX_MBMS_LC; k++) { for (k=0; k < RLC_MAX_MBMS_LC; k++) {
+1 -1
View File
@@ -234,7 +234,7 @@ typedef struct rlc_mbms_id_s {
# define maxSessionPerPMCH 1 # define maxSessionPerPMCH 1
# endif # endif
#endif #endif
//public_rlc(rlc_mbms_t rlc_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h //public_rlc(rlc_mbms_t rlc_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
//public_rlc(rlc_mbms_t rlc_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h //public_rlc(rlc_mbms_t rlc_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[MAX_MOBILES_PER_ENB][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[MAX_MOBILES_PER_ENB][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h public_rlc(rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_LC];) // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
+1 -1
View File
@@ -52,7 +52,7 @@
#define UE_IP_NB_INSTANCES_MAX NUMBER_OF_UE_MAX #define UE_IP_NB_INSTANCES_MAX MAX_MOBILES_PER_ENB
#endif #endif
+2 -2
View File
@@ -88,7 +88,7 @@
/*I will change the name of the structure for compile purposes--> hope not to undo this process*/ /*I will change the name of the structure for compile purposes--> hope not to undo this process*/
typedef unsigned int uid_NB_IoT_t; typedef unsigned int uid_NB_IoT_t;
#define UID_LINEAR_ALLOCATOR_BITMAP_SIZE_NB_IoT (((NUMBER_OF_UE_MAX_NB_IoT/8)/sizeof(unsigned int)) + 1) #define UID_LINEAR_ALLOCATOR_BITMAP_SIZE_NB_IoT (((MAX_MOBILES_PER_ENB_NB_IoT/8)/sizeof(unsigned int)) + 1)
typedef struct uid_linear_allocator_NB_IoT_s { typedef struct uid_linear_allocator_NB_IoT_s {
unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE_NB_IoT]; unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE_NB_IoT];
@@ -150,7 +150,7 @@ typedef struct UE_RRC_INFO_NB_IoT_s {
// HO_STATE is not supported by NB-IoT // HO_STATE is not supported by NB-IoT
//#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_RG //#define MAX_MOBILES_PER_ENB MAX_MOBILES_PER_RG
#define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; } #define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; }
#define RRM_MALLOC(t,n) (t *) malloc16( sizeof(t) * n ) #define RRM_MALLOC(t,n) (t *) malloc16( sizeof(t) * n )
#define RRM_CALLOC(t,n) (t *) malloc16( sizeof(t) * n) #define RRM_CALLOC(t,n) (t *) malloc16( sizeof(t) * n)
+1
View File
@@ -37,6 +37,7 @@
#include "rrc_defs.h" #include "rrc_defs.h"
#include "rrc_extern.h" #include "rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "openair1/PHY/LTE_ESTIMATION/lte_estimation.h"
#include "LAYER2/RLC/rlc.h" #include "LAYER2/RLC/rlc.h"
#include "COMMON/mac_rrc_primitives.h" #include "COMMON/mac_rrc_primitives.h"
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
+4 -4
View File
@@ -171,7 +171,7 @@
//-------- //--------
typedef unsigned int uid_t; typedef unsigned int uid_t;
#define UID_LINEAR_ALLOCATOR_BITMAP_SIZE (((NUMBER_OF_UE_MAX/8)/sizeof(unsigned int)) + 1) #define UID_LINEAR_ALLOCATOR_BITMAP_SIZE (((MAX_MOBILES_PER_ENB/8)/sizeof(unsigned int)) + 1)
typedef struct uid_linear_allocator_s { typedef struct uid_linear_allocator_s {
unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE]; unsigned int bitmap[UID_LINEAR_ALLOCATOR_BITMAP_SIZE];
} uid_allocator_t; } uid_allocator_t;
@@ -219,7 +219,7 @@ typedef enum HO_STATE_e {
HO_COMPLETE // initiated by the target eNB HO_COMPLETE // initiated by the target eNB
} HO_STATE_t; } HO_STATE_t;
//#define NUMBER_OF_UE_MAX MAX_MOBILES_PER_RG //#define MAX_MOBILES_PER_ENB MAX_MOBILES_PER_RG
#define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; } #define RRM_FREE(p) if ( (p) != NULL) { free(p) ; p=NULL ; }
#define RRM_MALLOC(t,n) (t *) malloc16( sizeof(t) * n ) #define RRM_MALLOC(t,n) (t *) malloc16( sizeof(t) * n )
#define RRM_CALLOC(t,n) (t *) malloc16( sizeof(t) * n) #define RRM_CALLOC(t,n) (t *) malloc16( sizeof(t) * n)
@@ -521,8 +521,8 @@ typedef struct {
#endif #endif
SRB_INFO SI; SRB_INFO SI;
SRB_INFO Srb0; SRB_INFO Srb0;
uint8_t *paging[NUMBER_OF_UE_MAX]; uint8_t *paging[MAX_MOBILES_PER_ENB];
uint32_t sizeof_paging[NUMBER_OF_UE_MAX]; uint32_t sizeof_paging[MAX_MOBILES_PER_ENB];
} rrc_eNB_carrier_data_t; } rrc_eNB_carrier_data_t;
typedef struct eNB_RRC_INST_s { typedef struct eNB_RRC_INST_s {
+13 -13
View File
@@ -515,7 +515,7 @@ rrc_eNB_get_next_transaction_identifier(
// //
// AssertFatal(enb_mod_idP < NB_eNB_INST, "eNB index invalid (%d/%d)!", enb_mod_idP, NB_eNB_INST); // AssertFatal(enb_mod_idP < NB_eNB_INST, "eNB index invalid (%d/%d)!", enb_mod_idP, NB_eNB_INST);
// //
// for (i = 0; i < NUMBER_OF_UE_MAX; i++) { // for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
// if (RC.rrc[enb_mod_idP]->Info.UE_list[i] == UE_identity) { // if (RC.rrc[enb_mod_idP]->Info.UE_list[i] == UE_identity) {
// // UE_identity already registered // // UE_identity already registered
// reg = TRUE; // reg = TRUE;
@@ -854,14 +854,14 @@ rrc_eNB_free_UE(const module_id_t enb_mod_idP,const struct rrc_eNB_ue_context_s*
#endif #endif
for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_PHY = RC.eNB[enb_mod_idP][CC_id]; eNB_PHY = RC.eNB[enb_mod_idP][CC_id];
for (i=0; i<NUMBER_OF_UE_MAX; i++) { for (i=0; i<MAX_MOBILES_PER_ENB; i++) {
ulsch = eNB_PHY->ulsch[i]; ulsch = eNB_PHY->ulsch[i];
if((ulsch != NULL) && (ulsch->rnti == rnti)){ if((ulsch != NULL) && (ulsch->rnti == rnti)){
LOG_I(RRC, "clean_eNb_ulsch UE %x \n", rnti); LOG_I(RRC, "clean_eNb_ulsch UE %x \n", rnti);
clean_eNb_ulsch(ulsch); clean_eNb_ulsch(ulsch);
} }
} }
for (i=0; i<NUMBER_OF_UE_MAX; i++) { for (i=0; i<MAX_MOBILES_PER_ENB; i++) {
dlsch = eNB_PHY->dlsch[i][0]; dlsch = eNB_PHY->dlsch[i][0];
if((dlsch != NULL) && (dlsch->rnti == rnti)){ if((dlsch != NULL) && (dlsch->rnti == rnti)){
LOG_I(RRC, "clean_eNb_dlsch UE %x \n", rnti); LOG_I(RRC, "clean_eNb_dlsch UE %x \n", rnti);
@@ -1812,7 +1812,7 @@ rrc_eNB_process_RRCConnectionReestablishmentComplete(
eNB_MAC_INST *eNB_MAC = RC.mac[ctxt_prior.module_id]; eNB_MAC_INST *eNB_MAC = RC.mac[ctxt_prior.module_id];
for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) { for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
eNB_PHY = RC.eNB[ctxt_prior.module_id][CC_id]; eNB_PHY = RC.eNB[ctxt_prior.module_id][CC_id];
for (int i=0; i<NUMBER_OF_UE_MAX; i++) { for (int i=0; i<MAX_MOBILES_PER_ENB; i++) {
ulsch = eNB_PHY->ulsch[i]; ulsch = eNB_PHY->ulsch[i];
if((ulsch != NULL) && (ulsch->rnti == ctxt_prior.rnti)){ if((ulsch != NULL) && (ulsch->rnti == ctxt_prior.rnti)){
LOG_I(RRC, "clean_eNb_ulsch UE %x \n", ctxt_prior.rnti); LOG_I(RRC, "clean_eNb_ulsch UE %x \n", ctxt_prior.rnti);
@@ -5708,11 +5708,11 @@ openair_rrc_eNB_init(
} }
#endif #endif
AssertFatal(RC.rrc[enb_mod_idP] != NULL, "RC.rrc not initialized!"); AssertFatal(RC.rrc[enb_mod_idP] != NULL, "RC.rrc not initialized!");
AssertFatal(NUMBER_OF_UE_MAX < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow"); AssertFatal(MAX_MOBILES_PER_ENB < (module_id_t)0xFFFFFFFFFFFFFFFF, " variable overflow");
#ifdef ENABLE_ITTI #ifdef ENABLE_ITTI
AssertFatal(configuration!=NULL,"configuration input is null\n"); AssertFatal(configuration!=NULL,"configuration input is null\n");
#endif #endif
// for (j = 0; j < NUMBER_OF_UE_MAX; j++) // for (j = 0; j < MAX_MOBILES_PER_ENB; j++)
// RC.rrc[ctxt.module_id].Info.UE[j].Status = RRC_IDLE; //CH_READY; // RC.rrc[ctxt.module_id].Info.UE[j].Status = RRC_IDLE; //CH_READY;
// //
//#if defined(ENABLE_USE_MME) //#if defined(ENABLE_USE_MME)
@@ -5721,7 +5721,7 @@ openair_rrc_eNB_init(
//#endif //#endif
// { // {
// /* Init security parameters */ // /* Init security parameters */
// for (j = 0; j < NUMBER_OF_UE_MAX; j++) { // for (j = 0; j < MAX_MOBILES_PER_ENB; j++) {
// RC.rrc[ctxt.module_id].ciphering_algorithm[j] = SecurityAlgorithmConfig__cipheringAlgorithm_eea0; // RC.rrc[ctxt.module_id].ciphering_algorithm[j] = SecurityAlgorithmConfig__cipheringAlgorithm_eea0;
// RC.rrc[ctxt.module_id].integrity_algorithm[j] = SecurityAlgorithmConfig__integrityProtAlgorithm_eia2; // RC.rrc[ctxt.module_id].integrity_algorithm[j] = SecurityAlgorithmConfig__integrityProtAlgorithm_eia2;
// rrc_eNB_init_security(enb_mod_idP, j); // rrc_eNB_init_security(enb_mod_idP, j);
@@ -5735,13 +5735,13 @@ openair_rrc_eNB_init(
uid_linear_allocator_init(&RC.rrc[ctxt.module_id]->uid_allocator); uid_linear_allocator_init(&RC.rrc[ctxt.module_id]->uid_allocator);
RB_INIT(&RC.rrc[ctxt.module_id]->rrc_ue_head); RB_INIT(&RC.rrc[ctxt.module_id]->rrc_ue_head);
// for (j = 0; j < (NUMBER_OF_UE_MAX + 1); j++) { // for (j = 0; j < (MAX_MOBILES_PER_ENB + 1); j++) {
// RC.rrc[enb_mod_idP]->Srb2[j].Active = 0; // RC.rrc[enb_mod_idP]->Srb2[j].Active = 0;
// } // }
RC.rrc[ctxt.module_id]->initial_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); RC.rrc[ctxt.module_id]->initial_id2_s1ap_ids = hashtable_create (MAX_MOBILES_PER_ENB * 2, NULL, NULL);
RC.rrc[ctxt.module_id]->s1ap_id2_s1ap_ids = hashtable_create (NUMBER_OF_UE_MAX * 2, NULL, NULL); RC.rrc[ctxt.module_id]->s1ap_id2_s1ap_ids = hashtable_create (MAX_MOBILES_PER_ENB * 2, NULL, NULL);
memcpy(&RC.rrc[ctxt.module_id]->configuration,configuration,sizeof(RrcConfigurationReq)); memcpy(&RC.rrc[ctxt.module_id]->configuration,configuration,sizeof(RrcConfigurationReq));
@@ -5797,7 +5797,7 @@ openair_rrc_eNB_init(
, configuration , configuration
#endif #endif
); );
for (int ue_id = 0; ue_id < NUMBER_OF_UE_MAX; ue_id++) { for (int ue_id = 0; ue_id < MAX_MOBILES_PER_ENB; ue_id++) {
RC.rrc[ctxt.module_id]->carrier[CC_id].sizeof_paging[ue_id] = 0; RC.rrc[ctxt.module_id]->carrier[CC_id].sizeof_paging[ue_id] = 0;
RC.rrc[ctxt.module_id]->carrier[CC_id].paging[ue_id] = (uint8_t*) malloc16(256); RC.rrc[ctxt.module_id]->carrier[CC_id].paging[ue_id] = (uint8_t*) malloc16(256);
} }
@@ -6041,7 +6041,7 @@ rrc_eNB_decode_ccch(
ue_context_p->ue_context.ue_release_timer = 0; ue_context_p->ue_context.ue_release_timer = 0;
// insert C-RNTI to map // insert C-RNTI to map
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (reestablish_rnti_map[i][0] == 0) { if (reestablish_rnti_map[i][0] == 0) {
reestablish_rnti_map[i][0] = ctxt_pP->rnti; reestablish_rnti_map[i][0] = ctxt_pP->rnti;
reestablish_rnti_map[i][1] = c_rnti; reestablish_rnti_map[i][1] = c_rnti;
@@ -6665,7 +6665,7 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0; RC.mac[ctxt_pP->module_id]->UE_list.UE_sched_ctrl[UE_id].ue_reestablishment_reject_timer = 0;
rnti_t reestablish_rnti = 0; rnti_t reestablish_rnti = 0;
// select C-RNTI from map // select C-RNTI from map
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if (reestablish_rnti_map[i][0] == ctxt_pP->rnti) { if (reestablish_rnti_map[i][0] == ctxt_pP->rnti) {
reestablish_rnti = reestablish_rnti_map[i][1]; reestablish_rnti = reestablish_rnti_map[i][1];
ue_context_p = rrc_eNB_get_ue_context( ue_context_p = rrc_eNB_get_ue_context(
+1 -1
View File
@@ -1994,7 +1994,7 @@ int rrc_eNB_process_PAGING_IND(MessageDef *msg_p, const char *msg_name, instance
/* insert data to UE_PF_PO or update data in UE_PF_PO */ /* insert data to UE_PF_PO or update data in UE_PF_PO */
pthread_mutex_lock(&ue_pf_po_mutex); pthread_mutex_lock(&ue_pf_po_mutex);
uint8_t i = 0; uint8_t i = 0;
for (i = 0; i < NUMBER_OF_UE_MAX; i++) { for (i = 0; i < MAX_MOBILES_PER_ENB; i++) {
if ((UE_PF_PO[CC_id][i].enable_flag == TRUE && UE_PF_PO[CC_id][i].ue_index_value == (uint16_t)(S1AP_PAGING_IND(msg_p).ue_index_value)) if ((UE_PF_PO[CC_id][i].enable_flag == TRUE && UE_PF_PO[CC_id][i].ue_index_value == (uint16_t)(S1AP_PAGING_IND(msg_p).ue_index_value))
|| (UE_PF_PO[CC_id][i].enable_flag != TRUE)) { || (UE_PF_PO[CC_id][i].enable_flag != TRUE)) {
/* set T = min(Tc,Tue) */ /* set T = min(Tc,Tue) */
+2 -2
View File
@@ -75,10 +75,10 @@ extern uint32_t timeToTrigger_ms[16];
extern float RSRP_meas_mapping[98]; extern float RSRP_meas_mapping[98];
extern float RSRQ_meas_mapping[35]; extern float RSRQ_meas_mapping[35];
extern UE_PF_PO_t UE_PF_PO[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; extern UE_PF_PO_t UE_PF_PO[MAX_NUM_CCs][MAX_MOBILES_PER_ENB];
extern pthread_mutex_t ue_pf_po_mutex; extern pthread_mutex_t ue_pf_po_mutex;
extern uint16_t reestablish_rnti_map[NUMBER_OF_UE_MAX][2]; extern uint16_t reestablish_rnti_map[MAX_MOBILES_PER_ENB][2];
#endif #endif
+2 -2
View File
@@ -36,7 +36,7 @@
#include "COMMON/mac_rrc_primitives.h" #include "COMMON/mac_rrc_primitives.h"
#include "LAYER2/MAC/mac.h" #include "LAYER2/MAC/mac.h"
UE_PF_PO_t UE_PF_PO[MAX_NUM_CCs][NUMBER_OF_UE_MAX]; UE_PF_PO_t UE_PF_PO[MAX_NUM_CCs][MAX_MOBILES_PER_ENB];
pthread_mutex_t ue_pf_po_mutex; pthread_mutex_t ue_pf_po_mutex;
UE_RRC_INST *UE_rrc_inst; UE_RRC_INST *UE_rrc_inst;
#include "LAYER2/MAC/mac_extern.h" #include "LAYER2/MAC/mac_extern.h"
@@ -242,6 +242,6 @@ float RSRQ_meas_mapping[35] = {
// [0]: current C-RNTI, [1]: prior C-RNTI // [0]: current C-RNTI, [1]: prior C-RNTI
// insert one when eNB received RRCConnectionReestablishmentRequest message // insert one when eNB received RRCConnectionReestablishmentRequest message
// delete one when eNB received RRCConnectionReestablishmentComplete message // delete one when eNB received RRCConnectionReestablishmentComplete message
uint16_t reestablish_rnti_map[NUMBER_OF_UE_MAX][2] = {{0}}; uint16_t reestablish_rnti_map[MAX_MOBILES_PER_ENB][2] = {{0}};
#endif #endif
+135 -135
View File
@@ -33,7 +33,7 @@
#ifndef __OTG_DEFS_H__ #ifndef __OTG_DEFS_H__
# define __OTG_DEFS_H__ # define __OTG_DEFS_H__
/* \brief To define the NUMBER_OF_eNB_MAX and NUMBER_OF_UE_MAX */ /* \brief To define the NUMBER_OF_eNB_MAX and MAX_MOBILES_PER_ENB */
#if STANDALONE==1 #if STANDALONE==1
#include "openairinterface5g_limits.h" #include "openairinterface5g_limits.h"
#else #else
@@ -313,13 +313,13 @@ typedef struct { /*this structure constitutes a whole bg-stream with multiple bg
typedef struct { typedef struct {
int application_type[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][MAX_NUM_APPLICATION]; /*!\brief It identify the application of the simulated traffic, could be cbr, m2m, gaming,etc*/ int application_type[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][MAX_NUM_APPLICATION]; /*!\brief It identify the application of the simulated traffic, could be cbr, m2m, gaming,etc*/
int trans_proto[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; int trans_proto[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
int ip_v[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; int ip_v[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
int flow_start[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief Duration of traffic generation or use the emuulation time instead */ int flow_start[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief Duration of traffic generation or use the emuulation time instead */
int flow_duration[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief Duration of traffic generation or use the emuulation time instead */ int flow_duration[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief Duration of traffic generation or use the emuulation time instead */
int idt_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief Inter Departure Time distribution */ int idt_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief Inter Departure Time distribution */
int idt_min[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][MAX_NUM_APPLICATION]; /*!\brief Min Inter Departure Time, for uniform distrib */ int idt_min[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][MAX_NUM_APPLICATION]; /*!\brief Min Inter Departure Time, for uniform distrib */
int idt_max[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][MAX_NUM_APPLICATION]; /*!\brief idt, Max Inter Departure Time, for uniform distrib */ int idt_max[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX][MAX_NUM_APPLICATION]; /*!\brief idt, Max Inter Departure Time, for uniform distrib */
@@ -338,69 +338,69 @@ typedef struct {
*/ */
typedef struct { typedef struct {
int max_nb_frames; /*!< \brief Max Number of frames*/ int max_nb_frames; /*!< \brief Max Number of frames*/
int application_type[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief It identify the application of the simulated traffic, could be cbr, m2m, gaming,etc*/ int application_type[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief It identify the application of the simulated traffic, could be cbr, m2m, gaming,etc*/
/*!\header info */ /*!\header info */
int trans_proto[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief Transport Protocol*/ int trans_proto[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief Transport Protocol*/
int ip_v[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief Ip version */ int ip_v[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief Ip version */
//int header_compression; /*!\brief Specify if header compression is used or not */ //int header_compression; /*!\brief Specify if header compression is used or not */
int num_nodes; /*!\brief Number of used nodes in the simulation */ int num_nodes; /*!\brief Number of used nodes in the simulation */
int packet_gen_type; /*!\brief define how the payload is generated: fixed, predefined, random position, random see ALPHABET_GEN */ int packet_gen_type; /*!\brief define how the payload is generated: fixed, predefined, random position, random see ALPHABET_GEN */
unsigned int background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief enable or disable background traffic */ unsigned int background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief enable or disable background traffic */
unsigned int aggregation_level[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /* define packet aggregation level for the case of gateway*/ unsigned int aggregation_level[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /* define packet aggregation level for the case of gateway*/
// src id , dst id, and state // think to the case of several streams per node !!!!! // src id , dst id, and state // think to the case of several streams per node !!!!!
int idt_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Inter Departure Time distribution */ int idt_dist[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Inter Departure Time distribution */
int idt_min[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Min Inter Departure Time, for uniform distrib */ int idt_min[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Min Inter Departure Time, for uniform distrib */
int idt_max[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, Max Inter Departure Time, for uniform distrib */ int idt_max[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, Max Inter Departure Time, for uniform distrib */
double idt_std_dev[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, Standard Deviation, for guassian distrib */ double idt_std_dev[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, Standard Deviation, for guassian distrib */
double idt_lambda[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, lambda, for exponential/poisson distrib */ double idt_lambda[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief idt, lambda, for exponential/poisson distrib */
double idt_scale[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief scale :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/ double idt_scale[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief scale :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/
double idt_shape[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief shape :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/ double idt_shape[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief shape :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/
int size_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Paylolad size distribution */ int size_dist[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Paylolad size distribution */
int size_min[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Min Payload size, for uniform distrib */ int size_min[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief Min Payload size, for uniform distrib */
int size_max[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, Max Inter Departure Time, for uniform distrib */ int size_max[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, Max Inter Departure Time, for uniform distrib */
double size_std_dev[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, Standard Deviation, for guassian distrib */ double size_std_dev[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, Standard Deviation, for guassian distrib */
double size_lambda[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, lambda, for exponential/poisson distrib */ double size_lambda[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief payload, lambda, for exponential/poisson distrib */
double size_scale[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief scale :parameter for Pareto, Gamma, Weibull and Cauchy distribution */ double size_scale[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief scale :parameter for Pareto, Gamma, Weibull and Cauchy distribution */
double size_shape[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief shape :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/ double size_shape[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION][MAX_NUM_TRAFFIC_STATE]; /*!\brief shape :parameter for Pareto, Gamma, Weibull and Cauchy distribution*/
// info for state-based traffic gen // info for state-based traffic gen
int num_state [NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!\brief Number of states for source node*/ int num_state [NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!\brief Number of states for source node*/
// int state_dist[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_TRAFFIC_STATE]; /*!\brief States distribution */ // int state_dist[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_TRAFFIC_STATE]; /*!\brief States distribution */
double state_prob[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_TRAFFIC_STATE]; /*!\brief State probablity: prob to move from one state to the other one */ double state_prob[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_TRAFFIC_STATE]; /*!\brief State probablity: prob to move from one state to the other one */
// num stream for each src // num stream for each src
// int stream [NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; // this requires multi thread for parallel stream for a givcen src // int stream [NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; // this requires multi thread for parallel stream for a givcen src
// emu info // emu info
int flow_start_flag[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief flow start time flag for traffic generation or use the emuulation time instead */ int flow_start_flag[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief flow start time flag for traffic generation or use the emuulation time instead */
int flow_start[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief flow start time of traffic generation or use the emuulation time instead */ int flow_start[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief flow start time of traffic generation or use the emuulation time instead */
int flow_duration[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!\brief flow duration of traffic generation or use the emuulation time instead */ int flow_duration[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!\brief flow duration of traffic generation or use the emuulation time instead */
int seed; /*!\brief The seed used to generate the random positions*/ int seed; /*!\brief The seed used to generate the random positions*/
int dst_port[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!\brief Destination port number, for the socket mode*/ int dst_port[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!\brief Destination port number, for the socket mode*/
char *dst_ip[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!\brief Destination IP address, for the socket mode*/ char *dst_ip[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!\brief Destination IP address, for the socket mode*/
int trans_proto_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!\brief define the transport protocol and IP version for background traffic*/ int trans_proto_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!\brief define the transport protocol and IP version for background traffic*/
double prob_off_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; double prob_off_pu[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
double prob_off_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; double prob_off_ed[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
double prob_off_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; double prob_off_pe[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
double prob_pu_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; double prob_pu_ed[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
double prob_pu_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; double prob_pu_pe[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
double prob_ed_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; double prob_ed_pe[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
double prob_ed_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; double prob_ed_pu[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int holding_time_off_ed[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int holding_time_off_ed[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int holding_time_off_pu[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int holding_time_off_pu[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int holding_time_off_pe[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int holding_time_off_pe[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int holding_time_pe_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int holding_time_pe_off[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int pu_size_pkts[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int pu_size_pkts[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int ed_size_pkts[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int ed_size_pkts[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int m2m[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int m2m[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int throughput_metric; unsigned int throughput_metric;
@@ -409,7 +409,7 @@ typedef struct {
unsigned int curve; unsigned int curve;
unsigned int owd_radio_access; unsigned int owd_radio_access;
unsigned int background_stats; unsigned int background_stats;
unsigned int application_idx[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; unsigned int application_idx[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
} otg_t; } otg_t;
@@ -485,8 +485,8 @@ typedef struct {
unsigned int rx_total_bytes_dl; unsigned int rx_total_bytes_dl;
/*TARMA parameteres*/ /*TARMA parameteres*/
tarmaStream_t *mtarma_stream[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; tarmaStream_t *mtarma_stream[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
tarmaVideo_t *mtarma_video[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; tarmaVideo_t *mtarma_video[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
} otg_multicast_info_t; } otg_multicast_info_t;
@@ -505,71 +505,71 @@ typedef struct {
int ctime; /*!< \brief Simulation time in ms*/ int ctime; /*!< \brief Simulation time in ms*/
int ptime_background_ul; /*!< \brief time of last sent background UL data (time in ms)*/ int ptime_background_ul; /*!< \brief time of last sent background UL data (time in ms)*/
int ptime_background_dl; /*!< \brief time of last sent background DL data (time in ms)*/ int ptime_background_dl; /*!< \brief time of last sent background DL data (time in ms)*/
int ptime[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!< \brief time of last sent data (time in ms)*/ int ptime[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!< \brief time of last sent data (time in ms)*/
int seq_num[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief the sequence number of the sender */ int seq_num[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief the sequence number of the sender */
int seq_num_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief the sequence number for background traffic of the sender */ int seq_num_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief the sequence number for background traffic of the sender */
int seq_num_rx[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief the sequence number of the receiver */ int seq_num_rx[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief the sequence number of the receiver */
int seq_num_rx_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief the sequence number for background traffic of the receiver */ int seq_num_rx_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief the sequence number for background traffic of the receiver */
int idt_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Inter Departure Time for background traffic in ms*/ int idt_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Inter Departure Time for background traffic in ms*/
int size_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief payload size for background traffic*/ int size_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief payload size for background traffic*/
int idt[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!< \brief Inter Departure Time in ms*/ int idt[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!< \brief Inter Departure Time in ms*/
int header_type[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Define the type of header: Transport layer + IP version*/ int header_type[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Define the type of header: Transport layer + IP version*/
/*!< \brief Statics part: vars updated at each iteration of otg_tx */ /*!< \brief Statics part: vars updated at each iteration of otg_tx */
int tx_num_pkt[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packet in the tx*/ int tx_num_pkt[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packet in the tx*/
int tx_num_bytes[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of bytes in the tx*/ // get the size and calculate the avg throughput int tx_num_bytes[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of bytes in the tx*/ // get the size and calculate the avg throughput
// vars updated at each iteration of otg_rx // vars updated at each iteration of otg_rx
int rx_num_pkt[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packet in the rx */ int rx_num_pkt[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packet in the rx */
int rx_num_bytes[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of bytes in the rx */ int rx_num_bytes[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of bytes in the rx */
float rx_pkt_owd[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief One way delay: rx_ctime - tx_ctime, */ float rx_pkt_owd[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief One way delay: rx_ctime - tx_ctime, */
float rx_owd_min[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/ float rx_owd_min[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
float rx_owd_max[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/ float rx_owd_max[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
float rx_pkt_owd_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief One way delay: rx_ctime - tx_ctime, */ float rx_pkt_owd_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief One way delay: rx_ctime - tx_ctime, */
float rx_owd_min_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/ float rx_owd_min_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
float rx_owd_max_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/ float rx_owd_max_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
float rx_pkt_owd_history[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][2]; /*!< \brief One way delay histoy used for jitter calculation: rx_ctime - tx_ctime, [2] to keep the owd for the current and previous pkt */ float rx_pkt_owd_history[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][2]; /*!< \brief One way delay histoy used for jitter calculation: rx_ctime - tx_ctime, [2] to keep the owd for the current and previous pkt */
float rx_pkt_owd_history_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][2]; /*!< \brief One way delay histoy used for jitter calculation: rx_ctime - tx_ctime, [2] to keep the owd for the current and previous pkt */ float rx_pkt_owd_history_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][2]; /*!< \brief One way delay histoy used for jitter calculation: rx_ctime - tx_ctime, [2] to keep the owd for the current and previous pkt */
float rx_pkt_jitter[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief One way delay: rx_ctime - tx_ctime */ float rx_pkt_jitter[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief One way delay: rx_ctime - tx_ctime */
float rx_jitter_min[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/ float rx_jitter_min[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
float rx_jitter_max[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/ float rx_jitter_max[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
float rx_jitter_avg[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/ float rx_jitter_avg[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
float rx_pkt_jitter_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief One way delay: rx_ctime - tx_ctime */ float rx_pkt_jitter_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief One way delay: rx_ctime - tx_ctime */
float rx_jitter_min_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/ float rx_jitter_min_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay min*/
float rx_jitter_max_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/ float rx_jitter_max_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
float rx_jitter_avg_e2e[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/ float rx_jitter_avg_e2e[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
int rx_jitter_sample[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/ int rx_jitter_sample[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief One way delay max*/
int nb_loss_pkts_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packets losses for UL*/ int nb_loss_pkts_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packets losses for UL*/
int nb_loss_pkts_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packets losses for DL*/ int nb_loss_pkts_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Number of data packets losses for DL*/
float owd_const[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!< \brief One way delay constant*/ float owd_const[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!< \brief One way delay constant*/
/*!< \brief KPI part: calculate the KPIs, total */ /*!< \brief KPI part: calculate the KPIs, total */
double tx_throughput[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Tx throughput: (size of transmitted data)/ctime*/ double tx_throughput[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Tx throughput: (size of transmitted data)/ctime*/
double rx_goodput[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Rx goodput: (size of received data)/ctime*/ double rx_goodput[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Rx goodput: (size of received data)/ctime*/
float rx_loss_rate[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_EMU_TRAFFIC]; /*!< \brief Rx Loss Rate: ratio, unit: bytes*/ float rx_loss_rate[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_EMU_TRAFFIC]; /*!< \brief Rx Loss Rate: ratio, unit: bytes*/
//int rx_latency[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Rx Latency */ //int rx_latency[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Rx Latency */
/*!< \brief Background traffic part: SATS + KPIs */ /*!< \brief Background traffic part: SATS + KPIs */
int tx_num_pkt_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background data packet in the rx */ int tx_num_pkt_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background data packet in the rx */
int tx_num_bytes_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background bytes in the rx */ int tx_num_bytes_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background bytes in the rx */
int rx_num_pkt_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background data packet in the tx */ int rx_num_pkt_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background data packet in the tx */
int rx_num_bytes_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background bytes in the tx */ int rx_num_bytes_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background bytes in the tx */
int nb_loss_pkts_background_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background packets losses for UL*/ int nb_loss_pkts_background_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background packets losses for UL*/
int nb_loss_pkts_background_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Number of background packets losses for DL*/ int nb_loss_pkts_background_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Number of background packets losses for DL*/
double tx_throughput_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Tx throughput: (size of transmitted data)/ctime*/ double tx_throughput_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Tx throughput: (size of transmitted data)/ctime*/
double rx_goodput_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Rx goodput: (size of received data)/ctime*/ double rx_goodput_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Rx goodput: (size of received data)/ctime*/
float rx_loss_rate_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; /*!< \brief Rx Loss Rate: ratio, unit: bytes*/ float rx_loss_rate_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB]; /*!< \brief Rx Loss Rate: ratio, unit: bytes*/
float radio_access_delay[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; float radio_access_delay[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
int nb_loss_pkts_otg[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; int nb_loss_pkts_otg[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
unsigned int aggregation_level[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; unsigned int aggregation_level[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
unsigned int state[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; /*!< \brief current state of src node */ unsigned int state[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; /*!< \brief current state of src node */
float state_transition_prob[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; float state_transition_prob[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int start_holding_time_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int start_holding_time_off[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int c_holding_time_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int c_holding_time_off[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int c_holding_time_pe_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int c_holding_time_pe_off[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int start_holding_time_pe_off[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int start_holding_time_pe_off[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int tx_total_bytes_dl; unsigned int tx_total_bytes_dl;
unsigned int tx_total_bytes_ul; unsigned int tx_total_bytes_ul;
unsigned int rx_total_bytes_dl; unsigned int rx_total_bytes_dl;
@@ -582,32 +582,32 @@ typedef struct {
float average_jitter_ul_e2e; float average_jitter_ul_e2e;
/* VOIP tarffic parameters*/ /* VOIP tarffic parameters*/
float voip_transition_prob[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; float voip_transition_prob[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int voip_state[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int voip_state[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int start_voip_silence[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int start_voip_silence[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int c_holding_time_silence[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int c_holding_time_silence[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int start_voip_talk[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int start_voip_talk[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int c_holding_time_talk[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int c_holding_time_talk[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int silence_time[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int silence_time[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int simple_talk_time[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int simple_talk_time[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
/*TARMA parameteres*/ /*TARMA parameteres*/
tarmaStream_t *tarma_stream[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; tarmaStream_t *tarma_stream[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
tarmaVideo_t *tarma_video[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; tarmaVideo_t *tarma_video[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
/*BACKGROUND_USERS parameters*/ /*BACKGROUND_USERS parameters*/
backgroundStream_t *background_stream[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; backgroundStream_t *background_stream[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int header_size_app[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; unsigned int header_size_app[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION];
unsigned int header_size[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; unsigned int header_size[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
unsigned int m2m_aggregation[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; unsigned int m2m_aggregation[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
unsigned int flow_id[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; unsigned int flow_id[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
unsigned int traffic_type[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; unsigned int traffic_type[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
unsigned int traffic_type_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; unsigned int traffic_type_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
// unsigned int traffic_type_multicast[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX]; // unsigned int traffic_type_multicast[NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_SERVICE_MAX];
unsigned int hdr_size[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; unsigned int hdr_size[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
unsigned int header_type_app[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_NUM_APPLICATION]; ; unsigned int header_type_app[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_NUM_APPLICATION]; ;
unsigned int gen_pkts; unsigned int gen_pkts;
unsigned int header_size_background[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; unsigned int header_size_background[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
} otg_info_t; } otg_info_t;
@@ -640,14 +640,14 @@ typedef struct {
int init_forms; int init_forms;
int is_data_plot_ul; int is_data_plot_ul;
int is_data_plot_dl; int is_data_plot_dl;
float data_owd_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES]; float data_owd_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
float data_throughput_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES]; float data_throughput_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
float data_ctime_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES]; float data_ctime_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
int idx_ul[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; int idx_ul[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
float data_owd_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES]; float data_owd_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
float data_throughput_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES]; float data_throughput_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
float data_ctime_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][MAX_SAMPLES]; float data_ctime_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][MAX_SAMPLES];
int idx_dl[NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX]; int idx_dl[NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB][NUMBER_OF_eNB_MAX + MAX_MOBILES_PER_ENB];
} otg_forms_info_t; } otg_forms_info_t;
+4 -1
View File
@@ -72,7 +72,10 @@
#include "PHY/phy_extern.h" #include "PHY/phy_extern.h"
#include "LAYER2/MAC/mac_extern.h" #include "LAYER2/MAC/mac_extern.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "SCHED/sched_eNB.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/INIT/phy_init.h"
#include "LAYER2/MAC/mac.h" #include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_extern.h" #include "LAYER2/MAC/mac_extern.h"
+3 -1
View File
@@ -90,6 +90,8 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "create_tasks.h" #include "create_tasks.h"
#endif #endif
#include "PHY/INIT/phy_init.h"
#include "system.h" #include "system.h"
#ifdef XFORMS #ifdef XFORMS
@@ -1092,7 +1094,7 @@ int main( int argc, char **argv )
// init UE_PF_PO and mutex lock // init UE_PF_PO and mutex lock
pthread_mutex_init(&ue_pf_po_mutex, NULL); pthread_mutex_init(&ue_pf_po_mutex, NULL);
memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*NUMBER_OF_UE_MAX*MAX_NUM_CCs); memset (&UE_PF_PO[0][0], 0, sizeof(UE_PF_PO_t)*MAX_MOBILES_PER_ENB*MAX_NUM_CCs);
mlockall(MCL_CURRENT | MCL_FUTURE); mlockall(MCL_CURRENT | MCL_FUTURE);
+9 -17
View File
@@ -26,32 +26,24 @@
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#include "SIMULATION/TOOLS/defs.h" #include "SIMULATION/TOOLS/sim.h"
#include "SIMULATION/RF/defs.h" #include "SIMULATION/RF/rf.h"
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "PHY/phy_extern_ue.h"
#ifdef OPENAIR2 #include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/extern.h"
#include "UTIL/LOG/log_if.h" #include "UTIL/LOG/log_if.h"
#include "UTIL/LOG/log_extern.h" #include "UTIL/LOG/log_extern.h"
#include "RRC/LITE/extern.h" #include "RRC/LTE/rrc_extern.h"
#include "PHY_INTERFACE/extern.h" #include "PHY_INTERFACE/phy_interface_extern.h"
#include "UTIL/OCG/OCG.h" #include "UTIL/OCG/OCG.h"
#include "UTIL/OPT/opt.h" // to test OPT #include "UTIL/OPT/opt.h" // to test OPT
#endif
#include "UTIL/FIFO/types.h" #include "UTIL/FIFO/types.h"
#ifdef IFFT_FPGA
#include "PHY/LTE_REFSIG/mod_table.h"
#endif
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#ifdef XFORMS #ifdef XFORMS
#include "forms.h" #include "forms.h"
#include "phy_procedures_sim_form.h" #include "phy_procedures_sim_form.h"
+52 -60
View File
@@ -41,24 +41,23 @@
#include <execinfo.h> #include <execinfo.h>
#include "event_handler.h" #include "event_handler.h"
#include "SIMULATION/RF/defs.h" #include "SIMULATION/RF/rf.h"
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/LTE_TRANSPORT/proto.h" #include "PHY/defs_UE.h"
#include "PHY/vars.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 "SIMULATION/ETH_TRANSPORT/proto.h" #include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_proto.h"
//#ifdef OPENAIR2 #include "LAYER2/MAC/mac_vars.h"
#include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/proto.h"
#include "LAYER2/MAC/vars.h"
#include "pdcp.h" #include "pdcp.h"
#include "RRC/LITE/vars.h" #include "RRC/LTE/rrc_vars.h"
#include "RRC/NAS/nas_config.h" #include "RRC/NAS/nas_config.h"
#include "SCHED/defs.h"
#include "SCHED/vars.h"
#include "system.h" #include "system.h"
@@ -101,6 +100,7 @@ char smbv_ip[16];
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
# include "intertask_interface.h" # include "intertask_interface.h"
# include "create_tasks.h" # include "create_tasks.h"
# include "intertask_interface_init.h"
#endif #endif
#include "T.h" #include "T.h"
@@ -627,12 +627,8 @@ l2l1_task (void *args_p)
} }
#endif #endif
module_id_t UE_id;
if (abstraction_flag == 1) {
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++)
dl_phy_sync_success (UE_id, 0, 0,1); //UE_id%NB_eNB_INST);
}
start_meas (&oaisim_stats); start_meas (&oaisim_stats);
@@ -701,8 +697,8 @@ l2l1_task (void *args_p)
//oai_emulation.info.time_ms += 1; //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) 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 (frame); // frequency is defined in the omg_global params configurable by the user
update_omg_ocm (); //update_omg_ocm ();
#ifdef OPENAIR2 #ifdef OPENAIR2
@@ -796,15 +792,6 @@ l2l1_task (void *args_p)
PHY_vars_eNB_g[eNB_inst][0]->frame_parms.Nid_cell); PHY_vars_eNB_g[eNB_inst][0]->frame_parms.Nid_cell);
*/ */
#ifdef OPENAIR2
//Application: traffic gen
update_otg_eNB (eNB_inst, oai_emulation.info.time_ms);
//IP/OTG to PDCP and PDCP to IP operation
// pdcp_run (frame, 1, 0, eNB_inst); //PHY_vars_eNB_g[eNB_id]->Mod_id
#endif
#ifdef PRINT_STATS #ifdef PRINT_STATS
if((sf==9) && frame%10==0) if((sf==9) && frame%10==0)
@@ -874,7 +861,7 @@ l2l1_task (void *args_p)
} }
update_ocm (); //update_ocm ();
/* /*
if ((frame >= 10) && (frame <= 11) && (abstraction_flag == 0) if ((frame >= 10) && (frame <= 11) && (abstraction_flag == 0)
#ifdef PROC #ifdef PROC
@@ -1110,6 +1097,7 @@ int main (int argc, char **argv)
oai_emulation.info.n_frames = MAX_FRAME_NUMBER; //1024; //10; oai_emulation.info.n_frames = MAX_FRAME_NUMBER; //1024; //10;
oai_emulation.info.n_frames_flag = 0; //fixme oai_emulation.info.n_frames_flag = 0; //fixme
snr_dB = 30; snr_dB = 30;
NB_UE_INST = 1;
//Default values if not changed by the user in get_simulation_options(); //Default values if not changed by the user in get_simulation_options();
pdcp_period = 1; pdcp_period = 1;
@@ -1126,7 +1114,7 @@ int main (int argc, char **argv)
// start thread for log gen // start thread for log gen
log_thread_init (); log_thread_init ();
init_oai_emulation (); // to initialize everything !!! //init_oai_emulation (); // to initialize everything !!!
// get command-line options // get command-line options
get_simulation_options (argc, argv); //Command-line options get_simulation_options (argc, argv); //Command-line options
@@ -1163,7 +1151,37 @@ int main (int argc, char **argv)
#endif #endif
// configure oaisim with OCG // configure oaisim with OCG
oaisim_config (); // config OMG and OCG, OPT, OTG, OLG //oaisim_config (); // config OMG and OCG, OPT, OTG, OLG
logInit();
#if defined(ENABLE_ITTI)
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, oai_emulation.info.itti_dump_file);
MSC_INIT(MSC_E_UTRAN, THREAD_MAX+TASK_MAX);
#endif
set_glog(LOG_INFO, 0x15);
//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);
if (ue_connection_test == 1) { if (ue_connection_test == 1) {
snr_direction = -snr_step; snr_direction = -snr_step;
@@ -1175,15 +1193,11 @@ int main (int argc, char **argv)
pthread_mutex_init(&sync_mutex, NULL); pthread_mutex_init(&sync_mutex, NULL);
pthread_mutex_init(&subframe_mutex, NULL); pthread_mutex_init(&subframe_mutex, NULL);
#ifdef OPENAIR2
init_omv ();
#endif
//Before this call, NB_UE_INST and NB_eNB_INST are not set correctly //Before this call, NB_UE_INST and NB_eNB_INST are not set correctly
check_and_adjust_params (); check_and_adjust_params ();
set_seed = oai_emulation.emulation_config.seed.value; set_seed = oai_emulation.emulation_config.seed.value;
init_otg_pdcp_buffer ();
init_seed (set_seed); init_seed (set_seed);
@@ -1198,7 +1212,7 @@ int main (int argc, char **argv)
if (create_tasks_ue(oai_emulation.info.nb_ue_local) < 0) if (create_tasks_ue(NB_UE_INST) < 0)
exit(-1); // need a softer mode exit(-1); // need a softer mode
@@ -1211,6 +1225,7 @@ int main (int argc, char **argv)
init_ocm (); init_ocm ();
printf("Sending sync to all threads\n"); printf("Sending sync to all threads\n");
@@ -1219,12 +1234,6 @@ int main (int argc, char **argv)
pthread_cond_broadcast(&sync_cond); pthread_cond_broadcast(&sync_cond);
pthread_mutex_unlock(&sync_mutex); pthread_mutex_unlock(&sync_mutex);
#ifdef SMBV
// Rohde&Schwarz SMBV100A vector signal generator
smbv_init_config(smbv_fname, smbv_nframes);
smbv_write_config_from_frame_parms(smbv_fname, &PHY_vars_eNB_g[0][0]->frame_parms);
#endif
/* #if defined (FLEXRAN_AGENT_SB_IF) /* #if defined (FLEXRAN_AGENT_SB_IF)
flexran_agent_start(); flexran_agent_start();
#endif */ #endif */
@@ -1733,11 +1742,6 @@ oai_shutdown (void)
#endif #endif
//Perform KPI measurements
if (oai_emulation.info.otg_enabled == 1){
LOG_N(EMU,"calling OTG kpi gen .... \n");
kpi_gen ();
}
if (oai_emulation.info.opp_enabled == 1) if (oai_emulation.info.opp_enabled == 1)
print_opp_meas_oaisim (); print_opp_meas_oaisim ();
@@ -1793,15 +1797,6 @@ oai_shutdown (void)
} //End of PHY abstraction changes } //End of PHY abstraction changes
// stop OMG
stop_mobility_generator (omg_param_list); //omg_param_list.mobility_type
#ifdef OPENAIR2
if (oai_emulation.info.omv_enabled == 1)
omv_end (pfd[1], omv_data);
#endif
if ((oai_emulation.info.ocm_enabled == 1) && (ethernet_flag == 0) if ((oai_emulation.info.ocm_enabled == 1) && (ethernet_flag == 0)
&& (ShaF != NULL)) { && (ShaF != NULL)) {
destroyMat (ShaF, map1, map2); destroyMat (ShaF, map1, map2);
@@ -1811,9 +1806,6 @@ oai_shutdown (void)
if (opt_enabled == 1) if (opt_enabled == 1)
terminate_opt (); terminate_opt ();
if (oai_emulation.info.cli_enabled)
cli_server_cleanup ();
for (int i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++) for (int i = 0; i < NUMBER_OF_eNB_MAX + NUMBER_OF_UE_MAX; i++)
if (oai_emulation.info.oai_ifup[i] == 1) { if (oai_emulation.info.oai_ifup[i] == 1) {
char interfaceName[8]; char interfaceName[8];
+5 -4
View File
@@ -26,15 +26,16 @@
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#include "SIMULATION/TOOLS/defs.h" #include "SIMULATION/TOOLS/sim.h"
#include "SIMULATION/RF/defs.h" #include "SIMULATION/RF/rf.h"
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_UE.h"
#include "oaisim_config.h" #include "oaisim_config.h"
#include "init_lte.h" #include "init_lte.h"
#ifdef OPENAIR2 #ifdef OPENAIR2
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/mac.h"
#include "UTIL/OMV/structures.h" #include "UTIL/OMV/structures.h"
#endif #endif
+2 -4
View File
@@ -49,10 +49,8 @@ The current sturcture of oaisim is shown by the figure.
#include "UTIL/OPT/opt.h" // to test OPT #include "UTIL/OPT/opt.h" // to test OPT
#include "UTIL/OMG/omg.h" #include "UTIL/OMG/omg.h"
#include "UTIL/CLI/cli_if.h" #include "UTIL/CLI/cli_if.h"
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "SIMULATION/ETH_TRANSPORT/defs.h"
#include "PHY/defs.h"
/** @defgroup _init_oai Initial oaisim /** @defgroup _init_oai Initial oaisim
* @ingroup _fn * @ingroup _fn
+54 -193
View File
@@ -43,29 +43,22 @@
#include "assertions.h" #include "assertions.h"
#include "oaisim_functions.h" #include "oaisim_functions.h"
#include "PHY/extern.h" #include "PHY/phy_extern.h"
#include "LAYER2/MAC/extern.h" #include "PHY/phy_extern_ue.h"
#ifdef OPENAIR2 #include "LAYER2/MAC/mac_extern.h"
#include "LAYER2/MAC/proto.h" #include "LAYER2/MAC/mac_proto.h"
#endif
#include "LAYER2/PDCP_v10.1.0/pdcp.h" #include "LAYER2/PDCP_v10.1.0/pdcp.h"
#include "LAYER2/PDCP_v10.1.0/pdcp_primitives.h" #include "LAYER2/PDCP_v10.1.0/pdcp_primitives.h"
#include "RRC/LITE/extern.h" #include "RRC/LTE/rrc_extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
#include "PHY_INTERFACE/extern.h" #include "PHY_INTERFACE/phy_interface_extern.h"
//#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h" //#include "ARCH/CBMIMO1/DEVICE_DRIVER/extern.h"
#include "SCHED/extern.h"
#include "SIMULATION/ETH_TRANSPORT/proto.h" #include "SIMULATION/ETH_TRANSPORT/proto.h"
#include "UTIL/OCG/OCG_extern.h" #include "UTIL/OCG/OCG_extern.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h" #include "UTIL/OPT/opt.h"
#include "UTIL/OTG/otg_config.h" #include "UTIL/OTG/otg_config.h"
#include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_tx.h"
#if ENABLE_RAL
#include "lteRALenb.h"
#include "lteRALue.h"
#endif
#include "cor_SF_sim.h" #include "cor_SF_sim.h"
#include "enb_config.h" #include "enb_config.h"
@@ -83,11 +76,6 @@
#include "ENB_APP/enb_paramdef.h" #include "ENB_APP/enb_paramdef.h"
#include "common/config/config_userapi.h" #include "common/config/config_userapi.h"
#ifdef SMBV
extern uint8_t config_smbv;
extern char smbv_ip[16];
#endif
//constant for OAISIM soft realtime calibration //constant for OAISIM soft realtime calibration
#define SF_DEVIATION_OFFSET_NS 100000 //= 0.1ms : should be as a number of UE #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 SLEEP_STEP_US 100 // = 0.01ms could be adaptive, should be as a number of UE
@@ -137,34 +125,14 @@ int sleep_time_us = 0;
int phy_test = 0; int phy_test = 0;
#ifdef OPENAIR2
// omv related info
//pid_t omv_pid;
char full_name[200];
extern int pfd[2]; // fd for omv : fixme: this could be a local var
char fdstr[10];
char frames[10];
char num_enb[10];
char num_ue[10];
//area_x, area_y and area_z for omv
char x_area[20];
char y_area[20];
char z_area[20];
char nb_antenna[20];
char frame_type[10];
char tdd_config[10];
#endif
Packet_OTG_List_t *otg_pdcp_buffer = NULL;
extern node_desc_t *enb_data[NUMBER_OF_RU_MAX]; extern node_desc_t *enb_data[NUMBER_OF_RU_MAX];
extern node_desc_t *ue_data[NUMBER_OF_UE_MAX]; extern node_desc_t *ue_data[MAX_MOBILES_PER_ENB];
extern channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][NUMBER_OF_UE_MAX][MAX_NUM_CCs]; extern channel_desc_t *RU2UE[NUMBER_OF_RU_MAX][MAX_MOBILES_PER_ENB][MAX_NUM_CCs];
extern channel_desc_t *UE2RU[NUMBER_OF_UE_MAX][NUMBER_OF_RU_MAX][MAX_NUM_CCs]; extern channel_desc_t *UE2RU[MAX_MOBILES_PER_ENB][NUMBER_OF_RU_MAX][MAX_NUM_CCs];
extern mapping small_scale_names[]; extern mapping small_scale_names[];
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
extern pdcp_mbms_t pdcp_mbms_array_ue[NUMBER_OF_UE_MAX][maxServiceCount][maxSessionPerPMCH]; extern pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH];
extern pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; extern pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH];
#endif #endif
@@ -701,7 +669,7 @@ void get_simulation_options(int argc, char *argv[])
break; break;
case 'u': case 'u':
oai_emulation.info.nb_ue_local = atoi (optarg); NB_UE_INST = atoi (optarg);
break; break;
case 'U': case 'U':
@@ -870,13 +838,13 @@ void check_and_adjust_params(void)
int32_t ret; int32_t ret;
//int i,j; //int i,j;
if (oai_emulation.info.nb_ue_local + oai_emulation.info.nb_rn_local > NUMBER_OF_UE_MAX) { if (oai_emulation.info.nb_ue_local + oai_emulation.info.nb_rn_local > MAX_MOBILES_PER_ENB) {
LOG_E(EMU,"Enter fewer than %d UEs/RNs for the moment or change the NUMBER_OF_UE_MAX\n", NUMBER_OF_UE_MAX); LOG_E(EMU,"Enter fewer than %d UEs/RNs for the moment or change the MAX_MOBILES_PER_ENB\n", MAX_MOBILES_PER_ENB);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
if (oai_emulation.info.nb_enb_local + oai_emulation.info.nb_rn_local > NUMBER_OF_eNB_MAX) { if (oai_emulation.info.nb_enb_local + oai_emulation.info.nb_rn_local > NUMBER_OF_eNB_MAX) {
LOG_E(EMU,"Enter fewer than %d eNBs/RNs for the moment or change the NUMBER_OF_UE_MAX\n", NUMBER_OF_eNB_MAX); LOG_E(EMU,"Enter fewer than %d eNBs/RNs for the moment or change the MAX_MOBILES_PER_ENB\n", NUMBER_OF_eNB_MAX);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@@ -931,80 +899,15 @@ void check_and_adjust_params(void)
} // ethernet flag } // ethernet flag
*/ */
// //
NB_UE_INST = oai_emulation.info.nb_ue_local + oai_emulation.info.nb_ue_remote;
NB_eNB_INST = oai_emulation.info.nb_enb_local + oai_emulation.info.nb_enb_remote; NB_RU = RC.nb_RU;
NB_RN_INST = oai_emulation.info.nb_rn_local + oai_emulation.info.nb_rn_remote;
NB_RU = oai_emulation.info.nb_ru_local + oai_emulation.info.nb_ru_remote;
#if defined(PDCP_USE_NETLINK_QUEUES) && defined(OPENAIR2) #if defined(PDCP_USE_NETLINK_QUEUES) && defined(OPENAIR2)
pdcp_netlink_init(); pdcp_netlink_init();
#endif #endif
if (NB_RN_INST > 0 ) {
LOG_N(EMU,"Total number of RN %d (local %d, remote %d) mobility (the same as eNB) %s \n", NB_RN_INST,oai_emulation.info.nb_rn_local,oai_emulation.info.nb_rn_remote,
oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option);
LOG_N(EMU,"Adjust the number of eNB inst (%d->%d) and UE inst (%d->%d)\n ",
NB_eNB_INST, NB_eNB_INST+NB_RN_INST,
NB_UE_INST, NB_UE_INST+NB_RN_INST);
NB_eNB_INST+=NB_RN_INST;
NB_UE_INST+=NB_RN_INST;
}
LOG_I(EMU,"Total number of UE %d (first local %d , num local %d, remote %d, relay %d) mobility %s \n",
NB_UE_INST,oai_emulation.info.first_ue_local, oai_emulation.info.nb_ue_local,oai_emulation.info.nb_ue_remote,
NB_RN_INST,
oai_emulation.topology_config.mobility.UE_mobility.UE_mobility_type.selected_option);
LOG_I(EMU,"Total number of eNB %d (local %d, remote %d, relay %d) mobility %s \n",
NB_eNB_INST,oai_emulation.info.nb_enb_local,oai_emulation.info.nb_enb_remote,
NB_RN_INST,
oai_emulation.topology_config.mobility.eNB_mobility.eNB_mobility_type.selected_option);
} }
#ifdef OPENAIR2
void init_omv(void)
{
if (oai_emulation.info.omv_enabled == 1) {
if(pipe(pfd) == -1)
perror("pipe error \n");
snprintf( full_name, sizeof(full_name), "%s/UTIL/OMV/OMV",getenv("OPENAIR2_DIR") );
LOG_I(EMU,"Stating the OMV path %s pfd[0] %d pfd[1] %d \n", full_name, pfd[0],pfd[1]);
switch(fork()) {
case -1 :
perror("fork failed \n");
break;
case 0 : // child is going to be the omv, it is the reader
if(close(pfd[1]) == -1 ) // we close the write desc.
perror("close on write\n" );
sprintf(fdstr, "%d", pfd[0] );
sprintf(num_enb, "%d", NB_eNB_INST);
sprintf(num_ue, "%d", NB_UE_INST);
sprintf(x_area, "%f", oai_emulation.topology_config.area.x_m );
sprintf(y_area, "%f", oai_emulation.topology_config.area.y_m );
sprintf(z_area, "%f", 200.0 );
sprintf(frames, "%d", oai_emulation.info.n_frames);
sprintf(nb_antenna, "%d", 4);
sprintf(frame_type, "%s", (oai_emulation.info.frame_type[0] == 0) ? "FDD" : "TDD");
sprintf(tdd_config, "%d", oai_emulation.info.tdd_config[0]);
// execl is used to launch the visualisor
execl(full_name,"OMV", fdstr, frames, num_enb, num_ue, x_area, y_area, z_area, nb_antenna, frame_type, tdd_config,NULL );
perror( "error in execl the OMV" );
}
//parent
if(close( pfd[0] ) == -1 ) // we close the write desc.
perror("close on read\n" );
}
}
#endif
void init_seed(uint8_t set_seed) void init_seed(uint8_t set_seed)
{ {
@@ -1020,9 +923,9 @@ void init_seed(uint8_t set_seed)
} }
openair0_timestamp current_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs]; openair0_timestamp current_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs];
openair0_timestamp current_UE_rx_timestamp[NUMBER_OF_UE_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_ru_rx_timestamp[NUMBER_OF_RU_MAX][MAX_NUM_CCs];
openair0_timestamp last_UE_rx_timestamp[NUMBER_OF_UE_MAX][MAX_NUM_CCs]; openair0_timestamp last_UE_rx_timestamp[MAX_MOBILES_PER_ENB][MAX_NUM_CCs];
int ru_trx_start(openair0_device *device) { int ru_trx_start(openair0_device *device) {
return(0); return(0);
@@ -1369,63 +1272,16 @@ void init_ocm(void)
//char* frame_type = "unknown"; //char* frame_type = "unknown";
LTE_DL_FRAME_PARMS *fp = &RC.ru[0]->frame_parms; LTE_DL_FRAME_PARMS *fp = &RC.ru[0]->frame_parms;
#if 0 init_channel_vars (fp, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
switch (fp->frame_type) {
case FDD:
frame_type = "FDD";
break;
case TDD:
frame_type = "TDD";
break;
}
#endif
if (abstraction_flag) {
get_beta_map();
get_MIESM_param();
//load_pbch_desc();
}
for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) {
enb_data[ru_id] = (node_desc_t *)malloc(sizeof(node_desc_t));
init_enb(enb_data[ru_id],oai_emulation.environment_system_config.antenna.eNB_antenna);
}
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
ue_data[UE_id] = (node_desc_t *)malloc(sizeof(node_desc_t));
init_ue(ue_data[UE_id],oai_emulation.environment_system_config.antenna.UE_antenna);
}
if ((oai_emulation.info.ocm_enabled == 1)&& (ethernet_flag == 0 ) &&
(oai_emulation.environment_system_config.fading.shadowing.decorrelation_distance_m>0) &&
(oai_emulation.environment_system_config.fading.shadowing.variance_dB>0)) {
// init SF map here!!!
map1 =(int)oai_emulation.topology_config.area.x_m;
map2 =(int)oai_emulation.topology_config.area.y_m;
ShaF = init_SF(map1,map2,oai_emulation.environment_system_config.fading.shadowing.decorrelation_distance_m,oai_emulation.environment_system_config.fading.shadowing.variance_dB);
// size of area to generate shadow fading map
LOG_D(EMU,"Simulation area x=%f, y=%f\n",
oai_emulation.topology_config.area.x_m,
oai_emulation.topology_config.area.y_m);
}
if (abstraction_flag == 0)
init_channel_vars (fp, &s_re, &s_im, &r_re, &r_im, &r_re0, &r_im0);
// initialize channel descriptors // 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 (ru_id = 0; ru_id < RC.nb_RU; ru_id++) {
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) { for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
LOG_I(OCM,"Initializing channel (%s, %d) from RU %d to UE %d\n", oai_emulation.environment_system_config.fading.small_scale.selected_option,
map_str_to_int(small_scale_names,oai_emulation.environment_system_config.fading.small_scale.selected_option), ru_id, UE_id);
LOG_I(PHY,"Initializing channel descriptors (RU %d, UE %d) for N_RB_DL %d\n",ru_id,UE_id,
RC.ru[ru_id]->frame_parms.N_RB_DL);
RU2UE[ru_id][UE_id][CC_id] = RU2UE[ru_id][UE_id][CC_id] =
new_channel_desc_scm(RC.ru[ru_id]->nb_tx, new_channel_desc_scm(RC.ru[ru_id]->nb_tx,
PHY_vars_UE_g[UE_id][CC_id]->frame_parms.nb_antennas_rx, PHY_vars_UE_g[UE_id][CC_id]->frame_parms.nb_antennas_rx,
@@ -1454,22 +1310,29 @@ void init_ocm(void)
// 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. // 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]; //UE2RU[UE_id][ru_id] = RU2UE[ru_id][UE_id];
AssertFatal(RU2UE[ru_id][UE_id][CC_id]!=NULL,"RU2UE[%d][%d][%d] is null\n",ru_id,UE_id,CC_id);
AssertFatal(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)) {
RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + snr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
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 {
RU2UE[ru_id][UE_id][CC_id]->path_loss_dB = -132.24 + sinr_dB - RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower;
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,
RU2UE[ru_id][UE_id][CC_id]->path_loss_dB,
RC.ru[ru_id]->frame_parms.pdsch_config_common.referenceSignalPower,snr_dB);
} }
} }
} }
} }
void init_otg_pdcp_buffer(void) /*
{
module_id_t i;
otg_pdcp_buffer = malloc((NB_UE_INST + NB_eNB_INST) * sizeof(Packet_OTG_List_t));
for (i = 0; i < NB_UE_INST + NB_eNB_INST; i++) {
pkt_list_init(&(otg_pdcp_buffer[i]));
//LOG_I(EMU,"HEAD of otg_pdcp_buffer[%d] is %p\n", i, pkt_list_get_head(&(otg_pdcp_buffer[i])));
}
}
void update_omg (frame_t frameP) void update_omg (frame_t frameP)
{ {
module_id_t UE_id, eNB_id; module_id_t UE_id, eNB_id;
@@ -1515,7 +1378,7 @@ void update_ocm()
/* check if the openair channel model is activated used for PHY abstraction : path loss*/ // check if the openair channel model is activated used for PHY abstraction : path loss
if ((oai_emulation.info.ocm_enabled == 1)&& (ethernet_flag == 0 )) { if ((oai_emulation.info.ocm_enabled == 1)&& (ethernet_flag == 0 )) {
for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) for (ru_id = 0; ru_id < RC.nb_RU; ru_id++)
@@ -1533,9 +1396,6 @@ void update_ocm()
// if (oai_emulation.info.omg_model_ue == TRACE) // if (oai_emulation.info.omg_model_ue == TRACE)
//extract_position(ue_node_list, ue_data, NB_UE_INST); //extract_position(ue_node_list, ue_data, NB_UE_INST);
/* if (frame % 50 == 0)
LOG_N(OCM,"Path loss for TTI %d : \n", frame);
*/
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) { for (ru_id = 0; ru_id < RC.nb_RU; ru_id++) {
for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) { for (UE_id = 0; UE_id < NB_UE_INST; UE_id++) {
@@ -1550,10 +1410,10 @@ void update_ocm()
//dx = enb_data[ru_id]->x - ue_data[UE_id]->x; //dx = enb_data[ru_id]->x - ue_data[UE_id]->x;
//dy = enb_data[ru_id]->y - ue_data[UE_id]->y; //dy = enb_data[ru_id]->y - ue_data[UE_id]->y;
//distance = sqrt(dx * dx + dy * dy); //distance = sqrt(dx * dx + dy * dy);
/*LOG_D(LOCALIZE, " OCM distance between eNB %d at (%f,%f) and UE %d at (%f,%f) is %f \n", ///LOG_D(LOCALIZE, " OCM distance between eNB %d at (%f,%f) and UE %d at (%f,%f) is %f \n",
ru_id, enb_data[ru_id]->x,enb_data[ru_id]->y, // ru_id, enb_data[ru_id]->x,enb_data[ru_id]->y,
UE_id, ue_data[UE_id]->x,ue_data[UE_id]->y, // UE_id, ue_data[UE_id]->x,ue_data[UE_id]->y,
distance);*/ // distance);
} }
} }
} }
@@ -1585,6 +1445,7 @@ void update_ocm()
} }
} }
#ifdef OPENAIR2 #ifdef OPENAIR2
void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime) void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
{ {
@@ -1592,13 +1453,12 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
#if defined(USER_MODE) && defined(OAI_EMU) #if defined(USER_MODE) && defined(OAI_EMU)
//int rrc_state=0; //int rrc_state=0;
/*
if (oai_emulation.info.otg_enabled ==1 ) { if (oai_emulation.info.otg_enabled ==1 ) {
int dst_id, app_id; int dst_id, app_id;
Packet_otg_elt_t *otg_pkt; Packet_otg_elt_t *otg_pkt;
for (dst_id = 0; dst_id < NUMBER_OF_UE_MAX; dst_id++) { for (dst_id = 0; dst_id < MAX_MOBILES_PER_ENB; dst_id++) {
for_times += 1; for_times += 1;
// generate traffic if the ue is rrc reconfigured state // generate traffic if the ue is rrc reconfigured state
@@ -1663,9 +1523,9 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
otg_pkt=NULL; otg_pkt=NULL;
} }
*/
// old version // old version
/* // MBSM multicast traffic // MBSM multicast traffic
#if defined(Rel10) || defined(Rel14) #if defined(Rel10) || defined(Rel14)
if (frame >= 46) {// only generate when UE can receive MTCH (need to control this value) if (frame >= 46) {// only generate when UE can receive MTCH (need to control this value)
for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount for (service_id = 0; service_id < 2 ; service_id++) { //maxServiceCount
@@ -1688,15 +1548,15 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
} }
} // end multicast traffic } // end multicast traffic
#endif #endif
*/
/*
} }
} }
} }
} // end multicast traffic } // end multicast traffic
*/
#endif #endif
} }
@@ -1706,7 +1566,7 @@ void update_otg_eNB(module_id_t enb_module_idP, unsigned int ctime)
if (otg_enabled==1) { if (otg_enabled==1) {
ctime = frame * 100; ctime = frame * 100;
for (dst_id = 0; dst_id < NUMBER_OF_UE_MAX; dst_id++) { for (dst_id = 0; dst_id < MAX_MOBILES_PER_ENB; dst_id++) {
if (mac_get_rrc_status(eNB_index, eNB_flag, dst_id ) > 2) { if (mac_get_rrc_status(eNB_index, eNB_flag, dst_id ) > 2) {
otg_pkt = malloc (sizeof(Packet_otg_elt_t)); otg_pkt = malloc (sizeof(Packet_otg_elt_t));
(otg_pkt->otg_pkt).sdu_buffer = packet_gen(module_instP, dst_id, ctime, &pkt_size); (otg_pkt->otg_pkt).sdu_buffer = packet_gen(module_instP, dst_id, ctime, &pkt_size);
@@ -1735,6 +1595,7 @@ void update_otg_UE(module_id_t ue_mod_idP, unsigned int ctime)
{ {
} }
#endif #endif
*/
int init_slot_isr(void) int init_slot_isr(void)
{ {
+9 -10
View File
@@ -27,27 +27,26 @@
#include <time.h> #include <time.h>
#include <cblas.h> #include <cblas.h>
#include "SIMULATION/TOOLS/defs.h" #include "SIMULATION/TOOLS/sim.h"
#include "SIMULATION/RF/defs.h" #include "SIMULATION/RF/rf.h"
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs.h" #include "PHY/defs_eNB.h"
#include "PHY/extern.h" #include "PHY/defs_UE.h"
#include "PHY/phy_extern.h"
#include "oaisim_config.h" #include "oaisim_config.h"
#ifdef OPENAIR2 #ifdef OPENAIR2
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/mac_extern.h"
#include "UTIL/LOG/log_if.h" #include "UTIL/LOG/log_if.h"
#include "UTIL/LOG/log_extern.h" #include "UTIL/LOG/log_extern.h"
#include "RRC/LITE/extern.h" #include "RRC/LTE/rrc_extern.h"
#include "PHY_INTERFACE/extern.h" #include "PHY_INTERFACE/phy_interface_extern.h"
#include "UTIL/OCG/OCG.h" #include "UTIL/OCG/OCG.h"
#include "UTIL/OMG/omg.h" #include "UTIL/OMG/omg.h"
#include "UTIL/OPT/opt.h" // to test OPT #include "UTIL/OPT/opt.h" // to test OPT
#endif #endif
#include "SCHED/defs.h"
#include "SCHED/extern.h"
#include "oaisim.h" #include "oaisim.h"