mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 12:40:28 +00:00
Compare commits
211 Commits
centralize
...
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 | ||
|
|
9777d23173 | ||
|
|
068e91ad0c | ||
|
|
543fab819e | ||
|
|
337cc4bbe7 | ||
|
|
e75399707c | ||
|
|
9bfe62b85b | ||
|
|
bd2fc0d237 | ||
|
|
0858ee8877 | ||
|
|
0c2a9384d0 | ||
|
|
269880f89d | ||
|
|
12fc8112d9 | ||
|
|
95c8fa468a | ||
|
|
d471046623 | ||
|
|
5980dbcb40 | ||
|
|
15c79b0288 | ||
|
|
95d35b9b7d | ||
|
|
c453c342ed | ||
|
|
2ff071a52e | ||
|
|
6d0c7945c2 | ||
|
|
3dfdc66c41 | ||
|
|
b699884ae4 | ||
|
|
c6229a9c7a | ||
|
|
4c56c6b2de | ||
|
|
f4b9e04c61 | ||
|
|
74b998a0d8 | ||
|
|
ee00eb346e | ||
|
|
656b1d52a0 | ||
|
|
b533127553 | ||
|
|
ec0b97beae | ||
|
|
357496a88a | ||
|
|
df7db3ab27 | ||
|
|
b7867a4053 | ||
|
|
54076927ba | ||
|
|
aeba59a9ad | ||
|
|
315fe92253 | ||
|
|
2c1687e44f | ||
|
|
358c17ce58 | ||
|
|
95df8b174e | ||
|
|
5d657c801c | ||
|
|
d73a9148de | ||
|
|
34c001d488 | ||
|
|
0388bf0e67 | ||
|
|
003d72c859 | ||
|
|
f393300da1 |
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")
|
||||
|
||||
@@ -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
@@ -1,5 +1,5 @@
|
||||
diff --git a/fhi_lib/app/src/common.h b/fhi_lib/app/src/common.h
|
||||
index ac5f471..ed9ab7d 100644
|
||||
index ac5f471..b1acb26 100644
|
||||
--- a/fhi_lib/app/src/common.h
|
||||
+++ b/fhi_lib/app/src/common.h
|
||||
@@ -28,7 +28,7 @@
|
||||
@@ -7,7 +7,7 @@ index ac5f471..ed9ab7d 100644
|
||||
#include <rte_mbuf.h>
|
||||
|
||||
-#define VERSIONX "oran_f_release_v1.0"
|
||||
+#define VERSIONX "oran_f_release_v1.7"
|
||||
+#define VERSIONX "oran_f_release_v1.8"
|
||||
|
||||
#define APP_O_DU 0
|
||||
#define APP_O_RU 1
|
||||
@@ -530,7 +530,7 @@ index 59b6850..322d238 100644
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff --git a/fhi_lib/lib/src/xran_cb_proc.c b/fhi_lib/lib/src/xran_cb_proc.c
|
||||
index 08660f3..2bb5187 100644
|
||||
index 08660f3..b5de607 100644
|
||||
--- a/fhi_lib/lib/src/xran_cb_proc.c
|
||||
+++ b/fhi_lib/lib/src/xran_cb_proc.c
|
||||
@@ -25,7 +25,10 @@
|
||||
@@ -544,6 +544,55 @@ index 08660f3..2bb5187 100644
|
||||
#include <rte_common.h>
|
||||
#include <rte_eal.h>
|
||||
#include <rte_errno.h>
|
||||
@@ -106,6 +109,12 @@ void xran_timer_arm_for_deadline(struct rte_timer *tim, void* arg, void *p_dev_
|
||||
+ nSubframeIdx*SLOTNUM_PER_SUBFRAME(p_xran_dev_ctx->interval_us_local)
|
||||
+ nSlotIdx;
|
||||
|
||||
+ /* correction to rx_tti for Ta4 values larger than a TTI */
|
||||
+ rx_tti -= p_xran_dev_ctx->offset_num_slots_up_ul;
|
||||
+ if (rx_tti < 0) {
|
||||
+ rx_tti += (SUBFRAMES_PER_SYSTEMFRAME*SLOTNUM_PER_SUBFRAME(p_xran_dev_ctx->interval_us_local)*1024);
|
||||
+ }
|
||||
+
|
||||
p_xran_dev_ctx->cb_timer_ctx[p_xran_dev_ctx->timer_put % MAX_CB_TIMER_CTX].tti_to_process = rx_tti;
|
||||
if (xran_if_current_state == XRAN_RUNNING){
|
||||
rte_timer_cb_t fct = (rte_timer_cb_t)arg;
|
||||
@@ -195,6 +204,7 @@ xran_timing_create_cbs(void *args)
|
||||
max_dl_delay_offset += interval_us_local;
|
||||
numSlots++;
|
||||
}
|
||||
+ p_dev_ctx->offset_num_slots_cp_dl = numSlots;
|
||||
|
||||
/* Delay from start of 'a' slot */
|
||||
delay_cp_dl_max = max_dl_delay_offset - p_dev_ctx->fh_cfg.T1a_max_cp_dl;
|
||||
@@ -227,6 +237,7 @@ xran_timing_create_cbs(void *args)
|
||||
ul_delay_offset += interval_us_local;
|
||||
numSlots++;
|
||||
}
|
||||
+ p_dev_ctx->offset_num_slots_cp_ul = numSlots;
|
||||
delay_cp_ul = ul_delay_offset - p_dev_ctx->fh_cfg.T1a_max_cp_ul;
|
||||
sym_cp_ul = (delay_cp_ul*1000/(interval_us_local*1000/N_SYM_PER_SLOT)+1);
|
||||
uint8_t ul_offset_sym = (numSlots+1)*N_SYM_PER_SLOT - sym_cp_ul;
|
||||
@@ -242,8 +253,18 @@ xran_timing_create_cbs(void *args)
|
||||
|
||||
delay_up = p_dev_ctx->fh_cfg.T1a_max_up;
|
||||
time_diff_us = p_dev_ctx->fh_cfg.Ta4_max;
|
||||
+ uint32_t ul_up_delay_offset=interval_us_local;
|
||||
+ numSlots=0;
|
||||
+ while(time_diff_us > ul_up_delay_offset) {
|
||||
+ ul_up_delay_offset += interval_us_local;
|
||||
+ numSlots++;
|
||||
+ }
|
||||
+ p_dev_ctx->offset_num_slots_up_ul = numSlots;
|
||||
+
|
||||
+ printf("offset_num_slots_cp_dl=%d, offset_num_slots_cp_ul=%d, offset_num_slots_up_ul=%d\n",
|
||||
+ p_dev_ctx->offset_num_slots_cp_dl, p_dev_ctx->offset_num_slots_cp_ul, p_dev_ctx->offset_num_slots_up_ul);
|
||||
|
||||
- delay_cp2up = delay_up-delay_cp_dl_max;
|
||||
+ delay_cp2up = p_dev_ctx->fh_cfg.T1a_max_cp_dl - p_dev_ctx->fh_cfg.T1a_max_up;
|
||||
|
||||
|
||||
time_diff_nSymb = time_diff_us*1000/(interval_us_local*1000/N_SYM_PER_SLOT);
|
||||
diff --git a/fhi_lib/lib/src/xran_common.c b/fhi_lib/lib/src/xran_common.c
|
||||
index dc40ad9..1b88013 100644
|
||||
--- a/fhi_lib/lib/src/xran_common.c
|
||||
@@ -1032,7 +1081,7 @@ index 4acade1..c939edc 100644
|
||||
for(i = 0; i < xran_ports_num; i++){
|
||||
g_xran_dev_ctx[i] = pCtx;
|
||||
diff --git a/fhi_lib/lib/src/xran_dev.h b/fhi_lib/lib/src/xran_dev.h
|
||||
index 0371a53..dd76b49 100644
|
||||
index 0371a53..778b38d 100644
|
||||
--- a/fhi_lib/lib/src/xran_dev.h
|
||||
+++ b/fhi_lib/lib/src/xran_dev.h
|
||||
@@ -201,6 +201,7 @@ struct __rte_cache_aligned xran_device_ctx
|
||||
@@ -1043,6 +1092,18 @@ index 0371a53..dd76b49 100644
|
||||
int64_t offset_sec;
|
||||
int64_t offset_nsec; //offset to GPS time calcuated based on alpha and beta
|
||||
uint32_t interval_us_local;
|
||||
@@ -254,6 +255,11 @@ struct __rte_cache_aligned xran_device_ctx
|
||||
int32_t sym_up; /**< when we start sym 0 of up with respect to OTA time as measured in symbols */
|
||||
int32_t sym_up_ul;
|
||||
|
||||
+ /* used to support large T1a/Ta4 values */
|
||||
+ int32_t offset_num_slots_cp_dl;
|
||||
+ int32_t offset_num_slots_cp_ul;
|
||||
+ int32_t offset_num_slots_up_ul;
|
||||
+
|
||||
xran_fh_tti_callback_fn ttiCb[XRAN_CB_MAX];
|
||||
void *TtiCbParam[XRAN_CB_MAX];
|
||||
uint32_t SkipTti[XRAN_CB_MAX];
|
||||
diff --git a/fhi_lib/lib/src/xran_frame_struct.c b/fhi_lib/lib/src/xran_frame_struct.c
|
||||
index fbb1298..44aaf92 100644
|
||||
--- a/fhi_lib/lib/src/xran_frame_struct.c
|
||||
@@ -1082,7 +1143,7 @@ index 7ed0a3a..8e66945 100644
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
diff --git a/fhi_lib/lib/src/xran_main.c b/fhi_lib/lib/src/xran_main.c
|
||||
index 7c472d7..7c7cf91 100644
|
||||
index 7c472d7..db03d94 100644
|
||||
--- a/fhi_lib/lib/src/xran_main.c
|
||||
+++ b/fhi_lib/lib/src/xran_main.c
|
||||
@@ -35,7 +35,11 @@
|
||||
@@ -1132,7 +1193,42 @@ index 7c472d7..7c7cf91 100644
|
||||
print_dbg("PRACH eAxC_offset %d\n", pPrachCPConfig->eAxC_offset);
|
||||
|
||||
/* Save some configs for app */
|
||||
@@ -1169,6 +1192,10 @@ xran_prepare_cp_ul_slot(uint16_t xran_port_id, uint32_t nSlotIdx, uint32_t nCcS
|
||||
@@ -623,6 +646,8 @@ xran_prepare_cp_dl_slot(uint16_t xran_port_id, uint32_t nSlotIdx, uint32_t nCcS
|
||||
return ret;
|
||||
}
|
||||
|
||||
+uint32_t prev_dl_tti = -1;
|
||||
+
|
||||
void
|
||||
tx_cp_dl_cb(struct rte_timer *tim, void *arg)
|
||||
{
|
||||
@@ -655,7 +680,7 @@ tx_cp_dl_cb(struct rte_timer *tim, void *arg)
|
||||
|
||||
if(first_call && p_xran_dev_ctx->enableCP)
|
||||
{
|
||||
- tti = pTCtx[(xran_lib_ota_tti[PortId] & 1) ^ 1].tti_to_process;
|
||||
+ tti = pTCtx[(xran_lib_ota_tti[PortId] & 1) ^ 1].tti_to_process + p_xran_dev_ctx->offset_num_slots_cp_dl;
|
||||
buf_id = tti % XRAN_N_FE_BUF_LEN;
|
||||
|
||||
slot_id = XranGetSlotNum(tti, SLOTNUM_PER_SUBFRAME(interval_us_local));
|
||||
@@ -665,6 +690,16 @@ tx_cp_dl_cb(struct rte_timer *tim, void *arg)
|
||||
{
|
||||
/* Wrap around to next second */
|
||||
frame_id = (frame_id + NUM_OF_FRAMES_PER_SECOND) & 0x3ff;
|
||||
+ prev_dl_tti = -1;
|
||||
+ }
|
||||
+ else if (p_xran_dev_ctx->offset_num_slots_cp_dl > 0 && prev_dl_tti == xran_fs_get_max_slot(PortId) - 1 + p_xran_dev_ctx->offset_num_slots_cp_dl)
|
||||
+ {
|
||||
+ prev_dl_tti = tti;
|
||||
+ tti = xran_fs_get_max_slot(PortId) + p_xran_dev_ctx->offset_num_slots_cp_dl;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ prev_dl_tti = tti;
|
||||
}
|
||||
|
||||
ctx_id = tti % XRAN_MAX_SECTIONDB_CTX;
|
||||
@@ -1169,6 +1204,10 @@ xran_prepare_cp_ul_slot(uint16_t xran_port_id, uint32_t nSlotIdx, uint32_t nCcS
|
||||
uint8_t seqid = xran_get_cp_seqid(pHandle, XRAN_DIR_UL, cc_id, port_id);
|
||||
|
||||
beam_id = xran_get_beamid(pHandle, XRAN_DIR_UL, cc_id, port_id, slot_id);
|
||||
@@ -1143,7 +1239,45 @@ index 7c472d7..7c7cf91 100644
|
||||
ret = generate_cpmsg_prach(pHandle, ¶ms, sect_geninfo, mbuf, p_xran_dev_ctx,
|
||||
frame_id, subframe_id, slot_id, tti,
|
||||
beam_id, cc_id, port_id, occasionid, seqid);
|
||||
@@ -1338,6 +1365,10 @@ tx_cp_ul_cb(struct rte_timer *tim, void *arg)
|
||||
@@ -1213,6 +1252,7 @@ xran_prepare_cp_ul_slot(uint16_t xran_port_id, uint32_t nSlotIdx, uint32_t nCcS
|
||||
return ret;
|
||||
}
|
||||
|
||||
+uint32_t prev_ul_tti = -1;
|
||||
|
||||
void
|
||||
tx_cp_ul_cb(struct rte_timer *tim, void *arg)
|
||||
@@ -1254,7 +1294,7 @@ tx_cp_ul_cb(struct rte_timer *tim, void *arg)
|
||||
pTCtx = &p_xran_dev_ctx->timer_ctx[0];
|
||||
interval = p_xran_dev_ctx->interval_us_local;
|
||||
PortId = p_xran_dev_ctx->xran_port_id;
|
||||
- tti = pTCtx[(xran_lib_ota_tti[PortId] & 1) ^ 1].tti_to_process;
|
||||
+ tti = pTCtx[(xran_lib_ota_tti[PortId] & 1) ^ 1].tti_to_process + p_xran_dev_ctx->offset_num_slots_cp_ul;
|
||||
|
||||
buf_id = tti % XRAN_N_FE_BUF_LEN;
|
||||
ctx_id = tti % XRAN_MAX_SECTIONDB_CTX;
|
||||
@@ -1264,7 +1304,20 @@ tx_cp_ul_cb(struct rte_timer *tim, void *arg)
|
||||
|
||||
/* Wrap around to next second */
|
||||
if(tti == 0)
|
||||
+ {
|
||||
frame_id = (frame_id + NUM_OF_FRAMES_PER_SECOND) & 0x3ff;
|
||||
+ prev_ul_tti = tti;
|
||||
+ }
|
||||
+ else if (p_xran_dev_ctx->offset_num_slots_cp_ul > 0 && prev_ul_tti == xran_fs_get_max_slot(PortId) - 1 + p_xran_dev_ctx->offset_num_slots_cp_ul)
|
||||
+ {
|
||||
+ prev_ul_tti = tti;
|
||||
+ tti = xran_fs_get_max_slot(PortId) + p_xran_dev_ctx->offset_num_slots_cp_ul;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ prev_ul_tti = tti;
|
||||
+ }
|
||||
+
|
||||
if(xran_get_ru_category(pHandle) == XRAN_CATEGORY_A)
|
||||
num_eAxc = xran_get_num_eAxc(pHandle);
|
||||
else
|
||||
@@ -1338,6 +1391,10 @@ tx_cp_ul_cb(struct rte_timer *tim, void *arg)
|
||||
uint8_t seqid = xran_get_cp_seqid(pHandle, XRAN_DIR_UL, cc_id, port_id);
|
||||
|
||||
beam_id = xran_get_beamid(pHandle, XRAN_DIR_UL, cc_id, port_id, slot_id);
|
||||
@@ -1154,7 +1288,7 @@ index 7c472d7..7c7cf91 100644
|
||||
ret = generate_cpmsg_prach(pHandle, ¶ms, sect_geninfo, mbuf, p_xran_dev_ctx,
|
||||
frame_id, subframe_id, slot_id, tti,
|
||||
beam_id, cc_id, port_id, occasionid, seqid);
|
||||
@@ -1570,6 +1601,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru
|
||||
@@ -1570,6 +1627,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru
|
||||
{
|
||||
case ECPRI_IQ_DATA:
|
||||
pkt_data[num_data++] = pkt;
|
||||
@@ -1162,7 +1296,7 @@ index 7c472d7..7c7cf91 100644
|
||||
break;
|
||||
// For RU emulation
|
||||
case ECPRI_RT_CONTROL_DATA:
|
||||
@@ -1587,7 +1619,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru
|
||||
@@ -1587,7 +1645,7 @@ int32_t handle_ecpri_ethertype(struct rte_mbuf* pkt_q[], uint16_t xport_id, stru
|
||||
break;
|
||||
default:
|
||||
if (p_dev_ctx->fh_init.io_cfg.id == O_DU) {
|
||||
@@ -1171,7 +1305,7 @@ index 7c472d7..7c7cf91 100644
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1876,7 +1908,7 @@ xran_sector_get_instances (uint32_t xran_port, void * pDevHandle, uint16_t nNumI
|
||||
@@ -1876,7 +1934,7 @@ xran_sector_get_instances (uint32_t xran_port, void * pDevHandle, uint16_t nNumI
|
||||
for (i = 0; i < nNumInstances; i++) {
|
||||
|
||||
/* Allocate Memory for CC handles */
|
||||
@@ -1180,7 +1314,7 @@ index 7c472d7..7c7cf91 100644
|
||||
|
||||
if(pCcHandle == NULL)
|
||||
return XRAN_STATUS_RESOURCE;
|
||||
@@ -2347,8 +2379,7 @@ ring_processing_func_per_port(void* args)
|
||||
@@ -2347,8 +2405,7 @@ ring_processing_func_per_port(void* args)
|
||||
for (i = 0; i < ctx->io_cfg.num_vfs && i < XRAN_VF_MAX; i = i+1) {
|
||||
if (ctx->vf2xran_port[i] == port_id) {
|
||||
for(qi = 0; qi < ctx->rxq_per_port[port_id]; qi++){
|
||||
@@ -1190,7 +1324,7 @@ index 7c472d7..7c7cf91 100644
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2414,9 +2445,6 @@ xran_spawn_workers(void)
|
||||
@@ -2414,9 +2471,6 @@ xran_spawn_workers(void)
|
||||
nWorkerCore = nWorkerCore << 1;
|
||||
}
|
||||
|
||||
@@ -1200,7 +1334,7 @@ index 7c472d7..7c7cf91 100644
|
||||
printf("O-XU %d\n", eth_ctx->io_cfg.id);
|
||||
printf("HW %d\n", icx_cpu);
|
||||
printf("Num cores %d\n", total_num_cores);
|
||||
@@ -2453,7 +2481,7 @@ xran_spawn_workers(void)
|
||||
@@ -2453,7 +2507,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->time_wrk_cfg.arg = NULL;
|
||||
eth_ctx->time_wrk_cfg.state = 1;
|
||||
|
||||
@@ -1209,7 +1343,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2475,7 +2503,7 @@ xran_spawn_workers(void)
|
||||
@@ -2475,7 +2529,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 **/
|
||||
@@ -1218,7 +1352,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2502,7 +2530,7 @@ xran_spawn_workers(void)
|
||||
@@ -2502,7 +2556,7 @@ xran_spawn_workers(void)
|
||||
}
|
||||
|
||||
/** 1 - CP GEN **/
|
||||
@@ -1227,7 +1361,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2536,7 +2564,7 @@ xran_spawn_workers(void)
|
||||
@@ -2536,7 +2590,7 @@ xran_spawn_workers(void)
|
||||
else
|
||||
p_dev->tx_sym_gen_func = xran_process_tx_sym_cp_on_opt;
|
||||
|
||||
@@ -1236,7 +1370,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2559,7 +2587,7 @@ xran_spawn_workers(void)
|
||||
@@ -2559,7 +2613,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 **/
|
||||
@@ -1245,7 +1379,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2586,7 +2614,7 @@ xran_spawn_workers(void)
|
||||
@@ -2586,7 +2640,7 @@ xran_spawn_workers(void)
|
||||
}
|
||||
|
||||
/** 1 - CP GEN **/
|
||||
@@ -1254,7 +1388,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2613,7 +2641,7 @@ xran_spawn_workers(void)
|
||||
@@ -2613,7 +2667,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 **/
|
||||
@@ -1263,7 +1397,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2628,7 +2656,7 @@ xran_spawn_workers(void)
|
||||
@@ -2628,7 +2682,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 1 - CP GEN **/
|
||||
@@ -1272,7 +1406,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2643,7 +2671,7 @@ xran_spawn_workers(void)
|
||||
@@ -2643,7 +2697,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 2 UP GEN **/
|
||||
@@ -1281,7 +1415,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2682,7 +2710,7 @@ xran_spawn_workers(void)
|
||||
@@ -2682,7 +2736,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 **/
|
||||
@@ -1290,7 +1424,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2697,7 +2725,7 @@ xran_spawn_workers(void)
|
||||
@@ -2697,7 +2751,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 1 - CP GEN **/
|
||||
@@ -1299,7 +1433,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2712,7 +2740,7 @@ xran_spawn_workers(void)
|
||||
@@ -2712,7 +2766,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 2 UP GEN **/
|
||||
@@ -1308,7 +1442,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2727,7 +2755,7 @@ xran_spawn_workers(void)
|
||||
@@ -2727,7 +2781,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 3 UP GEN **/
|
||||
@@ -1317,7 +1451,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2766,7 +2794,7 @@ xran_spawn_workers(void)
|
||||
@@ -2766,7 +2820,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 **/
|
||||
@@ -1326,7 +1460,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2781,7 +2809,7 @@ xran_spawn_workers(void)
|
||||
@@ -2781,7 +2835,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 1 Eth Tx **/
|
||||
@@ -1335,7 +1469,7 @@ index 7c472d7..7c7cf91 100644
|
||||
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
@@ -2797,7 +2825,7 @@ xran_spawn_workers(void)
|
||||
@@ -2797,7 +2851,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 2 - CP GEN **/
|
||||
@@ -1344,7 +1478,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2812,7 +2840,7 @@ xran_spawn_workers(void)
|
||||
@@ -2812,7 +2866,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 3 UP GEN **/
|
||||
@@ -1353,7 +1487,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2827,7 +2855,7 @@ xran_spawn_workers(void)
|
||||
@@ -2827,7 +2881,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 4 UP GEN **/
|
||||
@@ -1362,7 +1496,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2861,7 +2889,7 @@ xran_spawn_workers(void)
|
||||
@@ -2861,7 +2915,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 Eth RX */
|
||||
@@ -1371,7 +1505,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2876,7 +2904,7 @@ xran_spawn_workers(void)
|
||||
@@ -2876,7 +2930,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 1 FH RX and BBDEV */
|
||||
@@ -1380,7 +1514,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2891,7 +2919,7 @@ xran_spawn_workers(void)
|
||||
@@ -2891,7 +2945,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 2 FH RX and BBDEV */
|
||||
@@ -1389,7 +1523,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2906,7 +2934,7 @@ xran_spawn_workers(void)
|
||||
@@ -2906,7 +2960,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 3 FH RX and BBDEV */
|
||||
@@ -1398,7 +1532,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2921,7 +2949,7 @@ xran_spawn_workers(void)
|
||||
@@ -2921,7 +2975,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** FH TX and BBDEV */
|
||||
@@ -1407,7 +1541,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -2969,7 +2997,7 @@ xran_spawn_workers(void)
|
||||
@@ -2969,7 +3023,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* p_dev->tx_sym_gen_func = xran_process_tx_sym_cp_on_opt; */
|
||||
|
||||
@@ -1416,7 +1550,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3004,7 +3032,7 @@ xran_spawn_workers(void)
|
||||
@@ -3004,7 +3058,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 **/
|
||||
@@ -1425,7 +1559,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3031,7 +3059,7 @@ xran_spawn_workers(void)
|
||||
@@ -3031,7 +3085,7 @@ xran_spawn_workers(void)
|
||||
}
|
||||
|
||||
/** 1 - CP GEN **/
|
||||
@@ -1434,7 +1568,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3062,7 +3090,7 @@ xran_spawn_workers(void)
|
||||
@@ -3062,7 +3116,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 **/
|
||||
@@ -1443,7 +1577,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3089,7 +3117,7 @@ xran_spawn_workers(void)
|
||||
@@ -3089,7 +3143,7 @@ xran_spawn_workers(void)
|
||||
}
|
||||
|
||||
/** 1 - CP GEN **/
|
||||
@@ -1452,7 +1586,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3115,7 +3143,7 @@ xran_spawn_workers(void)
|
||||
@@ -3115,7 +3169,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 **/
|
||||
@@ -1461,7 +1595,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3130,7 +3158,7 @@ xran_spawn_workers(void)
|
||||
@@ -3130,7 +3184,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 1 - CP GEN **/
|
||||
@@ -1470,7 +1604,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3145,7 +3173,7 @@ xran_spawn_workers(void)
|
||||
@@ -3145,7 +3199,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 2 UP GEN **/
|
||||
@@ -1479,7 +1613,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3184,7 +3212,7 @@ xran_spawn_workers(void)
|
||||
@@ -3184,7 +3238,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 FH RX and BBDEV */
|
||||
@@ -1488,7 +1622,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3199,7 +3227,7 @@ xran_spawn_workers(void)
|
||||
@@ -3199,7 +3253,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 1 - CP GEN **/
|
||||
@@ -1497,7 +1631,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3214,7 +3242,7 @@ xran_spawn_workers(void)
|
||||
@@ -3214,7 +3268,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 2 UP GEN **/
|
||||
@@ -1506,7 +1640,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3229,7 +3257,7 @@ xran_spawn_workers(void)
|
||||
@@ -3229,7 +3283,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 3 UP GEN **/
|
||||
@@ -1515,7 +1649,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3266,7 +3294,7 @@ xran_spawn_workers(void)
|
||||
@@ -3266,7 +3320,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 **/
|
||||
@@ -1524,7 +1658,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3281,7 +3309,7 @@ xran_spawn_workers(void)
|
||||
@@ -3281,7 +3335,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 1 - CP GEN **/
|
||||
@@ -1533,7 +1667,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3296,7 +3324,7 @@ xran_spawn_workers(void)
|
||||
@@ -3296,7 +3350,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 2 UP GEN **/
|
||||
@@ -1542,7 +1676,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3311,7 +3339,7 @@ xran_spawn_workers(void)
|
||||
@@ -3311,7 +3365,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 3 UP GEN **/
|
||||
@@ -1551,7 +1685,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3326,7 +3354,7 @@ xran_spawn_workers(void)
|
||||
@@ -3326,7 +3380,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 4 UP GEN **/
|
||||
@@ -1560,7 +1694,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3348,7 +3376,7 @@ xran_spawn_workers(void)
|
||||
@@ -3348,7 +3402,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 Eth RX */
|
||||
@@ -1569,7 +1703,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3363,7 +3391,7 @@ xran_spawn_workers(void)
|
||||
@@ -3363,7 +3417,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 1 FH RX and BBDEV */
|
||||
@@ -1578,7 +1712,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3378,7 +3406,7 @@ xran_spawn_workers(void)
|
||||
@@ -3378,7 +3432,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 2 FH RX and BBDEV */
|
||||
@@ -1587,7 +1721,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3393,7 +3421,7 @@ xran_spawn_workers(void)
|
||||
@@ -3393,7 +3447,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 3 FH RX and BBDEV */
|
||||
@@ -1596,7 +1730,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3408,7 +3436,7 @@ xran_spawn_workers(void)
|
||||
@@ -3408,7 +3462,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** FH TX and BBDEV */
|
||||
@@ -1605,7 +1739,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3435,7 +3463,7 @@ xran_spawn_workers(void)
|
||||
@@ -3435,7 +3489,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 Eth RX */
|
||||
@@ -1614,7 +1748,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3450,7 +3478,7 @@ xran_spawn_workers(void)
|
||||
@@ -3450,7 +3504,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 1 FH RX and BBDEV */
|
||||
@@ -1623,7 +1757,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3465,7 +3493,7 @@ xran_spawn_workers(void)
|
||||
@@ -3465,7 +3519,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 2 FH RX and BBDEV */
|
||||
@@ -1632,7 +1766,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3480,7 +3508,7 @@ xran_spawn_workers(void)
|
||||
@@ -3480,7 +3534,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 3 FH RX and BBDEV */
|
||||
@@ -1641,7 +1775,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3495,7 +3523,7 @@ xran_spawn_workers(void)
|
||||
@@ -3495,7 +3549,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 4 FH RX and BBDEV */
|
||||
@@ -1650,7 +1784,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3510,7 +3538,7 @@ xran_spawn_workers(void)
|
||||
@@ -3510,7 +3564,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** FH TX and BBDEV */
|
||||
@@ -1659,7 +1793,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3537,7 +3565,7 @@ xran_spawn_workers(void)
|
||||
@@ -3537,7 +3591,7 @@ xran_spawn_workers(void)
|
||||
|
||||
/* workers */
|
||||
/** 0 **/
|
||||
@@ -1668,7 +1802,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3562,7 +3590,7 @@ xran_spawn_workers(void)
|
||||
@@ -3562,7 +3616,7 @@ xran_spawn_workers(void)
|
||||
}
|
||||
|
||||
/** 1 - CP GEN **/
|
||||
@@ -1677,7 +1811,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3577,7 +3605,7 @@ xran_spawn_workers(void)
|
||||
@@ -3577,7 +3631,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 2 UP GEN **/
|
||||
@@ -1686,7 +1820,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3602,7 +3630,7 @@ xran_spawn_workers(void)
|
||||
@@ -3602,7 +3656,7 @@ xran_spawn_workers(void)
|
||||
}
|
||||
|
||||
/** 3 UP GEN **/
|
||||
@@ -1695,7 +1829,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3627,7 +3655,7 @@ xran_spawn_workers(void)
|
||||
@@ -3627,7 +3681,7 @@ xran_spawn_workers(void)
|
||||
}
|
||||
|
||||
/** 4 UP GEN **/
|
||||
@@ -1704,7 +1838,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3642,7 +3670,7 @@ xran_spawn_workers(void)
|
||||
@@ -3642,7 +3696,7 @@ xran_spawn_workers(void)
|
||||
eth_ctx->pkt_wrk_cfg[pThCtx->worker_id].arg = pThCtx;
|
||||
|
||||
/** 5 UP GEN **/
|
||||
@@ -1713,7 +1847,7 @@ index 7c472d7..7c7cf91 100644
|
||||
if(pThCtx == NULL){
|
||||
print_err("pThCtx allocation error\n");
|
||||
return XRAN_STATUS_FAIL;
|
||||
@@ -3754,6 +3782,7 @@ xran_open(void *pHandle, struct xran_fh_config* pConf)
|
||||
@@ -3754,6 +3808,7 @@ xran_open(void *pHandle, struct xran_fh_config* pConf)
|
||||
p_xran_dev_ctx->puschMaskSlot = pConf->puschMaskSlot;
|
||||
p_xran_dev_ctx->DynamicSectionEna = pConf->DynamicSectionEna;
|
||||
p_xran_dev_ctx->RunSlotPrbMapBySymbolEnable = pConf->RunSlotPrbMapBySymbolEnable;
|
||||
@@ -1721,7 +1855,7 @@ index 7c472d7..7c7cf91 100644
|
||||
p_xran_dev_ctx->dssEnable = pConf->dssEnable;
|
||||
p_xran_dev_ctx->dssPeriod = pConf->dssPeriod;
|
||||
for(i=0; i<pConf->dssPeriod; i++) {
|
||||
@@ -4034,6 +4063,24 @@ xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx,
|
||||
@@ -4034,6 +4089,24 @@ xran_get_slot_idx (uint32_t PortId, uint32_t *nFrameIdx, uint32_t *nSubframeIdx,
|
||||
return tti;
|
||||
}
|
||||
|
||||
@@ -1746,7 +1880,7 @@ index 7c472d7..7c7cf91 100644
|
||||
int32_t
|
||||
xran_set_debug_stop(int32_t value, int32_t count)
|
||||
{
|
||||
@@ -4208,7 +4255,7 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
|
||||
@@ -4208,7 +4281,7 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
|
||||
int32_t i = 0, j = 0, nPrbElm = 0;
|
||||
int16_t iqwidth = p_PrbMapIn->prbMap[0].iqWidth;
|
||||
struct xran_prb_elm *p_prb_elm_src, *p_prb_elm_dst;
|
||||
@@ -1755,7 +1889,7 @@ index 7c472d7..7c7cf91 100644
|
||||
int32_t nRBStart_tmp, nRBremain, nStartSymb, nEndSymb, nRBStart, nRBEnd, nRBSize;
|
||||
// int32_t eth_xran_up_headers_sz = sizeof(struct eth_xran_up_pkt_hdr);
|
||||
// int32_t nmaxRB = (mtu - eth_xran_up_headers_sz - RTE_PKTMBUF_HEADROOM)/XRAN_PAYLOAD_1_RB_SZ(iqwidth);
|
||||
@@ -4217,7 +4264,6 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
|
||||
@@ -4217,7 +4290,6 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
|
||||
if (mtu==9600)
|
||||
nmaxRB--; //for some reason when mtu is 9600, only 195 RB can be sent, not 196
|
||||
|
||||
@@ -1763,7 +1897,7 @@ index 7c472d7..7c7cf91 100644
|
||||
memcpy(p_PrbMapOut, p_PrbMapIn, sizeof(struct xran_prb_map));
|
||||
for(i = 0; i < XRAN_NUM_OF_SYMBOL_PER_SLOT; i++)
|
||||
{
|
||||
@@ -4292,26 +4338,30 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
|
||||
@@ -4292,26 +4364,30 @@ int32_t xran_init_PrbMap_by_symbol_from_cfg(struct xran_prb_map* p_PrbMapIn, str
|
||||
|
||||
for(; i < XRAN_NUM_OF_SYMBOL_PER_SLOT; i++)
|
||||
{
|
||||
@@ -2045,7 +2179,7 @@ index 72249bc..6b30084 100644
|
||||
#include <rte_config.h>
|
||||
|
||||
diff --git a/fhi_lib/lib/src/xran_tx_proc.c b/fhi_lib/lib/src/xran_tx_proc.c
|
||||
index 45a17a8..85ce6fa 100644
|
||||
index 45a17a8..cca2dcc 100644
|
||||
--- a/fhi_lib/lib/src/xran_tx_proc.c
|
||||
+++ b/fhi_lib/lib/src/xran_tx_proc.c
|
||||
@@ -35,7 +35,11 @@
|
||||
@@ -2060,7 +2194,19 @@ index 45a17a8..85ce6fa 100644
|
||||
|
||||
#include <rte_common.h>
|
||||
#include <rte_eal.h>
|
||||
@@ -1514,7 +1518,11 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
|
||||
@@ -1399,6 +1403,11 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
|
||||
|
||||
if(0!=ptr_sect_elm->cur_index)
|
||||
{
|
||||
+ /* prevent xran from sending DL U-plane packets when it should not */
|
||||
+ if(p_xran_dev_ctx->fh_init.io_cfg.id == O_DU && xran_fs_get_slot_type(xran_port_id, 0, tti, XRAN_SLOT_TYPE_DL) != 1)
|
||||
+ {
|
||||
+ return 0;
|
||||
+ }
|
||||
num_sections = ptr_sect_elm->cur_index;
|
||||
/* iterate C-Plane configuration to generate corresponding U-Plane */
|
||||
vf_id = p_xran_dev_ctx->map2vf[direction][cc_id][ant_id][XRAN_UP_VF];
|
||||
@@ -1514,7 +1523,11 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
|
||||
mb_oran_hdr_ext->buf_addr = ext_buff;
|
||||
mb_oran_hdr_ext->buf_iova = ((struct rte_mempool_objhdr*)RTE_PTR_SUB(mb_base, rte_mempool_objhdr_size))->iova + RTE_PTR_DIFF(ext_buff, mb_base);
|
||||
mb_oran_hdr_ext->buf_len = ext_buff_len;
|
||||
@@ -2072,7 +2218,7 @@ index 45a17a8..85ce6fa 100644
|
||||
mb_oran_hdr_ext->shinfo = p_share_data;
|
||||
mb_oran_hdr_ext->data_off = (uint16_t)RTE_MIN((uint16_t)RTE_PKTMBUF_HEADROOM, (uint16_t)mb_oran_hdr_ext->buf_len) - rte_ether_hdr_size;
|
||||
mb_oran_hdr_ext->data_len = (uint16_t)(mb_oran_hdr_ext->data_len + rte_ether_hdr_size);
|
||||
@@ -1532,8 +1540,13 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
|
||||
@@ -1532,8 +1545,13 @@ xran_process_tx_sym_cp_on_opt(void* pHandle, uint8_t ctx_id, uint32_t tti, int32
|
||||
|
||||
/* Fill in the ethernet header. */
|
||||
#ifndef TRANSMIT_BURST
|
||||
@@ -2086,7 +2232,7 @@ index 45a17a8..85ce6fa 100644
|
||||
((struct rte_ether_hdr*)pStart)->ether_type = ETHER_TYPE_ECPRI_BE; /* ethertype */
|
||||
#endif
|
||||
nPktSize = sizeof(struct rte_ether_hdr)
|
||||
@@ -1878,7 +1891,11 @@ xran_process_tx_srs_cp_on(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t s
|
||||
@@ -1878,7 +1896,11 @@ xran_process_tx_srs_cp_on(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t s
|
||||
mb_oran_hdr_ext->buf_addr = ext_buff;
|
||||
mb_oran_hdr_ext->buf_iova = ((struct rte_mempool_objhdr*)RTE_PTR_SUB(mb_base, rte_mempool_objhdr_size))->iova + RTE_PTR_DIFF(ext_buff, mb_base);
|
||||
mb_oran_hdr_ext->buf_len = ext_buff_len;
|
||||
@@ -2098,7 +2244,7 @@ index 45a17a8..85ce6fa 100644
|
||||
mb_oran_hdr_ext->shinfo = p_share_data;
|
||||
mb_oran_hdr_ext->data_off = (uint16_t)RTE_MIN((uint16_t)RTE_PKTMBUF_HEADROOM, (uint16_t)mb_oran_hdr_ext->buf_len) - rte_ether_hdr_size;
|
||||
mb_oran_hdr_ext->data_len = (uint16_t)(mb_oran_hdr_ext->data_len + rte_ether_hdr_size);
|
||||
@@ -1887,8 +1904,13 @@ xran_process_tx_srs_cp_on(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t s
|
||||
@@ -1887,8 +1909,13 @@ xran_process_tx_srs_cp_on(void* pHandle, uint8_t ctx_id, uint32_t tti, int32_t s
|
||||
pStart = (char*)((char*)mb_oran_hdr_ext->buf_addr + mb_oran_hdr_ext->data_off);
|
||||
|
||||
/* Fill in the ethernet header. */
|
||||
|
||||
@@ -319,6 +319,32 @@ int config_libconfig_set(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
}
|
||||
}
|
||||
|
||||
static const char *config_type_to_name(int type)
|
||||
{
|
||||
switch (type) {
|
||||
case CONFIG_TYPE_NONE:
|
||||
return "none";
|
||||
case CONFIG_TYPE_GROUP:
|
||||
return "group";
|
||||
case CONFIG_TYPE_INT:
|
||||
return "integer";
|
||||
case CONFIG_TYPE_INT64:
|
||||
return "64-bit integer";
|
||||
case CONFIG_TYPE_FLOAT:
|
||||
return "float";
|
||||
case CONFIG_TYPE_STRING:
|
||||
return "string";
|
||||
case CONFIG_TYPE_BOOL:
|
||||
return "boolean";
|
||||
case CONFIG_TYPE_ARRAY:
|
||||
return "array";
|
||||
case CONFIG_TYPE_LIST:
|
||||
return "list";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions, int numoptions, char *prefix)
|
||||
{
|
||||
config_setting_t *setting;
|
||||
@@ -348,17 +374,26 @@ int config_libconfig_get(configmodule_interface_t *cfg, paramdef_t *cfgoptions,
|
||||
|
||||
switch(cfgoptions[i].type) {
|
||||
case TYPE_STRING:
|
||||
if ( config_lookup_string(&(libconfig_privdata.cfg), cfgpath, (const char**)&str)) {
|
||||
config_check_valptr(cfg, &cfgoptions[i], 1, strlen(str) + 1);
|
||||
if ( strlen(str)+1 > cfgoptions[i].numelt )
|
||||
fprintf(stderr,"[LIBCONFIG] %s: %s exceeds maximum length of %i bytes, value truncated\n",
|
||||
cfgpath,str,cfgoptions[i].numelt);
|
||||
snprintf( *cfgoptions[i].strptr , cfgoptions[i].numelt, "%s", str);
|
||||
printf_params(cfg, "[LIBCONFIG] %s: \"%s\"\n", cfgpath, *cfgoptions[i].strptr);
|
||||
} else {
|
||||
setting = config_lookup(&(libconfig_privdata.cfg), cfgpath);
|
||||
if (setting != NULL) {
|
||||
int type = config_setting_type(setting);
|
||||
if (type == CONFIG_TYPE_STRING) {
|
||||
const char *strng = config_setting_get_string(setting);
|
||||
config_check_valptr(cfg, &cfgoptions[i], 1, strlen(strng) + 1);
|
||||
if (strlen(strng) + 1 > cfgoptions[i].numelt)
|
||||
fprintf(stderr,
|
||||
"[LIBCONFIG] %s: %s exceeds maximum length of %i bytes, value truncated\n",
|
||||
cfgpath,
|
||||
strng,
|
||||
cfgoptions[i].numelt);
|
||||
snprintf(*cfgoptions[i].strptr, cfgoptions[i].numelt, "%s", strng);
|
||||
printf_params(cfg, "[LIBCONFIG] %s: \"%s\"\n", cfgpath, *cfgoptions[i].strptr);
|
||||
} else {
|
||||
fprintf(stderr,"[LIBCONFIG] expected a string input for %s but got type %s\n", cfgpath, config_type_to_name(type));
|
||||
fatalerror = 1;
|
||||
}
|
||||
} else
|
||||
defval = config_common_getdefault(cfg, &cfgoptions[i], prefix);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_STRINGLIST:
|
||||
|
||||
@@ -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
|
||||
@@ -719,7 +709,37 @@ RU must be rebooted so the changes apply.
|
||||
- The measured throughput was **520 Mbps DL** and **40 Mbps UL**.
|
||||
- With newer OAI versions, throughput degrades. This issue is currently under investigation.
|
||||
|
||||
### Configure Network Interfaces and DPDK VFs
|
||||
#### ProtO-RU
|
||||
|
||||
[ProtO-RU](https://github.com/NUS-CIR/ProtO-RU) is a software implementation of an O-RAN 7.2 RU using a NI USRP.
|
||||
Different from other COTS RUs, ProtO-RU requires a larger DU delay profile which is larger than the TTI interval.
|
||||
|
||||
The OAI configuration file [`gnb.sa.band78.106prb.fhi72.1x1-proto-ru.conf`](../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.106prb.fhi72.1x1-proto-ru.conf) corresponds to:
|
||||
|
||||
- TDD pattern `DDDSU`, 2.5ms
|
||||
- Bandwidth 40MHz
|
||||
- MTU 9216
|
||||
- 1T1R
|
||||
|
||||
##### RU configuration
|
||||
|
||||
First, compile the RU as outlined in the [building ProtO-RU tutorial](https://github.com/NUS-CIR/ProtO-RU/tree/proto-ru?tab=readme-ov-file#building-proto-ru).
|
||||
Then, ensure that both your DU and ProtO-RU host are PTP synchronized.
|
||||
|
||||
Next, use the RU config, [protoru-OAI-B210-TDD-n78-40MHz-1x1-30kHz.yml](https://github.com/NUS-CIR/ProtO-RU/blob/proto-ru/proto-ru/conf-files/protoru-OAI-B210-TDD-n78-40MHz-1x1-30kHz.yml), which corresponds to the above mentioned DU config file.
|
||||
In addition, please adapt the DU MAC address and VLAN tag to your needs.
|
||||
|
||||
ProtO-RU was successfully tested with USRP B210.
|
||||
If you are using a different SDR (e.g., N310), you will need to update the ProtO-RU and the DU configurations accordingly.
|
||||
|
||||
Launch ProtO-RU with the adapted configuration file with the command:
|
||||
```bash
|
||||
sudo ./ru_emulator -c <path-to/protoru-OAI-B210-TDD-n78-40MHz-1x1-30kHz.yml>
|
||||
```
|
||||
|
||||
Finally, start the OAI gNB.
|
||||
|
||||
## Configure Network Interfaces and DPDK VFs
|
||||
|
||||
The 7.2 fronthaul uses the xran library, which requires DPDK. In this step, we
|
||||
need to configure network interfaces to send data to the RU, and configure DPDK
|
||||
@@ -937,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)
|
||||
|
||||
@@ -1001,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
|
||||
@@ -1461,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 %}
|
||||
@@ -26,7 +26,7 @@
|
||||
#---------------------------------------------------------------------
|
||||
|
||||
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS ran-base
|
||||
FROM registry.redhat.io/ubi9/ubi:latest AS ran-base
|
||||
LABEL MAINTAINER OpenAirInterface <contact@openairinterface.org>
|
||||
ARG NEEDED_GIT_PROXY
|
||||
ARG TARGETARCH
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -31,7 +31,7 @@ FROM ran-build:latest AS enb-build
|
||||
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-enb
|
||||
FROM registry.redhat.io/ubi9/ubi:latest AS oai-enb
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
RUN dnf update -y && \
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -38,7 +38,7 @@ RUN /bin/sh oaienv && \
|
||||
./build_oai -w AW2SORI -t Ethernet
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb-aw2s
|
||||
FROM registry.redhat.io/ubi9/ubi:latest AS oai-gnb-aw2s
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
# Install EPEL for RHEL9
|
||||
|
||||
@@ -48,7 +48,6 @@ RUN apt-get update && \
|
||||
procps \
|
||||
libsctp1 \
|
||||
tzdata \
|
||||
libblas3 \
|
||||
libc6 \
|
||||
libconfig9 \
|
||||
gdb \
|
||||
|
||||
@@ -30,7 +30,7 @@ FROM ran-base:latest AS gnb-base
|
||||
FROM ran-build-fhi72:latest AS gnb-build
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb-fhi72
|
||||
FROM registry.redhat.io/ubi9/ubi:latest AS oai-gnb-fhi72
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
# Install EPEL for RHEL9
|
||||
@@ -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
|
||||
|
||||
@@ -31,7 +31,7 @@ FROM ran-build:latest AS gnb-build
|
||||
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-gnb
|
||||
FROM registry.redhat.io/ubi9/ubi:latest AS oai-gnb
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
# Install EPEL for RHEL9
|
||||
|
||||
@@ -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/*
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ FROM ran-build:latest AS ru-build
|
||||
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-lte-ru
|
||||
FROM registry.redhat.io/ubi9/ubi:latest AS oai-lte-ru
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
RUN dnf update -y && \
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -31,7 +31,7 @@ FROM ran-build:latest AS lte-ue-build
|
||||
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-lte-ue
|
||||
FROM registry.redhat.io/ubi9/ubi:latest AS oai-lte-ue
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
RUN dnf update -y && \
|
||||
@@ -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/*
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ FROM ran-build:latest AS gnb-build
|
||||
RUN cp /oai-ran/docker/scripts/gnb_entrypoint.sh /oai-ran/docker/scripts/entrypoint.sh
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-nr-cuup
|
||||
FROM registry.redhat.io/ubi9/ubi:latest AS oai-nr-cuup
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
# Install EPEL
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -31,7 +31,7 @@ FROM ran-build:latest AS nr-ue-build
|
||||
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-nr-ue
|
||||
FROM registry.redhat.io/ubi9/ubi:latest AS oai-nr-ue
|
||||
ENV TZ=Europe/Paris
|
||||
|
||||
# Install EPEL for RHEL9
|
||||
|
||||
@@ -52,8 +52,6 @@ RUN apt-get update && \
|
||||
libboost-system1.83.0 \
|
||||
libboost-program-options1.83.0 \
|
||||
tzdata \
|
||||
liblapacke \
|
||||
libblas3 \
|
||||
libconfig9 \
|
||||
openssl \
|
||||
net-tools \
|
||||
|
||||
@@ -46,7 +46,7 @@ RUN /bin/sh oaienv && \
|
||||
ninja -k10 -j36
|
||||
|
||||
#start from scratch for target executable
|
||||
FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-physim
|
||||
FROM registry.redhat.io/ubi9/ubi:latest AS oai-physim
|
||||
|
||||
RUN dnf update -y && \
|
||||
dnf install -y \
|
||||
@@ -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) {
|
||||
|
||||
@@ -675,11 +675,28 @@ int main( int argc, char **argv ) {
|
||||
wait_nfapi_init("main?");
|
||||
}
|
||||
|
||||
if (IS_SOFTMODEM_IMSCOPE_ENABLED || IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED) {
|
||||
sleep(1);
|
||||
scopeParms_t p;
|
||||
p.argc = &argc;
|
||||
p.argv = argv;
|
||||
p.gNB = RC.gNB[0];
|
||||
p.ru = RC.ru[0];
|
||||
if (IS_SOFTMODEM_IMSCOPE_ENABLED) {
|
||||
load_softscope("im", &p);
|
||||
}
|
||||
AssertFatal(!(IS_SOFTMODEM_IMSCOPE_ENABLED && IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED),
|
||||
"Data recoding and ImScope cannot be enabled at the same time\n");
|
||||
if (IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED) {
|
||||
load_module_shlib("imscope_record", NULL, 0, &p);
|
||||
}
|
||||
}
|
||||
|
||||
if (RC.nb_nr_L1_inst > 0) {
|
||||
wait_RUs();
|
||||
// once all RUs are ready initialize the rest of the gNBs ((dependence on final RU parameters after configuration)
|
||||
|
||||
if (IS_SOFTMODEM_DOSCOPE || IS_SOFTMODEM_IMSCOPE_ENABLED || IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED) {
|
||||
if (IS_SOFTMODEM_DOSCOPE) {
|
||||
sleep(1);
|
||||
scopeParms_t p;
|
||||
p.argc = &argc;
|
||||
@@ -689,14 +706,6 @@ int main( int argc, char **argv ) {
|
||||
if (IS_SOFTMODEM_DOSCOPE) {
|
||||
load_softscope("nr", &p);
|
||||
}
|
||||
if (IS_SOFTMODEM_IMSCOPE_ENABLED) {
|
||||
load_softscope("im", &p);
|
||||
}
|
||||
AssertFatal(!(IS_SOFTMODEM_IMSCOPE_ENABLED && IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED),
|
||||
"Data recoding and ImScope cannot be enabled at the same time\n");
|
||||
if (IS_SOFTMODEM_IMSCOPE_RECORD_ENABLED) {
|
||||
load_module_shlib("imscope_record", NULL, 0, &p);
|
||||
}
|
||||
}
|
||||
|
||||
if (NFAPI_MODE != NFAPI_MODE_PNF && NFAPI_MODE != NFAPI_MODE_VNF && NFAPI_MODE != NFAPI_MODE_AERIAL) {
|
||||
|
||||
@@ -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
|
||||
@@ -63,6 +63,10 @@ char cpu_buf_recv[RECV_BUF_LEN];
|
||||
|
||||
uint16_t sfn = 0, slot = 0;
|
||||
nv_ipc_t *ipc;
|
||||
static nv_ipc_config_t nv_ipc_config;
|
||||
static int cpu_msg_buf_size = 0;
|
||||
static int cpu_data_buf_size = 0;
|
||||
|
||||
void nvIPC_Stop()
|
||||
{
|
||||
LOG_I(NR_MAC, "Received STOP.indication\n");
|
||||
@@ -95,7 +99,7 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg)
|
||||
nfapi_vnf_config_t * vnf_config = get_config();
|
||||
if (vnf_config != 0) {
|
||||
// first, unpack the header
|
||||
fapi_phy_api_msg fapi_msg;
|
||||
fapi_message_header_t fapi_msg;
|
||||
if (!(pull8(&pReadPackedMessage, &fapi_msg.num_msg, end) && pull8(&pReadPackedMessage, &fapi_msg.opaque_handle, end)
|
||||
&& pull16(&pReadPackedMessage, &fapi_msg.message_id, end)
|
||||
&& pull32(&pReadPackedMessage, &fapi_msg.message_length, end))) {
|
||||
@@ -195,267 +199,78 @@ static int ipc_handle_rx_msg(nv_ipc_t *ipc, nv_ipc_msg_t *msg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int8_t buf[1024];
|
||||
int get_cpu_msg_buf_size()
|
||||
{
|
||||
return cpu_msg_buf_size;
|
||||
}
|
||||
int get_cpu_data_buf_size()
|
||||
{
|
||||
return cpu_data_buf_size;
|
||||
}
|
||||
|
||||
nv_ipc_config_t nv_ipc_config;
|
||||
bool allocate_msg(nv_ipc_msg_t *send_msg)
|
||||
{
|
||||
return ipc->tx_allocate(ipc, send_msg, 0) == 0;
|
||||
}
|
||||
void release_msg(nv_ipc_msg_t *send_msg)
|
||||
{
|
||||
ipc->tx_release(ipc, send_msg);
|
||||
}
|
||||
|
||||
bool send_nvipc_msg(nv_ipc_msg_t *send_msg)
|
||||
{
|
||||
int send_retval = ipc->tx_send_msg(ipc, send_msg);
|
||||
if (send_retval != 0) {
|
||||
LOG_E(NFAPI_VNF, "%s error: send TX message failed Error: %d\n", __FUNCTION__, send_retval);
|
||||
ipc->tx_release(ipc, send_msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
ipc->notify(ipc, 1); // notify that there's 1 message in queue
|
||||
return true;
|
||||
}
|
||||
|
||||
bool aerial_nr_send_p5_message(vnf_t *vnf, uint16_t p5_idx, nfapi_nr_p4_p5_message_header_t *msg, uint32_t msg_len)
|
||||
{
|
||||
nfapi_vnf_pnf_info_t *pnf = nfapi_vnf_pnf_list_find(&(vnf->_public), p5_idx);
|
||||
|
||||
if (pnf) {
|
||||
uint8_t tx_messagebufferFAPI[sizeof(vnf->tx_message_buffer)];
|
||||
// Create the message
|
||||
nv_ipc_msg_t send_msg = {.msg_id = msg->message_id,
|
||||
.cell_id = 0,
|
||||
// For P5 we don't need CPU_DATA
|
||||
.data_pool = NV_IPC_MEMPOOL_CPU_MSG,
|
||||
.data_len = 0,
|
||||
.data_buf = NULL};
|
||||
|
||||
// Allocate the message
|
||||
if (!allocate_msg(&send_msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int packedMessageLengthFAPI = -1;
|
||||
packedMessageLengthFAPI =
|
||||
vnf->_public.pack_func(msg, msg_len, tx_messagebufferFAPI, sizeof(tx_messagebufferFAPI), &vnf->_public.codec_config);
|
||||
return aerial_send_P5_msg(tx_messagebufferFAPI, packedMessageLengthFAPI, msg) == 0;
|
||||
// Pack directly into it
|
||||
if ((packedMessageLengthFAPI =
|
||||
vnf->_public.pack_func(msg, msg_len, send_msg.msg_buf, get_cpu_msg_buf_size(), &vnf->_public.codec_config))
|
||||
< 0) {
|
||||
release_msg(&send_msg);
|
||||
return false;
|
||||
}
|
||||
if (packedMessageLengthFAPI <= 0) {
|
||||
LOG_E(NFAPI_VNF, "Error packing message 0x%02x\n", msg->message_id);
|
||||
release_msg(&send_msg);
|
||||
return false;
|
||||
}
|
||||
// Set the length
|
||||
send_msg.msg_len = packedMessageLengthFAPI + 8; // adding 8 to account for the size of the FAPI header
|
||||
// Send
|
||||
return send_nvipc_msg(&send_msg);
|
||||
} else {
|
||||
NFAPI_TRACE(NFAPI_TRACE_INFO, "%s() cannot find pnf info for p5_idx:%d\n", __FUNCTION__, p5_idx);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool aerial_send_P5_msg(void *packedBuf, uint32_t packedMsgLength, nfapi_nr_p4_p5_message_header_t *header)
|
||||
{
|
||||
if (ipc == NULL) {
|
||||
return false;
|
||||
}
|
||||
nv_ipc_msg_t send_msg = {0};
|
||||
// look for the specific message
|
||||
switch (header->message_id) {
|
||||
case NFAPI_NR_PHY_MSG_TYPE_PARAM_REQUEST:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_PARAM_RESPONSE:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_CONFIG_REQUEST:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_CONFIG_RESPONSE:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_START_REQUEST:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_START_RESPONSE:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_STOP_REQUEST:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_STOP_RESPONSE:
|
||||
break;
|
||||
default: {
|
||||
if (header->message_id >= NFAPI_VENDOR_EXT_MSG_MIN && header->message_id <= NFAPI_VENDOR_EXT_MSG_MAX) {
|
||||
// if(config && config->pack_p4_p5_vendor_extension) {
|
||||
// result = (config->pack_p4_p5_vendor_extension)(header, ppWritePackedMsg, end, config);
|
||||
// } else {
|
||||
// NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s VE NFAPI message ID %d. No ve ecoder provided\n", __FUNCTION__, header->message_id);
|
||||
// }
|
||||
} else {
|
||||
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s NFAPI Unknown message ID %d\n", __FUNCTION__, header->message_id);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
send_msg.msg_id = header->message_id;
|
||||
send_msg.cell_id = 0;
|
||||
send_msg.msg_len = packedMsgLength + 8; // adding 8 to account for the size of the FAPI header
|
||||
send_msg.data_len = 0;
|
||||
send_msg.data_buf = NULL;
|
||||
send_msg.data_pool = NV_IPC_MEMPOOL_CPU_MSG;
|
||||
|
||||
// procedure is allocate->fill->send
|
||||
int alloc_retval = ipc->tx_allocate(ipc, &send_msg, 0);
|
||||
if (alloc_retval != 0) {
|
||||
LOG_E(NFAPI_VNF, "%s error: allocate TX buffer failed Error: %d\n", __FUNCTION__, alloc_retval);
|
||||
ipc->tx_release(ipc, &send_msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(send_msg.msg_buf, packedBuf, send_msg.msg_len);
|
||||
LOG_D(NFAPI_VNF,
|
||||
"send: cell_id=%d msg_id=0x%02X msg_len=%d data_len=%d data_pool=%d\n",
|
||||
send_msg.cell_id,
|
||||
send_msg.msg_id,
|
||||
send_msg.msg_len,
|
||||
send_msg.data_len,
|
||||
send_msg.data_pool);
|
||||
// Send the message
|
||||
int send_retval = ipc->tx_send_msg(ipc, &send_msg);
|
||||
if (send_retval < 0) {
|
||||
LOG_E(NFAPI_VNF, "%s error: send TX message failed Error: %d\n", __FUNCTION__, send_retval);
|
||||
ipc->tx_release(ipc, &send_msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
ipc->notify(ipc, 1); // notify that there's 1 message in queue
|
||||
return true;
|
||||
}
|
||||
|
||||
bool aerial_send_P7_msg(void *packedBuf, uint32_t packedMsgLength, nfapi_nr_p7_message_header_t *header)
|
||||
{
|
||||
if (ipc == NULL) {
|
||||
return false;
|
||||
}
|
||||
nv_ipc_msg_t send_msg;
|
||||
uint8_t *pPacketBodyField = &((uint8_t *)packedBuf)[8];
|
||||
uint8_t *pPackMessageEnd = packedBuf + packedMsgLength + 8;
|
||||
|
||||
uint16_t present_sfn = 0;
|
||||
uint16_t present_slot = 0;
|
||||
pull16(&pPacketBodyField, &present_sfn, pPackMessageEnd);
|
||||
pull16(&pPacketBodyField, &present_slot, pPackMessageEnd);
|
||||
|
||||
if (present_sfn != old_sfn || present_slot != old_slot) {
|
||||
LOG_E(NFAPI_VNF,
|
||||
"\n============================================================================\n"
|
||||
"sfn slot doesn't match unpacked one! L2->L1 %d.%d vs L1->L2 %d.%d \n"
|
||||
"============================================================================\n",
|
||||
present_sfn,
|
||||
present_slot,
|
||||
old_sfn,
|
||||
old_slot);
|
||||
}
|
||||
// look for the specific message
|
||||
switch (header->message_id) {
|
||||
case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST:
|
||||
case NFAPI_UE_RELEASE_REQUEST:
|
||||
case NFAPI_UE_RELEASE_RESPONSE:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_DL_NODE_SYNC:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_UL_NODE_SYNC:
|
||||
case NFAPI_TIMING_INFO:
|
||||
case 0x8f:
|
||||
break;
|
||||
default: {
|
||||
if (header->message_id >= NFAPI_VENDOR_EXT_MSG_MIN && header->message_id <= NFAPI_VENDOR_EXT_MSG_MAX) {
|
||||
} else {
|
||||
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s NFAPI Unknown message ID %d\n", __FUNCTION__, header->message_id);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
||||
send_msg.msg_id = header->message_id;
|
||||
send_msg.cell_id = 0;
|
||||
send_msg.msg_len = packedMsgLength + 8; // adding 8 to account for the size of the FAPI header
|
||||
send_msg.data_len = 0;
|
||||
send_msg.data_buf = NULL;
|
||||
send_msg.data_pool = NV_IPC_MEMPOOL_CPU_MSG;
|
||||
// procedure is allocate->fill->send
|
||||
|
||||
// Allocate buffer for TX message
|
||||
int alloc_retval = ipc->tx_allocate(ipc, &send_msg, 0);
|
||||
if (alloc_retval != 0) {
|
||||
LOG_E(NFAPI_VNF, "%s error: allocate TX buffer failed Error: %d\n", __FUNCTION__, alloc_retval);
|
||||
ipc->tx_release(ipc, &send_msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(send_msg.msg_buf, packedBuf, send_msg.msg_len);
|
||||
LOG_D(NFAPI_VNF,
|
||||
"send: cell_id=%d msg_id=0x%02X msg_len=%d data_len=%d data_pool=%d\n",
|
||||
send_msg.cell_id,
|
||||
send_msg.msg_id,
|
||||
send_msg.msg_len,
|
||||
send_msg.data_len,
|
||||
send_msg.data_pool);
|
||||
// Send the message
|
||||
int send_retval = ipc->tx_send_msg(ipc, &send_msg);
|
||||
if (send_retval < 0) {
|
||||
LOG_E(NFAPI_VNF, "%s error: send TX message failed Error: %d\n", __FUNCTION__, send_retval);
|
||||
ipc->tx_release(ipc, &send_msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
ipc->notify(ipc, 1); // notify that there's 1 message in queue
|
||||
return true;
|
||||
}
|
||||
|
||||
bool aerial_send_P7_msg_with_data(void *packedBuf,
|
||||
uint32_t packedMsgLength,
|
||||
void *dataBuf,
|
||||
uint32_t dataLength,
|
||||
nfapi_nr_p7_message_header_t *header)
|
||||
{
|
||||
if (ipc == NULL) {
|
||||
return false;
|
||||
}
|
||||
nv_ipc_msg_t send_msg;
|
||||
uint8_t *pPacketBodyField = &((uint8_t *)packedBuf)[8];
|
||||
uint8_t *pPackMessageEnd = packedBuf + packedMsgLength + 8;
|
||||
uint16_t present_sfn = 0;
|
||||
uint16_t present_slot = 0;
|
||||
pull16(&pPacketBodyField, &present_sfn, pPackMessageEnd);
|
||||
pull16(&pPacketBodyField, &present_slot, pPackMessageEnd);
|
||||
|
||||
if (present_sfn != old_sfn || present_slot != old_slot) {
|
||||
LOG_E(NFAPI_VNF,
|
||||
"\n============================================================================\n"
|
||||
"sfn slot doesn't match unpacked one! L2->L1 %d.%d vs L1->L2 %d.%d \n"
|
||||
"============================================================================\n",
|
||||
present_sfn,
|
||||
present_slot,
|
||||
old_sfn,
|
||||
old_slot);
|
||||
}
|
||||
// look for the specific message
|
||||
switch (header->message_id) {
|
||||
case NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST:
|
||||
case NFAPI_UE_RELEASE_REQUEST:
|
||||
case NFAPI_UE_RELEASE_RESPONSE:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_SLOT_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_RX_DATA_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_CRC_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_UCI_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_SRS_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_DL_NODE_SYNC:
|
||||
case NFAPI_NR_PHY_MSG_TYPE_UL_NODE_SYNC:
|
||||
case NFAPI_TIMING_INFO:
|
||||
break;
|
||||
default: {
|
||||
if (header->message_id >= NFAPI_VENDOR_EXT_MSG_MIN && header->message_id <= NFAPI_VENDOR_EXT_MSG_MAX) {
|
||||
} else {
|
||||
NFAPI_TRACE(NFAPI_TRACE_ERROR, "%s NFAPI Unknown message ID %d\n", __FUNCTION__, header->message_id);
|
||||
}
|
||||
} break;
|
||||
}
|
||||
|
||||
send_msg.msg_id = header->message_id;
|
||||
send_msg.cell_id = 0;
|
||||
send_msg.msg_len = packedMsgLength + 8; // adding 8 to account for the size of the FAPI header
|
||||
send_msg.data_len = dataLength;
|
||||
send_msg.data_pool = NV_IPC_MEMPOOL_CPU_DATA;
|
||||
|
||||
// procedure is allocate->fill->send
|
||||
|
||||
// Allocate buffer for TX message
|
||||
int alloc_retval = ipc->tx_allocate(ipc, &send_msg, 0);
|
||||
if (alloc_retval != 0) {
|
||||
LOG_E(NFAPI_VNF, "%s error: allocate TX buffer failed Error: %d\n", __FUNCTION__, alloc_retval);
|
||||
ipc->tx_release(ipc, &send_msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(send_msg.msg_buf, packedBuf, send_msg.msg_len);
|
||||
memcpy(send_msg.data_buf, dataBuf, send_msg.data_len);
|
||||
LOG_D(NFAPI_VNF,
|
||||
"send: cell_id=%d msg_id=0x%02X msg_len=%d data_len=%d data_pool=%d\n",
|
||||
send_msg.cell_id,
|
||||
send_msg.msg_id,
|
||||
send_msg.msg_len,
|
||||
send_msg.data_len,
|
||||
send_msg.data_pool);
|
||||
// Send the message
|
||||
int send_retval = ipc->tx_send_msg(ipc, &send_msg);
|
||||
if (send_retval != 0) {
|
||||
LOG_E(NFAPI_VNF, "%s error: send TX message failed Error: %d\n", __FUNCTION__, send_retval);
|
||||
ipc->tx_release(ipc, &send_msg);
|
||||
return false;
|
||||
}
|
||||
|
||||
ipc->notify(ipc, 1); // notify that there's 1 message in queue
|
||||
return true;
|
||||
}
|
||||
|
||||
// Always allocate message buffer, but allocate data buffer only when data_len > 0
|
||||
static int aerial_recv_msg(nv_ipc_t *ipc, nv_ipc_msg_t *recv_msg)
|
||||
{
|
||||
@@ -568,6 +383,10 @@ int nvIPC_Init(nvipc_params_t nvipc_params_s)
|
||||
{
|
||||
// Want to use transport SHM, type epoll, module secondary (reads the created shm from cuphycontroller)
|
||||
load_hard_code_config(&nv_ipc_config, NV_IPC_MODULE_SECONDARY, NV_IPC_TRANSPORT_SHM);
|
||||
// save the mempool sizes for later use in packing
|
||||
cpu_msg_buf_size = nv_ipc_get_buf_size(&nv_ipc_config, NV_IPC_MEMPOOL_CPU_MSG);
|
||||
cpu_data_buf_size = nv_ipc_get_buf_size(&nv_ipc_config, NV_IPC_MEMPOOL_CPU_DATA);
|
||||
|
||||
// Create nv_ipc_t instance
|
||||
LOG_I(NFAPI_VNF, "%s: creating IPC interface with prefix %s\n", __func__, nvipc_params_s.nvipc_shm_prefix);
|
||||
strcpy(nv_ipc_config.transport_config.shm.prefix, nvipc_params_s.nvipc_shm_prefix);
|
||||
@@ -588,10 +407,9 @@ int oai_fapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req)
|
||||
ul_tti_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
|
||||
ul_tti_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_UL_TTI_REQUEST;
|
||||
|
||||
// int retval = nfapi_vnf_p7_ul_tti_req(p7_config, ul_tti_req);
|
||||
int retval = p7_config->send_p7_msg(get_p7_vnf(), &ul_tti_req->header);
|
||||
bool retval = p7_config->send_p7_msg(get_p7_vnf(), &ul_tti_req->header);
|
||||
|
||||
if (retval != 0) {
|
||||
if (!retval) {
|
||||
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
|
||||
} else {
|
||||
// Reset number of PDUs so that it is not resent
|
||||
@@ -608,9 +426,9 @@ int oai_fapi_ul_dci_req(nfapi_nr_ul_dci_request_t *ul_dci_req)
|
||||
nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config();
|
||||
ul_dci_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
|
||||
ul_dci_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_UL_DCI_REQUEST;
|
||||
// int retval = nfapi_vnf_p7_ul_dci_req(p7_config, ul_dci_req);
|
||||
int retval = p7_config->send_p7_msg(get_p7_vnf(), &ul_dci_req->header);
|
||||
if (retval != 0) {
|
||||
|
||||
bool retval = p7_config->send_p7_msg(get_p7_vnf(), &ul_dci_req->header);
|
||||
if (!retval) {
|
||||
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
|
||||
} else {
|
||||
ul_dci_req->numPdus = 0;
|
||||
@@ -623,10 +441,9 @@ int oai_fapi_tx_data_req(nfapi_nr_tx_data_request_t *tx_data_req)
|
||||
nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config();
|
||||
tx_data_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
|
||||
tx_data_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST;
|
||||
// LOG_D(PHY, "[VNF] %s() TX_REQ sfn_sf:%d number_of_pdus:%d\n", __FUNCTION__, NFAPI_SFNSF2DEC(tx_data_req->SFN),
|
||||
// tx_data_req->Number_of_PDUs); int retval = nfapi_vnf_p7_tx_data_req(p7_config, tx_data_req);
|
||||
int retval = p7_config->send_p7_msg(get_p7_vnf(), &tx_data_req->header);
|
||||
if (retval != 0) {
|
||||
|
||||
bool retval = p7_config->send_p7_msg(get_p7_vnf(), &tx_data_req->header);
|
||||
if (!retval) {
|
||||
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
|
||||
} else {
|
||||
tx_data_req->Number_of_PDUs = 0;
|
||||
@@ -640,11 +457,12 @@ int oai_fapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req)
|
||||
nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config();
|
||||
dl_config_req->header.message_id = NFAPI_NR_PHY_MSG_TYPE_DL_TTI_REQUEST;
|
||||
dl_config_req->header.phy_id = 1; // DJP HACK TODO FIXME - need to pass this around!!!!
|
||||
int retval = p7_config->send_p7_msg(get_p7_vnf(), &dl_config_req->header);
|
||||
|
||||
bool retval = p7_config->send_p7_msg(get_p7_vnf(), &dl_config_req->header);
|
||||
dl_config_req->dl_tti_request_body.nPDUs = 0;
|
||||
dl_config_req->dl_tti_request_body.nGroup = 0;
|
||||
|
||||
if (retval != 0) {
|
||||
if (!retval) {
|
||||
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
|
||||
}
|
||||
return retval;
|
||||
@@ -653,8 +471,9 @@ int oai_fapi_dl_tti_req(nfapi_nr_dl_tti_request_t *dl_config_req)
|
||||
int oai_fapi_send_end_request(int cell, uint32_t frame, uint32_t slot){
|
||||
nfapi_vnf_p7_config_t *p7_config = get_p7_vnf_config();
|
||||
nfapi_nr_slot_indication_scf_t nr_slot_resp = {.header.message_id = 0x8F, .sfn = frame, .slot = slot};
|
||||
int retval = p7_config->send_p7_msg(get_p7_vnf(), &nr_slot_resp.header);
|
||||
if (retval != 0) {
|
||||
|
||||
bool retval = p7_config->send_p7_msg(get_p7_vnf(), &nr_slot_resp.header);
|
||||
if (!retval) {
|
||||
LOG_E(PHY, "%s() Problem sending retval:%d\n", __FUNCTION__, retval);
|
||||
}
|
||||
return retval;
|
||||
|
||||
@@ -41,22 +41,12 @@
|
||||
|
||||
#include "openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h"
|
||||
|
||||
typedef struct {
|
||||
uint8_t num_msg;
|
||||
uint8_t opaque_handle;
|
||||
uint16_t message_id;
|
||||
uint32_t message_length;
|
||||
} fapi_phy_api_msg;
|
||||
|
||||
int get_cpu_msg_buf_size();
|
||||
int get_cpu_data_buf_size();
|
||||
bool allocate_msg(nv_ipc_msg_t* send_msg);
|
||||
void release_msg(nv_ipc_msg_t* send_msg);
|
||||
bool send_nvipc_msg(nv_ipc_msg_t* send_msg);
|
||||
bool aerial_nr_send_p5_message(vnf_t *vnf, uint16_t p5_idx, nfapi_nr_p4_p5_message_header_t *msg, uint32_t msg_len);
|
||||
bool aerial_send_P5_msg(void *packedBuf, uint32_t packedMsgLength, nfapi_nr_p4_p5_message_header_t *header);
|
||||
bool aerial_send_P7_msg(void *packedBuf, uint32_t packedMsgLength, nfapi_nr_p7_message_header_t *header);
|
||||
bool aerial_send_P7_msg_with_data(void *packedBuf,
|
||||
uint32_t packedMsgLength,
|
||||
void *dataBuf,
|
||||
uint32_t dataLength,
|
||||
nfapi_nr_p7_message_header_t *header);
|
||||
|
||||
int nvIPC_Init(nvipc_params_t nvipc_params_s);
|
||||
int oai_fapi_send_end_request(int cell_id, uint32_t frame, uint32_t slot);
|
||||
int oai_fapi_ul_tti_req(nfapi_nr_ul_tti_request_t *ul_tti_req);
|
||||
|
||||
@@ -114,10 +114,10 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
|
||||
void *pPackedBuf,
|
||||
void *pDataBuf,
|
||||
uint32_t packedBufLen,
|
||||
uint32_t dataBufLen,
|
||||
int32_t dataBufLen,
|
||||
nfapi_p7_codec_config_t *config,
|
||||
nfapi_vnf_p7_config_t *p7_config,
|
||||
uint32_t *data_len)
|
||||
int32_t *data_len)
|
||||
{
|
||||
if (pMessageBuf == NULL || pPackedBuf == NULL) {
|
||||
NFAPI_TRACE(NFAPI_TRACE_ERROR, "P7 Pack supplied pointers are null\n");
|
||||
@@ -130,7 +130,7 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
|
||||
uint8_t *pPackedDataField = &pDataPackedMessage[0];
|
||||
uint8_t *pPackedDataFieldStart = &pDataPackedMessage[0];
|
||||
uint8_t **ppWriteData = &pPackedDataField;
|
||||
const uint32_t dataBufLen32 = (dataBufLen + 3) / 4;
|
||||
const int32_t dataBufLen32 = (dataBufLen + 3) / 4;
|
||||
nfapi_nr_tx_data_request_t *pNfapiMsg = (nfapi_nr_tx_data_request_t *)pMessageHeader;
|
||||
// Actual payloads are packed in a separate buffer
|
||||
for (int i = 0; i < pNfapiMsg->Number_of_PDUs; i++) {
|
||||
@@ -180,40 +180,67 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
|
||||
return (int32_t)(pMessageHeader->message_length);
|
||||
}
|
||||
|
||||
|
||||
bool aerial_nr_send_p7_message(vnf_p7_t *vnf_p7, nfapi_nr_p7_message_header_t *header)
|
||||
{
|
||||
uint8_t FAPI_buffer[1024 * 64];
|
||||
// Common to both cases, we can set it now
|
||||
// In most cases we don't need the data pool, only the CPU_MSG
|
||||
nv_ipc_msg_t send_msg = {.msg_id = header->message_id, .data_pool = NV_IPC_MEMPOOL_CPU_MSG, .cell_id = 0};
|
||||
// Check if TX_DATA request, if true, need to pack to data_buf
|
||||
if (header->message_id == NFAPI_NR_PHY_MSG_TYPE_TX_DATA_REQUEST) {
|
||||
// for this we need the secondary CPU_DATA pool
|
||||
send_msg.data_pool = NV_IPC_MEMPOOL_CPU_DATA;
|
||||
// Allocate the message after setting the data pool
|
||||
if (!allocate_msg(&send_msg)) {
|
||||
LOG_E(NFAPI_VNF, "Error in allocating nvipc message\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
nfapi_nr_tx_data_request_t *pNfapiMsg = (nfapi_nr_tx_data_request_t *)header;
|
||||
uint64_t size = 0;
|
||||
for (int i = 0; i < pNfapiMsg->Number_of_PDUs; ++i) {
|
||||
size += pNfapiMsg->pdu_list[i].PDU_length;
|
||||
}
|
||||
AssertFatal(size <= 1024 * 1024 * 2, "Message data larger than available buffer, tried to pack %" PRId64, size);
|
||||
uint8_t FAPI_data_buffer[1024 * 1024 * 2]; // 2MB
|
||||
uint32_t data_len = 0;
|
||||
AssertFatal(size <= get_cpu_data_buf_size(), "Message data larger than available buffer, tried to pack %" PRId64, size);
|
||||
int32_t data_len = 0;
|
||||
int32_t len_FAPI = aerial_pack_tx_data_request(header,
|
||||
FAPI_buffer,
|
||||
FAPI_data_buffer,
|
||||
sizeof(FAPI_buffer),
|
||||
sizeof(FAPI_data_buffer),
|
||||
send_msg.msg_buf,
|
||||
send_msg.data_buf,
|
||||
get_cpu_msg_buf_size(),
|
||||
get_cpu_data_buf_size(),
|
||||
&vnf_p7->_public.codec_config,
|
||||
((nfapi_vnf_p7_config_t *)vnf_p7),
|
||||
&data_len);
|
||||
|
||||
// Set both lengths
|
||||
send_msg.msg_len = len_FAPI + 8; // adding 8 to account for the size of the FAPI header
|
||||
send_msg.data_len = data_len;
|
||||
|
||||
if (len_FAPI <= 0) {
|
||||
LOG_E(NFAPI_VNF, "Problem packing TX_DATA_request\n");
|
||||
release_msg(&send_msg);
|
||||
return false;
|
||||
} else {
|
||||
return aerial_send_P7_msg_with_data(FAPI_buffer, len_FAPI, FAPI_data_buffer, data_len, header) == 0;
|
||||
}
|
||||
// Send
|
||||
return send_nvipc_msg(&send_msg);
|
||||
} else {
|
||||
// Create and send FAPI P7 message
|
||||
int len_FAPI = ((nfapi_vnf_p7_config_t *)vnf_p7)->pack_func(header,
|
||||
FAPI_buffer,
|
||||
sizeof(FAPI_buffer),
|
||||
&vnf_p7->_public.codec_config);
|
||||
return aerial_send_P7_msg(FAPI_buffer, len_FAPI, header) == 0;
|
||||
send_msg.data_len = 0;
|
||||
send_msg.data_buf = NULL;
|
||||
// Allocate the message
|
||||
if (!allocate_msg(&send_msg)) {
|
||||
LOG_E(NFAPI_VNF, "Error in allocating nvipc message\n");
|
||||
return false;
|
||||
}
|
||||
// Pack directly into it
|
||||
nfapi_vnf_p7_config_t* p7_config = (nfapi_vnf_p7_config_t *)vnf_p7;
|
||||
int len_FAPI = p7_config->pack_func(header, send_msg.msg_buf, get_cpu_msg_buf_size(), &vnf_p7->_public.codec_config);
|
||||
if (len_FAPI <= 0) {
|
||||
LOG_E(NFAPI_VNF, "Problem packing message 0x%02x\n", header->message_id);
|
||||
release_msg(&send_msg);
|
||||
return false;
|
||||
}
|
||||
// Set the length
|
||||
send_msg.msg_len = len_FAPI + 8; // adding 8 to account for the size of the FAPI header
|
||||
// Send
|
||||
return send_nvipc_msg(&send_msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user