Merge remote-tracking branch 'origin/no-platform-const-asn-dep' into integration_2023_w10

This commit is contained in:
Robert Schmidt
2023-03-08 19:04:22 +01:00
114 changed files with 614 additions and 2566 deletions
+74 -107
View File
@@ -289,7 +289,6 @@ add_definitions("-DFIRMWARE_VERSION=\"${FIRMWARE_VERSION}\"")
add_definitions("-DPACKAGE_VERSION=\"Branch: ${GIT_BRANCH} Abrev. Hash: ${GIT_COMMIT_HASH} Date: ${GIT_COMMIT_DATE}\"")
add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
# Debug related options
#########################################
add_boolean_option(DEBUG_ASN1 False "ASN1 coder/decoder Debug" OFF)
@@ -301,7 +300,7 @@ add_boolean_option(UE_TIMING_TRACE False "Activate UE timing trace" ON)
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
add_library(ITTI ${OCP_ITTI}/intertask_interface.cpp)
target_link_libraries(ITTI PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(ITTI PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
# asn1c skeletons have hardcoded this flag to make customized debug logs
# OAI uses this feature to re-use OAI LOG_I(ASN, ...)
@@ -348,7 +347,7 @@ add_library(s1ap
${S1AP_DIR}/s1ap_eNB_ue_context.c
)
target_link_libraries(s1ap PUBLIC asn1_s1ap)
target_link_libraries(s1ap PRIVATE nr_rrc asn1_nr_rrc lte_rrc)
target_link_libraries(s1ap PRIVATE nr_rrc asn1_nr_rrc_hdrs lte_rrc)
# NGAP
##############
@@ -368,8 +367,8 @@ add_library(ngap
${NGAP_DIR}/ngap_gNB_trace.c
${NGAP_DIR}/ngap_gNB_ue_context.c
)
target_link_libraries(ngap PUBLIC asn1_ngap lte_rrc)
target_link_libraries(ngap PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(ngap PUBLIC asn1_ngap)
target_link_libraries(ngap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
#M2AP
##############
@@ -417,7 +416,7 @@ add_library(m3ap
)
target_link_libraries(m3ap PUBLIC asn1_m3ap)
target_link_libraries(m3ap PRIVATE m2ap)
target_link_libraries(m3ap PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(m3ap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
target_include_directories(m3ap PUBLIC "${M3AP_DIR}")
#X2AP
@@ -437,7 +436,7 @@ add_library(x2ap
${X2AP_DIR}/x2ap_timers.c
)
target_link_libraries(x2ap PUBLIC asn1_x2ap)
target_link_libraries(x2ap PRIVATE nr_rrc lte_rrc)
target_link_libraries(x2ap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
# F1AP
@@ -566,7 +565,6 @@ set_target_properties(benetel_4g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -
SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
target_link_libraries(benetel_4g PRIVATE ${DPDK_LIBS})
target_link_libraries(benetel_4g PRIVATE pthread dl rt m numa)
target_link_libraries(benetel_4g PRIVATE asn1_nr_rrc asn1_lte_rrc)
# Benetel 5G library
######################################################################
@@ -585,7 +583,6 @@ set_target_properties(benetel_5g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -
SET(DPDK_LIBS "-Wl,-rpath,$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -Wl,--whole-archive -L$ENV{RTE_SDK}/$ENV{RTE_TARGET}/lib -ldpdk -Wl,--no-whole-archive")
target_link_libraries(benetel_5g PRIVATE ${DPDK_LIBS})
target_link_libraries(benetel_5g PRIVATE pthread dl rt m numa)
target_link_libraries(benetel_5g PRIVATE asn1_nr_rrc asn1_lte_rrc)
##########################################################
@@ -655,11 +652,6 @@ add_boolean_option(NAS_BUILT_IN_UE True "UE NAS layer present in this e
add_boolean_option(NAS_UE True "NAS UE INSTANCE (<> NAS_MME)" ON)
##########################
# ACCESS STRATUM LAYER2 OPTIONS
##########################
add_boolean_option(JUMBO_FRAME True "ENABLE LARGE SDU in ACCESS STRATUM (larger than common MTU)" ON)
##########################
# PDCP LAYER OPTIONS
##########################
@@ -783,7 +775,6 @@ add_library(UTIL
${OPENAIR_DIR}/common/utils/time_meas.c
${OPENAIR_DIR}/common/utils/time_stat.c
)
target_link_libraries(UTIL PRIVATE asn1_nr_rrc asn1_lte_rrc)
set(SECU_OSA_SRC
${OPENAIR2_DIR}/UTIL/OSA/osa_key_deriver.c
@@ -822,7 +813,7 @@ set(SCHED_SRC
${OPENAIR1_DIR}/SCHED/phy_procedures_lte_common.c
)
add_library(SCHED_LIB ${SCHED_SRC})
target_link_libraries(SCHED_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(SCHED_LIB PRIVATE asn1_lte_rrc_hdrs)
set(SCHED_NR_SRC
${OPENAIR1_DIR}/SCHED_NR/fapi_nr_l1.c
@@ -831,7 +822,7 @@ set(SCHED_NR_SRC
${OPENAIR1_DIR}/SCHED_NR/phy_frame_config_nr.c
)
add_library(SCHED_NR_LIB ${SCHED_NR_SRC})
target_link_libraries(SCHED_NR_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(SCHED_NR_LIB PRIVATE asn1_nr_rrc_hdrs)
set(SCHED_SRC_RU
${OPENAIR1_DIR}/SCHED/ru_procedures.c
@@ -839,7 +830,7 @@ set(SCHED_SRC_RU
${OPENAIR1_DIR}/SCHED/prach_procedures.c
)
add_library(SCHED_RU_LIB ${SCHED_SRC_RU})
target_link_libraries(SCHED_RU_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(SCHED_RU_LIB PRIVATE asn1_lte_rrc_hdrs)
set(SCHED_SRC_UE
${OPENAIR1_DIR}/SCHED_UE/phy_procedures_lte_ue.c
@@ -849,7 +840,7 @@ set(SCHED_SRC_UE
${OPENAIR1_DIR}/SCHED_UE/srs_pc.c
)
add_library(SCHED_UE_LIB ${SCHED_SRC_UE})
target_link_libraries(SCHED_UE_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(SCHED_UE_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
set(SCHED_SRC_NR_UE
${OPENAIR1_DIR}/SCHED_NR_UE/phy_procedures_nr_ue.c
@@ -859,7 +850,7 @@ set(SCHED_SRC_NR_UE
${OPENAIR1_DIR}/SCHED_NR_UE/pucch_uci_ue_nr.c
)
add_library(SCHED_NR_UE_LIB ${SCHED_SRC_NR_UE})
target_link_libraries(SCHED_NR_UE_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(SCHED_NR_UE_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
# nFAPI
@@ -889,7 +880,7 @@ set(NFAPI_PNF_SRC
${NFAPI_DIR}/pnf/src/pnf_p7_interface.c
)
add_library(NFAPI_PNF_LIB ${NFAPI_PNF_SRC})
target_link_libraries(NFAPI_PNF_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(NFAPI_PNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
include_directories(${NFAPI_DIR}/pnf/public_inc)
include_directories(${NFAPI_DIR}/pnf/inc)
@@ -901,7 +892,7 @@ set(NFAPI_VNF_SRC
${NFAPI_DIR}/vnf/src/vnf_p7_interface.c
)
add_library(NFAPI_VNF_LIB ${NFAPI_VNF_SRC})
target_link_libraries(NFAPI_VNF_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(NFAPI_VNF_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
include_directories(${NFAPI_DIR}/vnf/public_inc)
include_directories(${NFAPI_DIR}/vnf/inc)
@@ -915,7 +906,7 @@ set(NFAPI_USER_SRC
${NFAPI_USER_DIR}/gnb_ind_vars.c
)
add_library(NFAPI_USER_LIB ${NFAPI_USER_SRC})
target_link_libraries(NFAPI_USER_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(NFAPI_USER_LIB PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
include_directories(${NFAPI_USER_DIR})
# Layer 1
@@ -1017,7 +1008,6 @@ add_library(ldpc MODULE ${PHY_LDPC_OPTIM8SEGMULTI_SRC} )
target_link_libraries(ldpc PRIVATE ldpc_gen_HEADERS)
add_library(coding MODULE ${PHY_TURBOSRC} )
target_link_libraries(coding PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c )
@@ -1274,27 +1264,23 @@ set(PHY_SRC_UE ${PHY_SRC_UE} ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_comp
set(PHY_NR_UE_SRC ${PHY_NR_UE_SRC} ${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation_avx2.c)
add_library(PHY_COMMON ${PHY_SRC_COMMON})
target_link_libraries(PHY_COMMON PRIVATE lte_rrc)
add_dependencies(PHY_COMMON dfts)
target_link_libraries(PHY_COMMON PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(PHY_COMMON PRIVATE asn1_lte_rrc_hdrs)
add_library(PHY ${PHY_SRC})
target_link_libraries(PHY PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(PHY PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_library(PHY_UE ${PHY_SRC_UE})
target_link_libraries(PHY_UE PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(PHY_UE PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_library(PHY_NR_COMMON ${PHY_NR_SRC_COMMON})
target_link_libraries(PHY_NR_COMMON PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_library(PHY_NR ${PHY_NR_SRC})
target_link_libraries(PHY_NR PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_library(PHY_NR_UE ${PHY_NR_UE_SRC})
target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_library(PHY_RU ${PHY_SRC_RU})
target_link_libraries(PHY_RU PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(PHY_RU PRIVATE asn1_lte_rrc_hdrs)
#Library for mex functions
#########################3
@@ -1318,7 +1304,7 @@ set(PHY_MEX_UE
${OPENAIR_DIR}/common/utils/T/local_tracer.c
)
add_library(PHY_MEX ${PHY_MEX_UE} ${CONFIG_LIB})
target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc)
target_link_libraries(PHY_MEX PRIVATE asn1_lte_rrc_hdrs)
#Layer 2 library
#####################
@@ -1559,14 +1545,12 @@ set (MISC_NFAPI_LTE
)
add_library(MISC_NFAPI_LTE_LIB ${MISC_NFAPI_LTE})
target_link_libraries(MISC_NFAPI_LTE_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
set (MISC_NFAPI_NR
${OPENAIR1_DIR}/SCHED/nfapi_nr_dummy.c
)
add_library(MISC_NFAPI_NR_LIB ${MISC_NFAPI_NR})
target_link_libraries(MISC_NFAPI_NR_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_library(L2
${L2_SRC}
@@ -1575,16 +1559,16 @@ add_library(L2
${MCE_APP_SRC}
)
target_link_libraries(L2 PRIVATE x2ap s1ap lte_rrc m2ap)
target_link_libraries(L2 PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(L2 PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_library(MAC_NR ${MAC_NR_SRC})
target_link_libraries(MAC_NR PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(MAC_NR PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_library(MAC_UE_NR ${MAC_NR_SRC_UE})
target_link_libraries(MAC_UE_NR PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(MAC_UE_NR PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_library(L2_LTE ${L2_LTE_SRC})
target_link_libraries(L2_LTE PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(L2_LTE PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_library(L2_NR
${L2_NR_SRC}
@@ -1597,13 +1581,13 @@ add_library(e1_if
${NR_RRC_DIR}/cucp_cuup_e1ap.c
)
target_link_libraries(e1_if PRIVATE asn1_nr_rrc asn1_lte_rrc asn1_f1ap e1ap GTPV1U)
target_link_libraries(e1_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap e1ap GTPV1U)
add_library(e1_pdcp_if
${OPENAIR2_DIR}/LAYER2/nr_pdcp/nr_pdcp_e1_api.c
)
target_link_libraries(e1_pdcp_if PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(e1_pdcp_if PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap)
@@ -1620,29 +1604,29 @@ add_library(L2_UE
${L2_SRC_UE}
${MAC_SRC_UE}
)
target_link_libraries(L2_UE PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_library(L2_UE_LTE_NR
${L2_RRC_SRC_UE}
${MAC_SRC_UE}
)
target_link_libraries(L2_UE_LTE_NR PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(L2_UE_LTE_NR PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
if (NOT ${NOS1})
target_compile_definitions(L2_UE PUBLIC -DPDCP_USE_NETLINK)
endif()
target_link_libraries(L2_UE PRIVATE lte_rrc)
target_link_libraries(L2_UE PRIVATE asn1_lte_rrc_hdrs)
add_library( NR_L2_UE ${NR_L2_SRC_UE} ${MAC_NR_SRC_UE} )
target_link_libraries(NR_L2_UE PRIVATE f1ap)
target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(NR_L2_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_library(MAC_NR_COMMON
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c
)
target_link_libraries(MAC_NR_COMMON PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(MAC_NR_COMMON PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
include_directories("${OPENAIR2_DIR}/NR_UE_PHY_INTERFACE")
include_directories("${OPENAIR2_DIR}/LAYER2")
@@ -1660,7 +1644,7 @@ add_library (GTPV1U
${RRC_DIR}/rrc_eNB_GTPV1U.c
${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp
)
target_link_libraries(GTPV1U PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(GTPV1U PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
target_link_libraries(GTPV1U PRIVATE SIMU)
include_directories(${OPENAIR3_DIR}/ocp-gtp)
@@ -1670,7 +1654,7 @@ set (MME_APP_SRC
)
add_library(MME_APP ${MME_APP_SRC})
target_link_libraries(MME_APP PRIVATE m2ap m3ap)
target_link_libraries(MME_APP PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(MME_APP PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
set(SCTP_SRC
${OPENAIR3_DIR}/SCTP/sctp_common.c
@@ -1678,7 +1662,7 @@ set(SCTP_SRC
${OPENAIR3_DIR}/SCTP/sctp_eNB_itti_messaging.c
)
add_library(SCTP_CLIENT ${SCTP_SRC})
target_link_libraries(SCTP_CLIENT PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(SCTP_CLIENT PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
set(NAS_SRC ${OPENAIR3_DIR}/NAS/)
set(libnas_api_OBJS
@@ -1960,7 +1944,7 @@ target_link_libraries(LIB_NAS_SIMUE PRIVATE lte_rrc)
set(NAS_SIM_LIB LIB_NAS_SIMUE)
target_link_libraries(LIB_NAS_SIMUE PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(LIB_NAS_SIMUE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_library(LIB_NAS_UE
${NAS_SRC}UE/nas_itti_messaging.c
@@ -1981,9 +1965,8 @@ add_library(LIB_NAS_UE
$<TARGET_OBJECTS:ds>
)
target_include_directories(LIB_NAS_UE PRIVATE ${OPENAIR_DIR}/common/utils/ds/)
target_link_libraries(LIB_NAS_UE PRIVATE lte_rrc)
set(NAS_UE_LIB LIB_NAS_UE)
target_link_libraries(LIB_NAS_UE PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(LIB_NAS_UE PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
include_directories(${NAS_SRC}NR_UE)
include_directories(${NAS_SRC}UE)
@@ -2015,7 +1998,7 @@ add_library(LIB_5GNAS_GNB
target_include_directories(LIB_5GNAS_GNB PRIVATE ${OPENAIR_DIR}/common/utils/ds/)
target_link_libraries(LIB_5GNAS_GNB PRIVATE SECU_CN ${CRYPTO_LIBRARIES})
target_link_libraries(LIB_5GNAS_GNB PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(LIB_5GNAS_GNB PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# Simulation library
##########################
@@ -2034,7 +2017,6 @@ set (SIMUSRC
)
add_library(SIMU STATIC ${SIMUSRC} )
target_include_directories(SIMU PUBLIC ${OPENAIR1_DIR}/SIMULATION/TOOLS ${OPENAIR1_DIR}/SIMULATION/RF)
target_link_libraries(SIMU PRIVATE asn1_nr_rrc asn1_lte_rrc)
# Qt-based scope
add_boolean_option(ENABLE_NRQTSCOPE OFF "Build the Qt-Scope" OFF)
@@ -2046,16 +2028,15 @@ if (ENABLE_NRQTSCOPE)
qt5_wrap_cpp(QTSCOPE_SOURCE_NR ${OPENAIR1_DIR}/PHY/TOOLS/nr_phy_qt_scope.h)
add_library(nrqtscope MODULE ${QTSCOPE_SOURCE_NR})
target_link_libraries(nrqtscope PRIVATE Qt5::Widgets Qt5::Charts)
target_link_libraries(nrqtscope PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nrqtscope PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
endif()
add_library(SIMU_ETH
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/bypass_session_layer.c
#${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/emu_transport.c
add_library(SIMU_ETH STATIC
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
)
target_link_libraries(SIMU_ETH PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
include_directories("${NFAPI_DIR}/nfapi/public_inc")
include_directories("${NFAPI_DIR}/common/public_inc")
@@ -2073,7 +2054,6 @@ add_library(rfsimulator MODULE
${OPENAIR1_DIR}/PHY/TOOLS/signal_energy.c
)
target_link_libraries(rfsimulator PRIVATE SIMU ${ATLAS_LIBRARIES})
target_link_libraries(rfsimulator PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_library(oai_iqplayer MODULE
${OPENAIR_DIR}/radio/iqplayer/iqplayer_lib.c
@@ -2166,9 +2146,6 @@ add_executable(lte-softmodem
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${PHY_INTERFACE_DIR}/queue_t.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
@@ -2183,13 +2160,13 @@ target_link_libraries(lte-softmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${NAS_UE_LIB} ITTI SIMU
${NAS_UE_LIB} ITTI SIMU SIMU_ETH
-Wl,--end-group z dl)
target_link_libraries(lte-softmodem PRIVATE ${LIBXML2_LIBRARIES})
target_link_libraries(lte-softmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp)
target_link_libraries(lte-softmodem PRIVATE ${T_LIB})
target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(oairu
@@ -2211,7 +2188,7 @@ target_link_libraries(oairu PRIVATE
-Wl,--end-group z dl)
target_link_libraries(oairu PRIVATE pthread m CONFIG_LIB rt ${T_LIB})
target_link_libraries(oairu PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(oairu PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# force the generation of ASN.1 so that we don't need to wait during the build
target_link_libraries(lte-softmodem PRIVATE
@@ -2230,9 +2207,6 @@ add_executable(lte-uesoftmodem
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/multicast_link.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/socket.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
@@ -2248,14 +2222,14 @@ target_link_libraries(lte-uesoftmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap x2ap m2ap m3ap
SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
PHY_UE PHY_RU L2_UE L2_LTE SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
PHY_UE PHY_RU L2_UE L2_LTE SIMU SIMU_ETH NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${NAS_UE_LIB} ITTI ${ATLAS_LIBRARIES}
-Wl,--end-group z dl)
target_link_libraries(lte-uesoftmodem PRIVATE ${LIBXML2_LIBRARIES})
target_link_libraries(lte-uesoftmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${ATLAS_LIBRARIES})
target_link_libraries(lte-uesoftmodem PRIVATE ${T_LIB})
target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# force the generation of ASN.1 so that we don't need to wait during the build
target_link_libraries(lte-uesoftmodem PRIVATE
@@ -2277,7 +2251,6 @@ add_executable(nr-softmodem
${OPENAIR_DIR}/radio/COMMON/record_player.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR_DIR}/common/utils/lte/ue_power.c
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
@@ -2291,14 +2264,14 @@ target_link_libraries(nr-softmodem PRIVATE
-Wl,--start-group
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECU_CN SECU_OSA
ITTI ${NAS_UE_LIB} lte_rrc nr_rrc
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU SIMU_ETH
x2ap f1ap m2ap m3ap e1ap
-Wl,--end-group z dl)
target_link_libraries(nr-softmodem PRIVATE ${LIBXML2_LIBRARIES})
target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} sctp ${ATLAS_LIBRARIES})
target_link_libraries(nr-softmodem PRIVATE ${T_LIB})
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_dependencies(nr-softmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc)
@@ -2313,7 +2286,6 @@ target_link_libraries(nr-softmodem PRIVATE
add_executable(nr-cuup
executables/nr-cuup.c
executables/softmodem-common.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${NR_RRC_DIR}/rrc_gNB_UE_context.c
${OPENAIR2_DIR}/E1AP/e1ap_setup.c
@@ -2325,9 +2297,9 @@ add_executable(nr-cuup
target_link_libraries(nr-cuup PRIVATE
CONFIG_LIB ITTI SCTP_CLIENT
GTPV1U e1ap e1_pdcp_if f1ap
GTPV1U e1ap e1_pdcp_if f1ap SIMU_ETH
SECU_OSA SECU_CN ${OPENSSL_LIBRARIES} crypt z sctp dl pthread)
target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc asn1_nr_rrc)
target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
# nr-uesoftmodem is UE implementation
#######################################
@@ -2344,7 +2316,6 @@ add_executable(nr-uesoftmodem
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
${OPENAIR2_DIR}/RRC/NAS/rb_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c
@@ -2357,13 +2328,13 @@ target_link_libraries(nr-uesoftmodem PRIVATE
nr_rrc SECU_CN SECU_OSA UTIL HASHTABLE SCHED_RU_LIB SCHED_NR_UE_LIB
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE L2_UE_LTE_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB
NFAPI_USER_LIB MISC_NFAPI_NR_LIB
ITTI ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} SIMU
ITTI ${ATLAS_LIBRARIES} LIB_5GNAS_GNB LIB_NAS_SIMUE ${NAS_SIM_LIB} SIMU SIMU_ETH
-Wl,--end-group z dl)
target_link_libraries(nr-uesoftmodem PRIVATE ${LIBXML2_LIBRARIES})
target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${ATLAS_LIBRARIES})
target_link_libraries(nr-uesoftmodem PRIVATE ${T_LIB})
target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_dependencies( nr-uesoftmodem ldpc_orig ldpc_optim ldpc_optim8seg ldpc )
if (ENABLE_LDPC_CUDA)
@@ -2402,7 +2373,7 @@ add_executable(rftest
${SHLIB_LOADER_SOURCES}
)
target_link_libraries(rftest PRIVATE minimal_lib CONFIG_LIB PHY_NR_COMMON UTIL pthread dl m ${T_LIB} )
target_link_libraries(rftest PRIVATE asn1_lte_rrc asn1_nr_rrc)
target_link_libraries(rftest PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
add_executable(polartest
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/polartest.c
@@ -2414,7 +2385,6 @@ target_link_libraries(polartest PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR PHY_NR_COMMON PHY_NR_UE CONFIG_LIB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} dl
)
target_link_libraries(polartest PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_executable(smallblocktest
${OPENAIR1_DIR}/PHY/CODING/TESTBENCH/smallblocktest.c
@@ -2427,7 +2397,6 @@ target_link_libraries(smallblocktest PRIVATE
-Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} dl
)
target_link_libraries(smallblocktest PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_executable(ldpctest
@@ -2445,12 +2414,11 @@ target_link_libraries(ldpctest PRIVATE
-Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON CONFIG_LIB -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} dl
)
target_link_libraries(ldpctest PRIVATE asn1_nr_rrc asn1_lte_rrc)
add_executable(nr_dlschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/executables/softmodem-common.c
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
)
@@ -2458,10 +2426,11 @@ target_link_libraries(nr_dlschsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
)
target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc_hdrs)
add_executable(nr_pbchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
@@ -2470,14 +2439,14 @@ target_link_libraries(nr_pbchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
)
target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
#PUCCH ---> Prashanth
add_executable(nr_pucchsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/executables/softmodem-common.c
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
)
@@ -2485,45 +2454,42 @@ target_link_libraries(nr_pucchsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
)
target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr_pucchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_dlsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${NR_UE_RRC_DIR}/rrc_nsa.c
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
${PHY_INTERFACE_DIR}/queue_t.c
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
)
target_link_libraries(nr_dlsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
-Wl,--start-group UTIL SIMU SIMU_ETH PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECU_CN ngap -lz -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
)
target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr_dlsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_prachsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/prachsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${NR_UE_RRC_DIR}/rrc_nsa.c
${NFAPI_USER_DIR}/nfapi.c
${PHY_INTERFACE_DIR}/queue_t.c
${T_SOURCE}
${SHLIB_LOADER_SOURCES})
target_link_libraries(nr_prachsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_RU PHY_NR_UE MAC_NR_COMMON SCHED_NR_LIB CONFIG_LIB -lz -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl)
target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_ulschsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulschsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/executables/softmodem-common.c
${PHY_INTERFACE_DIR}/queue_t.c
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
@@ -2532,16 +2498,17 @@ target_link_libraries(nr_ulschsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB CONFIG_LIB MAC_NR_COMMON -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI dl
)
target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr_ulschsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_executable(nr_ulsim
${OPENAIR1_DIR}/SIMULATION/NR_PHY/ulsim.c
${OPENAIR1_DIR}/SIMULATION/NR_PHY/nr_dummy_functions.c
${OPENAIR_DIR}/common/utils/nr/nr_common.c
${OPENAIR_DIR}/executables/softmodem-common.c
${OPENAIR2_DIR}/RRC/NAS/nas_config.c
${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/netlink_init.c
${NR_UE_RRC_DIR}/rrc_nsa.c
${NFAPI_USER_DIR}/nfapi.c
${NFAPI_USER_DIR}/gnb_ind_vars.c
${PHY_INTERFACE_DIR}/queue_t.c
${T_SOURCE}
${SHLIB_LOADER_SOURCES}
@@ -2552,10 +2519,10 @@ if (ENABLE_LDPC_T1)
endif()
target_link_libraries(nr_ulsim PRIVATE
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON lte_rrc nr_rrc CONFIG_LIB L2_LTE_NR L2_NR HASHTABLE x2ap SECU_CN ngap NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB -lz -Wl,--end-group
-Wl,--start-group UTIL SIMU SIMU_ETH PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_NR MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECU_CN ngap -lz -Wl,--end-group
m pthread ${ATLAS_LIBRARIES} ${T_LIB} ITTI ${OPENSSL_LIBRARIES} dl
)
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim)
@@ -2572,7 +2539,7 @@ foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim pr
-Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON PHY_NR_COMMON PHY PHY_UE PHY_RU ITTI -Wl,--end-group
pthread m rt CONFIG_LIB ${ATLAS_LIBRARIES} ${T_LIB} dl
)
target_link_libraries(${myExe} PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(${myExe} PRIVATE asn1_lte_rrc_hdrs)
endforeach(myExe)
+24 -106
View File
@@ -300,10 +300,6 @@ function main() {
SIMUS_PHY=1
echo_info "Will compile dlsim, ulsim, ..."
shift;;
-S | --core_simulators)
SIMUS_CORE=1
echo_info "Will compile security unitary tests"
shift;;
-s | --check)
OAI_TEST=1
echo_info "Will run auto-tests"
@@ -466,17 +462,6 @@ function main() {
cecho "OPENAIR_DIR = $OPENAIR_DIR" $green
# for conf files copy in this bash script
if [ -d /usr/lib/freeDiameter ]; then
export FREEDIAMETER_PREFIX=/usr
else
if [ -d /usr/local/lib/freeDiameter ]; then
export FREEDIAMETER_PREFIX=/usr/local
else
echo_warning "FreeDiameter prefix not found, install freeDiameter if EPC, HSS"
fi
fi
if [ "$CLEAN_ALL" = "1" ] ; then
clean_all_files
echo_info "Erased all previously producted files"
@@ -517,25 +502,15 @@ function main() {
fi
execlist=""
if [ "$eNB" = "1" ] ; then
execlist="$execlist lte-softmodem"
fi
if [ "$gNB" = "1" ] ; then
execlist="$execlist nr-softmodem nr-cuup"
fi
if [ "$RU" = "1" ] ; then
execlist="$execlist oairu"
fi
if [ "$UE" = 1 ] ; then
execlist="$execlist lte-uesoftmodem"
fi
if [ "$nrUE" = 1 ] ; then
execlist="$execlist nr-uesoftmodem"
fi
if [[ "$execlist" == "" && "$SIMUS_PHY" != "1" && "$HW" == "None" ]]; then
SKIP_SHARED_LIB_FLAG="True"
fi
[[ "$eNB" == "1" ]] && execlist="$execlist lte-softmodem"
[[ "$gNB" == "1" ]] && execlist="$execlist nr-softmodem nr-cuup"
[[ "$RU" == "1" ]] && execlist="$execlist oairu"
[[ "$UE" == 1 ]] && execlist="$execlist lte-uesoftmodem"
[[ "$nrUE" == 1 ]] && execlist="$execlist nr-uesoftmodem"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
[[ "$SIMUS_PHY" == "1" ]] && execlist="$execlist dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
[[ "$BUILD_OPTLIB" != "" ]] && execlist="$execlist $BUILD_OPTLIB"
[[ "$execlist" != "" ]] && execlist="$execlist params_libconfig coding rfsimulator"
DIR=$OPENAIR_DIR/cmake_targets
@@ -552,24 +527,9 @@ function main() {
echo_info "running $CMAKE_CMD"
eval $CMAKE_CMD
for f in $execlist ; do
echo_info "Compiling $f..."
compilations $BUILD_DIR $f
done
# mandatory shared libraries common to UE and (e/g)NB
if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then
echo_info "Building shared libraries common to UE and gNB"
# configuration module libraries, one currently available, using libconfig
config_libconfig_shlib=params_libconfig
compilations $BUILD_DIR $config_libconfig_shlib
compilations $BUILD_DIR coding
if [[ "$execlist" != "" ]]; then
echo_info "Compiling $execlist..."
compilations $BUILD_DIR all.txt $execlist
fi
if [ "$UE" = 1 ] ; then
@@ -579,7 +539,7 @@ function main() {
if [ "$UE_ip" = 1 ]
then
echo_info "Building ue_ip module"
compilations $BUILD_DIR ue_ip
compilations $BUILD_DIR ue_ip.txt ue_ip
else
echo_info "Bypassing ue_ip build"
fi #IS_CONTAINER
@@ -594,9 +554,9 @@ function main() {
cd $DIR/nas_sim_tools/build
eval $CMAKE_CMD ..
compilations nas_sim_tools usim
compilations nas_sim_tools nvram
compilations nas_sim_tools conf2uedata
compilations nas_sim_tools usim.txt usim
compilations nas_sim_tools nvram.txt nvram
compilations nas_sim_tools conf2uedata.txt conf2uedata
# generate USIM data
if [ -f conf2uedata ]; then
@@ -606,42 +566,6 @@ function main() {
fi
fi
cd $DIR/$BUILD_DIR/build
##################
# PHY simulators #
##################
if [ "$SIMUS_PHY" = "1" ] ; then
echo_info "Compiling physical unitary tests simulators"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
simlist="dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
# simlist="ldpctest"
for f in $simlist ; do
compilations $BUILD_DIR $f
done
compilations $BUILD_DIR coding
fi
###################
# Core simulators #
###################
if [ "$SIMUS_CORE" = "1" ] ; then
echo_info "Compiling security unitary tests simulators"
simlist="secu_knas_encrypt_eia1 secu_kenb aes128_ctr_encrypt aes128_ctr_decrypt secu_knas_encrypt_eea2 secu_knas secu_knas_encrypt_eea1 kdf aes128_cmac_encrypt secu_knas_encrypt_eia2"
for f in $simlist ; do
compilations $BUILD_DIR test_$f
done
fi
######################
# Optional libraries #
######################
if [ ! -z "$BUILD_OPTLIB" ] ; then
for oklib in $BUILD_OPTLIB ; do
compilations $BUILD_DIR $oklib
done
fi
####################################################
# Build RF device and transport protocol libraries #
####################################################
@@ -652,31 +576,31 @@ function main() {
rm -f liboai_device.so
if [ "$HW" == "OAI_USRP" ] ; then
compilations $BUILD_DIR oai_usrpdevif
compilations $BUILD_DIR oai_usrpdevif.txt oai_usrpdevif
ln -sf liboai_usrpdevif.so liboai_device.so
echo_info "liboai_device.so is linked to USRP device library"
elif [ "$HW" == "OAI_BLADERF" ] ; then
if [ -f "/usr/include/libbladeRF.h" ] ; then
compilations $BUILD_DIR oai_bladerfdevif
compilations $BUILD_DIR oai_bladerfdevif.txt oai_bladerfdevif
fi
ln -sf liboai_bladerfdevif.so liboai_device.so
echo_info "liboai_device.so is linked to BLADERF device library"
elif [ "$HW" == "OAI_LMSSDR" ] ; then
# if [ -f "/usr/include/libbladeRF.h" ] ; then
compilations $BUILD_DIR oai_lmssdrdevif
compilations $BUILD_DIR oai_lmssdrdevif.txt oai_lmssdrdevif
# fi
ln -sf liboai_lmssdrdevif.so liboai_device.so
echo_info "liboai_device.so is linked to LMSSDR device library"
elif [ "$HW" == "OAI_IRIS" ] ; then
compilations $BUILD_DIR oai_irisdevif
compilations $BUILD_DIR oai_irisdevif.txt oai_irisdevif
ln -s liboai_irisdevif.so liboai_device.so
echo_info "liboai_device.so is linked to IRIS device library"
elif [ "$HW" == "OAI_AW2SORI" ] ; then
compilations $BUILD_DIR aw2sori_transpro
compilations $BUILD_DIR aw2sori_transpro.txt aw2sori_transpro
ln -sf libaw2sori_transpro.so libthirdparty_transpro.so
echo_info "build libthirdparty_transpro.so for AW2SORI fronthaul"
@@ -685,28 +609,22 @@ function main() {
fi
fi
#build simulators devices
if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then
echo_info "Compiling rfsimulator"
compilations $BUILD_DIR rfsimulator
fi
#build transport protocol libraries (currently only ETHERNET is available)
if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then
echo_info "Building transport protocol libraries"
rm -f liboai_transpro.so
if [ "$TP" == "Ethernet" ]; then
compilations $BUILD_DIR oai_eth_transpro
compilations $BUILD_DIR oai_eth_transpro.txt oai_eth_transpro
ln -sf liboai_eth_transpro.so liboai_transpro.so
echo_info "liboai_transpro.so is linked to ETHERNET transport"
fi
if [ "$TP" == "benetel4g" ]; then
compilations $BUILD_DIR benetel_4g
compilations $BUILD_DIR benetel_4g.txt benetel4g
ln -sf libbenetel_4g.so liboai_transpro.so
echo_info "liboai_transpro.so is linked to BENETEL4G transport"
fi
if [ "$TP" == "benetel5g" ]; then
compilations $BUILD_DIR benetel_5g
compilations $BUILD_DIR benetel_5g.txt benetel_5g
ln -sf libbenetel_5g.so liboai_transpro.so
echo_info "liboai_transpro.so is linked to BENETEL4G transport"
fi
+18 -14
View File
@@ -207,8 +207,13 @@ check_errors() {
}
compilations() {
cd $OPENAIR_DIR/cmake_targets/$1/build
echo_info "Log file for compilation is being written to: $dlog/$2.txt"
local dir=$1
shift 1
local logfile=$1
shift 1
local targets=$@
cd $OPENAIR_DIR/cmake_targets/$dir/build
echo_info "Log file for compilation is being written to: $dlog/$logfile"
set +e
{
if [ "$BUILD_COVERITY_SCAN" == "1" ]; then
@@ -217,28 +222,27 @@ compilations() {
COV_SCAN_PREFIX=""
fi
if [ "$MAKE_CMD" != "" ]; then
$MAKE_CMD $2
$MAKE_CMD $targets
else
if [ "$VERBOSE_COMPILE" == "1" ]; then
$COV_SCAN_PREFIX make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE
$COV_SCAN_PREFIX make -j`nproc` $targets VERBOSE=$VERBOSE_COMPILE
else
$COV_SCAN_PREFIX make -j`nproc` $2
$COV_SCAN_PREFIX make -j`nproc` $targets
fi
fi
ret=$?
} > $dlog/$2.txt 2>&1
set -e
} > $dlog/$logfile 2>&1
if [ "$VERBOSE_CI" == "1" ]; then
echo_info "====== Start of log for $2.txt ======"
cat $dlog/$2.txt
echo_info "====== End of log for $2.txt ======"
echo_info "====== Start of log for $logfile ======"
cat $dlog/$logfile
echo_info "====== End of log for $logfile ======"
fi
check_warnings "$dlog/$2.txt"
check_warnings "$dlog/$logfile"
if [[ $ret -eq 0 ]]; then
echo_success "$2 compiled"
echo_success "$targets compiled"
else
check_errors "$dlog/$2.txt"
echo_error "$2 compilation failed"
check_errors "$dlog/$logfile"
echo_error "compilation of $targets failed"
exit 1
fi
}
+5 -65
View File
@@ -19,26 +19,11 @@
* contact@openairinterface.org
*/
/*
platform_constants.h
-------------------
AUTHOR : Lionel GAUTHIER and Navid Nikaein
COMPANY : EURECOM
EMAIL : Lionel.Gauthier@eurecom.fr
***************************************************************************/
#ifndef __PLATFORM_CONSTANTS_H__
#define __PLATFORM_CONSTANTS_H__
#include "LTE_asn_constant.h"
#include "NR_asn_constant.h"
#define NR_MAXDRB 14
#ifdef JUMBO_FRAME
#define NL_MAX_PAYLOAD 18000 /* this should cover the max mtu size*/
#else
#define NL_MAX_PAYLOAD 9000 /* this should cover the max mtu size*/
#endif
#ifdef LARGE_SCALE
#define NB_MODULES_MAX 128
@@ -48,19 +33,7 @@
#define NB_NODE_MAX 32
#endif
#ifdef JUMBO_FRAME
#define MAX_IP_PACKET_SIZE 10000 // 9000
#else
#if defined(OAI_NW_DRIVER_TYPE_ETHERNET)
/* SR: When using ethernet network driver the packet size is 1512 :
* 1500 bytes IP packet + 14 bytes ethernet header
*/
#define MAX_IP_PACKET_SIZE 1514
#else
#define MAX_IP_PACKET_SIZE 1500 // 3000
#endif
#endif
// overwrite the previous deinitions
#define MAX_MODULES NB_MODULES_MAX
#define MAX_NR_RRC_UE_CONTEXTS 64
@@ -89,62 +62,29 @@
#define MAX_MANAGED_GNB_PER_MOBILE 2
/// NB-IOT
#define NB_RB_MAX_NB_IOT (LTE_maxDRB_NB_r13 + 3) // MP: NB_IoT --> 2(DRB)+3(SRBs - 2 is not used) = 5
#define NB_RB_MAX_NB_IOT (2 + 3) /* 2 from LTE_maxDRB_NB_r13 in LTE_asn_constant.h + 3 SRBs */
#define DEFAULT_RAB_ID 1
#define NB_RB_MAX (LTE_maxDRB + 3) /* was 11, now 14, maxDRB comes from asn1_constants.h, + 3 because of 3 SRB, one invisible id 0, then id 1 and 2 */
#define NR_NB_RB_MAX (NR_maxDRB + 3)
#define NB_RB_MAX (11 + 3) /* LTE_maxDRB from LTE_asn_constant.h + 3 SRBs */
#define NR_NB_RB_MAX (29 + 3) /* NR_maxDRB from NR_asn_constant.hm + 3 SRBs */
#define NGAP_MAX_PDU_SESSION (256) /* As defined in TS 38.413 9.2.1.1 Range Bound for PDU Sessions. */
#define NGAP_MAX_DRBS_PER_UE (32) /* As defined in TS 38.413 9.2.1.1 - maxnoofDRBs */
#define NB_RB_MBMS_MAX (LTE_maxSessionPerPMCH * LTE_maxServiceCount)
#define NB_RB_MBMS_MAX (29 * 16) /* 29 = LTE_maxSessionPerPMCH + 16 = LTE_maxServiceCount from LTE_asn_constant.h */
#define NB_RAB_MAX LTE_maxDRB /* was 8, now 11 */
#define RAB_SHIFT1 9
#define RAB_SHIFT2 3
//#define RAB_OFFSET 0x0007
#define NB_RAB_MAX 11 /* from LTE_maxDRB in LTE_asn_constant.h */
#define RAB_OFFSET 0x000F
#define RAB_OFFSET1 0x7E00
#define RAB_OFFSET2 0x01F8
#define DIR_OFFSET 0x8000
#define DIR_SHIFT 15
#define CH_OFFSET 0x0004
#define CH_SHIFT 2
// RLC Entity
#define RLC_TX_MAXSIZE 10000000
#define RLC_RX_MAXSIZE 10000000
// RLC_AM_SEND_MRW
#define SEND_MRW_OFF 15
#define SEND_MRW_ON 240
// RLC_SEGMENTATION_INDICATION
#define SEGMENTATION_NOT_ALLOWED 0
#define SEGMENTATION_ALLOWED 1
// RLC_DELIVERY_OF_ERRONEOUS_SDU
#define DELIVERY_OF_ERRONEOUS_SDU_NO 0
#define DELIVERY_OF_ERRONEOUS_SDU_YES 1
#define DELIVERY_OF_ERRONEOUS_SDU_NO_DETECT 2
// CBA constant
#define NUM_MAX_CBA_GROUP 4
#ifndef __cplusplus
#ifndef NULL
#define NULL 0
#endif
#ifndef null
#define null 0
#endif
#endif
#define UNUSED_PARAM_MBMS_SESSION_ID 0
#define UNUSED_PARAM_MBMS_SERVICE_ID 0
#define printk printf
#define UNUSED_VARIABLE(vARIABLE) (void)(vARIABLE)
+12 -11
View File
@@ -34,17 +34,18 @@
#define __RAN_CONTEXT_H__
#include <pthread.h>
#include "common/platform_constants.h"
#include "PHY/defs_eNB.h"
#include "PHY/types.h"
#include "PHY/impl_defs_top.h"
#include "PHY/defs_L1_NB_IoT.h"
#include "RRC/LTE/defs_NB_IoT.h"
#include "RRC/LTE/rrc_defs.h"
#include "RRC/NR/nr_rrc_defs.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
#include <stdint.h>
// forward declarations to avoid including the full typess ***eNB;
struct PHY_VARS_gNB_s;
struct PHY_VARS_eNB_NB_IoT_s;
struct eNB_RRC_INST_s;
struct gNB_RRC_INST_s;
struct eNB_MAC_INST_s;
struct eNB_MAC_INST_NB_IoT_s;
struct gNB_MAC_INST_s;
struct gtpv1u_data_s;
struct RU_t_s;
typedef struct {
/// RAN context config file name
@@ -98,7 +99,7 @@ typedef struct {
/// NR MAC context variables
struct gNB_MAC_INST_s **nrmac;
/// GTPu descriptor
gtpv1u_data_t *gtpv1u_data_g;
struct gtpv1u_data_s *gtpv1u_data_g;
/// RU descriptors. These describe what each radio unit is supposed to do and contain the necessary functions for fronthaul interfaces
struct RU_t_s **ru;
/// Mask to indicate fronthaul setup status of RU (hard-limit to 64 RUs)
+3 -3
View File
@@ -35,7 +35,7 @@ add_library(telnetsrv MODULE
telnetsrv_measurements.c
)
target_link_libraries(telnetsrv PRIVATE history)
target_link_libraries(telnetsrv PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(telnetsrv PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
message(STATUS "Add enb specific telnet functions in libtelnetsrv_enb.so")
add_library(telnetsrv_enb MODULE
@@ -43,7 +43,7 @@ add_library(telnetsrv_enb MODULE
telnetsrv_enb_phycmd.c
)
add_dependencies(telnetsrv telnetsrv_enb)
target_link_libraries(telnetsrv_enb PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(telnetsrv_enb PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
message(STATUS "No specific telnet functions for gnb")
@@ -52,7 +52,7 @@ message(STATUS "No specific telnet functions for 4Gue")
message(STATUS "Add 5Gue specific telnet functions in libtelnetsrv_5Gue.so")
add_library(telnetsrv_5Gue MODULE telnetsrv_5Gue_measurements.c)
add_dependencies(telnetsrv telnetsrv_5Gue)
target_link_libraries(telnetsrv_5Gue PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_link_libraries(telnetsrv_5Gue PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# all libraries should be written to root build dir
set_target_properties(telnetsrv telnetsrv_enb telnetsrv_5Gue
@@ -51,6 +51,8 @@
#include "telnetsrv_cpumeasur_def.h"
#include "openair2/LAYER2/MAC/mac.h"
#include "openair1/PHY/phy_extern.h"
#include "openair2/LAYER2/RLC/rlc.h"
#include "openair2/LAYER2/PDCP_v10.1.0/pdcp.c"
void measurcmd_display_macstats(telnet_printfunc_t prnt);
void measurcmd_display_macstats_ue(telnet_printfunc_t prnt);
@@ -38,6 +38,10 @@
#include "telnetsrv.h"
#define TELNETSRV_PHYCMD_MAIN
#include "telnetsrv_phycmd.h"
#include "PHY/defs_eNB.h"
#include "LAYER2/MAC/mac_proto.h"
char *prnbuff;
extern int dump_eNB_stats(PHY_VARS_eNB *eNB, char *buffer, int length);
-1
View File
@@ -62,7 +62,6 @@ add_library(websrv MODULE
websrv_utils.c
../../../openair1/PHY/TOOLS/nr_phy_scope.c
)
target_link_libraries(websrv PRIVATE asn1_lte_rrc asn1_nr_rrc)
target_link_libraries(websrv PRIVATE ulfius jansson)
target_compile_definitions(websrv PUBLIC WEBSRVSCOPE)
# put websrv into build root and not under build/common/utils/websrv/
-1
View File
@@ -2244,7 +2244,6 @@ INPUT = \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/defs_L1_NB_IoT.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/phy_extern_ue.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/defs_gNB.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/primary_synch.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/lte_dl_cell_spec.c \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/defs_NB_IoT.h \
@CMAKE_CURRENT_SOURCE_DIR@/../openair1/PHY/LTE_REFSIG/lte_refsig.h \
+1 -7
View File
@@ -51,6 +51,7 @@
#include "PHY/defs_common.h"
#include "PHY/types.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/if4_tools.h"
@@ -105,13 +106,6 @@ void wait_eNBs(void);
const char ru_states[6][9] = {"RU_IDLE","RU_CONFIG","RU_READY","RU_RUN","RU_ERROR","RU_SYNC"};
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
#if defined(PRE_SCD_THREAD)
#include "common/ran_context.h"
#include "nfapi/oai_integration/vendor_ext.h"
+1
View File
@@ -77,6 +77,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "create_tasks.h"
#include "pdcp.h"
#include "PHY/INIT/phy_init.h"
+1
View File
@@ -39,6 +39,7 @@
#include "assertions.h"
#include "PHY/types.h"
#include "pdcp.h"
#include "PHY/defs_UE.h"
#include "common/ran_context.h"
+2
View File
@@ -49,12 +49,14 @@
#include "radio/ETHERNET/USERSPACE/LIB/if_defs.h"
#include "PHY/phy_vars.h"
#include "PHY/phy_extern.h"
#include "PHY/TOOLS/phy_scope_interface.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/INIT/phy_init.h"
#include "openair2/ENB_APP/enb_paramdef.h"
#include "system.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include <executables/softmodem-common.h>
#include <executables/thread-common.h>
+1 -1
View File
@@ -28,6 +28,7 @@
#include "nfapi/oai_integration/vendor_ext.h"
#include "openair2/F1AP/f1ap_common.h"
#include "openair2/GNB_APP/gnb_config.h"
#include "pdcp.h"
RAN_CONTEXT_t RC;
THREAD_STRUCT thread_struct;
@@ -36,7 +37,6 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
int asn1_xer_print;
int oai_exit = 0;
instance_t CUuniqInstance = 0;
RRC_release_list_t rrc_release_info;
void exit_function(const char *file, const char *function, const int line, const char *s, const int assert)
{
+1 -1
View File
@@ -42,7 +42,7 @@
#include "PHY/types.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/defs_gNB.h"
#include "SCHED/sched_eNB.h"
+1 -1
View File
@@ -46,7 +46,7 @@
#include "PHY/defs_nr_common.h"
#include "PHY/phy_extern.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "SCHED_NR/sched_nr.h"
#include "common/utils/LOG/log.h"
+2 -1
View File
@@ -59,10 +59,11 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h"
#include "pdcp.h"
#include "intertask_interface.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "system.h"
#include <openair2/GNB_APP/gnb_app.h>
+2 -1
View File
@@ -24,7 +24,7 @@
#include <openair1/PHY/impl_defs_top.h>
#include "executables/nr-uesoftmodem.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "NR_MAC_UE/mac_proto.h"
#include "RRC/NR_UE/rrc_proto.h"
#include "SCHED_NR_UE/phy_frame_config_nr.h"
@@ -33,6 +33,7 @@
#include "executables/softmodem-common.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "radio/COMMON/common_lib.h"
#include "pdcp.h"
/*
* NR SLOT PROCESSING SEQUENCE
+2 -1
View File
@@ -59,10 +59,11 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "UTIL/OPT/opt.h"
#include "enb_config.h"
#include "pdcp.h"
#include "intertask_interface.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "system.h"
#include <openair2/RRC/NR_UE/rrc_proto.h>
#include <openair2/LAYER2/NR_MAC_UE/mac_defs.h>
+21
View File
@@ -1,3 +1,24 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "gnb_ind_vars.h"
queue_t gnb_rach_ind_queue;
+1
View File
@@ -52,6 +52,7 @@
#include "common/utils/LOG/log.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/LTE_TRANSPORT/transport_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair1/SCHED_NR/fapi_nr_l1.h"
+1 -2
View File
@@ -20,6 +20,7 @@
*/
#include "phy_init.h"
#include "PHY/phy_extern.h"
#include "SCHED/sched_eNB.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
//#include "SIMULATION/TOOLS/sim.h"
@@ -33,8 +34,6 @@
void init_7_5KHz(void);
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
int phy_init_RU(RU_t *ru) {
LTE_DL_FRAME_PARMS *fp = ru->frame_parms;
RU_CALIBRATION *calibration = &ru->calibration;
+1 -1
View File
@@ -24,7 +24,7 @@
#include "common/ran_context.h"
#include "PHY/defs_gNB.h"
#include "PHY/NR_REFSIG/nr_refsig.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
+1 -2
View File
@@ -20,6 +20,7 @@
*/
#include "phy_init.h"
#include "PHY/phy_extern.h"
#include "SCHED/sched_common.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "assertions.h"
@@ -28,8 +29,6 @@
void init_prach_ru_list(RU_t *ru);
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
int nr_phy_init_RU(RU_t *ru) {
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "phy_init.h"
#include "nr_phy_init.h"
#include "PHY/phy_extern_nr_ue.h"
#include "openair1/PHY/defs_RU.h"
#include "openair1/PHY/impl_defs_nr.h"
+1 -1
View File
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
#include "phy_init.h"
#include "nr_phy_init.h"
#include "common/utils/nr/nr_common.h"
#include "common/utils/LOG/log.h"
+59
View File
@@ -0,0 +1,59 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef NR_PHY_INIT_H_
#define NR_PHY_INIT_H_
#include "PHY/defs_gNB.h"
#include "PHY/defs_nr_UE.h"
int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp,uint8_t i_ssb);
int nr_init_frame_parms(nfapi_nr_config_request_scf_t *config, NR_DL_FRAME_PARMS *frame_parms);
int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms, fapi_nr_config_request_t *config, uint16_t nr_band);
void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink_frequency, int32_t uplink_frequency_offset, uint8_t mu, uint16_t nr_band);
int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB);
void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB);
void init_nr_ue_transport(PHY_VARS_NR_UE *ue);
void init_N_TA_offset(PHY_VARS_NR_UE *ue);
void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms);
int phy_init_nr_gNB(PHY_VARS_gNB *gNB);
int init_codebook_gNB(PHY_VARS_gNB *gNB);
void nr_phy_config_request(NR_PHY_Config_t *gNB);
void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu,int Nid_cell,uint64_t position_in_burst);
void phy_free_nr_gNB(PHY_VARS_gNB *gNB);
int l1_north_init_gNB(void);
void init_nr_transport(PHY_VARS_gNB *gNB);
void reset_nr_transport(PHY_VARS_gNB *gNB);
void init_DLSCH_struct(PHY_VARS_gNB *gNB, processingData_L1tx_t *msg);
void reset_DLSCH_struct(const PHY_VARS_gNB *gNB, processingData_L1tx_t *msg);
void RCconfig_nrUE_prs(void *cfg);
void init_nr_prs_ue_vars(PHY_VARS_NR_UE *ue);
void nr_init_dl_harq_processes(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb);
void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx);
void free_nr_ue_dl_harq(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb);
void free_nr_ue_ul_harq(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx);
void phy_init_nr_top(PHY_VARS_NR_UE *ue);
void phy_term_nr_top(void);
#endif
-34
View File
@@ -56,9 +56,6 @@ int l1_north_init_eNB(void);
*/
int phy_init_top(LTE_DL_FRAME_PARMS *frame_parms);
void phy_init_nr_top(PHY_VARS_NR_UE *ue);
void phy_term_nr_top(void);
/*!
\brief Allocate and Initialize the PHY variables relevant to the LTE ue signal buffers.
@@ -392,37 +389,6 @@ void phy_config_update_sib13_request(PHY_Config_t *phy_config);
int init_frame_parms(LTE_DL_FRAME_PARMS *frame_parms,uint8_t osf);
void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms);
int nr_get_ssb_start_symbol(NR_DL_FRAME_PARMS *fp,uint8_t i_ssb);
int nr_init_frame_parms(nfapi_nr_config_request_scf_t *config, NR_DL_FRAME_PARMS *frame_parms);
int nr_init_frame_parms_ue(NR_DL_FRAME_PARMS *frame_parms, fapi_nr_config_request_t *config, uint16_t nr_band);
void nr_init_frame_parms_ue_sa(NR_DL_FRAME_PARMS *frame_parms, uint64_t downlink_frequency, int32_t uplink_frequency_offset, uint8_t mu, uint16_t nr_band);
int init_nr_ue_signal(PHY_VARS_NR_UE *ue,int nb_connected_eNB);
void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB);
void init_nr_ue_transport(PHY_VARS_NR_UE *ue);
void init_N_TA_offset(PHY_VARS_NR_UE *ue);
void nr_dump_frame_parms(NR_DL_FRAME_PARMS *frame_parms);
int phy_init_nr_gNB(PHY_VARS_gNB *gNB);
int init_codebook_gNB(PHY_VARS_gNB *gNB);
void nr_phy_config_request(NR_PHY_Config_t *gNB);
void nr_phy_config_request_sim(PHY_VARS_gNB *gNB,int N_RB_DL,int N_RB_UL,int mu,int Nid_cell,uint64_t position_in_burst);
void phy_free_nr_gNB(PHY_VARS_gNB *gNB);
int l1_north_init_gNB(void);
void init_nr_transport(PHY_VARS_gNB *gNB);
void reset_nr_transport(PHY_VARS_gNB *gNB);
void init_dfts(void);
void fill_subframe_mask(PHY_VARS_eNB *eNB);
void init_DLSCH_struct(PHY_VARS_gNB *gNB, processingData_L1tx_t *msg);
void reset_DLSCH_struct(const PHY_VARS_gNB *gNB, processingData_L1tx_t *msg);
void RCconfig_nrUE_prs(void *cfg);
void init_nr_prs_ue_vars(PHY_VARS_NR_UE *ue);
void nr_init_dl_harq_processes(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb);
void nr_init_ul_harq_processes(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx);
void free_nr_ue_dl_harq(NR_DL_UE_HARQ_t harq_list[2][NR_MAX_DLSCH_HARQ_PROCESSES], int number_of_processes, int num_rb);
void free_nr_ue_ul_harq(NR_UL_UE_HARQ_t harq_list[NR_MAX_ULSCH_HARQ_PROCESSES], int number_of_processes, int num_rb, int num_ant_tx);
/** @} */
#endif
+1 -1
View File
@@ -28,7 +28,7 @@
//#include <string.h>
#include <math.h>
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
// Note: this is for prototype of generate_drs_pusch (OTA synchronization of RRUs)
@@ -38,6 +38,7 @@
//#include "defs.h"
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#if defined(__x86_64__) || defined(__i386__)
#include "pss6144.h"
@@ -23,6 +23,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "common/utils/LOG/log.h"
#include "PHY/sse_intrin.h"
@@ -20,7 +20,7 @@
*/
#include "PHY/defs_eNB.h"
//#include "PHY/phy_extern.h"
#include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h"
//#define DEBUG_CH
#include "common/utils/LOG/log.h"
@@ -35,8 +35,6 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
#define SCALE 0x3FFF
static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
L1_rxtx_proc_t *proc,
LTE_eNB_ULSCH_t * ulsch,
-1
View File
@@ -5,7 +5,6 @@ lte_gold.c : Generators for LTE gold sequences (used for pilots and scr
lte_ul_ref.c : UL DRS signal generation for TX and RX
defs.h : data structures and function prototypes
mod_table.h : lookup tables for QAM modulation (CBMIMO1 tables)
primary_synch.h : 3 PSS sequences
primary_synch.m : MATLAB/OCTAVE generator for PSS
gen_mod_table.m : MATLAB/OCTAVE generator for CBMIMO1 mod_table.h
lte_ul.m : MATLAB/OCTAVE generator for UL (SC-FDMA) DFT sizes
-27
View File
@@ -1,27 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
short primary_synch0[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-26120,-19785,11971,-30502,-24020,-22288,32117,6492,31311,9658,-16384,-28378,25100,-21063,-7292,-31946,20429,25618,14948,29158,11971,-30502,31311,9658,25100,-21063,-16384,28377,-24020,22287,32117,6492,-7292,31945,20429,25618,-26120,-19785,-16384,-28378,-16384,28377,-26120,-19785,-32402,4883,31311,-9659,32117,6492,-7292,-31946,32767,-1,25100,-21063,-24020,22287,-32402,4883,-32402,4883,-24020,22287,25100,-21063,32767,-1,-7292,-31946,32117,6492,31311,-9659,-32402,4883,-26120,-19785,-16384,28377,-16384,-28378,-26120,-19785,20429,25618,-7292,31945,32117,6492,-24020,22287,-16384,28377,25100,-21063,31311,9658,11971,-30502,14948,29158,20429,25618,-7292,-31946,25100,-21063,-16384,-28378,31311,9658,32117,6492,-24020,-22288,11971,-30502,-26120,-19785,32767,0,0,0,0,0,0,0,0,0,0,0};
short primary_synch1[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-31754,-8086,-24020,-22288,2448,32675,-26120,19784,27073,18458,-16384,28377,25100,21062,-29523,14217,-7292,31945,-13477,-29868,-24020,-22288,27073,18458,25100,21062,-16384,-28378,2448,-32676,-26120,19784,-29523,-14218,-7292,31945,-31754,-8086,-16384,28377,-16384,-28378,-31754,-8086,31311,-9659,27073,-18459,-26120,19784,-29523,14217,32767,-1,25100,21062,2448,-32676,31311,-9659,31311,-9659,2448,-32676,25100,21062,32767,0,-29523,14217,-26120,19784,27073,-18459,31311,-9659,-31754,-8086,-16384,-28378,-16384,28377,-31754,-8086,-7292,31945,-29523,-14218,-26120,19784,2448,-32676,-16384,-28378,25100,21062,27073,18458,-24020,-22288,-13477,-29868,-7292,31945,-29523,14217,25100,21062,-16384,28377,27073,18458,-26120,19784,2448,32675,-24020,-22288,-31754,-8086,32767,0,0,0,0,0,0,0,0,0,0,0};
short primary_synch2[144] = {0,0,0,0,0,0,0,0,0,0,32767,0,-31754,8085,-24020,22287,2448,-32676,-26120,-19785,27073,-18459,-16384,-28378,25100,-21063,-29523,-14218,-7292,-31946,-13477,29867,-24020,22287,27073,-18459,25100,-21063,-16384,28377,2448,32675,-26120,-19785,-29523,14217,-7292,-31946,-31754,8085,-16384,-28378,-16384,28377,-31754,8085,31311,9658,27073,18458,-26120,-19785,-29523,-14218,32767,0,25100,-21063,2448,32675,31311,9658,31311,9658,2448,32675,25100,-21063,32767,0,-29523,-14218,-26120,-19785,27073,18458,31311,9658,-31754,8085,-16384,28377,-16384,-28378,-31754,8085,-7292,-31946,-29523,14217,-26120,-19785,2448,32675,-16384,28377,25100,-21063,27073,-18459,-24020,22287,-13477,29867,-7292,-31946,-29523,-14218,25100,-21063,-16384,-28378,27073,-18459,-26120,-19785,2448,-32676,-24020,22287,-31754,8085,32767,-1,0,0,0,0,0,0,0,0,0,0};
unsigned char primary_synch0_tab[72] = {0,0,0,0,0,85,110,97,109,146,145,106,92,103,139,137,97,145,92,127,124,146,130,139,110,106,127,110,118,88,146,103,85,92,124,118,118,124,92,85,103,146,88,118,110,127,106,110,139,130,146,124,127,92,145,97,137,139,103,92,106,145,146,109,97,110,85,0,0,0,0,0};
unsigned char primary_synch1_tab[72] = {0,0,0,0,0,85,114,109,133,123,142,127,141,121,130,105,109,142,141,106,100,123,112,130,114,127,106,114,88,91,123,121,85,141,100,88,88,100,141,85,121,123,91,88,114,106,127,114,130,112,123,100,106,141,142,109,105,130,121,141,127,142,123,133,109,114,85,0,0,0,0,0};
unsigned char primary_synch2_tab[72] = {0,0,0,0,0,85,119,124,100,110,91,106,92,112,103,128,124,91,92,127,133,110,121,103,119,106,127,119,145,142,110,112,85,92,133,145,145,133,92,85,112,110,142,145,119,127,106,119,103,121,110,133,127,92,91,124,128,103,112,92,106,91,110,100,124,119,85,0,0,0,0,0};
@@ -163,8 +163,7 @@ void dlsch_scrambling(LTE_DL_FRAME_PARMS *frame_parms,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_SCRAMBLING, VCD_FUNCTION_OUT);
}
uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
void init_scrambling_lut(void) {
uint32_t s;
int i=0,j;
@@ -215,6 +214,7 @@ void dlsch_unscrambling(LTE_DL_FRAME_PARMS *frame_parms,
}
}
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
void init_unscrambling_lut(void) {
uint32_t s;
int i=0,j;
+5
View File
@@ -19,6 +19,9 @@
* contact@openairinterface.org
*/
#ifndef DLSCH_TBS_H_
#define DLSCH_TBS_H_
static const unsigned int dlsch_tbs25[27][25] = {
{16, 32, 56, 88, 120, 152, 176, 208, 224, 256, 288, 328, 344, 376, 392, 424, 456, 488, 504, 536, 568, 600, 616, 648, 680},
{24, 56, 88, 144, 176, 208, 224, 256, 328, 344, 376, 424, 456, 488, 520, 568, 600, 632, 680, 712, 744, 776, 808, 872, 904},
@@ -47,3 +50,5 @@ static const unsigned int dlsch_tbs25[27][25] = {
{584, 1192, 1800, 2408, 2984, 3624, 4264, 4968, 5544, 5992, 6712, 7224, 7992, 8504, 9144, 9912, 10296, 11064, 11448, 12216, 12960, 13536, 14112, 14688, 15264},
{616, 1256, 1864, 2536, 3112, 3752, 4392, 5160, 5736, 6200, 6968, 7480, 8248, 8760, 9528, 10296, 10680, 11448, 12216, 12576, 13536, 14112, 14688, 15264, 15840},
{712, 1480, 2216, 2984, 3752, 4392, 5160, 5992, 6712, 7480, 8248, 8760, 9528, 10296, 11064, 11832, 12576, 13536, 14112, 14688, 15264, 16416, 16992, 17568, 18336}};
#endif /* DLSCH_TBS_H_ */
-753
View File
@@ -1,753 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file PHY/LTE_TRANSPORT/print_stats.c
* \brief PHY statstic logging function
* \author R. Knopp, F. Kaltenberger, navid nikaein
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr, navid.nikaein@eurecom.fr
* \note
* \warning
*/
#include "PHY/LTE_TRANSPORT/proto.h"
#include "executables/lte-softmodem.h"
#include "PHY/defs.h"
#include "PHY/extern.h"
#include "SCHED/extern.h"
#include "openair2/LAYER2/MAC/proto.h"
#include "openair2/RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
extern int mac_get_rrc_status(uint8_t Mod_id,uint8_t eNB_flag,uint8_t index);
#include "common_lib.h"
extern openair0_config_t openair0_cfg[];
int dump_ue_stats(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,char *buffer, int length, runmode_t mode, int input_level_dBm) {
uint8_t eNB=0;
uint32_t RRC_status;
int len=length;
int harq_pid,round;
if (ue==NULL)
return 0;
if ((mode == normal_txrx) || (mode == no_L2_connect)) {
len += sprintf(&buffer[len], "[UE_PROC] UE %d, RNTI %x\n",ue->Mod_id, ue->pdcch_vars[0][0]->crnti);
len += sprintf(&buffer[len],"[UE PROC] RSRP[0] %.2f dBm/RE, RSSI %.2f dBm, RSRQ[0] %.2f dB, N0 %d dBm/RE (NF %.1f dB)\n",
10*log10(ue->measurements.rsrp[0])-ue->rx_total_gain_dB,
10*log10(ue->measurements.rssi)-ue->rx_total_gain_dB,
10*log10(ue->measurements.rsrq[0]),
ue->measurements.n0_power_tot_dBm,
(double)ue->measurements.n0_power_tot_dBm+132.24);
/*
len += sprintf(&buffer[len],
"[UE PROC] Frame count: %d\neNB0 RSSI %d dBm/RE (%d dB, %d dB)\neNB1 RSSI %d dBm/RE (%d dB, %d dB)neNB2 RSSI %d dBm/RE (%d dB, %d dB)\nN0 %d dBm/RE, %f dBm/%dPRB (%d dB, %d dB)\n",
proc->frame_rx,
ue->measurements.rx_rssi_dBm[0],
ue->measurements.rx_power_dB[0][0],
ue->measurements.rx_power_dB[0][1],
ue->measurements.rx_rssi_dBm[1],
ue->measurements.rx_power_dB[1][0],
ue->measurements.rx_power_dB[1][1],
ue->measurements.rx_rssi_dBm[2],
ue->measurements.rx_power_dB[2][0],
ue->measurements.rx_power_dB[2][1],
ue->measurements.n0_power_tot_dBm,
ue->measurements.n0_power_tot_dBm+10*log10(12*ue->frame_parms.N_RB_DL),
ue->frame_parms.N_RB_DL,
ue->measurements.n0_power_dB[0],
ue->measurements.n0_power_dB[1]);
*/
len += sprintf(&buffer[len], "[UE PROC] RX Gain %d dB\n",ue->rx_total_gain_dB);
len += sprintf(&buffer[len], "[UE_PROC] Frequency offset %d Hz, estimated carrier frequency %f Hz\n",ue->common_vars.freq_offset,openair0_cfg[0].rx_freq[0]-ue->common_vars.freq_offset);
len += sprintf(&buffer[len], "[UE PROC] UE mode = %s (%d)\n",mode_string[ue->UE_mode[0]],ue->UE_mode[0]);
len += sprintf(&buffer[len], "[UE PROC] timing_advance = %d\n",ue->timing_advance);
if (ue->UE_mode[0]==PUSCH) {
len += sprintf(&buffer[len], "[UE PROC] Po_PUSCH = %d dBm (PL %d dB, Po_NOMINAL_PUSCH %d dBm, PHR %d dB)\n",
ue->ulsch[0]->Po_PUSCH,
get_PL(ue->Mod_id,ue->CC_id,0),
ue->frame_parms.ul_power_control_config_common.p0_NominalPUSCH,
ue->ulsch[0]->PHR);
len += sprintf(&buffer[len], "[UE PROC] Po_PUCCH = %d dBm (Po_NOMINAL_PUCCH %d dBm, g_pucch %d dB)\n",
get_PL(ue->Mod_id,ue->CC_id,0)+
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH+
ue->dlsch[0][0][0]->g_pucch,
ue->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
ue->dlsch[0][0][0]->g_pucch);
}
//for (eNB=0;eNB<NUMBER_OF_eNB_MAX;eNB++) {
for (eNB=0; eNB<1; eNB++) {
len += sprintf(&buffer[len], "[UE PROC] RX spatial power eNB%d: [%d %d; %d %d] dB\n",
eNB,
ue->measurements.rx_spatial_power_dB[eNB][0][0],
ue->measurements.rx_spatial_power_dB[eNB][0][1],
ue->measurements.rx_spatial_power_dB[eNB][1][0],
ue->measurements.rx_spatial_power_dB[eNB][1][1]);
len += sprintf(&buffer[len], "[UE PROC] RX total power eNB%d: %d dB, avg: %d dB\n",eNB,ue->measurements.rx_power_tot_dB[eNB],ue->measurements.rx_power_avg_dB[eNB]);
len += sprintf(&buffer[len], "[UE PROC] RX total power lin: %d, avg: %d, RX total noise lin: %d, avg: %d\n",ue->measurements.rx_power_tot[eNB],
ue->measurements.rx_power_avg[eNB], ue->measurements.n0_power_tot, ue->measurements.n0_power_avg);
len += sprintf(&buffer[len], "[UE PROC] effective SINR %.2f dB\n",ue->sinr_eff);
len += sprintf(&buffer[len], "[UE PROC] Wideband CQI eNB %d: %d dB, avg: %d dB\n",eNB,ue->measurements.wideband_cqi_tot[eNB],ue->measurements.wideband_cqi_avg[eNB]);
switch (ue->frame_parms.N_RB_DL) {
case 6:
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d] dB\n",
eNB,
ue->measurements.subband_cqi_dB[eNB][0][0],
ue->measurements.subband_cqi_dB[eNB][0][1],
ue->measurements.subband_cqi_dB[eNB][0][2],
ue->measurements.subband_cqi_dB[eNB][0][3],
ue->measurements.subband_cqi_dB[eNB][0][4],
ue->measurements.subband_cqi_dB[eNB][0][5]);
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d] dB\n",
eNB,
ue->measurements.subband_cqi_dB[eNB][1][0],
ue->measurements.subband_cqi_dB[eNB][1][1],
ue->measurements.subband_cqi_dB[eNB][1][2],
ue->measurements.subband_cqi_dB[eNB][1][3],
ue->measurements.subband_cqi_dB[eNB][1][4],
ue->measurements.subband_cqi_dB[eNB][1][5]);
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
eNB,
ue->measurements.subband_pmi_re[eNB][0][0],
ue->measurements.subband_pmi_im[eNB][0][0],
ue->measurements.subband_pmi_re[eNB][1][0],
ue->measurements.subband_pmi_im[eNB][1][0],
ue->measurements.subband_pmi_re[eNB][2][0],
ue->measurements.subband_pmi_im[eNB][2][0],
ue->measurements.subband_pmi_re[eNB][3][0],
ue->measurements.subband_pmi_im[eNB][3][0],
ue->measurements.subband_pmi_re[eNB][4][0],
ue->measurements.subband_pmi_im[eNB][4][0],
ue->measurements.subband_pmi_re[eNB][5][0],
ue->measurements.subband_pmi_im[eNB][5][0]);
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
eNB,
ue->measurements.subband_pmi_re[eNB][0][1],
ue->measurements.subband_pmi_im[eNB][0][1],
ue->measurements.subband_pmi_re[eNB][1][1],
ue->measurements.subband_pmi_im[eNB][1][1],
ue->measurements.subband_pmi_re[eNB][2][1],
ue->measurements.subband_pmi_im[eNB][2][1],
ue->measurements.subband_pmi_re[eNB][3][1],
ue->measurements.subband_pmi_im[eNB][3][1],
ue->measurements.subband_pmi_re[eNB][4][1],
ue->measurements.subband_pmi_im[eNB][4][1],
ue->measurements.subband_pmi_re[eNB][5][1],
ue->measurements.subband_pmi_im[eNB][5][1]);
len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d]\n",
eNB,
ue->measurements.selected_rx_antennas[eNB][0],
ue->measurements.selected_rx_antennas[eNB][1],
ue->measurements.selected_rx_antennas[eNB][2],
ue->measurements.selected_rx_antennas[eNB][3],
ue->measurements.selected_rx_antennas[eNB][4],
ue->measurements.selected_rx_antennas[eNB][5]);
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,6)));
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB,
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,6)),
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,6)));
break;
case 25:
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d %d] dB\n",
eNB,
ue->measurements.subband_cqi_dB[eNB][0][0],
ue->measurements.subband_cqi_dB[eNB][0][1],
ue->measurements.subband_cqi_dB[eNB][0][2],
ue->measurements.subband_cqi_dB[eNB][0][3],
ue->measurements.subband_cqi_dB[eNB][0][4],
ue->measurements.subband_cqi_dB[eNB][0][5],
ue->measurements.subband_cqi_dB[eNB][0][6]);
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d %d] dB\n",
eNB,
ue->measurements.subband_cqi_dB[eNB][1][0],
ue->measurements.subband_cqi_dB[eNB][1][1],
ue->measurements.subband_cqi_dB[eNB][1][2],
ue->measurements.subband_cqi_dB[eNB][1][3],
ue->measurements.subband_cqi_dB[eNB][1][4],
ue->measurements.subband_cqi_dB[eNB][1][5],
ue->measurements.subband_cqi_dB[eNB][1][6]);
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
eNB,
ue->measurements.subband_pmi_re[eNB][0][0],
ue->measurements.subband_pmi_im[eNB][0][0],
ue->measurements.subband_pmi_re[eNB][1][0],
ue->measurements.subband_pmi_im[eNB][1][0],
ue->measurements.subband_pmi_re[eNB][2][0],
ue->measurements.subband_pmi_im[eNB][2][0],
ue->measurements.subband_pmi_re[eNB][3][0],
ue->measurements.subband_pmi_im[eNB][3][0],
ue->measurements.subband_pmi_re[eNB][4][0],
ue->measurements.subband_pmi_im[eNB][4][0],
ue->measurements.subband_pmi_re[eNB][5][0],
ue->measurements.subband_pmi_im[eNB][5][0],
ue->measurements.subband_pmi_re[eNB][6][0],
ue->measurements.subband_pmi_im[eNB][6][0]);
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
eNB,
ue->measurements.subband_pmi_re[eNB][0][1],
ue->measurements.subband_pmi_im[eNB][0][1],
ue->measurements.subband_pmi_re[eNB][1][1],
ue->measurements.subband_pmi_im[eNB][1][1],
ue->measurements.subband_pmi_re[eNB][2][1],
ue->measurements.subband_pmi_im[eNB][2][1],
ue->measurements.subband_pmi_re[eNB][3][1],
ue->measurements.subband_pmi_im[eNB][3][1],
ue->measurements.subband_pmi_re[eNB][4][1],
ue->measurements.subband_pmi_im[eNB][4][1],
ue->measurements.subband_pmi_re[eNB][5][1],
ue->measurements.subband_pmi_im[eNB][5][1],
ue->measurements.subband_pmi_re[eNB][6][1],
ue->measurements.subband_pmi_im[eNB][6][1]);
len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d %d]\n",
eNB,
ue->measurements.selected_rx_antennas[eNB][0],
ue->measurements.selected_rx_antennas[eNB][1],
ue->measurements.selected_rx_antennas[eNB][2],
ue->measurements.selected_rx_antennas[eNB][3],
ue->measurements.selected_rx_antennas[eNB][4],
ue->measurements.selected_rx_antennas[eNB][5],
ue->measurements.selected_rx_antennas[eNB][6]);
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,7)));
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB,
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,7)),
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,7)));
break;
case 50:
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d %d %d %d] dB\n",
eNB,
ue->measurements.subband_cqi_dB[eNB][0][0],
ue->measurements.subband_cqi_dB[eNB][0][1],
ue->measurements.subband_cqi_dB[eNB][0][2],
ue->measurements.subband_cqi_dB[eNB][0][3],
ue->measurements.subband_cqi_dB[eNB][0][4],
ue->measurements.subband_cqi_dB[eNB][0][5],
ue->measurements.subband_cqi_dB[eNB][0][6],
ue->measurements.subband_cqi_dB[eNB][0][7],
ue->measurements.subband_cqi_dB[eNB][0][8]);
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d %d %d %d] dB\n",
eNB,
ue->measurements.subband_cqi_dB[eNB][1][0],
ue->measurements.subband_cqi_dB[eNB][1][1],
ue->measurements.subband_cqi_dB[eNB][1][2],
ue->measurements.subband_cqi_dB[eNB][1][3],
ue->measurements.subband_cqi_dB[eNB][1][4],
ue->measurements.subband_cqi_dB[eNB][1][5],
ue->measurements.subband_cqi_dB[eNB][1][6],
ue->measurements.subband_cqi_dB[eNB][1][7],
ue->measurements.subband_cqi_dB[eNB][1][8]);
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
eNB,
ue->measurements.subband_pmi_re[eNB][0][0],
ue->measurements.subband_pmi_im[eNB][0][0],
ue->measurements.subband_pmi_re[eNB][1][0],
ue->measurements.subband_pmi_im[eNB][1][0],
ue->measurements.subband_pmi_re[eNB][2][0],
ue->measurements.subband_pmi_im[eNB][2][0],
ue->measurements.subband_pmi_re[eNB][3][0],
ue->measurements.subband_pmi_im[eNB][3][0],
ue->measurements.subband_pmi_re[eNB][4][0],
ue->measurements.subband_pmi_im[eNB][4][0],
ue->measurements.subband_pmi_re[eNB][5][0],
ue->measurements.subband_pmi_im[eNB][5][0],
ue->measurements.subband_pmi_re[eNB][6][0],
ue->measurements.subband_pmi_im[eNB][6][0],
ue->measurements.subband_pmi_re[eNB][7][0],
ue->measurements.subband_pmi_im[eNB][7][0],
ue->measurements.subband_pmi_re[eNB][8][0],
ue->measurements.subband_pmi_im[eNB][8][0]);
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
eNB,
ue->measurements.subband_pmi_re[eNB][0][1],
ue->measurements.subband_pmi_im[eNB][0][1],
ue->measurements.subband_pmi_re[eNB][1][1],
ue->measurements.subband_pmi_im[eNB][1][1],
ue->measurements.subband_pmi_re[eNB][2][1],
ue->measurements.subband_pmi_im[eNB][2][1],
ue->measurements.subband_pmi_re[eNB][3][1],
ue->measurements.subband_pmi_im[eNB][3][1],
ue->measurements.subband_pmi_re[eNB][4][1],
ue->measurements.subband_pmi_im[eNB][4][1],
ue->measurements.subband_pmi_re[eNB][5][1],
ue->measurements.subband_pmi_im[eNB][5][1],
ue->measurements.subband_pmi_re[eNB][6][1],
ue->measurements.subband_pmi_im[eNB][6][1],
ue->measurements.subband_pmi_re[eNB][7][1],
ue->measurements.subband_pmi_im[eNB][7][1],
ue->measurements.subband_pmi_re[eNB][8][1],
ue->measurements.subband_pmi_im[eNB][8][1]);
len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d %d %d %d]\n",
eNB,
ue->measurements.selected_rx_antennas[eNB][0],
ue->measurements.selected_rx_antennas[eNB][1],
ue->measurements.selected_rx_antennas[eNB][2],
ue->measurements.selected_rx_antennas[eNB][3],
ue->measurements.selected_rx_antennas[eNB][4],
ue->measurements.selected_rx_antennas[eNB][5],
ue->measurements.selected_rx_antennas[eNB][6],
ue->measurements.selected_rx_antennas[eNB][7],
ue->measurements.selected_rx_antennas[eNB][8]);
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,9)));
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB,
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,9)),
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,9)));
break;
case 100:
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 0): [%d %d %d %d %d %d %d %d %d %d %d %d %d] dB\n",
eNB,
ue->measurements.subband_cqi_dB[eNB][0][0],
ue->measurements.subband_cqi_dB[eNB][0][1],
ue->measurements.subband_cqi_dB[eNB][0][2],
ue->measurements.subband_cqi_dB[eNB][0][3],
ue->measurements.subband_cqi_dB[eNB][0][4],
ue->measurements.subband_cqi_dB[eNB][0][5],
ue->measurements.subband_cqi_dB[eNB][0][6],
ue->measurements.subband_cqi_dB[eNB][0][7],
ue->measurements.subband_cqi_dB[eNB][0][8],
ue->measurements.subband_cqi_dB[eNB][0][9],
ue->measurements.subband_cqi_dB[eNB][0][10],
ue->measurements.subband_cqi_dB[eNB][0][11],
ue->measurements.subband_cqi_dB[eNB][0][12]);
len += sprintf(&buffer[len], "[UE PROC] Subband CQI eNB%d (Ant 1): [%d %d %d %d %d %d %d %d %d %d %d %d %d] dB\n",
eNB,
ue->measurements.subband_cqi_dB[eNB][1][0],
ue->measurements.subband_cqi_dB[eNB][1][1],
ue->measurements.subband_cqi_dB[eNB][1][2],
ue->measurements.subband_cqi_dB[eNB][1][3],
ue->measurements.subband_cqi_dB[eNB][1][4],
ue->measurements.subband_cqi_dB[eNB][1][5],
ue->measurements.subband_cqi_dB[eNB][1][6],
ue->measurements.subband_cqi_dB[eNB][1][7],
ue->measurements.subband_cqi_dB[eNB][1][8],
ue->measurements.subband_cqi_dB[eNB][1][9],
ue->measurements.subband_cqi_dB[eNB][1][10],
ue->measurements.subband_cqi_dB[eNB][1][11],
ue->measurements.subband_cqi_dB[eNB][1][12]);
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 0): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
eNB,
ue->measurements.subband_pmi_re[eNB][0][0],
ue->measurements.subband_pmi_im[eNB][0][0],
ue->measurements.subband_pmi_re[eNB][1][0],
ue->measurements.subband_pmi_im[eNB][1][0],
ue->measurements.subband_pmi_re[eNB][2][0],
ue->measurements.subband_pmi_im[eNB][2][0],
ue->measurements.subband_pmi_re[eNB][3][0],
ue->measurements.subband_pmi_im[eNB][3][0],
ue->measurements.subband_pmi_re[eNB][4][0],
ue->measurements.subband_pmi_im[eNB][4][0],
ue->measurements.subband_pmi_re[eNB][5][0],
ue->measurements.subband_pmi_im[eNB][5][0],
ue->measurements.subband_pmi_re[eNB][6][0],
ue->measurements.subband_pmi_im[eNB][6][0],
ue->measurements.subband_pmi_re[eNB][7][0],
ue->measurements.subband_pmi_im[eNB][7][0],
ue->measurements.subband_pmi_re[eNB][8][0],
ue->measurements.subband_pmi_im[eNB][8][0],
ue->measurements.subband_pmi_re[eNB][9][0],
ue->measurements.subband_pmi_im[eNB][9][0],
ue->measurements.subband_pmi_re[eNB][10][0],
ue->measurements.subband_pmi_im[eNB][10][0],
ue->measurements.subband_pmi_re[eNB][11][0],
ue->measurements.subband_pmi_im[eNB][11][0],
ue->measurements.subband_pmi_re[eNB][12][0],
ue->measurements.subband_pmi_im[eNB][12][0]);
len += sprintf(&buffer[len], "[UE PROC] Subband PMI eNB%d (Ant 1): [(%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d) (%d %d)]\n",
eNB,
ue->measurements.subband_pmi_re[eNB][0][1],
ue->measurements.subband_pmi_im[eNB][0][1],
ue->measurements.subband_pmi_re[eNB][1][1],
ue->measurements.subband_pmi_im[eNB][1][1],
ue->measurements.subband_pmi_re[eNB][2][1],
ue->measurements.subband_pmi_im[eNB][2][1],
ue->measurements.subband_pmi_re[eNB][3][1],
ue->measurements.subband_pmi_im[eNB][3][1],
ue->measurements.subband_pmi_re[eNB][4][1],
ue->measurements.subband_pmi_im[eNB][4][1],
ue->measurements.subband_pmi_re[eNB][5][1],
ue->measurements.subband_pmi_im[eNB][5][1],
ue->measurements.subband_pmi_re[eNB][6][1],
ue->measurements.subband_pmi_im[eNB][6][1],
ue->measurements.subband_pmi_re[eNB][7][1],
ue->measurements.subband_pmi_im[eNB][7][1],
ue->measurements.subband_pmi_re[eNB][8][1],
ue->measurements.subband_pmi_im[eNB][8][1],
ue->measurements.subband_pmi_re[eNB][9][1],
ue->measurements.subband_pmi_im[eNB][9][1],
ue->measurements.subband_pmi_re[eNB][10][1],
ue->measurements.subband_pmi_im[eNB][10][1],
ue->measurements.subband_pmi_re[eNB][11][1],
ue->measurements.subband_pmi_im[eNB][11][1],
ue->measurements.subband_pmi_re[eNB][12][1],
ue->measurements.subband_pmi_im[eNB][12][1]);
len += sprintf(&buffer[len], "[UE PROC] PMI Antenna selection eNB%d : [%d %d %d %d %d %d %d %d %d %d %d %d %d]\n",
eNB,
ue->measurements.selected_rx_antennas[eNB][0],
ue->measurements.selected_rx_antennas[eNB][1],
ue->measurements.selected_rx_antennas[eNB][2],
ue->measurements.selected_rx_antennas[eNB][3],
ue->measurements.selected_rx_antennas[eNB][4],
ue->measurements.selected_rx_antennas[eNB][5],
ue->measurements.selected_rx_antennas[eNB][6],
ue->measurements.selected_rx_antennas[eNB][7],
ue->measurements.selected_rx_antennas[eNB][8],
ue->measurements.selected_rx_antennas[eNB][9],
ue->measurements.selected_rx_antennas[eNB][10],
ue->measurements.selected_rx_antennas[eNB][11],
ue->measurements.selected_rx_antennas[eNB][12]);
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (max): %jx\n",eNB,pmi2hex_2Ar1(quantize_subband_pmi(&ue->measurements,eNB,13)));
len += sprintf(&buffer[len], "[UE PROC] Quantized PMI eNB %d (both): %jx,%jx\n",eNB,
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,0,13)),
pmi2hex_2Ar1(quantize_subband_pmi2(&ue->measurements,eNB,1,13)));
break;
}
RRC_status = mac_UE_get_rrc_status(ue->Mod_id, 0);
len += sprintf(&buffer[len],"[UE PROC] RRC status = %d\n",RRC_status);
len += sprintf(&buffer[len], "[UE PROC] Transmission Mode %d \n",ue->transmission_mode[eNB]);
len += sprintf(&buffer[len], "[UE PROC] PBCH err conseq %d, PBCH error total %d, PBCH FER %d\n",
ue->pbch_vars[eNB]->pdu_errors_conseq,
ue->pbch_vars[eNB]->pdu_errors,
ue->pbch_vars[eNB]->pdu_fer);
if (ue->transmission_mode[eNB] == 6)
len += sprintf(&buffer[len], "[UE PROC] Mode 6 Wideband CQI eNB %d : %d dB\n",eNB,ue->measurements.precoded_cqi_dB[eNB][0]);
for (harq_pid=0; harq_pid<8; harq_pid++) {
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 0 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][0]->harq_processes[harq_pid]->mcs);
for (round=0; round<8; round++)
len+=sprintf(&buffer[len],"%d/%d ",
ue->dlsch[0][0][0]->harq_processes[harq_pid]->errors[round],
ue->dlsch[0][0][0]->harq_processes[harq_pid]->trials[round]);
len+=sprintf(&buffer[len],"\n");
}
if (ue->dlsch[0][0] && ue->dlsch[0][0][0] && ue->dlsch[0][0][1]) {
len += sprintf(&buffer[len], "[UE PROC] Saved PMI for DLSCH eNB %d : %jx (%p)\n",eNB,pmi2hex_2Ar1(ue->dlsch[0][0][0]->pmi_alloc),ue->dlsch[0][0][0]);
len += sprintf(&buffer[len], "[UE PROC] eNB %d: dl_power_off = %d\n",eNB,ue->dlsch[0][0][0]->harq_processes[0]->dl_power_off);
for (harq_pid=0; harq_pid<8; harq_pid++) {
len+=sprintf(&buffer[len],"[UE PROC] eNB %d: CW 1 harq_pid %d, mcs %d:",eNB,harq_pid,ue->dlsch[0][0][1]->harq_processes[0]->mcs);
for (round=0; round<8; round++)
len+=sprintf(&buffer[len],"%d/%d ",
ue->dlsch[0][0][1]->harq_processes[harq_pid]->errors[round],
ue->dlsch[0][0][1]->harq_processes[harq_pid]->trials[round]);
len+=sprintf(&buffer[len],"\n");
}
}
len += sprintf(&buffer[len], "[UE PROC] DLSCH Total %d, Error %d, FER %d\n",ue->dlsch_received[0],ue->dlsch_errors[0],ue->dlsch_fer[0]);
len += sprintf(&buffer[len], "[UE PROC] DLSCH (SI) Total %d, Error %d\n",ue->dlsch_SI_received[0],ue->dlsch_SI_errors[0]);
len += sprintf(&buffer[len], "[UE PROC] DLSCH (RA) Total %d, Error %d\n",ue->dlsch_ra_received[0],ue->dlsch_ra_errors[0]);
int i=0;
//len += sprintf(&buffer[len], "[UE PROC] MCH Total %d\n", ue->dlsch_mch_received[0]);
for(i=0; i <ue->frame_parms.num_MBSFN_config; i++ ) {
len += sprintf(&buffer[len], "[UE PROC] MCH (MCCH MBSFN %d) Total %d, Error %d, Trials %d\n",
i, ue->dlsch_mcch_received[i][0],ue->dlsch_mcch_errors[i][0],ue->dlsch_mcch_trials[i][0]);
len += sprintf(&buffer[len], "[UE PROC] MCH (MTCH MBSFN %d) Total %d, Error %d, Trials %d\n",
i, ue->dlsch_mtch_received[i][0],ue->dlsch_mtch_errors[i][0],ue->dlsch_mtch_trials[i][0]);
}
len += sprintf(&buffer[len], "[UE PROC] DLSCH Bitrate %dkbps\n",(ue->bitrate[0]/1000));
len += sprintf(&buffer[len], "[UE PROC] Total Received Bits %dkbits\n",(ue->total_received_bits[0]/1000));
len += sprintf(&buffer[len], "[UE PROC] IA receiver %d\n",ue->use_ia_receiver);
}
} else {
len += sprintf(&buffer[len], "[UE PROC] Frame count: %d, RSSI %3.2f dB (%d dB, %d dB), N0 %3.2f dB (%d dB, %d dB)\n",
proc->frame_rx,
10*log10(ue->measurements.rssi),
ue->measurements.rx_power_dB[0][0],
ue->measurements.rx_power_dB[0][1],
10*log10(ue->measurements.n0_power_tot),
ue->measurements.n0_power_dB[0],
ue->measurements.n0_power_dB[1]);
}
len += sprintf(&buffer[len],"EOF\n");
return len;
} // is_clusterhead
/*
int dump_eNB_stats(PHY_VARS_eNB *eNB, char* buffer, int length)
{
unsigned int success=0;
uint8_t eNB_id,UE_id,i,j,number_of_cards_l=1;
uint32_t ulsch_errors=0,dlsch_errors=0;
uint32_t ulsch_round_attempts[4]= {0,0,0,0},ulsch_round_errors[4]= {0,0,0,0};
uint32_t dlsch_round_attempts[4]= {0,0,0,0},dlsch_round_errors[4]= {0,0,0,0};
uint32_t UE_id_mac, RRC_status;
eNB_rxtx_proc_t *proc = &eNB->proc.proc_rxtx[0];
if (eNB==NULL)
return 0;
int len = length;
// if(eNB->frame==0){
eNB->total_dlsch_bitrate = 0;//eNB->UE_stats[UE_id].dlsch_bitrate + eNB->total_dlsch_bitrate;
eNB->total_transmitted_bits = 0;// eNB->UE_stats[UE_id].total_transmitted_bits + eNB->total_transmitted_bits;
eNB->total_system_throughput = 0;//eNB->UE_stats[UE_id].total_transmitted_bits + eNB->total_system_throughput;
// }
for (eNB_id=0; eNB_id<number_of_cards_l; eNB_id++) {
len += sprintf(&buffer[len],"eNB %d/%d Frame %d: RX Gain %d dB, I0 %d dBm (%d,%d) dB \n",
eNB_id,number_of_cards_l,
proc->frame_tx,
eNB->rx_total_gain_dB,
eNB->measurements.n0_power_tot_dBm,
eNB->measurements.n0_power_dB[0],
eNB->measurements.n0_power_dB[1]);
len += sprintf(&buffer[len],"PRB I0 (%X.%X.%X.%X): ",
eNB->rb_mask_ul[0],
eNB->rb_mask_ul[1],eNB->rb_mask_ul[2],eNB->rb_mask_ul[3]);
for (i=0; i<eNB->frame_parms.N_RB_UL; i++) {
len += sprintf(&buffer[len],"%4d ",
eNB->measurements.n0_subband_power_tot_dBm[i]);
if ((i>0) && ((i%25) == 0))
len += sprintf(&buffer[len],"\n");
}
len += sprintf(&buffer[len],"\n");
len += sprintf(&buffer[len],"\nPERFORMANCE PARAMETERS\n");
for (UE_id=0; UE_id<NUMBER_OF_UE_MAX; UE_id++) {
if (eNB &&
(eNB->dlsch!=NULL) &&
(eNB->dlsch[(uint8_t)UE_id]!=NULL) &&
(eNB->dlsch[(uint8_t)UE_id][0]->rnti>0)&&
(eNB->UE_stats[UE_id].mode == PUSCH)) {
eNB->total_dlsch_bitrate = eNB->UE_stats[UE_id].dlsch_bitrate + eNB->total_dlsch_bitrate;
eNB->total_transmitted_bits = eNB->UE_stats[UE_id].total_TBS + eNB->total_transmitted_bits;
//eNB->total_system_throughput = eNB->UE_stats[UE_id].total_transmitted_bits + eNB->total_system_throughput;
for (i=0; i<8; i++)
success = success + (eNB->UE_stats[UE_id].dlsch_trials[i][0] - eNB->UE_stats[UE_id].dlsch_l2_errors[i]);
len += sprintf(&buffer[len],"Total DLSCH %d kbits / %d frames ",(eNB->total_transmitted_bits/1000),proc->frame_tx+1);
len += sprintf(&buffer[len],"Total DLSCH throughput %d kbps ",(eNB->total_dlsch_bitrate/1000));
len += sprintf(&buffer[len],"Total DLSCH trans %d / %d frames\n",success,proc->frame_tx+1);
//len += sprintf(&buffer[len],"[eNB PROC] FULL MU-MIMO Transmissions/Total Transmissions = %d/%d\n",eNB->FULL_MUMIMO_transmissions,eNB->check_for_total_transmissions);
//len += sprintf(&buffer[len],"[eNB PROC] MU-MIMO Transmissions/Total Transmissions = %d/%d\n",eNB->check_for_MUMIMO_transmissions,eNB->check_for_total_transmissions);
//len += sprintf(&buffer[len],"[eNB PROC] SU-MIMO Transmissions/Total Transmissions = %d/%d\n",eNB->check_for_SUMIMO_transmissions,eNB->check_for_total_transmissions);
len += sprintf(&buffer[len],"UE %d (%x) Power: (%d,%d) dB, Po_PUSCH: (%d,%d) dBm, Po_PUCCH (%d/%d) dBm, Po_PUCCH1 (%d,%d) dBm, PUCCH1 Thres %d dBm \n",
UE_id,
eNB->UE_stats[UE_id].crnti,
dB_fixed(eNB->pusch_vars[UE_id]->ulsch_power[0]),
dB_fixed(eNB->pusch_vars[UE_id]->ulsch_power[1]),
eNB->UE_stats[UE_id].UL_rssi[0],
eNB->UE_stats[UE_id].UL_rssi[1],
dB_fixed(eNB->UE_stats[UE_id].Po_PUCCH/eNB->frame_parms.N_RB_UL)-eNB->rx_total_gain_dB,
eNB->frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
dB_fixed(eNB->UE_stats[UE_id].Po_PUCCH1_below/eNB->frame_parms.N_RB_UL)-eNB->rx_total_gain_dB,
dB_fixed(eNB->UE_stats[UE_id].Po_PUCCH1_above/eNB->frame_parms.N_RB_UL)-eNB->rx_total_gain_dB,
PUCCH1_THRES+eNB->measurements.n0_power_tot_dBm-dB_fixed(eNB->frame_parms.N_RB_UL));
len+= sprintf(&buffer[len],"DL mcs %d, UL mcs %d, UL rb %d, delta_TF %d, ",
eNB->dlsch[(uint8_t)UE_id][0]->harq_processes[0]->mcs,
eNB->ulsch[(uint8_t)UE_id]->harq_processes[0]->mcs,
eNB->ulsch[(uint8_t)UE_id]->harq_processes[0]->nb_rb,
eNB->ulsch[(uint8_t)UE_id]->harq_processes[0]->delta_TF);
len += sprintf(&buffer[len],"Wideband CQI: (%d,%d) dB\n",
eNB->measurements.wideband_cqi_dB[UE_id][0],
eNB->measurements.wideband_cqi_dB[UE_id][1]);
len += sprintf(&buffer[len],"DL TM %d, DL_cqi %d, DL_pmi_single %jx ",
eNB->transmission_mode[UE_id],
eNB->UE_stats[UE_id].DL_cqi[0],
pmi2hex_2Ar1(eNB->UE_stats[UE_id].DL_pmi_single));
len += sprintf(&buffer[len],"Timing advance %d samples (%d 16Ts), update %d ",
eNB->UE_stats[UE_id].UE_timing_offset,
eNB->UE_stats[UE_id].UE_timing_offset>>2,
eNB->UE_stats[UE_id].timing_advance_update);
len += sprintf(&buffer[len],"Mode = %s(%d) ",
mode_string[eNB->UE_stats[UE_id].mode],
eNB->UE_stats[UE_id].mode);
UE_id_mac = find_UE_id(eNB->Mod_id,eNB->dlsch[(uint8_t)UE_id][0]->rnti);
if (UE_id_mac != -1) {
RRC_status = mac_eNB_get_rrc_status(eNB->Mod_id,eNB->dlsch[(uint8_t)UE_id][0]->rnti);
len += sprintf(&buffer[len],"UE_id_mac = %d, RRC status = %d\n",UE_id_mac,RRC_status);
} else
len += sprintf(&buffer[len],"UE_id_mac = -1\n");
len += sprintf(&buffer[len],"SR received/total: %d/%d (diff %d)\n",
eNB->UE_stats[UE_id].sr_received,
eNB->UE_stats[UE_id].sr_total,
eNB->UE_stats[UE_id].sr_total-eNB->UE_stats[UE_id].sr_received);
len += sprintf(&buffer[len],"DL Subband CQI: ");
int nb_sb;
switch (eNB->frame_parms.N_RB_DL) {
case 6:
nb_sb=0;
break;
case 15:
nb_sb = 4;
case 25:
nb_sb = 7;
break;
case 50:
nb_sb = 9;
break;
case 75:
nb_sb = 10;
break;
case 100:
nb_sb = 13;
break;
default:
nb_sb=0;
break;
}
for (i=0; i<nb_sb; i++)
len += sprintf(&buffer[len],"%2d ",
eNB->UE_stats[UE_id].DL_subband_cqi[0][i]);
len += sprintf(&buffer[len],"\n");
ulsch_errors = 0;
for (j=0; j<4; j++) {
ulsch_round_attempts[j]=0;
ulsch_round_errors[j]=0;
}
len += sprintf(&buffer[len],"ULSCH errors/attempts per harq (per round): \n");
for (i=0; i<8; i++) {
len += sprintf(&buffer[len]," harq %d: %d/%d (fer %d) (%d/%d, %d/%d, %d/%d, %d/%d) ",
i,
eNB->UE_stats[UE_id].ulsch_errors[i],
eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][0],
eNB->UE_stats[UE_id].ulsch_round_fer[i][0],
eNB->UE_stats[UE_id].ulsch_round_errors[i][0],
eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][0],
eNB->UE_stats[UE_id].ulsch_round_errors[i][1],
eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][1],
eNB->UE_stats[UE_id].ulsch_round_errors[i][2],
eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][2],
eNB->UE_stats[UE_id].ulsch_round_errors[i][3],
eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][3]);
if ((i&1) == 1)
len += sprintf(&buffer[len],"\n");
ulsch_errors+=eNB->UE_stats[UE_id].ulsch_errors[i];
for (j=0; j<4; j++) {
ulsch_round_attempts[j]+=eNB->UE_stats[UE_id].ulsch_decoding_attempts[i][j];
ulsch_round_errors[j]+=eNB->UE_stats[UE_id].ulsch_round_errors[i][j];
}
}
len += sprintf(&buffer[len],"ULSCH errors/attempts total %d/%d (%d/%d, %d/%d, %d/%d, %d/%d)\n",
ulsch_errors,ulsch_round_attempts[0],
ulsch_round_errors[0],ulsch_round_attempts[0],
ulsch_round_errors[1],ulsch_round_attempts[1],
ulsch_round_errors[2],ulsch_round_attempts[2],
ulsch_round_errors[3],ulsch_round_attempts[3]);
dlsch_errors = 0;
for (j=0; j<4; j++) {
dlsch_round_attempts[j]=0;
dlsch_round_errors[j]=0;
}
len += sprintf(&buffer[len],"DLSCH errors/attempts per harq (per round): \n");
for (i=0; i<8; i++) {
len += sprintf(&buffer[len]," harq %d: %d/%d (%d/%d/%d, %d/%d/%d, %d/%d/%d, %d/%d/%d) ",
i,
eNB->UE_stats[UE_id].dlsch_l2_errors[i],
eNB->UE_stats[UE_id].dlsch_trials[i][0],
eNB->UE_stats[UE_id].dlsch_ACK[i][0],
eNB->UE_stats[UE_id].dlsch_NAK[i][0],
eNB->UE_stats[UE_id].dlsch_trials[i][0],
eNB->UE_stats[UE_id].dlsch_ACK[i][1],
eNB->UE_stats[UE_id].dlsch_NAK[i][1],
eNB->UE_stats[UE_id].dlsch_trials[i][1],
eNB->UE_stats[UE_id].dlsch_ACK[i][2],
eNB->UE_stats[UE_id].dlsch_NAK[i][2],
eNB->UE_stats[UE_id].dlsch_trials[i][2],
eNB->UE_stats[UE_id].dlsch_ACK[i][3],
eNB->UE_stats[UE_id].dlsch_NAK[i][3],
eNB->UE_stats[UE_id].dlsch_trials[i][3]);
if ((i&1) == 1)
len += sprintf(&buffer[len],"\n");
dlsch_errors+=eNB->UE_stats[UE_id].dlsch_l2_errors[i];
for (j=0; j<4; j++) {
dlsch_round_attempts[j]+=eNB->UE_stats[UE_id].dlsch_trials[i][j];
dlsch_round_errors[j]+=eNB->UE_stats[UE_id].dlsch_NAK[i][j];
}
}
len += sprintf(&buffer[len],"DLSCH errors/attempts total %d/%d (%d/%d, %d/%d, %d/%d, %d/%d): \n",
dlsch_errors,dlsch_round_attempts[0],
dlsch_round_errors[0],dlsch_round_attempts[0],
dlsch_round_errors[1],dlsch_round_attempts[1],
dlsch_round_errors[2],dlsch_round_attempts[2],
dlsch_round_errors[3],dlsch_round_attempts[3]);
len += sprintf(&buffer[len],"DLSCH total bits from MAC: %dkbit ",(eNB->UE_stats[UE_id].total_TBS_MAC)/1000);
len += sprintf(&buffer[len],"DLSCH total bits ack'ed: %dkbit ",(eNB->UE_stats[UE_id].total_TBS)/1000);
len += sprintf(&buffer[len],"DLSCH Average throughput (100 frames): %dkbps\n",(eNB->UE_stats[UE_id].dlsch_bitrate/1000));
// len += sprintf(&buffer[len],"[eNB PROC] Transmission Mode %d\n",eNB->transmission_mode[UE_id]);
}
}
len += sprintf(&buffer[len],"\n");
}
len += sprintf(&buffer[len],"EOF\n");
return len;
}
*/
+1 -1
View File
@@ -48,7 +48,7 @@ int generate_pss(int32_t **txdataF,
unsigned int Nsymb;
unsigned short k,m,aa,a;
uint8_t Nid2;
short *primary_sync;
const short *primary_sync;
Nid2 = frame_parms->Nid_cell % 3;
switch (Nid2) {
@@ -40,8 +40,6 @@
#include "T.h"
//extern char* namepointer_chMag ;
//eren
//extern int **ulchmag_eren;
//eren
@@ -1044,7 +1042,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
L1_rxtx_proc_t *proc,
uint8_t UE_id) {
LTE_eNB_ULSCH_t **ulsch = eNB->ulsch;
// flagMag = 0;
LTE_eNB_COMMON *common_vars = &eNB->common_vars;
LTE_eNB_PUSCH *pusch_vars = eNB->pusch_vars[UE_id];
LTE_DL_FRAME_PARMS *frame_parms = &eNB->frame_parms;
+58 -1
View File
@@ -37,6 +37,7 @@
#include "PHY/phy_vars.h"
#endif
#include "assertions.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
//#define DEBUG_HARQ
@@ -60,10 +61,67 @@
#define LOG_I(A,B...) printf(B)
*/
int flag_LA=0;
extern uint16_t beta_cqi[16];
extern uint16_t beta_ri[16];
extern uint16_t beta_ack[16];
static const double p_qpsk[8] = {5982.42405670359,
-21568.1135917693,
31293.9987036905,
-23394.6795043871,
9608.34750585489,
-2158.15802349899,
267.731968719036,
-20.6145324295965};
static const double p_qam16[8] = {7862.12690694170,
-28510.3207048338,
41542.2150287122,
-31088.3036957379,
12690.1982361016,
-2785.66604739984,
326.595462489375,
-18.9911849872089};
static const double p_qam64[8] = {8832.57933013696,
-32119.1802555952,
46914.2578990397,
-35163.8150557183,
14343.7419388853,
-3126.61025510092,
360.954930562237,
-18.0358548533343};
static const double q_qpsk[8] = {1.94491167814437e-09,
8.40494123817774e-08,
4.75527131198034e-07,
-2.48946285301621e-05,
-0.000347614016158364,
0.00209252225437100,
0.0742986115462510,
0.488297879889425};
static const double q_qam16[8] = {3.21151853033897e-10,
5.55435952230651e-09,
-2.30760065362117e-07,
-6.25587743817859e-06,
4.62251036452795e-06,
0.00224150813158937,
0.0393723140344367,
0.245486379182639};
static const double q_qam64[8] = {2.25934026232206e-11,
-1.45992206328306e-10,
-3.70861183071900e-08,
-1.22206071019319e-06,
6.49115500399637e-06,
0.00129828997837433,
0.0259669554914859,
0.166602901214898};
static const double sinr_to_cqi[4][16] = {
{-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
{-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572},
{-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392},
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
};
static int errorRB(int rb, char * table, int line) {
LOG_E(PHY,"Received %d rb, impossble in table %s, at line %d\n", rb, table, line);
return 0;
@@ -2926,7 +2984,6 @@ uint16_t quantize_wideband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id)
uint8_t sinr2cqi(double sinr,uint8_t trans_mode)
{
// int flag_LA=0;
uint8_t retValue = 0;
@@ -30,7 +30,7 @@
* \warning
*/
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "SCHED_UE/sched_UE.h"
#include "transport_ue.h"
#include "transport_proto_ue.h"
+1 -1
View File
@@ -36,7 +36,7 @@
#include "PHY/CODING/coding_extern.h"
#include "PHY/CODING/lte_interleaver_inline.h"
#include "transport_ue.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
+1 -1
View File
@@ -32,7 +32,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/sse_intrin.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
+1
View File
@@ -32,6 +32,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
@@ -35,6 +35,7 @@
#include "LAYER2/MAC/mac.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "transport_proto_ue.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
#include "assertions.h"
+15 -51
View File
@@ -30,20 +30,22 @@
* \warning
*/
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "common/utils/LOG/log.h"
unsigned short msrsb_6_40[8][4] = {{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4},
{12,4,4,4},
{8,4,4,4},
{4,4,4,4}
static unsigned short msrsb_6_40[8][4] = {
{36, 12, 4, 4},
{32, 16, 8, 4},
{24, 4, 4, 4},
{20, 4, 4, 4},
{16, 4, 4, 4},
{12, 4, 4, 4},
{8, 4, 4, 4},
{4, 4, 4, 4}
};
unsigned short msrsb_41_60[8][4] = {{48,24,12,4},
static unsigned short msrsb_41_60[8][4] = {
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
@@ -53,47 +55,8 @@ unsigned short msrsb_41_60[8][4] = {{48,24,12,4},
{16,4,4,4}
};
unsigned short msrsb_61_80[8][4] = {{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4}
};
unsigned short msrsb_81_110[8][4] = {{96,48,24,4},
{96,32,16,4},
{80,40,20,4},
static unsigned short msrsb_61_80[8][4] = {
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4}
};
unsigned short Nb_6_40[8][4] = {{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4},
{12,4,4,4},
{8,4,4,4},
{4,4,4,4}
};
unsigned short Nb_41_60[8][4] = {{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4}
};
unsigned short Nb_61_80[8][4] = {{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
@@ -103,7 +66,8 @@ unsigned short Nb_61_80[8][4] = {{72,24,12,4},
{32,16,8,4}
};
unsigned short Nb_81_110[8][4] = {{96,48,24,4},
static unsigned short msrsb_81_110[8][4] = {
{96,48,24,4},
{96,32,16,4},
{80,40,20,4},
{72,24,12,4},
+2 -2
View File
@@ -31,7 +31,7 @@
*/
#include "PHY/defs_UE.h"
#include "transport_ue.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/MODULATION/modulation_UE.h"
//#define DEBUG_SSS
@@ -44,7 +44,7 @@ int pss_ch_est(PHY_VARS_UE *ue,
int32_t sss_ext[4][72])
{
int16_t *pss;
const int16_t *pss;
int16_t *pss_ext2,*sss_ext2,*sss_ext3,tmp_re,tmp_im,tmp_re2,tmp_im2;
uint8_t aarx,i;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
@@ -56,7 +56,6 @@ void print_CQI(void *o,UCI_format_t uci_format,unsigned char eNB_id,int N_RB_DL)
switch(uci_format) {
case wideband_cqi_rank1_2A:
#ifdef DEBUG_UCI
LOG_D(PHY,"[PRINT CQI] flat_LA %d\n", flag_LA);
switch(N_RB_DL) {
case 6:
LOG_I(PHY,"[PRINT CQI] wideband_cqi rank 1: eNB %d, cqi %d\n",eNB_id,
@@ -38,6 +38,7 @@
#include "PHY/CODING/lte_interleaver_inline.h"
#include "PHY/LTE_UE_TRANSPORT/transport_ue.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
//#define DEBUG_ULSCH_CODING
//#define DEBUG_ULSCH_FREE 1
@@ -38,6 +38,7 @@
#include "PHY/LTE_TRANSPORT/transport_eNB.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
//#define DEBUG_ULSCH_MODULATION
+1 -1
View File
@@ -30,7 +30,7 @@
#include <unistd.h>
#include <fcntl.h>
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/impl_defs_nr.h"
#include "PHY/defs_nr_common.h"
#include "PHY/defs_gNB.h"
@@ -33,7 +33,7 @@
#include "executables/softmodem-common.h"
#include "executables/nr-softmodem-common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/phy_extern_nr_ue.h"
#include "common/utils/LOG/log.h"
#include "PHY/sse_intrin.h"
+1 -1
View File
@@ -38,7 +38,7 @@
#include "executables/softmodem-common.h"
#include "nr_transport_proto_ue.h"
#include "PHY/CODING/nrPolar_tools/nr_polar_dci_defs.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/CODING/coding_extern.h"
#include "PHY/sse_intrin.h"
#include "common/utils/nr/nr_common.h"
@@ -29,7 +29,7 @@
* \warning
*/
#include "PHY/defs_nr_UE.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "nr_transport_proto_ue.h"
#include "PHY/sse_intrin.h"
+1 -1
View File
@@ -34,7 +34,7 @@
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/sse_intrin.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "openair1/SCHED_NR_UE/defs.h"
#include <openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h>
#include <openair1/PHY/TOOLS/phy_scope_interface.h>
@@ -33,6 +33,8 @@
#ifndef SRS_MODULATION_NR_H
#define SRS_MODULATION_NR_H
#include "PHY/defs_nr_UE.h"
#ifdef DEFINE_VARIABLES_SRS_MODULATION_NR_H
#define EXTERN
#define INIT_VARIABLES_SRS_MODULATION_NR_H
+4 -4
View File
@@ -33,16 +33,16 @@ include_directories ("/usr/include/X11")
add_library(xforms_common OBJECT
lte_phy_scope.c
../../../executables/stats.c)
target_link_libraries(xforms_common PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc)
target_link_libraries(xforms_common PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_library(enbscope MODULE lte_enb_scope.c $<TARGET_OBJECTS:xforms_common>)
target_link_libraries(enbscope PUBLIC forms PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc)
target_link_libraries(enbscope PUBLIC forms PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_library(uescope MODULE lte_ue_scope.c $<TARGET_OBJECTS:xforms_common>)
target_link_libraries(uescope PUBLIC forms PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc)
target_link_libraries(uescope PUBLIC forms PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
add_library(nrscope MODULE nr_phy_scope.c)
target_link_libraries(nrscope PUBLIC forms PRIVATE asn1_nr_rrc PRIVATE asn1_lte_rrc)
target_link_libraries(nrscope PUBLIC forms PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
# all libraries should be written to root build dir (default creates the same hierarchie under build as existing for sources)
set_target_properties(enbscope uescope nrscope
+86 -59
View File
@@ -24,80 +24,107 @@
#include "PHY/defs_common.h"
extern char* namepointer_chMag ;
extern char* namepointer_log2;
extern char fmageren_name2[512];
extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX];
extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
#include "PHY/LTE_TRANSPORT/transport_vars.h"
#include "PHY/defs_RU.h"
extern unsigned int DAQ_MBOX;
extern int number_of_cards;
extern const short conjugate[8],conjugate2[8];
static const short conjugate[8] __attribute__((aligned(16))) = {-1, 1, -1, 1, -1, 1, -1, 1};
static const short conjugate2[8] __attribute__((aligned(16))) = {1, -1, 1, -1, 1, -1, 1, -1};
extern short primary_synch0[144];
extern short primary_synch1[144];
extern short primary_synch2[144];
extern unsigned char primary_synch0_tab[72];
extern unsigned char primary_synch1_tab[72];
extern unsigned char primary_synch2_tab[72];
extern int flagMag;
//extern short **txdataF_rep_tmp;
extern char mode_string[4][20];
static const short primary_synch0[144] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, -26120, -19785, 11971, -30502,
-24020, -22288, 32117, 6492, 31311, 9658, -16384, -28378, 25100, -21063, -7292, -31946, 20429, 25618, 14948, 29158,
11971, -30502, 31311, 9658, 25100, -21063, -16384, 28377, -24020, 22287, 32117, 6492, -7292, 31945, 20429, 25618,
-26120, -19785, -16384, -28378, -16384, 28377, -26120, -19785, -32402, 4883, 31311, -9659, 32117, 6492, -7292, -31946,
32767, -1, 25100, -21063, -24020, 22287, -32402, 4883, -32402, 4883, -24020, 22287, 25100, -21063, 32767, -1,
-7292, -31946, 32117, 6492, 31311, -9659, -32402, 4883, -26120, -19785, -16384, 28377, -16384, -28378, -26120, -19785,
20429, 25618, -7292, 31945, 32117, 6492, -24020, 22287, -16384, 28377, 25100, -21063, 31311, 9658, 11971, -30502,
14948, 29158, 20429, 25618, -7292, -31946, 25100, -21063, -16384, -28378, 31311, 9658, 32117, 6492, -24020, -22288,
11971, -30502, -26120, -19785, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
static const short primary_synch1[144] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, -31754, -8086, -24020, -22288,
2448, 32675, -26120, 19784, 27073, 18458, -16384, 28377, 25100, 21062, -29523, 14217, -7292, 31945, -13477, -29868,
-24020, -22288, 27073, 18458, 25100, 21062, -16384, -28378, 2448, -32676, -26120, 19784, -29523, -14218, -7292, 31945,
-31754, -8086, -16384, 28377, -16384, -28378, -31754, -8086, 31311, -9659, 27073, -18459, -26120, 19784, -29523, 14217,
32767, -1, 25100, 21062, 2448, -32676, 31311, -9659, 31311, -9659, 2448, -32676, 25100, 21062, 32767, 0,
-29523, 14217, -26120, 19784, 27073, -18459, 31311, -9659, -31754, -8086, -16384, -28378, -16384, 28377, -31754, -8086,
-7292, 31945, -29523, -14218, -26120, 19784, 2448, -32676, -16384, -28378, 25100, 21062, 27073, 18458, -24020, -22288,
-13477, -29868, -7292, 31945, -29523, 14217, 25100, 21062, -16384, 28377, 27073, 18458, -26120, 19784, 2448, 32675,
-24020, -22288, -31754, -8086, 32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
static const short primary_synch2[144] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32767, 0, -31754, 8085, -24020, 22287,
2448, -32676, -26120, -19785, 27073, -18459, -16384, -28378, 25100, -21063, -29523, -14218, -7292, -31946, -13477, 29867,
-24020, 22287, 27073, -18459, 25100, -21063, -16384, 28377, 2448, 32675, -26120, -19785, -29523, 14217, -7292, -31946,
-31754, 8085, -16384, -28378, -16384, 28377, -31754, 8085, 31311, 9658, 27073, 18458, -26120, -19785, -29523, -14218,
32767, 0, 25100, -21063, 2448, 32675, 31311, 9658, 31311, 9658, 2448, 32675, 25100, -21063, 32767, 0,
-29523, -14218, -26120, -19785, 27073, 18458, 31311, 9658, -31754, 8085, -16384, 28377, -16384, -28378, -31754, 8085,
-7292, -31946, -29523, 14217, -26120, -19785, 2448, 32675, -16384, 28377, 25100, -21063, 27073, -18459, -24020, 22287,
-13477, 29867, -7292, -31946, -29523, -14218, 25100, -21063, -16384, -28378, 27073, -18459, -26120, -19785, 2448, -32676,
-24020, 22287, -31754, 8085, 32767, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern unsigned char NB_RU;
extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern const double p_qpsk[8];
extern const double p_qam16[8];
extern const double p_qam64[8];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
static const char NB_functions[7][20] = {
"eNodeB_3GPP",
"eNodeB_3GPP_BBU",
"NGFI_RAU_IF4p5",
"NGFI_RRU_IF5",
"NGFI_RRU_IF4p5",
"gNodeB_3GPP",
};
static const char NB_timing[2][20] = {"synch_to_ext_device", "synch_to_other"};
static const char ru_if_types[MAX_RU_IF_TYPES][20] = {"local RF", "IF5 RRU", "IF5 Mobipass", "IF4p5 RRU", "IF1pp RRU"};
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
extern unsigned short msrsb_6_40[8][4];
extern unsigned short msrsb_41_60[8][4];
extern unsigned short msrsb_61_80[8][4];
extern unsigned short msrsb_81_110[8][4];
extern unsigned short Nb_6_40[8][4];
extern unsigned short Nb_41_60[8][4];
extern unsigned short Nb_61_80[8][4];
extern unsigned short Nb_81_110[8][4];
static const unsigned short Nb_6_40[8][4] = {
{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4},
{12,4,4,4},
{8,4,4,4},
{4,4,4,4}
};
static const unsigned short Nb_41_60[8][4] = {
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4}
};
static const unsigned short Nb_61_80[8][4] = {
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4}
};
static const unsigned short Nb_81_110[8][4] = {
{96,48,24,4},
{96,32,16,4},
{80,40,20,4},
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4}
};
static const uint8_t alpha_lut[8] = {0, 40, 50, 60, 70, 80, 90, 100};
extern uint8_t alpha_lut[8];
extern uint8_t max_turbo_iterations;
extern double cpuf;
#endif /*__PHY_EXTERN_H__ */
-83
View File
@@ -23,90 +23,7 @@
#define __PHY_EXTERN_NR_UE__H__
#include "PHY/defs_nr_UE.h"
//#include "common/ran_context.h"
#ifdef XFORMS
#include "PHY/TOOLS/nr_phy_scope.h"
extern uint32_t do_forms;
#endif
extern char* namepointer_chMag ;
extern char* namepointer_log2;
extern char fmageren_name2[512];
extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX];
extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
extern uint64_t downlink_frequency[MAX_NUM_CCs][4];
extern int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
extern const short conjugate[8],conjugate2[8];
extern int number_of_cards;
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
extern short primary_synch0[144];
extern short primary_synch1[144];
extern short primary_synch2[144];
extern unsigned char primary_synch0_tab[72];
extern unsigned char primary_synch1_tab[72];
extern unsigned char primary_synch2_tab[72];
extern int16_t *primary_synch0_time; //!< index: [0..ofdm_symbol_size*2[
extern int16_t *primary_synch1_time; //!< index: [0..ofdm_symbol_size*2[
extern int16_t *primary_synch2_time; //!< index: [0..ofdm_symbol_size*2[
extern int flagMag;
//extern short **txdataF_rep_tmp;
extern char mode_string[4][20];
extern unsigned char NB_RU;
extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
extern unsigned short msrsb_6_40[8][4];
extern unsigned short msrsb_41_60[8][4];
extern unsigned short msrsb_61_80[8][4];
extern unsigned short msrsb_81_110[8][4];
extern unsigned short Nb_6_40[8][4];
extern unsigned short Nb_41_60[8][4];
extern unsigned short Nb_61_80[8][4];
extern unsigned short Nb_81_110[8][4];
extern uint16_t hundred_times_log10_NPRB[100];
extern uint8_t alpha_lut[8];
extern uint8_t max_turbo_iterations;
extern double cpuf;
#endif /*__PHY_EXTERN_H__ */
+1 -71
View File
@@ -24,79 +24,9 @@
#include "PHY/defs_UE.h"
extern char* namepointer_chMag ;
extern char* namepointer_log2;
extern char fmageren_name2[512];
extern unsigned int RX_DMA_BUFFER[4][NB_ANTENNAS_RX];
extern unsigned int TX_DMA_BUFFER[4][NB_ANTENNAS_TX];
#include "PHY/LTE_TRANSPORT/transport_vars.h"
extern int number_of_cards;
extern const short conjugate[8],conjugate2[8];
extern PHY_VARS_UE ***PHY_vars_UE_g;
extern short primary_synch0[144];
extern short primary_synch1[144];
extern short primary_synch2[144];
extern unsigned char primary_synch0_tab[72];
extern unsigned char primary_synch1_tab[72];
extern unsigned char primary_synch2_tab[72];
extern int flagMag;
//extern short **txdataF_rep_tmp;
extern char mode_string[4][20];
extern int flag_LA;
extern double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
extern double sinr_bler_map_up[MCS_COUNT][2][16];
extern int table_length[MCS_COUNT];
extern const double sinr_to_cqi[4][16];
extern const int cqi_to_mcs[16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
extern double MI_map_4qam[3][162];
extern double MI_map_16qam[3][197];
extern double MI_map_64qam[3][227];
extern const double beta1_dlsch_MI[6][MCS_COUNT];
extern const double beta2_dlsch_MI[6][MCS_COUNT];
extern const double q_qpsk[8];
extern const double q_qam16[8];
extern const double q_qam64[8];
extern const double p_qpsk[8];
extern const double p_qam16[8];
extern const double p_qam64[8];
extern const double beta1_dlsch[6][MCS_COUNT];
extern const double beta2_dlsch[6][MCS_COUNT];
extern const char NB_functions[7][20];
extern const char NB_timing[2][20];
extern const char ru_if_types[MAX_RU_IF_TYPES][20];
extern int16_t unscrambling_lut[65536*16];
extern uint8_t scrambling_lut[65536*16];
extern unsigned short msrsb_6_40[8][4];
extern unsigned short msrsb_41_60[8][4];
extern unsigned short msrsb_61_80[8][4];
extern unsigned short msrsb_81_110[8][4];
extern unsigned short Nb_6_40[8][4];
extern unsigned short Nb_41_60[8][4];
extern unsigned short Nb_61_80[8][4];
extern unsigned short Nb_81_110[8][4];
extern uint8_t alpha_lut[8];
extern uint8_t max_turbo_iterations;
#endif /*__PHY_EXTERN_H__ */
+3 -89
View File
@@ -22,104 +22,18 @@
#ifndef __PHY_VARS_H__
#define __PHY_VARS_H__
#include "PHY/types.h"
#include "PHY/defs_eNB.h"
#include "PHY/defs_gNB.h"
#include "PHY/defs_UE.h"
char* namepointer_chMag ;
char fmageren_name2[512];
char* namepointer_log2;
#include "PHY/LTE_REFSIG/primary_synch.h"
#include "PHY/LTE_TRANSPORT/transport_vars.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "openair2/PHY_INTERFACE/IF_Module.h"
PHY_VARS_UE ***PHY_vars_UE_g;
UL_RCC_IND_t UL_RCC_INFO;
NR_UL_IND_t UL_INFO;
unsigned short rev[2048],rev_times4[8192],rev_half[1024];
unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192];
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
unsigned char NB_RU=0;
int number_of_cards;
int flag_LA=0;
int flagMag;
//extern channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
//extern double ABS_SINR_eff_BLER_table[MCS_COUNT][9][9];
//extern double ABS_beta[MCS_COUNT];odi
double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
int table_length[MCS_COUNT];
//double sinr_bler_map_up[MCS_COUNT][2][16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
double MI_map_4qam[3][162];
double MI_map_16qam[3][197];
double MI_map_64qam[3][227];
// here the first index is for transmission mode 1, 2, 5 and 6 whereas the second index is for the 16 sinr vaues corresponding to 16 CQIs
const double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
{-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572},
{-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392},
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
};
const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
//for SNR to MI conversion 7 th order Polynomial coeff
const double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
const double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
const double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
//for MI to SNR conversion 7 th order Polynomial coeff
const double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
const double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
const double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
// ideal CE MIESM
const double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
const double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
//real CE MIESM
/*
double beta1_dlsch_MI[6][MCS_COUNT] = { {1.32955, 0.59522, 0.54024, 0.98698, 0.81305, 0.76976, 0.69258, 0.69713, 0.70546, 0.69111, 0.81904, 0.72664, 0.79491, 0.72562, 0.53980, 0.33134, 0.50550, 0.40602,0.40281,0.47012,0.50510,0.23540,0.32045,1}, {0.59632, 1.08475, 1.02431, 1.07020, 0.90170, 0.97719, 0.95464, 0.92764, 0.86721, 0.85986, 0.64558, 0.80631, 0.82673, 0.82888, 0.87122, 0.77245, 0.29771, 0.43477, 0.55321, 0.61027, 0.56111, 0.57292, 0.39737,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.77532, 1.07544, 1.10571, 1.04099, 0.91638, 0.88644, 0.96405, 0.86709, 0.94066, 0.84430, 1.24478, 1.09665, 1.42604, 0.79541, 0.71847, 0.71604, 0.74561, 0.36431, 0.41536, 0.52175, 0.47096, 0.49977, 0.59728,1}};
double beta2_dlsch_MI[6][MCS_COUNT] = { {1.36875, 0.59304, 0.53870, 0.98239, 0.81637, 0.76847, 0.69842, 0.69885, 0.69967, 0.69826, 0.82660, 0.70559, 0.78404, 0.70670, 0.55393, 0.36893, 0.52225, 0.39752, 0.40494, 0.46239, 0.49247,0.26900,0.34504,1}, {0.43775, 0.78208, 0.72875, 0.77458, 0.64485, 0.69174, 0.66097, 0.63289, 0.59652, 0.61175, 0.44551, 0.56047, 0.57314, 0.57553, 0.58849, 0.52159, 0.21241, 0.30139, 0.37373, 0.32029, 0.37067, 0.36706, 0.27118,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.54448, 0.73731, 0.79165, 0.74407, 0.68042, 0.64906, 0.71349, 0.62109, 0.65815, 0.60940, 0.90549, 0.78708, 1.03176, 0.58431, 0.53379, 0.51224, 0.52767, 0.26848, 0.29642, 0.36879, 0.34148, 0.35279,0.40633,1}};
*/
//ideal channel estimation values
//double beta1_dlsch[6][MCS_COUNT] = { {2.3814, 0.4956, 0.5273, 1.1708, 0.8014, 0.7889, 0.8111, 0.8139, 0.8124, 0.8479, 1.9280, 1.9664, 2.3857, 2.5147, 2.4511, 3.0158, 2.8643, 5.3013, 5.8594, 6.5372, 7.8073, 7.8030, 7.5295, 7.1320}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
//double beta2_dlsch[6][MCS_COUNT] = { {2.3639, 0.4952, 0.5207, 1.1572, 0.8026, 0.7864, 0.7996, 0.8034, 0.8200, 0.8367, 1.8701, 1.9212, 2.2947, 2.4472, 2.4091, 2.9479, 2.8973, 5.0591, 5.5134, 6.1483, 7.2166, 7.5177, 7.5704, 7.2248}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
const double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
const double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
//real channel estimation valus
/*
double beta1_dlsch[6][MCS_COUNT] = { {2.50200, 0.84047, 0.78195, 1.37929, 1.16871, 1.11906, 1.06303, 1.07447, 1.11403, 1.09223, 2.82502, 2.87556, 3.51254, 3.62920, 3.53638, 2.35980, 3.74126, 8.66532, 7.31772, 9.86882, 10.64939, 6.75208, 9.50664, 13.63057}, {0.92257, 1, 1.80445, 1.43175, 1.42093, 1.37381, 1.45392, 1.47255, 1.47451, 1.41235, 3.9079, 3.38557, 4.13059, 4.93355, 4.97277, 6.04951, 5.88896, 8.68076, 10.23746, 12.37069, 5.50538, 17.29612, 17.95050, 13.27095}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79255, 1.88213, 4.44226, 2.25150, 1.93710, 2.18504, 2.57389, 1.94322, 1.78515, 2.09265, 2.37459, 1.74442, 1.74346, 1.19705, 1.56149, 1.59604, 1.6, 1,1,1,1,1,1,1}, {0.93374, 1.40389, 1.36670, 1.38679, 1.35707, 1.26353, 1.32360, 1.40164, 1.51843, 1.34863, 3.45839, 3.13726, 3.94768, 4.21966, 4.60750, 4.97894, 5.40755, 8.12814, 10.59221, 12.96427, 13.37323, 14.27206, 16.61779, 17.19656}};
double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.16829, 1.11186, 1.06287, 1.07292, 1.09946, 1.10650, 2.79174, 2.75655, 3.36651, 3.49011, 3.60903, 2.73517, 3.84009, 8.20312, 7.41739, 9.64081, 10.40911, 8.11765, 10.41923, 9.34300}, {0.67252, 0.8600, 1.28633, 1.01624, 1.03066, 0.97590, 1.02560, 1.01840, 1.00547, 0.97093, 2.72573, 2.33283, 2.86181, 3.40452, 3.47957, 4.08916, 3.97628, 6.14541, 7.11017, 8.42369, 4.04812, 11.42082, 11.57171, 9.28462}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.85784, 0.90361, 2.09766, 1.08385, 0.96300, 1.04432, 1.22763, 0.99249, 0.95544, 1.12333, 1.37924, 1.12913, 1.30644, 1.19253, 1.75488, 2.13813, 2.10636, 1,1,1,1,1,1,1}, {0.66288, 0.96402, 0.98545, 0.99386, 0.99981, 0.92678, 0.98978, 0.99600, 1.05538, 0.97777, 2.52504, 2.29338, 2.89631, 3.10812, 3.41916, 3.58671, 3.84166, 6.05254, 7.45821, 9.15812, 9.66330, 10.17852, 11.50519, 11.16299}};
*/
const char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
const char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
/// lookup table for unscrambling in RX
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
/// lookup table for scrambling in TX
uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
uint8_t max_turbo_iterations=4;
#endif /*__PHY_VARS_H__ */
-8
View File
@@ -22,16 +22,8 @@
#ifndef __PHY_VARS_NR_UE_H__
#define __PHY_VARS_NR_UE_H__
#include "PHY/types.h"
#include "PHY/defs_nr_UE.h"
#include "common/ran_context.h"
PHY_VARS_NR_UE ***PHY_vars_UE_g;
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
#endif
+1 -85
View File
@@ -22,95 +22,11 @@
#ifndef __PHY_VARS_UE__H__
#define __PHY_VARS_UE__H__
#include "PHY/types.h"
#include "PHY/defs_UE.h"
#include "common/ran_context.h"
char *namepointer_chMag ;
char fmageren_name2[512];
char *namepointer_log2;
#include "PHY/LTE_REFSIG/primary_synch.h"
PHY_VARS_UE ***PHY_vars_UE_g;
unsigned short rev[2048],rev_times4[8192],rev_half[1024];
unsigned short rev256[256],rev512[512],rev1024[1024],rev4096[4096],rev2048[2048],rev8192[8192];
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
int number_of_cards;
int flag_LA=0;
int flagMag;
//extern channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
//extern double ABS_SINR_eff_BLER_table[MCS_COUNT][9][9];
//extern double ABS_beta[MCS_COUNT];odi
double sinr_bler_map[MCS_COUNT][2][MCS_TABLE_LENGTH_MAX];
int table_length[MCS_COUNT];
//double sinr_bler_map_up[MCS_COUNT][2][16];
//for MU-MIMO abstraction using MIESM
//this 2D arrarays contains SINR, MI and RBIR in rows 1, 2, and 3 respectively
double MI_map_4qam[3][162];
double MI_map_16qam[3][197];
double MI_map_64qam[3][227];
// here the first index is for transmission mode 1, 2, 5 and 6 whereas the second index is for the 16 sinr vaues corresponding to 16 CQIs
const double sinr_to_cqi[4][16]= { {-2.5051, -2.5051, -1.7451, -0.3655, 1.0812, 2.4012, 3.6849, 6.6754, 8.3885, 8.7970, 12.0437, 14.4709, 15.7281, 17.2424, 17.2424, 17.2424},
{-2.2360, -2.2360, -1.3919, -0.0218, 1.5319, 2.9574, 4.3234, 6.3387, 8.9879, 9.5096, 12.6609, 14.0116, 16.4984, 18.1572, 18.1572, 18.1572},
{-1, -1.0000, -0.4198, -0.0140, 1.0362, 2.3520, 3.5793, 6.1136, 8.4836, 9.0858, 12.4723, 13.9128, 16.2054, 17.7392, 17.7392, 17.7392},
{ -4.1057, -4.1057, -3.3768, -2.2916, -1.1392, 0.1236, 1.2849, 3.1933, 5.9298, 6.4052, 9.6245, 10.9414, 13.5166, 14.9545, 14.9545, 14.9545}
};
const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
//for SNR to MI conversion 7 th order Polynomial coeff
const double q_qam16[8]= {3.21151853033897e-10,5.55435952230651e-09,-2.30760065362117e-07,-6.25587743817859e-06,4.62251036452795e-06,0.00224150813158937,0.0393723140344367,0.245486379182639};
const double q_qpsk[8]= {1.94491167814437e-09,8.40494123817774e-08,4.75527131198034e-07,-2.48946285301621e-05,-0.000347614016158364,0.00209252225437100,0.0742986115462510,0.488297879889425};
const double q_qam64[8]= {2.25934026232206e-11,-1.45992206328306e-10,-3.70861183071900e-08,-1.22206071019319e-06,6.49115500399637e-06,0.00129828997837433,0.0259669554914859,0.166602901214898};
//for MI to SNR conversion 7 th order Polynomial coeff
const double p_qpsk[8]= {5982.42405670359,-21568.1135917693,31293.9987036905,-23394.6795043871,9608.34750585489,-2158.15802349899,267.731968719036,-20.6145324295965};
const double p_qam16[8]= {7862.12690694170,-28510.3207048338,41542.2150287122,-31088.3036957379,12690.1982361016,-2785.66604739984,326.595462489375,-18.9911849872089};
const double p_qam64[8]= {8832.57933013696,-32119.1802555952,46914.2578990397,-35163.8150557183,14343.7419388853,-3126.61025510092,360.954930562237,-18.0358548533343};
// ideal CE MIESM
const double beta1_dlsch_MI[6][MCS_COUNT] = { {1.1188, 0.3720, 0.3755, 0.9453, 0.5799, 0.5256, 0.5485, 0.5340, 0.5165, 0.5300, 0.6594, 0.5962, 0.4884, 0.4927, 0.3687, 0.4614, 0.4081, 0.2639,0.2935,0.2520,0.3709,0.2906,0.2612,0.2390}, {0.7138, 0.5533, 0.5533, 0.4828, 0.4998, 0.4843, 0.4942, 0.5323, 0.5142, 0.4756, 0.5792, 0.4167, 0.4445, 0.3942, 0.3789, 0.2756, 0.4456, 0.1650, 0.2254, 0.2353, 0.2097,0.2517,0.3242,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.7146, 0.4789, 0.5392, 0.5556, 0.4975, 0.4847, 0.4691, 0.5261, 0.5278, 0.4962, 0.4468, 0.4113, 0.4622, 0.4609, 0.3946, 0.3991, 0.3532, 0.2439, 0.1898, 0.2929, 0.2712, 0.3367, 0.3591, 0.2571}};
const double beta2_dlsch_MI[6][MCS_COUNT] = { {1.1293, 0.3707, 0.3722, 0.9310, 0.5808, 0.5265, 0.5404, 0.5279, 0.5210, 0.5226, 0.6438, 0.5827, 0.4804, 0.4830, 0.3638, 0.4506, 0.4107, 0.2547, 0.2797, 0.2413, 0.3351, 0.2750, 0.2568, 0.2273}, {0.7028, 0.5503, 0.5503, 0.4815, 0.5006, 0.4764, 0.4810, 0.5124, 0.4964, 0.4485, 0.5497, 0.3971, 0.4239, 0.3701, 0.3494, 0.2630, 0.4053, 0.1505, 0.2001,0.2024,0.1788,0.2124,0.2668,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.6980, 0.4694, 0.5379, 0.5483, 0.4982, 0.4737, 0.4611, 0.5051, 0.5020, 0.4672, 0.4357, 0.3957, 0.4389, 0.4344, 0.3645, 0.3661, 0.3301, 0.2179, 0.1730, 0.2536, 0.2389,0.2884,0.2936,0.2226}};
//real CE MIESM
/*
double beta1_dlsch_MI[6][MCS_COUNT] = { {1.32955, 0.59522, 0.54024, 0.98698, 0.81305, 0.76976, 0.69258, 0.69713, 0.70546, 0.69111, 0.81904, 0.72664, 0.79491, 0.72562, 0.53980, 0.33134, 0.50550, 0.40602,0.40281,0.47012,0.50510,0.23540,0.32045,1}, {0.59632, 1.08475, 1.02431, 1.07020, 0.90170, 0.97719, 0.95464, 0.92764, 0.86721, 0.85986, 0.64558, 0.80631, 0.82673, 0.82888, 0.87122, 0.77245, 0.29771, 0.43477, 0.55321, 0.61027, 0.56111, 0.57292, 0.39737,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1},{1.808065416202085, 1.754544945430673,1.902272019362616, 1.790054645392961, 1.563204092967629, 1.585258289348813, 1.579349443720310, 1.570650121437345, 1.545055626608596, 1.362229442426877, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33, 1,1,1,1,1,1,1},{0.77532, 1.07544, 1.10571, 1.04099, 0.91638, 0.88644, 0.96405, 0.86709, 0.94066, 0.84430, 1.24478, 1.09665, 1.42604, 0.79541, 0.71847, 0.71604, 0.74561, 0.36431, 0.41536, 0.52175, 0.47096, 0.49977, 0.59728,1}};
double beta2_dlsch_MI[6][MCS_COUNT] = { {1.36875, 0.59304, 0.53870, 0.98239, 0.81637, 0.76847, 0.69842, 0.69885, 0.69967, 0.69826, 0.82660, 0.70559, 0.78404, 0.70670, 0.55393, 0.36893, 0.52225, 0.39752, 0.40494, 0.46239, 0.49247,0.26900,0.34504,1}, {0.43775, 0.78208, 0.72875, 0.77458, 0.64485, 0.69174, 0.66097, 0.63289, 0.59652, 0.61175, 0.44551, 0.56047, 0.57314, 0.57553, 0.58849, 0.52159, 0.21241, 0.30139, 0.37373, 0.32029, 0.37067, 0.36706, 0.27118,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1,1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1},{1.079518113138858, 1.105622953570353, 1.031337449900606, 1.073342032668810, 1.242636589110353, 1.255054927783647, 1.291463834317768, 1.317048698347491, 1.354485054187984, 0.338534029291017, 1.85, 1.79, 1.65, 1.54, 1.46, 1.39, 1.33,1, 1,1,1,1,1,1},{0.54448, 0.73731, 0.79165, 0.74407, 0.68042, 0.64906, 0.71349, 0.62109, 0.65815, 0.60940, 0.90549, 0.78708, 1.03176, 0.58431, 0.53379, 0.51224, 0.52767, 0.26848, 0.29642, 0.36879, 0.34148, 0.35279,0.40633,1}};
*/
//ideal channel estimation values
//double beta1_dlsch[6][MCS_COUNT] = { {2.3814, 0.4956, 0.5273, 1.1708, 0.8014, 0.7889, 0.8111, 0.8139, 0.8124, 0.8479, 1.9280, 1.9664, 2.3857, 2.5147, 2.4511, 3.0158, 2.8643, 5.3013, 5.8594, 6.5372, 7.8073, 7.8030, 7.5295, 7.1320}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
//double beta2_dlsch[6][MCS_COUNT] = { {2.3639, 0.4952, 0.5207, 1.1572, 0.8026, 0.7864, 0.7996, 0.8034, 0.8200, 0.8367, 1.8701, 1.9212, 2.2947, 2.4472, 2.4091, 2.9479, 2.8973, 5.0591, 5.5134, 6.1483, 7.2166, 7.5177, 7.5704, 7.2248}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
const double beta1_dlsch[6][MCS_COUNT] = { {1.199175, 1.085656, 0.983872, 0.843789, 0.816093, 0.853078, 0.899236, 0.919665, 0.888673, 0.924181, 0.814176, 0.794108, 0.770653, 0.826266, 0.982043, 0.979621, 0.985176, 0.901741, 0.870311, 0.911303, 0.898923, 1.003359, 0.988535, 1.030639, 1.151038, 1.116939, 1.214118, 1.219148}, {0.5146, 0.5549, 0.7405, 0.6913, 0.7349, 0.7000, 0.7539, 0.7955, 0.8074, 0.7760, 1.8150, 1.6561, 1.9280, 2.3563, 2.6699, 2.3086, 3.1601, 4.5316, 5.2870, 6.0983, 6.5635, 7.7024, 9.9592, 6.6173}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79358, 1.17908, 2.02600, 1.72040, 1.58618, 1.59039, 1.68111, 1.67062, 1.64911, 1.33274, 4.87800, 3.58797, 3.72338, 5.35700, 2.81752, 1.93472, 2.23259, 1,1,1,1,1,1,1}, {0.4445, 0.5918, 0.7118, 0.7115, 0.7284, 0.7202, 0.7117, 0.8111, 0.8239, 0.7907, 1.8456, 1.8144, 2.3830, 2.6634, 2.6129, 2.8127, 2.7372, 4.9424, 4.8763, 6.8413, 7.1493, 9.4180, 10.1230, 8.9613}};
const double beta2_dlsch[6][MCS_COUNT] = { {0.534622, 0.596561, 0.500838, 0.471721, 0.548218, 0.547974, 0.924245, 0.836484, 0.776917, 0.879691, 0.875722, 0.666933, 0.666393, 0.755377, 1.074985, 1.080290, 1.010914, 0.790892, 0.793435, 0.860249, 0.901508, 0.967060, 0.951372, 1.011493, 1.106151, 1.117076, 1.209397, 1.227790}, {0.5113, 0.5600, 0.7359, 0.6860, 0.7344, 0.6902, 0.7315, 0.7660, 0.7817, 0.7315, 1.7268, 1.5912, 1.8519, 2.2115, 2.4580, 2.1879, 2.9015, 4.1543, 4.6986, 5.3193, 5.6319, 6.5640, 8.2421, 5.6393}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.79479, 0.52872, 0.90005, 0.77170, 0.73220, 0.72060, 0.75433, 0.75451, 0.75989, 0.67655, 1.68525, 1.31100, 1.46573, 1.99843, 1.57293, 1.62852, 2.10636, 1,1,1,1,1,1,1}, {0.4398, 0.5823, 0.7094, 0.7043, 0.7282, 0.7041, 0.6979, 0.7762, 0.7871, 0.7469, 1.7752, 1.7443, 2.2266, 2.4767, 2.4146, 2.6040, 2.5708, 4.4488, 4.4944, 5.9630, 6.3740, 8.1097, 8.4210, 7.8027}};
//real channel estimation valus
/*
double beta1_dlsch[6][MCS_COUNT] = { {2.50200, 0.84047, 0.78195, 1.37929, 1.16871, 1.11906, 1.06303, 1.07447, 1.11403, 1.09223, 2.82502, 2.87556, 3.51254, 3.62920, 3.53638, 2.35980, 3.74126, 8.66532, 7.31772, 9.86882, 10.64939, 6.75208, 9.50664, 13.63057}, {0.92257, 1, 1.80445, 1.43175, 1.42093, 1.37381, 1.45392, 1.47255, 1.47451, 1.41235, 3.9079, 3.38557, 4.13059, 4.93355, 4.97277, 6.04951, 5.88896, 8.68076, 10.23746, 12.37069, 5.50538, 17.29612, 17.95050, 13.27095}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {1.79255, 1.88213, 4.44226, 2.25150, 1.93710, 2.18504, 2.57389, 1.94322, 1.78515, 2.09265, 2.37459, 1.74442, 1.74346, 1.19705, 1.56149, 1.59604, 1.6, 1,1,1,1,1,1,1}, {0.93374, 1.40389, 1.36670, 1.38679, 1.35707, 1.26353, 1.32360, 1.40164, 1.51843, 1.34863, 3.45839, 3.13726, 3.94768, 4.21966, 4.60750, 4.97894, 5.40755, 8.12814, 10.59221, 12.96427, 13.37323, 14.27206, 16.61779, 17.19656}};
double beta2_dlsch[6][MCS_COUNT] = { {2.52163, 0.83231, 0.77472, 1.36536, 1.16829, 1.11186, 1.06287, 1.07292, 1.09946, 1.10650, 2.79174, 2.75655, 3.36651, 3.49011, 3.60903, 2.73517, 3.84009, 8.20312, 7.41739, 9.64081, 10.40911, 8.11765, 10.41923, 9.34300}, {0.67252, 0.8600, 1.28633, 1.01624, 1.03066, 0.97590, 1.02560, 1.01840, 1.00547, 0.97093, 2.72573, 2.33283, 2.86181, 3.40452, 3.47957, 4.08916, 3.97628, 6.14541, 7.11017, 8.42369, 4.04812, 11.42082, 11.57171, 9.28462}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1,1}, {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,1,1,1,1,1}, {0.85784, 0.90361, 2.09766, 1.08385, 0.96300, 1.04432, 1.22763, 0.99249, 0.95544, 1.12333, 1.37924, 1.12913, 1.30644, 1.19253, 1.75488, 2.13813, 2.10636, 1,1,1,1,1,1,1}, {0.66288, 0.96402, 0.98545, 0.99386, 0.99981, 0.92678, 0.98978, 0.99600, 1.05538, 0.97777, 2.52504, 2.29338, 2.89631, 3.10812, 3.41916, 3.58671, 3.84166, 6.05254, 7.45821, 9.15812, 9.66330, 10.17852, 11.50519, 11.16299}};
*/
const char NB_functions[7][20]={"eNodeB_3GPP","eNodeB_3GPP_BBU","NGFI_RAU_IF4p5","NGFI_RRU_IF5","NGFI_RRU_IF4p5","gNodeB_3GPP",};
const char NB_timing[2][20]={"synch_to_ext_device","synch_to_other"};
const char ru_if_types[MAX_RU_IF_TYPES][20]={"local RF","IF5 RRU","IF5 Mobipass","IF4p5 RRU","IF1pp RRU"};
/// lookup table for unscrambling in RX
int16_t unscrambling_lut[65536*16] __attribute__((aligned(32)));
/// lookup table for scrambling in TX
uint8_t scrambling_lut[65536*16] __attribute__((aligned(32)));
uint8_t max_turbo_iterations=4;
#endif /* __PHY_VARS_UE__H__ */
+1 -1
View File
@@ -1014,7 +1014,7 @@ void schedule_response(Sched_Rsp_t *Sched_INFO, void *arg) {
UL_req->ul_config_request_body.number_of_pdus=0;
number_ul_pdu=0;
}else if (RC.mac[Mod_id]->scheduler_mode == SCHED_MODE_FAIR_RR) {
if(ulsch_pdu_num <= RC.rrc[Mod_id]->configuration.radioresourceconfig[CC_id].ue_multiple_max){
if(ulsch_pdu_num <= fp->ue_multiple_max){
UL_req->sfn_sf = frame << 4 | subframe;
oai_nfapi_ul_config_req(UL_req);
UL_req->ul_config_request_body.number_of_pdus=0;
-53
View File
@@ -46,10 +46,6 @@
#include <time.h>
#include "intertask_interface.h"
#define MBMS_NFAPI_SCHEDULER
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
@@ -122,7 +118,6 @@ lte_subframe_t get_subframe_direction(uint8_t Mod_id,uint8_t CC_id,uint8_t subfr
return(subframe_select(&RC.eNB[Mod_id][CC_id]->frame_parms,subframe));
}
#ifdef MBMS_NFAPI_SCHEDULER
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, int fembms_flag) {
int subframe = proc->subframe_tx;
// This is DL-Cell spec pilots in Control region
@@ -151,46 +146,6 @@ void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, int fembms_flag) {
}
eNB->dlsch_MCH->active = 0;
}
#else
void pmch_procedures(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc) {
MCH_PDU *mch_pduP=NULL;
// uint8_t sync_area=255;
int subframe = proc->subframe_tx;
AssertFatal (1 == 1, "pmch not tested for the moment, exiting\n");
// This is DL-Cell spec pilots in Control region
generate_pilots_slot (eNB, eNB->common_vars.txdataF, AMP, subframe << 1, 1);
// if mcch is active, send regardless of the node type: eNB or RN
// when mcch is active, MAC sched does not allow MCCH and MTCH multiplexing
/*
mch_pduP = mac_xface->get_mch_sdu(eNB->Mod_id,
eNB->CC_id,
proc->frame_tx,
subframe);
*/
mch_pduP= &RC.mac[eNB->Mod_id]->common_channels[eNB->CC_id].MCH_pdu;
if ((mch_pduP->Pdu_size > 0) && (mch_pduP->sync_area == 0)) // TEST: only transmit mcch for sync area 0
LOG_D(PHY,"[eNB%"PRIu8"] Frame %d subframe %d : Got MCH pdu for MBSFN (MCS %"PRIu8", TBS %d) \n",
eNB->Mod_id,proc->frame_tx,subframe,mch_pduP->mcs,
eNB->dlsch_MCH->harq_processes[0]->TBS>>3);
else {
LOG_D(PHY,"[DeNB %"PRIu8"] Frame %d subframe %d : Do not transmit MCH pdu for MBSFN sync area %"PRIu8" (%s)\n",
eNB->Mod_id,proc->frame_tx,subframe,mch_pduP->sync_area,
(mch_pduP->Pdu_size == 0)? "Empty MCH PDU":"Let RN transmit for the moment");
mch_pduP = NULL;
}
if (mch_pduP) {
fill_eNB_dlsch_MCH (eNB, mch_pduP->mcs, 1, 0);
eNB->dlsch_MCH->harq_ids[proc->frame_tx%2][subframe] = 0;
eNB->dlsch_MCH->harq_processes[0]->pdu=(uint8_t *) mch_pduP->payload;
// Generate PMCH
generate_mch (eNB, proc, NULL/*(uint8_t *) mch_pduP->payload*/);
} else {
LOG_D (PHY, "[eNB/RN] Frame %d subframe %d: MCH not generated \n", proc->frame_tx, subframe);
}
}
#endif
void common_signal_procedures_fembms (PHY_VARS_eNB *eNB,int frame, int subframe) {
LTE_DL_FRAME_PARMS *fp=&eNB->frame_parms;
@@ -507,11 +462,9 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) {
if (is_fembms_pmch_subframe(frame,subframe,fp)) {
#ifdef MBMS_NFAPI_SCHEDULER
pmch_procedures(eNB,proc,1);
LOG_D(MAC,"frame %d, subframe %d -> PMCH\n",frame,subframe);
return;
#endif
}else if(is_fembms_cas_subframe(frame,subframe,fp) || is_fembms_nonMBSFN_subframe(frame,subframe,fp)){
LOG_D(MAC,"frame %d, subframe %d -> CAS\n",frame,subframe);
common_signal_procedures_fembms(eNB,proc->frame_tx, proc->subframe_tx);
@@ -520,11 +473,7 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
if((!is_fembms_cas_subframe(frame,subframe,fp)) && (!is_fembms_nonMBSFN_subframe(frame,subframe,fp))){
if (is_pmch_subframe(frame,subframe,fp)) {
#ifdef MBMS_NFAPI_SCHEDULER
pmch_procedures(eNB,proc,0);
#else
pmch_procedures(eNB,proc);
#endif
} else {
// this is not a pmch subframe, so generate PSS/SSS/PBCH
common_signal_procedures(eNB,proc->frame_tx, proc->subframe_tx);
@@ -617,10 +566,8 @@ void phy_procedures_eNB_TX(PHY_VARS_eNB *eNB,
if (NFAPI_MODE==NFAPI_MONOLITHIC || NFAPI_MODE==NFAPI_MODE_PNF) {
if (is_fembms_pmch_subframe(frame,subframe,fp)) {
#ifdef MBMS_NFAPI_SCHEDULER
pmch_procedures(eNB,proc,1);
return;
#endif
}else if(is_fembms_cas_subframe(frame,subframe,fp)){
common_signal_procedures_fembms(eNB,proc->frame_tx, proc->subframe_tx);
}
-2
View File
@@ -43,8 +43,6 @@
#include <time.h>
#include "intertask_interface.h"
extern uint8_t nfapi_mode;
uint8_t get_nr_prach_duration(uint8_t prach_format){
+2 -3
View File
@@ -31,20 +31,19 @@
#include "fapi_nr_l1.h"
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
#include "T.h"
#include "executables/nr-softmodem.h"
#include "executables/softmodem-common.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "NR_SRS-ResourceSet.h"
#include "assertions.h"
#include <time.h>
#include "intertask_interface.h"
//#define DEBUG_RXDATA
//#define SRS_IND_DEBUG
-1
View File
@@ -29,7 +29,6 @@
#define __openair_SCHED_NR_DEFS_H__
#include "PHY/defs_gNB.h"
#include "PHY_INTERFACE/phy_interface.h"
#include "PHY/NR_TRANSPORT/nr_dci.h"
#include "phy_frame_config_nr.h"
+1 -1
View File
@@ -39,7 +39,7 @@
#include "PHY/NR_REFSIG/dmrs_nr.h"
#include "PHY/phy_extern_nr_ue.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_TRANSPORT/srs_modulation_nr.h"
+1 -1
View File
@@ -68,7 +68,7 @@
#define NS_PER_SLOT 500000
char mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"};
static const char mode_string[4][20] = {"NOT SYNCHED","PRACH","RAR","PUSCH"};
extern double cpuf;
+1 -2
View File
@@ -35,6 +35,7 @@
#include "PHY/defs_UE.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "nfapi/oai_integration/vendor_ext.h"
@@ -62,8 +63,6 @@ int16_t get_hundred_times_delta_IF(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t harq_p
uint8_t alpha_lut[8] = {0,40,50,60,70,80,90,100};
void pusch_power_cntl(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,uint8_t j, uint8_t abstraction_flag) {
uint8_t harq_pid = subframe2harq_pid(&ue->frame_parms,
proc->frame_tx,
+1
View File
@@ -33,6 +33,7 @@
#include "PHY/defs_UE.h"
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "openair1/SCHED/sched_common_extern.h"
@@ -1,580 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
/*! \file bypass_session_layer.h
* \brief implementation of emultor tx and rx
* \author Navid Nikaein and Raymond Knopp
* \date 2011 - 2014
* \version 1.0
* \company Eurecom
* \email: navid.nikaein@eurecom.fr
*/
#include "PHY/defs.h"
#include "defs.h"
#include "proto.h"
#include "extern.h"
#include "assertions.h"
#include "UTIL/OCG/OCG.h"
#include "UTIL/OCG/OCG_extern.h"
#include "UTIL/LOG/log.h"
#include "multicast_link.h"
#include "openair1/SIMULATION/ETH_TRANSPORT/extern.h"
char rx_bufferP[BYPASS_RX_BUFFER_SIZE];
unsigned int num_bytesP = 0;
int N_P = 0, N_R = 0;
char bypass_tx_buffer[BYPASS_TX_BUFFER_SIZE];
static unsigned int byte_tx_count;
unsigned int Master_list_rx;
static uint64_t seq_num_tx = 0;
mapping transport_names[] = {
{"WAIT PM TRANSPORT INFO", EMU_TRANSPORT_INFO_WAIT_PM},
{"WAIT SM TRANSPORT INFO", EMU_TRANSPORT_INFO_WAIT_SM},
{"SYNC TRANSPORT INFO", EMU_TRANSPORT_INFO_SYNC},
{"ENB_TRANSPORT INFO", EMU_TRANSPORT_INFO_ENB},
{"UE TRANSPORT INFO", EMU_TRANSPORT_INFO_UE},
{"RELEASE TRANSPORT INFO", EMU_TRANSPORT_INFO_RELEASE},
{NULL, -1}
};
static pthread_mutex_t emul_low_mutex;
static pthread_mutex_t emul_low_mutex;
static pthread_cond_t emul_low_cond;
static char emul_low_mutex_var;
void init_bypass (void)
{
LOG_I(EMU, "[PHYSIM] INIT BYPASS\n");
#if !defined(ENABLE_NEW_MULTICAST)
pthread_mutex_init (&Tx_mutex, NULL);
pthread_cond_init (&Tx_cond, NULL);
Tx_mutex_var = 1;
pthread_mutex_init (&emul_low_mutex, NULL);
pthread_cond_init (&emul_low_cond, NULL);
emul_low_mutex_var = 1;
#endif
bypass_init (emul_tx_handler, emul_rx_handler);
}
/***************************************************************************/
void bypass_init (tx_handler_t tx_handlerP, rx_handler_t rx_handlerP)
{
/***************************************************************************/
multicast_link_start (bypass_rx_handler, oai_emulation.info.multicast_group,
oai_emulation.info.multicast_ifname);
tx_handler = tx_handlerP;
rx_handler = rx_handlerP;
Master_list_rx=0;
emu_tx_status = WAIT_SYNC_TRANSPORT;
emu_rx_status = WAIT_SYNC_TRANSPORT;
}
int emu_transport_handle_sync(bypass_msg_header_t *messg)
{
int m_id;
DevAssert(messg != NULL);
// determite the total number of remote enb & ue
oai_emulation.info.nb_enb_remote += messg->nb_enb;
oai_emulation.info.nb_ue_remote += messg->nb_ue;
// determine the index of local enb and ue wrt the remote ones
if (messg->master_id < oai_emulation.info.master_id) {
oai_emulation.info.first_enb_local +=messg->nb_enb;
oai_emulation.info.first_ue_local +=messg->nb_ue;
}
// store param for enb per master
if ((oai_emulation.info.master[messg->master_id].nb_enb = messg->nb_enb) > 0) {
for (m_id=0; m_id < messg->master_id; m_id++ ) {
oai_emulation.info.master[messg->master_id].first_enb+=oai_emulation.info.master[m_id].nb_enb;
}
LOG_I(EMU,
"[ENB] WAIT_SYNC_TRANSPORT state: for master %d (first enb %d, totan enb %d)\n",
messg->master_id,
oai_emulation.info.master[messg->master_id].first_enb,
oai_emulation.info.master[messg->master_id].nb_enb);
}
// store param for ue per master
if ((oai_emulation.info.master[messg->master_id].nb_ue = messg->nb_ue) > 0) {
for (m_id=0; m_id < messg->master_id; m_id++ ) {
oai_emulation.info.master[messg->master_id].first_ue+=oai_emulation.info.master[m_id].nb_ue;
}
LOG_I(EMU,
"[UE] WAIT_SYNC_TRANSPORT state: for master %d (first ue %d, total ue%d)\n",
messg->master_id,
oai_emulation.info.master[messg->master_id].first_ue,
oai_emulation.info.master[messg->master_id].nb_ue );
}
Master_list_rx=((Master_list_rx) |(1<< messg->master_id));
if (Master_list_rx == oai_emulation.info.master_list) {
emu_rx_status = SYNCED_TRANSPORT;
}
LOG_I(EMU,
"WAIT_SYNC_TRANSPORT state: m_id %d total enb remote %d total ue remote %d \n",
messg->master_id,oai_emulation.info.nb_enb_remote,
oai_emulation.info.nb_ue_remote );
return 0;
}
int emu_transport_handle_wait_sm(bypass_msg_header_t *messg)
{
DevAssert(messg != NULL);
Master_list_rx = ((Master_list_rx) | (1 << messg->master_id));
return 0;
}
int emu_transport_handle_wait_pm(bypass_msg_header_t *messg)
{
DevAssert(messg != NULL);
if (messg->master_id == 0) {
Master_list_rx = ((Master_list_rx) | (1 << messg->master_id));
}
return 0;
}
static
int emu_transport_handle_enb_info(bypass_msg_header_t *messg,
unsigned int next_slot,
int bytes_read)
{
eNB_transport_info_t *eNB_info;
int total_header = 0, total_tbs = 0;
int n_dci, n_enb, enb_info_ix = 0,CC_id;
DevAssert(bytes_read >= 0);
DevAssert(messg != NULL);
#ifdef DEBUG_EMU
LOG_D(EMU," RX ENB_TRANSPORT INFO from master %d \n",messg->master_id);
#endif
clear_eNB_transport_info(oai_emulation.info.nb_enb_local+
oai_emulation.info.nb_enb_remote);
if (oai_emulation.info.master[messg->master_id].nb_enb > 0 ) {
total_header += sizeof(eNB_transport_info_t)-MAX_TRANSPORT_BLOCKS_BUFFER_SIZE;
eNB_info = (eNB_transport_info_t *) (&rx_bufferP[bytes_read]);
for (n_enb = oai_emulation.info.master[messg->master_id].first_enb;
n_enb < oai_emulation.info.master[messg->master_id].first_enb+
oai_emulation.info.master[messg->master_id].nb_enb;
n_enb ++) {
for (n_dci = 0; n_dci < (eNB_info[enb_info_ix].num_ue_spec_dci + eNB_info[enb_info_ix].num_common_dci); n_dci ++) {
total_tbs += eNB_info[enb_info_ix].tbs[n_dci];
}
enb_info_ix++;
if ((total_tbs + total_header) > MAX_TRANSPORT_BLOCKS_BUFFER_SIZE ) {
LOG_W(EMU,"RX eNB Transport buffer total size %d (header%d,tbs %d) \n",
total_header+total_tbs, total_header,total_tbs);
}
memcpy(&eNB_transport_info[n_enb], eNB_info, total_header + total_tbs);
/* Go to the next eNB info */
eNB_info = (eNB_transport_info_t *)((uintptr_t)eNB_info + total_header+
total_tbs);
bytes_read += (total_header + total_tbs);
}
for (n_enb = oai_emulation.info.master[messg->master_id].first_enb;
n_enb < oai_emulation.info.master[messg->master_id].first_enb +
oai_emulation.info.master[messg->master_id].nb_enb; n_enb ++)
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
fill_phy_enb_vars(n_enb, CC_id,next_slot);
}
} else {
LOG_T(EMU,"WAIT_ENB_TRANSPORT state: no enb transport info from master %d \n",
messg->master_id);
}
Master_list_rx=((Master_list_rx) |(1<< messg->master_id));
if (Master_list_rx == oai_emulation.info.master_list) {
emu_rx_status = SYNCED_TRANSPORT;
}
return 0;
}
static
int emu_transport_handle_ue_info(bypass_msg_header_t *messg,
unsigned int last_slot,
int bytes_read)
{
UE_transport_info_t *UE_info;
int n_ue, n_enb,CC_id=0;
int total_tbs = 0, total_header = 0, ue_info_ix =0;
DevAssert(bytes_read >= 0);
DevAssert(messg != NULL);
#ifdef DEBUG_EMU
LOG_D(EMU," RX UE TRANSPORT INFO from master %d\n",messg->master_id);
#endif
clear_UE_transport_info(oai_emulation.info.nb_ue_local+
oai_emulation.info.nb_ue_remote);
if (oai_emulation.info.master[messg->master_id].nb_ue > 0 ) {
total_header += sizeof(UE_transport_info_t)-MAX_TRANSPORT_BLOCKS_BUFFER_SIZE;
UE_info = (UE_transport_info_t *) (&rx_bufferP[bytes_read]);
// get the total size of the transport blocks
for (n_ue = oai_emulation.info.master[messg->master_id].first_ue;
n_ue < oai_emulation.info.master[messg->master_id].first_ue +
oai_emulation.info.master[messg->master_id].nb_ue; n_ue ++) {
total_tbs = 0;
for (n_enb = 0; n_enb < UE_info[ue_info_ix].num_eNB; n_enb ++) {
total_tbs += UE_info[ue_info_ix].tbs[n_enb];
}
ue_info_ix++;
if (total_tbs + total_header > MAX_TRANSPORT_BLOCKS_BUFFER_SIZE ) {
LOG_W(EMU,"RX [UE %d] Total size of buffer is %d (header%d,tbs %d) \n",
n_ue, total_header+total_tbs,total_header,total_tbs);
}
//#warning "CC id should be adjusted, set to zero for the moment"
memcpy(&UE_transport_info[n_ue][CC_id], UE_info, total_header + total_tbs);
/* Go to the next UE info */
UE_info = (UE_transport_info_t *)((uintptr_t)UE_info + total_header+
total_tbs);
bytes_read += (total_header + total_tbs);
}
for (n_ue = oai_emulation.info.master[messg->master_id].first_ue;
n_ue < oai_emulation.info.master[messg->master_id].first_ue +
oai_emulation.info.master[messg->master_id].nb_ue;
n_ue ++)
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
fill_phy_ue_vars(n_ue, CC_id,last_slot);
}
} else {
LOG_T(EMU,"WAIT_UE_TRANSPORT state: no UE transport info from master %d\n",
messg->master_id);
}
Master_list_rx=((Master_list_rx) |(1<< messg->master_id));
if (Master_list_rx == oai_emulation.info.master_list) {
emu_rx_status = SYNCED_TRANSPORT;
}
return 0;
}
int bypass_rx_data(unsigned int frame, unsigned int last_slot,
unsigned int next_slot, uint8_t is_master)
{
bypass_msg_header_t *messg;
bypass_proto2multicast_header_t *bypass_read_header;
int bytes_read = 0;
LOG_D(EMU, "Entering bypass_rx for frame %d next_slot %d is_master %u\n",
frame, next_slot, is_master);
#if defined(ENABLE_NEW_MULTICAST)
if (multicast_link_read_data_from_sock(is_master) == 1) {
/* We got a timeout */
return -1;
}
#else
pthread_mutex_lock(&emul_low_mutex);
if(emul_low_mutex_var) {
pthread_cond_wait(&emul_low_cond, &emul_low_mutex);
}
if(num_bytesP==0) {
pthread_mutex_unlock(&emul_low_mutex);
} else {
#endif
bypass_read_header = (bypass_proto2multicast_header_t *) (
&rx_bufferP[bytes_read]);
bytes_read += sizeof (bypass_proto2multicast_header_t);
if (num_bytesP != bytes_read + bypass_read_header->size) {
LOG_W(EMU, "WARNINIG BYTES2READ # DELIVERED BYTES!!! (%d != %d)\n",
num_bytesP, bytes_read + bypass_read_header->size);
exit(EXIT_FAILURE);
} else {
messg = (bypass_msg_header_t *) (&rx_bufferP[bytes_read]);
bytes_read += sizeof (bypass_msg_header_t);
#if defined(ENABLE_NEW_MULTICAST)
LOG_D(EMU, "Received %d bytes [%s] from master_id %d with seq %"PRIuMAX"\n",
num_bytesP, map_int_to_str(transport_names, messg->Message_type),
messg->master_id,
messg->seq_num);
DevCheck4((messg->frame == frame) && (messg->subframe == (next_slot>>1)),
messg->frame, frame, messg->subframe, next_slot>>1);
#else
if ((messg->frame != frame) || (messg->subframe != next_slot>>1))
LOG_W(EMU,
"Received %s from master %d for (frame %d,subframe %d) "
"currently (frame %d,subframe %d)\n",
map_int_to_str(transport_names,messg->Message_type),
messg->master_id,
messg->frame, messg->subframe,
frame, next_slot>>1);
#endif
//chek if MASTER in my List
switch(messg->Message_type) {
case EMU_TRANSPORT_INFO_WAIT_PM:
emu_transport_handle_wait_pm(messg);
break;
case EMU_TRANSPORT_INFO_WAIT_SM:
emu_transport_handle_wait_sm(messg);
break;
case EMU_TRANSPORT_INFO_SYNC:
emu_transport_handle_sync(messg);
break;
case EMU_TRANSPORT_INFO_ENB:
emu_transport_handle_enb_info(messg, next_slot, bytes_read);
break;
case EMU_TRANSPORT_INFO_UE:
emu_transport_handle_ue_info(messg, last_slot, bytes_read);
break;
case EMU_TRANSPORT_INFO_RELEASE :
Master_list_rx = oai_emulation.info.master_list;
LOG_E(EMU, "RX EMU_TRANSPORT_INFO_RELEASE\n");
break;
default:
LOG_E(EMU, "[MAC][BYPASS] ERROR RX UNKNOWN MESSAGE\n");
//mac_xface->macphy_exit("");
break;
}
}
num_bytesP=0;
#if !defined(ENABLE_NEW_MULTICAST)
emul_low_mutex_var=1;
pthread_cond_signal(&emul_low_cond);
pthread_mutex_unlock(&emul_low_mutex);
#endif
bypass_signal_mac_phy(frame, last_slot, next_slot, is_master);
#if !defined(ENABLE_NEW_MULTICAST)
}
#endif
return bytes_read;
}
/******************************************************************************************************/
void bypass_rx_handler(unsigned int Num_bytes,char *Rx_buffer)
{
/******************************************************************************************************/
if(Num_bytes >0) {
#if !defined(ENABLE_NEW_MULTICAST)
pthread_mutex_lock(&emul_low_mutex);
while(!emul_low_mutex_var) {
pthread_cond_wait(&emul_low_cond, &emul_low_mutex);
}
#endif
num_bytesP=Num_bytes;
memcpy(rx_bufferP, Rx_buffer, Num_bytes);
#if !defined(ENABLE_NEW_MULTICAST)
emul_low_mutex_var=0;
/* on ne peut que signaler depuis un context linux
* (rtf_handler); pas de wait, jamais!!!!!!
*/
pthread_cond_signal(&emul_low_cond);
pthread_mutex_unlock(&emul_low_mutex);
#endif
}
}
/******************************************************************************************************/
void bypass_signal_mac_phy(unsigned int frame, unsigned int last_slot,
unsigned int next_slot, uint8_t is_master)
{
/******************************************************************************************************/
if (Master_list_rx != oai_emulation.info.master_list) {
bypass_rx_data(frame, last_slot, next_slot, is_master);
} else {
Master_list_rx = 0;
}
}
/***************************************************************************/
void bypass_tx_data(emu_transport_info_t Type, unsigned int frame, unsigned int next_slot)
{
/***************************************************************************/
unsigned int num_flows;
bypass_msg_header_t *messg;
LOG_D(EMU, "Entering bypass_tx [%s] for frame %d next_slot %d\n",
map_int_to_str(transport_names, Type), frame, next_slot);
int n_enb,n_ue, CC_id,n_dci,total_tbs=0,total_size=0;
messg = (bypass_msg_header_t *) (
&bypass_tx_buffer[sizeof (bypass_proto2multicast_header_t)]);
num_flows = 0;
messg->master_id = oai_emulation.info.master_id; //Master_id;
messg->nb_enb = oai_emulation.info.nb_enb_local; //Master_id;
messg->nb_ue = oai_emulation.info.nb_ue_local; //Master_id;
messg->nb_flow = num_flows;
messg->frame = frame;
messg->subframe = next_slot>>1;
messg->seq_num = seq_num_tx;
messg->failing_master_id = 0;
seq_num_tx++;
byte_tx_count = sizeof (bypass_msg_header_t) + sizeof (
bypass_proto2multicast_header_t);
if (Type == WAIT_PM_TRANSPORT) {
messg->Message_type = EMU_TRANSPORT_INFO_WAIT_PM;
LOG_T(EMU,"[TX_DATA] WAIT SYNC PM TRANSPORT\n");
} else if (Type == WAIT_SM_TRANSPORT) {
messg->Message_type = EMU_TRANSPORT_INFO_WAIT_SM;
LOG_T(EMU,"[TX_DATA] WAIT SYNC SM TRANSPORT\n");
} else if (Type == SYNC_TRANSPORT) {
messg->Message_type = EMU_TRANSPORT_INFO_SYNC;
/* make sure that sync messages from the masters are received in
* increasing order of master id
*/
sleep(oai_emulation.info.master_id+1);
LOG_T(EMU,"[TX_DATA] SYNC TRANSPORT\n");
} else if(Type==ENB_TRANSPORT) {
messg->Message_type = EMU_TRANSPORT_INFO_ENB;
total_size=0;
total_tbs=0;
for (n_enb=oai_emulation.info.first_enb_local;
n_enb<(oai_emulation.info.first_enb_local+oai_emulation.info.nb_enb_local);
n_enb++)
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
total_tbs=0;
LOG_D(EMU,"[TX_DATA] Frame %d subframe %d CC id %d : ENB TRANSPORT: num dci %d \n",
frame, next_slot>>1, CC_id,
eNB_transport_info[n_enb][CC_id].num_pmch +
eNB_transport_info[n_enb][CC_id].num_ue_spec_dci +
eNB_transport_info[n_enb][CC_id].num_common_dci );
for (n_dci = 0; n_dci < (eNB_transport_info[n_enb][CC_id].num_pmch +
eNB_transport_info[n_enb][CC_id].num_ue_spec_dci +
eNB_transport_info[n_enb][CC_id].num_common_dci);
n_dci++) {
total_tbs +=eNB_transport_info[n_enb][CC_id].tbs[n_dci];
}
if (total_tbs <= MAX_TRANSPORT_BLOCKS_BUFFER_SIZE) {
total_size = sizeof(eNB_transport_info_t) + total_tbs -
MAX_TRANSPORT_BLOCKS_BUFFER_SIZE;
} else {
LOG_E(EMU,
"[eNB]running out of memory for the eNB emulation transport buffer of size %d\n",
MAX_TRANSPORT_BLOCKS_BUFFER_SIZE);
}
memcpy(&bypass_tx_buffer[byte_tx_count], (char *)&eNB_transport_info[n_enb][CC_id],
total_size);
byte_tx_count += total_size;
}
} else if (Type == UE_TRANSPORT) {
LOG_D(EMU,"[TX_DATA] UE TRANSPORT\n");
messg->Message_type = EMU_TRANSPORT_INFO_UE;
total_size=0;
total_tbs=0; // compute the actual size of transport_blocks
for (n_ue = oai_emulation.info.first_ue_local;
n_ue < (oai_emulation.info.first_ue_local+oai_emulation.info.nb_ue_local);
n_ue++) {
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
for (n_enb=0; n_enb<UE_transport_info[n_ue][CC_id].num_eNB; n_enb++) {
total_tbs+=UE_transport_info[n_ue][CC_id].tbs[n_enb];
}
if (total_tbs <= MAX_TRANSPORT_BLOCKS_BUFFER_SIZE) {
total_size = sizeof(UE_transport_info_t)+total_tbs-
MAX_TRANSPORT_BLOCKS_BUFFER_SIZE;
} else {
LOG_E(EMU,
"[UE]running out of memory for the UE emulation transport buffer of size %d\n",
MAX_TRANSPORT_BLOCKS_BUFFER_SIZE);
}
#ifdef DEBUG_EMU
LOG_D(EMU,"[UE %d][eNB %d][CC %d] total size %d\n",
n_ue, n_enb, CC_id,total_size);
#endif
memcpy(&bypass_tx_buffer[byte_tx_count], (char *)&UE_transport_info[n_ue][CC_id],
total_size);
byte_tx_count += total_size;
}
}
} else if (Type == RELEASE_TRANSPORT) {
messg->Message_type = EMU_TRANSPORT_INFO_RELEASE;
} else {
LOG_E(EMU,"[TX_DATA] UNKNOWN MSG \n");
}
((bypass_proto2multicast_header_t *) bypass_tx_buffer)->size = byte_tx_count -
sizeof (bypass_proto2multicast_header_t);
multicast_link_write_sock(oai_emulation.info.multicast_group,
bypass_tx_buffer, byte_tx_count);
LOG_D(EMU, "Frame %d, subframe %d (%d): Sent %d bytes [%s] with master_id %d and seq %"PRIuMAX"\n",
frame, next_slot>>1, next_slot,byte_tx_count, map_int_to_str(transport_names, Type),
messg->master_id, messg->seq_num);
}
+1 -5
View File
@@ -54,6 +54,7 @@
#include "executables/lte-softmodem.h"
#include "common/ran_context.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "openair1/PHY/LTE_TRANSPORT/dlsch_tbs.h"
const char *__asan_default_options()
{
@@ -69,10 +70,8 @@ channel_desc_t *eNB2UE[NUMBER_OF_eNB_MAX][NUMBER_OF_UE_MAX];
channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX];
node_desc_t *enb_data[NUMBER_OF_eNB_MAX];
node_desc_t *ue_data[NUMBER_OF_UE_MAX];
//double sinr_bler_map[MCS_COUNT][2][16];
extern uint16_t beta_ack[16],beta_ri[16],beta_cqi[16];
//extern char* namepointer_chMag ;
THREAD_STRUCT thread_struct;
nfapi_ue_release_request_body_t release_rntis;
@@ -1005,14 +1004,11 @@ int main(int argc, char **argv) {
if (abstx) {
if (trials==0 && round==0 && SNR==snr0) { //generate a new channel
hold_channel = 0;
flagMag=0;
} else {
hold_channel = 1;
flagMag = 1;
}
} else {
hold_channel = 0;
flagMag=1;
}
///////////////////////////////////////
+9 -4
View File
@@ -35,7 +35,7 @@
#include "PHY/defs_nr_common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/types.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
@@ -46,10 +46,9 @@
#include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h"
#include "executables/nr-uesoftmodem.h"
#include "nfapi/oai_integration/vendor_ext.h"
//#define DEBUG_NR_DLSCHSIM
@@ -73,8 +72,14 @@ PHY_VARS_NR_UE *PHY_vars_UE_g[1][1] = { { NULL } };
uint16_t n_rnti = 0x1234;
openair0_config_t openair0_cfg[MAX_CARDS];
uint64_t get_softmodem_optmask(void) {return 0;}
static softmodem_params_t softmodem_params;
softmodem_params_t *get_softmodem_params(void) {
return &softmodem_params;
}
void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); }
nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; }
nrUE_params_t nrUE_params={0};
+2 -71
View File
@@ -38,7 +38,7 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/phy_vars_nr_ue.h"
#include "PHY/types.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/MODULATION/modulation_UE.h"
@@ -89,7 +89,6 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
double cpuf;
char *uecap_file;
uint16_t sf_ahead=4 ;
uint16_t sl_ahead=0;
//uint8_t nfapi_mode = 0;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
@@ -104,21 +103,7 @@ int nr_derive_key_ng_ran_star(uint16_t pci, uint64_t nr_arfcn_dl, const uint8_t
return 0;
}
// dummy functions
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
const int CC_id,
const uint8_t gNB_index,
const frame_t frame,
const sub_frame_t sub_frame,
const rnti_t rnti,
const channel_t channel,
const uint8_t* pduP,
const sdu_size_t pdu_len)
{
return 0;
}
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB_index)
{
@@ -135,70 +120,16 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
return 0;
}
void
rrc_data_ind(
const protocol_ctxt_t *const ctxt_pP,
const rb_id_t Srb_id,
const sdu_size_t sdu_sizeP,
const uint8_t *const buffer_pP
)
{
}
int nr_derive_key(int alg_type, uint8_t alg_id,
const uint8_t key[32], uint8_t **out)
{
return 0;
}
void config_common(int Mod_idP,
int pdsch_AntennaPorts,
int pusch_AntennaPorts,
NR_ServingCellConfigCommon_t *scc);
int generate_dlsch_header(unsigned char *mac_header,
unsigned char num_sdus,
unsigned short *sdu_lengths,
unsigned char *sdu_lcids,
unsigned char drx_cmd,
unsigned short timing_advance_cmd,
unsigned char *ue_cont_res_id,
unsigned char short_padding,
unsigned short post_padding){return 0;}
// Dummy function to avoid linking error at compilation of nr-dlsim
int is_x2ap_enabled(void)
{
return 0;
}
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP,
const uint8_t *sduP,
sdu_size_t sdu_lenP,
const uint8_t *sdu2P,
sdu_size_t sdu2_lenP) {
return 0;
}
void processSlotTX(void *arg) {}
nr_bler_struct nr_bler_data[NR_NUM_MCS];
//nFAPI P7 dummy functions to avoid linking errors
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); }
int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); }
int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); }
int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); }
int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); }
int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); }
int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); }
int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); }
int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); }
// needed for some functions
openair0_config_t openair0_cfg[MAX_CARDS];
void update_ptrs_config(NR_CellGroupConfig_t *secondaryCellGroup, uint16_t *rbSize, uint8_t *mcsIndex,int8_t *ptrs_arg);
+39 -83
View File
@@ -1,89 +1,45 @@
#include "nfapi/oai_integration/vendor_ext.h"
#include "nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h"
#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h"
#include "openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.h"
#include "openair1/PHY/defs_nr_UE.h"
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return(0); }
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); }
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); }
//int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); }
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req)
{
return (0);
}
int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req)
{
return (0);
}
int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req)
{
return (0);
}
int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req)
{
return (0);
}
int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind)
{
return (0);
}
int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind)
{
return (0);
}
int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind)
{
return (0);
}
int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind)
{
return (0);
}
int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind)
{
return (0);
}
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return (0); }
int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req) { return (0); }
int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req) { return (0); }
int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req) { return (0); }
int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return (0); }
int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return (0); }
int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return (0); }
int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return (0); }
int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return 0; }
int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen)
{
return 0;
}
int pack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen)
{
return 0;
}
int pack_nr_srs_beamforming_report(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { return 0; }
int unpack_nr_srs_beamforming_report(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) { return 0; }
int pack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen) { return 0; }
int unpack_nr_srs_normalized_channel_iq_matrix(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen) { return 0; }
int32_t get_uldl_offset(int nr_bandP)
{
return (0);
}
NR_IF_Module_t *NR_IF_Module_init(int Mod_id)
{
return (NULL);
}
nfapi_mode_t nfapi_mod;
nfapi_mode_t nfapi_getmode(void)
{
return nfapi_mod;
}
void nfapi_setmode(nfapi_mode_t nfapi_mode)
{
}
int32_t get_uldl_offset(int nr_bandP) { return (0); }
int dummy_nr_ue_dl_indication(nr_downlink_indication_t *dl_info)
{
return (0);
}
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
fapi_nr_dci_indication_t *dci_ind,
fapi_nr_rx_indication_t *rx_ind,
UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *ue,
void *phy_data) {}
void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
uint8_t pdu_type,
PHY_VARS_NR_UE *ue,
NR_UE_DLSCH_t *dlsch0,
NR_UE_DLSCH_t *dlsch1,
uint16_t n_pdus,
UE_nr_rxtx_proc_t *proc,
void *typeSpecific ) {}
void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) {}
void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) {}
int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packedBufLen, nfapi_p7_codec_config_t* config) { return 0; }
int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t* config) { return 0; }
int nfapi_p7_message_header_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t *config) { return 0; }
void rrc_data_ind(const protocol_ctxt_t *const ctxt_pP,
const rb_id_t Srb_id,
const sdu_size_t sdu_sizeP,
const uint8_t *const buffer_pP) { }
typedef uint32_t channel_t;
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
const int CC_id,
const uint8_t gNB_index,
const frame_t frame,
const sub_frame_t sub_frame,
const rnti_t rnti,
const channel_t channel,
const uint8_t* pduP,
const sdu_size_t pdu_len) { return 0; }
@@ -1,20 +0,0 @@
int oai_nfapi_hi_dci0_req(nfapi_hi_dci0_request_t *hi_dci0_req) { return(0); }
int oai_nfapi_tx_req(nfapi_tx_request_t *tx_req) { return(0); }
int oai_nfapi_dl_config_req(nfapi_dl_config_request_t *dl_config_req) { return(0); }
int oai_nfapi_ul_config_req(nfapi_ul_config_request_t *ul_config_req) { return(0); }
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); }
int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); }
int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); }
int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); }
int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); }
int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); }
int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); }
int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); }
int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); }
int32_t get_uldl_offset(int nr_bandP) { return(0); }
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) {return(NULL);}
int dummy_nr_ue_dl_indication(nr_downlink_indication_t *dl_info) { return(0); }
int dummy_nr_ue_ul_indication(nr_uplink_indication_t *ul_info) { return(0); }
+3 -4
View File
@@ -33,6 +33,9 @@
#ifndef __NR_UNITARY_DEFS__H__
#define __NR_UNITARY_DEFS__H__
#include "NR_ServingCellConfigCommon.h"
#include "NR_ServingCellConfig.h"
int oai_exit=0;
void exit_function(const char* file, const char* function, const int line, const char *s, const int assert) {
@@ -64,9 +67,5 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap);
void prepare_scc(NR_ServingCellConfigCommon_t *scc);
void prepare_scd(NR_ServingCellConfig_t *scd);
uint32_t ngap_generate_gNB_id(void) {return 0;}
void configure_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { return;}
void configure_nfapi_vnf(char *vnf_addr, int vnf_p5_port) { return;}
void configure_nr_nfapi_pnf(char *vnf_ip_addr, int vnf_p5_port, char *pnf_ip_addr, int pnf_p7_port, int vnf_p7_port) { return;}
void configure_nr_nfapi_vnf(char *vnf_addr, int vnf_p5_port) { return;}
#endif
+19 -2
View File
@@ -38,7 +38,7 @@
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
@@ -47,10 +47,10 @@
#include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "openair1/PHY/MODULATION/nr_modulation.h"
#include <executables/softmodem-common.h>
#include <executables/nr-uesoftmodem.h>
#include "nfapi/oai_integration/vendor_ext.h"
//#define DEBUG_NR_PBCHSIM
PHY_VARS_gNB *gNB;
@@ -80,6 +80,23 @@ nrUE_params_t *get_nrUE_params(void) {
}
void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); }
nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; }
void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
fapi_nr_dci_indication_t *dci_ind,
fapi_nr_rx_indication_t *rx_ind,
UE_nr_rxtx_proc_t *proc,
PHY_VARS_NR_UE *ue,
void *phy_data) {}
void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
uint8_t pdu_type,
PHY_VARS_NR_UE *ue,
NR_UE_DLSCH_t *dlsch0,
NR_UE_DLSCH_t *dlsch1,
uint16_t n_pdus,
UE_nr_rxtx_proc_t *proc,
void *typeSpecific ) {}
int nr_ue_pdcch_procedures(PHY_VARS_NR_UE *ue,
UE_nr_rxtx_proc_t *proc,
+5 -52
View File
@@ -41,7 +41,7 @@
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
@@ -51,9 +51,9 @@
#include <openair2/RRC/LTE/rrc_vars.h>
#include <executables/softmodem-common.h>
#include <openair2/RRC/NR_UE/rrc_defs.h>
//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "executables/nr-uesoftmodem.h"
#include "nfapi/oai_integration/vendor_ext.h"
#define NR_PRACH_DEBUG 1
#define PRACH_WRITE_OUTPUT_DEBUG 1
@@ -76,20 +76,13 @@ int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
uint16_t sl_ahead = 0;
uint32_t N_RB_DL = 106;
//void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); }
nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; }
void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) { }
/* temporary dummy implem of get_softmodem_optmask, till basic simulators implemented as device */
uint64_t get_softmodem_optmask(void) {return 0;}
softmodem_params_t *get_softmodem_params(void) {return 0;}
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); }
int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); }
int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); }
int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); }
int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); }
int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); }
int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); }
int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); }
int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); }
//Fixme: Uniq dirty DU instance, by global var, datamodel need better management
instance_t DUuniqInstance=0;
instance_t CUuniqInstance=0;
@@ -99,29 +92,6 @@ int nr_derive_key_ng_ran_star(uint16_t pci, uint64_t nr_arfcn_dl, const uint8_t
return 0;
}
void
rrc_data_ind(
const protocol_ctxt_t *const ctxt_pP,
const rb_id_t Srb_id,
const sdu_size_t sdu_sizeP,
const uint8_t *const buffer_pP
)
{
}
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
const int CC_id,
const uint8_t gNB_index,
const frame_t frame,
const sub_frame_t sub_frame,
const rnti_t rnti,
const channel_t channel,
const uint8_t* pduP,
const sdu_size_t pdu_len)
{
return 0;
}
void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB_index)
{
return;
@@ -137,29 +107,12 @@ int8_t nr_mac_rrc_data_req_ue(const module_id_t Mod_idP,
return 0;
}
// Dummy function to avoid linking error at compilation of nr-prachsim
int is_x2ap_enabled(void)
{
return 0;
}
int nr_derive_key(int alg_type, uint8_t alg_id,
const uint8_t key[32], uint8_t **out)
{
return 0;
}
int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
int CC_idP,
int UE_id,
rnti_t rntiP,
const uint8_t *sduP,
sdu_size_t sdu_lenP,
const uint8_t *sdu2P,
sdu_size_t sdu2_lenP) {
return 0;
}
nrUE_params_t nrUE_params;
nrUE_params_t *get_nrUE_params(void) {
+7 -2
View File
@@ -38,7 +38,7 @@
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/NR_ESTIMATION/nr_ul_estimation.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "PHY/NR_UE_TRANSPORT/pucch_nr.h"
@@ -46,8 +46,8 @@
#include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "executables/nr-uesoftmodem.h"
#include "nfapi/oai_integration/vendor_ext.h"
THREAD_STRUCT thread_struct;
PHY_VARS_gNB *gNB;
@@ -66,7 +66,12 @@ const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
// needed for some functions
PHY_VARS_NR_UE * PHY_vars_UE_g[1][1]={{NULL}};
uint64_t get_softmodem_optmask(void) {return 0;}
softmodem_params_t *get_softmodem_params(void) {return 0;}
void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); }
nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; }
nrUE_params_t nrUE_params={0};
+9 -2
View File
@@ -33,7 +33,7 @@
#include "PHY/defs_nr_common.h"
#include "PHY/defs_nr_UE.h"
#include "PHY/defs_gNB.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/MODULATION/modulation_eNB.h"
#include "PHY/MODULATION/modulation_UE.h"
@@ -45,10 +45,10 @@
#include "openair1/SIMULATION/TOOLS/sim.h"
#include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "common/utils/threadPool/thread-pool.h"
#include "openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.h"
#include "executables/nr-uesoftmodem.h"
#include "nfapi/oai_integration/vendor_ext.h"
//#define DEBUG_NR_ULSCHSIM
@@ -59,7 +59,14 @@ RAN_CONTEXT_t RC;
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
uint64_t downlink_frequency[MAX_NUM_CCs][4];
uint64_t get_softmodem_optmask(void) {return 0;}
static softmodem_params_t softmodem_params;
softmodem_params_t *get_softmodem_params(void) {
return &softmodem_params;
}
void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq) {}
NR_IF_Module_t *NR_IF_Module_init(int Mod_id) { return (NULL); }
nfapi_mode_t nfapi_getmode(void) { return NFAPI_MODE_UNKNOWN; }
uint8_t const nr_rv_round_map[4] = {0, 2, 3, 1};
const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
+1 -54
View File
@@ -35,7 +35,7 @@
#include "PHY/defs_nr_UE.h"
#include "PHY/phy_vars_nr_ue.h"
#include "PHY/types.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "PHY/MODULATION/modulation_UE.h"
#include "PHY/MODULATION/nr_modulation.h"
#include "PHY/NR_REFSIG/dmrs_nr.h"
@@ -54,7 +54,6 @@
#include "openair1/SIMULATION/RF/rf.h"
#include "openair1/SIMULATION/NR_PHY/nr_unitary_defs.h"
#include "openair2/RRC/NR/MESSAGES/asn1_msg.h"
//#include "openair1/SIMULATION/NR_PHY/nr_dummy_functions.c"
#include "openair2/LAYER2/NR_MAC_UE/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "common/utils/threadPool/thread-pool.h"
@@ -102,46 +101,6 @@ int nr_derive_key_ng_ran_star(uint16_t pci, uint64_t nr_arfcn_dl, const uint8_t
extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
const int CC_id,
const uint8_t gNB_index,
const frame_t frame,
const sub_frame_t sub_frame,
const rnti_t rnti,
const channel_t channel,
const uint8_t* pduP,
const sdu_size_t pdu_len)
{
return 0;
}
int generate_dlsch_header(unsigned char *mac_header,
unsigned char num_sdus,
unsigned short *sdu_lengths,
unsigned char *sdu_lcids,
unsigned char drx_cmd,
unsigned short timing_advance_cmd,
unsigned char *ue_cont_res_id,
unsigned char short_padding,
unsigned short post_padding){return 0;}
void
rrc_data_ind(
const protocol_ctxt_t *const ctxt_pP,
const rb_id_t Srb_id,
const sdu_size_t sdu_sizeP,
const uint8_t *const buffer_pP
)
{
}
// Dummy function to avoid linking error at compilation of nr-ulsim
int is_x2ap_enabled(void)
{
return 0;
}
void nr_rrc_ue_generate_RRCSetupRequest(module_id_t module_id, const uint8_t gNB_index)
{
return;
@@ -170,18 +129,6 @@ int DU_send_INITIAL_UL_RRC_MESSAGE_TRANSFER(module_id_t module_idP,
nr_bler_struct nr_bler_data[NR_NUM_MCS];
//nFAPI P7 dummy functions
int oai_nfapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req) { return(0); }
int oai_nfapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req){ return(0); }
int oai_nfapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req){ return(0); }
int oai_nfapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req){ return(0); }
int oai_nfapi_nr_rx_data_indication(nfapi_nr_rx_data_indication_t *ind) { return(0); }
int oai_nfapi_nr_crc_indication(nfapi_nr_crc_indication_t *ind) { return(0); }
int oai_nfapi_nr_srs_indication(nfapi_nr_srs_indication_t *ind) { return(0); }
int oai_nfapi_nr_uci_indication(nfapi_nr_uci_indication_t *ind) { return(0); }
int oai_nfapi_nr_rach_indication(nfapi_nr_rach_indication_t *ind) { return(0); }
int nr_derive_key(int alg_type, uint8_t alg_id,
const uint8_t key[32], uint8_t **out)
{
+1 -3
View File
@@ -33,13 +33,11 @@
#include "PHY/phy_extern.h"
#include "PHY/phy_extern_ue.h"
#include "LAYER2/MAC/mac.h"
#include "LAYER2/MAC/mac_extern.h"
#include "common/utils/LOG/log.h"
#include "RRC/LTE/rrc_extern.h"
#include "PHY_INTERFACE/phy_interface_extern.h"
#include "UTIL/OCG/OCG.h"
#include "UTIL/OPT/opt.h" // to test OPT
#include "common/ran_context.h"
#define RF
+1 -1
View File
@@ -3,5 +3,5 @@ add_subdirectory(MESSAGES)
add_library(e1ap e1ap.c e1ap_common.c e1ap_api.c)
target_link_libraries(e1ap
PUBLIC asn1_e1ap f1ap
PRIVATE asn1_nr_rrc asn1_lte_rrc asn1_f1ap UTIL e1_pdcp_if e1_if)
PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs asn1_f1ap UTIL e1_pdcp_if e1_if)
target_include_directories(e1ap PUBLIC ${CMAKE_CURRENT_DIR})
+1
View File
@@ -32,6 +32,7 @@
#include "common/utils/LOG/log.h"
#include "openair2/F1AP/f1ap_common.h"
#include "e1ap_default_values.h"
#include "gtp_itf.h"
#define E1AP_NUM_MSG_HANDLERS 14
typedef int (*e1ap_message_processing_t)(e1ap_upcp_inst_t *inst, const E1AP_E1AP_PDU_t *message_p);
@@ -37,6 +37,7 @@
#include "f1ap_cu_rrc_message_transfer.h"
#include "common/ran_context.h"
#include "openair3/UTILS/conversions.h"
#include "pdcp.h"
/*
Initial UL RRC Message Transfer
@@ -43,6 +43,7 @@
#include "rrc_eNB_GTPV1U.h"
#include "openair2/RRC/NR/rrc_gNB_NGAP.h"
#include <openair3/ocp-gtpu/gtp_itf.h>
#include "pdcp.h"
static void setQos(F1AP_NonDynamic5QIDescriptor_t *toFill) {
asn1cCalloc(toFill, tmp);
+2 -1
View File
@@ -50,10 +50,11 @@
// #include "SystemInformationBlockType2.h"
// #include "LAYER2/MAC/extern.h"
// #include "LAYER2/MAC/proto.h"
#include "PHY/INIT/phy_init.h"
#include "PHY/INIT/nr_phy_init.h"
#include "radio/ETHERNET/USERSPACE/LIB/ethernet_lib.h"
#include "nfapi_vnf.h"
#include "nfapi_pnf.h"
#include "pdcp.h"
//#include "L1_paramdef.h"
#include "prs_nr_paramdef.h"
+2
View File
@@ -162,6 +162,8 @@
#define U_PLANE_INACTIVITY_VALUE 0 /* defined 10ms order (zero means infinity) */
static const int cqi_to_mcs[16]= {0, 0, 1, 2, 4, 6, 8, 11, 13, 16, 18, 20, 23, 25, 27, 28};
/*
* eNB part
*/
+1
View File
@@ -806,6 +806,7 @@ void rr_ul_unset(void **data) {
free(*data);
*data = NULL;
}
#define MAX(a, b) (((a)>(b))?(a):(b))
int rr_ul_run(module_id_t Mod_id,
int CC_id,
int frame,
+1
View File
@@ -37,6 +37,7 @@
#include "LAYER2/NR_MAC_COMMON/nr_mac_common.h"
#include "common/utils/nr/nr_common.h"
#include "executables/softmodem-common.h"
#include "SCHED_NR/phy_frame_config_nr.h"
void set_tdd_config_nr_ue(fapi_nr_config_request_t *cfg,
int mu,
+1
View File
@@ -61,6 +61,7 @@
#include "NR_CellGroupConfig.h"
#include "NR_ServingCellConfig.h"
#include "NR_MeasConfig.h"
#include "NR_ServingCellConfigCommonSIB.h"
// ==========
+1
View File
@@ -38,6 +38,7 @@
#include "openair2/LAYER2/nr_pdcp/nr_pdcp_entity.h"
#include "executables/softmodem-common.h"
#include "openair2/LAYER2/nr_pdcp/nr_pdcp.h"
#include "openair2/LAYER2/PDCP_v10.1.0/pdcp.h"
#include <pthread.h>
static NR_UE_MAC_INST_t *nr_ue_mac_inst;
@@ -35,6 +35,9 @@
/* exe */
#include <common/utils/nr/nr_common.h>
/* PHY */
#include "openair1/PHY/impl_defs_top.h"
/* MAC */
#include "NR_MAC_COMMON/nr_mac.h"
#include "NR_MAC_COMMON/nr_mac_common.h"
+2
View File
@@ -33,6 +33,8 @@
#include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
#include "NR_TAG-Id.h"
#include "common/ngran_types.h"
#include "rrc_messages_types.h"
void set_cset_offset(uint16_t);
@@ -20,6 +20,7 @@
*/
#include "nr_mac_gNB.h"
#include "intertask_interface.h"
#include "mac_rrc_ul.h"
@@ -20,6 +20,7 @@
*/
#include "nr_mac_gNB.h"
#include "intertask_interface.h"
#include "mac_rrc_ul.h"

Some files were not shown because too many files have changed in this diff Show More