diff --git a/common/platform_types.h b/common/platform_types.h index b44efb6c7e..8cbd502fda 100644 --- a/common/platform_types.h +++ b/common/platform_types.h @@ -69,6 +69,11 @@ typedef bool sl_discovery_flag_t; #define SL_DISCOVERY_FLAG_NO false #define SL_DISCOVERY_FLAG_YES true +typedef enum { + TDD = 1, + FDD = 0 +} frame_type_t; + typedef enum link_direction_e { UNKNOWN_DIR = 0, DIR_UPLINK = 1, DIR_DOWNLINK = 2 } link_direction_t; typedef enum rb_type_e { UNKNOWN_RADIO_BEARER = 0, SIGNALLING_RADIO_BEARER = 1, RADIO_ACCESS_BEARER = 2 } rb_type_t; diff --git a/common/utils/nr/nr_common.c b/common/utils/nr/nr_common.c index f389fbf33b..da5e5dd989 100644 --- a/common/utils/nr/nr_common.c +++ b/common/utils/nr/nr_common.c @@ -33,6 +33,8 @@ #include #include "assertions.h" #include "common/utils/assertions.h" +#include "common/utils/LOG/log.h" +#include "openair1/PHY/TOOLS/tools_defs.h" #include "nr_common.h" #include diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h index 2bc7ac4378..4a0e1c2f19 100644 --- a/common/utils/nr/nr_common.h +++ b/common/utils/nr/nr_common.h @@ -36,7 +36,8 @@ #include #include #include "assertions.h" -#include "PHY/defs_common.h" +#include "PHY/sse_intrin.h" +#include "common/utils/utils.h" #define NR_MAX_PDSCH_TBS 3824 #define MAX_NUM_BEAM_PERIODS 4 diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c index 4dabe78b15..482da9a1cf 100644 --- a/executables/nr-softmodem.c +++ b/executables/nr-softmodem.c @@ -51,7 +51,6 @@ unsigned short config_frames[4] = {2,9,11,13}; #include "LAYER2/NR_MAC_gNB/nr_mac_gNB.h" #include "PHY/INIT/nr_phy_init.h" #include "PHY/TOOLS/phy_scope_interface.h" -#include "PHY/defs_common.h" #include "PHY/defs_gNB.h" #include "PHY/defs_nr_common.h" #include "PHY/phy_vars.h" diff --git a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c index 46919e1983..ebd1ddf2dd 100644 --- a/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c +++ b/openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c @@ -19,10 +19,9 @@ * contact@openairinterface.org */ -#include "PHY/defs_common.h" #include "PHY/sse_intrin.h" - #include "nr_rate_matching.h" +#include "common/utils/LOG/log.h" // #define RM_DEBUG 1 diff --git a/openair1/PHY/defs_common.h b/openair1/PHY/defs_common.h index 1ca8d35559..b6619efc6e 100644 --- a/openair1/PHY/defs_common.h +++ b/openair1/PHY/defs_common.h @@ -100,8 +100,6 @@ #define TC_NSEC_x32768 16667 -typedef enum {TDD=1,FDD=0} frame_type_t; - typedef enum {EXTENDED=1,NORMAL=0} lte_prefix_type_t; typedef enum {LOCALIZED=0,DISTRIBUTED=1} vrb_t; diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index 0c5a96e6db..59d92444d5 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -39,12 +39,10 @@ #include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h" #include "PHY/NR_TRANSPORT/nr_transport_common_proto.h" #include "PHY/impl_defs_top.h" -#include "PHY/defs_common.h" #include "PHY/CODING/nrLDPC_coding/nrLDPC_coding_interface.h" #include "PHY/CODING/nrLDPC_extern.h" #include "PHY/CODING/nrLDPC_decoder/nrLDPC_types.h" #include "nfapi_nr_interface_scf.h" -#include "openair2/NR_PHY_INTERFACE/NR_IF_Module.h" #define MAX_NUM_RU_PER_gNB 8 #define MAX_PUCCH0_NID 8 diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index 7a3f59504d..795cbca3d2 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -34,7 +34,6 @@ #define __PHY_DEFS_NR_COMMON__H__ #include "PHY/impl_defs_top.h" -#include "defs_common.h" #include "nfapi_nr_interface_scf.h" #include "impl_defs_nr.h" #include "PHY/CODING/nrPolar_tools/nr_polar_defs.h" diff --git a/openair1/SIMULATION/LTE_PHY/common_sim.h b/openair1/SIMULATION/LTE_PHY/common_sim.h index aaea26c5bb..965160fac9 100644 --- a/openair1/SIMULATION/LTE_PHY/common_sim.h +++ b/openair1/SIMULATION/LTE_PHY/common_sim.h @@ -1,3 +1,4 @@ +#include "PHY/defs_common.h" double median(varArray_t *input) { return *(double *)((uint8_t *)(input+1)+(input->size/2)*input->atomSize); diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 95c32bdb94..398923b655 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -56,7 +56,6 @@ #include "PHY/NR_UE_TRANSPORT/nr_transport_ue.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_UE.h" #include "PHY/defs_nr_common.h" diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index 93f77649e2..ed872be341 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -42,7 +42,6 @@ #include "PHY/NR_UE_TRANSPORT/nr_transport_ue.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_UE.h" #include "PHY/defs_nr_common.h" diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 276b1f3500..1b26869568 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -56,7 +56,6 @@ #include "PHY/NR_UE_TRANSPORT/nr_transport_ue.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_UE.h" #include "PHY/defs_nr_common.h" diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 24da0a04f4..deb8835157 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -40,7 +40,6 @@ #include "L1_nr_paramdef.h" #include "MACRLC_nr_paramdef.h" #include "PHY/INIT/nr_phy_init.h" -#include "PHY/defs_common.h" #include "PHY/defs_gNB.h" #include "PHY/defs_nr_common.h" #include "RRC/NR/nr_rrc_config.h" @@ -71,7 +70,6 @@ #include "ngap_messages_types.h" #include "nr_common.h" #include "oai_asn1.h" -#include "openair1/PHY/defs_common.h" #include "prs_nr_paramdef.h" #include "radio/ETHERNET/if_defs.h" #include "rrc_messages_types.h" diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c index 3ce0867383..96819378f0 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_compute_tbs_common.c @@ -26,6 +26,7 @@ #define INDEX_MAX_TBS_TABLE (93) #include "common/utils/nr/nr_common.h" +#include "common/utils/LOG/log.h" #include //Table 5.1.2.2-2 diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h index a83c85dd25..007976a1a5 100644 --- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h +++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac.h @@ -38,8 +38,10 @@ #include #include #include "common/utils/nr/nr_common.h" +#include "common/utils/LOG/log.h" #include "NR_CellGroupConfig.h" +#define MAX_FRAME_NUMBER 0x400 #define NR_SHORT_BSR_TABLE_SIZE 32 #define NR_LONG_BSR_TABLE_SIZE 256 diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 2d6ae1ba75..e28d878b0b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -44,7 +44,6 @@ #include "NR_ServingCellConfigCommon.h" #include "NR_MIB.h" #include "PHY/TOOLS/tools_defs.h" -#include "PHY/defs_common.h" #include "RRC/NR/nr_rrc_config.h" #include "SCHED_NR/phy_frame_config_nr.h" #include "T.h" diff --git a/openair2/LAYER2/NR_MAC_gNB/main.c b/openair2/LAYER2/NR_MAC_gNB/main.c index a8fe8de79c..ccf812c751 100644 --- a/openair2/LAYER2/NR_MAC_gNB/main.c +++ b/openair2/LAYER2/NR_MAC_gNB/main.c @@ -53,7 +53,6 @@ #include "NR_ServingCellConfig.h" #include "NR_ServingCellConfigCommon.h" #include "NR_TAG.h" -#include "PHY/defs_common.h" #include "RRC/NR/MESSAGES/asn1_msg.h" #include "RRC/NR/nr_rrc_config.h" #include "assertions.h" diff --git a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c index 96701dbb83..5dcc631776 100644 --- a/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c +++ b/openair2/LAYER2/nr_pdcp/cucp_cuup_handler.c @@ -29,7 +29,6 @@ #include "NR_PDCP-Config.h" #include "NR_QFI.h" #include "NR_SDAP-Config.h" -#include "PHY/defs_common.h" #include "RRC/NR/nr_rrc_common.h" #include "SDAP/nr_sdap/nr_sdap_entity.h" #include "asn_internal.h" diff --git a/openair2/M2AP/m2ap_timers.c b/openair2/M2AP/m2ap_timers.c index 13ec6423ac..f4d4f473c5 100644 --- a/openair2/M2AP/m2ap_timers.c +++ b/openair2/M2AP/m2ap_timers.c @@ -21,7 +21,6 @@ #include "m2ap_timers.h" #include "assertions.h" -#include "PHY/defs_common.h" /* TODO: try to not include this */ #include "m2ap_messages_types.h" #include "m2ap_eNB_defs.h" #include "m2ap_ids.h" diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c index 666b691951..e82a185ba8 100644 --- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c @@ -35,7 +35,6 @@ #include #include #include "LAYER2/NR_MAC_gNB/mac_proto.h" -#include "PHY/defs_common.h" #include "common/platform_constants.h" #include "common/utils/T/T.h" #include "executables/softmodem-common.h" diff --git a/openair2/RRC/NR/nr_rrc_config.h b/openair2/RRC/NR/nr_rrc_config.h index b72acf9770..707e46cd66 100644 --- a/openair2/RRC/NR/nr_rrc_config.h +++ b/openair2/RRC/NR/nr_rrc_config.h @@ -38,8 +38,8 @@ #include "NR_CellGroupConfig.h" #include "NR_UE-NR-Capability.h" #include "NR_UL-CCCH-Message.h" -#include "PHY/defs_common.h" #include "f1ap_messages_types.h" +#include "common/platform_types.h" struct NR_MeasurementTimingConfiguration; struct NR_PDSCH_TimeDomainResourceAllocationList; diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 22bf766716..01db036e22 100644 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -48,7 +48,6 @@ #include "NGAP_CauseRadioNetwork.h" #include "openair2/LAYER2/NR_MAC_COMMON/nr_mac.h" #include "OCTET_STRING.h" -#include "PHY/defs_common.h" #include "RRC/NR/MESSAGES/asn1_msg.h" #include "RRC/NR/mac_rrc_dl.h" #include "RRC/NR/nr_rrc_common.h" diff --git a/openair2/RRC/NR/rrc_gNB_NGAP.c b/openair2/RRC/NR/rrc_gNB_NGAP.c index c1715c438c..fa6d6e03bc 100644 --- a/openair2/RRC/NR/rrc_gNB_NGAP.c +++ b/openair2/RRC/NR/rrc_gNB_NGAP.c @@ -52,7 +52,6 @@ #include "NR_UERadioAccessCapabilityInformation.h" #include "MAC/mac.h" #include "OCTET_STRING.h" -#include "PHY/defs_common.h" #include "RRC/NR/MESSAGES/asn1_msg.h" #include "RRC/NR/nr_rrc_common.h" #include "RRC/NR/nr_rrc_defs.h" diff --git a/openair2/RRC/NR/rrc_gNB_du.c b/openair2/RRC/NR/rrc_gNB_du.c index 402e245dac..6c7c157374 100644 --- a/openair2/RRC/NR/rrc_gNB_du.c +++ b/openair2/RRC/NR/rrc_gNB_du.c @@ -26,7 +26,6 @@ #include "F1AP_CauseMisc.h" #include "F1AP_CauseProtocol.h" #include "F1AP_CauseRadioNetwork.h" -#include "PHY/defs_common.h" #include "T.h" #include "asn_codecs.h" #include "assertions.h" diff --git a/openair2/RRC/NR/rrc_gNB_internode.c b/openair2/RRC/NR/rrc_gNB_internode.c index 4fbca5f8f0..843eaca250 100644 --- a/openair2/RRC/NR/rrc_gNB_internode.c +++ b/openair2/RRC/NR/rrc_gNB_internode.c @@ -34,7 +34,6 @@ #include #include #include "OCTET_STRING.h" -#include "PHY/defs_common.h" #include "RRC/NR/nr_rrc_proto.h" #include "T.h" #include "asn_codecs.h" diff --git a/openair2/RRC/NR/rrc_gNB_nsa.c b/openair2/RRC/NR/rrc_gNB_nsa.c index 595e380846..e41875027e 100644 --- a/openair2/RRC/NR/rrc_gNB_nsa.c +++ b/openair2/RRC/NR/rrc_gNB_nsa.c @@ -40,7 +40,6 @@ #include #include "MESSAGES/asn1_msg.h" #include "OCTET_STRING.h" -#include "PHY/defs_common.h" #include "RRC/NR/nr_rrc_config.h" #include "T.h" #include "asn_codecs.h" diff --git a/openair2/RRC/NR/rrc_gNB_radio_bearers.c b/openair2/RRC/NR/rrc_gNB_radio_bearers.c index 8255ccdb38..35ae278b2a 100644 --- a/openair2/RRC/NR/rrc_gNB_radio_bearers.c +++ b/openair2/RRC/NR/rrc_gNB_radio_bearers.c @@ -22,7 +22,6 @@ #include "rrc_gNB_radio_bearers.h" #include #include "E1AP_RLC-Mode.h" -#include "PHY/defs_common.h" #include "RRC/NR/nr_rrc_defs.h" #include "T.h" #include "asn_internal.h" diff --git a/openair2/SDAP/nr_sdap/nr_sdap_entity.c b/openair2/SDAP/nr_sdap/nr_sdap_entity.c index bf9eb97666..aae6b81540 100644 --- a/openair2/SDAP/nr_sdap/nr_sdap_entity.c +++ b/openair2/SDAP/nr_sdap/nr_sdap_entity.c @@ -25,7 +25,6 @@ #include #include #include -#include "PHY/defs_common.h" #include "T.h" #include "assertions.h" #include "common/utils/T/T.h" diff --git a/openair2/X2AP/x2ap_timers.c b/openair2/X2AP/x2ap_timers.c index 98674de51b..ac619d5b0f 100644 --- a/openair2/X2AP/x2ap_timers.c +++ b/openair2/X2AP/x2ap_timers.c @@ -21,7 +21,6 @@ #include "x2ap_timers.h" #include "assertions.h" -#include "PHY/defs_common.h" /* TODO: try to not include this */ #include "x2ap_messages_types.h" #include "x2ap_eNB_defs.h" #include "x2ap_ids.h" diff --git a/openair3/M3AP/m3ap_timers.c b/openair3/M3AP/m3ap_timers.c index 39498cc8eb..98d3c43348 100644 --- a/openair3/M3AP/m3ap_timers.c +++ b/openair3/M3AP/m3ap_timers.c @@ -21,7 +21,6 @@ #include "m3ap_timers.h" #include "assertions.h" -#include "PHY/defs_common.h" /* TODO: try to not include this */ #include "m3ap_messages_types.h" #include "m3ap_MCE_defs.h" #include "m3ap_ids.h" diff --git a/openair3/NGAP/ngap_gNB.c b/openair3/NGAP/ngap_gNB.c index b60ac1c13c..de466daddf 100644 --- a/openair3/NGAP/ngap_gNB.c +++ b/openair3/NGAP/ngap_gNB.c @@ -37,7 +37,6 @@ #include "BIT_STRING.h" #include "ngap_msg_includes.h" #include "OCTET_STRING.h" -#include "PHY/defs_common.h" #include "T.h" #include "asn_internal.h" #include "assertions.h" diff --git a/openair3/NGAP/ngap_gNB_handlers.c b/openair3/NGAP/ngap_gNB_handlers.c index 6309485e2d..97f15ef658 100644 --- a/openair3/NGAP/ngap_gNB_handlers.c +++ b/openair3/NGAP/ngap_gNB_handlers.c @@ -35,7 +35,6 @@ #include "INTEGER.h" #include "ngap_msg_includes.h" #include "OCTET_STRING.h" -#include "PHY/defs_common.h" #include "T.h" #include "assertions.h" #include "common/utils/T/T.h" diff --git a/openair3/NGAP/ngap_gNB_nas_procedures.c b/openair3/NGAP/ngap_gNB_nas_procedures.c index 83daacf758..83c004fc74 100644 --- a/openair3/NGAP/ngap_gNB_nas_procedures.c +++ b/openair3/NGAP/ngap_gNB_nas_procedures.c @@ -39,7 +39,6 @@ #include "INTEGER.h" #include "ngap_msg_includes.h" #include "OCTET_STRING.h" -#include "PHY/defs_common.h" #include "T.h" #include "aper_encoder.h" #include "asn_application.h" diff --git a/openair3/NGAP/ngap_gNB_ue_context.c b/openair3/NGAP/ngap_gNB_ue_context.c index 894491ebbe..c4b7b012ef 100644 --- a/openair3/NGAP/ngap_gNB_ue_context.c +++ b/openair3/NGAP/ngap_gNB_ue_context.c @@ -30,7 +30,6 @@ #include "ngap_gNB_ue_context.h" #include #include -#include "PHY/defs_common.h" #include "T.h" #include "common/utils/T/T.h" #include "ngap_common.h"