From 803d87ef549d8ef63be95fbd62ba2589b9f7f126 Mon Sep 17 00:00:00 2001 From: francescomani Date: Wed, 4 Mar 2026 13:58:50 +0100 Subject: [PATCH] harmonize the use of definition for number of symbols per slot (no need to have two of them) --- common/utils/nr/nr_common.h | 4 +- executables/nr-ru.c | 2 +- executables/nr-ue.c | 2 +- openair1/PHY/INIT/nr_init.c | 4 +- openair1/PHY/MODULATION/modulation_common.h | 2 +- openair1/PHY/MODULATION/nr_modulation.h | 2 +- openair1/PHY/MODULATION/ofdm_mod.c | 2 +- openair1/PHY/MODULATION/slot_fep_nr.c | 2 +- openair1/PHY/NR_TRANSPORT/nr_prach.c | 2 +- openair1/PHY/NR_TRANSPORT/nr_ulsch.c | 2 +- openair1/PHY/NR_TRANSPORT/pucch_rx.c | 4 +- openair1/PHY/NR_TRANSPORT/srs_rx.c | 2 +- .../NR_UE_TRANSPORT/nr_transport_proto_ue.h | 6 +-- openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c | 20 +++++----- openair1/PHY/defs_nr_common.h | 2 - openair1/SCHED_NR/nr_ru_procedures.c | 2 +- openair1/SCHED_NR/phy_frame_config_nr.c | 37 +++++++++---------- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 4 +- openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 10 ++--- .../SCHED_NR_UE/phy_procedures_nr_ue_sl.c | 2 +- openair1/SCHED_NR_UE/pucch_uci_ue_nr.c | 2 +- openair1/SIMULATION/NR_PHY/dlsim.c | 2 +- openair1/SIMULATION/NR_PHY/srssim.c | 2 +- openair2/LAYER2/NR_MAC_UE/config_ue.c | 10 ++--- openair2/LAYER2/NR_MAC_UE/config_ue_sl.c | 10 ++--- openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c | 4 +- .../LAYER2/NR_MAC_UE/nr_ue_scheduler_sl.c | 8 ++-- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c | 2 +- .../LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c | 2 +- openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c | 2 +- openair2/RRC/NR_UE/verify_RRC.c | 4 +- 33 files changed, 81 insertions(+), 84 deletions(-) diff --git a/common/utils/nr/nr_common.h b/common/utils/nr/nr_common.h index 58dad544cc..3da8b7ece3 100644 --- a/common/utils/nr/nr_common.h +++ b/common/utils/nr/nr_common.h @@ -84,8 +84,8 @@ static inline const char *rnti_types(nr_rnti_type_t rr) #define MU_SCS(m) (15 << m) #define MAX_GSCN_BAND 620 // n78 has the highest GSCN range of 619 -#define NR_NUMBER_OF_SYMBOLS_PER_SLOT 14 -#define NR_NUMBER_OF_SYMBOLS_PER_SLOT_EXTENDED_CP 12 +#define NR_SYMBOLS_PER_SLOT 14 +#define NR_SYMBOLS_PER_SLOT_EXTENDED_CP 12 #define NR_MAX_NB_LAYERS 4 // 8 #define NR_MAX_CSI_PORTS 12 diff --git a/executables/nr-ru.c b/executables/nr-ru.c index 7c5a87a0b0..2f5f136d17 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -538,7 +538,7 @@ void tx_rf(RU_t *ru, int frame,int slot, uint64_t timestamp) if(slot_type == NR_MIXED_SLOT) { int txsymb = 0; - for(int symbol_count = 0; symbol_counttdd_table.max_tdd_periodicity_list[slot].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value == 0) txsymb++; } diff --git a/executables/nr-ue.c b/executables/nr-ue.c index 75814596d3..f52f418732 100644 --- a/executables/nr-ue.c +++ b/executables/nr-ue.c @@ -281,7 +281,7 @@ static int nr_ue_slot_select(const fapi_nr_config_request_t *cfg, int nr_slot) if (current_slot->max_num_of_symbol_per_slot_list[0].slot_config == 2) return NR_MIXED_SLOT; - for (int i = 1; i < NR_NUMBER_OF_SYMBOLS_PER_SLOT; i++) { + for (int i = 1; i < NR_SYMBOLS_PER_SLOT; i++) { // if the 1st symbol is DL and any other is not, the slot is mixed if (current_slot->max_num_of_symbol_per_slot_list[i].slot_config != 0) { return NR_MIXED_SLOT; diff --git a/openair1/PHY/INIT/nr_init.c b/openair1/PHY/INIT/nr_init.c index d8b34b2598..e140b9dab0 100644 --- a/openair1/PHY/INIT/nr_init.c +++ b/openair1/PHY/INIT/nr_init.c @@ -435,8 +435,8 @@ void init_nr_transport(PHY_VARS_gNB *gNB) fp->slots_per_frame; int nb_ul_slots_period = 0; if (cfg->cell_config.frame_duplex_type.value) { - for(int i=0; itdd_table.max_tdd_periodicity_list[i].max_num_of_symbol_per_slot_list[j].slot_config.value == 1) { // UL symbol nb_ul_slots_period++; break; diff --git a/openair1/PHY/MODULATION/modulation_common.h b/openair1/PHY/MODULATION/modulation_common.h index 2973c36257..3e418594bc 100644 --- a/openair1/PHY/MODULATION/modulation_common.h +++ b/openair1/PHY/MODULATION/modulation_common.h @@ -53,7 +53,7 @@ void nr_normal_prefix_mod(c16_t *txdataF, uint8_t nsymb, const NR_DL_FRAME_PARMS *frame_parms, uint32_t slot, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]); + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]); void do_OFDM_mod(c16_t **txdataF, c16_t **txdata, uint32_t frame,uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms); diff --git a/openair1/PHY/MODULATION/nr_modulation.h b/openair1/PHY/MODULATION/nr_modulation.h index 9e8ac3ba3c..52a64fc161 100644 --- a/openair1/PHY/MODULATION/nr_modulation.h +++ b/openair1/PHY/MODULATION/nr_modulation.h @@ -118,7 +118,7 @@ void nr_ofdm_demod_and_rx_rotation(c16_t **rxdata, int slot, int slot_offsetF, enum nr_Link linktype, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]); + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]); void perform_symbol_rotation(NR_DL_FRAME_PARMS *fp, double f0, c16_t *symbol_rotation); diff --git a/openair1/PHY/MODULATION/ofdm_mod.c b/openair1/PHY/MODULATION/ofdm_mod.c index c3311fb78a..23f7b296c8 100644 --- a/openair1/PHY/MODULATION/ofdm_mod.c +++ b/openair1/PHY/MODULATION/ofdm_mod.c @@ -72,7 +72,7 @@ void nr_normal_prefix_mod(c16_t *txdataF, uint8_t nsymb, const NR_DL_FRAME_PARMS *frame_parms, uint32_t slot, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]) + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]) { // This function works only slot wise. For more generic symbol generation refer nr_feptx0() if (frame_parms->numerology_index != 0) { // case where numerology != 0 diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index 99cbf1c652..b690657ad5 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -227,7 +227,7 @@ void nr_ofdm_demod_and_rx_rotation(c16_t **rxdata, int slot, int slot_offsetF, enum nr_Link linktype, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]) + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]) { for (int aa = 0; aa < nb_antennas; aa++) { for (uint8_t symbol = 0; symbol < fp->symbols_per_slot; symbol++) { diff --git a/openair1/PHY/NR_TRANSPORT/nr_prach.c b/openair1/PHY/NR_TRANSPORT/nr_prach.c index e42c02953c..5395c33df9 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prach.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prach.c @@ -105,7 +105,7 @@ prach_item_t *nr_schedule_rx_prach(PHY_VARS_gNB *gNB, int SFN, int Slot, nfapi_n fapi_beam_idx, &gNB->common_vars, Slot, - NR_NUMBER_OF_SYMBOLS_PER_SLOT, + NR_SYMBOLS_PER_SLOT, bitmap); } } diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch.c index b963b7d970..72dccf4a40 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch.c @@ -160,7 +160,7 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_pusch_pdu_t fapi_beam_idx, &gNB->common_vars, slot, - NR_NUMBER_OF_SYMBOLS_PER_SLOT, + NR_SYMBOLS_PER_SLOT, bitmap); } ulsch->frame = frame; diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index aa3a6e5907..51cb354f98 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -73,7 +73,7 @@ void nr_fill_pucch(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_pucch_pdu_t fapi_beam_idx, &gNB->common_vars, slot, - NR_NUMBER_OF_SYMBOLS_PER_SLOT, + NR_SYMBOLS_PER_SLOT, bitmap); } memcpy((void *)&pucch->pucch_pdu, (void *)pucch_pdu, sizeof(nfapi_nr_pucch_pdu_t)); @@ -1069,7 +1069,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, // first compute DMRS component const int scramble = pucch_pdu->dmrs_scrambling_id * 2; uint32_t x2 = - ((1ULL << 17) * ((NR_NUMBER_OF_SYMBOLS_PER_SLOT * slot + pucch_pdu->start_symbol_index + symb + 1) * (scramble + 1)) + ((1ULL << 17) * ((NR_SYMBOLS_PER_SLOT * slot + pucch_pdu->start_symbol_index + symb + 1) * (scramble + 1)) + scramble) % (1U << 31); // c_init calculation according to TS38.211 subclause #ifdef DEBUG_NR_PUCCH_RX diff --git a/openair1/PHY/NR_TRANSPORT/srs_rx.c b/openair1/PHY/NR_TRANSPORT/srs_rx.c index 0637a8abce..05cddefd20 100644 --- a/openair1/PHY/NR_TRANSPORT/srs_rx.c +++ b/openair1/PHY/NR_TRANSPORT/srs_rx.c @@ -63,7 +63,7 @@ void nr_fill_srs(PHY_VARS_gNB *gNB, frame_t frame, slot_t slot, nfapi_nr_srs_pdu fapi_beam_idx, &gNB->common_vars, slot, - NR_NUMBER_OF_SYMBOLS_PER_SLOT, + NR_SYMBOLS_PER_SLOT, bitmap); } memcpy((void *)&srs->srs_pdu, (void *)srs_pdu, sizeof(nfapi_nr_srs_pdu_t)); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h index 6872306dfe..d80a99bb73 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h @@ -162,7 +162,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, const uint8_t slot, nr_phy_data_tx_t *phy_data, c16_t **txdataF, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]); + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]); /** \brief This function does IFFT for PUSCH */ @@ -173,14 +173,14 @@ uint8_t nr_tx_rotation_and_ofdm_mod(const uint8_t slot, c16_t **txdataF, c16_t **txdata, uint32_t linktype, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT], + bool was_symbol_used[NR_SYMBOLS_PER_SLOT], bool no_phase_pre_comp); bool ue_srs_procedures_nr(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, c16_t **txdataF, nr_phy_data_tx_t *phy_data, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]); + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]); void clean_UE_harq(PHY_VARS_NR_UE *UE); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 881ce016bc..25b5766f07 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -1027,11 +1027,11 @@ static uci_on_pusch_bit_type_t *nr_data_control_mapping(const nfapi_nr_ue_pusch_ if (!pusch_pdu || !codeword || codeword_len == 0 || !template) return NULL; const uint8_t n_symbols = pusch_pdu->nr_of_symbols; - if (n_symbols == 0 || n_symbols > NR_NUMBER_OF_SYMBOLS_PER_SLOT) + if (n_symbols == 0 || n_symbols > NR_SYMBOLS_PER_SLOT) return NULL; - uint32_t m_ulsch_initial[NR_NUMBER_OF_SYMBOLS_PER_SLOT] = {0}; - uint32_t m_uci_current[NR_NUMBER_OF_SYMBOLS_PER_SLOT] = {0}; // This holds RE counts, not bit counts + uint32_t m_ulsch_initial[NR_SYMBOLS_PER_SLOT] = {0}; + uint32_t m_uci_current[NR_SYMBOLS_PER_SLOT] = {0}; // This holds RE counts, not bit counts if (initialize_mapping_resources(pusch_pdu, m_ulsch_initial, m_uci_current) != 0) { LOG_E(PHY, "Failed to initialize mapping resources\n"); @@ -1048,8 +1048,8 @@ static uci_on_pusch_bit_type_t *nr_data_control_mapping(const nfapi_nr_ue_pusch_ memset(template, 0, codeword_len * sizeof(uci_on_pusch_bit_type_t)); - uint32_t positions_by_sym[NR_NUMBER_OF_SYMBOLS_PER_SLOT][MAX_UCI_CODED_BITS] = {0}; - uint32_t count_by_sym[NR_NUMBER_OF_SYMBOLS_PER_SLOT] = {0}; + uint32_t positions_by_sym[NR_SYMBOLS_PER_SLOT][MAX_UCI_CODED_BITS] = {0}; + uint32_t count_by_sym[NR_SYMBOLS_PER_SLOT] = {0}; struct map_uci_common_arg map_arg = {.template = template, .n_symbols = pusch_pdu->nr_of_symbols, @@ -1094,7 +1094,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, const uint8_t slot, nr_phy_data_tx_t *phy_data, c16_t **txdataF, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]) + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]) { int harq_pid = phy_data->ulsch.pusch_pdu.pusch_data.harq_process_id; @@ -1609,13 +1609,13 @@ uint8_t nr_tx_rotation_and_ofdm_mod(const uint8_t slot, c16_t **txdataF, c16_t **txdata, uint32_t linktype, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT], + bool was_symbol_used[NR_SYMBOLS_PER_SLOT], bool no_phase_pre_comp) { int N_RB = (linktype == link_type_sl) ? frame_parms->N_RB_SL : frame_parms->N_RB_UL; if (!no_phase_pre_comp) { - for (int i = 0; i < NR_NUMBER_OF_SYMBOLS_PER_SLOT; i++) { + for (int i = 0; i < NR_SYMBOLS_PER_SLOT; i++) { if (was_symbol_used[i] == false) continue; for (int ap = 0; ap < n_antenna_ports; ap++) { @@ -1626,7 +1626,7 @@ uint8_t nr_tx_rotation_and_ofdm_mod(const uint8_t slot, for (int ap = 0; ap < n_antenna_ports; ap++) { if (frame_parms->Ncp == 1) { // extended cyclic prefix - for (int i = 0; i < NR_NUMBER_OF_SYMBOLS_PER_SLOT_EXTENDED_CP; i++) { + for (int i = 0; i < NR_SYMBOLS_PER_SLOT_EXTENDED_CP; i++) { if (was_symbol_used[i] == false) { memset(&txdata[ap][(frame_parms->ofdm_symbol_size + frame_parms->nb_prefix_samples) * i], 0, @@ -1641,7 +1641,7 @@ uint8_t nr_tx_rotation_and_ofdm_mod(const uint8_t slot, CYCLIC_PREFIX); } } else { // normal cyclic prefix - nr_normal_prefix_mod(txdataF[ap], txdata[ap], NR_NUMBER_OF_SYMBOLS_PER_SLOT, frame_parms, slot, was_symbol_used); + nr_normal_prefix_mod(txdataF[ap], txdata[ap], NR_SYMBOLS_PER_SLOT, frame_parms, slot, was_symbol_used); } } diff --git a/openair1/PHY/defs_nr_common.h b/openair1/PHY/defs_nr_common.h index 20fc744f57..4b6737a4ed 100644 --- a/openair1/PHY/defs_nr_common.h +++ b/openair1/PHY/defs_nr_common.h @@ -42,8 +42,6 @@ #define MAX_NUM_SUBCARRIER_SPACING 5 #define NR_MAX_OFDM_SYMBOL_SIZE 8192 -#define NR_SYMBOLS_PER_SLOT NR_NUMBER_OF_SYMBOLS_PER_SLOT - #define ONE_OVER_SQRT2_Q15 23170 #define NR_MOD_TABLE_SIZE_SHORT 686 diff --git a/openair1/SCHED_NR/nr_ru_procedures.c b/openair1/SCHED_NR/nr_ru_procedures.c index ca712bbaf9..e19b332c80 100644 --- a/openair1/SCHED_NR/nr_ru_procedures.c +++ b/openair1/SCHED_NR/nr_ru_procedures.c @@ -157,7 +157,7 @@ void nr_feptx_ofdm(RU_t *ru,int frame_tx,int tti_tx) if (nr_slot_select(cfg,frame_tx,slot) == NR_UPLINK_SLOT) return; - nr_feptx0(ru,slot,0,NR_NUMBER_OF_SYMBOLS_PER_SLOT,aa); + nr_feptx0(ru, slot, 0, NR_SYMBOLS_PER_SLOT, aa); LOG_D(PHY, "feptx_ofdm (TXPATH): frame %d, slot %d: txp (time %p) %d dB, txp (freq) %d dB\n", diff --git a/openair1/SCHED_NR/phy_frame_config_nr.c b/openair1/SCHED_NR/phy_frame_config_nr.c index 4c2c19847c..811851b05c 100644 --- a/openair1/SCHED_NR/phy_frame_config_nr.c +++ b/openair1/SCHED_NR/phy_frame_config_nr.c @@ -74,9 +74,8 @@ void set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, frame_structure_t *fs cfg->tdd_table.max_tdd_periodicity_list = calloc_or_fail(nb_slots_to_set, sizeof(nfapi_nr_max_tdd_periodicity_t)); for (int slot = 0; slot < nb_slots_to_set; slot++) { nfapi_nr_max_tdd_periodicity_t *p_list = &cfg->tdd_table.max_tdd_periodicity_list[slot]; - p_list->max_num_of_symbol_per_slot_list = - calloc_or_fail(NR_NUMBER_OF_SYMBOLS_PER_SLOT, sizeof(*p_list->max_num_of_symbol_per_slot_list)); - for (int sym = 0; sym < NR_NUMBER_OF_SYMBOLS_PER_SLOT; sym++) { + p_list->max_num_of_symbol_per_slot_list = calloc_or_fail(NR_SYMBOLS_PER_SLOT, sizeof(*p_list->max_num_of_symbol_per_slot_list)); + for (int sym = 0; sym < NR_SYMBOLS_PER_SLOT; sym++) { // for each symbol, assign the TLV tag for usage when packing p_list->max_num_of_symbol_per_slot_list[sym].slot_config.tl.tag = NFAPI_NR_CONFIG_SLOT_CONFIG_TAG; } @@ -89,9 +88,9 @@ void set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, frame_structure_t *fs nfapi_nr_max_tdd_periodicity_t *list = &cfg->tdd_table.max_tdd_periodicity_list[slot_number]; // FULL DOWNLINK SLOTS if (tdd_slot_bitmap[slot_index].slot_type == TDD_NR_DOWNLINK_SLOT) { - for (int sym = 0; sym < NR_NUMBER_OF_SYMBOLS_PER_SLOT; sym++) { - list->max_num_of_symbol_per_slot_list[sym % NR_NUMBER_OF_SYMBOLS_PER_SLOT].slot_config.value = 0; - if ((sym + 1) % NR_NUMBER_OF_SYMBOLS_PER_SLOT == 0) { + for (int sym = 0; sym < NR_SYMBOLS_PER_SLOT; sym++) { + list->max_num_of_symbol_per_slot_list[sym % NR_SYMBOLS_PER_SLOT].slot_config.value = 0; + if ((sym + 1) % NR_SYMBOLS_PER_SLOT == 0) { slot_number++; list += 1; } @@ -101,7 +100,7 @@ void set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, frame_structure_t *fs if (tdd_slot_bitmap[slot_index].slot_type == TDD_NR_MIXED_SLOT) { int nrofDLSymbolsInSlot = tdd_slot_bitmap[slot_index].num_dl_symbols; int nrofULSymbolsInSlot = tdd_slot_bitmap[slot_index].num_ul_symbols; - AssertFatal(nrofDLSymbolsInSlot + nrofULSymbolsInSlot < NR_NUMBER_OF_SYMBOLS_PER_SLOT, + AssertFatal(nrofDLSymbolsInSlot + nrofULSymbolsInSlot < NR_SYMBOLS_PER_SLOT, "illegal symbol configuration DL %d, UL %d\n", nrofDLSymbolsInSlot, nrofULSymbolsInSlot); @@ -110,11 +109,11 @@ void set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, frame_structure_t *fs list->max_num_of_symbol_per_slot_list[sym].slot_config.value = 0; } // Flexible Symbols - for (int sym = nrofDLSymbolsInSlot; sym < NR_NUMBER_OF_SYMBOLS_PER_SLOT - nrofULSymbolsInSlot; sym++) { + for (int sym = nrofDLSymbolsInSlot; sym < NR_SYMBOLS_PER_SLOT - nrofULSymbolsInSlot; sym++) { list->max_num_of_symbol_per_slot_list[sym].slot_config.value = 2; } // UL Symbols - for (int sym = NR_NUMBER_OF_SYMBOLS_PER_SLOT - nrofULSymbolsInSlot; sym < NR_NUMBER_OF_SYMBOLS_PER_SLOT; sym++) { + for (int sym = NR_SYMBOLS_PER_SLOT - nrofULSymbolsInSlot; sym < NR_SYMBOLS_PER_SLOT; sym++) { list->max_num_of_symbol_per_slot_list[sym].slot_config.value = 1; } slot_number++; @@ -122,9 +121,9 @@ void set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, frame_structure_t *fs } // FULL UPLINK SLOTS if (tdd_slot_bitmap[slot_index].slot_type == TDD_NR_UPLINK_SLOT) { - for (int sym = 0; sym < NR_NUMBER_OF_SYMBOLS_PER_SLOT; sym++) { - list->max_num_of_symbol_per_slot_list[sym % NR_NUMBER_OF_SYMBOLS_PER_SLOT].slot_config.value = 1; - if ((sym + 1) % NR_NUMBER_OF_SYMBOLS_PER_SLOT == 0) { + for (int sym = 0; sym < NR_SYMBOLS_PER_SLOT; sym++) { + list->max_num_of_symbol_per_slot_list[sym % NR_SYMBOLS_PER_SLOT].slot_config.value = 1; + if ((sym + 1) % NR_SYMBOLS_PER_SLOT == 0) { slot_number++; list += 1; } @@ -134,14 +133,14 @@ void set_tdd_config_nr(nfapi_nr_config_request_scf_t *cfg, frame_structure_t *fs // Dump 1 period on the output for (int s = 0; s < fs->numb_slots_period; s++) { if (tdd_slot_bitmap[s].slot_type == TDD_NR_MIXED_SLOT) { - char flexi_slot[NR_NUMBER_OF_SYMBOLS_PER_SLOT + 1]; + char flexi_slot[NR_SYMBOLS_PER_SLOT + 1]; memset(flexi_slot, 0, sizeof(flexi_slot)); - for (int symb = 0; symb < NR_NUMBER_OF_SYMBOLS_PER_SLOT; symb++) { + for (int symb = 0; symb < NR_SYMBOLS_PER_SLOT; symb++) { uint8_t val = cfg->tdd_table.max_tdd_periodicity_list[s].max_num_of_symbol_per_slot_list[symb].slot_config.value; char *symb_type_s[] = {"D", "U", "F"}; flexi_slot[symb] = *symb_type_s[val]; } - flexi_slot[NR_NUMBER_OF_SYMBOLS_PER_SLOT] = '\0'; + flexi_slot[NR_SYMBOLS_PER_SLOT] = '\0'; LOG_I(NR_PHY, "TDD period configuration: slot %d is FLEXIBLE: %s\n", s, flexi_slot); } else { LOG_I(NR_PHY, @@ -163,25 +162,25 @@ int nr_slot_select(const nfapi_nr_config_request_scf_t *cfg, int nr_frame, int n return (NR_UPLINK_SLOT | NR_DOWNLINK_SLOT); } - for (int symbol_count = 0; symbol_count < NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) { + for (int symbol_count = 0; symbol_count < NR_SYMBOLS_PER_SLOT; symbol_count++) { if (cfg->tdd_table.max_tdd_periodicity_list[nr_slot].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value == 1) { check_slot++; } } - if (check_slot == NR_NUMBER_OF_SYMBOLS_PER_SLOT) { + if (check_slot == NR_SYMBOLS_PER_SLOT) { return (NR_UPLINK_SLOT); } check_slot = 0; - for (int symbol_count = 0; symbol_count < NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) { + for (int symbol_count = 0; symbol_count < NR_SYMBOLS_PER_SLOT; symbol_count++) { if (cfg->tdd_table.max_tdd_periodicity_list[nr_slot].max_num_of_symbol_per_slot_list[symbol_count].slot_config.value == 0) { check_slot++; } } - if (check_slot == NR_NUMBER_OF_SYMBOLS_PER_SLOT) { + if (check_slot == NR_SYMBOLS_PER_SLOT) { return (NR_DOWNLINK_SLOT); } else { return (NR_MIXED_SLOT); diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index 4e69f8fa69..3923c7ff8c 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -993,7 +993,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N int first_symb = 0, num_symb = 0; if (frame_parms->frame_type == TDD) - for (int symbol_count = 0; symbol_count < NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) { + for (int symbol_count = 0; symbol_count < NR_SYMBOLS_PER_SLOT; symbol_count++) { if (slot_conf[symbol_count].slot_config.value == 1) { if (num_symb == 0) first_symb = symbol_count; @@ -1001,7 +1001,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N } } else - num_symb = NR_NUMBER_OF_SYMBOLS_PER_SLOT; + num_symb = NR_SYMBOLS_PER_SLOT; gNB_I0_measurements(gNB, slot_rx, first_symb, num_symb, rb_mask_ul); } diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index cc6a2ee23b..8bd3c08fe8 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -304,10 +304,10 @@ static void configure_srs_info(fapi_nr_ul_config_srs_pdu *srs_config_pdu, nr_srs * *********************************************************************/ bool ue_srs_procedures_nr(PHY_VARS_NR_UE *ue, - const UE_nr_rxtx_proc_t *proc, - c16_t **txdataF, - nr_phy_data_tx_t *phy_data, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]) + const UE_nr_rxtx_proc_t *proc, + c16_t **txdataF, + nr_phy_data_tx_t *phy_data, + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]) { if(phy_data->srs_vars.active == false) { return false; @@ -383,7 +383,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, n txdataF[i] = &txdataF_buf[i * samplesF_per_slot]; LOG_D(PHY,"****** start TX-Chain for AbsSubframe %d.%d ******\n", frame_tx, slot_tx); - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT] = {0}; + bool was_symbol_used[NR_SYMBOLS_PER_SLOT] = {0}; start_meas_nr_ue_phy(ue, PHY_PROC_TX); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c index 9b17546f61..0441cf47c3 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue_sl.c @@ -300,7 +300,7 @@ void phy_procedures_nrUE_SL_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc tx_action = 1; } - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]; + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]; for (int i = 0; i < 14; i++) was_symbol_used[i] = true; if (tx_action) { diff --git a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c index be1187f574..8d082a84aa 100644 --- a/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c +++ b/openair1/SCHED_NR_UE/pucch_uci_ue_nr.c @@ -136,7 +136,7 @@ void pucch_procedures_ue_nr(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_data_tx_t *phy_data, c16_t **txdataF, - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]) + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]) { const int nr_slot_tx = proc->nr_slot_tx; NR_UE_PUCCH *pucch_vars = &phy_data->pucch_vars; diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index b068936739..83ee2b3dbd 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -1152,7 +1152,7 @@ int main(int argc, char **argv) frame_parms->nb_prefix_samples, CYCLIC_PREFIX); } else { - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT]; + bool was_symbol_used[NR_SYMBOLS_PER_SLOT]; for (int i = 0; i < 14; i++) { was_symbol_used[i] = true; } diff --git a/openair1/SIMULATION/NR_PHY/srssim.c b/openair1/SIMULATION/NR_PHY/srssim.c index d68f925374..dae4ca8080 100644 --- a/openair1/SIMULATION/NR_PHY/srssim.c +++ b/openair1/SIMULATION/NR_PHY/srssim.c @@ -496,7 +496,7 @@ int main(int argc, char *argv[]) proc.frame_tx = frame; proc.nr_slot_tx = slot; proc.nr_slot_rx = slot; - bool was_symbol_used[NR_NUMBER_OF_SYMBOLS_PER_SLOT] = {0}; + bool was_symbol_used[NR_SYMBOLS_PER_SLOT] = {0}; int slot_offset = get_samples_slot_timestamp(fp, slot); uint16_t ofdm_symbol_size = fp->ofdm_symbol_size; int slot_offsetF = (slot % RU_RX_SLOT_DEPTH) * fp->symbols_per_slot * ofdm_symbol_size; diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index c42406149e..475badfdba 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -96,28 +96,28 @@ static void set_tdd_config_nr_ue(fapi_nr_tdd_table_t *tdd_table, const frame_str for (int i = 0; i < fs->numb_slots_period; i++) { fapi_nr_max_tdd_periodicity_t *period_list = &tdd_table->max_tdd_periodicity_list[i]; period_list->max_num_of_symbol_per_slot_list = - malloc(NR_NUMBER_OF_SYMBOLS_PER_SLOT * sizeof(*period_list->max_num_of_symbol_per_slot_list)); + malloc(NR_SYMBOLS_PER_SLOT * sizeof(*period_list->max_num_of_symbol_per_slot_list)); if (pc->tdd_slot_bitmap[i].slot_type == TDD_NR_DOWNLINK_SLOT) { - for (int s = 0; s < NR_NUMBER_OF_SYMBOLS_PER_SLOT; s++) { + for (int s = 0; s < NR_SYMBOLS_PER_SLOT; s++) { period_list->max_num_of_symbol_per_slot_list[s].slot_config = 0; } } if (pc->tdd_slot_bitmap[i].slot_type == TDD_NR_UPLINK_SLOT) { - for (int s = 0; s < NR_NUMBER_OF_SYMBOLS_PER_SLOT; s++) { + for (int s = 0; s < NR_SYMBOLS_PER_SLOT; s++) { period_list->max_num_of_symbol_per_slot_list[s].slot_config = 1; } } if (pc->tdd_slot_bitmap[i].slot_type == TDD_NR_MIXED_SLOT) { int dl_symb = pc->tdd_slot_bitmap[i].num_dl_symbols; int ul_symb = pc->tdd_slot_bitmap[i].num_ul_symbols; - int g_symb = NR_NUMBER_OF_SYMBOLS_PER_SLOT - dl_symb - ul_symb; + int g_symb = NR_SYMBOLS_PER_SLOT - dl_symb - ul_symb; for (int s = 0; s < dl_symb; s++) { period_list->max_num_of_symbol_per_slot_list[s].slot_config = 0; } for (int s = dl_symb; s < dl_symb + g_symb; s++) { period_list->max_num_of_symbol_per_slot_list[s].slot_config = 2; } - for (int s = dl_symb + g_symb; s < NR_NUMBER_OF_SYMBOLS_PER_SLOT; s++) { + for (int s = dl_symb + g_symb; s < NR_SYMBOLS_PER_SLOT; s++) { period_list->max_num_of_symbol_per_slot_list[s].slot_config = 1; } } diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c b/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c index 809ce054f4..75273461b1 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue_sl.c @@ -77,19 +77,19 @@ void sl_set_tdd_config_nr_ue(fapi_nr_tdd_table_t *tdd_table, for(int memory_alloc = 0 ; memory_alloc < nb_slots_per_period; memory_alloc++) tdd_table->max_tdd_periodicity_list[memory_alloc].max_num_of_symbol_per_slot_list = - (fapi_nr_max_num_of_symbol_per_slot_t *) malloc(NR_NUMBER_OF_SYMBOLS_PER_SLOT*sizeof(fapi_nr_max_num_of_symbol_per_slot_t)); + (fapi_nr_max_num_of_symbol_per_slot_t *) malloc(NR_SYMBOLS_PER_SLOT*sizeof(fapi_nr_max_num_of_symbol_per_slot_t)); int slot_number = (nb_slots_per_period - nrofUplinkSlots) - (nrofUplinkSymbols ? 1 : 0); if (nrofUplinkSymbols != 0) { - for(int number_of_symbol = NR_NUMBER_OF_SYMBOLS_PER_SLOT - nrofUplinkSymbols; number_of_symbol < NR_NUMBER_OF_SYMBOLS_PER_SLOT; number_of_symbol++) { + for(int number_of_symbol = NR_SYMBOLS_PER_SLOT - nrofUplinkSymbols; number_of_symbol < NR_SYMBOLS_PER_SLOT; number_of_symbol++) { tdd_table->max_tdd_periodicity_list[slot_number].max_num_of_symbol_per_slot_list[number_of_symbol].slot_config = 1; } slot_number++; } while(slot_number < nb_slots_per_period) { - for (int number_of_symbol = 0; number_of_symbol < nrofUplinkSlots * NR_NUMBER_OF_SYMBOLS_PER_SLOT; number_of_symbol++) { - tdd_table->max_tdd_periodicity_list[slot_number].max_num_of_symbol_per_slot_list[number_of_symbol%NR_NUMBER_OF_SYMBOLS_PER_SLOT].slot_config = 1; - if((number_of_symbol + 1) % NR_NUMBER_OF_SYMBOLS_PER_SLOT == 0) + for (int number_of_symbol = 0; number_of_symbol < nrofUplinkSlots * NR_SYMBOLS_PER_SLOT; number_of_symbol++) { + tdd_table->max_tdd_periodicity_list[slot_number].max_num_of_symbol_per_slot_list[number_of_symbol%NR_SYMBOLS_PER_SLOT].slot_config = 1; + if((number_of_symbol + 1) % NR_SYMBOLS_PER_SLOT == 0) slot_number++; } } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c index a93ad9f8d2..1d534ee80d 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c @@ -425,8 +425,8 @@ static bool check_mixed_slot_prach(frame_structure_t *fs, int slot, int start_pr tdd_bitmap_t *bitmap = &fs->period_cfg.tdd_slot_bitmap[slot % fs->numb_slots_period]; if (bitmap->num_ul_symbols == 0) return false; - int ul_end = NR_NUMBER_OF_SYMBOLS_PER_SLOT - 1; - int ul_start = NR_NUMBER_OF_SYMBOLS_PER_SLOT - bitmap->num_ul_symbols; + int ul_end = NR_SYMBOLS_PER_SLOT - 1; + int ul_start = NR_SYMBOLS_PER_SLOT - bitmap->num_ul_symbols; if (start_prach < ul_start || end_prach > ul_end) return false; } diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler_sl.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler_sl.c index 71e4c7fe25..9f22cbc882 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler_sl.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler_sl.c @@ -63,9 +63,9 @@ static uint8_t sl_get_elapsed_slots(uint32_t slot, uint32_t sl_slot_bitmap) */ static uint8_t sl_determine_if_sidelink_slot(uint8_t sl_startsym, uint8_t sl_lensym, uint8_t num_ulsym) { - uint8_t ul_startsym = NR_NUMBER_OF_SYMBOLS_PER_SLOT - num_ulsym; + uint8_t ul_startsym = NR_SYMBOLS_PER_SLOT - num_ulsym; - if ((sl_startsym >= ul_startsym) && (sl_lensym <= NR_NUMBER_OF_SYMBOLS_PER_SLOT)) { + if ((sl_startsym >= ul_startsym) && (sl_lensym <= NR_SYMBOLS_PER_SLOT)) { LOG_D(MAC, "MIXED SLOT is a SIDELINK SLOT. Sidelink Symbols: %d-%d, Uplink Symbols: %d-%d\n", sl_startsym, @@ -107,13 +107,13 @@ int sl_nr_ue_slot_select(const sl_nr_phy_config_request_t *cfg, int slot, uint8_ const fapi_nr_max_tdd_periodicity_t *current_slot = &tdd_table->max_tdd_periodicity_list[rel_slot]; - for (int symbol_count = 0; symbol_count < NR_NUMBER_OF_SYMBOLS_PER_SLOT; symbol_count++) { + for (int symbol_count = 0; symbol_count < NR_SYMBOLS_PER_SLOT; symbol_count++) { if (current_slot->max_num_of_symbol_per_slot_list[symbol_count].slot_config == 1) { ul_sym++; } } - if (ul_sym == NR_NUMBER_OF_SYMBOLS_PER_SLOT) { + if (ul_sym == NR_SYMBOLS_PER_SLOT) { slot_type = NR_SIDELINK_SLOT; } else if (ul_sym) { slot_type = sl_determine_if_sidelink_slot(cfg->sl_bwp_config.sl_start_symbol, cfg->sl_bwp_config.sl_num_symbols, ul_sym); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index 99f0e9bb3c..44fd2546cb 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -1024,7 +1024,7 @@ static bool get_feasible_msg3_tda(const NR_ServingCellConfigCommon_t *scc, int s = get_slot_idx_in_period(temp_slot, fs); const tdd_bitmap_t *bm = &fs->period_cfg.tdd_slot_bitmap[s]; bool is_mixed = is_mixed_slot(s, fs); - uint16_t slot_mask = is_mixed ? SL_to_bitmap(NR_NUMBER_OF_SYMBOLS_PER_SLOT - bm->num_ul_symbols, bm->num_ul_symbols) : 0x3fff; + uint16_t slot_mask = is_mixed ? SL_to_bitmap(NR_SYMBOLS_PER_SLOT - bm->num_ul_symbols, bm->num_ul_symbols) : 0x3fff; long startSymbolAndLength = tda_list->list.array[i]->startSymbolAndLength; int start, nr; SLIV2SL(startSymbolAndLength, &start, &nr); diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c index e511850414..c6d130cdaf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c @@ -101,7 +101,7 @@ static void fill_ssb_vrb_map(NR_COMMON_channels_t *cc, uint16_t *vrb_map = cc[CC_id].vrb_map[beam]; const int extra_prb = ssb_subcarrier_offset > 0; for (int rb = 0; rb < 20 + extra_prb; rb++) - vrb_map[rbStart + rb] = SL_to_bitmap(symStart % NR_NUMBER_OF_SYMBOLS_PER_SLOT, 4); + vrb_map[rbStart + rb] = SL_to_bitmap(symStart % NR_SYMBOLS_PER_SLOT, 4); } static int encode_mib(NR_BCCH_BCH_Message_t *mib, frame_t frame, uint8_t *buffer, int buf_size) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c index f23dfe8b30..fdec1d0c6f 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c @@ -104,7 +104,7 @@ void nr_preprocessor_phytest(gNB_MAC_INST *mac, post_process_pdsch_t *pp_pdsch) const long band = *scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]; uint16_t ssb_start_symbol = get_ssb_start_symbol(band, scs, i_ssb); // select beam for PDSCH in current slot based on SSB beam - if ((ssb_start_symbol / NR_NUMBER_OF_SYMBOLS_PER_SLOT) == (slot % mac->frame_structure.numb_slots_period)) { + if ((ssb_start_symbol / NR_SYMBOLS_PER_SLOT) == (slot % mac->frame_structure.numb_slots_period)) { ssb_idx_beam = i_ssb; break; } diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c index 1afa2d1502..4c7cf1acf1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_srs.c @@ -479,7 +479,7 @@ static void nr_configure_srs(gNB_MAC_INST *nrmac, AssertFatal(beam.idx >= 0, "Cannot allocate SRS in any available beam\n"); uint16_t *vrb_map_UL = &nrmac->common_channels[CC_id].vrb_map_UL[beam.idx][buffer_index * MAX_BWP_SIZE]; uint16_t num = 1 << srs_pdu->num_symbols; // 0,1,2 means 1,2,4 symbols, see 222.10.04 table 3-105 - const uint8_t l0 = NR_NUMBER_OF_SYMBOLS_PER_SLOT - 1 - srs_pdu->time_start_position; + const uint8_t l0 = NR_SYMBOLS_PER_SLOT - 1 - srs_pdu->time_start_position; uint16_t mask = SL_to_bitmap(l0, num); DevAssert(mask != 0); for (int i = 0; i < srs_pdu->bwp_size; ++i) { diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index 054703c2e2..313a6d5d3b 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -1145,7 +1145,7 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay, i int nb_slots_per_period = ((1 << mu) * 10) / nb_periods_per_frame; // make TDA for the mixed slot - long mixed_sliv = get_SLIV(NR_NUMBER_OF_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); + long mixed_sliv = get_SLIV(NR_SYMBOLS_PER_SLOT - ul_symb, ul_symb - 1); int mixed_min_ul_symb = 3; // need at least two symbols PUSCH + PUCCH bool has_ul_mixed = ul_symb >= mixed_min_ul_symb; if (has_ul_mixed && (k2 <= N_dl1 || (p2 && N_ul2 == 0))) { diff --git a/openair2/RRC/NR_UE/verify_RRC.c b/openair2/RRC/NR_UE/verify_RRC.c index b33da53dae..83a325d255 100644 --- a/openair2/RRC/NR_UE/verify_RRC.c +++ b/openair2/RRC/NR_UE/verify_RRC.c @@ -252,9 +252,9 @@ static bool check_srs_config(NR_SRS_Config_t *srs_Config) if (srs_Config->srs_ResourceToAddModList) { for (int i = 0; i < srs_Config->srs_ResourceToAddModList->list.count; i++) { NR_SRS_Resource_t *res = srs_Config->srs_ResourceToAddModList->list.array[i]; - int start = NR_NUMBER_OF_SYMBOLS_PER_SLOT - res->resourceMapping.startPosition - 1; + int start = NR_SYMBOLS_PER_SLOT - res->resourceMapping.startPosition - 1; int num = 1 << res->resourceMapping.nrofSymbols; - if (start + num > NR_NUMBER_OF_SYMBOLS_PER_SLOT) { + if (start + num > NR_SYMBOLS_PER_SLOT) { LOG_E(NR_RRC, "The configured SRS resource exceeds the slot boundary\n"); return false; }