mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-14 13:10:28 +00:00
Compare commits
184 Commits
testing_40
...
mkdocs-fil
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
33adfe65ad | ||
|
|
efc00b135c | ||
|
|
8dd5fb6cac | ||
|
|
8abed0ce1d | ||
|
|
fb867b37c2 | ||
|
|
f9cefbfe4b | ||
|
|
afea13f0fe | ||
|
|
14a8500e71 | ||
|
|
9315f3eaf5 | ||
|
|
9a5aef9440 | ||
|
|
21f40cf601 | ||
|
|
4149f312fa | ||
|
|
5c3fe47510 | ||
|
|
971d066504 | ||
|
|
ac48d2b7b9 | ||
|
|
e7980d1426 | ||
|
|
4daa3cf1cb | ||
|
|
735de0c7c3 | ||
|
|
2fdf3ef4ac | ||
|
|
520360a629 | ||
|
|
90c6bbce65 | ||
|
|
e2f20eea8a | ||
|
|
2b7f3e2f72 | ||
|
|
5a339d66f2 | ||
|
|
c68068f144 | ||
|
|
3520eb3c0d | ||
|
|
a264937825 | ||
|
|
8abb535481 | ||
|
|
3671a47a7d | ||
|
|
2a925d6cd4 | ||
|
|
d6c7321077 | ||
|
|
d290850e59 | ||
|
|
df11c946f9 | ||
|
|
8209dcb5d9 | ||
|
|
6022ac8bf1 | ||
|
|
cf7879f038 | ||
|
|
08f0f9369c | ||
|
|
b026e6b4ee | ||
|
|
41942c96d2 | ||
|
|
c436f05ea9 | ||
|
|
3dc8647a58 | ||
|
|
e062f40137 | ||
|
|
563a0cfa61 | ||
|
|
f295252b2e | ||
|
|
3c164ef138 | ||
|
|
b27833fbd2 | ||
|
|
2da094dd66 | ||
|
|
372f121cf6 | ||
|
|
f247a6cc2e | ||
|
|
c1f41caa8d | ||
|
|
61bdee3e61 | ||
|
|
0c4655448f | ||
|
|
7e74d4c43e | ||
|
|
dcfd16bd83 | ||
|
|
8925654c07 | ||
|
|
da7897be04 | ||
|
|
345b44d9b3 | ||
|
|
b6171949cd | ||
|
|
40e61d59a6 | ||
|
|
a159f1b78a | ||
|
|
9c1603cfbb | ||
|
|
7fa4d018d4 | ||
|
|
bf325466b3 | ||
|
|
37cb854319 | ||
|
|
d87696e583 | ||
|
|
76c2dbf23f | ||
|
|
7bf290d674 | ||
|
|
5d004818d4 | ||
|
|
4d14aac494 | ||
|
|
144f0de222 | ||
|
|
37e969d1ed | ||
|
|
a0d2c172ad | ||
|
|
0464329eed | ||
|
|
4d4d0d4dd4 | ||
|
|
12e9ab1412 | ||
|
|
d1aa6b1d7c | ||
|
|
b14127b3ff | ||
|
|
7da5d3889f | ||
|
|
e1736b2fb5 | ||
|
|
ee1f9dfede | ||
|
|
49eeba339a | ||
|
|
f159d22499 | ||
|
|
76a5aad7c4 | ||
|
|
cc33a01cee | ||
|
|
7a7ffc18e2 | ||
|
|
bfc0f9e2a3 | ||
|
|
be4461ccca | ||
|
|
11c2791527 | ||
|
|
9a248b4411 | ||
|
|
d9d18f07fd | ||
|
|
40cfe2e5f2 | ||
|
|
abe3ee9624 | ||
|
|
054d0f55cd | ||
|
|
16c333b1a3 | ||
|
|
0a585c1235 | ||
|
|
f83b53d6d1 | ||
|
|
80b5d4ef22 | ||
|
|
792e1ed7d9 | ||
|
|
f14aa8283c | ||
|
|
4fdcb11edd | ||
|
|
5fdec24b52 | ||
|
|
93c37e96e6 | ||
|
|
4e5d92401b | ||
|
|
38975ef120 | ||
|
|
977c484524 | ||
|
|
c5834e6c1b | ||
|
|
7fd9e99f5c | ||
|
|
2a4cbda212 | ||
|
|
b2093089ab | ||
|
|
abd2bc0e45 | ||
|
|
0a447fd304 | ||
|
|
f8d9c54eff | ||
|
|
9f5acb7242 | ||
|
|
33cc04b3e1 | ||
|
|
8410ecac29 | ||
|
|
42ef7bac98 | ||
|
|
d7ea319b59 | ||
|
|
15ee75980b | ||
|
|
7b86f61383 | ||
|
|
66e55acca0 | ||
|
|
b9df7eb84f | ||
|
|
f15994da14 | ||
|
|
a707094196 | ||
|
|
ccf5021072 | ||
|
|
d1150d90e1 | ||
|
|
3d41d28f1d | ||
|
|
85f8d70376 | ||
|
|
33ab261ac8 | ||
|
|
036793f55e | ||
|
|
50411ad86d | ||
|
|
2c4885c662 | ||
|
|
34e072823d | ||
|
|
400e7b7ea3 | ||
|
|
4d7ed95179 | ||
|
|
1ef9812e59 | ||
|
|
9dddad86a1 | ||
|
|
a1f1726d92 | ||
|
|
5ad1f14cb8 | ||
|
|
2ed28c84b3 | ||
|
|
eaf27acb3b | ||
|
|
7982374f6a | ||
|
|
2923e50ed0 | ||
|
|
53c0d2d306 | ||
|
|
fa0542f845 | ||
|
|
c679b5953b | ||
|
|
e490faa60c | ||
|
|
d38188e153 | ||
|
|
b40d2f60c5 | ||
|
|
44875e1c58 | ||
|
|
affab00c90 | ||
|
|
d43d267626 | ||
|
|
2cb960df4e | ||
|
|
7101dc04d1 | ||
|
|
257b296e41 | ||
|
|
97a14c3960 | ||
|
|
77d854bdf3 | ||
|
|
c54f0f7955 | ||
|
|
70726903f3 | ||
|
|
1d5e2d84c2 | ||
|
|
9b381f5d10 | ||
|
|
296fb2bd72 | ||
|
|
562fcd322f | ||
|
|
833ff548c5 | ||
|
|
0b500d412a | ||
|
|
824d9035c1 | ||
|
|
1271f166e0 | ||
|
|
a2a354a447 | ||
|
|
337cc4bbe7 | ||
|
|
e75399707c | ||
|
|
9bfe62b85b | ||
|
|
bd2fc0d237 | ||
|
|
d471046623 | ||
|
|
5980dbcb40 | ||
|
|
15c79b0288 | ||
|
|
95d35b9b7d | ||
|
|
c453c342ed | ||
|
|
2ff071a52e | ||
|
|
6d0c7945c2 | ||
|
|
3dfdc66c41 | ||
|
|
b699884ae4 | ||
|
|
c6229a9c7a | ||
|
|
4c56c6b2de | ||
|
|
5d657c801c | ||
|
|
d73a9148de |
253
CMakeLists.txt
253
CMakeLists.txt
@@ -24,6 +24,38 @@ project (OpenAirInterface LANGUAGES C CXX)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(OAI_VERSION 2.4.0)
|
||||
|
||||
option(CUDA_ENABLE "Enable CUDA accelerated channel simulation" OFF)
|
||||
if(CUDA_ENABLE)
|
||||
find_package(CUDA REQUIRED)
|
||||
find_package(CUDAToolkit REQUIRED)
|
||||
message(STATUS "CUDA explicitly enabled, building with GPU acceleration support.")
|
||||
|
||||
enable_language(CUDA)
|
||||
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
set(CMAKE_CUDA_ARCHITECTURES 90)
|
||||
endif()
|
||||
|
||||
option(USE_UNIFIED_MEMORY "Enable CUDA Unified Memory path" OFF)
|
||||
option(USE_ATS_MEMORY "Enable ATS Hybrid Memory path" ON)
|
||||
|
||||
if(USE_UNIFIED_MEMORY AND USE_ATS_MEMORY)
|
||||
message(FATAL_ERROR "Cannot enable both USE_UNIFIED_MEMORY and USE_ATS_MEMORY at the same time.")
|
||||
endif()
|
||||
|
||||
if(USE_UNIFIED_MEMORY)
|
||||
add_compile_definitions(USE_UNIFIED_MEMORY)
|
||||
message(STATUS "CUDA Unified Memory path enabled.")
|
||||
elseif(USE_ATS_MEMORY)
|
||||
add_compile_definitions(USE_ATS_MEMORY)
|
||||
message(STATUS "CUDA ATS Hybrid Memory path enabled.")
|
||||
else()
|
||||
message(STATUS "CUDA Explicit Copy path enabled (default ATS was overridden).")
|
||||
endif()
|
||||
|
||||
add_compile_definitions(ENABLE_CUDA)
|
||||
endif()
|
||||
|
||||
#########################################################
|
||||
# Base directories, compatible with legacy OAI building #
|
||||
#########################################################
|
||||
@@ -166,6 +198,8 @@ elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=neoverse-n1 -lgcc -lrt")
|
||||
elseif (CPUPART MATCHES "0xd49") # Neoverse-N2
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=neoverse-n2 -ftree-vectorize -lgcc -lrt")
|
||||
elseif (CPUPART MATCHES "0xd03") # Cortex-A53
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=cortex-a53 -lgcc -lrt")
|
||||
else ()
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -gdwarf-2 -mcpu=native -lgcc -lrt")
|
||||
endif()
|
||||
@@ -174,7 +208,12 @@ else()
|
||||
endif()
|
||||
|
||||
if (NOT CROSS_COMPILE)
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=native")
|
||||
if (CPUPART MATCHES "0xd03")
|
||||
# Cortex-A53 does not support ARMv8.2-A extensions
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=armv8-a+simd")
|
||||
else()
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=native")
|
||||
endif()
|
||||
else ()
|
||||
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=armv8.2-a")
|
||||
endif()
|
||||
@@ -282,6 +321,22 @@ if(GIT_FOUND)
|
||||
)
|
||||
endif()
|
||||
|
||||
option(USE_UNIFIED_MEMORY "Enable CUDA Unified Memory path instead of explicit copies" OFF)
|
||||
|
||||
option(USE_ATS_MEMORY "Enable Hybrid ATS (CPU->GPU) and Explicit Copy (GPU->CPU) path" OFF)
|
||||
|
||||
if(USE_UNIFIED_MEMORY AND USE_ATS_MEMORY)
|
||||
message(FATAL_ERROR "Cannot enable both USE_UNIFIED_MEMORY and USE_ATS_MEMORY at the same time.")
|
||||
endif()
|
||||
|
||||
if(USE_UNIFIED_MEMORY)
|
||||
add_compile_definitions(USE_UNIFIED_MEMORY)
|
||||
message(STATUS "CUDA Unified Memory path enabled.")
|
||||
elseif(USE_ATS_MEMORY)
|
||||
add_compile_definitions(USE_ATS_MEMORY)
|
||||
message(STATUS "CUDA ATS Hybrid Memory path enabled.")
|
||||
endif()
|
||||
|
||||
# Debug related options
|
||||
#########################################
|
||||
# asn1c skeletons have hardcoded this flag to make customized debug logs
|
||||
@@ -297,7 +352,7 @@ add_boolean_option(TRACY_ENABLE OFF "Enable tracy instrumentation" ON)
|
||||
if (TRACY_ENABLE)
|
||||
# the tracy version here should match the tracy server version
|
||||
# below is latest release as of this commit
|
||||
CPMAddPackage("gh:wolfpld/tracy#0.12.2")
|
||||
CPMAddPackage("gh:wolfpld/tracy#v0.13.1")
|
||||
endif()
|
||||
|
||||
set (OCP_ITTI ${OPENAIR_DIR}/common/utils/ocp_itti)
|
||||
@@ -342,7 +397,7 @@ target_link_libraries(lte_rrc PRIVATE nr_rrc)
|
||||
#NR RRC
|
||||
#######
|
||||
add_library(nr_rrc ${OPENAIR2_DIR}/RRC/NR/MESSAGES/asn1_msg.c)
|
||||
target_link_libraries(nr_rrc PUBLIC asn1_nr_rrc asn1_lte_rrc)
|
||||
target_link_libraries(nr_rrc PUBLIC asn1_nr_rrc asn1_lte_rrc rrc_cell_management)
|
||||
|
||||
# S1AP
|
||||
##############
|
||||
@@ -379,7 +434,9 @@ add_library(ngap
|
||||
${NGAP_DIR}/ngap_gNB_handlers.c
|
||||
${NGAP_DIR}/ngap_gNB_itti_messaging.c
|
||||
${NGAP_DIR}/ngap_gNB_management_procedures.c
|
||||
${NGAP_DIR}/ngap_gNB_paging.c
|
||||
${NGAP_DIR}/ngap_gNB_nas_procedures.c
|
||||
${NGAP_DIR}/ngap_gNB_pdu_session_management.c
|
||||
${NGAP_DIR}/ngap_gNB_nnsf.c
|
||||
${NGAP_DIR}/ngap_gNB_overload.c
|
||||
${NGAP_DIR}/ngap_gNB_trace.c
|
||||
@@ -387,6 +444,9 @@ add_library(ngap
|
||||
)
|
||||
target_link_libraries(ngap PUBLIC asn1_ngap)
|
||||
target_link_libraries(ngap PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
if(ENABLE_TESTS)
|
||||
target_compile_definitions(ngap PRIVATE ENABLE_TESTS)
|
||||
endif()
|
||||
|
||||
#M2AP
|
||||
##############
|
||||
@@ -477,7 +537,7 @@ add_library(f1ap
|
||||
${F1AP_DIR}/f1ap_itti_messaging.c)
|
||||
target_include_directories(f1ap PUBLIC F1AP_DIR)
|
||||
target_link_libraries(f1ap PUBLIC asn1_f1ap GTPV1U)
|
||||
target_link_libraries(f1ap PRIVATE ngap nr_rrc HASHTABLE f1ap_lib)
|
||||
target_link_libraries(f1ap PRIVATE ngap nr_rrc ds f1ap_lib)
|
||||
target_include_directories(f1ap PRIVATE ${F1AP_DIR}/lib)
|
||||
if(E2_AGENT)
|
||||
target_compile_definitions(f1ap PRIVATE E2_AGENT)
|
||||
@@ -515,8 +575,6 @@ target_link_libraries(params_libconfig PRIVATE config_internals ${libconfig_LIBR
|
||||
add_library(shlib_loader OBJECT common/utils/load_module_shlib.c)
|
||||
target_link_libraries(shlib_loader PRIVATE CONFIG_LIB)
|
||||
|
||||
include_directories ("${OPENAIR_DIR}/radio/COMMON")
|
||||
|
||||
##############################################################
|
||||
# ???!!! TO BE DOCUMENTED OPTIONS !!!???
|
||||
##############################################################
|
||||
@@ -595,7 +653,6 @@ include_directories("${OPENAIR3_DIR}/S1AP")
|
||||
include_directories("${OPENAIR2_DIR}/X2AP")
|
||||
include_directories("${OPENAIR2_DIR}/M2AP")
|
||||
include_directories("${OPENAIR2_DIR}/F1AP")
|
||||
include_directories("${OPENAIR3_DIR}/ocp-gtpu")
|
||||
include_directories("${OPENAIR3_DIR}/M3AP")
|
||||
include_directories("${OPENAIR3_DIR}/MME_APP")
|
||||
include_directories("${OPENAIR_DIR}/radio/COMMON")
|
||||
@@ -617,12 +674,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/common/utils/T
|
||||
# set the T_LIB name to T if the target exists, otherwise leave empty
|
||||
set(T_LIB $<TARGET_NAME_IF_EXISTS:T>)
|
||||
|
||||
add_library(HASHTABLE
|
||||
${OPENAIR_DIR}/common/utils/hashtable/hashtable.c
|
||||
${OPENAIR_DIR}/common/utils/hashtable/obj_hashtable.c
|
||||
)
|
||||
include_directories(${OPENAIR_DIR}/common/utils/hashtable)
|
||||
|
||||
add_library(UTIL
|
||||
${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c
|
||||
${OPENAIR2_DIR}/UTIL/OPT/probe.c
|
||||
@@ -780,24 +831,6 @@ include_directories(${NFAPI_USER_DIR})
|
||||
|
||||
# Layer 1
|
||||
#############################
|
||||
set(PHY_POLARSRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_init.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_bitwise_operations.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_crc_byte.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_decoding_tools.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_encoder.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_interleaving_pattern.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_kernal_operation.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_kronecker_power_matrices.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_matrix_and_array.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_procedures.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrPolar_tools/nr_polar_sequence_pattern.c
|
||||
)
|
||||
set(PHY_SMALLBLOCKSRC
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrSmallBlock/encodeSmallBlock.c
|
||||
${OPENAIR1_DIR}/PHY/CODING/nrSmallBlock/decodeSmallBlock.c
|
||||
)
|
||||
set(PHY_TURBOIF
|
||||
${OPENAIR1_DIR}/PHY/CODING/coding_load.c
|
||||
)
|
||||
@@ -808,8 +841,6 @@ set(PHY_NRLDPC_CODINGIF
|
||||
|
||||
add_library(dfts MODULE ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts.c ${OPENAIR1_DIR}/PHY/TOOLS/oai_dfts_neon.c)
|
||||
|
||||
add_library(crc_byte OBJECT ${OPENAIR1_DIR}/PHY/CODING/crc_byte.c)
|
||||
|
||||
set(PHY_SRC_COMMON
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/dci_tools_common.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/lte_mcs.c
|
||||
@@ -899,7 +930,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/LTE_TRANSPORT/sss_gen.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_demodulation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_llr_computation.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/linear_preprocessing_rec.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dlsch_decoding.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c
|
||||
${OPENAIR1_DIR}/PHY/LTE_UE_TRANSPORT/uci_tools_ue.c
|
||||
@@ -978,8 +1008,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/dB_routines.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/oai_arith_operations.c
|
||||
${PHY_POLARSRC}
|
||||
${PHY_SMALLBLOCKSRC}
|
||||
${PHY_NRLDPC_CODINGIF}
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/pucch_rx.c
|
||||
${OPENAIR1_DIR}/PHY/NR_TRANSPORT/srs_rx.c
|
||||
@@ -1029,8 +1057,6 @@ set(PHY_SRC_UE
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/sqrt.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/oai_arith_operations.c
|
||||
${OPENAIR1_DIR}/PHY/INIT/nr_init_ue.c
|
||||
${PHY_POLARSRC}
|
||||
${PHY_SMALLBLOCKSRC}
|
||||
${PHY_NRLDPC_CODINGIF}
|
||||
)
|
||||
|
||||
@@ -1049,29 +1075,21 @@ add_dependencies(PHY_COMMON dfts)
|
||||
add_library(PHY ${PHY_SRC})
|
||||
target_link_libraries(PHY PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
|
||||
pkg_check_modules(blas REQUIRED blas)
|
||||
pkg_check_modules(lapacke REQUIRED lapacke)
|
||||
|
||||
add_library(PHY_UE ${PHY_SRC_UE})
|
||||
target_link_libraries(PHY_UE PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs UTIL)
|
||||
# RHEL needs also cblas, but Ubuntu does not have it. So `cblas_LIBRARIES` and
|
||||
# `cblas_INCLUDE_DIRS` will be empty for Ubuntu, a no-op
|
||||
pkg_check_modules(cblas cblas)
|
||||
target_link_libraries(PHY_UE PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES})
|
||||
target_include_directories(PHY_UE PRIVATE ${blas_INCLUDE_DIRS} ${cblas_INCLUDE_DIRS} ${lapacke_INCLUDE_DIRS})
|
||||
|
||||
add_library(PHY_NR_COMMON ${PHY_NR_SRC_COMMON})
|
||||
target_link_libraries(PHY_NR_COMMON PUBLIC UTIL)
|
||||
|
||||
add_library(PHY_NR ${PHY_NR_SRC})
|
||||
target_link_libraries(PHY_NR nr_phy_common nr_common nr_fapi_p5)
|
||||
target_link_libraries(PHY_NR nr_phy_common nr_common nr_fapi_p5 polar smallblock)
|
||||
|
||||
add_library(PHY_NR_NO_AVX_256 ${PHY_NR_SRC})
|
||||
target_link_libraries(PHY_NR_NO_AVX_256 nr_phy_common nr_common)
|
||||
target_compile_definitions(PHY_NR_NO_AVX_256 PUBLIC USE_128BIT)
|
||||
|
||||
add_library(PHY_NR_UE ${PHY_NR_UE_SRC})
|
||||
target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc_hdrs nr_phy_common nr_common UTIL)
|
||||
target_link_libraries(PHY_NR_UE PRIVATE asn1_nr_rrc_hdrs nr_phy_common nr_common UTIL polar smallblock)
|
||||
|
||||
add_library(PHY_RU ${PHY_SRC_RU})
|
||||
target_link_libraries(PHY_RU PRIVATE asn1_lte_rrc_hdrs UTIL)
|
||||
@@ -1135,7 +1153,7 @@ set(L2_SRC
|
||||
${RRC_DIR}/rrc_eNB_S1AP.c
|
||||
${RRC_DIR}/rrc_eNB_M2AP.c
|
||||
${RRC_DIR}/rrc_eNB_UE_context.c
|
||||
${NR_RRC_DIR}/rrc_gNB_UE_context.c
|
||||
${RRC_DIR}/rrc_eNB_GTPV1U.c
|
||||
${RRC_DIR}/rrc_common.c
|
||||
${RRC_DIR}/L2_interface.c
|
||||
${RRC_DIR}/L2_interface_common.c
|
||||
@@ -1201,6 +1219,7 @@ set(NR_L2_SRC_UE
|
||||
${NR_UE_RRC_DIR}/L2_interface_ue.c
|
||||
${NR_UE_RRC_DIR}/main_ue.c
|
||||
${NR_UE_RRC_DIR}/rrc_UE.c
|
||||
${NR_UE_RRC_DIR}/verify_RRC.c
|
||||
${NR_UE_RRC_DIR}/rrc_timers_and_constants.c
|
||||
${NR_UE_RRC_DIR}/rrc_sl_preconfig.c
|
||||
)
|
||||
@@ -1381,15 +1400,6 @@ include_directories("${OPENAIR1_DIR}/SCHED_NR_UE")
|
||||
# CN libs
|
||||
##########################
|
||||
|
||||
add_library (GTPV1U
|
||||
${RRC_DIR}/rrc_eNB_GTPV1U.c
|
||||
${OPENAIR3_DIR}/ocp-gtpu/gtp_itf.cpp
|
||||
${OPENAIR3_DIR}/ocp-gtpu/gtpu_extensions.c
|
||||
)
|
||||
target_link_libraries(GTPV1U PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
target_link_libraries(GTPV1U PRIVATE SIMU ds)
|
||||
include_directories(${OPENAIR3_DIR}/ocp-gtp)
|
||||
|
||||
set (MME_APP_SRC
|
||||
${OPENAIR3_DIR}/MME_APP/mme_app.c
|
||||
${OPENAIR3_DIR}/MME_APP/mme_config.c
|
||||
@@ -1687,6 +1697,17 @@ set (SIMUSRC
|
||||
add_library(SIMU STATIC ${SIMUSRC} )
|
||||
target_include_directories(SIMU PUBLIC ${OPENAIR1_DIR}/SIMULATION/TOOLS ${OPENAIR1_DIR}/SIMULATION/RF)
|
||||
|
||||
option(CHANNEL_SSE "Enable SSE optimizations for channel simulation" OFF)
|
||||
if(CHANNEL_SSE)
|
||||
message(STATUS "SSE-optimized channel simulation enabled.")
|
||||
target_compile_definitions(SIMU PRIVATE CHANNEL_SSE)
|
||||
endif()
|
||||
|
||||
if(CUDA_FOUND)
|
||||
set_property(TARGET SIMU PROPERTY CUDA_ARCHITECTURES ${CMAKE_CUDA_ARCHITECTURES})
|
||||
set_property(TARGET SIMU PROPERTY LINKER_LANGUAGE CXX)
|
||||
endif()
|
||||
|
||||
include_directories("${NFAPI_DIR}/nfapi/public_inc")
|
||||
include_directories("${NFAPI_DIR}/common/public_inc")
|
||||
include_directories("${NFAPI_DIR}/pnf/public_inc")
|
||||
@@ -1717,12 +1738,9 @@ add_executable(lte-softmodem
|
||||
${OPENAIR_DIR}/executables/lte-ru.c
|
||||
${OPENAIR_DIR}/executables/ru_control.c
|
||||
${OPENAIR_DIR}/executables/lte-softmodem.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR2_DIR}/ENB_APP/NB_IoT_interface.c
|
||||
${OPENAIR_DIR}/executables/create_tasks.c
|
||||
${OPENAIR_DIR}/executables/create_tasks_mbms.c
|
||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/radio/COMMON/record_player.c
|
||||
${OPENAIR3_DIR}/NAS/UE/nas_ue_task.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
${OPENAIR_DIR}/common/utils/lte/ue_power.c
|
||||
@@ -1733,15 +1751,14 @@ add_dependencies(lte-softmodem oai_iqplayer)
|
||||
|
||||
target_link_libraries(lte-softmodem PRIVATE
|
||||
-Wl,--start-group
|
||||
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECURITY UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
|
||||
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U SECURITY UTIL SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
|
||||
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
|
||||
${NAS_UE_LIB} ITTI SIMU shlib_loader
|
||||
${NAS_UE_LIB} ITTI SIMU radio_common softmodem_common
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries(lte-softmodem PRIVATE pthread m CONFIG_LIB rt)
|
||||
target_link_libraries(lte-softmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(lte-softmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
target_link_libraries(lte-softmodem PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES} ${lapack_LIBRARIES})
|
||||
|
||||
if(E2_AGENT)
|
||||
target_link_libraries(lte-softmodem PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup)
|
||||
@@ -1751,16 +1768,13 @@ endif()
|
||||
add_executable(oairu
|
||||
${OPENAIR_DIR}/executables/lte-ru.c
|
||||
${OPENAIR_DIR}/executables/ru_control.c
|
||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/radio/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c
|
||||
${OPENAIR_DIR}/executables/main_ru.c
|
||||
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
|
||||
)
|
||||
target_link_libraries(oairu PRIVATE
|
||||
-Wl,--start-group
|
||||
SCHED_RU_LIB PHY_COMMON PHY_RU UTIL shlib_loader
|
||||
SCHED_RU_LIB PHY_COMMON PHY_RU UTIL radio_common softmodem_common
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries(oairu PRIVATE pthread m CONFIG_LIB rt ${T_LIB})
|
||||
@@ -1777,10 +1791,7 @@ target_link_libraries(lte-softmodem PRIVATE
|
||||
add_executable(lte-uesoftmodem
|
||||
${OPENAIR_DIR}/executables/lte-ue.c
|
||||
${OPENAIR_DIR}/executables/lte-uesoftmodem.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_DIR}/executables/create_tasks_ue.c
|
||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/radio/COMMON/record_player.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
|
||||
@@ -1790,15 +1801,14 @@ add_executable(lte-uesoftmodem
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE
|
||||
-Wl,--start-group
|
||||
lte_rrc nr_rrc s1ap x2ap m2ap m3ap
|
||||
SECURITY UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
|
||||
SECURITY UTIL SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
|
||||
PHY_UE PHY_RU L2_UE L2_LTE SIMU NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
|
||||
${NAS_UE_LIB} ITTI shlib_loader
|
||||
${NAS_UE_LIB} ITTI radio_common softmodem_common
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE pthread m CONFIG_LIB rt)
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE ${T_LIB})
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE ${blas_LIBRARIES} ${cblas_LIBRARIES} ${lapacke_LIBRARIES} ${lapack_LIBRARIES})
|
||||
|
||||
# force the generation of ASN.1 so that we don't need to wait during the build
|
||||
target_link_libraries(lte-uesoftmodem PRIVATE
|
||||
@@ -1811,13 +1821,11 @@ add_executable(nr-oru
|
||||
${OPENAIR_DIR}/openair1/SCHED_NR/phy_frame_config_nr.c
|
||||
${OPENAIR_DIR}/openair1/SCHED_NR/nr_prach_procedures.c
|
||||
${OPENAIR_DIR}/openair1/SCHED/phy_procedures_lte_common.c
|
||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/radio/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_DIR}/executables/main_nr_ru.c
|
||||
)
|
||||
target_link_libraries(nr-oru PRIVATE
|
||||
UTIL SCHED_RU_LIB PHY_COMMON PHY_RU PHY_NR shlib_loader z dl)
|
||||
UTIL SCHED_RU_LIB PHY_COMMON PHY_RU PHY_NR shlib_loader z dl
|
||||
radio_common softmodem_common)
|
||||
target_link_libraries(nr-oru PRIVATE pthread m CONFIG_LIB rt ${T_LIB} utils
|
||||
barrier actor)
|
||||
target_link_libraries(nr-oru PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs nr_phy_common time_management)
|
||||
@@ -1832,9 +1840,6 @@ add_executable(nr-softmodem
|
||||
${OPENAIR_DIR}/executables/nr-gnb.c
|
||||
${OPENAIR_DIR}/executables/nr-ru.c
|
||||
${OPENAIR_DIR}/executables/nr-softmodem.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/radio/COMMON/record_player.c
|
||||
${OPENAIR_DIR}/common/utils/lte/ue_power.c
|
||||
${OPENAIR_DIR}/common/utils/lte/prach_utils.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
@@ -1843,11 +1848,11 @@ add_executable(nr-softmodem
|
||||
|
||||
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 SECURITY
|
||||
UTIL SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECURITY
|
||||
ITTI ${NAS_UE_LIB} lte_rrc nr_rrc
|
||||
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU
|
||||
x2ap f1ap m2ap m3ap e1ap shlib_loader
|
||||
time_management
|
||||
x2ap f1ap m2ap m3ap e1ap radio_common
|
||||
time_management softmodem_common
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries(nr-softmodem PRIVATE pthread m CONFIG_LIB rt)
|
||||
@@ -1877,7 +1882,6 @@ target_link_libraries(nr-softmodem PRIVATE
|
||||
|
||||
add_executable(nr-cuup
|
||||
executables/nr-cuup.c
|
||||
executables/softmodem-common.c
|
||||
${NR_RRC_DIR}/rrc_gNB_UE_context.c
|
||||
${OPENAIR2_DIR}/E1AP/e1ap_setup.c
|
||||
${NR_PDCP_SRC}
|
||||
@@ -1887,9 +1891,9 @@ add_executable(nr-cuup
|
||||
target_link_libraries(nr-cuup PRIVATE
|
||||
CONFIG_LIB ITTI SCTP_CLIENT
|
||||
GTPV1U e1ap f1ap
|
||||
time_management
|
||||
time_management softmodem_common
|
||||
alg
|
||||
z dl pthread shlib_loader ${T_LIB})
|
||||
z dl pthread ${T_LIB})
|
||||
target_link_libraries(nr-cuup PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
if(E2_AGENT)
|
||||
target_link_libraries(nr-cuup PRIVATE e2_agent e2_agent_arg e2_ran_func_cuup)
|
||||
@@ -1906,11 +1910,6 @@ add_executable(nr-uesoftmodem
|
||||
${OPENAIR_DIR}/executables/position_interface.c
|
||||
${OPENAIR_DIR}/executables/nr-ue.c
|
||||
${OPENAIR_DIR}/executables/nr-ue-ru.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/radio/COMMON/record_player.c
|
||||
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common.c
|
||||
${OPENAIR2_DIR}/LAYER2/NR_MAC_COMMON/nr_mac_common_tdd.c
|
||||
${OPENAIR1_DIR}/PHY/TOOLS/phy_scope_interface.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
@@ -1918,10 +1917,10 @@ add_executable(nr-uesoftmodem
|
||||
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE
|
||||
-Wl,--start-group
|
||||
nr_rrc SECURITY UTIL HASHTABLE SCHED_RU_LIB SCHED_NR_UE_LIB
|
||||
nr_rrc SECURITY UTIL SCHED_RU_LIB SCHED_NR_UE_LIB
|
||||
PHY_COMMON PHY_NR_COMMON PHY_NR_UE NR_L2_UE MAC_NR_COMMON NFAPI_LIB
|
||||
ITTI SIMU shlib_loader
|
||||
time_management
|
||||
ITTI SIMU radio_common
|
||||
time_management softmodem_common
|
||||
-Wl,--end-group z dl)
|
||||
|
||||
target_link_libraries(nr-uesoftmodem PRIVATE pthread m CONFIG_LIB rt nr_ue_phy_meas)
|
||||
@@ -1954,10 +1953,10 @@ target_link_libraries(nr-uesoftmodem PRIVATE
|
||||
add_executable(rftest
|
||||
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_test.c
|
||||
${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_scope.c
|
||||
${OPENAIR_DIR}/radio/COMMON/common_lib.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
)
|
||||
target_link_libraries(rftest PRIVATE minimal_lib PHY_NR_COMMON UTIL forms pthread dl m ${T_LIB} shlib_loader)
|
||||
target_link_libraries(rftest PRIVATE
|
||||
minimal_lib PHY_NR_COMMON UTIL forms pthread dl m ${T_LIB}
|
||||
radio_common softmodem_common)
|
||||
target_link_libraries(rftest PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs)
|
||||
|
||||
add_executable(polartest
|
||||
@@ -1974,7 +1973,7 @@ add_executable(smallblocktest
|
||||
|
||||
target_link_libraries(smallblocktest PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_NR PHY_COMMON PHY_NR_COMMON -Wl,--end-group
|
||||
m pthread dl shlib_loader ${T_LIB}
|
||||
m pthread dl ${T_LIB}
|
||||
)
|
||||
|
||||
|
||||
@@ -1984,7 +1983,7 @@ add_executable(ldpctest
|
||||
)
|
||||
target_link_libraries(ldpctest PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON -Wl,--end-group
|
||||
m pthread dl shlib_loader ${T_LIB}
|
||||
m pthread dl ${T_LIB}
|
||||
# link 'check_crc' to make it resolved in the LDPC coding libraries
|
||||
# 'check_crc' is not used in ldpctest so it is not linked in the executable by default
|
||||
# --whole-archive links 'check_crc' in the executable even though it is note used, see 'man ld'
|
||||
@@ -1997,54 +1996,53 @@ target_link_libraries(physim_common PRIVATE UTIL)
|
||||
add_executable(nr_dlschsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/dlschsim.c)
|
||||
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 ${T_LIB} ITTI dl shlib_loader physim_common
|
||||
m pthread ${T_LIB} ITTI dl physim_common
|
||||
)
|
||||
target_link_libraries(nr_dlschsim PRIVATE asn1_nr_rrc_hdrs)
|
||||
|
||||
add_executable(nr_pbchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pbchsim.c)
|
||||
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 ${T_LIB} ITTI dl shlib_loader physim_common
|
||||
m pthread ${T_LIB} ITTI dl physim_common
|
||||
)
|
||||
target_link_libraries(nr_pbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_psbchsim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/psbchsim.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${NFAPI_USER_DIR}/gnb_ind_vars.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
)
|
||||
target_link_libraries(nr_psbchsim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -lz -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader physim_common
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON CONFIG_LIB L2_NR -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl physim_common softmodem_common
|
||||
)
|
||||
target_link_libraries(nr_psbchsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_pucchsim ${OPENAIR1_DIR}/SIMULATION/NR_PHY/pucchsim.c)
|
||||
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 ${T_LIB} ITTI dl shlib_loader physim_common
|
||||
m pthread ${T_LIB} ITTI dl physim_common
|
||||
)
|
||||
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
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${NFAPI_USER_DIR}/gnb_ind_vars.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
)
|
||||
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_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas physim_common
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR x2ap SECURITY ngap -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common
|
||||
softmodem_common
|
||||
)
|
||||
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)
|
||||
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 CONFIG_LIB -lz -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader physim_common)
|
||||
-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 -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl physim_common)
|
||||
target_link_libraries(nr_prachsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_ulschsim
|
||||
@@ -2053,41 +2051,48 @@ add_executable(nr_ulschsim
|
||||
)
|
||||
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 ${T_LIB} ITTI dl shlib_loader physim_common
|
||||
m pthread ${T_LIB} ITTI dl physim_common
|
||||
)
|
||||
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
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${NFAPI_USER_DIR}/gnb_ind_vars.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
)
|
||||
|
||||
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_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR HASHTABLE x2ap SECURITY ngap -lz -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl shlib_loader nr_ue_phy_meas physim_common
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc CONFIG_LIB L2_NR x2ap SECURITY ngap -Wl,--end-group
|
||||
m pthread ${T_LIB} ITTI dl nr_ue_phy_meas physim_common softmodem_common
|
||||
)
|
||||
target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs)
|
||||
|
||||
add_executable(nr_srssim
|
||||
${OPENAIR1_DIR}/SIMULATION/NR_PHY/srssim.c
|
||||
${OPENAIR_DIR}/executables/softmodem-common.c
|
||||
${NFAPI_USER_DIR}/nfapi.c
|
||||
${NFAPI_USER_DIR}/gnb_ind_vars.c
|
||||
${PHY_INTERFACE_DIR}/queue_t.c
|
||||
)
|
||||
|
||||
target_link_libraries(nr_srssim PRIVATE
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON nr_rrc L2_NR -lz -Wl,--end-group
|
||||
m pthread ITTI dl nr_ue_phy_meas physim_common
|
||||
-Wl,--start-group UTIL SIMU PHY_COMMON PHY_NR_COMMON PHY_NR PHY_NR_UE SCHED_NR_LIB SCHED_NR_UE_LIB MAC_UE_NR MAC_NR_COMMON -Wl,--end-group
|
||||
m pthread ITTI dl nr_ue_phy_meas physim_common softmodem_common
|
||||
)
|
||||
|
||||
if(CUDA_ENABLE)
|
||||
if (TARGET oai_cuda_lib)
|
||||
target_link_libraries(nr_dlsim PRIVATE oai_cuda_lib)
|
||||
target_link_libraries(nr_ulsim PRIVATE oai_cuda_lib)
|
||||
|
||||
target_compile_definitions(nr_dlsim PRIVATE ENABLE_CUDA)
|
||||
target_compile_definitions(nr_ulsim PRIVATE ENABLE_CUDA)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# these simulators do not compile:
|
||||
# dlsim_tm7 pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim
|
||||
foreach(myExe dlsim ulsim)
|
||||
|
||||
add_executable(${myExe}
|
||||
${OPENAIR1_DIR}/SIMULATION/LTE_PHY/${myExe}.c
|
||||
${OPENAIR_DIR}/common/utils/lte/ue_power.c
|
||||
@@ -2097,7 +2102,7 @@ foreach(myExe dlsim ulsim)
|
||||
)
|
||||
target_link_libraries (${myExe} PRIVATE
|
||||
-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 ${T_LIB} dl shlib_loader
|
||||
pthread m rt CONFIG_LIB ${T_LIB} dl
|
||||
)
|
||||
target_link_libraries(${myExe} PRIVATE asn1_lte_rrc_hdrs)
|
||||
add_dependencies(${myExe} coding)
|
||||
@@ -2136,7 +2141,7 @@ if (${T_TRACER})
|
||||
#all "add_library" definitions
|
||||
ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap
|
||||
params_libconfig
|
||||
oai_eth_transpro HASHTABLE UTIL
|
||||
oai_eth_transpro UTIL
|
||||
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB
|
||||
NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
|
||||
MISC_NFAPI_LTE_LIB
|
||||
@@ -2189,6 +2194,7 @@ if(ENABLE_TESTS)
|
||||
endif()
|
||||
|
||||
add_subdirectory(common)
|
||||
add_subdirectory(executables)
|
||||
add_subdirectory(doc)
|
||||
add_subdirectory(nfapi)
|
||||
add_subdirectory(openair1)
|
||||
@@ -2197,6 +2203,11 @@ add_subdirectory(openair3)
|
||||
add_subdirectory(radio)
|
||||
add_subdirectory(tests)
|
||||
|
||||
if(TARGET oai_cuda_lib)
|
||||
message(STATUS "CUDA library 'oai_cuda_lib' found, linking to targets...")
|
||||
target_link_libraries(nr_dlsim PRIVATE oai_cuda_lib)
|
||||
target_link_libraries(nr_ulsim PRIVATE oai_cuda_lib)
|
||||
endif()
|
||||
|
||||
if(PACKAGING_LTE OR PACKAGING_NR OR PACKAGING_COMMON OR PACKAGING_USRP OR PACKAGING_PHYSIM)
|
||||
include("tools/packages/packages.cmake")
|
||||
|
||||
1
ci-scripts/Jenkinsfile
vendored
1
ci-scripts/Jenkinsfile
vendored
@@ -115,7 +115,6 @@ pipeline {
|
||||
} else {
|
||||
sh "git fetch"
|
||||
sh "git checkout -f ${commitID}"
|
||||
sh "git reset --hard origin/${commitID}"
|
||||
}
|
||||
} else {
|
||||
echo "\u274C Some parameters are missing"
|
||||
|
||||
@@ -334,6 +334,29 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("Channel-Simulation") {
|
||||
when { expression {do5Gtest || do5GUeTest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-Channel-Simulation', 'Channel-Simulation')
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
channelSimStatus = finalizeSlaveJob('RAN-Channel-Simulation')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += channelSimStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("PhySim-Cluster-4G") {
|
||||
when { expression {do4Gtest} }
|
||||
steps {
|
||||
@@ -703,11 +726,11 @@ pipeline {
|
||||
}
|
||||
}
|
||||
}
|
||||
stage ("SA-2x2-Module-CN5G") {
|
||||
stage ("SA-Multi-Antenna-CN5G") {
|
||||
when { expression {do5Gtest} }
|
||||
steps {
|
||||
script {
|
||||
triggerSlaveJob ('RAN-SA-2x2-Module-CN5G', 'SA-2x2-Module-CN5G')
|
||||
triggerSlaveJob ('RAN-SA-Multi-Antenna-CN5G', 'SA-Multi-Antenna-CN5G')
|
||||
}
|
||||
}
|
||||
post {
|
||||
@@ -715,13 +738,13 @@ pipeline {
|
||||
script {
|
||||
// Using a unique variable name for each test stage to avoid overwriting on a global variable
|
||||
// due to parallel-time concurrency
|
||||
saTDD2x2Status = finalizeSlaveJob('RAN-SA-2x2-Module-CN5G')
|
||||
saMultiAntennaStatus = finalizeSlaveJob('RAN-SA-Multi-Antenna-CN5G')
|
||||
}
|
||||
}
|
||||
failure {
|
||||
script {
|
||||
currentBuild.result = 'FAILURE'
|
||||
failingStages += saTDD2x2Status
|
||||
failingStages += saMultiAntennaStatus
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ def Deploy_Physim(ctx, HTML, node, workdir, script, options):
|
||||
logging.debug(f'Running physims on server {node} workdir {workdir}')
|
||||
with cls_cmd.getConnection(node) as c:
|
||||
sys_info = c.exec_script("scripts/sys-info.sh", 5)
|
||||
ret = c.exec_script(script, 1000, options)
|
||||
ret = c.exec_script(script, 1500, options)
|
||||
logging.debug(f'"{script}" finished with code {ret.returncode}, output:\n{ret.stdout}')
|
||||
HTML.CreateHtmlTestRowQueue('Query system info', 'OK', [sys_info.stdout])
|
||||
with cls_cmd.getConnection(node) as ssh:
|
||||
|
||||
@@ -175,7 +175,7 @@ MACRLCs = ({
|
||||
tr_n_preference = "local_RRC";
|
||||
pusch_TargetSNRx10 = 200;
|
||||
pucch_TargetSNRx10 = 200;
|
||||
set_analog_beamforming = 2;
|
||||
set_analog_beamforming = "lophy";
|
||||
beam_duration = 1;
|
||||
beams_per_period = 1;
|
||||
beam_weights = [0]; // single SSB -> one analog beam
|
||||
|
||||
@@ -18,7 +18,7 @@ gNBs =
|
||||
////////// Physical parameters:
|
||||
|
||||
min_rxtxtime = 6;
|
||||
enable_sdap = 1;
|
||||
enable_sdap = 0;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
|
||||
@@ -18,7 +18,7 @@ gNBs =
|
||||
////////// Physical parameters:
|
||||
|
||||
min_rxtxtime = 6;
|
||||
enable_sdap = 1;
|
||||
enable_sdap = 0;
|
||||
|
||||
servingCellConfigCommon = (
|
||||
{
|
||||
|
||||
52
ci-scripts/docker/Dockerfile.channelsim.ubuntu
Normal file
52
ci-scripts/docker/Dockerfile.channelsim.ubuntu
Normal file
@@ -0,0 +1,52 @@
|
||||
#/*
|
||||
# * 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
|
||||
# */
|
||||
#---------------------------------------------------------------------
|
||||
#
|
||||
# Dockerfile for the Open-Air-Interface BUILD service
|
||||
# Valid for Ubuntu 24.04
|
||||
#
|
||||
#---------------------------------------------------------------------
|
||||
FROM nvidia/cuda:12.9.1-devel-ubuntu22.04 AS cuda-image
|
||||
FROM ran-base:develop AS ran-tests
|
||||
|
||||
RUN rm -Rf /oai-ran
|
||||
COPY --from=cuda-image /usr/local/cuda/ /usr/local/cuda/
|
||||
|
||||
# Set the LD_LIBRARY_PATH to ensure the system can find the copied libraries.
|
||||
# This is crucial for applications that use CUDA.
|
||||
ENV LD_LIBRARY_PATH=/usr/local/cuda/lib64:/usr/local/cuda/targets/sbsa-linux/lib
|
||||
ENV PATH=/usr/local/cuda/bin:$PATH
|
||||
ENV C_INCLUDE_PATH=/usr/local/cuda/include
|
||||
|
||||
WORKDIR /oai-ran
|
||||
COPY . .
|
||||
|
||||
WORKDIR /oai-ran/build
|
||||
RUN cmake -GNinja -DENABLE_PHYSIM_TESTS=ON -DENABLE_TESTS=ON \
|
||||
-DSANITIZE_UNDEFINED=OFF -DSANITIZE_ADDRESS=OFF \
|
||||
-DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror \
|
||||
-DPHYSIM_CHECK_FILES="ThresholdsCuda.cmake" \
|
||||
-DCUDA_ENABLE=ON \
|
||||
-DUSE_UNIFIED_MEMORY=ON \
|
||||
-DUSE_ATS_MEMORY=OFF \
|
||||
-DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/oai-ran/cmake_targets/ran_build/build \
|
||||
.. && \
|
||||
ninja test_channel_scalability test_multipath test_noise
|
||||
@@ -202,9 +202,9 @@ def ExecuteActionWithParam(action, ctx, node):
|
||||
workdir = CLUSTER.eNBSourceCodePath
|
||||
success = cls_oaicitest.Deploy_Physim(ctx, HTML, node, workdir, script, options)
|
||||
|
||||
elif action == 'Build_Deploy_Docker_PhySim' or action == 'Build_Deploy_Source_PhySim':
|
||||
elif action == 'Build_Deploy_PhySim':
|
||||
ctest_opt = test.findtext('ctest-opt') or ''
|
||||
script = "scripts/docker-build-and-deploy-physims.sh" if action == 'Build_Deploy_Docker_PhySim' else 'scripts/source-deploy-physims.sh'
|
||||
script = test.findtext('script')
|
||||
options = f"{CONTAINERS.eNBSourceCodePath} {ctest_opt}"
|
||||
workdir = CONTAINERS.eNBSourceCodePath
|
||||
success = cls_oaicitest.Deploy_Physim(ctx, HTML, node, workdir, script, options)
|
||||
|
||||
46
ci-scripts/scripts/docker-build-and-deploy-chansim.sh
Executable file
46
ci-scripts/scripts/docker-build-and-deploy-chansim.sh
Executable file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
|
||||
function die() { echo $@; exit 1; }
|
||||
[ $# -ge 1 ] || die "usage: $0 <directory> [ctest-options]"
|
||||
|
||||
IMAGE=ran-channelsim:ci-temp
|
||||
CONTAINER=ran-channelsim
|
||||
function cleanup-docker() {
|
||||
docker stop ${CONTAINER}
|
||||
docker rm ${CONTAINER}
|
||||
docker rmi ${IMAGE}
|
||||
docker volume prune --force
|
||||
}
|
||||
trap cleanup-docker EXIT
|
||||
|
||||
set -x
|
||||
DIR=$1
|
||||
RESULT_DIR=${DIR}/
|
||||
shift
|
||||
CTEST_OPT=$@
|
||||
|
||||
# build channel simulator
|
||||
docker build --progress=plain --tag ${IMAGE} --file ${DIR}/ci-scripts/docker/Dockerfile.channelsim.ubuntu ${DIR} &>> ${RESULT_DIR}/channelsim_build_log.txt
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "build of channel simulator failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# get a JSON description of all tests to run
|
||||
docker run -a STDOUT --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --rm --name ${CONTAINER} ${IMAGE} ctest ${CTEST_OPT} --show-only=json-v1 &> ${RESULT_DIR}/desc-tests.json
|
||||
JSON_RES=$?
|
||||
|
||||
# run the actual tests: we don't suppy --rm as we have to copy the files
|
||||
# similar to unit tests, we can't mount the file where we write physims-5g-run.xml to
|
||||
# as it would write a file as root, but this script is run as a normal user
|
||||
docker run -a STDOUT --gpus all --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --name ${CONTAINER} ${IMAGE} ctest ${CTEST_OPT} --output-junit results-run.xml --test-output-size-passed 100000 --test-output-size-failed 100000 &>> ${RESULT_DIR}/channelsim_log.txt
|
||||
RUN_RES=$?
|
||||
docker cp ${CONTAINER}:/oai-ran/build/results-run.xml ${RESULT_DIR}/
|
||||
docker cp ${CONTAINER}:/oai-ran/build/Testing/Temporary/LastTestsFailed.log ${RESULT_DIR}/
|
||||
docker cp ${CONTAINER}:/oai-ran/build/Testing/Temporary/LastTest.log ${RESULT_DIR}/
|
||||
|
||||
# if both were successful, return 0
|
||||
# TODO not sure
|
||||
#[[ $JSON_RES -eq 0 && $RUN_RES -eq 0 ]] && exit 0
|
||||
|
||||
exit 0
|
||||
@@ -24,8 +24,7 @@
|
||||
- Undeploy_Object
|
||||
- Cppcheck_Analysis
|
||||
- Deploy_Run_OC_PhySim
|
||||
- Build_Deploy_Docker_PhySim
|
||||
- Build_Deploy_Source_PhySim
|
||||
- Build_Deploy_PhySim
|
||||
- LicenceAndFormattingCheck
|
||||
- Push_Local_Registry
|
||||
- Pull_Local_Registry
|
||||
|
||||
130
ci-scripts/xml_files/container_5g_vrtsim_cirdb.xml
Normal file
130
ci-scripts/xml_files/container_5g_vrtsim_cirdb.xml
Normal file
@@ -0,0 +1,130 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>vrtsim-5gnr-cirdb</htmlTabRef>
|
||||
<htmlTabName>Monolithic gNB vrtsim + CIRDB</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
|
||||
<testCase>
|
||||
<class>Pull_Local_Registry</class>
|
||||
<desc>Pull Images from Local Registry</desc>
|
||||
<node>localhost</node>
|
||||
<images>oai-gnb oai-nr-ue</images>
|
||||
<tag_prefix>arm_</tag_prefix>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Create_Workspace</class>
|
||||
<desc>Create new Workspace</desc>
|
||||
<node>localhost</node>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy OAI 5G CoreNetwork</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_cirdb</yaml_path>
|
||||
<services>mysql oai-amf oai-smf oai-upf oai-ext-dn</services>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Deploy_Object</class>
|
||||
<desc>Deploy OAI 5G gNB+UE RF sim SA</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_cirdb</yaml_path>
|
||||
<services>oai-gnb oai-nr-ue</services>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Attach_UE</class>
|
||||
<desc>Attach OAI UE (Wait for IP)</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Ping</class>
|
||||
<desc>Ping ext-dn from NR-UE</desc>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Ping</class>
|
||||
<desc>Ping NR-UE from ext-dn</desc>
|
||||
<id>rfsim5g_ext_dn</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ue</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<ping_args>-c 20 -i 0.25</ping_args>
|
||||
<ping_packetloss_threshold>5</ping_packetloss_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf (DL/3Mbps/UDP)(20 sec)</desc>
|
||||
<iperf_args>-u -b 3M -t 20 -R</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Iperf</class>
|
||||
<desc>Iperf (UL/1Mbps/UDP)(20 sec)</desc>
|
||||
<iperf_args>-u -b 1M -t 20</iperf_args>
|
||||
<id>rfsim5g_ue</id>
|
||||
<node>localhost</node>
|
||||
<svr_id>rfsim5g_ext_dn</svr_id>
|
||||
<svr_node>localhost</svr_node>
|
||||
<iperf_packetloss_threshold>5</iperf_packetloss_threshold>
|
||||
<iperf_bitrate_threshold>90</iperf_bitrate_threshold>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Undeploy_Object</class>
|
||||
<always_exec>true</always_exec>
|
||||
<desc>Undeploy all OAI 5G stack</desc>
|
||||
<node>localhost</node>
|
||||
<yaml_path>ci-scripts/yaml_files/5g_vrtsim_cirdb</yaml_path>
|
||||
<d_retx_th>10,0,0,0</d_retx_th>
|
||||
<u_retx_th>1,0,0,0</u_retx_th>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Clean_Test_Server_Images</class>
|
||||
<always_exec>true</always_exec>
|
||||
<desc>Clean Test Images on Test Server</desc>
|
||||
<node>localhost</node>
|
||||
<images>oai-gnb oai-nr-ue</images>
|
||||
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
@@ -32,8 +32,9 @@
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Build_Deploy_Docker_PhySim</class>
|
||||
<desc>Build and Deploy PhySim</desc>
|
||||
<class>Build_Deploy_PhySim</class>
|
||||
<desc>Build and Deploy PhySim in Docker</desc>
|
||||
<script>scripts/docker-build-and-deploy-physims.sh</script>
|
||||
<node>localhost</node>
|
||||
<ctest-opt>-R 5g -E "nr_dlsim|nr_ulsim|ldpctest" -j32</ctest-opt>
|
||||
</testCase>
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Build_Deploy_Docker_PhySim</class>
|
||||
<class>Build_Deploy_PhySim</class>
|
||||
<desc>Build and Deploy PhySim with timing check</desc>
|
||||
<script>scripts/docker-build-and-deploy-physims.sh</script>
|
||||
<node>localhost</node>
|
||||
<ctest-opt>-R 5g -R "nr_dlsim|nr_ulsim|ldpctest" -E physim.5g.nr_dlsim.mcs.mimo.test9 -j1</ctest-opt>
|
||||
</testCase>
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Build_Deploy_Source_PhySim</class>
|
||||
<class>Build_Deploy_PhySim</class>
|
||||
<desc>Build and Deploy PhySim T2 Offload tests</desc>
|
||||
<script>scripts/source-deploy-physims.sh</script>
|
||||
<node>caracal</node>
|
||||
<ctest-opt>-R 5g-offload -j1</ctest-opt>
|
||||
</testCase>
|
||||
|
||||
43
ci-scripts/xml_files/test_channel_sim_gracehopper.xml
Normal file
43
ci-scripts/xml_files/test_channel_sim_gracehopper.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<!--
|
||||
|
||||
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
|
||||
|
||||
-->
|
||||
<testCaseList>
|
||||
<htmlTabRef>channelsim-tab</htmlTabRef>
|
||||
<htmlTabName>ChannelSim</htmlTabName>
|
||||
<htmlTabIcon>wrench</htmlTabIcon>
|
||||
|
||||
<testCase>
|
||||
<class>Create_Workspace</class>
|
||||
<desc>Create new Workspace</desc>
|
||||
<node>localhost</node>
|
||||
</testCase>
|
||||
|
||||
<testCase>
|
||||
<class>Build_Deploy_PhySim</class>
|
||||
<desc>Build and Deploy Test Channel Simulation</desc>
|
||||
<script>scripts/docker-build-and-deploy-chansim.sh</script>
|
||||
<node>localhost</node>
|
||||
<ctest-opt>-R cuda.5g.channelsim</ctest-opt>
|
||||
</testCase>
|
||||
|
||||
</testCaseList>
|
||||
|
||||
183
ci-scripts/yaml_files/5g_vrtsim_cirdb/docker-compose.yaml
Normal file
183
ci-scripts/yaml_files/5g_vrtsim_cirdb/docker-compose.yaml
Normal file
@@ -0,0 +1,183 @@
|
||||
services:
|
||||
# CIR Generator service - generates CIRDB files on every CI run
|
||||
cir-generator:
|
||||
image: oaisoftwarealliance/cir-generator:test
|
||||
environment:
|
||||
GENERATOR_ARGS: "--demo"
|
||||
OUTPUT: "--out /opt/output/cir_db.bin"
|
||||
volumes:
|
||||
- cirdb_data:/opt/output
|
||||
|
||||
mysql:
|
||||
container_name: "rfsim5g-mysql"
|
||||
image: mysql:8.0
|
||||
init: true
|
||||
volumes:
|
||||
- ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ../5g_rfsimulator/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASSWORD=test
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
retries: 30
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.131
|
||||
|
||||
oai-amf:
|
||||
container_name: "rfsim5g-oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:v2.1.10
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
|
||||
depends_on:
|
||||
- mysql
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.132
|
||||
|
||||
oai-smf:
|
||||
container_name: "rfsim5g-oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:v2.1.10
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.133
|
||||
|
||||
oai-upf:
|
||||
container_name: "rfsim5g-oai-upf"
|
||||
image: oaisoftwarealliance/oai-upf:v2.1.10
|
||||
init: true
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
volumes:
|
||||
- ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
|
||||
depends_on:
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
cap_drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.134
|
||||
interface_name: eth0
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.134
|
||||
interface_name: eth1
|
||||
|
||||
oai-ext-dn:
|
||||
privileged: true
|
||||
container_name: rfsim5g-oai-ext-dn
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:latest
|
||||
init: true
|
||||
entrypoint: /bin/bash -c \
|
||||
"iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
|
||||
"ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
|
||||
depends_on:
|
||||
- oai-upf
|
||||
networks:
|
||||
traffic_net:
|
||||
ipv4_address: 192.168.72.135
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ping -c 2 192.168.72.134"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
|
||||
oai-gnb:
|
||||
image: ${REGISTRY-oaisoftwarealliance/}${GNB_IMG:-oai-gnb}:${TAG:-develop}
|
||||
container_name: rfsim5g-oai-gnb
|
||||
cap_drop:
|
||||
- ALL
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E --log_config.global_log_options level,nocolor,time --device.name vrtsim --vrtsim.role server --vrtsim.cirdb 1 --vrtsim.cirdb_file /cirdb/cir_db.bin --vrtsim.cirdb_yaml /cirdb/cir_db.yaml --vrtsim.cirdb_model_id 0 --vrtsim.cirdb_ds_ns 1 --vrtsim.cirdb_speed_mps 1.5
|
||||
depends_on:
|
||||
cir-generator:
|
||||
condition: service_completed_successfully
|
||||
oai-ext-dn:
|
||||
condition: service_started
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.140
|
||||
volumes:
|
||||
- ../../conf_files/gnb.sa.band78.106prb.vrtsim.2x2.yaml:/opt/oai-gnb/etc/gnb.yaml
|
||||
- cirdb_data:/cirdb:ro
|
||||
- tmp_data:/tmp/
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-softmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
retries: 5
|
||||
ipc: host
|
||||
|
||||
oai-nr-ue:
|
||||
image: ${REGISTRY-oaisoftwarealliance/}${NRUE_IMG:-oai-nr-ue}:${TAG:-develop}
|
||||
container_name: rfsim5g-oai-nr-ue
|
||||
cap_drop:
|
||||
- ALL
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- NET_RAW
|
||||
environment:
|
||||
USE_ADDITIONAL_OPTIONS: -E -r 106 --numerology 1 --band 78 -C 3619200000 --ssb 516 --uicc0.imsi 208990100001100 --log_config.global_log_options level,nocolor,time --device.name vrtsim --vrtsim.role client
|
||||
depends_on:
|
||||
- oai-gnb
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.71.150
|
||||
devices:
|
||||
- /dev/net/tun:/dev/net/tun
|
||||
volumes:
|
||||
- ../../conf_files/nrue.vrtsim.chanmod.yaml:/opt/oai-nr-ue/etc/nr-ue.yaml
|
||||
- tmp_data:/tmp/
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep nr-uesoftmodem"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
start_interval: 500ms
|
||||
ipc: host
|
||||
|
||||
networks:
|
||||
public_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.71.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-public"
|
||||
traffic_net:
|
||||
driver: bridge
|
||||
name: rfsim5g-oai-traffic-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.72.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "rfsim5g-traffic"
|
||||
|
||||
volumes:
|
||||
tmp_data:
|
||||
cirdb_data:
|
||||
@@ -36,9 +36,8 @@ set_openair_env
|
||||
# Variables for UE data generation
|
||||
conf_nvram_path=$OPENAIR_DIR/openair3/NAS/TOOLS/ue_eurecom_test_sfr.conf
|
||||
|
||||
HW=""
|
||||
HWs=""
|
||||
BUILD_DIR=ran_build
|
||||
DISABLE_HARDWARE_DEPENDENCY="False"
|
||||
CMAKE_BUILD_TYPE="RelWithDebInfo"
|
||||
CMAKE_CMD="$CMAKE"
|
||||
OPTIONAL_LIBRARIES="telnetsrv enbscope uescope nrscope ldpc_cuda ldpc_aal ldpc_xdma websrv oai_iqplayer imscope imscope_record"
|
||||
@@ -254,22 +253,22 @@ function main() {
|
||||
-w | --hardware)
|
||||
case "$2" in
|
||||
"USRP" | "BLADERF" | "LMSSDR" | "IRIS")
|
||||
HW="OAI_"$2
|
||||
HWs+=" OAI_"$2
|
||||
TARGET_LIST="$TARGET_LIST oai_${2,,}devif" # ,, makes lowercase
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_$2=ON"
|
||||
;;
|
||||
"SIMU")
|
||||
HW="OAI_"$2
|
||||
HWs+=" OAI_"$2
|
||||
TARGET_LIST="$TARGET_LIST rfsimulator"
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_$2=ON"
|
||||
;;
|
||||
"AW2SORI")
|
||||
HW="OAI_"$2
|
||||
HWs=" OAI_"$2
|
||||
TARGET_LIST="$TARGET_LIST aw2sori_transpro"
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_$2=ON"
|
||||
;;
|
||||
"AERIAL"|"Aerial"|"aerial")
|
||||
HW="OAI_AERIAL"
|
||||
HWs+=" OAI_AERIAL"
|
||||
CMAKE_CMD="$CMAKE_CMD -DOAI_AERIAL=ON"
|
||||
;;
|
||||
"None")
|
||||
@@ -328,10 +327,6 @@ function main() {
|
||||
CMAKE_CMD="$CMAKE_CMD -DT_TRACER=False"
|
||||
echo_info "Disabling the T tracer"
|
||||
shift 1;;
|
||||
--disable-hardware-dependency)
|
||||
echo_info "Disabling hardware dependency for compiling software"
|
||||
DISABLE_HARDWARE_DEPENDENCY="True"
|
||||
shift 1;;
|
||||
--ue-trace)
|
||||
CMAKE_CMD="$CMAKE_CMD -DUE_DEBUG_TRACE=False"
|
||||
echo_info "Enabling UE trace for debug"
|
||||
@@ -424,27 +419,23 @@ function main() {
|
||||
echo_info "installing LTTng"
|
||||
install_lttng $1
|
||||
fi
|
||||
if [ "$HW" == "OAI_USRP" ] ; then
|
||||
echo_info "installing packages for USRP support"
|
||||
check_install_usrp_uhd_driver
|
||||
if [ ! -v BUILD_UHD_FROM_SOURCE ] && [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
|
||||
install_usrp_uhd_driver $UHD_IMAGES_DIR
|
||||
for HW in $HWs; do
|
||||
if [ "$HW" == "OAI_USRP" ] ; then
|
||||
echo_info "installing packages for USRP support"
|
||||
check_install_usrp_uhd_driver
|
||||
if [ ! -v BUILD_UHD_FROM_SOURCE ]; then
|
||||
install_usrp_uhd_driver $UHD_IMAGES_DIR
|
||||
fi
|
||||
elif [ "$HW" == "OAI_BLADERF" ] ; then
|
||||
echo_info "installing packages for BLADERF support"
|
||||
check_install_bladerf_driver
|
||||
elif [ "$HW" == "OAI_IRIS" ] ; then
|
||||
echo_info "installing packages for IRIS support"
|
||||
check_install_soapy
|
||||
else
|
||||
echo_warning "no installation scripts for hardware $HW"
|
||||
fi
|
||||
fi
|
||||
if [ "$HW" == "OAI_BLADERF" ] ; then
|
||||
echo_info "installing packages for BLADERF support"
|
||||
check_install_bladerf_driver
|
||||
if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
|
||||
flash_firmware_bladerf
|
||||
fi
|
||||
fi
|
||||
if [ "$HW" == "OAI_IRIS" ] ; then
|
||||
echo_info "installing packages for IRIS support"
|
||||
check_install_soapy
|
||||
#if [ ! "$DISABLE_HARDWARE_DEPENDENCY" == "True" ]; then
|
||||
# flash_firmware_iris
|
||||
#fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$INSTALL_OPTIONAL" = "1" ] ; then
|
||||
|
||||
@@ -107,6 +107,7 @@ check_supported_distribution() {
|
||||
"ubuntu22.04") return 0 ;;
|
||||
"ubuntu20.04") return 0 ;;
|
||||
"debian11") return 0 ;;
|
||||
"debian12") return 0 ;;
|
||||
"fedora41") return 0 ;;
|
||||
"fedora40") return 0 ;;
|
||||
"rhel8.2") return 0 ;;
|
||||
@@ -345,19 +346,10 @@ install_bladerf_driver_from_source(){
|
||||
make
|
||||
$SUDO make install
|
||||
$SUDO ldconfig
|
||||
echo "Downloading FPGA and firmware images"
|
||||
cd /tmp/bladeRF
|
||||
#wget has been removed from default dependencies, so we must be sure that's installed
|
||||
$SUDO $INSTALLER -y install wget
|
||||
wget --tries=3 --retry-connrefused https://www.nuand.com/fx3/bladeRF_fw_latest.img
|
||||
wget --tries=3 --retry-connrefused https://www.nuand.com/fpga/hostedx40-latest.rbf
|
||||
sudo mkdir -p /usr/share/Nuand/bladeRF
|
||||
sudo mv bladeRF_fw_latest.img /usr/share/Nuand/bladeRF/bladeRF_fw.img
|
||||
sudo mv hostedx40-latest.rbf /usr/share/Nuand/bladeRF/hostedx40.rbf
|
||||
}
|
||||
|
||||
check_install_bladerf_driver(){
|
||||
if [[ "$OS_DISTRO" == "ubuntu" ]]; then
|
||||
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
|
||||
$SUDO apt-get install -y bladerf libbladerf-dev
|
||||
$SUDO apt-get install -y bladerf-firmware-fx3
|
||||
$SUDO apt-get install -y bladerf-fpga-hostedx40
|
||||
@@ -368,10 +360,6 @@ check_install_bladerf_driver(){
|
||||
fi
|
||||
}
|
||||
|
||||
flash_firmware_bladerf() {
|
||||
$SUDO bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
|
||||
}
|
||||
|
||||
check_install_lmssdr_driver(){
|
||||
if ( [ -d "/usr/local/include/lime" ] &&
|
||||
[ -f "/usr/local/include/lime/LimeSuite.h" ] )
|
||||
@@ -453,7 +441,7 @@ check_install_additional_tools (){
|
||||
local optional_packages=""
|
||||
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
|
||||
case "$(get_distribution_release)" in
|
||||
"ubuntu20.04" | "ubuntu22.04" | "debian11" )
|
||||
"ubuntu20.04" | "ubuntu22.04" | "debian11" | "debian12" )
|
||||
optional_packages="python3 python3-pip python3-dev python3-scipy python3-matplotlib python3-pyroute2 universal-ctags"
|
||||
;;
|
||||
esac
|
||||
@@ -496,7 +484,7 @@ check_install_oai_software() {
|
||||
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
|
||||
$SUDO apt install -y software-properties-common
|
||||
case "$(get_distribution_release)" in
|
||||
"debian11")
|
||||
"debian11" | "debian12" )
|
||||
specific_packages="libz-dev"
|
||||
;;
|
||||
esac
|
||||
@@ -508,9 +496,6 @@ check_install_oai_software() {
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
git \
|
||||
libblas-dev \
|
||||
liblapack-dev \
|
||||
liblapacke-dev \
|
||||
libreadline-dev \
|
||||
libconfig-dev \
|
||||
libsctp-dev \
|
||||
@@ -548,10 +533,6 @@ check_install_oai_software() {
|
||||
openssl-devel \
|
||||
patch \
|
||||
readline-devel \
|
||||
lapack \
|
||||
lapack-devel \
|
||||
blas \
|
||||
blas-devel \
|
||||
vim-common \
|
||||
zlib-devel \
|
||||
yaml-cpp-devel
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,12 +14,9 @@ add_subdirectory(nr)
|
||||
add_subdirectory(LOG)
|
||||
add_subdirectory(threadPool)
|
||||
add_subdirectory(time_manager)
|
||||
add_library(utils utils.c system.c time_meas.c time_stat.c tuntap_if.c)
|
||||
add_library(utils utils.c system.c time_meas.c time_stat.c tuntap_if.c reverse_bits.c)
|
||||
target_include_directories(utils PUBLIC .)
|
||||
target_link_libraries(utils PRIVATE ${T_LIB})
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory(hashtable/tests)
|
||||
endif()
|
||||
add_subdirectory(barrier)
|
||||
add_subdirectory(actor)
|
||||
add_subdirectory(shm_iq_channel)
|
||||
|
||||
@@ -21,7 +21,7 @@ incgen/T_IDs.h: $(GENIDS) T_messages.txt
|
||||
./$(GENIDS) T_messages.txt incgen/T_IDs.h
|
||||
|
||||
check_vcd: incgen/T_IDs.h incgen/T_messages.txt.h
|
||||
gcc -Wall -I. -I.. -I../itti -I../../../openair2/COMMON -Itracer -o _check_vcd check_vcd.c tracer/database.c tracer/utils.c -lm -pthread
|
||||
gcc -Wall -I. -I.. -I../../.. -I../itti -I../../../openair2/COMMON -Itracer -Iincgen -o _check_vcd check_vcd.c tracer/database.c tracer/utils.c -lm -pthread
|
||||
./_check_vcd T_messages.txt ../LOG/vcd_signal_dumper.h || (rm -rf ./_check_vcd ./incgen && false)
|
||||
rm -f ./_check_vcd
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ void usage(void)
|
||||
" (you can use several -f options)\n"
|
||||
" -after <raw time> <nsec> 'event' time has to be greater than this\n"
|
||||
" -count <n> dump 'n' matching events (less if EOF reached)\n"
|
||||
" (default: no limit)\n"
|
||||
);
|
||||
exit(1);
|
||||
}
|
||||
@@ -53,7 +54,7 @@ int main(int n, char **v)
|
||||
int filter_count = 0;
|
||||
int buffer_arg;
|
||||
int found;
|
||||
int count = 1;
|
||||
int count = -1;
|
||||
int check_time = 0;
|
||||
time_t sec = 0; /* initialization not necessary but gcc is not happy */
|
||||
long nsec = 0; /* initialization not necessary but gcc is not happy */
|
||||
@@ -132,12 +133,12 @@ int main(int n, char **v)
|
||||
if (fwrite(e.e[buffer_arg].b, e.e[buffer_arg].bsize, 1, out) != 1)
|
||||
{ perror(output_file); exit(1); }
|
||||
found++;
|
||||
if (found == count)
|
||||
if (count != -1 && found == count)
|
||||
break;
|
||||
}
|
||||
|
||||
if (found == 0) printf("ERROR: event not found\n");
|
||||
if (found != count)
|
||||
if (count != -1 && found != count)
|
||||
printf("WARNING: dumped %d events (wanted %d)\n", found, count);
|
||||
|
||||
fclose(out);
|
||||
|
||||
@@ -135,7 +135,7 @@ int main(int n, char **v)
|
||||
int input_is_float = 0;
|
||||
int no_fft = 0;
|
||||
int delay = 0;
|
||||
int skip = 0;
|
||||
uint64_t skip = 0;
|
||||
int symbols_per_subframe;
|
||||
long sampling_rate = 61440000;
|
||||
int mu = 1;
|
||||
@@ -152,7 +152,7 @@ int main(int n, char **v)
|
||||
if (!strcmp(v[i], "-srate")) { if (i>n-2) usage(); sampling_rate = atol(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-prb")) { if (i>n-2) usage(); prb = atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-mu")) { if (i>n-2) usage(); mu = atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-skip")) { if (i>n-2) usage(); skip = atoi(v[++i]); continue; }
|
||||
if (!strcmp(v[i], "-skip")) { if (i>n-2) usage(); skip = atoll(v[++i]); continue; }
|
||||
usage();
|
||||
}
|
||||
|
||||
@@ -222,14 +222,14 @@ int main(int n, char **v)
|
||||
int back_color = 0;
|
||||
int hpixel = 0;
|
||||
|
||||
if (skip) {
|
||||
if (input_is_float) {
|
||||
float intime[skip * 2];
|
||||
if (fread(intime, skip * 8, 1, stdin) != 1) abort();
|
||||
} else {
|
||||
short intime[skip * 2];
|
||||
if (fread(intime, skip * 4, 1, stdin) != 1) abort();
|
||||
}
|
||||
/* skip data */
|
||||
int sample_size = input_is_float ? 8 : 4;
|
||||
uint64_t to_skip = skip;
|
||||
while (to_skip) {
|
||||
char intime[4096 * sample_size];
|
||||
int count = to_skip > 4096 ? 4096 : to_skip;
|
||||
if (fread(intime, count * sample_size, 1, stdin) != 1) abort();
|
||||
to_skip -= count;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
@@ -387,6 +389,7 @@ void sr(void *_d, event e)
|
||||
#define MAC_NR_HARQID 0x06
|
||||
#define MAC_NR_FRAME_SLOT_TAG 0x07
|
||||
|
||||
#define NR_FDD_RADIO 1
|
||||
#define NR_TDD_RADIO 2
|
||||
|
||||
#define NR_DIRECTION_UPLINK 0
|
||||
@@ -948,6 +951,18 @@ void usage(void)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
volatile int run = 1;
|
||||
|
||||
static int sock = -1;
|
||||
|
||||
void force_stop(int x)
|
||||
{
|
||||
printf("\ngently quit...\n");
|
||||
close(sock);
|
||||
sock = -1;
|
||||
run = 0;
|
||||
}
|
||||
|
||||
int main(int n, char **v)
|
||||
{
|
||||
char *database_filename = NULL;
|
||||
@@ -968,6 +983,9 @@ int main(int n, char **v)
|
||||
int live = 0;
|
||||
memset(&d, 0, sizeof(ev_data));
|
||||
|
||||
/* write on a socket fails if the other end is closed and we get SIGPIPE */
|
||||
if (signal(SIGPIPE, SIG_IGN) == SIG_ERR) abort();
|
||||
|
||||
for (i = 0; i < 65536; i++) {
|
||||
d.lte_rnti_to_ueid[i] = -1;
|
||||
d.nr_rnti_to_ueid[i] = -1;
|
||||
@@ -1014,8 +1032,10 @@ int main(int n, char **v)
|
||||
perror(input_filename);
|
||||
return 1;
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
in = connect_to(live_ip, live_port);
|
||||
sock = in;
|
||||
}
|
||||
|
||||
database = parse_database(database_filename);
|
||||
load_config_file(database_filename);
|
||||
@@ -1121,10 +1141,15 @@ int main(int n, char **v)
|
||||
new_thread(receiver, &d);
|
||||
}
|
||||
|
||||
/* exit on ctrl+c and ctrl+z */
|
||||
if (signal(SIGQUIT, force_stop) == SIG_ERR) abort();
|
||||
if (signal(SIGINT, force_stop) == SIG_ERR) abort();
|
||||
if (signal(SIGTSTP, force_stop) == SIG_ERR) abort();
|
||||
|
||||
OBUF ebuf = {.osize = 0, .omaxsize = 0, .obuf = NULL};
|
||||
|
||||
/* read messages */
|
||||
while (1) {
|
||||
while (run) {
|
||||
event e;
|
||||
e = get_event(in, &ebuf, database);
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@ add_library(ds OBJECT
|
||||
byte_array.c
|
||||
byte_array_producer.c
|
||||
seq_arr.c
|
||||
hashtable.c
|
||||
obj_hashtable.c
|
||||
)
|
||||
|
||||
target_include_directories(ds PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@@ -2,3 +2,9 @@ add_executable(test_seq_arr test_seq_array.c)
|
||||
target_link_libraries(test_seq_arr ds alg)
|
||||
add_dependencies(tests test_seq_arr)
|
||||
add_test(NAME test_seq_arr COMMAND test_seq_arr) # no options required
|
||||
|
||||
add_executable(test_hashtable test_hashtable.cpp)
|
||||
add_dependencies(tests test_hashtable)
|
||||
target_link_libraries(test_hashtable PRIVATE ds GTest::gtest)
|
||||
add_test(NAME test_hashtable
|
||||
COMMAND ./test_hashtable)
|
||||
|
||||
81
common/utils/eq_check.h
Normal file
81
common/utils/eq_check.h
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* 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 EQ_CHECK_H_
|
||||
#define EQ_CHECK_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/*
|
||||
* Layers may override PRINT_ERROR() before including this header to preserve
|
||||
* custom logging style (for example by mapping it to a local PRINT_ERROR()).
|
||||
*/
|
||||
|
||||
#ifndef PRINT_ERROR
|
||||
#ifdef ENABLE_TESTS
|
||||
#define PRINT_ERROR(fmt, ...) fprintf(stderr, "%s:%d: " fmt, __FILE__, __LINE__, ##__VA_ARGS__)
|
||||
#else
|
||||
#define PRINT_ERROR(...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef EQ_CHECK_FAIL
|
||||
#define EQ_CHECK_FAIL() return false
|
||||
#endif
|
||||
|
||||
#define EQ_CHECK_GENERIC(condition, fmt, ...) \
|
||||
do { \
|
||||
if (!(condition)) { \
|
||||
PRINT_ERROR("Equality condition '%s' failed: " fmt " != " fmt "\n", #condition, ##__VA_ARGS__); \
|
||||
EQ_CHECK_FAIL(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define _EQ_CHECK_LONG(A, B) EQ_CHECK_GENERIC((A) == (B), "%ld", (A), (B))
|
||||
#define _EQ_CHECK_INT(A, B) EQ_CHECK_GENERIC((A) == (B), "%d", (A), (B))
|
||||
#define _EQ_CHECK_UINT32(A, B) EQ_CHECK_GENERIC((A) == (B), "%u", (A), (B))
|
||||
#define _EQ_CHECK_UINT64(A, B) EQ_CHECK_GENERIC((A) == (B), "%" PRIu64, (uint64_t)(A), (uint64_t)(B))
|
||||
#define _EQ_CHECK_STR(A, B) EQ_CHECK_GENERIC(strcmp((A), (B)) == 0, "'%s'", (A), (B))
|
||||
|
||||
#define _EQ_CHECK_OPTIONAL_IE(A, B, FIELD, EQ_MACRO) \
|
||||
do { \
|
||||
EQ_CHECK_GENERIC((((A)->FIELD) != NULL) == (((B)->FIELD) != NULL), "%d", ((A)->FIELD) != NULL, ((B)->FIELD) != NULL); \
|
||||
if ((A)->FIELD && (B)->FIELD) \
|
||||
EQ_MACRO(*(A)->FIELD, *(B)->FIELD); \
|
||||
} while (0)
|
||||
|
||||
#define _EQ_CHECK_OPTIONAL_PTR(A, B, FIELD) \
|
||||
do { \
|
||||
if ((((A)->FIELD) != NULL) != (((B)->FIELD) != NULL)) { \
|
||||
PRINT_ERROR("%s:%d: optional IE '%s' not allocated: %p, %p\n", \
|
||||
__FILE__, \
|
||||
__LINE__, \
|
||||
#FIELD, \
|
||||
(void *)(A)->FIELD, \
|
||||
(void *)(B)->FIELD); \
|
||||
EQ_CHECK_FAIL(); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif /* EQ_CHECK_H_ */
|
||||
@@ -1,5 +0,0 @@
|
||||
add_executable(test_hashtable test_hashtable.cpp)
|
||||
add_dependencies(tests test_hashtable)
|
||||
target_link_libraries(test_hashtable PRIVATE HASHTABLE GTest::gtest)
|
||||
add_test(NAME test_hashtable
|
||||
COMMAND ./test_hashtable)
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "nr_common.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#include <simde/x86/gfni.h>
|
||||
|
||||
#define C_SRS_NUMBER (64)
|
||||
#define B_SRS_NUMBER (4)
|
||||
@@ -112,46 +111,6 @@ static const unsigned short srs_bandwidth_config[C_SRS_NUMBER][B_SRS_NUMBER][2]
|
||||
/* 63 */ {{272, 1}, {16, 17}, {8, 2}, {4, 2}},
|
||||
};
|
||||
|
||||
static const uint8_t bit_reverse_table_256[] = {
|
||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8,
|
||||
0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
|
||||
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC,
|
||||
0x3C, 0xBC, 0x7C, 0xFC, 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
|
||||
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, 0x06, 0x86, 0x46, 0xC6,
|
||||
0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1,
|
||||
0x31, 0xB1, 0x71, 0xF1, 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
|
||||
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, 0x0D, 0x8D, 0x4D, 0xCD,
|
||||
0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
|
||||
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB,
|
||||
0x3B, 0xBB, 0x7B, 0xFB, 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF};
|
||||
|
||||
void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out)
|
||||
{
|
||||
DevAssert(in != NULL);
|
||||
DevAssert(out != NULL);
|
||||
|
||||
// Bit reversal implementation based on https://wunkolo.github.io/post/2020/11/gf2p8affineqb-bit-reversal/
|
||||
#if defined(__GFNI__) && defined(__AVX512F__)
|
||||
int simde_sz = 64;
|
||||
int i = 0;
|
||||
int simde_bound = sz - simde_sz;
|
||||
for (; i <= simde_bound; i += simde_sz) {
|
||||
__m512i input = _mm512_loadu_epi8(&in[i]);
|
||||
__m512i reversed = _mm512_gf2p8affine_epi64_epi8(input, _mm512_set1_epi64(0x8040201008040201), 0);
|
||||
_mm512_storeu_epi8(&out[i], reversed);
|
||||
}
|
||||
|
||||
for (; i < sz; ++i) {
|
||||
out[i] = bit_reverse_table_256[in[i]];
|
||||
}
|
||||
#else
|
||||
for(size_t i = 0; i < sz; ++i)
|
||||
out[i] = bit_reverse_table_256[in[i]];
|
||||
#endif
|
||||
}
|
||||
|
||||
/** @brief 3GPP TS 38.133 Table 10.1.6.1-1 mapping from dBm to RSRP index */
|
||||
uint8_t get_rsrp_index(int rsrp_dBm)
|
||||
{
|
||||
@@ -163,31 +122,6 @@ uint8_t get_rsrp_index(int rsrp_dBm)
|
||||
return (uint8_t)index;
|
||||
}
|
||||
|
||||
// Reverse bits implementation based on http://graphics.stanford.edu/~seander/bithacks.html
|
||||
uint64_t reverse_bits(uint64_t in, int n_bits)
|
||||
{
|
||||
// Reverse n_bits in uint64_t variable, example:
|
||||
// n_bits: 10
|
||||
// in: 10 0000 1111
|
||||
// return: 11 1100 0001
|
||||
|
||||
AssertFatal(n_bits <= 64, "Maximum bits to reverse is 64, impossible to reverse %d bits!\n", n_bits);
|
||||
uint64_t rev_bits = 0;
|
||||
uint8_t *p = (uint8_t *)∈
|
||||
uint8_t *q = (uint8_t *)&rev_bits;
|
||||
int n_bytes = n_bits >> 3;
|
||||
for (int n = 0; n < n_bytes; n++) {
|
||||
q[n_bytes - 1 - n] = bit_reverse_table_256[p[n]];
|
||||
}
|
||||
|
||||
// Reverse remaining bits (not aligned with 8-bit)
|
||||
rev_bits = rev_bits << (n_bits % 8);
|
||||
for (int i = n_bytes * 8; i < n_bits; i++) {
|
||||
rev_bits |= ((in >> i) & 0x1) << (n_bits - i - 1);
|
||||
}
|
||||
return rev_bits;
|
||||
}
|
||||
|
||||
#define NUM_BW_ENTRIES 15
|
||||
|
||||
static const int tables_5_3_2[5][NUM_BW_ENTRIES] = {
|
||||
@@ -1447,6 +1381,31 @@ unsigned short get_N_b_srs(int c_srs, int b_srs) {
|
||||
return srs_bandwidth_config[c_srs][b_srs][1];
|
||||
}
|
||||
|
||||
// TODO: Implement to b_SRS = 1 and b_SRS = 2
|
||||
long rrc_get_max_nr_csrs(const int max_rbs, const long b_SRS)
|
||||
{
|
||||
if(b_SRS>0) {
|
||||
LOG_E(NR_RRC,"rrc_get_max_nr_csrs(): Not implemented yet for b_SRS>0\n");
|
||||
return 0; // This c_srs is always valid
|
||||
}
|
||||
|
||||
const uint16_t m_SRS[64] = { 4, 8, 12, 16, 16, 20, 24, 24, 28, 32, 36, 40, 48, 48, 52, 56, 60, 64, 72, 72, 76, 80, 88,
|
||||
96, 96, 104, 112, 120, 120, 120, 128, 128, 128, 132, 136, 144, 144, 144, 144, 152, 160,
|
||||
160, 160, 168, 176, 184, 192, 192, 192, 192, 208, 216, 224, 240, 240, 240, 240, 256, 256,
|
||||
256, 264, 272, 272, 272 };
|
||||
|
||||
long c_srs = 0;
|
||||
uint16_t m = 4;
|
||||
for(int c = 1; c<64; c++) {
|
||||
if(m_SRS[c]>m && m_SRS[c]<max_rbs) {
|
||||
c_srs = c;
|
||||
m = m_SRS[c];
|
||||
}
|
||||
}
|
||||
|
||||
return c_srs;
|
||||
}
|
||||
|
||||
frequency_range_t get_freq_range_from_freq(uint64_t freq)
|
||||
{
|
||||
// 3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges
|
||||
@@ -1487,3 +1446,90 @@ float get_beta_dmrs(int num_cdm_groups_no_data, bool is_type2)
|
||||
}
|
||||
return beta_dmrs_pusch;
|
||||
}
|
||||
|
||||
/** @brief Construct full 5G-S-TMSI from 5G-S-TMSI components
|
||||
* @param amf_set_id AMF Set ID (10 bits)
|
||||
* @param amf_pointer AMF Pointer (6 bits)
|
||||
* @param m_tmsi 5G-TMSI (32 bits)
|
||||
* @return Full 5G-S-TMSI (48 bits)
|
||||
* @note The 5G-S-TMSI is constructed as a 48-bit value:
|
||||
* - Bits 38-47: AMF Set ID (10 bits)
|
||||
* - Bits 32-37: AMF Pointer (6 bits)
|
||||
* - Bits 0-31: 5G-TMSI (32 bits)
|
||||
* @ref 3GPP TS 23.003 */
|
||||
uint64_t nr_construct_5g_s_tmsi(uint16_t amf_set_id, uint8_t amf_pointer, uint32_t m_tmsi)
|
||||
{
|
||||
// Construct full 5G-S-TMSI: <AMF Set ID (10 bits)><AMF Pointer (6 bits)><5G-TMSI (32 bits)>
|
||||
return ((uint64_t)amf_set_id << 38) | ((uint64_t)amf_pointer << 32) | m_tmsi;
|
||||
}
|
||||
|
||||
/** @brief Extract 5G-S-TMSI-Part1 from full 5G-S-TMSI
|
||||
* @param fiveg_s_tmsi Full 5G-S-TMSI (48 bits)
|
||||
* @return 5G-S-TMSI-Part1 (rightmost 39 bits)
|
||||
* @note 5G-S-TMSI-Part1 is the rightmost 39 bits of the full 5G-S-TMSI:
|
||||
* - Bits 32-37: AMF Pointer (6 bits)
|
||||
* - Bits 0-31: 5G-TMSI (32 bits)
|
||||
* @ref 3GPP TS 23.003 */
|
||||
uint64_t nr_extract_5g_s_tmsi_part1(const uint64_t fiveg_s_tmsi)
|
||||
{
|
||||
return fiveg_s_tmsi & ((1ULL << 39) - 1);
|
||||
}
|
||||
|
||||
/** @brief Construct 5G-S-TMSI-Part1 from 5G-S-TMSI components
|
||||
* @param amf_set_id AMF Set ID (10 bits)
|
||||
* @param amf_pointer AMF Pointer (6 bits)
|
||||
* @param m_tmsi 5G-TMSI (32 bits)
|
||||
* @return 5G-S-TMSI-Part1 (rightmost 39 bits of the full 5G-S-TMSI)
|
||||
* @note 5G-S-TMSI-Part1 is the rightmost 39 bits of the full 5G-S-TMSI:
|
||||
* - Bits 32-37: AMF Pointer (6 bits)
|
||||
* - Bits 0-31: 5G-TMSI (32 bits)
|
||||
* @ref 3GPP TS 23.003 */
|
||||
uint64_t nr_construct_5g_s_tmsi_part1(uint16_t amf_set_id, uint8_t amf_pointer, uint32_t m_tmsi)
|
||||
{
|
||||
// Construct full 5G-S-TMSI and extract Part1: rightmost 39 bits
|
||||
uint64_t full_s_tmsi = nr_construct_5g_s_tmsi(amf_set_id, amf_pointer, m_tmsi);
|
||||
return nr_extract_5g_s_tmsi_part1(full_s_tmsi);
|
||||
}
|
||||
|
||||
/** @brief Extract 5G-S-TMSI-Part2 from full 5G-S-TMSI
|
||||
* @param fiveg_s_tmsi Full 5G-S-TMSI (48 bits)
|
||||
* @return 5G-S-TMSI-Part2 (leftmost 9 bits)
|
||||
* @note 5G-S-TMSI-Part2 is the leftmost 9 bits of the full 5G-S-TMSI:
|
||||
* - Bits 39-47: AMF Set ID (9 bits)
|
||||
* @ref 3GPP TS 23.003 */
|
||||
uint16_t nr_extract_5g_s_tmsi_part2(const uint64_t fiveg_s_tmsi)
|
||||
{
|
||||
return (fiveg_s_tmsi >> 39) & ((1ULL << 9) - 1);
|
||||
}
|
||||
|
||||
/** @brief Build full 5G-S-TMSI from Part1 and Part2
|
||||
* @param part1 5G-S-TMSI-Part1 (rightmost 39 bits)
|
||||
* @param part2 5G-S-TMSI-Part2 (leftmost 9 bits)
|
||||
* @return Full 5G-S-TMSI (48 bits)
|
||||
* @note Combines Part2 (leftmost 9 bits) and Part1 (rightmost 39 bits)
|
||||
* @ref 3GPP TS 23.003 */
|
||||
uint64_t nr_build_full_5g_s_tmsi(const uint64_t part1, const uint16_t part2)
|
||||
{
|
||||
return ((uint64_t)part2 << 39) | part1;
|
||||
}
|
||||
|
||||
/** @brief Deconstruct full 5G-S-TMSI into its components
|
||||
* @param fiveg_s_tmsi Full 5G-S-TMSI (48 bits)
|
||||
* @param[out] amf_set_id Pointer to store AMF Set ID (10 bits)
|
||||
* @param[out] amf_pointer Pointer to store AMF Pointer (6 bits)
|
||||
* @param[out] m_tmsi Pointer to store 5G-TMSI (32 bits)
|
||||
* @note The 5G-S-TMSI is deconstructed from a 48-bit value:
|
||||
* - Bits 38-47: AMF Set ID (10 bits)
|
||||
* - Bits 32-37: AMF Pointer (6 bits)
|
||||
* - Bits 0-31: 5G-TMSI (32 bits)
|
||||
* @ref 3GPP TS 23.003 */
|
||||
void nr_deconstruct_5g_s_tmsi(const uint64_t fiveg_s_tmsi, uint16_t *amf_set_id, uint8_t *amf_pointer, uint32_t *m_tmsi)
|
||||
{
|
||||
DevAssert(amf_set_id != NULL);
|
||||
DevAssert(amf_pointer != NULL);
|
||||
DevAssert(m_tmsi != NULL);
|
||||
|
||||
*amf_set_id = fiveg_s_tmsi >> 38;
|
||||
*amf_pointer = (fiveg_s_tmsi >> 32) & 0x3F;
|
||||
*m_tmsi = fiveg_s_tmsi;
|
||||
}
|
||||
|
||||
@@ -286,9 +286,6 @@ static inline void warn_higher_threequarter_fs(const int n_rb, const int mu)
|
||||
mu);
|
||||
}
|
||||
|
||||
uint64_t reverse_bits(uint64_t in, int n_bits);
|
||||
void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out);
|
||||
|
||||
uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t dl_nrarfcn);
|
||||
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, uint32_t bw);
|
||||
|
||||
@@ -357,6 +354,24 @@ frequency_range_t get_freq_range_from_band(uint16_t band);
|
||||
*/
|
||||
float get_beta_dmrs(int num_cdm_groups_no_data, bool is_type2);
|
||||
|
||||
/** @brief Construct full 5G-S-TMSI from 5G-S-TMSI components */
|
||||
uint64_t nr_construct_5g_s_tmsi(uint16_t amf_set_id, uint8_t amf_pointer, uint32_t m_tmsi);
|
||||
|
||||
/** @brief Construct 5G-S-TMSI-Part1 from 5G-S-TMSI components */
|
||||
uint64_t nr_construct_5g_s_tmsi_part1(uint16_t amf_set_id, uint8_t amf_pointer, uint32_t m_tmsi);
|
||||
|
||||
/** @brief Extract 5G-S-TMSI-Part1 from full 5G-S-TMSI */
|
||||
uint64_t nr_extract_5g_s_tmsi_part1(const uint64_t fiveg_s_tmsi);
|
||||
|
||||
/** @brief Extract 5G-S-TMSI-Part2 from full 5G-S-TMSI */
|
||||
uint16_t nr_extract_5g_s_tmsi_part2(const uint64_t fiveg_s_tmsi);
|
||||
|
||||
/** @brief Build full 5G-S-TMSI from Part1 and Part2 */
|
||||
uint64_t nr_build_full_5g_s_tmsi(const uint64_t part1, const uint16_t part2);
|
||||
|
||||
/** @brief Deconstruct full 5G-S-TMSI into its components */
|
||||
void nr_deconstruct_5g_s_tmsi(const uint64_t fiveg_s_tmsi, uint16_t *amf_set_id, uint8_t *amf_pointer, uint32_t *m_tmsi);
|
||||
|
||||
#define CEILIDIV(a,b) ((a+b-1)/b)
|
||||
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))
|
||||
#define BOUNDED_EVAL(a, b, c) (min(c, max(a, b)))
|
||||
|
||||
92
common/utils/reverse_bits.c
Normal file
92
common/utils/reverse_bits.c
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* 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 "reverse_bits.h"
|
||||
// we avoid assertions.h as it necessitates othe dependencies (e.g., exit_function)
|
||||
#include <assert.h>
|
||||
#include <simde/x86/gfni.h>
|
||||
|
||||
static const uint8_t bit_reverse_table_256[] = {
|
||||
0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8,
|
||||
0x28, 0xA8, 0x68, 0xE8, 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4,
|
||||
0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, 0x1C, 0x9C, 0x5C, 0xDC,
|
||||
0x3C, 0xBC, 0x7C, 0xFC, 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2,
|
||||
0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, 0x06, 0x86, 0x46, 0xC6,
|
||||
0x26, 0xA6, 0x66, 0xE6, 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE,
|
||||
0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1,
|
||||
0x31, 0xB1, 0x71, 0xF1, 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9,
|
||||
0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, 0x0D, 0x8D, 0x4D, 0xCD,
|
||||
0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3,
|
||||
0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB,
|
||||
0x3B, 0xBB, 0x7B, 0xFB, 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7,
|
||||
0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF};
|
||||
|
||||
void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out)
|
||||
{
|
||||
assert(in != NULL);
|
||||
assert(out != NULL);
|
||||
|
||||
// Bit reversal implementation based on https://wunkolo.github.io/post/2020/11/gf2p8affineqb-bit-reversal/
|
||||
#if defined(__GFNI__) && defined(__AVX512F__)
|
||||
int simde_sz = 64;
|
||||
int i = 0;
|
||||
int simde_bound = sz - simde_sz;
|
||||
for (; i <= simde_bound; i += simde_sz) {
|
||||
__m512i input = _mm512_loadu_epi8(&in[i]);
|
||||
__m512i reversed = _mm512_gf2p8affine_epi64_epi8(input, _mm512_set1_epi64(0x8040201008040201), 0);
|
||||
_mm512_storeu_epi8(&out[i], reversed);
|
||||
}
|
||||
|
||||
for (; i < sz; ++i) {
|
||||
out[i] = bit_reverse_table_256[in[i]];
|
||||
}
|
||||
#else
|
||||
for(size_t i = 0; i < sz; ++i)
|
||||
out[i] = bit_reverse_table_256[in[i]];
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// Reverse bits implementation based on http://graphics.stanford.edu/~seander/bithacks.html
|
||||
uint64_t reverse_bits(uint64_t in, int n_bits)
|
||||
{
|
||||
// Reverse n_bits in uint64_t variable, example:
|
||||
// n_bits: 10
|
||||
// in: 10 0000 1111
|
||||
// return: 11 1100 0001
|
||||
|
||||
assert(n_bits <= 64); // Maximum bits to reverse is 64
|
||||
uint64_t rev_bits = 0;
|
||||
uint8_t *p = (uint8_t *)∈
|
||||
uint8_t *q = (uint8_t *)&rev_bits;
|
||||
int n_bytes = n_bits >> 3;
|
||||
for (int n = 0; n < n_bytes; n++) {
|
||||
q[n_bytes - 1 - n] = bit_reverse_table_256[p[n]];
|
||||
}
|
||||
|
||||
// Reverse remaining bits (not aligned with 8-bit)
|
||||
rev_bits = rev_bits << (n_bits % 8);
|
||||
for (int i = n_bytes * 8; i < n_bits; i++) {
|
||||
rev_bits |= ((in >> i) & 0x1) << (n_bits - i - 1);
|
||||
}
|
||||
return rev_bits;
|
||||
}
|
||||
|
||||
31
common/utils/reverse_bits.h
Normal file
31
common/utils/reverse_bits.h
Normal file
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* 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 REVERSE_BITS_H_
|
||||
#define REVERSE_BITS_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
uint64_t reverse_bits(uint64_t in, int n_bits);
|
||||
void reverse_bits_u8(uint8_t const* in, size_t sz, uint8_t* out);
|
||||
|
||||
#endif /* REVERSE_BITS_H_ */
|
||||
@@ -168,7 +168,7 @@ int fetch_du_by_ue_id(char *buf, int debug, telnet_printfunc_t prnt)
|
||||
nr_rrc_du_container_t *du = get_du_for_ue(RC.nrrrc[0], ue_id);
|
||||
|
||||
if (du) {
|
||||
prnt("gNB_DU_id %d is connected to ue_id %ld\n", du->setup_req->gNB_DU_id, ue_id);
|
||||
prnt("gNB_DU_id %ld is connected to ue_id %ld\n", du->gNB_DU_id, ue_id);
|
||||
return 0;
|
||||
} else {
|
||||
ERROR_MSG_RET("No DU connected\n");
|
||||
|
||||
@@ -109,6 +109,15 @@ int hex_char_to_hex_value (char c);
|
||||
// Converts an hexadecimal ASCII coded string into its value.**
|
||||
int hex_string_to_hex_value (uint8_t *hex_value, const char *hex_string, int size);
|
||||
|
||||
/* Map task id to printable name. */
|
||||
typedef struct {
|
||||
int id;
|
||||
char text[256];
|
||||
} text_info_t;
|
||||
|
||||
#define TO_TEXT(LabEl, nUmID) {nUmID, #LabEl},
|
||||
#define TO_ENUM(LabEl, nUmID) LabEl = nUmID,
|
||||
|
||||
char *itoa(int i);
|
||||
|
||||
#define STRINGIFY(S) #S
|
||||
|
||||
@@ -229,7 +229,7 @@ In the `MACRLCs` section of the gNB/DU configuration file:
|
||||
(see `ulsch_max_frame_inactivity`) or after scheduling request (SR)
|
||||
* `identity_precoding_matrix` (default 0=false): flag to enable to use only
|
||||
the identity precoding matrix in DL precoding
|
||||
* `set_analog_beamforming` (default 0=false): flag to enable analog
|
||||
* `set_analog_beamforming` (default "none"): parameter to enable analog
|
||||
beamforming (for more information [`analog_beamforming.md`](../analog_beamforming.md))
|
||||
* `beam_duration` (default 1): duration/number of consecutive slots for a given set of
|
||||
beams, depending on hardware switching performance
|
||||
|
||||
@@ -69,11 +69,10 @@ Tested libxran releases:
|
||||
|
||||
| Vendor |
|
||||
|-----------------------------------------|
|
||||
| `oran_e_maintenance_release_v1.0` |
|
||||
| `oran_f_release_v1.0` |
|
||||
|
||||
|
||||
**Note**: The libxran driver of OAI identifies the above E release version as "5.1.0" (E is fifth letter, then 1.0), and the above F release as "6.1.0".
|
||||
**Note**: The libxran driver of OAI identifies the above F release version as "6.1.0" (F is the sixth letter, then 1.0).
|
||||
|
||||
### Configure your server
|
||||
|
||||
@@ -375,14 +374,6 @@ cd ~/openairinterface5g/
|
||||
|
||||
Download ORAN FHI DU library, checkout the correct version, and apply the correct patch (available in `oai_folder/cmake_targets/tools/oran_fhi_integration_patches`).
|
||||
|
||||
#### E release
|
||||
```bash
|
||||
git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy
|
||||
cd ~/phy
|
||||
git checkout oran_e_maintenance_release_v1.0
|
||||
git apply ~/openairinterface5g/cmake_targets/tools/oran_fhi_integration_patches/E/oaioran_E.patch
|
||||
```
|
||||
|
||||
#### F release
|
||||
```bash
|
||||
git clone https://gerrit.o-ran-sc.org/r/o-du/phy.git ~/phy
|
||||
@@ -404,7 +395,6 @@ This feature is intended to enable experiments and future improvements on Arm sy
|
||||
```bash
|
||||
cd ~/phy/fhi_lib/lib
|
||||
make clean
|
||||
RTE_SDK=~/dpdk-stable-20.11.9/ XRAN_DIR=~/phy/fhi_lib make XRAN_LIB_SO=1 # E release
|
||||
WIRELESS_SDK_TOOLCHAIN=gcc RTE_SDK=~/dpdk-stable-20.11.9/ XRAN_DIR=~/phy/fhi_lib make XRAN_LIB_SO=1 # F release
|
||||
...
|
||||
[AR] build/libxran.so
|
||||
@@ -967,7 +957,7 @@ Sample configuration files for OAI gNB, specific to the manufacturer of the radi
|
||||
4. Benetel 550 RU:
|
||||
[`gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-benetel550.conf)
|
||||
[`gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x2-benetel550.conf)
|
||||
[`gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf) - only with E release; with F, UL U-plane fragmentation is not correct
|
||||
[`gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.2x2-benetel550-16b.conf) - tested successfully with E release; with F, UL U-plane fragmentation is not correct
|
||||
5. Metanoia RU:
|
||||
[`gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.273prb.fhi72.4x4-metanoia.conf)
|
||||
|
||||
@@ -1031,6 +1021,7 @@ Edit the sample OAI gNB configuration file and check following parameters:
|
||||
* `prach_config`: PRACH-specific configuration
|
||||
* `eAxC_offset`: PRACH antenna offset; if not set, default value of `N = max(Nrx,Ntx)` is used
|
||||
* `kbar`: the PRACH guard interval, provided in RU
|
||||
* `app_id`: `DU` or `RU`. Sets the application `id` value in xRAN. Use the default value: `DU`.
|
||||
|
||||
Layer mapping (eAxC offsets) happens as follows:
|
||||
- For PUSCH/PDSCH, the layers are mapped to `[0,1,...,Nrx-1]/[0,1,...,Ntx-1]` where `Nrx/Ntx` is the
|
||||
@@ -1491,6 +1482,7 @@ fhi_72 = {
|
||||
* `dpdk_iova_mode`: [*]
|
||||
* `owdm_enable`: [*]
|
||||
* `fh_config`: only DU delay profile (`T1a` and `Ta4`)
|
||||
* `app_id`: [*]
|
||||
|
||||
[*] see [Configure OAI gNB](#configure-oai-gnb) for more details
|
||||
|
||||
|
||||
263
doc/README.md
263
doc/README.md
@@ -13,122 +13,221 @@ Beware if you previously pulled the `develop` branch that your repository may be
|
||||
|
||||
## General
|
||||
|
||||
- [FEATURE_SET.md](./FEATURE_SET.md): lists supported features
|
||||
- [GET_SOURCES.md](./GET_SOURCES.md): how to download the sources
|
||||
- [BUILD.md](./BUILD.md): how to build the sources
|
||||
- [code-style-contrib.md](./code-style-contrib.md): overall working practices, code style, and review process
|
||||
- [cross-compile.md](./cross-compile.md): how to cross-compile OAI for ARM
|
||||
- [clang-format.md](./clang-format.md): how to format the code
|
||||
- [sanitizers.md](./dev_tools/sanitizers.md): how to run with ASan/UBSan/MemSAN/TSan
|
||||
- [environment-variables.md](./environment-variables.md): the environment variables used by OAI
|
||||
- [tuning_and_security.md](./tuning_and_security.md): performance and security considerations
|
||||
- [Contributing](../CONTRIBUTING.md): how to contribute to the project
|
||||
- [Changelog](../CHANGELOG.md): release notes and version history
|
||||
- [Notice](../NOTICE.md): third-party software credits and licenses
|
||||
- [License](../LICENSE): software license and terms of use
|
||||
- [Mailing Lists](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/MailingList): subscribe for updates and get support from the community.
|
||||
- [OAI Developer Meetings](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/OpenAirDevMeetings): weekly OAI Developer Calls open to all OAI community members
|
||||
- [System Requirements](./system_requirements.md): system requirements for running the OAI 4G/5G stack
|
||||
- [Feature Set](./FEATURE_SET.md): lists supported features
|
||||
- [Get Sources](./GET_SOURCES.md): how to download the sources
|
||||
- [Build](./BUILD.md): how to build the sources
|
||||
- [Code Style & Contribution](./code-style-contrib.md): overall working practices, code style, and review process
|
||||
- [Cross Compile](./cross-compile.md): how to cross-compile OAI for ARM
|
||||
- [Clang Format](./clang-format.md): how to format the code
|
||||
- [Sanitizers](./dev_tools/sanitizers.md): how to run with ASan/UBSan/MemSAN/TSan
|
||||
- [Environment Variables](./environment-variables.md): the environment variables used by OAI
|
||||
- [Tuning and Security](./tuning_and_security.md): performance and security considerations
|
||||
|
||||
There is some general information in the [OpenAirInterface Gitlab Wiki](https://gitlab.eurecom.fr/oai/openairinterface5g/-/wikis/home)
|
||||
|
||||
## Tutorials
|
||||
|
||||
- Step-by-step tutorials to set up 5G:
|
||||
* [OAI 5GC](./NR_SA_Tutorial_OAI_CN5G.md)
|
||||
* [OAI gNB with COTS UE](./NR_SA_Tutorial_COTS_UE.md)
|
||||
* [OAI NR-UE](./NR_SA_Tutorial_OAI_nrUE.md)
|
||||
* [Multiple OAI NR-UE with RFsimulator](./NR_SA_Tutorial_OAI_multi_UE.md)
|
||||
- [RUNMODEM.md](./RUNMODEM.md): Generic information on how to
|
||||
* Run simulators
|
||||
* Run with hardware
|
||||
* Specific OAI modes (phy-test, do-ra, noS1)
|
||||
* (5G) Using SDAP and custom DRBs
|
||||
* IF setups and arbitrary frequencies
|
||||
* MIMO
|
||||
- [How to run OAI with O-RAN 7.2 FHI](./ORAN_FHI7.2_Tutorial.md)
|
||||
- [How to run a 5G-NSA setup](./TESTING_OAI_NSA_COTS_UE.md)
|
||||
- [How to run a 4G setup using L1 simulator](./L1SIM.md) _Note: we recommend the RFsimulator_
|
||||
- [How to use the L2 simulator](./L2NFAPI.md)
|
||||
- [How to use the OAI channel simulator](../openair1/SIMULATION/TOOLS/DOC/channel_simulation.md)
|
||||
- [How to use multiple BWPs](./RUN_NR_multiple_BWPs.md)
|
||||
- [OAI 5GC](./NR_SA_Tutorial_OAI_CN5G.md): Step-by-step tutorial to set up 5G Core Network
|
||||
- [OAI gNB with COTS UE](./NR_SA_Tutorial_COTS_UE.md): Step-by-step tutorial for gNB with COTS-UE
|
||||
- [OAI NR-UE](./NR_SA_Tutorial_OAI_nrUE.md): Step-by-step tutorial for NR-UE
|
||||
- [Multiple OAI NR-UE with RFsimulator](./NR_SA_Tutorial_OAI_multi_UE.md): Setup for multiple UEs
|
||||
- [RUNMODEM](./RUNMODEM.md): Generic information on how to run simulators, run
|
||||
with hardware, specific OAI modes (phy-test, do-ra, noS1), (5G) using SDAP and
|
||||
custom DRBs, IF setups and arbitrary frequencies, and MIMO.
|
||||
- [How to run OAI with O-RAN 7.2 FHI](./ORAN_FHI7.2_Tutorial.md): Use OAI with O-RAN 7.2 fronthaul interface
|
||||
- [How to run a 5G-NSA setup](./TESTING_OAI_NSA_COTS_UE.md): Guide to set up and test 5G Non-Standalone (NSA)
|
||||
- [How to run a 4G setup using L1 simulator](./L1SIM.md): _Note: we recommend the RFsimulator_
|
||||
- [How to use the L2 simulator](./L2NFAPI.md): L2 nFAPI Simulator Usage
|
||||
- [How to use the OAI channel simulator](../openair1/SIMULATION/TOOLS/DOC/channel_simulation.md): Guide to configure and run OAI channel simulation
|
||||
- [How to use GPU-accelerated channel simulation](../openair1/SIMULATION/TOOLS/DOC/gpu_acceleration.md): CUDA GPU acceleration for channel simulation
|
||||
- [How to run OAI-VNF and OAI-PNF](./nfapi.md): how to run the FAPI/nFAPI split,
|
||||
including some general remarks on FAPI/nFAPI.
|
||||
- [How to use the positioning reference signal (PRS)](./RUN_NR_PRS.md)
|
||||
- [How to use device-to-device communication (D2D, 4G)](./d2d_emulator_setup.md)
|
||||
- [How to run with E2 agent](../openair2/E2AP/README.md)
|
||||
- [How to run the physical simulators](./physical-simulators.md)
|
||||
- [How to setup OAI with Nvidia Aerial and Foxconn](./Aerial_FAPI_Split_Tutorial.md)
|
||||
- [How to setup OAI with LDPC accelerators (Xilinx T2/Intel ACCs)](./LDPC_OFFLOAD_SETUP.md)
|
||||
- [How to setup OAI with the XDMA FPGA LDPC accelerator](./LDPC_XDMA_offload_setup.md)
|
||||
- [How to do a handover](./handover-tutorial.md)
|
||||
- [How to setup gNB frequency](./gNB_frequency_setup.md)
|
||||
- [How to use the RT data recording app](./data_recording.md)
|
||||
- [How to use packages](./packages.md)
|
||||
- [How to use the positioning reference signal (PRS)](./RUN_NR_PRS.md): How to run NR PRS with OAI gNB and nrUE
|
||||
- [How to use device-to-device communication (D2D, 4G)](./d2d_emulator_setup.md): Setup and test D2D communication in 4G
|
||||
- [How to run with E2 agent](../openair2/E2AP/README.md): Guide to deploy 5G OAI RAN with E2 Agent and FlexRIC nearRT-RIC
|
||||
- [How to run the physical simulators](./physical-simulators.md): Guide for using physims
|
||||
- [How to setup OAI with Nvidia Aerial and Foxconn](./Aerial_FAPI_Split_Tutorial.md): Guide to setup OAI with Nvidia Aerial FAPI split and Foxconn Radio Units
|
||||
- [How to setup OAI with LDPC accelerators (Xilinx T2/Intel ACCs)](./LDPC_OFFLOAD_SETUP.md): Guide to setup OAI LDPC offload
|
||||
- [How to setup OAI with the XDMA FPGA LDPC accelerator](./LDPC_XDMA_offload_setup.md): Guide to setup LDPC offload with XDMA driver
|
||||
- [How to do a handover](./handover-tutorial.md): Guide to perform F1 and N2 handovers
|
||||
- [How to setup gNB frequency](./gNB_frequency_setup.md): Instructions to configure 5G gNB frequency
|
||||
- [How to use the RT data recording app](./data_recording.md): Synchronized real-time 5G data recording
|
||||
- [How to use packages](./packages.md): Build OAI Deb/RPM packages using CMake
|
||||
- [NR LDPC AAL](../openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_aal/README.md): implementation for O-RAN LDPC BBDEV
|
||||
|
||||
Legacy unmaintained files:
|
||||
- [`L2NFAPI_NOS1.md`](./L2NFAPI_NOS1.md), [`L2NFAPI_S1.md`](./L2NFAPI_S1.md):
|
||||
old L2simulator, not valid anymore
|
||||
### Legacy unmaintained files
|
||||
|
||||
- [L2NFAPI_NOS1](./L2NFAPI_NOS1.md): old L2simulator, not valid anymore
|
||||
- [L2NFAPI_S1](./L2NFAPI_S1.md): old L2simulator, not valid anymore
|
||||
|
||||
## Designs
|
||||
|
||||
- General software architecture notes: [SW_archi.md](./SW_archi.md)
|
||||
- [Information on E1](./E1AP/E1-design.md)
|
||||
- [Information on F1](./F1AP/F1-design.md)
|
||||
- [Information on how NR nFAPI works](./NR_NFAPI_archi.md)
|
||||
- [Flow graph of the L1 in gNB](SW-archi-graph.md)
|
||||
- [L1 threads in NR-UE](./nr-ue-design.md)
|
||||
- [Information on gNB MAC](./MAC/mac-usage.md)
|
||||
- [Information on gNB RRC](./RRC/rrc-usage.md)
|
||||
- [Information on analog beamforming implementation](./analog_beamforming.md)
|
||||
- [Information on the UE 5G NAS implementation](./5Gnas.md)
|
||||
- [Software Architecture](./SW_archi.md): General software architecture notes
|
||||
- [Information on E1](./E1AP/E1-design.md): E1 interface between CU-CP and CU-UP
|
||||
- [E1AP Procedures](./E1AP/e1ap_procedures.md): Information on E1 interface procedures
|
||||
- [F1AP Messages Encoding & Decoding Library](./F1AP/F1AP-lib.md): Library for encoding, decoding, and testing F1AP messages
|
||||
- [Information on F1](./F1AP/F1-design.md): F1 interface design between CU and DU
|
||||
- [Information on how NR nFAPI works](./NR_NFAPI_archi.md): SmallCellForum 5G (n)FAPI split and message handling
|
||||
- [Flow graph of the L1 in gNB](SW-archi-graph.md): L1 threading and scheduler flow in gNB
|
||||
- [L1 threads in NR-UE](./nr-ue-design.md): L1 PHY-MAC flow and UE thread processing
|
||||
- [Information on gNB MAC](./MAC/mac-usage.md): 5G MAC scheduler and configuration
|
||||
- [Information on gNB RRC](./RRC/rrc-usage.md): 5G RRC layer functioning and configuration
|
||||
- [5G RRC Layer](./RRC/rrc-dev.md): 5G RRC procedures and UE handling
|
||||
- [Information on analog beamforming implementation](./analog_beamforming.md): Implementation of analog beamforming in OAI codebase.
|
||||
- [Information on the UE 5G NAS implementation](./5Gnas.md): 5GS NAS protocol and its implementation in OAI
|
||||
- [Information on UL-MIMO](./UL_MIMO.md): UL-MIMO specific notes
|
||||
- [gNB RACH Processing](./rach_processing_in_gNB.md): gNB RACH handling from sample collection to response scheduling
|
||||
|
||||
## Building and running from images
|
||||
|
||||
- [How to build images](../docker/README.md)
|
||||
- [How to run 5G with the RFsimulator from images](../ci-scripts/yaml_files/5g_rfsimulator/README.md)
|
||||
- [How to run 4G with the RFsimulator from images](../ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md)
|
||||
- [How to run physical simulators in OpenShift](../openshift/README.md)
|
||||
- [How to build images](../docker/README.md): Build and Use OAI with Docker/Podman
|
||||
- [How to run 5G with the RFsimulator from images](../ci-scripts/yaml_files/5g_rfsimulator/README.md): Run 5G NR using RF simulator with Docker containers
|
||||
- [How to run 4G with the RFsimulator from images](../ci-scripts/yaml_files/4g_rfsimulator_fdd_05MHz/README.md): Run 4G-LTE using RF simulator with Docker containers
|
||||
- [How to run physical simulators in OpenShift](../openshift/README.md): OpenShift Build and Usage Procedures
|
||||
|
||||
## Libraries
|
||||
|
||||
### General
|
||||
|
||||
- The [T tracer](../common/utils/T/DOC/T.md): a generic tracing tool (VCD, Wireshark, GUI, to save for later, ...)
|
||||
- [T tracer](../common/utils/T/DOC/T.md): a generic tracing tool (VCD, Wireshark, GUI, to save for later, ...)
|
||||
- [OPT](../openair2/UTIL/OPT/README.txt): how to trace to wireshark
|
||||
- The [configuration module](../common/config/DOC/config.md)
|
||||
- The [logging module](../common/utils/LOG/DOC/log.md)
|
||||
- The [shared object loader](../common/utils/DOC/loader.md)
|
||||
- The [threadpool](../common/utils/threadPool/thread-pool.md) used in L1
|
||||
- The [LDPC implementation](../openair1/PHY/CODING/DOC/LDPCImplementation.md) is a shared library
|
||||
- The [time management](time_management.md) module
|
||||
- [Threadpool](../common/utils/threadPool/thread-pool.md): used in L1
|
||||
- [LDPC Implementation](../openair1/PHY/CODING/DOC/LDPCImplementation.md): It is a shared library
|
||||
- [Time Management](time_management.md): manages time for OAI components
|
||||
- [LTE RRC Configuration (ASN.1 Based)](../openair2/RRC/LTE/MESSAGES/README.md): generates LTE RRC data structures based on the ASN.1
|
||||
|
||||
#### Configuration Module
|
||||
|
||||
- [OAI Configuration Module](../common/config/DOC/config.md): Manages and validates OAI parameters
|
||||
- [Config Runtime Usage](../common/config/DOC/config/rtusage.md): overview of config runtime usage
|
||||
- [Config Architecture](../common/config/DOC/config/arch.md): config module source files and components
|
||||
- [Config Dev Usage API](../common/config/DOC/config/devusage/api.md): information on configuration module API
|
||||
- [Config Dev Usage Add A Param](../common/config/DOC/config/devusage/addaparam.md): add parameters in an existing section
|
||||
- [Config Dev Usage Add Param Set](../common/config/DOC/config/devusage/addparamset.md): add a parameter set in a new section
|
||||
- [Config Dev Usage Struct](../common/config/DOC/config/devusage/struct.md): configuration module public structures
|
||||
- [Config Dev Usage](../common/config/DOC/config/devusage.md): overview of config dev usage
|
||||
|
||||
#### Loader
|
||||
|
||||
- [Shared Object Loader](../common/utils/DOC/loader.md): manage modular shared libraries
|
||||
- [Loader Runtime Usage](../common/utils/DOC/loader/rtusage.md): information on loader runtime usage
|
||||
- [Loader Architecture](../common/utils/DOC/loader/arch.md): details on loader source files
|
||||
- [Loader Dev Usage Loading](../common/utils/DOC/loader/devusage/loading.md): implementation of a shared library dynamic load using the oai loader
|
||||
- [Loader Dev Usage API](../common/utils/DOC/loader/devusage/api.md): information on loader API
|
||||
- [Loader Dev Usage Struct](../common/utils/DOC/loader/devusage/struct.md): `loader_shlibfunc_t` structure
|
||||
- [Loader Dev Usage](../common/utils/DOC/loader/devusage.md): overview of loader dev usage
|
||||
|
||||
|
||||
#### Logging
|
||||
|
||||
- [Logging Module](../common/utils/LOG/DOC/log.md): OAI console logging facility
|
||||
- [LOG Add Console Trace](../common/utils/LOG/DOC/addconsoletrace.md): Adding console traces in oai code
|
||||
- [LOG LTTng Logs](../common/utils/LOG/DOC/lttng_logs.md): OAI gNB LTTng Tracing Setup Guide
|
||||
- [LOG Configure Log](../common/utils/LOG/DOC/configurelog.md): Initializing and configuring the logging facility
|
||||
- [LOG Runtime Usage](../common/utils/LOG/DOC/rtusage.md): details on LOG Runtime Usage
|
||||
- [LOG Architecture](../common/utils/LOG/DOC/arch.md): logging facility source files
|
||||
- [LOG Dev Usage](../common/utils/LOG/DOC/devusage.md): logging facility developer usage
|
||||
|
||||
### Radios
|
||||
|
||||
Some directories under `radio` contain READMEs:
|
||||
|
||||
- [RFsimulator](../radio/rfsimulator/README.md)
|
||||
- [USRP](../radio/USRP/README.md)
|
||||
- [BladeRF](../radio/BLADERF/README)
|
||||
- [IQPlayer](../radio/iqplayer/DOC/iqrecordplayer_usage.md), and [general documentation](./iqrecordplayer_usage.md)
|
||||
- [fhi_72](../radio/fhi_72/README.md)
|
||||
- [vrtsim](../radio/vrtsim/README.md)
|
||||
- [rf_emulator](../radio/emulator/README.md)
|
||||
- [RFsimulator](../radio/rfsimulator/README.md): Guide to using the RF Simulator
|
||||
- [USRP](../radio/USRP/README.md): USRP Radio Setup and Usage Guide.
|
||||
- [BladeRF](../radio/BLADERF/README.md): BladeRF 2.0 Micro Setup instructions
|
||||
- [IQPlayer](./iqrecordplayer_usage.md): general documentation for the IQ player
|
||||
- [IQ Record Playback](../radio/iqplayer/DOC/iqrecordplayer_usage.md): specific usage documentation in the `radio` directory
|
||||
- [FHI 7.2](../radio/fhi_72/README.md): XRAN Driver (FHI 7.2) Setup
|
||||
- [vrtsim](../radio/vrtsim/README.md): VRTSim Setup and Usage Guide
|
||||
- [RF Emulator](../radio/emulator/README.md): RF Emulator Library
|
||||
- [Ethernet Drivers](../radio/ETHERNET/ethernet.md): Ethernet-based drivers for fronthaul
|
||||
|
||||
The other SDRs (AW2S, LimeSDR, ...) have no READMEs.
|
||||
|
||||
### Special-purpose libraries
|
||||
|
||||
- OAI has two scopes: one based on Xforms and one based on imgui, described in [this README](../openair1/PHY/TOOLS/readme.md)
|
||||
- OAI comes with an integrated [telnet server](../common/utils/telnetsrv/DOC/telnethelp.md) to monitor and control
|
||||
- OAI comes with an integrated [web server](../common/utils/websrv/DOC/websrv.md)
|
||||
- [OAI Scopes](../openair1/PHY/TOOLS/readme.md): OAI has two scopes (one based on Xforms and one based on imgui)
|
||||
|
||||
#### Telnet Server
|
||||
|
||||
- [Telnet Server Help](../common/utils/telnetsrv/DOC/telnethelp.md): OAI comes with an integrated telnet server to monitor and control
|
||||
- [Telnet Server](../common/utils/telnetsrv/DOC/telnetsrv.md): OAI embedded telnet server
|
||||
- [Telnet Add Command](../common/utils/telnetsrv/DOC/telnetaddcmd.md): example of adding a command to the telnet server
|
||||
- [Telnet Log](../common/utils/telnetsrv/DOC/telnetlog.md): telnet log command
|
||||
- [Telnet Measurement](../common/utils/telnetsrv/DOC/telnetmeasur.md): information on telnet `measur` command
|
||||
- [Telnet Usage](../common/utils/telnetsrv/DOC/telnetusage.md): Using the telnet server
|
||||
- [Telnet Loop](../common/utils/telnetsrv/DOC/telnetloop.md): information on telnet `loop` command
|
||||
- [Telnet Loader](../common/utils/telnetsrv/DOC/telnetloader.md): information on telnet `loader` command
|
||||
- [Telnet History](../common/utils/telnetsrv/DOC/telnethist.md): implementation of simple history system
|
||||
- [Telnet Get/Set](../common/utils/telnetsrv/DOC/telnetgetset.md): information on telnet `getall` command
|
||||
- [Telnet Architecture](../common/utils/telnetsrv/DOC/telnetarch.md): overview of telnet server architecture
|
||||
- [Telnet O1](../common/utils/telnetsrv/DOC/telneto1.md): telnet module to perform some O1-related actions
|
||||
|
||||
#### Web Server
|
||||
|
||||
- [Web Server](../common/utils/websrv/DOC/websrv.md): OAI comes with an integrated web server
|
||||
- [Web Server Architecture](../common/utils/websrv/DOC/websrvarch.md): web server interface implementation
|
||||
- [Web Server Usage](../common/utils/websrv/DOC/websrvuse.md): building the web server
|
||||
- [Web Server Development](../common/utils/websrv/DOC/websrvdev.md): enhancing the web server
|
||||
- [Web Server Frontend](../common/utils/websrv/frontend/README.md): information on web server frontend
|
||||
|
||||
## Testing
|
||||
|
||||
- [UnitTests.md](./UnitTests.md) explains the unit testing setup
|
||||
- Component tests are under `tests/`. Currently, there is a simple CU-UP
|
||||
tester, see the corresponding [README.md](../tests/nr-cuup/README.md).
|
||||
- [TESTBenches.md](./TESTBenches.md) lists the CI setup and links to pipelines
|
||||
- The CI setup uses a [custom framework](../ci-scripts/README.md) to run
|
||||
end-to-end tests.
|
||||
- [Unit Tests](./UnitTests.md): explains the unit testing setup
|
||||
- [CU-UP Tester](../tests/nr-cuup/README.md): Component tests are under `tests/` (currently, a simple CU-UP tester)
|
||||
- [Test Benches](./TESTBenches.md): Lists the CI setup and links to pipelines
|
||||
- [CI Framework](../ci-scripts/README.md): The CI setup uses a custom framework to run end-to-end tests.
|
||||
|
||||
## Developer tools
|
||||
|
||||
- [formatting](../tools/formatting/README.md) is a clang-format error detection tool
|
||||
- [iwyu](../tools/iwyu/README.md) is a tool to detect `#include` errors
|
||||
- [docker-dev-env](../tools/docker-dev-env/README.md) is a ubuntu24 docker development environment
|
||||
- [doc_best_practices.md](./doc_best_practices.md): overall best practices for writing documentations
|
||||
- [Formatting](../tools/formatting/README.md): a clang-format error detection tool
|
||||
- [IWYU](../tools/iwyu/README.md): a tool to detect `#include` errors
|
||||
- [Docker Dev Environment](../tools/docker-dev-env/README.md): Ubuntu 24 Docker development environment
|
||||
- [Plotting tools](../tools/plots/README.md): tools to visualize 5G NR simulation results
|
||||
- [Documentation Best Practices](./doc_best_practices.md): overall best practices for writing documentations
|
||||
- [Documentations using MkDocs](../tools/mkdocs/README.md): generate and serve documentation with MkDocs
|
||||
|
||||
## CI
|
||||
|
||||
- [Configuration Files](../ci-scripts/conf_files/README.md): naming style guide for config files
|
||||
- [OAI O-RAN 7.2 Front-haul VVDN RU](../ci-scripts/yaml_files/sa_fhi_7.2_vvdn_gnb/README.md): OAI O-RAN 7.2 Front-haul Docker Compose with VVDN RU
|
||||
- [OAI O-RAN 7.2 Front-haul Metanoia RU](../ci-scripts/yaml_files/sa_fhi_7.2_metanoia_2x2_gnb/README.md): OAI O-RAN 7.2 Front-haul Docker Compose with Metanoia RU
|
||||
- [OAI O-RAN 7.2 Front-haul Benetel RU](../ci-scripts/yaml_files/sa_fhi_7.2_benetel550_gnb/README.md): OAI O-RAN 7.2 Front-haul Docker Compose with Benetel RU
|
||||
- [CI test for 5G F1+E1 splits with RFsimulator](../ci-scripts/yaml_files/5g_rfsimulator_e1/README.md): CI test for 5G F1+E1 splits with RFsimulator
|
||||
- [CI tests](../ci-scripts/tests/README.md): CI code test cases and helper scripts
|
||||
- [Colosseum Testing](../ci-scripts/colosseum_scripts/README.md): automated testing of OpenAirInterface (OAI) gNB and softUE on the Colosseum
|
||||
|
||||
## nFAPI
|
||||
|
||||
- [Open-nFAPI](../nfapi/open-nFAPI/README.md): implementation of the Small Cell Forum's Network Functional API (nFAPI)
|
||||
- [Open-nFAPI License](../nfapi/open-nFAPI/LICENSE.md): licensing information for Open-nFAPI
|
||||
- [Open-nFAPI Examples](../nfapi/open-nFAPI/utils/examples.md): Open-nFAPI usage examples
|
||||
- [Open-nFAPI Changelog](../nfapi/open-nFAPI/CHANGELOG.md): release notes for Open-nFAPI
|
||||
- [nFAPI Changes](../nfapi/CHANGES.md): information on nFAPI changes
|
||||
|
||||
## Common Utilities
|
||||
|
||||
|
||||
- [OCP ITTI](../common/utils/ocp_itti/itti.md): interthread interface (ITTI)
|
||||
- [T Tracer Wireshark](../common/utils/T/DOC/T/wireshark.md): MAC PDUs and wireshark
|
||||
- [T Tracer CSV](../common/utils/T/DOC/T/csv.md): tracer to dump information of a single trace to a CSV.
|
||||
- [T Tracer Record](../common/utils/T/DOC/T/record.md): how to use the `record` tracer
|
||||
- [T Tracer ENB](../common/utils/T/DOC/T/enb.md): information on T Tracer eNB
|
||||
- [T Tracer Replay](../common/utils/T/DOC/T/replay.md): how to use the `replay` tracer
|
||||
- [T Tracer Basic](../common/utils/T/DOC/T/basic.md): Basic usage of the T tracer
|
||||
- [T Tracer How To New Trace](../common/utils/T/DOC/T/howto_new_trace.md): simple tutorial on T tracer
|
||||
- [T Tracer Multi](../common/utils/T/DOC/T/multi.md): Multiple tracers
|
||||
- [T Tracer To VCD](../common/utils/T/DOC/T/to_vcd.md): tracer to dump a VCD trace of the softmodem.
|
||||
- [Actor README](../common/utils/actor/README.md): simple actor model implementation
|
||||
|
||||
## L2 Emulator (deprecated)
|
||||
|
||||
- [LTE Mode L2 Emulator](./episys/lte_mode_l2_emulator/README.md): Multi-UE Proxy for UEs to communicate with eNB (LTE mode)
|
||||
- [NSA Mode L2 Emulator](./episys/nsa_mode_l2_emulator/README.md): Multi-UE Proxy for UEs to communicate with gNB (NSA mode)
|
||||
|
||||
@@ -390,13 +390,255 @@ sequenceDiagram
|
||||
|
||||
## Structures
|
||||
|
||||
### Cells
|
||||
### DUs and Cells
|
||||
|
||||
OAI 5G RRC does not actually handle multiple cells as of now, but multiple DUs,
|
||||
each being limited to one cell.
|
||||
OAI 5G RRC is enabling support for multiple DUs, with each DU potentially
|
||||
serving multiple cells (though currently each DU is limited to one cell in practice).
|
||||
The architecture separates DU management from cell management to enable future
|
||||
multi-cell per DU capability.
|
||||
|
||||
Cell-related data is stored in `nr_rrc_du_container_t`, and kept in a tree
|
||||
indexed by the SCTP association ID.
|
||||
#### DU Management
|
||||
|
||||
DU-related data is stored in `nr_rrc_du_container_t`, and kept in a red-black
|
||||
tree indexed by the unique SCTP association ID (`assoc_id`). Each DU container stores:
|
||||
- DU identity and name
|
||||
- SCTP association ID for F1 interface communication
|
||||
- RRC version information
|
||||
- Sequential array of cell pointers (`cells`) - stores pointers to cells belonging to this DU (seq_arr_t)
|
||||
|
||||
Key Functions:
|
||||
- `get_du_by_assoc_id()` - Lookup DU by SCTP association ID (O(log d) tree lookup)
|
||||
- `get_du_for_ue()` - Get DU associated with a specific UE
|
||||
- `find_target_du()` - Find a target DU for handover operations
|
||||
|
||||
#### Cell Management
|
||||
|
||||
Cell-related data is stored in `nr_rrc_cell_container_t`. Cells are stored in two data structures:
|
||||
|
||||
1. Global cell tree (`rrc->cells`): Red-black tree indexed by `cell_id`, containing all cells from all DUs. Used for efficient O(log N_CELL) lookups across all DUs. PCI reuse across the network is allowed and this is reflected in the tree.
|
||||
2. DU cell array (`du->cells`): Sequential array (seq_arr_t) of cell pointers, storing only cells belonging to that specific DU. Used for DU-specific operations. PCI must be unique within a DU.
|
||||
|
||||
Each cell container stores:
|
||||
- Cell identity (NR Cell ID) and PCI (Physical Cell ID)
|
||||
- Link to serving DU via the unique `assoc_id`
|
||||
- Cell-specific information (PLMN, TAC, frequency, mode TDD/FDD)
|
||||
- MIB, SIB1, and MeasurementTimingConfiguration messages
|
||||
|
||||
Key Functions:
|
||||
- `get_cell_by_cell_id()` - Lookup cell by NR Cell ID using global cell tree
|
||||
- `rrc_get_cell_for_du()` - Lookup cell by cell_id within a specific DU's cell array
|
||||
- `rrc_get_cell_by_pci_for_du()` - Lookup cell by PCI within DU's cells array
|
||||
- `rrc_add_cell_to_du()` - Add cell to DU's sequential array
|
||||
- `rrc_free_cell_container()` - Free cell container and associated ASN.1 structures
|
||||
|
||||
Architecture Notes:
|
||||
- The `assoc_id` field (in cell and DUs containers) links cells to their serving DUs
|
||||
- When a DU connects via F1 Setup, cells are added to both the global tree and the DU's array
|
||||
- When a DU disconnects, cells are removed from both structures
|
||||
- Global tree enables efficient cross-DU cell lookups (O(log N_CELL))
|
||||
- DU array enables efficient per-DU cell iteration (O(k) where k=cells per DU)
|
||||
- Each DU maintains a sequential array of cell pointers
|
||||
|
||||
##### DU and Cell Lifecycle
|
||||
|
||||
The following diagram shows the lifecycle of DUs and their associated cells, including the main F1AP messages and internal operations:
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant CellTree as Cell Tree
|
||||
participant DUTree as DU Tree
|
||||
participant CU as CU-CP
|
||||
participant DU as gNB-DU
|
||||
participant UE as UE
|
||||
|
||||
Note over DU,CellTree: DU Connection & Cell Registration
|
||||
DU->>CU: F1AP F1 Setup Request(DU ID, Cell Info, MIB/SIB1)
|
||||
Note over CU: Validate: PLMN match with CU configuration
|
||||
alt PLMN mismatch
|
||||
CU->>DU: F1AP F1 Setup Failure (PLMN not served)
|
||||
end
|
||||
Note over CU: Validate: DU ID uniqueness (RB_FOREACH gNB_DU_id in DU tree)
|
||||
alt DU ID already exists
|
||||
CU->>DU: F1AP F1 Setup Failure (Unspecified)
|
||||
end
|
||||
Note over CU: Validate: Neighbour cell configuration (if configured)
|
||||
alt Neighbour config invalid
|
||||
CU->>DU: F1AP F1 Setup Failure (Unspecified)
|
||||
end
|
||||
Note over CU: Extract MIB/SIB1 from system info (if present)
|
||||
alt System info extraction fails
|
||||
CU->>DU: F1AP F1 Setup Failure (Semantic error)
|
||||
end
|
||||
alt All Validations Success
|
||||
CU->>CU: Create cell container (nr_rrc_cell_container_t), set assoc_id, copy cell info, set MIB/SIB1
|
||||
CU->>CellTree: rrc_add_cell(rrc, new) - RB_INSERT into global tree, increment rrc->num_cells
|
||||
alt Duplicate cell_id (collision)
|
||||
CU->>DU: F1AP F1 Setup Failure (Cell not available)
|
||||
else Cell added to tree
|
||||
CU->>CU: Create DU container (nr_rrc_du_container_t)
|
||||
CU->>CU: seq_arr_init(&du->cells) - Initialize DU's cell array
|
||||
CU->>DUTree: rrc_add_du(rrc, du) - RB_INSERT(du), increment rrc->num_dus
|
||||
CU->>CU: rrc_add_cell_to_du(&du->cells, new) - Add cell to DU's array
|
||||
Note over CU,UE: Cell available for UE association
|
||||
CU->>CU: Encode CU SIBs (if configured)
|
||||
CU->>DU: F1AP F1 Setup Response(Cells to Activate, CU SIBs)
|
||||
Note over CU,CellTree: DU and cell now active
|
||||
end
|
||||
end
|
||||
|
||||
UE->>CU: RRC Setup Request
|
||||
Note over CU: rrc_handle_RRCSetupRequest()
|
||||
CU->>CU: get_cell_by_cell_id(&rrc->cells) - Use global tree
|
||||
alt Cell not found
|
||||
CU->>UE: RRC Reject
|
||||
end
|
||||
Note over CU: UE Cell Association
|
||||
CU->>CU: rrc_add_ue_serving_cell(UE, cell, RRC_PCELL_INDEX)
|
||||
|
||||
Note over DU,CellTree: Optional: Cell Configuration Update
|
||||
opt DU sends configuration update
|
||||
DU->>CU: F1AP DU Configuration Update(Add/Modify/Delete cells)
|
||||
Note over CU: get_du_by_assoc_id(assoc_id)
|
||||
loop For each cell to add
|
||||
CU->>CU: get_cell_by_cell_id(&rrc->cells) - Check cell_id uniqueness globally
|
||||
alt Duplicate cell_id found
|
||||
Note over CU: Reject and return
|
||||
end
|
||||
CU->>CU: rrc_get_cell_by_pci_for_du(&du->cells) - Check PCI unique within DU
|
||||
alt Duplicate PCI in DU
|
||||
Note over CU: Reject and return
|
||||
end
|
||||
end
|
||||
loop Cell Modification
|
||||
CU->>CU: get_cell_by_cell_id(cells, old_nr_cellid) - Find cell by old cell_id
|
||||
CU->>CU: update_cell_info(rrc, old_nci, new_ci) - Update in place
|
||||
Note over CU: If cell_id changes: RB_REMOVE then re-insert after update
|
||||
Note over CU: Free old MTC if new measurement timing config provided
|
||||
Note over CU: If sys_info present: extract MIB/SIB1 and set on cell
|
||||
end
|
||||
CU->>DU: F1AP DU Configuration Update Acknowledge
|
||||
end
|
||||
|
||||
Note over DU,CellTree: DU Disconnection & Cell Cleanup
|
||||
DU-->>CU: F1AP Lost Connection(SCTP connection lost)
|
||||
Note over CU: rrc_CU_process_f1_lost_connection()
|
||||
CU->>DUTree: RB_FIND(du) - Find DU by assoc_id using temporary struct
|
||||
alt DU not found
|
||||
Note over CU: Log warning and return
|
||||
end
|
||||
Note over CU: rrc_cleanup_du() then invalidate_du_connections()
|
||||
CU->>CU: Iterate cells in DU's array (last to first)
|
||||
loop For each cell in DU's array
|
||||
CU->>CU: seq_arr_erase(&du->cells, cell_ptr) - Remove from DU's array
|
||||
CU->>CellTree: rrc_rm_cell(): RB_REMOVE(cell), decrement num_cells, rrc_free_cell_container()
|
||||
end
|
||||
CU->>DUTree: rrc_rm_du(): RB_REMOVE(du) - Remove DU from tree
|
||||
CU->>CU: Decrement rrc->num_dus counter
|
||||
CU->>CU: seq_arr_free(&du->cells) - Free DU's cell array
|
||||
CU->>CU: rrc_free_du_container() - Free DU container
|
||||
Note over CU: invalidate_du_connections()
|
||||
loop For each UE:
|
||||
CU->>CU: rrc_remove_ue_scells_from_du() - Remove SCells from disconnected DU
|
||||
alt UE belongs to disconnected DU
|
||||
CU->>CU: Set du_assoc_id = 0 (mark DU offline)
|
||||
CU->>CU: Trigger NGAP UE Context Release Request
|
||||
end
|
||||
end
|
||||
Note over CU,CellTree: DU and all cells removed
|
||||
```
|
||||
|
||||
Key Functions:
|
||||
- `rrc_gNB_process_f1_setup_req()` - Handles F1 Setup Request, creates DU and cell containers.
|
||||
Validates PLMN match, DU ID uniqueness, and cell_id/PCI uniqueness before creating containers.
|
||||
- `rrc_gNB_process_f1_du_configuration_update()` - Handles cell configuration updates.
|
||||
Currently supports cell modification (MIB/SIB1 updates) and validates cell additions, but cell addition
|
||||
and deletion are not yet fully implemented.
|
||||
- `rrc_CU_process_f1_lost_connection()` - Handles DU disconnection. Calls `rrc_cleanup_du()` to
|
||||
remove all cells and the DU from their trees and free resources, then
|
||||
`invalidate_du_connections()` to clean up UE associations (e.g. trigger NGAP UE Context Release Request for UEs on that DU).
|
||||
|
||||
#### UE Cell Association Management
|
||||
|
||||
The RRC maintains a per-UE association with serving cells, tracking which cells
|
||||
a UE is currently using. This replaces the previous single-cell assumption and
|
||||
enables proper multi-cell support where each UE can have multiple serving cells
|
||||
(one PCell and up to 31 SCells). The servCellIndex (TS 38.331) is tracked per-UE
|
||||
in the `ue_serving_cell_t` structure in the UE context (the same cell can have
|
||||
different servCellIndex values for different UEs).
|
||||
|
||||
Data Structures:
|
||||
- `ue_serving_cell_t`: Stores serving cell information (nci, servCellIndex, assoc_id)
|
||||
- `gNB_RRC_UE_t.serving_cells`: Dynamic array (seq_arr_t) of serving cell entries. PCell is always at index 0.
|
||||
|
||||
Key Functions:
|
||||
- `rrc_add_ue_serving_cell()` - Adds a new serving cell to UE's serving_cells array.
|
||||
- `rrc_get_ue_serving_cell_by_id()` - Retrieves serving cell entry by servCellIndex.
|
||||
- `ue_get_pcell_entry()` - Returns the PCell serving cell entry (first element in serving_cells).
|
||||
- `rrc_remove_ue_scells_from_du()` - Removes all serving cells belonging to a specific DU via assoc_id (e.g. during handover or DU disconnection).
|
||||
|
||||
##### Handover and Cell Association Updates
|
||||
|
||||
During handover, the UE's serving cell list is updated so the PCell reflects the target cell and source-DU cells are removed.
|
||||
|
||||
###### F1 handover (inter-DU, same CU-CP)
|
||||
|
||||
Cell association is updated when the **source** DU sends F1AP UE Context Modification Response (after it has sent the RRC Reconfiguration to the UE). The CU-CP is a single RRC instance; both source DU and target DU are under the same CU.
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant SourceDU as Source DU
|
||||
participant CU as CU-CP
|
||||
|
||||
Note over CU,CU: F1 handover: cell association update on Context Modification Response
|
||||
SourceDU->>CU: F1AP UE Context Modification Response
|
||||
Note over CU: rrc_CU_process_ue_context_modification_response()
|
||||
Note over CU: Check: ho_context && source && target (F1 HO)
|
||||
|
||||
alt F1 handover in progress
|
||||
CU->>CU: nr_rrc_apply_target_context(UE)
|
||||
Note over CU: F1 UE data: du_assoc_id = target DU, secondary_ue = target DU UE ID, RNTI = target RNTI
|
||||
CU->>CU: nr_rrc_update_cell_assoc_after_ho(rrc, UE)
|
||||
Note over CU: F1 branch (ho_context->source present):
|
||||
CU->>CU: rrc_remove_ue_scells_from_du(UE, source_ctx->cell->assoc_id)
|
||||
Note over CU: Remove all serving cells (incl. PCell) belonging to source DU
|
||||
CU->>CU: rrc_add_ue_serving_cell(UE, target_ctx->cell, RRC_PCELL_INDEX)
|
||||
Note over CU: Handover complete: PCell = target cell, source DU cells removed
|
||||
end
|
||||
```
|
||||
|
||||
###### N2 handover (inter-gNB: source CU vs target CU)
|
||||
|
||||
Cell association is updated only on the target CU-CP, when the target DU sends F1AP UE Context Setup Response. The UE context was created for handover, so there is no existing serving cell to remove. The flow is triggered inside the handover request acknowledge callback.
|
||||
|
||||
- Target CU-CP: Receives HANDOVER REQUEST, sets up bearer and F1 UE context on target DU; when the target DU sends F1AP UE Context Setup Response, the target CU runs the cell-association update and then sends HANDOVER REQUEST ACKNOWLEDGE.
|
||||
|
||||
```mermaid
|
||||
sequenceDiagram
|
||||
participant TargetDU as Target DU
|
||||
participant TargetCU as Target CU-CP
|
||||
|
||||
Note over TargetCU: N2 handover: cell association update
|
||||
Note over TargetCU: F1AP UE Context Setup Resp from target DU (in nr_rrc_n2_ho_acknowledge)
|
||||
TargetDU->>TargetCU: F1AP UE Context Setup Response
|
||||
Note over TargetCU: rrc_CU_process_ue_context_setup_response() then callback ho_req_ack()
|
||||
Note over TargetCU: nr_rrc_n2_ho_acknowledge(rrc, UE)
|
||||
|
||||
TargetCU->>TargetCU: nr_rrc_apply_target_context(UE)
|
||||
Note over TargetCU: F1 UE data: du_assoc_id = target DU, secondary_ue = target DU UE ID, RNTI = target RNTI
|
||||
TargetCU->>TargetCU: nr_rrc_update_cell_assoc_after_ho(rrc, UE)
|
||||
Note over TargetCU: N2 branch (ho_context->source NULL): no SCells to remove
|
||||
TargetCU->>TargetCU: rrc_add_ue_serving_cell(UE, target_ctx->cell, RRC_PCELL_INDEX)
|
||||
Note over TargetCU: Then: encode Handover Command, send NGAP HANDOVER REQUEST ACKNOWLEDGE
|
||||
```
|
||||
|
||||
## UE Context
|
||||
|
||||
UE context information is stored in `gNB_RRC_UE_t`, which includes:
|
||||
- Serving cells tracking: Dynamic array of serving cells (PCell + SCells)
|
||||
- Security context: Keys, algorithms, and security state
|
||||
- Radio bearers: SRB and DRB configurations
|
||||
- PDU sessions: Active PDU session information
|
||||
- Handover context: Temporary data during handover procedures
|
||||
|
||||
### CU-UPs
|
||||
|
||||
|
||||
@@ -41,15 +41,19 @@ For each DU, it prints:
|
||||
|
||||
```
|
||||
1 connected DUs
|
||||
[1] DU ID 3584 (gNB-OAI-DU) assoc_id 8: nrCellID 12345678, PCI 0, SSB ARFCN 641280
|
||||
TDD: band 78 ARFCN 640008 SCS 30 (kHz) PRB 106
|
||||
[1] DU ID 3584 (gNB-OAI) integrated DU-CU: 1 cell
|
||||
[1] nrCellID 12345678, PCI 0, Mode TDD, SSB ARFCN 641280
|
||||
TDD: band 78 ARFCN 640008 SCS 30 (kHz) PRB 106
|
||||
```
|
||||
|
||||
i.e., an index (`[1]`), the DU ID and it's name, the SCTP association ID
|
||||
(`assoc_id 8`, cf. UE information), and DU specific information for the cell
|
||||
(cell ID, physical cell identity/PCI, the SSB frequency in ARFCN notation, the
|
||||
band and Point A ARFCN, subcarrier spacing/SCS, and the number of resource
|
||||
blocks/PRB). Only one cell per DU is supported.
|
||||
The output shows:
|
||||
- Total number of connected DUs
|
||||
- For each DU: an index (`[1]`), the DU ID and name, connection type (either `integrated DU-CU` for monolithic deployments or `assoc_id X` for split deployments), and the number of cells served by this DU
|
||||
- For each cell served by the DU: a cell index (`[1]`), the NR Cell ID, Physical Cell ID (PCI), operating mode (TDD or FDD), and SSB ARFCN
|
||||
- Cell-specific frequency information: for TDD mode, the band, Point A ARFCN, subcarrier spacing (SCS), and number of resource blocks (PRB); for FDD mode, separate DL and UL frequency information
|
||||
|
||||
The RRC enables the support of multiple cells per DU (though currently each DU
|
||||
typically serves one cell in practice).
|
||||
|
||||
As of now, it does not print information about connected CU-UPs or AMFs.
|
||||
|
||||
@@ -84,7 +88,7 @@ the [MAC configuration](../MAC/mac-usage.md) as well for SIB configuration.
|
||||
`0xffffff` is a reserved value and means "no SD"
|
||||
Note that: SST=1, no SD is "eMBB"; SST=2, no SD is "URLLC"; SST=3, no SD
|
||||
is "mMTC"
|
||||
- `enable_sdap` (default: false): enable the use of the SDAP layer. If
|
||||
- `enable_sdap` (default: true): enable the use of the SDAP layer. If
|
||||
deactivated, a transparent SDAP header is prepended to packets, but no
|
||||
further processing is being done.
|
||||
- `cu_sibs` (default: `[]`) list of SIBs to give to the DU for transmission.
|
||||
@@ -94,8 +98,6 @@ the [MAC configuration](../MAC/mac-usage.md) as well for SIB configuration.
|
||||
|
||||
- `um_on_default_drb` (default: false): use RLC UM instead of RLC AM on default
|
||||
bearers
|
||||
- `drbs` (default: 0): the number of DRBs to allocate for a UE, only useful for
|
||||
do-ra or phy-test testing
|
||||
|
||||
#### Neighbor-gNB configuration
|
||||
|
||||
|
||||
@@ -544,7 +544,7 @@ sudo ./nr-uesoftmodem --do-ra
|
||||
|
||||
#### Run OAI with SDAP & Custom DRBs
|
||||
|
||||
To run OAI gNB with SDAP, simply include `--gNBs.[0].enable_sdap 1` to the binary's arguments.
|
||||
SDAP is enabled by default. To disable SDAP, include `--gNBs.[0].enable_sdap 0` to the binary's arguments.
|
||||
|
||||
The DRB creation is dependent on the 5QI.
|
||||
If the 5QI corresponds to a GBR Flow it assigns a dedicated data radio bearer.
|
||||
|
||||
@@ -220,7 +220,7 @@ information on how the images are built.
|
||||
~5G-NR
|
||||
- 5G-NR SA test setup: OAI VNF + PNF/NVIDIA CUBB on gracehopper1-oai + Foxconn RU, up2 + COTS UE (Quectel RM520N), OAI CN5G
|
||||
- container images for gNB deployment
|
||||
- [RAN-SA-2x2-Module-CN5G](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-2x2-Module-CN5G/)
|
||||
- [RAN-SA-Multi-Antenna-CN5G](https://jenkins-oai.eurecom.fr/view/RAN/job/RAN-SA-Multi-Antenna-CN5G/)
|
||||
~5G-NR
|
||||
- matix + N310 (gNB), up2 + COTS UE (Quectel RM520N), OAI 5GC deployed in docker on matix
|
||||
- NR performance tests: 2x2 configuration, 60 MHz and 100 MHz bandwidth
|
||||
@@ -234,6 +234,10 @@ information on how the images are built.
|
||||
- groot (CU+DU0) + B210, rocket (DU1) + B210, raspix (Quectel RM520N UE), OAI CN5G
|
||||
- OpenShift cluster for CN deployment
|
||||
- Attenuator (mini circuits RC4DAT-6G-60) - controlled from rocket
|
||||
- [RAN-Channel-Simulation](https://jenkins-oai.eurecom.fr/job/RAN-Channel-Simulation/)
|
||||
~5G-NR
|
||||
- gracehopper1-oai
|
||||
- run channel simulation on CPU and GPU using test_channel_scalability
|
||||
|
||||
### RAN-CI-NSA-Trigger
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@ Analog beamforming implementation also allows to enable distributed antenna syst
|
||||
A set of parameters in configuration files controls the implementation of analog beamforming and instructs the scheduler on how to behave in such scenarios. Since most notably this technique in 5G is employed in FR2, the configuration file example currently available is a RFsim one for band 261. [Config file example](../ci-scripts/conf_files/gnb.sa.band257.u3.66prb.rfsim.conf)
|
||||
|
||||
In the `MACRLC` section of configuration files, there are three new parameters: `set_analog_beamforming`, `beam_duration` and `beams_per_period`. The explanation of these parameters is here provided:
|
||||
- `set_analog_beamforming` can be set a value equal to 1 or 2 to activate or 0 to desactivate analog beamforming (default value is 0)
|
||||
- `set_analog_beamforming` can be set to "none", "preconfigured" or "lophy" (default value is "none")
|
||||
- `beam_duration` is the number of slots (currently minimum duration of a beam) the scheduler is tied to a beam (default value is 1)
|
||||
- `beams_per_period` is the number of concurrent beams the RU can handle in the beam duration (default value is 1)
|
||||
- `beam_weights` is a vector field containing the set of beam indices to be provided by the OAI L1 to the RU is also required. In current implementation, the number of beam indices should be equal to the number of SSBs transmitted
|
||||
|
||||
Setting analog beamforming to 1 or 2 changes the way FAPI beam index is treated. By setting 1, we instruct L1 to look up in Hi-PHY preconfigured DBM beam index. By setting 2, we instruct L2 to directly signal to Lo-PHY the beam index (e.g. over 7.2x fronthaul).
|
||||
Setting analog beamforming to "preconfigured" or "lophy" changes the way FAPI beam index is treated. By setting "preconfigured", we instruct L1 to look up in Hi-PHY preconfigured DBM beam index. By setting "lophy", we instruct L2 to directly signal to Lo-PHY the beam index (e.g. over 7.2x fronthaul).
|
||||
|
||||
DAS is enabled by setting to 1 the parameter `enable_das` in the L1 section of the configuration file. In case of DAS enabled, the field `beam_weights` in `MACRLC` section can be omitted and the number of beams per period equals the total number of beams.
|
||||
|
||||
|
||||
BIN
doc/assets/images/OPEN_AIR_INTERFACE_LOGO.png
Normal file
BIN
doc/assets/images/OPEN_AIR_INTERFACE_LOGO.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
BIN
doc/assets/images/oai-logo-favicon.png
Normal file
BIN
doc/assets/images/oai-logo-favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
22
doc/assets/stylesheets/extra.css
Normal file
22
doc/assets/stylesheets/extra.css
Normal file
@@ -0,0 +1,22 @@
|
||||
:root {
|
||||
--md-primary-fg-color: #224C98;
|
||||
--md-primary-fg-color--light: #4C74C0;
|
||||
--md-primary-fg-color--dark: #183A76;
|
||||
--md-accent-fg-color: #224C98;
|
||||
}
|
||||
|
||||
|
||||
.md-content {
|
||||
padding-left: 1rem;
|
||||
padding-right: 1rem;
|
||||
}
|
||||
|
||||
.md-grid {
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
/* Style the footer copyright text */
|
||||
.md-footer-copyright p {
|
||||
font-size: 0.6rem; /* Increase the font size */
|
||||
padding: 1rem; /* Add some top and bottom padding */
|
||||
}
|
||||
@@ -42,10 +42,7 @@ sudo apt install -y gcc-aarch64-linux-gnu \
|
||||
g++-aarch64-linux-gnu
|
||||
|
||||
sudo apt-get install -y \
|
||||
libblas-dev:arm64 \
|
||||
libc6-dev-i386 \
|
||||
liblapack-dev:arm64 \
|
||||
liblapacke-dev:arm64 \
|
||||
libreadline-dev:arm64 \
|
||||
libgnutls28-dev:arm64 \
|
||||
libconfig-dev:arm64 \
|
||||
|
||||
23
doc/overrides/main.html
Normal file
23
doc/overrides/main.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{# Rewrite all .md links to directory URLs #}
|
||||
{{ super()
|
||||
| replace(".md", "/")
|
||||
| replace("README/", "")
|
||||
}}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block footer %}
|
||||
<footer class="md-footer">
|
||||
<div class="md-footer-meta" style="display: flex; justify-content: space-between; align-items: center; padding: 0 40px;">
|
||||
<div class="md-footer-left">
|
||||
<p><em>© Copyright 2026 <a href="https://openairinterface.org/" target="_blank" rel="noopener">OpenAirInterface.org</a></em></p>
|
||||
</div>
|
||||
<div class="md-footer-right">
|
||||
<p><em>For any bug or problems please raise an issue on <a href="https://gitlab.eurecom.fr/groups/oai/-/issues" target="_blank" rel="noopener">GitLab ↗.</a></em></p>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
{% endblock %}
|
||||
@@ -86,4 +86,4 @@ COPY oaienv .
|
||||
RUN /bin/sh oaienv && \
|
||||
cd cmake_targets && \
|
||||
mkdir -p log && \
|
||||
./build_oai -I -w USRP --install-optional-packages
|
||||
./build_oai -I -w USRP -w BLADERF --install-optional-packages
|
||||
|
||||
@@ -57,9 +57,6 @@ RUN apt-get update && \
|
||||
tzdata \
|
||||
xxd \
|
||||
# ARM64 packages
|
||||
libblas-dev:arm64 \
|
||||
liblapack-dev:arm64 \
|
||||
liblapacke-dev:arm64 \
|
||||
libreadline-dev:arm64 \
|
||||
libgnutls28-dev:arm64 \
|
||||
libconfig-dev:arm64 \
|
||||
|
||||
@@ -81,8 +81,7 @@ RUN /bin/sh oaienv && \
|
||||
--ninja --gNB \
|
||||
--build-lib "telnetsrv enbscope uescope nrscope" \
|
||||
-t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \
|
||||
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
|
||||
$BUILD_OPTION && \
|
||||
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION && \
|
||||
# Mainly to see if the sanitize option was perfectly executed
|
||||
ldd ran_build/build/nr-softmodem && \
|
||||
ldd ran_build/build/liboran_fhlib_5g.so && \
|
||||
|
||||
@@ -71,8 +71,7 @@ RUN /bin/sh oaienv && \
|
||||
--ninja --gNB --nrRU \
|
||||
--build-lib "telnetsrv enbscope uescope nrscope" \
|
||||
-t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \
|
||||
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
|
||||
$BUILD_OPTION && \
|
||||
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION && \
|
||||
# Mainly to see if the sanitize option was perfectly executed
|
||||
ldd ran_build/build/nr-softmodem && \
|
||||
ldd ran_build/build/liboran_fhlib_5g.so && \
|
||||
|
||||
@@ -47,7 +47,7 @@ RUN \
|
||||
./build_oai -c --ninja \
|
||||
--eNB --gNB --RU --UE --nrUE \
|
||||
--build-lib "telnetsrv enbscope uescope nrscope" \
|
||||
-w USRP -t Ethernet \
|
||||
-w USRP -t Ethernet -w BLADERF \
|
||||
--build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \
|
||||
--cmake-opt -DOAI_VRTSIM_TAPS_CLIENT=ON \
|
||||
--noavx512 \
|
||||
|
||||
@@ -51,7 +51,6 @@ RUN apt-get update && \
|
||||
libboost-system1.83.0 \
|
||||
libboost-program-options1.83.0 \
|
||||
tzdata \
|
||||
libblas3 \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
@@ -74,8 +73,7 @@ RUN apt-get update && \
|
||||
# if the --sanitize option was used to build, additional packages are required
|
||||
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
libasan8 \
|
||||
libubsan1 \
|
||||
liblapacke; fi' && \
|
||||
libubsan1 ; fi' && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
@@ -70,7 +70,6 @@ RUN apt-get update && \
|
||||
procps \
|
||||
libsctp1 \
|
||||
tzdata \
|
||||
libblas3 \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
|
||||
@@ -69,7 +69,6 @@ RUN apt-get update && \
|
||||
procps \
|
||||
libsctp1 \
|
||||
tzdata \
|
||||
libblas3 \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
|
||||
@@ -48,7 +48,6 @@ RUN apt-get update && \
|
||||
procps \
|
||||
libsctp1 \
|
||||
tzdata \
|
||||
libblas3 \
|
||||
libc6 \
|
||||
libconfig9 \
|
||||
gdb \
|
||||
|
||||
@@ -101,10 +101,6 @@ COPY --from=gnb-build /usr/local/lib64/flexric /usr/local/lib64/flexric
|
||||
COPY --from=gnb-base \
|
||||
/lib64/libconfig.so.11 \
|
||||
/lib64/libforms.so.2 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libicudata.so.67 \
|
||||
/lib64/libicui18n.so.67 \
|
||||
/lib64/libicuuc.so.67 \
|
||||
|
||||
@@ -90,10 +90,6 @@ COPY --from=gnb-build /usr/local/lib64/flexric /usr/local/lib64/flexric
|
||||
COPY --from=gnb-base \
|
||||
/lib64/libconfig.so.11 \
|
||||
/lib64/libforms.so.2 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libicudata.so.67 \
|
||||
/lib64/libicui18n.so.67 \
|
||||
/lib64/libicuuc.so.67 \
|
||||
|
||||
@@ -44,7 +44,6 @@ RUN apt-get update && \
|
||||
pkg-config \
|
||||
libsctp1 \
|
||||
tzdata \
|
||||
libblas3 \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
@@ -63,8 +62,7 @@ RUN apt-get update && \
|
||||
# if the --sanitize option was used to build, additional packages are required
|
||||
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
libasan8 \
|
||||
libubsan1 \
|
||||
liblapacke; fi' && \
|
||||
libubsan1 ; fi' && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/oai-gnb/bin
|
||||
|
||||
@@ -51,7 +51,6 @@ RUN apt-get update && \
|
||||
libboost-system1.83.0 \
|
||||
libboost-program-options1.83.0 \
|
||||
tzdata \
|
||||
libblas3 \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
@@ -69,8 +68,7 @@ RUN apt-get update && \
|
||||
# if the --sanitize option was used to build, additional packages are required
|
||||
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
libasan8 \
|
||||
libubsan1 \
|
||||
liblapacke; fi' && \
|
||||
libubsan1; fi' && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ RUN apt-get update && \
|
||||
libboost-thread1.83.0 \
|
||||
libboost-system1.83.0 \
|
||||
libboost-program-options1.83.0 \
|
||||
libblas3 \
|
||||
libconfig9 \
|
||||
net-tools \
|
||||
gdb \
|
||||
|
||||
@@ -73,10 +73,6 @@ COPY --from=lte-ue-build \
|
||||
|
||||
COPY --from=lte-ue-base \
|
||||
/lib64/libconfig.so.11 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libboost_chrono.so.1.75.0 \
|
||||
/lib64/libboost_date_time.so.1.75.0 \
|
||||
/lib64/libboost_filesystem.so.1.75.0 \
|
||||
|
||||
@@ -74,10 +74,6 @@ COPY --from=lte-ue-build \
|
||||
|
||||
COPY --from=lte-ue-base \
|
||||
/lib64/libconfig.so.11 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libboost_chrono.so.1.75.0 \
|
||||
/lib64/libboost_date_time.so.1.75.0 \
|
||||
/lib64/libboost_filesystem.so.1.75.0 \
|
||||
|
||||
@@ -51,8 +51,6 @@ RUN apt-get update && \
|
||||
libboost-system1.83.0 \
|
||||
libboost-program-options1.83.0 \
|
||||
tzdata \
|
||||
liblapacke \
|
||||
libblas3 \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
@@ -75,8 +73,7 @@ RUN apt-get update && \
|
||||
# if the --sanitize option was used to build, additional packages are required
|
||||
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
libasan8 \
|
||||
libubsan1 \
|
||||
liblapacke; fi' && \
|
||||
libubsan1 ; fi' && \
|
||||
apt-get clean -y && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
@@ -47,8 +47,7 @@ RUN apt-get update && \
|
||||
# if the --sanitize option was used to build, additional packages are required
|
||||
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
libasan8 \
|
||||
libubsan1 \
|
||||
liblapacke; fi' && \
|
||||
libubsan1; fi' && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
## Copy E2 SM models
|
||||
|
||||
@@ -25,7 +25,6 @@ FROM ran-build-fhi72:latest AS ran-build
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM ubuntu:noble AS oai-nr-oru
|
||||
ARG BUILD_OPTION
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Europe
|
||||
|
||||
@@ -37,7 +36,6 @@ RUN apt-get update && \
|
||||
pkg-config \
|
||||
libsctp1 \
|
||||
tzdata \
|
||||
libblas3 \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
@@ -50,11 +48,6 @@ RUN apt-get update && \
|
||||
xz-utils \
|
||||
libnuma-dev \
|
||||
libyaml-cpp-dev && \
|
||||
# if the --sanitize option was used to build, additional packages are required
|
||||
/bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
libasan8 \
|
||||
libubsan1 \
|
||||
liblapacke; fi' && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/nr-oru/bin
|
||||
|
||||
@@ -52,8 +52,6 @@ RUN apt-get update && \
|
||||
libboost-system1.83.0 \
|
||||
libboost-program-options1.83.0 \
|
||||
tzdata \
|
||||
liblapacke \
|
||||
libblas3 \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
|
||||
@@ -69,10 +69,6 @@ COPY --from=phy-sim-build /opt/oai-physim/bin/ /opt/oai-physim/bin/
|
||||
|
||||
COPY --from=phy-sim-build \
|
||||
/oai-ran/cmake_targets/ran_build/build/libcoding.so \
|
||||
/lib64/liblapacke.so.3 \
|
||||
/lib64/libblas.so.3 \
|
||||
/lib64/libcblas.so.3 \
|
||||
/lib64/liblapack.so.3 \
|
||||
/usr/lib64/libasan.so.6 \
|
||||
/usr/lib64/libubsan.so.1 \
|
||||
/oai-ran/cmake_targets/ran_build/build/libdfts.so \
|
||||
|
||||
2
executables/CMakeLists.txt
Normal file
2
executables/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
add_library(softmodem_common STATIC softmodem-common.c)
|
||||
target_link_libraries(softmodem_common PUBLIC shlib_loader)
|
||||
@@ -33,8 +33,6 @@
|
||||
#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"
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/time_manager/time_manager.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include <executables/softmodem-common.h>
|
||||
/* these variables have to be defined before including ENB_APP/enb_paramdef.h and GNB_APP/gnb_paramdef.h */
|
||||
@@ -244,9 +243,8 @@ int connect_rau(RU_t *ru) {
|
||||
/* Southbound Fronthaul functions, RCC/RAU */
|
||||
|
||||
// southbound IF5 fronthaul for 16-bit OAI format
|
||||
void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
|
||||
if (ru == RC.ru[0])
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx & 0xffffffff);
|
||||
void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
{
|
||||
int offset = get_samples_slot_timestamp(ru->nr_frame_parms, slot);
|
||||
void *buffs[ru->nb_tx];
|
||||
for (int aid = 0; aid < ru->nb_tx; aid++)
|
||||
@@ -266,10 +264,8 @@ void fh_if5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
|
||||
}
|
||||
|
||||
// southbound IF4p5 fronthaul
|
||||
void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
|
||||
if (ru == RC.ru[0])
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, ru->proc.timestamp_tx & 0xffffffff);
|
||||
|
||||
void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
|
||||
{
|
||||
LOG_D(PHY,"Sending IF4p5 for frame %d subframe %d\n",ru->proc.frame_tx,ru->proc.tti_tx);
|
||||
|
||||
if ((nr_slot_select(&ru->config, ru->proc.frame_tx, ru->proc.tti_tx) & NR_DOWNLINK_SLOT) > 0)
|
||||
@@ -281,12 +277,10 @@ void fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp) {
|
||||
|
||||
// Synchronous if5 from south
|
||||
|
||||
void fh_if5_south_in(RU_t *ru,
|
||||
int *frame,
|
||||
int *tti) {
|
||||
void fh_if5_south_in(RU_t *ru, int *frame, int *tti)
|
||||
{
|
||||
NR_DL_FRAME_PARMS *fp = ru->nr_frame_parms;
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 1 );
|
||||
start_meas(&ru->rx_fhaul);
|
||||
|
||||
ru->ifdevice.trx_read_func2(&ru->ifdevice, &proc->timestamp_rx, NULL, get_samples_per_slot(*tti, fp));
|
||||
@@ -339,9 +333,6 @@ void fh_if5_south_in(RU_t *ru,
|
||||
proc->first_rx,
|
||||
ru->rx_fhaul.p_time / (cpu_freq_GHz * 1000.0),
|
||||
rxmeas.tv_nsec);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_RECV_IF5, 0 );
|
||||
|
||||
}
|
||||
|
||||
// Synchronous if4p5 from south
|
||||
@@ -398,15 +389,7 @@ void fh_if4p5_south_in(RU_t *ru,
|
||||
*slot = proc->tti_rx;
|
||||
}
|
||||
|
||||
if (ru == RC.ru[0]) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU, f );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, sl);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, proc->frame_tx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, proc->tti_tx );
|
||||
}
|
||||
|
||||
proc->symbol_mask[proc->tti_rx] = 0;
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, proc->timestamp_rx&0xffffffff );
|
||||
LOG_D(PHY,"RU %d: fh_if4p5_south_in sleeping ...\n",ru->idx);
|
||||
}
|
||||
|
||||
@@ -448,7 +431,8 @@ void fh_if4p5_south_asynch_in(RU_t *ru,int *frame,int *slot) {
|
||||
|
||||
// RRU IF4p5 TX fronthaul receiver. Assumes an if_device on input and if or rf device on output
|
||||
// receives one subframe's worth of IF4p5 OFDM symbols and OFDM modulates
|
||||
void fh_if4p5_north_in(RU_t *ru,int *frame,int *slot) {
|
||||
void fh_if4p5_north_in(RU_t *ru,int *frame,int *slot)
|
||||
{
|
||||
uint32_t symbol_number=0;
|
||||
uint32_t symbol_mask, symbol_mask_full;
|
||||
uint16_t packet_type;
|
||||
@@ -461,12 +445,6 @@ void fh_if4p5_north_in(RU_t *ru,int *frame,int *slot) {
|
||||
recv_IF4p5(ru, frame, slot, &packet_type, &symbol_number);
|
||||
symbol_mask = symbol_mask | (1<<symbol_number);
|
||||
} while (symbol_mask != symbol_mask_full);
|
||||
|
||||
// dump VCD output for first RU in list
|
||||
if (ru == RC.ru[0]) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, *frame );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, *slot );
|
||||
}
|
||||
}
|
||||
|
||||
void fh_if5_north_asynch_in(RU_t *ru, int *frame, int *slot)
|
||||
@@ -525,12 +503,6 @@ void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *slot) {
|
||||
((uint64_t)frame_tx + proc->frame_tx_unwrap) * fp->samples_per_subframe * 10 + get_samples_slot_timestamp(fp, slot_tx);
|
||||
LOG_D(PHY, "RU %d/%d TST %lu, frame %d, subframe %d\n", ru->idx, 0, proc->timestamp_tx, frame_tx, slot_tx);
|
||||
|
||||
// dump VCD output for first RU in list
|
||||
if (ru == RC.ru[0]) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame_tx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, slot_tx );
|
||||
}
|
||||
|
||||
if (ru->feptx_ofdm)
|
||||
ru->feptx_ofdm(ru, frame_tx, slot_tx);
|
||||
|
||||
@@ -538,18 +510,16 @@ void fh_if4p5_north_asynch_in(RU_t *ru,int *frame,int *slot) {
|
||||
ru->fh_south_out(ru, frame_tx, slot_tx, proc->timestamp_tx);
|
||||
}
|
||||
|
||||
void fh_if5_north_out(RU_t *ru) {
|
||||
void fh_if5_north_out(RU_t *ru)
|
||||
{
|
||||
/// **** send_IF5 of rxdata to BBU **** ///
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_SEND_IF5, 1 );
|
||||
AssertFatal(1 == 0, "Shouldn't get here\n");
|
||||
}
|
||||
|
||||
// RRU IF4p5 northbound interface (RX)
|
||||
void fh_if4p5_north_out(RU_t *ru) {
|
||||
void fh_if4p5_north_out(RU_t *ru)
|
||||
{
|
||||
RU_proc_t *proc=&ru->proc;
|
||||
if (ru->idx == 0)
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, proc->tti_rx);
|
||||
|
||||
start_meas(&ru->tx_fhaul);
|
||||
send_IF4p5(ru, proc->frame_rx, proc->tti_rx, IF4p5_PULFFT);
|
||||
stop_meas(&ru->tx_fhaul);
|
||||
@@ -569,15 +539,12 @@ static void rx_rf(RU_t *ru, int *frame, int *slot)
|
||||
for (int i = 0; i < nb; i++)
|
||||
rxp[i] = (void *)&ru->common.rxdata[i][get_samples_slot_timestamp(fp, *slot)];
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 1);
|
||||
openair0_timestamp_t old_ts = proc->timestamp_rx;
|
||||
LOG_D(PHY,"Reading %d samples for slot %d (%p)\n", samples_per_slot, *slot, rxp[0]);
|
||||
|
||||
openair0_timestamp_t ts;
|
||||
unsigned int rxs;
|
||||
rxs = ru->rfdevice.trx_read_func(&ru->rfdevice, &ts, rxp, samples_per_slot, nb);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
|
||||
proc->timestamp_rx = ts-ru->ts_offset;
|
||||
|
||||
if (rxs != samples_per_slot)
|
||||
@@ -617,12 +584,6 @@ static void rx_rf(RU_t *ru, int *frame, int *slot)
|
||||
proc->tti_tx,
|
||||
fp->slots_per_frame);
|
||||
|
||||
// dump VCD output for first RU in list
|
||||
if (ru == RC.ru[0]) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_RX0_RU, proc->frame_rx );
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_RX0_RU, proc->tti_rx );
|
||||
}
|
||||
|
||||
if (proc->first_rx == 0) {
|
||||
if (proc->tti_rx != *slot) {
|
||||
LOG_E(PHY,
|
||||
@@ -653,8 +614,6 @@ static void rx_rf(RU_t *ru, int *frame, int *slot)
|
||||
metadata mt = {.slot = *slot, .frame = *frame};
|
||||
gNBscopeCopyWithMetadata(ru, gNbTimeDomainSamples, rxp[0], sizeof(c16_t), 1, samples_per_slot, 0, &mt);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME( VCD_SIGNAL_DUMPER_VARIABLES_TRX_TS, (proc->timestamp_rx+ru->ts_offset)&0xffffffff );
|
||||
|
||||
if (rxs != samples_per_slot) {
|
||||
//exit_fun( "problem receiving samples" );
|
||||
LOG_E(PHY, "problem receiving samples\n");
|
||||
@@ -773,17 +732,11 @@ void tx_rf(RU_t *ru, int frame,int slot, uint64_t timestamp)
|
||||
const int flags = flags_burst | (flags_gpio << 4);
|
||||
proc->first_tx = 0;
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_WRITE_FLAGS, flags);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_FRAME_NUMBER_TX0_RU, frame);
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TTI_NUMBER_TX0_RU, slot);
|
||||
|
||||
int nt = ru->nb_tx * ru->num_beams_period;
|
||||
void *txp[nt];
|
||||
for (int i = 0; i < nt; i++)
|
||||
txp[i] = (void *)&ru->common.txdata[i][get_samples_slot_timestamp(fp, slot)] - sf_extension * sizeof(int32_t);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_VARIABLE_BY_NAME(VCD_SIGNAL_DUMPER_VARIABLES_TRX_TST, (timestamp + ru->ts_offset) & 0xffffffff);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 1);
|
||||
// prepare tx buffer pointers
|
||||
uint32_t txs = ru->rfdevice.trx_write_func(&ru->rfdevice,
|
||||
timestamp + ru->ts_offset - sf_extension,
|
||||
@@ -804,7 +757,6 @@ void tx_rf(RU_t *ru, int frame,int slot, uint64_t timestamp)
|
||||
siglen + sf_extension,
|
||||
txs,
|
||||
10 * log10((double)signal_energy(txp[0], siglen + sf_extension)));
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0);
|
||||
}
|
||||
|
||||
static void fill_rf_config(RU_t *ru, char *rf_config_file)
|
||||
@@ -1208,10 +1160,8 @@ void *ru_thread(void *param)
|
||||
// Do PRACH RU processing
|
||||
prach_item_t *p = find_nr_prach(&gNB->prach_list, proc->frame_rx, proc->tti_rx, SEARCH_EXIST);
|
||||
if (p) {
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 1 );
|
||||
// need to extract RACH data for lqter processing by rx_nr_prach()
|
||||
rx_nr_prach_ru(p, ru->common.rxdata, ru->nr_frame_parms, ru->N_TA_offset);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_RU_PRACH_RX, 0);
|
||||
} // end if (prach_id >= 0)
|
||||
} // end if (ru->feprx)
|
||||
} // end if (slot_type == NR_UPLINK_SLOT || slot_type == NR_MIXED_SLOT) {
|
||||
|
||||
@@ -60,7 +60,6 @@ unsigned short config_frames[4] = {2,9,11,13};
|
||||
#endif
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/time_manager/time_manager.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
|
||||
#include "UTIL/OPT/opt.h"
|
||||
#include "LAYER2/nr_pdcp/nr_pdcp_oai_api.h"
|
||||
@@ -166,8 +165,6 @@ static void get_options(configmodule_interface_t *cfg)
|
||||
paramdef_t cmdline_params[] = CMDLINE_NRUEPARAMS_DESC;
|
||||
int numparams = sizeofArray(cmdline_params);
|
||||
config_get(cfg, cmdline_params, numparams, NULL);
|
||||
if (nrUE_params.vcdflag > 0)
|
||||
ouput_vcd = 1;
|
||||
AssertFatal(nrUE_params.extra_pdu_id == -1,
|
||||
"Add additional PDU sessions in uicc.pdu_sessions array instead\n");
|
||||
}
|
||||
@@ -285,9 +282,6 @@ int main(int argc, char **argv)
|
||||
int ret_loader = load_nrLDPC_coding_interface(NULL, &nrLDPC_coding_interface);
|
||||
AssertFatal(ret_loader == 0, "error loading LDPC library\n");
|
||||
|
||||
if (ouput_vcd) {
|
||||
vcd_signal_dumper_init("/tmp/openair_dump_nrUE.vcd");
|
||||
}
|
||||
// strdup to put the sring in the core file for post mortem identification
|
||||
char *pckg = strdup(OAI_PACKAGE_VERSION);
|
||||
LOG_I(HW, "Version: %s\n", pckg);
|
||||
@@ -479,9 +473,6 @@ int main(int argc, char **argv)
|
||||
LOG_W(NR_PHY, "Returned from ITTI signal handler\n");
|
||||
oai_exit = 1;
|
||||
|
||||
if (ouput_vcd)
|
||||
vcd_signal_dumper_close();
|
||||
|
||||
if (PHY_vars_UE_g && PHY_vars_UE_g[0]) {
|
||||
for (int CC_id = 0; CC_id < MAX_NUM_CCs; CC_id++) {
|
||||
PHY_VARS_NR_UE *phy_vars = PHY_vars_UE_g[0][CC_id];
|
||||
|
||||
85
mkdocs.yml
Normal file
85
mkdocs.yml
Normal file
@@ -0,0 +1,85 @@
|
||||
################################################################################
|
||||
# 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
|
||||
################################################################################
|
||||
|
||||
site_name: OpenAirInterface
|
||||
site_url: ""
|
||||
site_author: OpenAirInterface Software Alliance
|
||||
docs_dir: doc
|
||||
theme:
|
||||
name: material
|
||||
custom_dir: doc/overrides
|
||||
logo: assets/images/OPEN_AIR_INTERFACE_LOGO.png
|
||||
favicon: assets/images/oai-logo-favicon.png
|
||||
features:
|
||||
- navigation.top
|
||||
- content.collapse
|
||||
- content.code.copy
|
||||
palette:
|
||||
primary: custom
|
||||
accent: custom
|
||||
font:
|
||||
text: Roboto
|
||||
code: Roboto Mono
|
||||
extra:
|
||||
version:
|
||||
provider: mike
|
||||
|
||||
extra_css:
|
||||
- assets/stylesheets/extra.css
|
||||
|
||||
# Repository
|
||||
repo_name: OAI Documentation GitLab
|
||||
repo_url: https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||
|
||||
## Navigation Entries Block Starts
|
||||
|
||||
|
||||
## Navigation Entries Block Ends
|
||||
|
||||
|
||||
markdown_extensions:
|
||||
- toc:
|
||||
permalink: true
|
||||
- tables
|
||||
- attr_list
|
||||
- admonition
|
||||
- codehilite
|
||||
- footnotes
|
||||
- smarty
|
||||
- pymdownx.details
|
||||
- pymdownx.superfences:
|
||||
custom_fences:
|
||||
- name: mermaid
|
||||
class: mermaid
|
||||
format: !!python/name:mermaid2.fence_mermaid_custom
|
||||
|
||||
validation:
|
||||
links:
|
||||
not_found: ignore
|
||||
|
||||
plugins:
|
||||
- search
|
||||
- mermaid2
|
||||
- simple:
|
||||
include: [".txt", ".mmd", "README", ".conf", ".c", ".yaml", ".yml", ".cpp", ".md", ".png", ".h", ".json", ".patch", ".py", ".sh"]
|
||||
merge_docs_dir: true
|
||||
ignore:
|
||||
- README.md
|
||||
@@ -716,7 +716,13 @@ typedef enum {
|
||||
X(NFAPI_NR_PHY_API_MSG_TX_ERR, 0X8)
|
||||
|
||||
#ifdef ENABLE_AERIAL
|
||||
// Error codes obtained from Aerial L1 file
|
||||
// cuPHY-CP/scfl2adapter/lib/scf_5g_fapi/scf_5g_fapi.h
|
||||
#define AERIAL_ERROR_LIST \
|
||||
X(SCF_ERROR_CODE_MSG_INVALID_PHY_ID, 0x9) \
|
||||
X(SCF_ERROR_CODE_MSG_UNINSTANTIATED_PHY, 0xA) \
|
||||
X(SCF_ERROR_CODE_MSG_INVALID_DFE_Profile, 0xB) \
|
||||
X(SCF_ERROR_CODE_MSG_PHY_PROFILE_SELECTION, 0xC) \
|
||||
X(AERIAL_ERROR_CODE_FAPI_END, 0x32) \
|
||||
X(AERIAL_ERROR_CODE_L1_PROC_OBJ_UNAVAILABLE_ERR, 0x33) \
|
||||
X(AERIAL_ERROR_CODE_MSG_LATE_SLOT_ERR, 0x34) \
|
||||
@@ -729,7 +735,26 @@ typedef enum {
|
||||
X(AERIAL_ERROR_CODE_L1_P1_EXIT_ERROR, 0x3B) \
|
||||
X(AERIAL_ERROR_CODE_L1_P2_EXIT_ERROR, 0x3C) \
|
||||
X(AERIAL_ERROR_CODE_L1_DL_CH_ERROR, 0x3D) \
|
||||
X(AERIAL_ERROR_CODE_L1_UL_CH_ERROR, 0x3E)
|
||||
X(AERIAL_ERROR_CODE_L1_UL_CH_ERROR, 0x3E) \
|
||||
X(SCF_ERROR_CODE_EARLY_HARQ_TIMING_ERROR, 0x3F) \
|
||||
X(SCF_ERROR_CODE_SRS_CHEST_BUFF_BAD_STATE, 0x40) \
|
||||
X(SCF_ERROR_CODE_BEAM_ID_OUT_OF_RANGE, 0x41) \
|
||||
X(SCF_ERROR_CODE_PTP_SVC_ERROR, 0x42) \
|
||||
X(SCF_ERROR_CODE_PTP_SYNCED, 0x43) \
|
||||
X(SCF_ERROR_CODE_L1_MISSING_UL_IQ, 0x44) \
|
||||
X(SCF_ERROR_CODE_MSG_CAPACITY_EXCEEDED, 0x45) \
|
||||
X(SCF_ERROR_CODE_RHOCP_PTP_EVENTS_ERROR, 0x46) \
|
||||
X(SCF_ERROR_CODE_RHOCP_PTP_EVENTS_SYNCED, 0x47) \
|
||||
X(SCF_FAPI_SSB_PBCH_L1_LIMIT_EXCEEDED, 0x81) \
|
||||
X(SCF_FAPI_PDCCH_L1_LIMIT_EXCEEDED, 0x82) \
|
||||
X(SCF_FAPI_PDSCH_L1_LIMIT_EXCEEDED, 0x84) \
|
||||
X(SCF_FAPI_CSIRS_L1_LIMIT_EXCEEDED, 0x88) \
|
||||
X(SCF_FAPI_PUSCH_L1_LIMIT_EXCEEDED, 0xC1) \
|
||||
X(SCF_FAPI_PUCCH_L1_LIMIT_EXCEEDED, 0xC2) \
|
||||
X(SCF_FAPI_SRS_L1_LIMIT_EXCEEDED, 0xC4) \
|
||||
X(SCF_FAPI_PRACH_L1_LIMIT_EXCEEDED, 0xC8) \
|
||||
X(SCF_ERROR_CODE_RELEASED_HARQ_BUFFER_INFO, 0xD0)
|
||||
|
||||
#else
|
||||
#define AERIAL_ERROR_LIST
|
||||
#endif
|
||||
|
||||
@@ -66,5 +66,9 @@ if (ENABLE_LDPC_CUDA)
|
||||
add_dependencies(nr_dlschsim ldpc_cuda)
|
||||
endif()
|
||||
|
||||
add_library(crc_byte OBJECT crc_byte.c)
|
||||
|
||||
add_subdirectory(nrLDPC_coding)
|
||||
add_subdirectory(nrLDPC_decoder)
|
||||
add_subdirectory(nrPolar_tools)
|
||||
add_subdirectory(nrSmallBlock)
|
||||
|
||||
@@ -44,12 +44,12 @@ $(OBJ) : %.o : %.c
|
||||
$(CC) -c $(CFLAGS) -Wall -I$(TOP_DIR) -I$(TOP_DIR)/PHY/CODING -I$(OPENAIR0_DIR)/express-mimo/simulator/baseband/C/channel_decoder -o $@ $<
|
||||
|
||||
ltetest: $(OBJ) ltetest.c
|
||||
$(CC) ltetest.c -O2 -I$(TOP_DIR) -I$(TOP_DIR)/PHY/CODING -I$(OPENAIR0_DIR)/express-mimo/simulator/baseband/C/channel_decoder -o ltetest $(CFLAGS) $(OBJ) -lm -DOPENAIR_LTE -lblas -lrt
|
||||
$(CC) ltetest.c -O2 -I$(TOP_DIR) -I$(TOP_DIR)/PHY/CODING -I$(OPENAIR0_DIR)/express-mimo/simulator/baseband/C/channel_decoder -o ltetest $(CFLAGS) $(OBJ) -lm -DOPENAIR_LTE -lrt
|
||||
|
||||
pdcch_test: $(OBJ) pdcch_test.c
|
||||
$(CC) pdcch_test.c -I$(TOP_DIR) -o pdcch_test $(CFLAGS) $(PHY_OBJS) -lm -lblas
|
||||
$(CC) pdcch_test.c -I$(TOP_DIR) -o pdcch_test $(CFLAGS) $(PHY_OBJS) -lm
|
||||
viterbi_test: $(OBJ) viterbi_test.c
|
||||
$(CC) viterbi_test.c -I$(TOP_DIR) -o viterbi_test $(CFLAGS) $(PHY_OBJS) -lm -lblas
|
||||
$(CC) viterbi_test.c -I$(TOP_DIR) -o viterbi_test $(CFLAGS) $(PHY_OBJS) -lm
|
||||
|
||||
clean:
|
||||
rm $(OBJ)
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "../nrLDPC_coding_interface.h"
|
||||
#include "nrLDPC_coding_aal.h"
|
||||
#include "PHY/sse_intrin.h"
|
||||
#include "reverse_bits.h"
|
||||
#include <common/utils/LOG/log.h>
|
||||
#define NR_LDPC_ENABLE_PARITY_CHECK
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
#include "defs.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
|
||||
#include <stdalign.h>
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include <openair2/UTIL/OPT/opt.h>
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#include "PHY/defs_gNB.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "defs.h"
|
||||
// #define DEBUG_ULSCH_DECODING
|
||||
// #define gNB_DEBUG_TRACE
|
||||
|
||||
15
openair1/PHY/CODING/nrPolar_tools/CMakeLists.txt
Normal file
15
openair1/PHY/CODING/nrPolar_tools/CMakeLists.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
add_library(polar STATIC
|
||||
nr_polar_init.c
|
||||
nr_bitwise_operations.c
|
||||
nr_crc_byte.c
|
||||
nr_polar_decoder.c
|
||||
nr_polar_decoding_tools.c
|
||||
nr_polar_encoder.c
|
||||
nr_polar_interleaving_pattern.c
|
||||
nr_polar_kernal_operation.c
|
||||
nr_polar_kronecker_power_matrices.c
|
||||
nr_polar_matrix_and_array.c
|
||||
nr_polar_procedures.c
|
||||
nr_polar_sequence_pattern.c
|
||||
)
|
||||
target_link_libraries(polar PRIVATE utils)
|
||||
@@ -30,8 +30,8 @@
|
||||
* \warning
|
||||
*/
|
||||
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
|
||||
#include "reverse_bits.h"
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
1
openair1/PHY/CODING/nrSmallBlock/CMakeLists.txt
Normal file
1
openair1/PHY/CODING/nrSmallBlock/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
add_library(smallblock STATIC encodeSmallBlock.c decodeSmallBlock.c)
|
||||
@@ -22,7 +22,6 @@
|
||||
#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"
|
||||
#include <math.h>
|
||||
#include "openair1/PHY/defs_RU.h"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "nr_phy_init.h"
|
||||
#include "openair1/PHY/defs_RU.h"
|
||||
#include "openair1/PHY/impl_defs_nr.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "assertions.h"
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
#include "PHY/NR_UE_TRANSPORT/nr_transport_ue.h"
|
||||
|
||||
@@ -549,10 +549,7 @@ void construct_HhH_elements(int *ch0conj_ch0, //00_00
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void squared_matrix_element(int32_t *Hh_h_00,
|
||||
int32_t *Hh_h_00_sq,
|
||||
unsigned short nb_rb)
|
||||
static void squared_matrix_element(int32_t *Hh_h_00, int32_t *Hh_h_00_sq, unsigned short nb_rb)
|
||||
{
|
||||
|
||||
simde__m128i *Hh_h_00_128,*Hh_h_00_sq_128;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,370 +0,0 @@
|
||||
/* These functions compute linear preprocessing for
|
||||
the UE using LAPACKE and CBLAS modules of
|
||||
LAPACK libraries.
|
||||
MMSE and MMSE whitening filters are available.
|
||||
Functions are using RowMajor storage of the
|
||||
matrices, like in conventional C. Traditional
|
||||
Fortran functions of LAPACK employ ColumnMajor
|
||||
data storage. */
|
||||
|
||||
#include<stdio.h>
|
||||
#include<math.h>
|
||||
#include<complex.h>
|
||||
#include <stdlib.h>
|
||||
#include <linux/version.h>
|
||||
#include <cblas.h>
|
||||
#include <string.h>
|
||||
#include <linux/version.h>
|
||||
#include <lapacke_utils.h>
|
||||
#include <lapacke.h>
|
||||
//#define DEBUG_PREPROC
|
||||
#include "common/utils/utils.h"
|
||||
|
||||
void transpose (int N, float complex *A, float complex *Result)
|
||||
{
|
||||
// COnputes C := alpha*op(A)*op(B) + beta*C,
|
||||
CBLAS_TRANSPOSE transa = CblasTrans;
|
||||
CBLAS_TRANSPOSE transb = CblasNoTrans;
|
||||
int rows_opA = N; // number of rows in op(A) and in C
|
||||
int col_opB = N; //number of columns of op(B) and in C
|
||||
int col_opA = N; //number of columns in op(A) and rows in op(B)
|
||||
int col_B; //number of columns in B
|
||||
float complex alpha = 1.0+I*0;
|
||||
int lda = rows_opA;
|
||||
float complex beta = 0.0+I*0;
|
||||
int ldc = rows_opA;
|
||||
int i;
|
||||
float complex* B;
|
||||
|
||||
int ldb = col_opB;
|
||||
|
||||
if (transb == CblasNoTrans) {
|
||||
B = calloc_or_fail(ldb * col_opB, sizeof(float complex));
|
||||
col_B= col_opB;
|
||||
}
|
||||
else {
|
||||
B = calloc_or_fail(ldb * col_opA, sizeof(float complex));
|
||||
col_B = col_opA;
|
||||
}
|
||||
float complex* C = malloc_or_fail(ldc * col_opB * sizeof(float complex));
|
||||
|
||||
for (i=0; i<lda*col_B; i+=N+1)
|
||||
B[i]=1.0+I*0;
|
||||
|
||||
cblas_cgemm(CblasRowMajor, transa, transb, rows_opA, col_opB, col_opA, &alpha, A, lda, B, ldb, &beta, C, ldc);
|
||||
|
||||
memcpy(Result, C, N*N*sizeof(float complex));
|
||||
|
||||
free(B);
|
||||
free(C);
|
||||
}
|
||||
|
||||
|
||||
void conjugate_transpose (int N, float complex *A, float complex *Result)
|
||||
{
|
||||
// Computes C := alpha*op(A)*op(B) + beta*C,
|
||||
CBLAS_TRANSPOSE transa = CblasConjTrans;
|
||||
CBLAS_TRANSPOSE transb = CblasNoTrans;
|
||||
int rows_opA = N; // number of rows in op(A) and in C
|
||||
int col_opB = N; //number of columns of op(B) and in C
|
||||
int col_opA = N; //number of columns in op(A) and rows in op(B)
|
||||
int col_B; //number of columns in B
|
||||
float complex alpha = 1.0+I*0;
|
||||
int lda = rows_opA;
|
||||
float complex beta = 0.0+I*0;
|
||||
int ldc = rows_opA;
|
||||
int i;
|
||||
float complex* B;
|
||||
int ldb = col_opB;
|
||||
|
||||
if (transb == CblasNoTrans) {
|
||||
B = calloc_or_fail(ldb * col_opB, sizeof(float complex));
|
||||
col_B= col_opB;
|
||||
}
|
||||
else {
|
||||
B = calloc_or_fail(ldb * col_opA, sizeof(float complex));
|
||||
col_B = col_opA;
|
||||
}
|
||||
float complex* C = malloc_or_fail(ldc * col_opB * sizeof(float complex));
|
||||
|
||||
for (i=0; i<lda*col_B; i+=N+1)
|
||||
B[i]=1.0+I*0;
|
||||
|
||||
cblas_cgemm(CblasRowMajor, transa, transb, rows_opA, col_opB, col_opA, &alpha, A, lda, B, ldb, &beta, C, ldc);
|
||||
|
||||
memcpy(Result, C, N*N*sizeof(float complex));
|
||||
|
||||
free(B);
|
||||
free(C);
|
||||
}
|
||||
|
||||
void H_hermH_plus_sigma2I (int N, int M, float complex *A, float sigma2, float complex *Result)
|
||||
{
|
||||
//C := alpha*op(A)*op(B) + beta*C,
|
||||
CBLAS_TRANSPOSE transa = CblasConjTrans;
|
||||
CBLAS_TRANSPOSE transb = CblasNoTrans;
|
||||
int rows_opA = N; // number of rows in op(A) and in C
|
||||
int col_opB = N; //number of columns of op(B) and in C
|
||||
int col_opA = N; //number of columns in op(A) and rows in op(B)
|
||||
int col_C = N; //number of columns in B
|
||||
float complex alpha = 1.0+I*0;
|
||||
int lda = col_opA;
|
||||
float complex beta = 1.0 + I*0;
|
||||
int ldc = col_opA;
|
||||
int i;
|
||||
|
||||
float complex* C = calloc_or_fail(ldc * col_opB, sizeof(float complex));
|
||||
|
||||
for (i=0; i<lda*col_C; i+=N+1)
|
||||
C[i]=sigma2*(1.0+I*0);
|
||||
|
||||
cblas_cgemm(CblasRowMajor, transa, transb, rows_opA, col_opB, col_opA, &alpha, A, lda, A, lda, &beta, C, ldc);
|
||||
|
||||
memcpy(Result, C, N*M*sizeof(float complex));
|
||||
free(C);
|
||||
|
||||
}
|
||||
|
||||
void HH_herm_plus_sigma2I (int M, int N, float complex *A, float sigma2, float complex *Result)
|
||||
{
|
||||
//C := alpha*op(A)*op(B) + beta*C,
|
||||
CBLAS_TRANSPOSE transa = CblasNoTrans;
|
||||
CBLAS_TRANSPOSE transb = CblasConjTrans;
|
||||
int k = N; //number of columns in op(A) and rows in op(B),k
|
||||
float complex alpha = 1.0+I*0;
|
||||
int lda = N;
|
||||
int ldb = N;
|
||||
int ldc = M;
|
||||
int i;
|
||||
|
||||
float complex* C = calloc_or_fail(M * M, sizeof(float complex));
|
||||
|
||||
for (i=0; i<M*M; i+=M+1)
|
||||
C[i]=1.0+I*0;
|
||||
|
||||
cblas_cgemm(CblasRowMajor, transa, transb, M, M, k, &alpha, A, lda, A, ldb, &sigma2, C, ldc);
|
||||
|
||||
memcpy(Result, C, M*M*sizeof(float complex));
|
||||
free(C);
|
||||
|
||||
}
|
||||
|
||||
void eigen_vectors_values (int N, float complex *A, float complex *Vectors, float *Values_Matrix)
|
||||
{
|
||||
// This function computes ORTHONORMAL eigenvectors and eigenvalues of matrix A,
|
||||
// where Values_Matrix is a diagonal matrix of eigenvalues.
|
||||
// A=Vectors*Values_Matrix*Vectors'
|
||||
char jobz = 'V';
|
||||
char uplo = 'U';
|
||||
int order_A = N;
|
||||
int lda = N;
|
||||
int i;
|
||||
float* Values = malloc_or_fail(sizeof(float) * 1 * N);
|
||||
|
||||
LAPACKE_cheev(LAPACK_ROW_MAJOR, jobz, uplo, order_A, A, lda, Values);
|
||||
|
||||
memcpy(Vectors, A, N*N*sizeof(float complex));
|
||||
|
||||
for (i=0; i<lda; i+=1)
|
||||
Values_Matrix[i*(lda+1)]=Values[i];
|
||||
|
||||
free(Values);
|
||||
}
|
||||
|
||||
void lin_eq_solver (int N, float complex* A, float complex* B, float complex* Result)
|
||||
{
|
||||
int n = N;
|
||||
int lda = N;
|
||||
int ldb = N;
|
||||
int nrhs = N;
|
||||
|
||||
char transa = 'N';
|
||||
int* IPIV = malloc_or_fail(N * N * sizeof(int));
|
||||
|
||||
// Compute LU-factorization
|
||||
LAPACKE_cgetrf(LAPACK_ROW_MAJOR, n, nrhs, A, lda, IPIV);
|
||||
|
||||
// Solve AX=B
|
||||
LAPACKE_cgetrs(LAPACK_ROW_MAJOR, transa, n, nrhs, A, lda, IPIV, B, ldb);
|
||||
|
||||
// cgetrs( "N", N, 4, A, lda, IPIV, B, ldb, INFO )
|
||||
|
||||
memcpy(Result, B, N*N*sizeof(float complex));
|
||||
|
||||
free(IPIV);
|
||||
|
||||
}
|
||||
|
||||
void mutl_matrix_matrix_row_based(float complex* M0, float complex* M1, int rows_M0, int col_M0, int rows_M1, int col_M1, float complex* Result ){
|
||||
CBLAS_TRANSPOSE transa = CblasNoTrans;
|
||||
CBLAS_TRANSPOSE transb = CblasNoTrans;
|
||||
int rows_opA = rows_M0; // number of rows in op(A) and in C
|
||||
int col_opB = col_M1; //number of columns of op(B) and in C
|
||||
int col_opA = col_M0; //number of columns in op(A) and rows in op(B)
|
||||
float complex alpha =1.0;
|
||||
int lda = col_M0;
|
||||
float complex beta = 0.0;
|
||||
int ldc = col_M1;
|
||||
int ldb = col_M1;
|
||||
|
||||
#ifdef DEBUG_PREPROC
|
||||
int i=0;
|
||||
printf("rows_M0 %d, col_M0 %d, rows_M1 %d, col_M1 %d\n", rows_M0, col_M0, rows_M1, col_M1);
|
||||
|
||||
for(i=0; i<rows_M0*col_M0; ++i)
|
||||
printf(" rows_opA = %d, col_opB = %d, W_MMSE[%d] = (%f + i%f)\n", rows_opA, col_opB, i , creal(M0[i]), cimag(M0[i]));
|
||||
|
||||
for(i=0; i<rows_M1*col_M1; ++i)
|
||||
printf(" M1[%d] = (%f + i%f)\n", i , creal(M1[i]), cimag(M1[i]));
|
||||
#endif
|
||||
|
||||
cblas_cgemm(CblasRowMajor, transa, transb, rows_opA, col_opB, col_opA, &alpha, M0, lda, M1, ldb, &beta, Result, ldc);
|
||||
|
||||
#ifdef DEBUG_PREPROC
|
||||
for(i=0; i<rows_opA*col_opB; ++i)
|
||||
printf(" result[%d] = (%f + i%f)\n", i , creal(Result[i]), cimag(Result[i]));
|
||||
#endif
|
||||
|
||||
}
|
||||
void mutl_matrix_matrix_col_based(float complex* M0, float complex* M1, int rows_M0, int col_M0, int rows_M1, int col_M1, float complex* Result ){
|
||||
CBLAS_TRANSPOSE transa = CblasNoTrans;
|
||||
CBLAS_TRANSPOSE transb = CblasNoTrans;
|
||||
int rows_opA = rows_M0; // number of rows in op(A) and in C
|
||||
int col_opB = col_M1; //number of columns of op(B) and in C
|
||||
int col_opA = col_M0; //number of columns in op(A) and rows in op(B)
|
||||
float complex alpha =1.0;
|
||||
int lda = col_M0;
|
||||
float complex beta = 0.0;
|
||||
int ldc = rows_M1;
|
||||
int ldb = rows_M1;
|
||||
|
||||
#ifdef DEBUG_PREPROC
|
||||
int i = 0;
|
||||
printf("rows_M0 %d, col_M0 %d, rows_M1 %d, col_M1 %d\n", rows_M0, col_M0, rows_M1, col_M1);
|
||||
|
||||
for(i=0; i<rows_M0*col_M0; ++i)
|
||||
printf(" rows_opA = %d, col_opB = %d, W_MMSE[%d] = (%f + i%f)\n", rows_opA, col_opB, i , creal(M0[i]), cimag(M0[i]));
|
||||
|
||||
|
||||
for(i=0; i<rows_M1*col_M1; ++i)
|
||||
printf(" M1[%d] = (%f + i%f)\n", i , creal(M1[i]), cimag(M1[i]));
|
||||
#endif
|
||||
|
||||
cblas_cgemm(CblasColMajor, transa, transb, rows_opA, col_opB, col_opA, &alpha, M0, lda, M1, ldb, &beta, Result, ldc);
|
||||
|
||||
#ifdef DEBUG_PREPROC
|
||||
for(i=0; i<rows_opA*col_opB; ++i)
|
||||
printf(" result[%d] = (%f + i%f)\n", i , creal(Result[i]), cimag(Result[i]));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*FILTERS */
|
||||
void compute_MMSE(float complex* H, int order_H, float sigma2, float complex* W_MMSE)
|
||||
{
|
||||
int N = order_H;
|
||||
float complex* H_hermH_sigmaI = malloc_or_fail(N * N * sizeof(float complex));
|
||||
float complex* H_herm = malloc_or_fail(N * N * sizeof(float complex));
|
||||
|
||||
H_hermH_plus_sigma2I(N, N, H, sigma2, H_hermH_sigmaI);
|
||||
|
||||
#ifdef DEBUG_PREPROC
|
||||
int i =0;
|
||||
for(i=0;i<N*N;i++)
|
||||
printf(" H_hermH_sigmaI[%d] = (%f + i%f)\n", i , creal(H_hermH_sigmaI[i]), cimag(H_hermH_sigmaI[i]));
|
||||
#endif
|
||||
|
||||
conjugate_transpose (N, H, H_herm); //equals H_herm
|
||||
|
||||
#ifdef DEBUG_PREPROC
|
||||
for(i=0;i<N*N;i++)
|
||||
printf(" H_herm[%d] = (%f + i%f)\n", i , creal(H_herm[i]), cimag(H_herm[i]));
|
||||
#endif
|
||||
|
||||
lin_eq_solver(N, H_hermH_sigmaI, H_herm, W_MMSE);
|
||||
|
||||
#ifdef DEBUG_PREPROC
|
||||
for(i=0;i<N*N;i++)
|
||||
printf(" W_MMSE[%d] = (%f + i%f)\n", i , creal(W_MMSE[i]), cimag(W_MMSE[i]));
|
||||
#endif
|
||||
|
||||
free(H_hermH_sigmaI);
|
||||
free(H_herm);
|
||||
}
|
||||
|
||||
#if 0
|
||||
void compute_white_filter(float complex* H_re,
|
||||
int order_H,
|
||||
float sigma2,
|
||||
float complex* W_Wh_0_re,
|
||||
float complex* W_Wh_1_re){
|
||||
|
||||
int aatx, aarx, re;
|
||||
int i,j;
|
||||
int M =n_rx;
|
||||
int N = n_tx;
|
||||
int sigma2=noise_power;
|
||||
|
||||
float complex *H0_re = malloc_or_fail(n_rx*(n_tx>>2)*sizeof(float complex));
|
||||
float complex *H1_re = malloc_or_fail(n_rx*(n_tx>>2)*sizeof(float complex));
|
||||
float complex *R_corr_col_n_0_re = malloc_or_fail(n_rx*n_tx*sizeof(float complex));
|
||||
float complex *R_corr_col_n_1_re = malloc_or_fail(n_rx*n_tx*sizeof(float complex));
|
||||
float complex *U_0_re = malloc_or_fail(n_rx*n_tx*sizeof(float complex));
|
||||
float complex *U_1_re = malloc_or_fail(n_rx*n_tx*sizeof(float complex));
|
||||
float complex *U_0_herm_re = malloc_or_fail(n_rx*n_tx*sizeof(float complex));
|
||||
float complex *U_1_herm_re = malloc_or_fail(n_rx*n_tx*sizeof(float complex));
|
||||
float complex *D_0_re = malloc_or_fail(n_rx*n_tx*sizeof(float complex));
|
||||
float complex *D_1_re = malloc_or_fail(n_rx*n_tx*sizeof(float complex));
|
||||
float complex *W_Wh_0_re = malloc_or_fail(n_rx*n_tx*sizeof(float complex));
|
||||
float complex *W_Wh_1_re = malloc_or_fail(n_rx*n_tx*sizeof(float complex));
|
||||
|
||||
for (aatx=0; aatx<n_tx/2; aatx++){
|
||||
for (aarx=0; aarx<n_rx; aarx++) {
|
||||
H0_re[aatx*n_rx + aarx] = H_re[aatx*n_rx + aarx][re]; // H0 gets [0 1 2 3; 4,5,6,7].' coefficients of H
|
||||
H1_re[aatx*n_rx + aarx] = H_re[aatx*n_rx + aarx + 8][re]; // H1 gets [8 9 10 11; 12, 13, 14, 15].' coefficients of H
|
||||
if (re == 0)
|
||||
printf("ant %d, H_re = (%f + i%f) \n", aatx*n_rx + aarx, creal(H[aatx*n_rx + aarx][re]), cimag(H[aatx*n_rx + aarx][re]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//HH_herm_plus_sigma2I(n_rx, (n_tx>>2), H1_re, sigma2, R_corr_col_n_0_re);
|
||||
HH_herm_plus_sigma2I(n_rx, (n_tx>>2), H0_re, sigma2, R_corr_col_n_1_re);
|
||||
|
||||
eigen_vectors_values(n_rx, R_corr_col_n_0_re, U_0_re, D_0_re);
|
||||
eigen_vectors_values(n_rx, R_corr_col_n_1_re, U_1_re, D_1_re);
|
||||
|
||||
transpose (n_rx, U_0_re, U_0_herm_re);
|
||||
transpose (n_rx, U_1_re, U_1_herm_re);
|
||||
|
||||
sigma = (float)(sqrt((double)(sigma2)));
|
||||
|
||||
/*The inverse of a diagonal matrix is obtained by replacing each element in the diagonal with its reciprocal.
|
||||
A square root of a diagonal matrix is given by the diagonal matrix, whose diagonal entries are just the square
|
||||
roots of the original matrix.*/
|
||||
|
||||
|
||||
D_0_re_inv_sqrt[0] = sqrt_float(1/D_0_re_inv[0]);
|
||||
D_0_re_inv_sqrt[5] = sqrt_float(1/D_0_re_inv[5]);
|
||||
D_0_re_inv_sqrt[10] = sqrt_float(1/D_0_re_inv[10]);
|
||||
D_0_re_inv_sqrt[15] = sqrt_float(1/D_0_re_inv[15]);
|
||||
|
||||
D_1_re_inv[0] = sqrt_float(1/D_1_re_inv[0]);
|
||||
D_1_re_inv[5] = sqrt_float(1/D_1_re_inv[5]);
|
||||
D_1_re_inv[10] = sqrt_float(1/D_1_re_inv[10]);
|
||||
D_1_re_inv[15] = sqrt_float(1/D_1_re_inv[15]);
|
||||
|
||||
now only to multiply
|
||||
|
||||
free(H0);
|
||||
free(H1);
|
||||
free(R_corr_col_n_0);
|
||||
free(R_corr_col_n_1);
|
||||
}
|
||||
#endif
|
||||
|
||||
float sqrt_float(float x, float sqrt_x)
|
||||
{
|
||||
sqrt_x = (float)(sqrt((double)(x)));
|
||||
return sqrt_x;
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
|
||||
#include<stdio.h>
|
||||
#include<math.h>
|
||||
#include<complex.h>
|
||||
#include <stdlib.h>
|
||||
#include "PHY/defs_UE.h"
|
||||
|
||||
|
||||
/* FUNCTIONS FOR LINEAR PREPROCESSING: MMSE, WHITENNING, etc*/
|
||||
void transpose(int N, float complex *A, float complex *Result);
|
||||
|
||||
void conjugate_transpose(int N, float complex *A, float complex *Result);
|
||||
|
||||
void H_hermH_plus_sigma2I(int N, int M, float complex *A, float sigma2, float complex *Result);
|
||||
|
||||
void HH_herm_plus_sigma2I(int M, int N, float complex *A, float sigma2, float complex *Result);
|
||||
|
||||
void eigen_vectors_values(int N, float complex *A, float complex *Vectors, float *Values_Matrix);
|
||||
|
||||
void lin_eq_solver(int N, float complex *A, float complex* B);
|
||||
//float complex* lin_eq_solver (int N, float complex* A, float complex* B);
|
||||
|
||||
/* mutl_matrix_matrix_row_based performs multiplications when matrix is row-oriented H[0], H[1]; H[2], H[3]*/
|
||||
void mutl_matrix_matrix_row_based(float complex* M0, float complex* M1, int rows_M0, int col_M0, int rows_M1, int col_M1, float complex* Result );
|
||||
|
||||
/* mutl_matrix_matrix_col_based performs multiplications matrix is column-oriented H[0], H[2]; H[1], H[3]*/
|
||||
void mutl_matrix_matrix_col_based(float complex* M0, float complex* M1, int rows_M0, int col_M0, int rows_M1, int col_M1, float complex* Result );
|
||||
|
||||
void compute_MMSE(float complex* H, int order_H, float sigma2, float complex* W_MMSE);
|
||||
|
||||
void compute_white_filter(float complex* H, int order_H, float sigma2, float complex* U_1, float complex* D_1);
|
||||
|
||||
void mmse_processing_oai(LTE_UE_PDSCH *pdsch_vars,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
PHY_MEASUREMENTS *measurements,
|
||||
unsigned char first_symbol_flag,
|
||||
MIMO_mode_t mimo_mode,
|
||||
unsigned short mmse_flag,
|
||||
int noise_power,
|
||||
unsigned char symbol,
|
||||
unsigned short nb_rb);
|
||||
|
||||
|
||||
void precode_channel_est(int32_t **dl_ch_estimates_ext,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_UE_PDSCH *pdsch_vars,
|
||||
unsigned char symbol,
|
||||
unsigned short nb_rb,
|
||||
MIMO_mode_t mimo_mode);
|
||||
|
||||
|
||||
void rxdataF_to_float(int32_t **rxdataF_ext,
|
||||
float complex **rxdataF_f,
|
||||
int n_rx,
|
||||
int length,
|
||||
int start_point);
|
||||
|
||||
void chan_est_to_float(int32_t **dl_ch_estimates_ext,
|
||||
float complex **dl_ch_estimates_ext_f,
|
||||
int n_tx,
|
||||
int n_rx,
|
||||
int length,
|
||||
int start_point);
|
||||
|
||||
void float_to_chan_est(int32_t **dl_ch_estimates_ext,
|
||||
float complex **dl_ch_estimates_ext_f,
|
||||
int n_tx,
|
||||
int n_rx,
|
||||
int length,
|
||||
int start_point);
|
||||
|
||||
void float_to_rxdataF(int32_t **rxdataF_ext,
|
||||
float complex **rxdataF_f,
|
||||
int n_tx,
|
||||
int n_rx,
|
||||
int length,
|
||||
int start_point);
|
||||
|
||||
void mult_mmse_rxdataF(float complex** Wmmse,
|
||||
float complex** rxdataF_ext_f,
|
||||
int n_tx,
|
||||
int n_rx,
|
||||
int length,
|
||||
int start_point);
|
||||
|
||||
void mult_mmse_chan_est(float complex** Wmmse,
|
||||
float complex** dl_ch_estimates_ext_f,
|
||||
int n_tx,
|
||||
int n_rx,
|
||||
int length,
|
||||
int start_point);
|
||||
|
||||
void mmse_processing_core(int32_t **rxdataF_ext,
|
||||
int32_t **dl_ch_estimates_ext,
|
||||
int sigma2,
|
||||
int n_tx,
|
||||
int n_rx,
|
||||
int length,
|
||||
int start_point);
|
||||
|
||||
void mmse_processing_core_flp(float complex** rxdataF_ext_flcpx,
|
||||
float complex **H,
|
||||
int32_t **rxdataF_ext,
|
||||
int32_t **dl_ch_estimates_ext,
|
||||
float sigma2,
|
||||
int n_tx,
|
||||
int n_rx,
|
||||
int length,
|
||||
int start_point);
|
||||
|
||||
void whitening_processing_core_flp(float complex** rxdataF_ext_flcpx,
|
||||
float complex **H,
|
||||
int32_t **rxdataF_ext,
|
||||
int32_t **dl_ch_estimates_ext,
|
||||
float sigma2,
|
||||
int n_tx,
|
||||
int n_rx,
|
||||
int length,
|
||||
int start_point);
|
||||
|
||||
float sqrt_float(float x, float sqrt_x);
|
||||
@@ -50,49 +50,6 @@
|
||||
#define MBSFN_FDD_SF7 0x08
|
||||
#define MBSFN_FDD_SF8 0x04
|
||||
|
||||
|
||||
|
||||
void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,int subframe) {
|
||||
char fname[32],vname[32];
|
||||
#define NSYMB_PMCH 12
|
||||
sprintf(fname,"mch_rxF_ext0.m");
|
||||
sprintf(vname,"pmch_rxF_ext0");
|
||||
LOG_M(fname,vname,ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->rxdataF_ext[0],12*(ue->frame_parms.N_RB_DL)*12,1,1);
|
||||
sprintf(fname,"mch_ch_ext00.m");
|
||||
sprintf(vname,"pmch_ch_ext00");
|
||||
LOG_M(fname,vname,ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->dl_ch_estimates_ext[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
|
||||
/*
|
||||
LOG_M("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*NSYMB_PMCH,1,1);
|
||||
LOG_M("dlsch%d_ch_ext10.m","dl10_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*NSYMB_PMCH,1,1);
|
||||
LOG_M("dlsch%d_ch_ext11.m","dl11_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*NSYMB_PMCH,1,1);
|
||||
LOG_M("dlsch%d_rho.m","dl_rho",pdsch_vars[eNB_id]->rho[0],12*N_RB_DL*NSYMB_PMCH,1,1);
|
||||
*/
|
||||
sprintf(fname,"mch_rxF_comp0.m");
|
||||
sprintf(vname,"pmch_rxF_comp0");
|
||||
LOG_M(fname,vname,ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->rxdataF_comp0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
|
||||
sprintf(fname,"mch_rxF_llr.m");
|
||||
sprintf(vname,"pmch_llr");
|
||||
LOG_M(fname,vname, ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->llr[0],coded_bits_per_codeword,1,0);
|
||||
sprintf(fname,"mch_mag1.m");
|
||||
sprintf(vname,"pmch_mag1");
|
||||
LOG_M(fname,vname,ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->dl_ch_mag0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
|
||||
sprintf(fname,"mch_mag2.m");
|
||||
sprintf(vname,"pmch_mag2");
|
||||
LOG_M(fname,vname,ue->pdsch_vars_MCH[ue->current_thread_id[subframe]][eNB_id]->dl_ch_magb0[0],12*(ue->frame_parms.N_RB_DL)*NSYMB_PMCH,1,1);
|
||||
LOG_M("mch00_ch0.m","pmch00_ch0",
|
||||
&(ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
|
||||
ue->frame_parms.ofdm_symbol_size*12,1,1);
|
||||
LOG_M("rxsig_mch.m","rxs_mch",
|
||||
&ue->common_vars.rxdata[0][subframe*ue->frame_parms.samples_per_tti],
|
||||
ue->frame_parms.samples_per_tti,1,1);
|
||||
/*
|
||||
if (PHY_vars_eNB_g)
|
||||
LOG_M("txsig_mch.m","txs_mch",
|
||||
&PHY_vars_eNB_g[0][0]->common_vars.txdata[0][0][subframe*ue->frame_parms.samples_per_tti],
|
||||
ue->frame_parms.samples_per_tti,1,1);*/
|
||||
}
|
||||
|
||||
|
||||
void fill_UE_dlsch_MCH(PHY_VARS_UE *ue,int mcs,int ndi,int rvidx,int eNB_id) {
|
||||
LTE_UE_DLSCH_t *dlsch = ue->dlsch_MCH[eNB_id];
|
||||
LTE_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
|
||||
|
||||
@@ -78,17 +78,6 @@ int rx_pmch_khz_1dot25(PHY_VARS_UE *ue,
|
||||
unsigned char symbol*/
|
||||
,int mcs);
|
||||
|
||||
/** \brief Dump OCTAVE/MATLAB files for PMCH debugging
|
||||
@param phy_vars_ue Pointer to UE variables
|
||||
@param eNB_id index of eNB in ue variables
|
||||
@param coded_bits_per_codeword G from 36.211
|
||||
@param subframe Index of subframe
|
||||
@returns 0 on success
|
||||
*/
|
||||
void dump_mch(PHY_VARS_UE *phy_vars_ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,int subframe);
|
||||
|
||||
|
||||
|
||||
/** \brief This function computes the LLRs for ML (max-logsum approximation) dual-stream QPSK/QPSK reception.
|
||||
@param stream0_in Input from channel compensated (MR combined) stream 0
|
||||
@param stream1_in Input from channel compensated (MR combined) stream 1
|
||||
@@ -580,216 +569,6 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
uint32_t llr_offset,
|
||||
uint8_t beamforming_mode);
|
||||
|
||||
|
||||
/** \fn dlsch_siso(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **rxdataF_comp,
|
||||
int32_t **rxdataF_comp_i,
|
||||
uint8_t l,
|
||||
uint16_t nb_rb)
|
||||
\brief This function does the first stage of llr computation for SISO, by just extracting the pilots, PBCH and primary/secondary synchronization sequences.
|
||||
@param frame_parms Frame descriptor structure
|
||||
@param rxdataF_comp Compensated channel output
|
||||
@param rxdataF_comp_i Compensated channel output for interference
|
||||
@param l symbol in sub-frame
|
||||
@param nb_rb Number of RBs in this allocation
|
||||
*/
|
||||
|
||||
void dlsch_siso(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **rxdataF_comp,
|
||||
int32_t **rxdataF_comp_i,
|
||||
uint8_t l,
|
||||
uint16_t nb_rb);
|
||||
|
||||
/** \fn dlsch_alamouti(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **rxdataF_comp,
|
||||
int32_t **dl_ch_mag,
|
||||
int32_t **dl_ch_magb,
|
||||
uint8_t symbol,
|
||||
uint16_t nb_rb)
|
||||
\brief This function does Alamouti combining on RX and prepares LLR inputs by skipping pilots, PBCH and primary/secondary synchronization signals.
|
||||
@param frame_parms Frame descriptor structure
|
||||
@param rxdataF_comp Compensated channel output
|
||||
@param dl_ch_mag First squared-magnitude of channel (16QAM and 64QAM) for LLR computation. Alamouti combining should be performed on this as well. Result is stored in first antenna position
|
||||
@param dl_ch_magb Second squared-magnitude of channel (64QAM only) for LLR computation. Alamouti combining should be performed on this as well. Result is stored in first antenna position
|
||||
@param symbol Symbol in sub-frame
|
||||
@param nb_rb Number of RBs in this allocation
|
||||
*/
|
||||
void dlsch_alamouti(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **rxdataF_comp,
|
||||
int32_t **dl_ch_mag,
|
||||
int32_t **dl_ch_magb,
|
||||
uint8_t symbol,
|
||||
uint16_t nb_rb);
|
||||
|
||||
/** \fn dlsch_antcyc(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **rxdataF_comp,
|
||||
int32_t **dl_ch_mag,
|
||||
int32_t **dl_ch_magb,
|
||||
uint8_t symbol,
|
||||
uint16_t nb_rb)
|
||||
\brief This function does antenna selection (based on antenna cycling pattern) on RX and prepares LLR inputs by skipping pilots, PBCH and primary/secondary synchronization signals. Note that this is not LTE, it is just included for comparison purposes.
|
||||
@param frame_parms Frame descriptor structure
|
||||
@param rxdataF_comp Compensated channel output
|
||||
@param dl_ch_mag First squared-magnitude of channel (16QAM and 64QAM) for LLR computation. Alamouti combining should be performed on this as well. Result is stored in first antenna position
|
||||
@param dl_ch_magb Second squared-magnitude of channel (64QAM only) for LLR computation. Alamouti combining should be performed on this as well. Result is stored in first antenna position
|
||||
@param symbol Symbol in sub-frame
|
||||
@param nb_rb Number of RBs in this allocation
|
||||
*/
|
||||
void dlsch_antcyc(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **rxdataF_comp,
|
||||
int32_t **dl_ch_mag,
|
||||
int32_t **dl_ch_magb,
|
||||
uint8_t symbol,
|
||||
uint16_t nb_rb);
|
||||
|
||||
/** \fn dlsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **rxdataF_comp,
|
||||
int32_t **rxdataF_comp_i,
|
||||
int32_t **rho,
|
||||
int32_t **rho_i,
|
||||
int32_t **dl_ch_mag,
|
||||
int32_t **dl_ch_magb,
|
||||
uint8_t symbol,
|
||||
uint16_t nb_rb,
|
||||
uint8_t dual_stream_UE)
|
||||
|
||||
\brief This function does maximal-ratio combining for dual-antenna receivers.
|
||||
@param frame_parms Frame descriptor structure
|
||||
@param rxdataF_comp Compensated channel output
|
||||
@param rxdataF_comp_i Compensated channel output for interference
|
||||
@param rho Cross correlation between spatial channels
|
||||
@param rho_i Cross correlation between signal and inteference channels
|
||||
@param dl_ch_mag First squared-magnitude of channel (16QAM and 64QAM) for LLR computation. Alamouti combining should be performed on this as well. Result is stored in first antenna position
|
||||
@param dl_ch_magb Second squared-magnitude of channel (64QAM only) for LLR computation. Alamouti combining should be performed on this as well. Result is stored in first antenna position
|
||||
@param symbol Symbol in sub-frame
|
||||
@param nb_rb Number of RBs in this allocation
|
||||
@param dual_stream_UE Flag to indicate dual-stream detection
|
||||
*/
|
||||
void dlsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
int32_t **rxdataF_comp,
|
||||
int32_t **rxdataF_comp_i,
|
||||
int32_t **rho,
|
||||
int32_t **rho_i,
|
||||
int32_t **dl_ch_mag,
|
||||
int32_t **dl_ch_magb,
|
||||
int32_t **dl_ch_mag_i,
|
||||
int32_t **dl_ch_magb_i,
|
||||
uint8_t symbol,
|
||||
uint16_t nb_rb,
|
||||
uint8_t dual_stream_UE);
|
||||
|
||||
void dlsch_detection_mrc_TM34(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_UE_PDSCH *lte_ue_pdsch_vars,
|
||||
int harq_pid,
|
||||
int round,
|
||||
unsigned char symbol,
|
||||
unsigned short nb_rb,
|
||||
unsigned char dual_stream_UE);
|
||||
|
||||
/** \fn dlsch_extract_rbs_single(int32_t **rxdataF,
|
||||
int32_t **dl_ch_estimates,
|
||||
int32_t **rxdataF_ext,
|
||||
int32_t **dl_ch_estimates_ext,
|
||||
uint16_t pmi,
|
||||
uint8_t *pmi_ext,
|
||||
uint32_t *rb_alloc,
|
||||
uint8_t symbol,
|
||||
uint8_t subframe,
|
||||
LTE_DL_FRAME_PARMS *frame_parms)
|
||||
\brief This function extracts the received resource blocks, both channel estimates and data symbols,
|
||||
for the current allocation and for single antenna eNB transmission.
|
||||
@param rxdataF Raw FFT output of received signal
|
||||
@param dl_ch_estimates Channel estimates of current slot
|
||||
@param rxdataF_ext FFT output for RBs in this allocation
|
||||
@param dl_ch_estimates_ext Channel estimates for RBs in this allocation
|
||||
@param pmi subband Precoding matrix indicator
|
||||
@param pmi_ext Extracted PMI for chosen RBs
|
||||
@param rb_alloc RB allocation vector
|
||||
@param symbol Symbol to extract
|
||||
@param subframe Subframe number
|
||||
@param vrb_type Flag to indicate distributed VRB type
|
||||
@param high_speed_flag
|
||||
@param frame_parms Pointer to frame descriptor
|
||||
*/
|
||||
uint16_t dlsch_extract_rbs_single(int32_t **rxdataF,
|
||||
int32_t **dl_ch_estimates,
|
||||
int32_t **rxdataF_ext,
|
||||
int32_t **dl_ch_estimates_ext,
|
||||
uint16_t pmi,
|
||||
uint8_t *pmi_ext,
|
||||
uint32_t *rb_alloc,
|
||||
uint8_t symbol,
|
||||
uint8_t subframe,
|
||||
uint32_t high_speed_flag,
|
||||
LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
/** \fn dlsch_extract_rbs_dual(int32_t **rxdataF,
|
||||
int32_t **dl_ch_estimates,
|
||||
int32_t **rxdataF_ext,
|
||||
int32_t **dl_ch_estimates_ext,
|
||||
uint16_t pmi,
|
||||
uint8_t *pmi_ext,
|
||||
uint32_t *rb_alloc,
|
||||
uint8_t symbol,
|
||||
LTE_DL_FRAME_PARMS *frame_parms)
|
||||
\brief This function extracts the received resource blocks, both channel estimates and data symbols,
|
||||
for the current allocation and for dual antenna eNB transmission.
|
||||
@param rxdataF Raw FFT output of received signal
|
||||
@param dl_ch_estimates Channel estimates of current slot
|
||||
@param rxdataF_ext FFT output for RBs in this allocation
|
||||
@param dl_ch_estimates_ext Channel estimates for RBs in this allocation
|
||||
@param pmi subband Precoding matrix indicator
|
||||
@param pmi_ext Extracted PMI for chosen RBs
|
||||
@param rb_alloc RB allocation vector
|
||||
@param symbol Symbol to extract
|
||||
@param subframe Subframe index
|
||||
@param high_speed_flag
|
||||
@param frame_parms Pointer to frame descriptor
|
||||
*/
|
||||
uint16_t dlsch_extract_rbs_dual(int32_t **rxdataF,
|
||||
int32_t **dl_ch_estimates,
|
||||
int32_t **rxdataF_ext,
|
||||
int32_t **dl_ch_estimates_ext,
|
||||
uint16_t pmi,
|
||||
uint8_t *pmi_ext,
|
||||
uint32_t *rb_alloc,
|
||||
uint8_t symbol,
|
||||
uint8_t subframe,
|
||||
uint32_t high_speed_flag,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
MIMO_mode_t mimo_mode);
|
||||
|
||||
/** \fn dlsch_extract_rbs_TM7(int32_t **rxdataF,
|
||||
int32_t **dl_bf_ch_estimates,
|
||||
int32_t **rxdataF_ext,
|
||||
int32_t **dl_bf_ch_estimates_ext,
|
||||
uint32_t *rb_alloc,
|
||||
uint8_t symbol,
|
||||
uint8_t subframe,
|
||||
uint32_t high_speed_flag,
|
||||
LTE_DL_FRAME_PARMS *frame_parms)
|
||||
\brief This function extracts the received resource blocks, both channel estimates and data symbols,
|
||||
for the current allocation and for single antenna eNB transmission.
|
||||
@param rxdataF Raw FFT output of received signal
|
||||
@param dl_bf_ch_estimates Beamforming channel estimates of current slot
|
||||
@param rxdataF_ext FFT output for RBs in this allocation
|
||||
@param dl_bf_ch_estimates_ext Beamforming channel estimates for RBs in this allocation
|
||||
@param rb_alloc RB allocation vector
|
||||
@param symbol Symbol to extract
|
||||
@param subframe Subframe number
|
||||
@param high_speed_flag
|
||||
@param frame_parms Pointer to frame descriptor
|
||||
*/
|
||||
uint16_t dlsch_extract_rbs_TM7(int32_t **rxdataF,
|
||||
int32_t **dl_bf_ch_estimates,
|
||||
int32_t **rxdataF_ext,
|
||||
int32_t **dl_bf_ch_estimates_ext,
|
||||
uint32_t *rb_alloc,
|
||||
uint8_t symbol,
|
||||
uint8_t subframe,
|
||||
uint32_t high_speed_flag,
|
||||
LTE_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
/** \brief This function performs channel compensation (matched filtering) on the received RBs for this allocation. In addition, it computes the squared-magnitude of the channel with weightings for 16QAM/64QAM detection as well as dual-stream detection (cross-correlation)
|
||||
@param rxdataF_ext Frequency-domain received signal in RBs to be demodulated
|
||||
@param dl_ch_estimates_ext Frequency-domain channel estimates in RBs to be demodulated
|
||||
@@ -819,35 +598,6 @@ void dlsch_channel_compensation(int32_t **rxdataF_ext,
|
||||
uint8_t output_shift,
|
||||
PHY_MEASUREMENTS *phy_measurements);
|
||||
|
||||
void dlsch_channel_compensation_core(int **rxdataF_ext,
|
||||
int **dl_ch_estimates_ext,
|
||||
int **dl_ch_mag,
|
||||
int **dl_ch_magb,
|
||||
int **rxdataF_comp,
|
||||
int **rho,
|
||||
unsigned char n_tx,
|
||||
unsigned char n_rx,
|
||||
unsigned char mod_order,
|
||||
unsigned char output_shift,
|
||||
int length,
|
||||
int start_point);
|
||||
|
||||
void dlsch_dual_stream_correlation(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char symbol,
|
||||
unsigned short nb_rb,
|
||||
int **dl_ch_estimates_ext,
|
||||
int **dl_ch_estimates_ext_i,
|
||||
int **dl_ch_rho_ext,
|
||||
unsigned char output_shift);
|
||||
|
||||
void dlsch_dual_stream_correlationTM34(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
unsigned char symbol,
|
||||
unsigned short nb_rb,
|
||||
int **dl_ch_estimates_ext,
|
||||
int **dl_ch_estimates_ext_i,
|
||||
int **dl_ch_rho_ext,
|
||||
unsigned char output_shift0,
|
||||
unsigned char output_shift1);
|
||||
//This function is used to compute multiplications in Hhermitian * H matrix
|
||||
void conjch0_mult_ch1(int *ch0,
|
||||
int *ch1,
|
||||
@@ -869,10 +619,6 @@ void construct_HhH_elements(int *ch0conj_ch0,
|
||||
int32_t *after_mf_11,
|
||||
unsigned short nb_rb);
|
||||
|
||||
void squared_matrix_element(int32_t *Hh_h_00,
|
||||
int32_t *Hh_h_00_sq,
|
||||
unsigned short nb_rb);
|
||||
|
||||
void dlsch_channel_level_TM34_meas(int *ch00,
|
||||
int *ch01,
|
||||
int *ch10,
|
||||
@@ -901,38 +647,6 @@ uint8_t rank_estimation_tm3_tm4(int *dl_ch_estimates_00,
|
||||
int *dl_ch_estimates_11,
|
||||
unsigned short nb_rb);
|
||||
|
||||
void dlsch_channel_compensation_TM56(int **rxdataF_ext,
|
||||
int **dl_ch_estimates_ext,
|
||||
int **dl_ch_mag,
|
||||
int **dl_ch_magb,
|
||||
int **rxdataF_comp,
|
||||
unsigned char *pmi_ext,
|
||||
LTE_DL_FRAME_PARMS *frame_parms,
|
||||
PHY_MEASUREMENTS *phy_measurements,
|
||||
int eNB_id,
|
||||
unsigned char symbol,
|
||||
unsigned char mod_order,
|
||||
unsigned short nb_rb,
|
||||
unsigned char output_shift,
|
||||
unsigned char dl_power_off);
|
||||
|
||||
|
||||
void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
|
||||
LTE_UE_PDSCH *lte_ue_pdsch_vars,
|
||||
PHY_MEASUREMENTS *phy_measurements,
|
||||
int eNB_id,
|
||||
unsigned char symbol,
|
||||
unsigned char mod_order0,
|
||||
unsigned char mod_order1,
|
||||
int harq_pid,
|
||||
int round,
|
||||
MIMO_mode_t mimo_mode,
|
||||
unsigned short nb_rb,
|
||||
unsigned short mmse_flag,
|
||||
unsigned char output_shift0,
|
||||
unsigned char output_shift1);
|
||||
|
||||
|
||||
/** \brief This function computes the average channel level over all allocated RBs and antennas (TX/RX) in order to compute output shift for compensated signal
|
||||
@param dl_ch_estimates_ext Channel estimates in allocated RBs
|
||||
@param frame_parms Pointer to frame descriptor
|
||||
@@ -1669,12 +1383,6 @@ uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2nd
|
||||
|
||||
uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode);
|
||||
|
||||
uint32_t dlsch_decoding_abstraction(double *dlsch_MIPB,
|
||||
LTE_DL_FRAME_PARMS *lte_frame_parms,
|
||||
LTE_UE_DLSCH_t *dlsch,
|
||||
uint8_t subframe,
|
||||
uint8_t num_pdcch_symbols);
|
||||
|
||||
// DL power control functions
|
||||
double get_pa_dB(uint8_t pa);
|
||||
|
||||
|
||||
@@ -760,6 +760,8 @@ static inline __attribute__((always_inline)) int16x8_t cmac0_prec128(int16x8_t x
|
||||
//
|
||||
int16x8_t xr = vuzp1q_s16(x, x); // even lanes
|
||||
int16x8_t xi = vuzp2q_s16(x, x); // odd lanes
|
||||
#ifdef __ARM_FEATURE_QRDMX
|
||||
// ARMv8.1-A: Use RDM instructions
|
||||
// real = ar*br - ai*bi (Q15 scaling via high-half doubling muls)
|
||||
int16x8_t real = vqdmulhq_s16(xr, wr); // ≈ round((2*xr*wr)/2^16)
|
||||
real = vqrdmlshq_s16(real, xi, wi); // real -= round((2*xi*wi)/2^16)
|
||||
@@ -767,7 +769,21 @@ static inline __attribute__((always_inline)) int16x8_t cmac0_prec128(int16x8_t x
|
||||
// imag = ar*bi + ai*br
|
||||
int16x8_t imag = vqdmulhq_s16(xr, wi);
|
||||
imag = vqrdmlahq_s16(imag, xi, wr); // imag += round((2*xi*wr)/2^16)
|
||||
//
|
||||
#else
|
||||
// ARMv8.0-A fallback: Use standard 32-bit multiply
|
||||
int32x4_t real_lo = vmull_s16(vget_low_s16(xr), vget_low_s16(wr));
|
||||
int32x4_t real_hi = vmull_s16(vget_high_s16(xr), vget_high_s16(wr));
|
||||
real_lo = vmlsl_s16(real_lo, vget_low_s16(xi), vget_low_s16(wi));
|
||||
real_hi = vmlsl_s16(real_hi, vget_high_s16(xi), vget_high_s16(wi));
|
||||
|
||||
int32x4_t imag_lo = vmull_s16(vget_low_s16(xr), vget_low_s16(wi));
|
||||
int32x4_t imag_hi = vmull_s16(vget_high_s16(xr), vget_high_s16(wi));
|
||||
imag_lo = vmlal_s16(imag_lo, vget_low_s16(xi), vget_low_s16(wr));
|
||||
imag_hi = vmlal_s16(imag_hi, vget_high_s16(xi), vget_high_s16(wr));
|
||||
|
||||
int16x8_t real = vcombine_s16(vqrshrn_n_s32(real_lo, 15), vqrshrn_n_s32(real_hi, 15));
|
||||
int16x8_t imag = vcombine_s16(vqrshrn_n_s32(imag_lo, 15), vqrshrn_n_s32(imag_hi, 15));
|
||||
#endif
|
||||
// Re-interleave [real, imag]
|
||||
int16x8x2_t produ = vzipq_s16(real, imag);
|
||||
return produ.val[0];
|
||||
|
||||
@@ -992,17 +992,8 @@ int nr_srs_channel_estimation(int ant,
|
||||
|
||||
// Compute wideband SNR on the symbol 0
|
||||
int tot_subcarriers = m_SRS_b * NR_NB_SC_PER_RB;
|
||||
|
||||
uint16_t subcarrier_abs = first_subcarrier + nr_srs_info->k_0_p[p_index][0];
|
||||
if (subcarrier_abs + tot_subcarriers < ofdm_symbol_size_half) {
|
||||
*signal_power = signal_energy_nodc(&srs_estimated_channel_freq[subcarrier_abs], tot_subcarriers) / tot_subcarriers;
|
||||
} else {
|
||||
int size1 = ofdm_symbol_size_half - subcarrier_abs;
|
||||
int size2 = tot_subcarriers - size1;
|
||||
uint64_t signal_power_p1 = signal_energy_nodc(&srs_estimated_channel_freq[subcarrier_abs], size1) * size1;
|
||||
uint64_t signal_power_p2 = signal_energy_nodc(&srs_estimated_channel_freq[ofdm_symbol_size_half], size2) * size2;
|
||||
*signal_power = (signal_power_p1 + signal_power_p2) / tot_subcarriers;
|
||||
}
|
||||
*signal_power = signal_energy_nodc(&srs_estimated_channel_freq[subcarrier_abs], tot_subcarriers);
|
||||
|
||||
if (*signal_power == 0) {
|
||||
LOG_W(NR_PHY, "Received SRS signal power is 0\n");
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "PHY/MODULATION/nr_modulation.h"
|
||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "common/utils/nr/nr_common.h"
|
||||
#include "executables/softmodem-common.h"
|
||||
#include "SCHED_NR/sched_nr.h"
|
||||
@@ -628,7 +627,6 @@ static int do_one_dlsch(unsigned char *input_ptr, PHY_VARS_gNB *gNB, NR_gNB_DLSC
|
||||
/// Modulation
|
||||
start_meas(dlsch_modulation_stats);
|
||||
nr_modulation(scrambled_output, encoded_length, Qm, (int16_t *)mod_symbs[codeWord]);
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_PDSCH_MODULATION, 0);
|
||||
stop_meas(dlsch_modulation_stats);
|
||||
#ifdef DEBUG_DLSCH
|
||||
printf("PDSCH Modulation: Qm %d(%d)\n", Qm, nb_re);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user