From 2d70cec6ddef08fbb0a7e3853d8a8718af819b5c Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 25 Jul 2025 14:41:30 +0200 Subject: [PATCH 01/33] Remove autotools definitions They do not seem to be used anywhere (I grepped). --- CMakeLists.txt | 3 --- 1 file changed, 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 058bfd7a39..e996e633b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,9 +173,6 @@ else () set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -march=armv8.2-a") endif() -# add autotools definitions that were maybe used! -add_definitions(-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_ARPA_INET_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_SOCKET_H=1 -DHAVE_STRERROR=1 -DHAVE_SOCKET=1 -DHAVE_MEMSET=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_LIBSCTP) - # we need -rdynamic to incorporate all symbols in shared objects, see man page set(commonOpts "-pipe -fPIC -Wall -fno-strict-aliasing -rdynamic") # GNU C/C++ Compiler might throw many warnings without packed-bitfield-compat, see man page From d5bf702f10fa47ebb3c6f9892cb7b750f9b2885f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 25 Jul 2025 14:41:03 +0200 Subject: [PATCH 02/33] Remove CMakeLists.txt author information Author information can be inferred from git blame. --- CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e996e633b4..1bbed7918b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,8 +19,6 @@ # * contact@openairinterface.org # */ -# Author: laurent THOMAS, Lionel GAUTHIER - cmake_minimum_required (VERSION 3.16) project (OpenAirInterface LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 17) From acb6f05a6d679245279d85604008a90e6c7b2ab7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 15 Sep 2025 09:17:19 +0200 Subject: [PATCH 03/33] Remove include_directories() for non-existing directories --- CMakeLists.txt | 6 ------ 1 file changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bbed7918b..5f7c520a0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -544,7 +544,6 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) include_directories("${OPENAIR_DIR}/executables") include_directories("${OPENAIR2_DIR}/COMMON") include_directories("${OPENAIR2_DIR}/UTIL") -include_directories("${OPENAIR2_DIR}/UTIL/LOG") include_directories("${OPENAIR3_DIR}/COMMON") include_directories("${OPENAIR3_DIR}/UTILS") include_directories("${NFAPI_DIR}/nfapi/public_inc") @@ -585,12 +584,7 @@ include_directories("${OPENAIR3_DIR}/ocp-gtpu") include_directories("${OPENAIR3_DIR}/M3AP") include_directories("${OPENAIR3_DIR}/MME_APP") include_directories("${OPENAIR_DIR}/radio/COMMON") -include_directories("${OPENAIR2_DIR}/UTIL/OSA") -include_directories("${OPENAIR2_DIR}/UTIL/MEM") -include_directories("${OPENAIR2_DIR}/UTIL/LISTS") -include_directories("${OPENAIR2_DIR}/UTIL/FIFO") include_directories("${OPENAIR2_DIR}/UTIL/MATH") -include_directories("${OPENAIR2_DIR}/UTIL/TIMER") include_directories("${OPENAIR2_DIR}/UTIL/OTG") include_directories("${OPENAIR2_DIR}/UTIL/OPT") include_directories("${OPENAIR_DIR}") From ada7eb8b2a6e1c6d02833a51bb4dbaf41444d587 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 19 Dec 2024 21:38:22 +0100 Subject: [PATCH 04/33] Remove unused/non-compiling test stub --- CMakeLists.txt | 4 ---- openair2/NR_PHY_INTERFACE/nfapi_5g_test.c | 21 --------------------- 2 files changed, 25 deletions(-) delete mode 100644 openair2/NR_PHY_INTERFACE/nfapi_5g_test.c diff --git a/CMakeLists.txt b/CMakeLists.txt index 5f7c520a0c..d993a8d09a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1715,10 +1715,6 @@ add_library(minimal_lib ) target_link_libraries(minimal_lib PUBLIC pthread dl ${T_LIB} LOG) -add_executable(nfapi_test - ${OPENAIR_DIR}/openair2/NR_PHY_INTERFACE/nfapi_5g_test.c - ) - add_executable(measurement_display ${OPENAIR_DIR}/common/utils/threadPool/measurement_display.c) target_link_libraries (measurement_display minimal_lib) diff --git a/openair2/NR_PHY_INTERFACE/nfapi_5g_test.c b/openair2/NR_PHY_INTERFACE/nfapi_5g_test.c deleted file mode 100644 index 5d2cf18974..0000000000 --- a/openair2/NR_PHY_INTERFACE/nfapi_5g_test.c +++ /dev/null @@ -1,21 +0,0 @@ - - -//openair2/NR_PHY_INTERFACE/nfapi_5g_test.c -#include "nfapi_nr_interface_scf.h" - -#include // for printf - -int main ( int argc, char** argv) -{ - nfapi_nr_cell_param_t nfapi_nr_cell_param_test; - nfapi_nr_param_tlv_t tlvs_to_report_list; - - nfapi_nr_cell_param_test.config_tlvs_to_report_list = &tlvs_to_report_list; - nfapi_nr_cell_param_test.phy_state = 0; - nfapi_nr_cell_param_test.release_capability = 0; - nfapi_nr_cell_param_test.skip_blank_dl_config = 0; - nfapi_nr_cell_param_test.skip_blank_ul_config = 0; - - printf(" test nfapi \n"); - return 0; -} From b2fce659e8d6301d1b64e787a83cf1a02f03d464 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 19 Dec 2024 22:00:03 +0100 Subject: [PATCH 05/33] Fix warning for wrong printf format specifier MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit common/utils/threadPool/measurement_display.c:55:14 warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘long long unsigned int’ [-Wformat=] --- common/utils/threadPool/measurement_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/utils/threadPool/measurement_display.c b/common/utils/threadPool/measurement_display.c index cf2febaf33..8e44beb949 100644 --- a/common/utils/threadPool/measurement_display.c +++ b/common/utils/threadPool/measurement_display.c @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) { while ( 1 ) { if ( read(fd,&doneRequest, sizeof(doneRequest)) == sizeof(doneRequest)) { - printf("%lu" SEP "%lu" SEP "%lu" SEP "%lu" "\n", + printf("%lu" SEP "%llu" SEP "%llu" SEP "%llu" "\n", doneRequest.key, (doneRequest.startProcessingTime-doneRequest.creationTime)/cpuCyclesMicroSec, (doneRequest.endProcessingTime-doneRequest.startProcessingTime)/cpuCyclesMicroSec, From 252b19cddbbbb641bd08700ef295e793f4e00786 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 19 Dec 2024 22:42:38 +0100 Subject: [PATCH 06/33] Make rftest compile uniqCfg is in minimal_lib, so not necessary. Remove non-existant struct members. --- openair1/PHY/TOOLS/calibration_test.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/openair1/PHY/TOOLS/calibration_test.c b/openair1/PHY/TOOLS/calibration_test.c index f69e468e7b..1d8e64ee90 100644 --- a/openair1/PHY/TOOLS/calibration_test.c +++ b/openair1/PHY/TOOLS/calibration_test.c @@ -28,7 +28,6 @@ char *uecap_file; int read_recplayconfig(recplay_conf_t **recplay_conf, recplay_state_t **recplay_state) {return 0;} void nfapi_setmode(nfapi_mode_t nfapi_mode) {} void set_taus_seed(unsigned int seed_init){}; -configmodule_interface_t *uniqCfg = NULL; int main(int argc, char **argv) { ///static configuration for NR at the moment if ((uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY)) == NULL) { @@ -60,8 +59,6 @@ int main(int argc, char **argv) { openair0_config_t openair0_cfg= { //! Module ID for this configuration .Mod_id=0, - //! device log level - .log_level=0, //! duplexing mode .duplex_mode=0, //! number of downlink resource blocks @@ -130,8 +127,6 @@ int main(int argc, char **argv) { .recplay_conf=NULL, //! number of samples per tti .samples_per_tti=0, - //! check for threequarter sampling rate - .threequarter_fs=0, }; //----------------------- openair0_device rfdevice= { From 124debc2c77cb3ad74d2630e4ed76abb59daba81 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 19 Dec 2024 23:51:37 +0100 Subject: [PATCH 07/33] Fix warnings in rftest executable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit warning: ‘genericPowerPerAntena’ defined but not used [-Wunused-function] warning: ‘graph.text’ is used uninitialized [-Wuninitialized] warning: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’ [-Wunused-result] --- openair1/PHY/TOOLS/calibration_scope.c | 14 ++++++++++---- openair1/PHY/TOOLS/calibration_test.c | 9 +++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/openair1/PHY/TOOLS/calibration_scope.c b/openair1/PHY/TOOLS/calibration_scope.c index 6d7723d6d4..c7a305ab27 100644 --- a/openair1/PHY/TOOLS/calibration_scope.c +++ b/openair1/PHY/TOOLS/calibration_scope.c @@ -99,8 +99,9 @@ static void commonGraph(OAIgraph_t *graph, int type, FL_Coord x, FL_Coord y, FL_ } static OAIgraph_t calibrationCommonGraph( void (*funct) (OAIgraph_t *graph, calibData_t *context), - int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, FL_COLOR pointColor) { - OAIgraph_t graph; + int type, FL_Coord x, FL_Coord y, FL_Coord w, FL_Coord h, const char *label, FL_COLOR pointColor) +{ + OAIgraph_t graph = {0}; commonGraph(&graph, type, x, y, w, h, label, pointColor); graph.funct=funct; return graph; @@ -236,7 +237,9 @@ static void genericWaterFall (OAIgraph_t *graph, scopeSample_t *values, const in graph->iteration++; } -static void genericPowerPerAntena(OAIgraph_t *graph, const int nb_ant, const scopeSample_t **data, const int len) { +__attribute__((unused)) +static void genericPowerPerAntena(OAIgraph_t *graph, const int nb_ant, const scopeSample_t **data, const int len) +{ float *values, *time; oai_xygraph_getbuff(graph, &time, &values, len, 0); @@ -263,7 +266,10 @@ static void gNBfreqWaterFall (OAIgraph_t *graph, calibData_t *context) { 0, 0, "X axis:one frame in time"); } -static void timeResponse (OAIgraph_t *graph, calibData_t *context) { + +__attribute__((unused)) +static void timeResponse (OAIgraph_t *graph, calibData_t *context) +{ #if 0 const int len=2*phy_vars_gnb->frame_parms.ofdm_symbol_size; float *values, *time; diff --git a/openair1/PHY/TOOLS/calibration_test.c b/openair1/PHY/TOOLS/calibration_test.c index 1d8e64ee90..4d88ab542a 100644 --- a/openair1/PHY/TOOLS/calibration_test.c +++ b/openair1/PHY/TOOLS/calibration_test.c @@ -314,8 +314,13 @@ int main(int argc, char **argv) { rfdevice.trx_start_func(&rfdevice); while(!oai_exit) { - for (int i=0; i Date: Thu, 19 Dec 2024 22:45:50 +0100 Subject: [PATCH 08/33] CMakeLists.txt: comment out sims that don't compile --- CMakeLists.txt | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d993a8d09a..9aeb1851d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1930,14 +1930,14 @@ target_link_libraries(nr-uesoftmodem PRIVATE ##################################### #special case for dlim TM4, which uses its own version of phy_scope code -add_executable(dlsim_tm4 - ${OPENAIR1_DIR}/SIMULATION/LTE_PHY/dlsim_tm4.c - ${OPENAIR1_DIR}/PHY/TOOLS/lte_phy_scope_tm4.c - ) -target_link_libraries (dlsim_tm4 - -Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY ITTI -Wl,--end-group - pthread m rt CONFIG_LIB ${T_LIB} - ) +#add_executable(dlsim_tm4 +# ${OPENAIR1_DIR}/SIMULATION/LTE_PHY/dlsim_tm4.c +# ${OPENAIR1_DIR}/PHY/TOOLS/lte_phy_scope_tm4.c +# ) +#target_link_libraries (dlsim_tm4 +# -Wl,--start-group SIMU UTIL SCHED_LIB SCHED_RU_LIB PHY ITTI -Wl,--end-group +# pthread m rt CONFIG_LIB ${T_LIB} +# ) add_executable(rftest ${OPENAIR_DIR}/openair1/PHY/TOOLS/calibration_test.c @@ -2062,7 +2062,9 @@ target_link_libraries(nr_ulsim PRIVATE ) target_link_libraries(nr_ulsim PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) -foreach(myExe dlsim dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim) +# 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 From a31838acd72150f1684b6931b87704f456269d2b Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 19 Dec 2024 22:45:59 +0100 Subject: [PATCH 09/33] CMakeLists.txt: comment out tests that don't compile --- CMakeLists.txt | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9aeb1851d7..66c6fe20b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2084,22 +2084,23 @@ endforeach(myExe) #unitary tests for Core NEtwork pieces ################################# -foreach(myExe s1ap - secu_knas_encrypt_eia1 - secu_kenb - aes128_ctr - secu_knas_encrypt_eea2 - secu_knas secu_knas_encrypt_eea1 - kdf - aes128_cmac_encrypt - secu_knas_encrypt_eia2) - add_executable(test_${myExe} - ${OPENAIR3_DIR}/TEST/test_${myExe}.c - ) - target_link_libraries (test_${myExe} - -Wl,--start-group SECURITY UTIL -Wl,--end-group m rt CONFIG_LIB - ) -endforeach(myExe) +#foreach(myExe +# s1ap +# secu_knas_encrypt_eia1 +# secu_kenb +# aes128_ctr +# secu_knas_encrypt_eea2 +# secu_knas secu_knas_encrypt_eea1 +# kdf +# aes128_cmac_encrypt +# secu_knas_encrypt_eia2) +# add_executable(test_${myExe} +# ${OPENAIR3_DIR}/TEST/test_${myExe}.c +# ) +# target_link_libraries (test_${myExe} +# -Wl,--start-group SECURITY UTIL -Wl,--end-group m rt CONFIG_LIB +# ) +#endforeach(myExe) #ensure that the T header files are generated before targets depending on them if (${T_TRACER}) From d6c29b2d2c4a17f22a082df56b78de026c67ec9a Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 16 Sep 2025 08:12:23 +0200 Subject: [PATCH 10/33] Fix E2_AGENT linking w.r.t. simulators Link E2_AGENT libraries directly into nr-softmodem/lte-softmodem instead of L2/L2_NR/F1AP. Doing that ensures that simulators, e.g., nr_dlsim/nr_ulsim do still compile. It also simplifies the code. Prior to this, compiling nr_ulsim with E2_AGENT, for instance, resulted in the following errors, fixed in this commit: FAILED: nr_ulsim /usr/bin/ld: openair2/E2AP/RAN_FUNCTION/libe2_ran_func_du_cucp_cuup.a(ran_func_rc.c.o): in function `send_aper_ric_ind': /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643: (.text+0xee6): undefined reference to `async_event_agent_api' /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x11ca): undefined reference to `async_event_agent_api' /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x1485): undefined reference to `async_event_agent_api' /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x159c): undefined reference to `async_event_agent_api' /usr/bin/ld: /home/oai/robert/cleanup-t-dependency-cmake/openair2/E2AP/RAN_FUNCTION/O-RAN/ran_func_rc.c:643:(.text+0x16b1): undefined reference to `async_event_agent_api' [...] --- CMakeLists.txt | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 66c6fe20b1..9a865728a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -464,9 +464,6 @@ 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_include_directories(f1ap PRIVATE ${F1AP_DIR}/lib) -if(E2_AGENT) - target_compile_definitions(f1ap PRIVATE E2_AGENT) -endif() # LPP ############## @@ -1306,12 +1303,6 @@ add_library(L2 target_link_libraries(L2 PRIVATE x2ap s1ap lte_rrc m2ap) target_link_libraries(L2 PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) -if(E2_AGENT) - target_link_libraries(L2 PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup) - target_compile_definitions(L2 PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT) -endif() - - add_library(MAC_UE_NR ${MAC_NR_SRC_UE}) target_link_libraries(MAC_UE_NR PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs PUBLIC nr_ue_power_procedures nr_ue_ra_procedures) @@ -1338,10 +1329,6 @@ target_link_libraries(L2_NR PRIVATE f1ap x2ap s1ap ngap nr_rrc e1ap nr_rlc nr_co if(OAI_AERIAL) target_compile_definitions(L2_NR PRIVATE ENABLE_AERIAL) endif() -if(E2_AGENT) - target_link_libraries(L2_NR PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup) - target_compile_definitions(L2_NR PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT) -endif() add_library(L2_LTE_NR # temporary solution until 4G/5G code completely untangled (as evidenced by deletion of the following file) @@ -1754,6 +1741,7 @@ 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) target_compile_definitions(lte-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT) endif() @@ -1857,6 +1845,7 @@ if (OAI_AERIAL) target_link_libraries(nr-softmodem PUBLIC aerial_lib) endif() if(E2_AGENT) + target_link_libraries(nr-softmodem PUBLIC e2_agent e2_agent_arg e2_ran_func_du_cucp_cuup) target_compile_definitions(nr-softmodem PRIVATE ${E2AP_VERSION} ${KPM_VERSION} E2_AGENT) endif() From 1a5e2598a3e76beda7bfe5c274cf24e2e693bfa4 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 12 Sep 2025 12:10:17 +0200 Subject: [PATCH 11/33] Move LTTng check to subdirectory where used --- CMakeLists.txt | 5 ----- common/utils/LOG/CMakeLists.txt | 3 +++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a865728a9..a72cc93823 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -609,11 +609,6 @@ add_library(UTIL ${OPENAIR_DIR}/common/utils/LOG/vcd_signal_dumper.c ${OPENAIR2_DIR}/UTIL/OPT/probe.c ) -if (ENABLE_LTTNG) - find_package(LTTngUST 2.3.8 EXACT REQUIRED) -else() - message(STATUS "LTTNG support disabled") -endif() pkg_check_modules(cap libcap) if (cap_FOUND) diff --git a/common/utils/LOG/CMakeLists.txt b/common/utils/LOG/CMakeLists.txt index ff224329de..6c4527f760 100644 --- a/common/utils/LOG/CMakeLists.txt +++ b/common/utils/LOG/CMakeLists.txt @@ -4,7 +4,10 @@ target_link_libraries(log_headers INTERFACE T_headers) set(log_sources log.c) if (ENABLE_LTTNG) + find_package(LTTngUST 2.3.8 EXACT REQUIRED) set(log_sources ${log_sources} lttng-tp.c) +else() + message(STATUS "LTTNG support disabled") endif() add_library(LOG ${log_sources}) target_include_directories(LOG PUBLIC .) From a68168805b3837346bd6f7d60d13961233a073d8 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 19 Dec 2024 23:11:44 +0100 Subject: [PATCH 12/33] Remove NB-IoT configuration Remove, because 1) it does not compile (the asn1c generated code should be prepend with LTE_ etc, nobody did that) 2) a shared module makes no sense 3) the configuration is trivial to recreate --- CMakeLists.txt | 5 - openair2/ENB_APP/NB_IoT_config.c | 252 ------------------ openair2/ENB_APP/NB_IoT_config.h | 37 --- openair2/ENB_APP/NB_IoT_paramdef.h | 405 ----------------------------- 4 files changed, 699 deletions(-) delete mode 100644 openair2/ENB_APP/NB_IoT_config.c delete mode 100644 openair2/ENB_APP/NB_IoT_config.h delete mode 100644 openair2/ENB_APP/NB_IoT_paramdef.h diff --git a/CMakeLists.txt b/CMakeLists.txt index a72cc93823..350b66afa9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1653,12 +1653,7 @@ include_directories(${NAS_SRC}UE/EMM/SAP) include_directories(${NAS_SRC}UE/ESM) include_directories(${NAS_SRC}UE/ESM/SAP) -# nbiot add_definitions("-DNUMBER_OF_UE_MAX_NB_IoT=16") -set (NBIOT_SOURCES - ${OPENAIR2_DIR}/ENB_APP/NB_IoT_config.c - ) -add_library(NB_IoT MODULE ${NBIOT_SOURCES} ) # Simulation library ########################## diff --git a/openair2/ENB_APP/NB_IoT_config.c b/openair2/ENB_APP/NB_IoT_config.c deleted file mode 100644 index e6fe6e5d71..0000000000 --- a/openair2/ENB_APP/NB_IoT_config.c +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/* - nbiot_config.c - ------------------- - AUTHOR : Francois Taburet - COMPANY : NOKIA - EMAIL : francois.taburet@nokia-bell-labs.com -*/ - -#include -#include - -#include "log.h" -#include "assertions.h" -#include "intertask_interface.h" -#include "s1ap_eNB.h" -#include "sctp_eNB_task.h" -#include "SystemInformationBlockType2.h" - -#include "PHY/phy_extern.h" -#include "radio/ETHERNET/ethernet_lib.h" -#include "common/config/config_userapi.h" -#include "RRC_config_tools.h" -#include "RRC_paramsvalues.h" -#include "NB_IoT_paramdef.h" -#include "L1_paramdef.h" -#include "MACRLC_paramdef.h" -#include "LAYER2/MAC/proto_NB_IoT.h" - - -void RCconfig_NbIoTL1(void) { - paramdef_t NbIoT_L1_Params[] = L1PARAMS_DESC; - paramlist_def_t NbIoT_L1_ParamList = {NBIOT_L1LIST_CONFIG_STRING,NULL,0}; - /* No component carrier for NbIoT, ignore number of CC */ - // NbIoT_L1_Params[L1_CC_IDX ].paramflags = PARAMFLAG_DONOTREAD; - config_getlist(&NbIoT_L1_ParamList, NbIoT_L1_Params, sizeofArray(NbIoT_L1_Params), NULL); - - if (NbIoT_L1_ParamList.numelt > 0) { - if (RC.L1_NB_IoT == NULL) { - RC.L1_NB_IoT = (PHY_VARS_eNB_NB_IoT **)malloc(RC.nb_nb_iot_L1_inst*sizeof(PHY_VARS_eNB_NB_IoT *)); - LOG_I(PHY,"RC.L1_NB_IoT = %p\n",RC.L1_NB_IoT); - memset(RC.L1_NB_IoT,0,RC.nb_nb_iot_L1_inst*sizeof(PHY_VARS_eNB_NB_IoT *)); - } - - for(int j = 0; j eth_params_n.local_if_name = strdup(*(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_IF_NAME_IDX].strptr)); - RC.L1_NB_IoT[j]->eth_params_n.my_addr = strdup(*(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_ADDRESS_IDX].strptr)); - RC.L1_NB_IoT[j]->eth_params_n.remote_addr = strdup(*(NbIoT_L1_ParamList.paramarray[j][L1_REMOTE_N_ADDRESS_IDX].strptr)); - RC.L1_NB_IoT[j]->eth_params_n.my_portc = *(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_PORTC_IDX].iptr); - RC.L1_NB_IoT[j]->eth_params_n.remote_portc = *(NbIoT_L1_ParamList.paramarray[j][L1_REMOTE_N_PORTC_IDX].iptr); - RC.L1_NB_IoT[j]->eth_params_n.my_portd = *(NbIoT_L1_ParamList.paramarray[j][L1_LOCAL_N_PORTD_IDX].iptr); - RC.L1_NB_IoT[j]->eth_params_n.remote_portd = *(NbIoT_L1_ParamList.paramarray[j][L1_REMOTE_N_PORTD_IDX].iptr); - RC.L1_NB_IoT[j]->eth_params_n.transp_preference = ETH_UDP_MODE; - } else { // other midhaul - } - }// j=0..num_inst - - printf("Initializing northbound interface for NB-IoT L1\n"); - l1_north_init_NB_IoT(); - } else { - LOG_I(PHY,"No " NBIOT_L1LIST_CONFIG_STRING " configuration found"); - } -} - -void RCconfig_NbIoTmacrlc(void) { - paramdef_t NbIoT_MacRLC_Params[] = MACRLCPARAMS_DESC; - paramlist_def_t NbIoT_MacRLC_ParamList = {NBIOT_MACRLCLIST_CONFIG_STRING,NULL,0}; - /* No component carrier for NbIoT, ignore number of CC */ - // NbIoT_MacRLC_Params[MACRLC_CC_IDX ].paramflags = PARAMFLAG_DONOTREAD; - config_getlist(&NbIoT_MacRLC_ParamList, NbIoT_MacRLC_Params, sizeofArray(NbIoT_MacRLC_Params), NULL); - - if ( NbIoT_MacRLC_ParamList.numelt > 0) { - mac_top_init_eNB_NB_IoT(); - - for (int j=0; jeth_params_n.local_if_name = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_IF_NAME_IDX].strptr)); - RC.nb_iot_mac[j]->eth_params_n.my_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_ADDRESS_IDX].strptr)); - RC.nb_iot_mac[j]->eth_params_n.remote_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_ADDRESS_IDX].strptr)); - RC.nb_iot_mac[j]->eth_params_n.my_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTC_IDX].iptr); - RC.nb_iot_mac[j]->eth_params_n.remote_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTC_IDX].iptr); - RC.nb_iot_mac[j]->eth_params_n.my_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_N_PORTD_IDX].iptr); - RC.nb_iot_mac[j]->eth_params_n.remote_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_N_PORTD_IDX].iptr);; - RC.nb_iot_mac[j]->eth_params_n.transp_preference = ETH_UDP_MODE; - } else { // other midhaul - AssertFatal(1==0,"MACRLC %d: %s unknown northbound midhaul\n",j, *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_N_PREFERENCE_IDX].strptr)); - } - - if (strcmp(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_L1") == 0) { - } else if (strcmp(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr), "nfapi") == 0) { - RC.nb_iot_mac[j]->eth_params_s.local_if_name = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_IF_NAME_IDX].strptr)); - RC.nb_iot_mac[j]->eth_params_s.my_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_ADDRESS_IDX].strptr)); - RC.nb_iot_mac[j]->eth_params_s.remote_addr = strdup(*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_ADDRESS_IDX].strptr)); - RC.nb_iot_mac[j]->eth_params_s.my_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTC_IDX].iptr); - RC.nb_iot_mac[j]->eth_params_s.remote_portc = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTC_IDX].iptr); - RC.nb_iot_mac[j]->eth_params_s.my_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_LOCAL_S_PORTD_IDX].iptr); - RC.nb_iot_mac[j]->eth_params_s.remote_portd = *(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr); - RC.nb_iot_mac[j]->eth_params_s.transp_preference = ETH_UDP_MODE; - } else { // other midhaul - AssertFatal(1==0,"MACRLC %d: %s unknown southbound midhaul\n",j,*(NbIoT_MacRLC_ParamList.paramarray[j][MACRLC_TRANSPORT_S_PREFERENCE_IDX].strptr)); - } - }// j=0..num_inst */ - } else {// MacRLC_ParamList.numelt > 0 - AssertFatal (0, - "No " NBIOT_MACRLCLIST_CONFIG_STRING " configuration found"); - } -} - - - - -int RCconfig_NbIoTRRC(MessageDef *msg_p, int nbiotrrc_id,eNB_RRC_INST_NB_IoT *nbiotrrc) { - char instprefix[MAX_OPTNAME_SIZE*3 + 32]; - checkedparam_t NBIoTCheckParams[] = NBIOT_RRCPARAMS_CHECK_DESC_0_14; - checkedparam_t NBIoTCheckParamsB[] = NBIOT_RRCPARAMS_CHECK_DESC_15_end; - paramdef_t NBIoTParams[] = NBIOTRRCPARAMS_DESC; - paramdef_t NBIoTPrachParams[] = NBIOTRRC_NPRACH_PARAMS_DESC; - checkedparam_t NBIoTPrachCheckParams[] = NBIOT_RRCLIST_NPRACHPARAMSCHECK_DESC; - paramdef_t NBIoTRRCRefParams[] = NBIOTRRCPARAMS_RRCREF_DESC; - paramdef_t NBIoTLteCCParams[] = NBIOT_LTECCPARAMS_DESC; - checkedparam_t NBIoTLteCCCheckParams[] = NBIOT_LTECCPARAMS_CHECK_DESC; - - /* map parameter checking array instances to parameter definition array instances */ - for (int i = 0; i < sizeofArray(NBIoTParams) && i < sizeofArray(NBIoTCheckParams); i++) { - NBIoTParams[i].chkPptr = &(NBIoTCheckParams[i]); - } - - for (int i = 0; i < sizeofArray(NBIoTParams) && i < sizeofArray(NBIoTCheckParamsB); i++) { - NBIoTParams[i + 15].chkPptr = &(NBIoTCheckParamsB[i]); - } - - for (int i = 0; i < sizeofArray(NBIoTPrachParams) && i < sizeofArray(NBIoTPrachCheckParams); i++) { - NBIoTPrachParams[i].chkPptr = &(NBIoTPrachCheckParams[i]); - } - - /* brut force itti message fields assignment, to be redesigned with itti replacement */ - NBIoTParams[NBIOT_RACH_RARESPONSEWINDOWSIZE_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_raResponseWindowSize_NB); - NBIoTParams[NBIOT_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_macContentionResolutionTimer_NB); - NBIoTParams[NBIOT_RACH_POWERRAMPINGSTEP_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_powerRampingStep_NB); - NBIoTParams[NBIOT_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_preambleInitialReceivedTargetPower_NB); - NBIoTParams[NBIOT_RACH_PREAMBLETRANSMAX_CE_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).rach_preambleTransMax_CE_NB); - NBIoTParams[NBIOT_BCCH_MODIFICATIONPERIODCOEFF_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).bcch_modificationPeriodCoeff_NB); - NBIoTParams[NBIOT_PCCH_DEFAULTPAGINGCYCLE_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).pcch_defaultPagingCycle_NB); - NBIoTParams[NBIOT_NPRACH_CP_LENGTH_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_CP_Length); - NBIoTParams[NBIOT_NPRACH_RSRP_RANGE_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_rsrp_range); - NBIoTParams[NBIOT_MAXNUMPREAMBLEATTEMPTCE_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).maxNumPreambleAttemptCE_NB); - NBIoTParams[NBIOT_NPDSCH_NRS_POWER_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npdsch_nrs_Power); - NBIoTParams[NBIOT_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p). npusch_ack_nack_numRepetitions_NB); - NBIoTParams[NBIOT_NPUSCH_SRS_SUBFRAMECONFIG_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p). npusch_srs_SubframeConfig_NB); - NBIoTParams[NBIOT_NPUSCH_THREETONE_CYCLICSHIFT_R13_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_threeTone_CyclicShift_r13); - NBIoTParams[NBIOT_NPUSCH_SIXTONE_CYCLICSHIFT_R13_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_sixTone_CyclicShift_r13); - NBIoTParams[NBIOT_NPUSCH_GROUPASSIGNMENTNPUSCH_R13_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_groupAssignmentNPUSCH_r13); - NBIoTParams[NBIOT_DL_GAPTHRESHOLD_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).dl_GapThreshold_NB); - NBIoTParams[NBIOT_DL_GAPPERIODICITY_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).dl_GapPeriodicity_NB); - NBIoTParams[NBIOT_NPUSCH_P0_NOMINALNPUSCH_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_p0_NominalNPUSCH); - NBIoTParams[NBIOT_DELTAPREAMBLEMSG3_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).deltaPreambleMsg3); - NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T300_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t300_NB); - NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T301_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t301_NB); - NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T310_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t310_NB); - NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_T311_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_t311_NB); - NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_N310_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n310_NB); - NBIoTParams[NBIOT_UE_TIMERSANDCONSTANTS_N311_NB_IDX].uptr = (uint32_t *)&(NBIOTRRC_CONFIGURATION_REQ (msg_p).ue_TimersAndConstants_n311_NB); - sprintf(instprefix, NBIOT_RRCLIST_CONFIG_STRING ".[%i]",nbiotrrc_id); - config_get( NBIoTParams,sizeofArray(NBIoTParams),instprefix); - NBIOTRRC_CONFIGURATION_REQ (msg_p).nprach_SubcarrierMSG3_RangeStart = config_get_processedint(config_get_if(), &(NBIoTParams[NBIOT_NPRACH_SUBCARRIERMSG3_RANGESTART_IDX]) ); - NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_groupHoppingEnabled = config_get_processedint(config_get_if(), &(NBIoTParams[NBIOT_NPUSCH_GROUPHOPPINGENABLED_IDX] ) ); - NBIOTRRC_CONFIGURATION_REQ (msg_p).dl_GapDurationCoeff_NB = config_get_processedint(config_get_if(), &(NBIoTParams[NBIOT_DL_GAPDURATIONCOEFF_NB_IDX] ) ); - NBIOTRRC_CONFIGURATION_REQ (msg_p).npusch_alpha = config_get_processedint(config_get_if(), &(NBIoTParams[NBIOT_NPUSCH_ALPHA_IDX] ) ); - - for (int i=0; inb_nb_iot_rrc_inst = NbIoT_ParamList.numelt; - config_getlist( &NbIoT_MACRLCParamList,NULL,0, NULL); - RC->nb_nb_iot_macrlc_inst = NbIoT_MACRLCParamList.numelt; - // Get num L1 instances - config_getlist( &NbIoT_L1ParamList,NULL,0, NULL); - RC->nb_nb_iot_L1_inst = NbIoT_L1ParamList.numelt; -} diff --git a/openair2/ENB_APP/NB_IoT_config.h b/openair2/ENB_APP/NB_IoT_config.h deleted file mode 100644 index 314fca8180..0000000000 --- a/openair2/ENB_APP/NB_IoT_config.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/* - nbiot_config.h - ------------------- - AUTHOR : Francois Taburet - COMPANY : NOKIA - EMAIL : francois.taburet@nokia-bell-labs.com -*/ -#ifndef INCLUDE_NBIOT_CONFIG_H -#define INCLUDE_NBIOT_CONFIG_H - - -extern void RCconfig_NbIoTL1(void) ; -extern void RCconfig_NbIoTmacrlc(void); -extern int RCconfig_NbIoTRRC(MessageDef *msg_p, int nbiotrrc_id,eNB_RRC_INST_NB_IoT *nbiotrrc); -extern void RCConfig_NbIoT(RAN_CONTEXT_t *RC); -#endif diff --git a/openair2/ENB_APP/NB_IoT_paramdef.h b/openair2/ENB_APP/NB_IoT_paramdef.h deleted file mode 100644 index 8778f6d2e4..0000000000 --- a/openair2/ENB_APP/NB_IoT_paramdef.h +++ /dev/null @@ -1,405 +0,0 @@ -/* - * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The OpenAirInterface Software Alliance licenses this file to You under - * the OAI Public License, Version 1.1 (the "License"); you may not use this file - * except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.openairinterface.org/?page_id=698 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - *------------------------------------------------------------------------------- - * For more information about the OpenAirInterface (OAI) Software Alliance: - * contact@openairinterface.org - */ - -/*! \file openair2/ENB_APP/enb_paramdef.f - * \brief definition of configuration parameters for all eNodeB modules - * \author Francois TABURET - * \date 2017 - * \version 0.1 - * \company NOKIA BellLabs France - * \email: francois.taburet@nokia-bell-labs.com - * \note - * \warning - */ - -#ifndef __ENB_APP_NB_IOT_PARAMDEF__H__ -#define __ENB_APP_NB_IOT_PARAMDEF__H__ - -#include "common/config/config_paramdesc.h" -#include "SystemInformationBlockType2.h" -#include "DL-GapConfig-NB-r13.h" -#include "NPRACH-Parameters-NB-r13.h" -#include "PowerRampingParameters.h" -#include "BCCH-Config-NB-r13.h" -#include "PCCH-Config-NB-r13.h" -#include "ACK-NACK-NumRepetitions-NB-r13.h" -#include "TDD-Config.h" - - - - - -/* - int16_t eutra_band; - uint32_t downlink_frequency; - int32_t uplink_frequency_offset; - int16_t Nid_cell;// for testing, change later - int16_t N_RB_DL;// for testing, change later -*/ -/*-------------------------------------------------------------------------------------------------------------------*/ -/* SIB1 parameters possibly coming from LTE RRC (in band deployment) */ -/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ -/* component carriers configuration parameters */ -/* optname helpstr paramflags XXXptr defXXXval type numelt checked_param */ -/*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ -#define NBIOT_LTECCPARAMS_CHECK_DESC { \ - { .s3a= { config_checkstr_assign_integer, FRAMETYPE_OKVALUES, FRAMETYPE_MODVALUES,2}} , \ - { .s2= { config_check_intrange, TDDCONFIG_OKRANGE}}, \ - { .s2= { config_check_intrange, TDDCONFIGS_OKRANGE}}, \ - { .s3a= { config_checkstr_assign_integer, PREFIX_OKVALUES, PREFIX_MODVALUES,2}} , \ - { .s3a= { config_checkstr_assign_integer, PREFIXUL_OKVALUES, PREFIXUL_MODVALUES,2}} , \ - { .s5= {NULL }} , \ - { .s5= {NULL }} , \ - { .s5= {NULL }} , \ - { .s5= {NULL }} , \ - { .s1= { config_check_intval, NRBDL_OKVALUES,6}} , \ -} - - -#define NBIOT_LTECCPARAMS_DESC { \ -{ENB_CONFIG_STRING_FRAME_TYPE, NULL, 0, strptr:NULL, defstrval:"FDD", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_TDD_CONFIG, NULL, 0, iptr:NULL, defintval:3, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_TDD_CONFIG_S, NULL, 0, iptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_PREFIX_TYPE, NULL, 0, strptr:NULL, defstrval:"NORMAL", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_PREFIX_TYPE_UL, NULL, 0, strptr:NULL, defstrval:"NORMAL", TYPE_STRING, 0}, \ -{ENB_CONFIG_STRING_EUTRA_BAND, NULL, 0, iptr:NULL, defintval:7, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_DOWNLINK_FREQUENCY, NULL, 0, i64ptr:NULL, defint64val:2680000000, TYPE_UINT64, 0}, \ -{ENB_CONFIG_STRING_UPLINK_FREQUENCY_OFFSET, NULL, 0, iptr:NULL, defintval:-120000000, TYPE_INT, 0}, \ -{ENB_CONFIG_STRING_NID_CELL, NULL, 0, iptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{ENB_CONFIG_STRING_N_RB_DL, NULL, 0, iptr:NULL, defintval:25, TYPE_UINT, 0}, \ -} -#define LTECCPARAMS_FRAME_TYPE_IDX 0 -#define LTECCPARAMS_TDD_CONFIG_IDX 1 -#define LTECCPARAMS_TDD_CONFIG_S_IDX 2 -#define LTECCPARAMS_PREFIX_TYPE_IDX 3 -#define LTECCPARAMS_PREFIX_TYPE_UL_IDX 4 -#define LTECCPARAMS_EUTRA_BAND_IDX 5 -#define LTECCPARAMS_DOWNLINK_FREQUENCY_IDX 6 -#define LTECCPARAMS_UPLINK_FREQUENCY_OFFSET_IDX 7 -#define LTECCPARAMS_NID_CELL_IDX 8 -#define LTECCPARAMS_N_RB_DL_IDX 9 - - -/*-------------------------------------------------------------------------------------------------------------------*/ - -/* NB-Iot RRC list section name */ -#define NBIOT_RRCLIST_CONFIG_STRING "NB-IoT_RRCs" - - -#define RACH_RARESPONSEWINDOWSIZE_NB_OKVALUES {20,50,80,120,180,240,320,400} -#define PREF1(A) RACH_CE_LevelInfo_r13__ra_ResponseWindowSize_r13_ ## A -#define RACH_RARESPONSEWINDOWSIZE_NB_MODVALUES { PREF1(sf20),PREF1(sf50),PREF1(sf80),PREF1(sf120), \ - PREF1(sf180),PREF1(sf240),PREF1(sf320),PREF1(sf400) } - - -#define RACH_MACCONTENTIONRESOLUTIONTIMER_NB_OKVALUES {80,100,120,160,200,240,480,960} -#define PREF2(A) RACH_CE_LevelInfo_r13__mac_ContentionResolutionTimer_r13_ ## A -#define RACH_MACCONTENTIONRESOLUTIONTIMER_NB_MODVALUES { PREF2(sf80),PREF2(sf100),PREF2(sf120),PREF2(sf160), \ - PREF2(sf200),PREF2(sf240),PREF2(sf480),PREF2(sf960) } - - -#define RACH_POWERRAMPINGSTEP_NB_OKVALUES {0,2,4,6} -#define PREF3(A) PowerRampingParameters__powerRampingStep_ ## A -#define RACH_POWERRAMPINGSTEP_NB_MODVALUES { PREF3(dB0),PREF3(dB2),PREF3(dB4),PREF3(dB6) } - - -#define RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_OKRANGE {-120, -90} - -#define RACH_PREAMBLETRANSMAX_CE_NB_OKVALUES {3,4,5,6,7,8,10,20,50,100,200} -#define PREF4(A) PreambleTransMax_ ## A -#define RACH_PREAMBLETRANSMAX_CE_NB_MODVALUES { PREF4(n3), PREF4(n4), PREF4(n5), PREF4(n6), PREF4(n7), PREF4(n8), \ - PREF4(n10),PREF4(n20),PREF4(n50),PREF4(n100),PREF4(n200) } - -#define BCCH_MODIFICATIONPERIODCOEFF_NB_OKVALUES {16,32,64,128} -#define PREF5(A) BCCH_Config_NB_r13__modificationPeriodCoeff_r13_ ## A -#define BCCH_MODIFICATIONPERIODCOEFF_NB_MODVALUES { PREF5(n16), PREF5(n32), PREF5(n64),PREF5(n128) } - -#define PCCH_DEFAULTPAGINGCYCLE_NB_OKVALUES {128,256,512,1024} -#define PREF6(A) PCCH_Config_NB_r13__defaultPagingCycle_r13_ ## A -#define PCCH_DEFAULTPAGINGCYCLE_NB_MODVALUES { PREF6(rf128), PREF6(rf256), PREF6(rf512), PREF6(rf1024) } - -#define NPRACH_CP_LENGTH_OKVALUES {0,1} -#define NPRACH_RSRP_RANGE_OKVALUES {0,96} - -#define MSG3RANGESTART_OKVALUES {"zero","oneThird","twoThird","one"} -#define MSG3RANGESTART_MODVALUES {NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_zero, NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_oneThird, \ - NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_twoThird, NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_one} - - -#define MAXNUMPREAMBLEATTEMPTCE_OKVALUES {3,4,5,6,7,8,10} -#define MAXNUMPREAMBLEATTEMPTCE_MODVALUES { NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n3, NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n4, \ - NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n5, NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n6, \ - NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n7, NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n8, \ - NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n10 } - -#define NPDSCH_NRS_POWER_OKRANGE {-60,50} - -#define NPUSCH_ACK_NACK_NUMREPETITIONS_NB_OKVALUES {1,2,4,8,16,32,64,128} -#define PREF9(A) ACK_NACK_NumRepetitions_NB_r13_ ## A -#define NPUSCH_ACK_NACK_NUMREPETITIONS_NB_MODVALUES { PREF9(r1), PREF9(r2), PREF9(r4), PREF9(r8), \ - PREF9(r16), PREF9(r32), PREF9(r64), PREF9(r128) } - -#define NPUSCH_SRS_SUBFRAMECONFIG_NB_OKRANGE {0,15} -#define NPUSCH_THREETONE_CYCLICSHIFT_R13_OKRANGE {0,2} -#define NPUSCH_SIXTONE_CYCLICSHIFT_R13_OKRANGE {0,3} - -#define NPUSCH_GROUPHOPPINGENABLED_OKVALUES {"enable","disable"} -#define NPUSCH_GROUPHOPPINGENABLED_MODVALUES {1,0} - -#define NPUSCH_GROUPASSIGNMENTNPUSCH_R13_OKRANGE {0,29} - -#define DLGAPTHRESHOLD_OKVALUES {32,64,128,256} -#define DLGAPTHRESHOLD_MODVALUES { DL_GapConfig_NB_r13__dl_GapThreshold_r13_n32, DL_GapConfig_NB_r13__dl_GapThreshold_r13_n64, \ - DL_GapConfig_NB_r13__dl_GapThreshold_r13_n128, DL_GapConfig_NB_r13__dl_GapThreshold_r13_n256} \ - -#define DLGAPPERIODICITY_OKVALUES {64,128,256,512} -#define DLGAPPERIODICITY_MODVALUES { DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf64, DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf128, \ - DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf256,DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf512} - -#define DLGAPDURATION_OKVALUES {"oneEighth","oneFourth","threeEighth","oneHalf"} -#define DLGAPDURATION_MODVALUES {DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_oneEighth, DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_oneFourth, \ - DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_threeEighth, DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_oneHalf} - -#define NPUSCH_P0_NOMINALNPUSCH_OKRANGE {-126,24} - -#define NPUSCH_ALPHA_OKVALUES {"AL0","AL04","AL05","AL06","AL07","AL08","AL09","AL1"} -#define NPUSCH_ALPHA_MODVALUES { Alpha_r12_al0, Alpha_r12_al04, Alpha_r12_al05, Alpha_r12_al06, \ - Alpha_r12_al07, Alpha_r12_al08, Alpha_r12_al09, Alpha_r12_al1} - -#define DELTAPREAMBLEMSG3_OKRANGE {-1,6} - - - - - -#define NBIOT_RRCPARAMS_CHECK_DESC { \ - { .s1a= { config_check_modify_integer, RACH_RARESPONSEWINDOWSIZE_NB_OKVALUES, RACH_RARESPONSEWINDOWSIZE_NB_MODVALUES, 8}}, \ - { .s1a= { config_check_modify_integer, RACH_MACCONTENTIONRESOLUTIONTIMER_NB_OKVALUES, RACH_MACCONTENTIONRESOLUTIONTIMER_NB_MODVALUES, 8}}, \ - { .s1a= { config_check_modify_integer, RACH_POWERRAMPINGSTEP_NB_OKVALUES, RACH_POWERRAMPINGSTEP_NB_MODVALUES, 4}} , \ - { .s2= { config_check_intrange, RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_OKRANGE}}, \ - { .s1a= { config_check_modify_integer, RACH_PREAMBLETRANSMAX_CE_NB_OKVALUES, RACH_PREAMBLETRANSMAX_CE_NB_MODVALUES, 11}} , \ - { .s1a= { config_check_modify_integer, BCCH_MODIFICATIONPERIODCOEFF_NB_OKVALUES, BCCH_MODIFICATIONPERIODCOEFF_NB_MODVALUES, 4}} , \ - { .s1a= { config_check_modify_integer, PCCH_DEFAULTPAGINGCYCLE_NB_OKVALUES, PCCH_DEFAULTPAGINGCYCLE_NB_MODVALUES, 4}} , \ - { .s1= { NULL, NPRACH_CP_LENGTH_OKVALUES ,4}} , \ - { .s2= { config_check_intrange, NPRACH_RSRP_RANGE_OKVALUES}} , \ - { .s3a= { config_checkstr_assign_integer, MSG3RANGESTART_OKVALUES, MSG3RANGESTART_MODVALUES, 4}} , \ - { .s1a= { config_check_modify_integer, MAXNUMPREAMBLEATTEMPTCE_OKVALUES, MAXNUMPREAMBLEATTEMPTCE_MODVALUES, 7}} , \ - { .s1= { config_check_intval, NPDSCH_NRS_POWER_OKRANGE,4}} , \ - { .s1a= { config_check_modify_integer, NPUSCH_ACK_NACK_NUMREPETITIONS_NB_OKVALUES, NPUSCH_ACK_NACK_NUMREPETITIONS_NB_MODVALUES, 8}} , \ - { .s2= { config_check_intrange, NPUSCH_SRS_SUBFRAMECONFIG_NB_OKRANGE}} , \ - { .s2= { config_check_intrange, NPUSCH_THREETONE_CYCLICSHIFT_R13_OKRANGE}} , \ - { .s2= { config_check_intrange, NPUSCH_SIXTONE_CYCLICSHIFT_R13_OKRANGE}} , \ - { .s3a= { config_checkstr_assign_integer, NPUSCH_GROUPHOPPINGENABLED_OKVALUES, NPUSCH_GROUPHOPPINGENABLED_MODVALUES, 2}} , \ - { .s2= { config_check_intrange, NPUSCH_GROUPASSIGNMENTNPUSCH_R13_OKRANGE}} , \ - { .s1a= { config_check_modify_integer, DLGAPTHRESHOLD_OKVALUES, DLGAPTHRESHOLD_MODVALUES, 4}} , \ - { .s1a= { config_check_modify_integer, DLGAPPERIODICITY_OKVALUES, DLGAPPERIODICITY_MODVALUES, 4}} , \ - { .s3a= { config_checkstr_assign_integer, DLGAPDURATION_OKVALUES, DLGAPDURATION_MODVALUES , 4}} , \ - { .s2= { config_check_intrange, NPUSCH_P0_NOMINALNPUSCH_OKRANGE}} , \ - { .s3a= { config_checkstr_assign_integer, NPUSCH_ALPHA_OKVALUES, NPUSCH_ALPHA_MODVALUES, 8}} , \ - { .s2= { config_check_intrange, DELTAPREAMBLEMSG3_OKRANGE}} , \ - { .s1a= { config_check_modify_integer, UETIMER_T300_OKVALUES, UETIMER_T300_MODVALUES,8}} , \ - { .s1a= { config_check_modify_integer, UETIMER_T301_OKVALUES, UETIMER_T301_MODVALUES,8}} , \ - { .s1a= { config_check_modify_integer, UETIMER_T310_OKVALUES, UETIMER_T310_MODVALUES,7}} , \ - { .s1a= { config_check_modify_integer, UETIMER_T311_OKVALUES, UETIMER_T311_MODVALUES,7}} , \ - { .s1a= { config_check_modify_integer, UETIMER_N310_OKVALUES, UETIMER_N310_MODVALUES,8}} , \ - { .s1a= { config_check_modify_integer, UETIMER_N311_OKVALUES, UETIMER_N311_MODVALUES,8}} , \ -} -/*-----------------------------------------------------------------------------------------------------------------------------------------*/ -/* NB-IoT RRC configuration parameters */ -/* optname helpstr paramflags XXXptr defXXXval type numelt */ -/*-----------------------------------------------------------------------------------------------------------------------------------------*/ -#define NBIOTRRCPARAMS_DESC { \ -{"rach_raResponseWindowSize_NB", NULL, 0, uptr:NULL, defintval:20, TYPE_UINT, 0}, \ -{"rach_macContentionResolutionTimer_NB", NULL, 0, uptr:NULL, defintval:80, TYPE_UINT, 0}, \ -{"rach_powerRampingStep_NB", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{"rach_preambleInitialReceivedTargetPower_NB", NULL, 0, iptr:NULL, defintval:-112, TYPE_INT32, 0}, \ -{"rach_preambleTransMax_CE_NB", NULL, 0, uptr:NULL, defintval:3, TYPE_UINT, 0}, \ -{"bcch_modificationPeriodCoeff_NB", NULL, 0, uptr:NULL, defintval:16, TYPE_UINT, 0}, \ -{"pcch_defaultPagingCycle_NB", NULL, 0, uptr:NULL, defintval:256, TYPE_UINT, 0}, \ -{"nprach_CP_Length", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{"nprach_rsrp_range", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{"nprach_SubcarrierMSG3_RangeStart", NULL, 0, strptr:NULL, defstrval:"one", TYPE_STRING, 0}, \ -{"maxNumPreambleAttemptCE_NB", NULL, 0, uptr:NULL, defintval:10, TYPE_UINT, 0}, \ -{"npdsch_nrs_Power", NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \ -{"npusch_ack_nack_numRepetitions_NB", NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ -{"npusch_srs_SubframeConfig_NB", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{"npusch_threeTone_CyclicShift_r13", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{"npusch_sixTone_CyclicShift_r13", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{"npusch_groupHoppingEnabled", NULL, 0, strptr:NULL, defstrval:"disable", TYPE_STRING, 0}, \ -{"npusch_groupAssignmentNPUSCH_r13", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{"dl_GapThreshold_NB", NULL, 0, uptr:NULL, defintval:32, TYPE_UINT, 0}, \ -{"dl_GapPeriodicity_NB", NULL, 0, uptr:NULL, defintval:64, TYPE_UINT, 0}, \ -{"dl_GapDurationCoeff_NB", NULL, 0, strptr:NULL, defstrval:"oneEighth", TYPE_STRING, 0}, \ -{"npusch_p0_NominalNPUSCH", NULL, 0, iptr:NULL, defintval:0, TYPE_INT32, 0}, \ -{"npusch_alpha", NULL, 0, strptr:NULL, defstrval:"AL0", TYPE_STRING, 0}, \ -{"deltaPreambleMsg3", NULL, 0, iptr:NULL, defintval:0, TYPE_INT32, 0}, \ -{"ue_TimersAndConstants_t300_NB", NULL, 0, uptr:NULL, defintval:1000, TYPE_UINT, 0}, \ -{"ue_TimersAndConstants_t301_NB", NULL, 0, uptr:NULL, defintval:1000, TYPE_UINT, 0}, \ -{"ue_TimersAndConstants_t310_NB", NULL, 0, uptr:NULL, defintval:1000, TYPE_UINT, 0}, \ -{"ue_TimersAndConstants_t311_NB", NULL, 0, uptr:NULL, defintval:10000, TYPE_UINT, 0}, \ -{"ue_TimersAndConstants_n310_NB", NULL, 0, uptr:NULL, defintval:20, TYPE_UINT, 0}, \ -{"ue_TimersAndConstants_n311_NB", NULL, 0, uptr:NULL, defintval:1, TYPE_UINT, 0}, \ -} - -#define NBIOT_RACH_RARESPONSEWINDOWSIZE_NB_IDX 0 -#define NBIOT_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IDX 1 -#define NBIOT_RACH_POWERRAMPINGSTEP_NB_IDX 2 -#define NBIOT_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IDX 3 -#define NBIOT_RACH_PREAMBLETRANSMAX_CE_NB_IDX 4 -#define NBIOT_BCCH_MODIFICATIONPERIODCOEFF_NB_IDX 5 -#define NBIOT_PCCH_DEFAULTPAGINGCYCLE_NB_IDX 6 -#define NBIOT_NPRACH_CP_LENGTH_IDX 7 -#define NBIOT_NPRACH_RSRP_RANGE_IDX 8 -#define NBIOT_NPRACH_SUBCARRIERMSG3_RANGESTART_IDX 9 -#define NBIOT_MAXNUMPREAMBLEATTEMPTCE_NB_IDX 10 -#define NBIOT_NPDSCH_NRS_POWER_IDX 11 -#define NBIOT_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IDX 12 -#define NBIOT_NPUSCH_SRS_SUBFRAMECONFIG_NB_IDX 13 -#define NBIOT_NPUSCH_THREETONE_CYCLICSHIFT_R13_IDX 14 -#define NBIOT_NPUSCH_SIXTONE_CYCLICSHIFT_R13_IDX 15 -#define NBIOT_NPUSCH_GROUPHOPPINGENABLED_IDX 16 -#define NBIOT_NPUSCH_GROUPASSIGNMENTNPUSCH_R13_IDX 17 -#define NBIOT_DL_GAPTHRESHOLD_NB_IDX 18 -#define NBIOT_DL_GAPPERIODICITY_NB_IDX 19 -#define NBIOT_DL_GAPDURATIONCOEFF_NB_IDX 20 -#define NBIOT_NPUSCH_P0_NOMINALNPUSCH_IDX 21 -#define NBIOT_NPUSCH_ALPHA_IDX 22 -#define NBIOT_DELTAPREAMBLEMSG3_IDX 23 -#define NBIOT_UE_TIMERSANDCONSTANTS_T300_NB_IDX 24 -#define NBIOT_UE_TIMERSANDCONSTANTS_T301_NB_IDX 25 -#define NBIOT_UE_TIMERSANDCONSTANTS_T310_NB_IDX 26 -#define NBIOT_UE_TIMERSANDCONSTANTS_T311_NB_IDX 27 -#define NBIOT_UE_TIMERSANDCONSTANTS_N310_NB_IDX 28 -#define NBIOT_UE_TIMERSANDCONSTANTS_N311_NB_IDX 29 - -/* NB-Iot RRC: link to LTE RRC section name */ -#define NBIOT_LTERRCREF_CONFIG_STRING "LTERRC_Ref" -/*---------------------------------------------------------------------------------------------------------------*/ -/* NB-IoT RRC configuration parameters to link to a LTE RRC instance (in-guard, in-band) */ -/* optname helpstr paramflags XXXptr defXXXval type numelt */ -/*---------------------------------------------------------------------------------------------------------------*/ -#define NBIOTRRCPARAMS_RRCREF_DESC { \ -{"RRC_inst", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{"CC_inst", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -} -/*--------------------------------------------------------------------------------------------------------------*/ -#define NBIOT_RRCINST_IDX 0 -#define NBIOT_CCINST_IDX 1 - -#define NBIOT_RRCLIST_NPRACHPARAMS_CONFIG_STRING "NPRACH-NB-r13" - - -#define NPRACH_PERIODICITY_OKVALUES {40,80,160,240,320,640,1280,2560} -#define NPRACH_PERIODICITY_MODVALUES { NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms40, NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms80, \ - NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms160, NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms240, \ - NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms320, NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms640, \ - NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms1280, NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms2560 } - -#define NPRACH_STARTTIME_OKVALUES {8,16,32,64,128,256,512,1024} -#define NPRACH_STARTTIME_MODVALUES { NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms8, NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms16, \ - NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms32, NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms64, \ - NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms128, NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms256, \ - NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms512, NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms1024 } - -#define NPRACH_SUBCARRIEROFFSET_OKVALUES {0,12,24,36,2,18,34} -#define NPRACH_SUBCARRIEROFFSET_MODVALUES { NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n0, NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n12, \ - NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n24, NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n36, \ - NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n2, NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n18, \ - NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n34 } - -#define NPRACH_NUMSUBCARRIERS_OKVALUES {12,24,36,48} -#define NPRACH_NUMSUBCARRIERS_MODVALUES { NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n12, NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n24, \ - NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n36, NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n48 } - - -#define NUMREPETITIONSPERPREAMBLEATTEMPT_OKVALUES {1,2,4,8,16,32,64,128} -#define NUMREPETITIONSPERPREAMBLEATTEMPT_MODVALUES { NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n1, NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n2, \ - NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n4, NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n8, \ - NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n16, NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n32, \ - NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n64, NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n128} - -#define NPDCCHNUMREPETITIONSRA_OKVALUES {1,2,4,8,16,32,64,128,256,512,1024,2048} -#define NPDCCHNUMREPETITIONSRA_MODVALUES { NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r1, NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r2, \ - NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r4, NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r8, \ - NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r16, NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r32, \ - NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r64, NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r128, \ - NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r256, NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r512, \ - NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r1024,NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r2048} - -#define NPDCCHSTARTSFCSSRA_OKVALUES {1,2,4,8,16,32,48,64} -#define NPDCCHSTARTSFCSSRA_MODVALUES { NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v1dot5, NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v2, \ - NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v4, NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v8, \ - NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v16, NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v32, \ - NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v48, NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v64} - -#define NPDCCHOFFSETRA_OKVALUES {"zero","oneEighth","oneFourth","threeEighth"} -#define NPDCCHOFFSETRA_MODVALUES { NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_zero, NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_oneEighth, \ - NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_oneFourth, NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_threeEighth} - - - -#define NBIOT_RRCLIST_NPRACHPARAMSCHECK_DESC { \ - { .s1a= { config_check_modify_integer, NPRACH_PERIODICITY_OKVALUES, NPRACH_PERIODICITY_MODVALUES, 8 }}, \ - { .s1a= { config_check_modify_integer, NPRACH_STARTTIME_OKVALUES, NPRACH_STARTTIME_MODVALUES, 8 }}, \ - { .s1a= { config_check_modify_integer, NPRACH_SUBCARRIEROFFSET_OKVALUES, NPRACH_SUBCARRIEROFFSET_MODVALUES, 7 }}, \ - { .s1a= { config_check_modify_integer, NPRACH_NUMSUBCARRIERS_OKVALUES, NPRACH_NUMSUBCARRIERS_MODVALUES, 4 }}, \ - { .s1a= { config_check_modify_integer, NUMREPETITIONSPERPREAMBLEATTEMPT_OKVALUES, NUMREPETITIONSPERPREAMBLEATTEMPT_MODVALUES,8 }}, \ - { .s1a= { config_check_modify_integer, NPDCCHNUMREPETITIONSRA_OKVALUES, NPDCCHNUMREPETITIONSRA_MODVALUES, 12}}, \ - { .s1a= { config_check_modify_integer, NPDCCHSTARTSFCSSRA_OKVALUES, NPDCCHSTARTSFCSSRA_MODVALUES, 8 }}, \ - { .s3a= { config_checkstr_assign_integer, NPDCCHOFFSETRA_OKVALUES, NPDCCHOFFSETRA_MODVALUES, 4 }}, \ -} - - - -/*------------------------------------------------------------------------------------------------------------------------------*/ -/* NB-IoT NPrach parameters, there will be three ocuurences of these parameters in each RRC instance */ - /* optname helpstr paramflags XXXptr defXXXval type numelt */ -/*------------------------------------------------------------------------------------------------------------------------------*/ -#define NBIOTRRC_NPRACH_PARAMS_DESC { \ -{"nprach_Periodicity", NULL, 0, uptr:NULL, defintval:320, TYPE_UINT, 0}, \ -{"nprach_StartTime", NULL, 0, uptr:NULL, defintval:8, TYPE_UINT, 0}, \ -{"nprach_SubcarrierOffset", NULL, 0, uptr:NULL, defintval:0, TYPE_UINT, 0}, \ -{"nprach_NumSubcarriers", NULL, 0, uptr:NULL, defintval:12, TYPE_UINT, 0}, \ -{"numRepetitionsPerPreambleAttempt", NULL, 0, uptr:NULL, defintval:2, TYPE_UINT, 0}, \ -{"npdcch_NumRepetitions_RA", NULL, 0, uptr:NULL, defintval:16, TYPE_UINT, 0}, \ -{"npdcch_StartSF_CSS_RA", NULL, 0, uptr:NULL, defintval:2, TYPE_UINT, 0}, \ -{"npdcch_Offset_RA", NULL, 0, strptr:NULL, defstrval:"zero", TYPE_STRING, 0}, \ -} - -#define NBIOT_NPRACH_PERIODICITY_IDX 0 -#define NBIOT_NPRACH_STARTTIME_IDX 1 -#define NBIOT_NPRACH_SUBCARRIEROFFSET_IDX 2 -#define NBIOT_NPRACH_NUMSUBCARRIERS_IDX 3 -#define NBIOT_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IDX 4 -#define NBIOT_NPDCCH_NUMREPETITIONS_RA_IDX 5 -#define NBIOT_NPDCCH_STARTSF_CSS_RA_IDX 6 -#define NBIOT_NPDCCH_OFFSET_RA_IDX 7 - -/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ -/* NB IoT MACRLC configuration list section name */ -#define NBIOT_MACRLCLIST_CONFIG_STRING "NB-IoT_MACRLCs" - - -/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/ -/* NB IoT L1 configuration list section name */ -#define NBIOT_L1LIST_CONFIG_STRING "NB-IoT_L1s" - -#endif From cede4499071097c04e83071661b3835379051d44 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 25 Jul 2025 09:30:00 +0200 Subject: [PATCH 13/33] Remove NUMBER_OF_UE_MAX_NB_IoT and make NB_IoT compile This constant seems to be an analogon to NUMBER_OF_UE_MAX; replace with the latter, as it does the same. (NBIoT does not work, anyway) Fix dependencies of the NB_IoT target so it compiles. --- CMakeLists.txt | 2 - openair1/PHY/defs_L1_NB_IoT.h | 73 ++++++++++++++--------------- openair1/PHY/impl_defs_top_NB_IoT.h | 24 +++++----- 3 files changed, 48 insertions(+), 51 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 350b66afa9..fa7510a9f1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1653,8 +1653,6 @@ include_directories(${NAS_SRC}UE/EMM/SAP) include_directories(${NAS_SRC}UE/ESM) include_directories(${NAS_SRC}UE/ESM/SAP) -add_definitions("-DNUMBER_OF_UE_MAX_NB_IoT=16") - # Simulation library ########################## set (SIMUSRC diff --git a/openair1/PHY/defs_L1_NB_IoT.h b/openair1/PHY/defs_L1_NB_IoT.h index aba1ffb255..97f243fae8 100644 --- a/openair1/PHY/defs_L1_NB_IoT.h +++ b/openair1/PHY/defs_L1_NB_IoT.h @@ -512,20 +512,20 @@ typedef struct PHY_VARS_eNB_NB_IoT_s { NB_IoT_DL_FRAME_PARMS frame_parms; PHY_MEASUREMENTS_eNB_NB_IoT measurements[NUMBER_OF_eNB_SECTORS_MAX_NB_IoT]; /// Measurement variables NB_IoT_eNB_COMMON common_vars; - NB_IoT_eNB_SRS srs_vars[NUMBER_OF_UE_MAX_NB_IoT]; + NB_IoT_eNB_SRS srs_vars[NUMBER_OF_UE_MAX]; NB_IoT_eNB_PBCH pbch; - NB_IoT_eNB_PUSCH *pusch_vars[NUMBER_OF_UE_MAX_NB_IoT]; + NB_IoT_eNB_PUSCH *pusch_vars[NUMBER_OF_UE_MAX]; NB_IoT_eNB_PRACH prach_vars; - //LTE_eNB_DLSCH_t *dlsch[NUMBER_OF_UE_MAX_NB_IoT][2]; // Nusers times two spatial streams - NB_IoT_eNB_NULSCH_t *ulsch[NUMBER_OF_UE_MAX_NB_IoT+1]; // Nusers + number of RA (the ulsch[0] contains RAR) + //LTE_eNB_DLSCH_t *dlsch[NUMBER_OF_UE_MAX][2]; // Nusers times two spatial streams + NB_IoT_eNB_NULSCH_t *ulsch[NUMBER_OF_UE_MAX+1]; // Nusers + number of RA (the ulsch[0] contains RAR) //LTE_eNB_DLSCH_t *dlsch_SI,*dlsch_ra; //LTE_eNB_DLSCH_t *dlsch_MCH; - NB_IoT_eNB_UE_stats UE_stats[NUMBER_OF_UE_MAX_NB_IoT]; - //LTE_eNB_UE_stats *UE_stats_ptr[NUMBER_OF_UE_MAX_NB_IoT]; + NB_IoT_eNB_UE_stats UE_stats[NUMBER_OF_UE_MAX]; + //LTE_eNB_UE_stats *UE_stats_ptr[NUMBER_OF_UE_MAX]; /// cell-specific reference symbols uint32_t lte_gold_table_NB_IoT[20][2][14]; /// UE-specific reference symbols (p=5), TM 7 - uint32_t lte_gold_uespec_port5_table[NUMBER_OF_UE_MAX_NB_IoT][20][38]; + uint32_t lte_gold_uespec_port5_table[NUMBER_OF_UE_MAX][20][38]; /// UE-specific reference symbols (p=7...14), TM 8/9/10 uint32_t lte_gold_uespec_table[2][20][2][21]; /// mbsfn reference symbols @@ -539,7 +539,7 @@ typedef struct PHY_VARS_eNB_NB_IoT_s { /// char eNB_generate_rar; /// Indicator set to 0 after first SR - uint8_t first_sr[NUMBER_OF_UE_MAX_NB_IoT]; + uint8_t first_sr[NUMBER_OF_UE_MAX]; uint32_t max_peak_val; /// @@ -549,7 +549,7 @@ typedef struct PHY_VARS_eNB_NB_IoT_s { /// N0 (used for abstraction) double N0; /// - unsigned char first_run_timing_advance[NUMBER_OF_UE_MAX_NB_IoT]; + unsigned char first_run_timing_advance[NUMBER_OF_UE_MAX]; unsigned char first_run_I0_measurements; unsigned char cooperation_flag; // for cooperative communication @@ -575,37 +575,37 @@ typedef struct PHY_VARS_eNB_NB_IoT_s { DCI_ALLOC_NB_IoT_t dci_alloc[2][NUM_DCI_MAX_NB_IoT]; // dci_alloc from even/odd subframes ///////////// // PDSCH Variables - PDSCH_CONFIG_DEDICATED_NB_IoT pdsch_config_dedicated[NUMBER_OF_UE_MAX_NB_IoT]; + PDSCH_CONFIG_DEDICATED_NB_IoT pdsch_config_dedicated[NUMBER_OF_UE_MAX]; // PUSCH Variables - PUSCH_CONFIG_DEDICATED_NB_IoT pusch_config_dedicated[NUMBER_OF_UE_MAX_NB_IoT]; + PUSCH_CONFIG_DEDICATED_NB_IoT pusch_config_dedicated[NUMBER_OF_UE_MAX]; // PUCCH variables - PUCCH_CONFIG_DEDICATED_NB_IoT pucch_config_dedicated[NUMBER_OF_UE_MAX_NB_IoT]; + PUCCH_CONFIG_DEDICATED_NB_IoT pucch_config_dedicated[NUMBER_OF_UE_MAX]; // UL-POWER-Control - UL_POWER_CONTROL_DEDICATED_NB_IoT ul_power_control_dedicated[NUMBER_OF_UE_MAX_NB_IoT]; + UL_POWER_CONTROL_DEDICATED_NB_IoT ul_power_control_dedicated[NUMBER_OF_UE_MAX]; // TPC - TPC_PDCCH_CONFIG_NB_IoT tpc_pdcch_config_pucch[NUMBER_OF_UE_MAX_NB_IoT]; + TPC_PDCCH_CONFIG_NB_IoT tpc_pdcch_config_pucch[NUMBER_OF_UE_MAX]; /// - TPC_PDCCH_CONFIG_NB_IoT tpc_pdcch_config_pusch[NUMBER_OF_UE_MAX_NB_IoT]; + TPC_PDCCH_CONFIG_NB_IoT tpc_pdcch_config_pusch[NUMBER_OF_UE_MAX]; // CQI reporting - CQI_REPORT_CONFIG_NB_IoT cqi_report_config[NUMBER_OF_UE_MAX_NB_IoT]; + CQI_REPORT_CONFIG_NB_IoT cqi_report_config[NUMBER_OF_UE_MAX]; // SRS Variables - SOUNDINGRS_UL_CONFIG_DEDICATED_NB_IoT soundingrs_ul_config_dedicated[NUMBER_OF_UE_MAX_NB_IoT]; + SOUNDINGRS_UL_CONFIG_DEDICATED_NB_IoT soundingrs_ul_config_dedicated[NUMBER_OF_UE_MAX]; /// uint8_t ncs_cell[20][7]; // Scheduling Request Config - SCHEDULING_REQUEST_CONFIG_NB_IoT scheduling_request_config[NUMBER_OF_UE_MAX_NB_IoT]; + SCHEDULING_REQUEST_CONFIG_NB_IoT scheduling_request_config[NUMBER_OF_UE_MAX]; // Transmission mode per UE - uint8_t transmission_mode[NUMBER_OF_UE_MAX_NB_IoT]; + uint8_t transmission_mode[NUMBER_OF_UE_MAX]; /// cba_last successful reception for each group, used for collision detection uint8_t cba_last_reception[4]; // Pointers for active physicalConfigDedicated to be applied in current subframe - struct PhysicalConfigDedicated *physicalConfigDedicated[NUMBER_OF_UE_MAX_NB_IoT]; + struct PhysicalConfigDedicated *physicalConfigDedicated[NUMBER_OF_UE_MAX]; //Pointers for actve physicalConfigDedicated for NB-IoT to be applied in current subframe - struct PhysicalConfigDedicated_NB_r13 *phy_config_dedicated_NB_IoT[NUMBER_OF_UE_MAX_NB_IoT]; + struct PhysicalConfigDedicated_NB_r13 *phy_config_dedicated_NB_IoT[NUMBER_OF_UE_MAX]; /// uint32_t rb_mask_ul[4]; /// Information regarding TM5 - MU_MIMO_mode_NB_IoT mu_mimo_mode[NUMBER_OF_UE_MAX_NB_IoT]; + MU_MIMO_mode_NB_IoT mu_mimo_mode[NUMBER_OF_UE_MAX]; /// target_ue_dl_mcs : only for debug purposes uint32_t target_ue_dl_mcs; /// target_ue_ul_mcs : only for debug purposes @@ -660,16 +660,16 @@ typedef struct PHY_VARS_eNB_NB_IoT_s { time_stats_t ulsch_tc_ext_stats; time_stats_t ulsch_tc_intl1_stats; time_stats_t ulsch_tc_intl2_stats; - int32_t pucch1_stats_cnt[NUMBER_OF_UE_MAX_NB_IoT][10]; - int32_t pucch1_stats[NUMBER_OF_UE_MAX_NB_IoT][10*1024]; - int32_t pucch1_stats_thres[NUMBER_OF_UE_MAX_NB_IoT][10*1024]; - int32_t pucch1ab_stats_cnt[NUMBER_OF_UE_MAX_NB_IoT][10]; - int32_t pucch1ab_stats[NUMBER_OF_UE_MAX_NB_IoT][2*10*1024]; - int32_t pusch_stats_rb[NUMBER_OF_UE_MAX_NB_IoT][10240]; - int32_t pusch_stats_round[NUMBER_OF_UE_MAX_NB_IoT][10240]; - int32_t pusch_stats_mcs[NUMBER_OF_UE_MAX_NB_IoT][10240]; - int32_t pusch_stats_bsr[NUMBER_OF_UE_MAX_NB_IoT][10240]; - int32_t pusch_stats_BO[NUMBER_OF_UE_MAX_NB_IoT][10240]; + int32_t pucch1_stats_cnt[NUMBER_OF_UE_MAX][10]; + int32_t pucch1_stats[NUMBER_OF_UE_MAX][10*1024]; + int32_t pucch1_stats_thres[NUMBER_OF_UE_MAX][10*1024]; + int32_t pucch1ab_stats_cnt[NUMBER_OF_UE_MAX][10]; + int32_t pucch1ab_stats[NUMBER_OF_UE_MAX][2*10*1024]; + int32_t pusch_stats_rb[NUMBER_OF_UE_MAX][10240]; + int32_t pusch_stats_round[NUMBER_OF_UE_MAX][10240]; + int32_t pusch_stats_mcs[NUMBER_OF_UE_MAX][10240]; + int32_t pusch_stats_bsr[NUMBER_OF_UE_MAX][10240]; + int32_t pusch_stats_BO[NUMBER_OF_UE_MAX][10240]; /// RF and Interface devices per CC openair0_device rfdevice; @@ -682,7 +682,7 @@ typedef struct PHY_VARS_eNB_NB_IoT_s { //------------------------ /* - * NUMBER_OF_UE_MAX_NB_IoT maybe in the future should be dynamic because could be very large and the memory may explode + * NUMBER_OF_UE_MAX maybe in the future should be dynamic because could be very large and the memory may explode * (is almost the indication of the number of UE context that we are storing at PHY layer) * * reasoning: the following data structure (ndlsch, nulsch ecc..) are used to store the context that should be transmitted in at least n+4 subframe later @@ -710,11 +710,10 @@ typedef struct PHY_VARS_eNB_NB_IoT_s { * */ - //TODO: check what should be NUMBER_OF_UE_MAX_NB_IoT value NB_IoT_eNB_NPBCH_t *npbch; - NB_IoT_eNB_NPDCCH_t *npdcch[NUMBER_OF_UE_MAX_NB_IoT]; - NB_IoT_eNB_NDLSCH_t *ndlsch[NUMBER_OF_UE_MAX_NB_IoT][2]; - NB_IoT_eNB_NULSCH_t *nulsch[NUMBER_OF_UE_MAX_NB_IoT+1]; //nulsch[0] contains the RAR + NB_IoT_eNB_NPDCCH_t *npdcch[NUMBER_OF_UE_MAX]; + NB_IoT_eNB_NDLSCH_t *ndlsch[NUMBER_OF_UE_MAX][2]; + NB_IoT_eNB_NULSCH_t *nulsch[NUMBER_OF_UE_MAX+1]; //nulsch[0] contains the RAR NB_IoT_eNB_NDLSCH_t *ndlsch_SI,*ndlsch_ra, *ndlsch_SIB1; NB_IoT_DL_FRAME_PARMS frame_parms_NB_IoT; diff --git a/openair1/PHY/impl_defs_top_NB_IoT.h b/openair1/PHY/impl_defs_top_NB_IoT.h index f9560cb228..8b3360c087 100644 --- a/openair1/PHY/impl_defs_top_NB_IoT.h +++ b/openair1/PHY/impl_defs_top_NB_IoT.h @@ -158,30 +158,30 @@ typedef struct { short n0_subband_power_tot_dBm[100]; // eNB measurements (per user) //! estimated received spatial signal power (linear) - unsigned int rx_spatial_power[NUMBER_OF_UE_MAX_NB_IoT][2][2]; + unsigned int rx_spatial_power[NUMBER_OF_UE_MAX][2][2]; //! estimated received spatial signal power (dB) - unsigned short rx_spatial_power_dB[NUMBER_OF_UE_MAX_NB_IoT][2][2]; + unsigned short rx_spatial_power_dB[NUMBER_OF_UE_MAX][2][2]; //! estimated rssi (dBm) - short rx_rssi_dBm[NUMBER_OF_UE_MAX_NB_IoT]; + short rx_rssi_dBm[NUMBER_OF_UE_MAX]; //! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation) - int rx_correlation[NUMBER_OF_UE_MAX_NB_IoT][2]; + int rx_correlation[NUMBER_OF_UE_MAX][2]; //! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation) - int rx_correlation_dB[NUMBER_OF_UE_MAX_NB_IoT][2]; + int rx_correlation_dB[NUMBER_OF_UE_MAX][2]; /// Wideband CQI (= SINR) - int wideband_cqi[NUMBER_OF_UE_MAX_NB_IoT][NB_ANTENNAS_RX]; + int wideband_cqi[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX]; /// Wideband CQI in dB (= SINR dB) - int wideband_cqi_dB[NUMBER_OF_UE_MAX_NB_IoT][NB_ANTENNAS_RX]; + int wideband_cqi_dB[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX]; /// Wideband CQI (sum of all RX antennas, in dB) - char wideband_cqi_tot[NUMBER_OF_UE_MAX_NB_IoT]; + char wideband_cqi_tot[NUMBER_OF_UE_MAX]; /// Subband CQI per RX antenna and RB (= SINR) - int subband_cqi[NUMBER_OF_UE_MAX_NB_IoT][NB_ANTENNAS_RX][100]; + int subband_cqi[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][100]; /// Total Subband CQI and RB (= SINR) - int subband_cqi_tot[NUMBER_OF_UE_MAX_NB_IoT][100]; + int subband_cqi_tot[NUMBER_OF_UE_MAX][100]; /// Subband CQI in dB and RB (= SINR dB) - int subband_cqi_dB[NUMBER_OF_UE_MAX_NB_IoT][NB_ANTENNAS_RX][100]; + int subband_cqi_dB[NUMBER_OF_UE_MAX][NB_ANTENNAS_RX][100]; /// Total Subband CQI and RB - int subband_cqi_tot_dB[NUMBER_OF_UE_MAX_NB_IoT][100]; + int subband_cqi_tot_dB[NUMBER_OF_UE_MAX][100]; } PHY_MEASUREMENTS_eNB_NB_IoT; From cc094ac73789fd9340bddb190db85b24c85b850f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 20 Dec 2024 00:03:20 +0100 Subject: [PATCH 14/33] XNAP asn.1 cmake: ber_decoder.h is not created XNAP is asn1c compiled with -no-gen-BER. Correspondingly, no ber_decoder.h file is created. However, when running cmake followed by ninja, it notices the absence of this file: ninja explain: output openair2/XNAP/MESSAGES/ber_decoder.h doesn't exist which triggers a complete rebuild of XNAP ASN.1. Without this file, the targets are not marked as dirty. --- openair2/XNAP/MESSAGES/ASN1/xnap_R16.2.0.cmake | 1 - 1 file changed, 1 deletion(-) diff --git a/openair2/XNAP/MESSAGES/ASN1/xnap_R16.2.0.cmake b/openair2/XNAP/MESSAGES/ASN1/xnap_R16.2.0.cmake index 3cc71e8415..cb0c762983 100644 --- a/openair2/XNAP/MESSAGES/ASN1/xnap_R16.2.0.cmake +++ b/openair2/XNAP/MESSAGES/ASN1/xnap_R16.2.0.cmake @@ -833,7 +833,6 @@ set(xnap_headers asn_SEQUENCE_OF.h asn_SET_OF.h asn_system.h - ber_decoder.h ber_tlv_length.h ber_tlv_tag.h BIT_STRING.h From 4177c6d182692c913525ab227cbabeaa6a5686db Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 25 Jul 2025 14:36:25 +0200 Subject: [PATCH 15/33] Include CMakeLists.txt using add_subdirectory(), simplify --- CMakeLists.txt | 2 -- openair1/PHY/CODING/CMakeLists.txt | 1 + openair1/PHY/CODING/nrLDPC_decoder/CMakeLists.txt | 1 + .../PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt | 8 ++++---- 4 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 openair1/PHY/CODING/nrLDPC_decoder/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index fa7510a9f1..6d16902308 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2105,8 +2105,6 @@ if (${T_TRACER}) endforeach(i) endif (${T_TRACER}) -include(${OPENAIR1_DIR}/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt) - set(ENABLE_TESTS OFF CACHE STRING "Activate build of tests") set_property(CACHE ENABLE_TESTS PROPERTY TYPE BOOL) set(ENABLE_PHYSIM_TESTS OFF CACHE STRING "Activate build of physim tests") diff --git a/openair1/PHY/CODING/CMakeLists.txt b/openair1/PHY/CODING/CMakeLists.txt index 7e07f8f2dc..4681487c85 100644 --- a/openair1/PHY/CODING/CMakeLists.txt +++ b/openair1/PHY/CODING/CMakeLists.txt @@ -68,3 +68,4 @@ if (ENABLE_LDPC_CUDA) endif() add_subdirectory(nrLDPC_coding) +add_subdirectory(nrLDPC_decoder) diff --git a/openair1/PHY/CODING/nrLDPC_decoder/CMakeLists.txt b/openair1/PHY/CODING/nrLDPC_decoder/CMakeLists.txt new file mode 100644 index 0000000000..1734260e68 --- /dev/null +++ b/openair1/PHY/CODING/nrLDPC_decoder/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(nrLDPC_tools) diff --git a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt index 26ef39408f..4b8dfcb446 100644 --- a/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt +++ b/openair1/PHY/CODING/nrLDPC_decoder/nrLDPC_tools/CMakeLists.txt @@ -1,7 +1,7 @@ -add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/generator_bnProc ldpc/generator_bnProc) -add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/generator_bnProc_avx512 ldpc/generator_bnProc_avx512) -add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/generator_cnProc ldpc/generator_cnProc) -add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/generator_cnProc_avx512 ldpc/generator_cnProc_avx512) +add_subdirectory(generator_bnProc ldpc/generator_bnProc) +add_subdirectory(generator_bnProc_avx512 ldpc/generator_bnProc_avx512) +add_subdirectory(generator_cnProc ldpc/generator_cnProc) +add_subdirectory(generator_cnProc_avx512 ldpc/generator_cnProc_avx512) # custom target to build all generators add_custom_target(ldpc_generators) From 46ed4ac36d300eb8d1d9c337192431c88d97afbc Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 11 Sep 2025 06:49:45 +0200 Subject: [PATCH 16/33] Update comment to reference right target --- common/utils/T/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/utils/T/CMakeLists.txt b/common/utils/T/CMakeLists.txt index 5425a564b1..8f58871adc 100644 --- a/common/utils/T/CMakeLists.txt +++ b/common/utils/T/CMakeLists.txt @@ -47,7 +47,7 @@ add_custom_target(generate_T DEPENDS T_IDs.h check_vcd) # even if T is off, we need the headers as many targets depend on it # for this, create an INTERFACE (header-only) library T_headers. To ensure the # headers have really been created, we make this headers library explicitly -# depend on the generated headers. +# depend on the generate_T target. add_library(T_headers INTERFACE) add_dependencies(T_headers T_IDs.h generate_T) target_include_directories(T_headers INTERFACE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) From 72371ba10b53013dd5f38fbe59ece9dbbaec6758 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 11 Sep 2025 06:50:09 +0200 Subject: [PATCH 17/33] Remove unnecessary comment --- openair1/PHY/CODING/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/openair1/PHY/CODING/CMakeLists.txt b/openair1/PHY/CODING/CMakeLists.txt index 4681487c85..f696c71213 100644 --- a/openair1/PHY/CODING/CMakeLists.txt +++ b/openair1/PHY/CODING/CMakeLists.txt @@ -7,7 +7,6 @@ add_library(coding MODULE 3gpplte_turbo_decoder.c ) set_target_properties(coding PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) -#ensure that the T header files are generated before targets depending on them target_link_libraries(coding PRIVATE log_headers) add_library(ldpc_orig MODULE From eef092c3188fa457416564015da525cf571417f2 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 11 Sep 2025 10:10:14 +0200 Subject: [PATCH 18/33] Omit JER compilation for NRPPA ASN.1 We don't use JER. This avoids compilation problems, such as: /usr/bin/ld: openair3/NRPPA/MESSAGES/libasn1_nrppa.a(INTEGER_jer.c.o): in function `INTEGER_decode_jer': tmp.MtrwVDhQqY/openair3/NRPPA/MESSAGES/INTEGER_jer.c:186:(.text+0x5b8): undefined reference to `jer_decode_primitive --- openair3/NRPPA/MESSAGES/ASN1/38455.cmake | 14 -------------- openair3/NRPPA/MESSAGES/CMakeLists.txt | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/openair3/NRPPA/MESSAGES/ASN1/38455.cmake b/openair3/NRPPA/MESSAGES/ASN1/38455.cmake index d81f3db96c..7421d09e06 100644 --- a/openair3/NRPPA/MESSAGES/ASN1/38455.cmake +++ b/openair3/NRPPA/MESSAGES/ASN1/38455.cmake @@ -4,7 +4,6 @@ set(nrppa_source ANY_aper.c ANY_ber.c ANY.c -ANY_jer.c ANY_uper.c ANY_xer.c aper_decoder.c @@ -24,7 +23,6 @@ ber_decoder.c ber_tlv_length.c ber_tlv_tag.c BIT_STRING.c -BIT_STRING_jer.c BIT_STRING_print.c BIT_STRING_rfill.c BIT_STRING_uper.c @@ -33,7 +31,6 @@ constraints.c constr_CHOICE_aper.c constr_CHOICE_ber.c constr_CHOICE.c -constr_CHOICE_jer.c constr_CHOICE_print.c constr_CHOICE_rfill.c constr_CHOICE_uper.c @@ -41,11 +38,9 @@ constr_CHOICE_xer.c constr_SEQUENCE_aper.c constr_SEQUENCE_ber.c constr_SEQUENCE.c -constr_SEQUENCE_jer.c constr_SEQUENCE_OF_aper.c constr_SEQUENCE_OF_ber.c constr_SEQUENCE_OF.c -constr_SEQUENCE_OF_jer.c constr_SEQUENCE_OF_uper.c constr_SEQUENCE_OF_xer.c constr_SEQUENCE_print.c @@ -55,7 +50,6 @@ constr_SEQUENCE_xer.c constr_SET_OF_aper.c constr_SET_OF_ber.c constr_SET_OF.c -constr_SET_OF_jer.c constr_SET_OF_print.c constr_SET_OF_rfill.c constr_SET_OF_uper.c @@ -66,21 +60,17 @@ GraphicString.c INTEGER_aper.c INTEGER_ber.c INTEGER.c -INTEGER_jer.c INTEGER_print.c INTEGER_rfill.c INTEGER_uper.c INTEGER_xer.c -jer_encoder.c NativeEnumerated_aper.c NativeEnumerated.c -NativeEnumerated_jer.c NativeEnumerated_uper.c NativeEnumerated_xer.c NativeInteger_aper.c NativeInteger_ber.c NativeInteger.c -NativeInteger_jer.c NativeInteger_print.c NativeInteger_rfill.c NativeInteger_uper.c @@ -406,21 +396,18 @@ NRPPA_WLAN-RSSI.c NULL_aper.c NULL_ber.c NULL.c -NULL_jer.c NULL_print.c NULL_rfill.c NULL_uper.c NULL_xer.c ObjectDescriptor.c OBJECT_IDENTIFIER.c -OBJECT_IDENTIFIER_jer.c OBJECT_IDENTIFIER_print.c OBJECT_IDENTIFIER_rfill.c OBJECT_IDENTIFIER_xer.c OCTET_STRING_aper.c OCTET_STRING_ber.c OCTET_STRING.c -OCTET_STRING_jer.c OCTET_STRING_print.c OCTET_STRING_rfill.c OCTET_STRING_uper.c @@ -473,7 +460,6 @@ constr_TYPE.h der_encoder.h GraphicString.h INTEGER.h -jer_encoder.h NativeEnumerated.h NativeInteger.h NRPPA_AbortTransmission.h diff --git a/openair3/NRPPA/MESSAGES/CMakeLists.txt b/openair3/NRPPA/MESSAGES/CMakeLists.txt index 997fb70a9c..6581932024 100644 --- a/openair3/NRPPA/MESSAGES/CMakeLists.txt +++ b/openair3/NRPPA/MESSAGES/CMakeLists.txt @@ -12,7 +12,7 @@ include(ASN1/38455.cmake) run_asn1c(${CMAKE_CURRENT_SOURCE_DIR}/${NRPPA_GRAMMAR} "NRPPA_" OUTPUT ${nrppa_source} ${nrppa_headers} - OPTIONS -gen-APER -gen-UPER -no-gen-OER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps + OPTIONS -gen-APER -gen-UPER -no-gen-OER -no-gen-JER -fcompound-names -no-gen-example -findirect-choice -fno-include-deps COMMENT "NRPPA source files" ) From 66c3b7d192d307b18326bf92208d6e42b0682700 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 12 Sep 2025 19:59:28 +0200 Subject: [PATCH 19/33] Break coding_defs.h dependency on logging module coding_defs.h included defs_common.h, which pulls in many dependencies, e.g., the logging module, which pulls in T. However, it does not use anything of this. So remove, and include stdbool.h instead (because bool is used in coding_defs.h. nr_polar_defs.h relied on some includes done in coding_defs. Use includes for pthreads and SIMD to define types that are used in nr_polar_defs.h. --- openair1/PHY/CODING/3gpplte.c | 1 + openair1/PHY/CODING/coding_defs.h | 5 +---- openair1/PHY/CODING/nrPolar_tools/nr_crc_byte.c | 1 + openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h | 2 ++ 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/openair1/PHY/CODING/3gpplte.c b/openair1/PHY/CODING/3gpplte.c index 3502a1ad56..d3aec284da 100644 --- a/openair1/PHY/CODING/3gpplte.c +++ b/openair1/PHY/CODING/3gpplte.c @@ -30,6 +30,7 @@ #include #include #include "PHY/CODING/coding_defs.h" +#include "common/utils/utils.h" //#define DEBUG_TURBO_ENCODER 1 diff --git a/openair1/PHY/CODING/coding_defs.h b/openair1/PHY/CODING/coding_defs.h index 3c91892d8c..d6e1b780f7 100644 --- a/openair1/PHY/CODING/coding_defs.h +++ b/openair1/PHY/CODING/coding_defs.h @@ -28,7 +28,7 @@ #define __CODING_DEFS__H__ #include -#include +#include #define CRC24_A 0 #define CRC24_B 1 @@ -455,8 +455,5 @@ int32_t nr_segmentation(unsigned char *input_buffer, */ int nr_get_R_ldpc_decoder(int rvidx, int E, int BG, int Z, int *llrLen, int round); -decoder_if_t phy_threegpplte_turbo_decoder; -decoder_if_t phy_threegpplte_turbo_decoder8; -decoder_if_t phy_threegpplte_turbo_decoder16; /** @} */ #endif diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_crc_byte.c b/openair1/PHY/CODING/nrPolar_tools/nr_crc_byte.c index 58764151c4..2bc3c8b517 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_crc_byte.c +++ b/openair1/PHY/CODING/nrPolar_tools/nr_crc_byte.c @@ -20,6 +20,7 @@ */ #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" +#include "common/utils/utils.h" // ----- Old implementation ---- const uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits) diff --git a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h index 803854c23b..519f23175c 100644 --- a/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h +++ b/openair1/PHY/CODING/nrPolar_tools/nr_polar_defs.h @@ -38,11 +38,13 @@ #include #include #include +#include #include "PHY/CODING/nrPolar_tools/nr_polar_dci_defs.h" #include "PHY/CODING/nrPolar_tools/nr_polar_uci_defs.h" #include "PHY/CODING/nrPolar_tools/nr_polar_pbch_defs.h" #include "PHY/CODING/coding_defs.h" +#include "PHY/sse_intrin.h" // #include "SIMULATION/TOOLS/sim.h" #define NR_POLAR_DECODER_LISTSIZE 8 // uint8_t From fd37fba9b735c6c68ff367817b56fdcd03df34b3 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Tue, 8 Oct 2024 10:14:32 +0200 Subject: [PATCH 20/33] Cleanup of libraries/executables from T loop These libraries/executables are not defined in OAI. --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d16902308..2f576a1919 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2087,17 +2087,17 @@ if (${T_TRACER}) nr-uesoftmodem dlsim dlsim_tm4 dlsim_tm7 ulsim pbchsim scansim mbmssim pdcchsim pucchsim prachsim syncsim nr_ulsim nr_dlsim nr_dlschsim nr_pbchsim nr_pucchsim - nr_ulschsim ldpctest polartest smallblocktest cu_test du_test + nr_ulschsim ldpctest polartest smallblocktest #all "add_library" definitions ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap params_libconfig oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer - oai_eth_transpro oai_mobipass HASHTABLE UTIL OMG_SUMO - SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL + oai_eth_transpro HASHTABLE 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 MISC_NFAPI_NR_LIB PHY_COMMON PHY PHY_UE PHY_NR PHY_NR_COMMON PHY_NR_UE PHY_RU L2 L2_LTE L2_NR L2_LTE_NR L2_UE NR_L2_UE MAC_NR_COMMON MAC_UE_NR ngap - CN_UTILS GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE NB_IoT SIMU OPENAIR0_LIB + GTPV1U SCTP_CLIENT MME_APP LIB_NAS_UE SIMU dfts config_internals nr_common crc_byte) if (TARGET ${i}) add_dependencies(${i} generate_T) From 197705f232e587b97ad959224e8703457fd80063 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 16 Sep 2025 08:59:31 +0200 Subject: [PATCH 21/33] Provide T headers via log.h It seems that many compilation units include T.h through the config module (as evidenced when taking out T.h from config_load_configmodule.h). This is strange, because T.h is only used in the logging headers. Hence, move it to there, where it is used. --- common/config/config_load_configmodule.h | 1 - common/utils/LOG/log.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/common/config/config_load_configmodule.h b/common/config/config_load_configmodule.h index 3ec27d456f..d5f87d0f8b 100644 --- a/common/config/config_load_configmodule.h +++ b/common/config/config_load_configmodule.h @@ -39,7 +39,6 @@ #include #include #include "common/config/config_paramdesc.h" -#include "common/utils/T/T.h" #define CONFIG_MAX_OOPT_PARAMS 10 // maximum number of parameters in the -O option (-O :P1:P2... #define CONFIG_MAX_ALLOCATEDPTRS 32768 // maximum number of parameters that can be dynamicaly allocated in the config module diff --git a/common/utils/LOG/log.h b/common/utils/LOG/log.h index 7b9b570a06..1f7474253c 100644 --- a/common/utils/LOG/log.h +++ b/common/utils/LOG/log.h @@ -52,6 +52,7 @@ #endif #include #include +#include "common/utils/T/T.h" #if ENABLE_LTTNG #include "lttng-log.h" #endif From 2889e55cd8d4671017e689adf3036bcde27bc087 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 11 Sep 2025 06:49:31 +0200 Subject: [PATCH 22/33] Remove redundant target_include_directories() from LOG The same is achieved by including log_headers. --- common/utils/LOG/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/common/utils/LOG/CMakeLists.txt b/common/utils/LOG/CMakeLists.txt index 6c4527f760..ade7f76dea 100644 --- a/common/utils/LOG/CMakeLists.txt +++ b/common/utils/LOG/CMakeLists.txt @@ -10,7 +10,6 @@ else() message(STATUS "LTTNG support disabled") endif() add_library(LOG ${log_sources}) -target_include_directories(LOG PUBLIC .) target_link_libraries(LOG PRIVATE CONFIG_LIB) target_link_libraries(LOG PUBLIC log_headers) if (ENABLE_LTTNG) From 1ecb03f5f81dc8ed4ee831e862ebf45bf88996ac Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 15 Sep 2025 09:02:41 +0200 Subject: [PATCH 23/33] Make BladeRF compile Fix variable name. See also: 74662975683d ("move command line sample offset [...] at top level [...]") --- radio/BLADERF/bladerf_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/BLADERF/bladerf_lib.c b/radio/BLADERF/bladerf_lib.c index e834f8377e..178fc2fff2 100644 --- a/radio/BLADERF/bladerf_lib.c +++ b/radio/BLADERF/bladerf_lib.c @@ -138,7 +138,7 @@ static int trx_brf_write(openair0_device *device, brf_state_t *brf = (brf_state_t*)device->priv; /* BRF has only 1 rx/tx chaine : is it correct? */ int16_t *samples = (int16_t*)buff[0]; - timestamp -= device->openair0_cfg->command_line_sample_advance - device->openair0_cfg->tx_sample_advance; + ptimestamp -= device->openair0_cfg->command_line_sample_advance - device->openair0_cfg->tx_sample_advance; //memset(&brf->meta_tx, 0, sizeof(brf->meta_tx)); // When BLADERF_META_FLAG_TX_NOW is used the timestamp is not used, so one can't schedule a tx if (brf->meta_tx.flags == 0 ) From 2a5ed87589299dca7e9ca93cb86d068a10419672 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 25 Apr 2024 09:50:11 +0200 Subject: [PATCH 24/33] E2 Agent uses CONFIG_LIB for configuration Since E2 agent uses the config library, include it directly. This also makes the dependency on T obsolete, because - it is the logging headers that are needed, and - the T dependency is fulfilled through the log_headers. --- openair2/E2AP/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/E2AP/CMakeLists.txt b/openair2/E2AP/CMakeLists.txt index d86dafb0b9..8cbaae73db 100644 --- a/openair2/E2AP/CMakeLists.txt +++ b/openair2/E2AP/CMakeLists.txt @@ -129,4 +129,4 @@ add_subdirectory(flexric/src/util) add_subdirectory(RAN_FUNCTION) add_library(e2_agent_arg STATIC e2_agent_arg.c) -add_dependencies(e2_agent_arg generate_T) +target_link_libraries(e2_agent_arg PRIVATE CONFIG_LIB log_headers) From 19813283fbb4dc507d005ce3b6fb8bb628252f0c Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 11 Sep 2025 09:30:08 +0200 Subject: [PATCH 25/33] Avoid T error on radio libraries These libraries have an (indirect) dependency on T, either by using the logging module (which in turn depends on T), or through other includes. The easiest is to depend on the logging module, which will fulfil also the T dependency. It would equally be feasible to use the utils target (which in turn depends on log_headers), but this would necessitate to compile, and does not seem to be necessary. --- CMakeLists.txt | 7 +++---- radio/AW2SORI/CMakeLists.txt | 2 +- radio/BLADERF/CMakeLists.txt | 2 +- radio/ETHERNET/CMakeLists.txt | 2 +- radio/LMSSDR/CMakeLists.txt | 2 +- radio/USRP/CMakeLists.txt | 2 +- radio/emulator/CMakeLists.txt | 3 +-- radio/fhi_72/CMakeLists.txt | 3 ++- radio/fhi_72/mplane/CMakeLists.txt | 2 +- radio/rfsimulator/CMakeLists.txt | 2 +- radio/vrtsim/CMakeLists.txt | 4 ++-- 11 files changed, 15 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f576a1919..30c8ee06a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1678,9 +1678,8 @@ include_directories("${NFAPI_DIR}/nfapi/inc") include_directories("${NFAPI_DIR}/sim_common/inc") include_directories("${NFAPI_DIR}/pnf_sim/inc") -add_library(oai_iqplayer MODULE - ${OPENAIR_DIR}/radio/iqplayer/iqplayer_lib.c - ) +add_library(oai_iqplayer MODULE ${OPENAIR_DIR}/radio/iqplayer/iqplayer_lib.c) +target_link_libraries(oai_iqplayer PRIVATE log_headers) ################################# # add executables for operation @@ -2090,7 +2089,7 @@ if (${T_TRACER}) nr_ulschsim ldpctest polartest smallblocktest #all "add_library" definitions ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap - params_libconfig oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer + params_libconfig oai_eth_transpro HASHTABLE 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 diff --git a/radio/AW2SORI/CMakeLists.txt b/radio/AW2SORI/CMakeLists.txt index e02d8a2721..134ab27b81 100644 --- a/radio/AW2SORI/CMakeLists.txt +++ b/radio/AW2SORI/CMakeLists.txt @@ -9,7 +9,7 @@ endif() add_library(aw2sori_transpro MODULE oaiori.c) target_compile_options(aw2sori_transpro PRIVATE -shared -fPIC -msse4 -g -ggdb -DLITE_COMPILATION) -target_link_libraries(aw2sori_transpro PRIVATE ori oai_eth_transpro) +target_link_libraries(aw2sori_transpro PRIVATE ori oai_eth_transpro log_headers) set_target_properties(aw2sori_transpro PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_custom_command(TARGET aw2sori_transpro POST_BUILD COMMAND ${CMAKE_COMMAND} -E create_symlink libaw2sori_transpro.so libthirdparty_transpro.so diff --git a/radio/BLADERF/CMakeLists.txt b/radio/BLADERF/CMakeLists.txt index 5504eb4051..063c8cb21e 100644 --- a/radio/BLADERF/CMakeLists.txt +++ b/radio/BLADERF/CMakeLists.txt @@ -1,7 +1,7 @@ pkg_check_modules(bladeRF REQUIRED libbladeRF) add_library(oai_bladerfdevif MODULE bladerf_lib.c) target_link_libraries(oai_bladerfdevif PRIVATE bladeRF) -target_link_libraries(oai_bladerfdevif PRIVATE UTIL) +target_link_libraries(oai_bladerfdevif PRIVATE log_headers) set_target_properties(oai_bladerfdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_custom_command(TARGET oai_bladerfdevif POST_BUILD COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_bladerfdevif.so liboai_device.so diff --git a/radio/ETHERNET/CMakeLists.txt b/radio/ETHERNET/CMakeLists.txt index 8c6590c6e9..3a9b9dc5cb 100644 --- a/radio/ETHERNET/CMakeLists.txt +++ b/radio/ETHERNET/CMakeLists.txt @@ -3,7 +3,7 @@ add_library(oai_eth_transpro MODULE eth_udp.c eth_raw.c ) -target_link_libraries(oai_eth_transpro PRIVATE ${T_LIB}) +target_link_libraries(oai_eth_transpro PRIVATE log_headers) target_include_directories(oai_eth_transpro PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) set_target_properties(oai_eth_transpro PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_custom_command(TARGET oai_eth_transpro POST_BUILD diff --git a/radio/LMSSDR/CMakeLists.txt b/radio/LMSSDR/CMakeLists.txt index 2df5c9a01f..bfe2a7f99f 100644 --- a/radio/LMSSDR/CMakeLists.txt +++ b/radio/LMSSDR/CMakeLists.txt @@ -1,7 +1,7 @@ find_package(LimeSuite REQUIRED) add_library(oai_lmssdrdevif MODULE lms_lib.cpp) -target_link_libraries(oai_lmssdrdevif LimeSuite ) +target_link_libraries(oai_lmssdrdevif LimeSuite log_headers) set_target_properties(oai_lmssdrdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_custom_command(TARGET oai_lmssdrdevif POST_BUILD COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_lmssdrdevif.so liboai_device.so diff --git a/radio/USRP/CMakeLists.txt b/radio/USRP/CMakeLists.txt index 4e72d140f4..50d95ee7e5 100644 --- a/radio/USRP/CMakeLists.txt +++ b/radio/USRP/CMakeLists.txt @@ -5,7 +5,7 @@ add_library(oai_usrpdevif MODULE usrp_lib.cpp) #target_include_directories(oai_usrpdevif PRIVATE Boost::boost) target_link_libraries(oai_usrpdevif PRIVATE ${UHD_LIBRARIES}) target_include_directories(oai_usrpdevif PRIVATE ${UHD_INCLUDE_DIRS}) -target_link_libraries(oai_usrpdevif PRIVATE UTIL) +target_link_libraries(oai_usrpdevif PRIVATE log_headers) set_target_properties(oai_usrpdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_custom_command(TARGET oai_usrpdevif POST_BUILD COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_usrpdevif.so liboai_device.so diff --git a/radio/emulator/CMakeLists.txt b/radio/emulator/CMakeLists.txt index 42b196ee95..983d95986a 100644 --- a/radio/emulator/CMakeLists.txt +++ b/radio/emulator/CMakeLists.txt @@ -1,4 +1,3 @@ add_library(rf_emulator MODULE rf_emulator.c) set_target_properties(rf_emulator PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) -target_link_libraries(rf_emulator PRIVATE noise_device) -add_dependencies(rf_emulator generate_T) +target_link_libraries(rf_emulator PRIVATE noise_device log_headers) diff --git a/radio/fhi_72/CMakeLists.txt b/radio/fhi_72/CMakeLists.txt index 3b0f16d2a4..f2161d06a8 100644 --- a/radio/fhi_72/CMakeLists.txt +++ b/radio/fhi_72/CMakeLists.txt @@ -33,7 +33,8 @@ endif() add_compile_options(-Wno-packed-not-aligned) set_target_properties(oran_fhlib_5g PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -march=native") -target_link_libraries(oran_fhlib_5g PRIVATE xran::xran ${dpdk_LINK_LIBRARIES} ${T_LIB} pthread dl rt m numa) +target_link_libraries(oran_fhlib_5g PRIVATE xran::xran ${dpdk_LINK_LIBRARIES} pthread dl rt m numa) +target_link_libraries(oran_fhlib_5g PRIVATE log_headers) target_include_directories(oran_fhlib_5g PRIVATE ${dpdk_INCLUDE_DIRS}) if (CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") find_package(armral REQUIRED) diff --git a/radio/fhi_72/mplane/CMakeLists.txt b/radio/fhi_72/mplane/CMakeLists.txt index 65faa6dfbd..26bbb7939e 100644 --- a/radio/fhi_72/mplane/CMakeLists.txt +++ b/radio/fhi_72/mplane/CMakeLists.txt @@ -17,7 +17,7 @@ endif() add_compile_options(-Wno-packed-not-aligned) set_target_properties(oran_fhlib_5g_mplane PROPERTIES COMPILE_FLAGS "-fvisibility=hidden -march=native") -target_link_libraries(oran_fhlib_5g_mplane PRIVATE xran::xran ${dpdk_LINK_LIBRARIES} ${T_LIB} pthread dl rt m numa) +target_link_libraries(oran_fhlib_5g_mplane PRIVATE xran::xran ${dpdk_LINK_LIBRARIES} log_headers pthread dl rt m numa) target_include_directories(oran_fhlib_5g_mplane PRIVATE ${dpdk_INCLUDE_DIRS}) target_compile_definitions(oran_fhlib_5g_mplane PRIVATE OAI_MPLANE) diff --git a/radio/rfsimulator/CMakeLists.txt b/radio/rfsimulator/CMakeLists.txt index efba710bad..ad4d92f108 100644 --- a/radio/rfsimulator/CMakeLists.txt +++ b/radio/rfsimulator/CMakeLists.txt @@ -3,7 +3,7 @@ add_library(rfsimulator MODULE apply_channelmod.c ../../openair1/PHY/TOOLS/signal_energy.c ) -target_link_libraries(rfsimulator PRIVATE SIMU) +target_link_libraries(rfsimulator PRIVATE SIMU log_headers) set_target_properties(rfsimulator PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_executable(replay_node stored_node.c) diff --git a/radio/vrtsim/CMakeLists.txt b/radio/vrtsim/CMakeLists.txt index c5ee458666..998b791653 100644 --- a/radio/vrtsim/CMakeLists.txt +++ b/radio/vrtsim/CMakeLists.txt @@ -1,9 +1,9 @@ add_library(noise_device STATIC noise_device.c) +target_link_libraries(noise_device PRIVATE log_headers) add_library(vrtsim MODULE vrtsim.c) set_target_properties(vrtsim PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) -target_link_libraries(vrtsim PRIVATE SIMU shm_td_iq_channel actor noise_device) -add_dependencies(vrtsim generate_T) +target_link_libraries(vrtsim PRIVATE SIMU shm_td_iq_channel actor noise_device log_headers) add_boolean_option(OAI_VRTSIM_TAPS_CLIENT OFF "Enable taps client" ON) if (OAI_VRTSIM_TAPS_CLIENT) From eea7be3977ffa10adf4a58c3d5c0d9903a743432 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 11 Sep 2025 06:51:32 +0200 Subject: [PATCH 26/33] ldpc_segment: avoid T error, use log_headers for logging As parent. --- .../nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt | 6 +----- .../CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt | 7 +------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt index f96a2cfaca..8c2811e3a1 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/CMakeLists.txt @@ -3,8 +3,4 @@ add_library(ldpc_segment OBJECT nrLDPC_coding_segment_decoder.c nrLDPC_coding_segment_encoder.c ) - -#ensure that the T header files are generated before targets depending on them -if (${T_TRACER}) - add_dependencies(ldpc_segment generate_T) -endif (${T_TRACER}) +target_link_libraries(ldpc_segment PUBLIC log_headers) diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt index 0325858389..0d8f5571cd 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_xdma/CMakeLists.txt @@ -16,12 +16,7 @@ if (ENABLE_LDPC_XDMA) ) target_include_directories(ldpc_xdma PRIVATE ../nrLDPC_coding_segment) - #ensure that the T header files are generated before targets depending on them - if (${T_TRACER}) - add_dependencies(ldpc_xdma generate_T) - endif (${T_TRACER}) - - target_link_libraries(ldpc_xdma PRIVATE ldpc_gen_HEADERS) + target_link_libraries(ldpc_xdma PRIVATE ldpc_gen_HEADERS log_headers) set_target_properties(ldpc_xdma PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_dependencies(nr-softmodem ldpc_xdma) From 5716d95e978d78dbc2803068c3c6ceabdea9dc71 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 15 Sep 2025 07:46:56 +0000 Subject: [PATCH 27/33] nr_prachsim: remove unused include --- openair1/SIMULATION/NR_PHY/prachsim.c | 1 - 1 file changed, 1 deletion(-) diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index a13918a606..35e242cad3 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -64,7 +64,6 @@ #include "nfapi/oai_integration/vendor_ext.h" #include "nfapi_interface.h" #include "nfapi_nr_interface_scf.h" -#include "nr_common.h" #include "time_meas.h" #define NR_PRACH_DEBUG 1 From 1b81c4b09ca98b3b7216a9f603a47376252ce1af Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 13 Sep 2025 06:26:03 +0000 Subject: [PATCH 28/33] RLC only needs headers for logging --- openair2/LAYER2/nr_rlc/CMakeLists.txt | 4 ++-- openair2/LAYER2/nr_rlc/tests/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openair2/LAYER2/nr_rlc/CMakeLists.txt b/openair2/LAYER2/nr_rlc/CMakeLists.txt index 953822df10..7473b1d493 100644 --- a/openair2/LAYER2/nr_rlc/CMakeLists.txt +++ b/openair2/LAYER2/nr_rlc/CMakeLists.txt @@ -7,14 +7,14 @@ add_library(nr_rlc_core OBJECT nr_rlc_sdu.c nr_rlc_rx_manager.c) target_include_directories(nr_rlc_core PRIVATE ../../..) -target_link_libraries(nr_rlc_core PRIVATE ${T_LIB}) +target_link_libraries(nr_rlc_core PRIVATE log_headers) add_library(nr_rlc STATIC asn1_utils.c nr_rlc_oai_api.c nr_rlc_ue_manager.c ) # L2_NR: for PDCP -target_link_libraries(nr_rlc PUBLIC pthread f1ap nr_rlc_core UTIL ${T_LIB}) +target_link_libraries(nr_rlc PUBLIC pthread f1ap nr_rlc_core log_headers) target_include_directories(nr_rlc PRIVATE ../../..) target_link_libraries(nr_rlc PRIVATE asn1_lte_rrc asn1_nr_rrc) diff --git a/openair2/LAYER2/nr_rlc/tests/CMakeLists.txt b/openair2/LAYER2/nr_rlc/tests/CMakeLists.txt index c8d365ddf9..68d001ab94 100644 --- a/openair2/LAYER2/nr_rlc/tests/CMakeLists.txt +++ b/openair2/LAYER2/nr_rlc/tests/CMakeLists.txt @@ -1,7 +1,7 @@ foreach(TESTNUM RANGE 1 17) add_executable(nr_rlc_test_${TESTNUM} test.c) - target_link_libraries(nr_rlc_test_${TESTNUM} PRIVATE nr_rlc_core pthread UTIL ${T_LIB} minimal_lib) + target_link_libraries(nr_rlc_test_${TESTNUM} PRIVATE nr_rlc_core pthread utils minimal_lib) target_compile_definitions(nr_rlc_test_${TESTNUM} PRIVATE TEST="test${TESTNUM}.h") #target_include_directories(nr_rlc_test_${TESTNUM} PRIVATE LOG) #target_compile_options(nr_rlc_test_${TESTNUM} PRIVATE -g --coverage -Wall) From 1e476735eac1d5220413634fc9f10b5f9ff8356f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 12 Sep 2025 18:19:10 +0000 Subject: [PATCH 29/33] xforms uses logging --- openair1/PHY/TOOLS/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/openair1/PHY/TOOLS/CMakeLists.txt b/openair1/PHY/TOOLS/CMakeLists.txt index 8a3d912caa..dad31d0ede 100644 --- a/openair1/PHY/TOOLS/CMakeLists.txt +++ b/openair1/PHY/TOOLS/CMakeLists.txt @@ -45,6 +45,7 @@ if(ENABLE_UESCOPE OR ENABLE_ENBSCOPE OR ENABLE_NRSCOPE) lte_phy_scope.c ../../../executables/stats.c) target_link_libraries(xforms_common PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) + target_link_libraries(xforms_common PRIVATE log_headers) add_library(enbscope MODULE lte_enb_scope.c $) target_link_libraries(enbscope PUBLIC forms PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs UTIL) From cdbfaf835e2747c401f5cd140461db6a021664fb Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 13 Sep 2025 06:28:03 +0000 Subject: [PATCH 30/33] params_yaml has no dependency on UTIL These libraries have no dependencies on UTIL, so it's better to omit it. However, then the test is missing symbols for the config (which likely, indirectly came through UTIL -> LOG -> CONFIG_LIB, so add it now onto the test. --- common/config/yaml/CMakeLists.txt | 4 ++-- common/config/yaml/tests/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/config/yaml/CMakeLists.txt b/common/config/yaml/CMakeLists.txt index 635887e37e..cfcc57e2ab 100644 --- a/common/config/yaml/CMakeLists.txt +++ b/common/config/yaml/CMakeLists.txt @@ -8,11 +8,11 @@ else() endif() add_library(params_yaml_static config_yaml.cpp) -target_link_libraries(params_yaml_static PUBLIC UTIL yaml-cpp::yaml-cpp) +target_link_libraries(params_yaml_static PUBLIC yaml-cpp::yaml-cpp) if (ENABLE_TESTS) add_subdirectory(tests) endif() add_library(params_yaml MODULE config_yaml.cpp) -target_link_libraries(params_yaml PUBLIC UTIL yaml-cpp::yaml-cpp) +target_link_libraries(params_yaml PUBLIC yaml-cpp::yaml-cpp) set_target_properties(params_yaml PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) diff --git a/common/config/yaml/tests/CMakeLists.txt b/common/config/yaml/tests/CMakeLists.txt index e3f1002d79..a460ccfdd4 100644 --- a/common/config/yaml/tests/CMakeLists.txt +++ b/common/config/yaml/tests/CMakeLists.txt @@ -1,5 +1,5 @@ add_executable(test_yaml_config test_yaml_config.cpp) -target_link_libraries(test_yaml_config PRIVATE params_yaml_static GTest::gtest) +target_link_libraries(test_yaml_config PRIVATE params_yaml_static GTest::gtest CONFIG_LIB) add_dependencies(tests test_yaml_config) add_test(NAME test_yaml_config COMMAND ./test_yaml_config) From 4876533e9ca9114ac0b3f3b5a714bdfc5eff030e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Sat, 13 Sep 2025 06:31:48 +0000 Subject: [PATCH 31/33] F1AP IDs: Remove unnecessary dependency --- openair2/F1AP/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/F1AP/CMakeLists.txt b/openair2/F1AP/CMakeLists.txt index 78bc9435a2..53ab2823ed 100644 --- a/openair2/F1AP/CMakeLists.txt +++ b/openair2/F1AP/CMakeLists.txt @@ -3,7 +3,7 @@ add_subdirectory(MESSAGES) if(ENABLE_TESTS) add_executable(f1ap_ids_test f1ap_ids_test.c f1ap_ids.c) - target_link_libraries(f1ap_ids_test UTIL HASHTABLE minimal_lib) + target_link_libraries(f1ap_ids_test HASHTABLE minimal_lib) add_dependencies(tests f1ap_ids_test) add_test(NAME F1AP_ID_test COMMAND f1ap_ids_test) From 2ff949a16fe803fcffd2ea1fe720ec2c472b16f3 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 15 Sep 2025 13:14:46 +0000 Subject: [PATCH 32/33] Correct dependencies onto logging module These libraries depend on the logging module, so add the right dependency log_headers. Indirectly, this will fulfill the condition of T. I consider the prior usage of generate_T or {T_LIB} incorrect, because basically none of these libraries actually, actively use T, but rather only the logging module, which pulls in T. The dependency of log_headers will also take care of generating and including T headers, which is a dependency of the logging module. For conf2uedata and related, fulfill the dependency through conf2uedata_lib (on which the rest depends). --- common/utils/telnetsrv/CMakeLists.txt | 2 +- common/utils/time_manager/CMakeLists.txt | 2 +- nfapi/oai_integration/socket/CMakeLists.txt | 3 +-- openair2/LAYER2/NR_MAC_UE/CMakeLists.txt | 4 ++-- openair3/NAS/TOOLS/CMakeLists.txt | 7 +------ 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/common/utils/telnetsrv/CMakeLists.txt b/common/utils/telnetsrv/CMakeLists.txt index 1a740adbe2..a249596d97 100644 --- a/common/utils/telnetsrv/CMakeLists.txt +++ b/common/utils/telnetsrv/CMakeLists.txt @@ -44,7 +44,7 @@ add_library(telnetsrv_enb MODULE telnetsrv_enb_phycmd.c ) add_dependencies(telnetsrv telnetsrv_enb) -target_link_libraries(telnetsrv_enb PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs) +target_link_libraries(telnetsrv_enb PRIVATE asn1_nr_rrc_hdrs asn1_lte_rrc_hdrs log_headers) message(STATUS "No specific telnet functions for gnb") diff --git a/common/utils/time_manager/CMakeLists.txt b/common/utils/time_manager/CMakeLists.txt index 3a197ae556..37cae023b0 100644 --- a/common/utils/time_manager/CMakeLists.txt +++ b/common/utils/time_manager/CMakeLists.txt @@ -7,7 +7,7 @@ add_library(time_management_core OBJECT time_client.c) target_link_libraries(time_management PUBLIC time_management_core) -target_link_libraries(time_management_core PRIVATE ${T_LIB}) +target_link_libraries(time_management_core PRIVATE log_headers) if(ENABLE_TESTS) add_subdirectory(tests) diff --git a/nfapi/oai_integration/socket/CMakeLists.txt b/nfapi/oai_integration/socket/CMakeLists.txt index 57cad36362..a909372d37 100644 --- a/nfapi/oai_integration/socket/CMakeLists.txt +++ b/nfapi/oai_integration/socket/CMakeLists.txt @@ -8,7 +8,6 @@ target_include_directories(nfapi_socket_lib PRIVATE include/) target_compile_definitions(nfapi_socket_lib PUBLIC ENABLE_SOCKET) target_link_libraries(nfapi_socket_lib PRIVATE NFAPI_LIB NFAPI_USER_LIB) -target_link_libraries(nfapi_socket_lib PRIVATE LOG) -add_dependencies(nfapi_socket_lib generate_T) +target_link_libraries(nfapi_socket_lib PRIVATE log_headers) target_link_libraries(nfapi_socket_lib PRIVATE asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs) target_link_libraries(nfapi_socket_lib PRIVATE nr_fapi_p5 nr_fapi_p7) diff --git a/openair2/LAYER2/NR_MAC_UE/CMakeLists.txt b/openair2/LAYER2/NR_MAC_UE/CMakeLists.txt index aa583c8598..8a7fec829e 100644 --- a/openair2/LAYER2/NR_MAC_UE/CMakeLists.txt +++ b/openair2/LAYER2/NR_MAC_UE/CMakeLists.txt @@ -1,7 +1,7 @@ add_library(nr_ue_power_procedures nr_ue_power_procedures.c) -target_link_libraries(nr_ue_power_procedures PUBLIC asn1_nr_rrc ${T_LIB} MAC_NR_COMMON nr_common) +target_link_libraries(nr_ue_power_procedures PUBLIC asn1_nr_rrc log_headers MAC_NR_COMMON nr_common) add_library(nr_ue_ra_procedures nr_ra_procedures.c) -target_link_libraries(nr_ue_ra_procedures PUBLIC asn1_nr_rrc asn1_lte_rrc_hdrs ${T_LIB} MAC_NR_COMMON nr_common) +target_link_libraries(nr_ue_ra_procedures PUBLIC asn1_nr_rrc asn1_lte_rrc_hdrs log_headers MAC_NR_COMMON nr_common) if (ENABLE_TESTS) add_subdirectory(tests) endif() diff --git a/openair3/NAS/TOOLS/CMakeLists.txt b/openair3/NAS/TOOLS/CMakeLists.txt index e57db8255f..50058ad5bc 100755 --- a/openair3/NAS/TOOLS/CMakeLists.txt +++ b/openair3/NAS/TOOLS/CMakeLists.txt @@ -13,6 +13,7 @@ add_library(conf2uedata_lib OBJECT ${OPENAIR_DIR}/common/utils/mem/memory.c ${OPENAIR_DIR}/common/utils/utils.c ) +target_link_libraries(conf2uedata_lib PUBLIC log_headers) add_executable(conf2uedata conf2uedata.c) target_link_libraries(conf2uedata PRIVATE conf2uedata_lib) @@ -28,9 +29,3 @@ add_executable(nvram nvram.c) target_link_libraries(nvram PRIVATE conf2uedata_lib) set_target_properties(nvram PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) target_link_libraries(nvram PRIVATE LOG minimal_lib ${libconfig_LIBRARIES}) - -if (${T_TRACER}) - add_dependencies(conf2uedata generate_T) - add_dependencies(usim generate_T) - add_dependencies(nvram generate_T) -endif (${T_TRACER}) From 60ab0a89a2d1b1024efa7a6627dbfc682c88065e Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 16 Sep 2025 09:07:41 +0200 Subject: [PATCH 33/33] Build all targets in Cluster PhySim build --- docker/Dockerfile.phySim.rhel9 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile.phySim.rhel9 b/docker/Dockerfile.phySim.rhel9 index c5faab2ec7..abb85f9586 100644 --- a/docker/Dockerfile.phySim.rhel9 +++ b/docker/Dockerfile.phySim.rhel9 @@ -36,9 +36,14 @@ RUN dnf install -y libasan libubsan #run build_oai to build the target image RUN /bin/sh oaienv && \ - cd cmake_targets && \ - mkdir -p log && \ - ./build_oai --phy_simulators --ninja --sanitize --build-tool-opt -k10 --noavx512 -c --cmake-opt -DCMAKE_C_FLAGS=-Werror --cmake-opt -DCMAKE_CXX_FLAGS=-Werror --cmake-opt -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/opt/oai-physim/bin + mkdir -p cmake_targets/ran_build/build && \ + cd cmake_targets/ran_build/build && \ + cmake3 -GNinja ../../.. \ + -DAVX512=OFF -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror \ + -DENABLE_PHYSIM_TESTS=ON \ + -DSANITIZE_ADDRESS=ON -DSANITIZE_UNDEFINED=ON \ + -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=/opt/oai-physim/bin && \ + ninja -k10 -j36 #start from scratch for target executable FROM registry.access.redhat.com/ubi9/ubi:latest AS oai-physim