From 54990c2bc12aa50315a1995e4f268ee309785792 Mon Sep 17 00:00:00 2001 From: Guido Casati Date: Mon, 16 Dec 2024 15:45:58 +0100 Subject: [PATCH] Refactor includes in executables/nr-gnb.c * used IWYU tools + manual review * output from IWYU: The full include-list for /code/executables/nr-gnb.c: /#include // for dump_nr_I0_... /#include // lines 39-39 /#include // for threadCreate /#include // for SEEK_SET /#include // for dump_pdsch_... /#include // for dump_pusch_... /#include // for pthread_join /#include // for int64_t /#include // for NULL, fclose /#include // for memset /#include // for clock_gettime /#include // for sleep, size_t /#include "NR_PHY_INTERFACE/NR_IF_Module.h" // for NR_UL_IND_t /#include "PHY/INIT/nr_phy_init.h" // for init_DLSCH_... /#include "PHY/MODULATION/nr_modulation.h" // for apply_nr_ro... /#include "PHY/NR_TRANSPORT/nr_transport_proto.h" // for reset_activ... /#include "PHY/TOOLS/tools_defs.h" // for c16_t /#include "PHY/defs_RU.h" // for RU_t, proce... /#include "PHY/defs_common.h" // for wait_sync /#include "PHY/defs_gNB.h" // for PHY_VARS_gNB /#include "PHY/defs_nr_common.h" // for NR_DL_FRAME... /#include "PHY/impl_defs_nr.h" // for NR_MIXED_SLOT /#include "SCHED_NR/fapi_nr_l1.h" // for nr_schedule... /#include "SCHED_NR/phy_frame_config_nr.h" // for nr_slot_select /#include "SCHED_NR/sched_nr.h" // for L1_nr_prach... /#include "T.h" // for T3, T_PUT_p... /#include "assertions.h" // for AssertFatal /#include "common/ran_context.h" // for RAN_CONTEXT_t /#include "common/utils/LOG/log.h" // for NR_PHY, LOG_D /#include "executables/softmodem-common.h" // for get_softmod... /#include "nfapi/oai_integration/vendor_ext.h" // for NFAPI_MODE /#include "nfapi_nr_interface_scf.h" // for nfapi_nr_co... /#include "notified_fifo.h" // for initNotifie... /#include "thread-pool.h" // for abortTpool /#include "time_meas.h" // for print_meas_log /#include "utils.h" // for calloc_or_fail --- executables/nr-gnb.c | 71 +++++++++++++++++++------------------------- 1 file changed, 31 insertions(+), 40 deletions(-) diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index 4766481364..74a95c2794 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -31,54 +31,45 @@ */ #define _GNU_SOURCE -#include +#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all -#include "assertions.h" -#include -#include - -#include "PHY/types.h" - +#include // for SEEK_SET +#include // for pthread_join +#include +#include +#include +#include +#include +#include "common/utils/LOG/log.h" +#include "common/utils/system.h" +#include "PHY/NR_ESTIMATION/nr_ul_estimation.h" +#include "openair1/PHY/NR_TRANSPORT/nr_dlsch.h" +#include "openair1/PHY/NR_TRANSPORT/nr_ulsch.h" +#include "NR_PHY_INTERFACE/NR_IF_Module.h" #include "PHY/INIT/nr_phy_init.h" - +#include "PHY/MODULATION/nr_modulation.h" +#include "PHY/NR_TRANSPORT/nr_transport_proto.h" +#include "PHY/TOOLS/tools_defs.h" +#include "PHY/defs_RU.h" +#include "PHY/defs_common.h" #include "PHY/defs_gNB.h" +#include "PHY/defs_nr_common.h" +#include "PHY/impl_defs_nr.h" +#include "SCHED_NR/fapi_nr_l1.h" +#include "SCHED_NR/phy_frame_config_nr.h" #include "SCHED_NR/sched_nr.h" -#include "SCHED_NR/fapi_nr_l1.h" -#include "PHY/NR_TRANSPORT/nr_transport_proto.h" -#include "PHY/MODULATION/nr_modulation.h" -#include "PHY/NR_TRANSPORT/nr_dlsch.h" -#include "openair2/NR_PHY_INTERFACE/nr_sched_response.h" -#include "LAYER2/NR_MAC_gNB/mac_proto.h" - -#include "radio/COMMON/common_lib.h" -#include "PHY/LTE_TRANSPORT/if4_tools.h" - -#include "PHY/phy_extern.h" - +#include "assertions.h" #include "common/ran_context.h" -#include "RRC/LTE/rrc_extern.h" -#include "PHY_INTERFACE/phy_interface.h" #include "common/utils/LOG/log.h" -#include "UTIL/OTG/otg_tx.h" -#include "UTIL/OTG/otg_externs.h" -#include "common/utils/LOG/vcd_signal_dumper.h" -#include "UTIL/OPT/opt.h" -#include "gnb_paramdef.h" - -#include - -#include "T.h" -#include "nfapi/oai_integration/vendor_ext.h" #include "executables/softmodem-common.h" -#include -#include -#include -#include +#include "nfapi/oai_integration/vendor_ext.h" +#include "nfapi_nr_interface_scf.h" +#include "notified_fifo.h" +#include "openair2/NR_PHY_INTERFACE/nr_sched_response.h" +#include "thread-pool.h" +#include "time_meas.h" +#include "utils.h" -// #define USRP_DEBUG 1 -#include "executables/thread-common.h" - -//#define TICK_TO_US(ts) (ts.diff) #define TICK_TO_US(ts) (ts.trials==0?0:ts.diff/ts.trials) #define L1STATSSTRLEN 16384 static void rx_func(processingData_L1_t *param);