From 924be4edf9e2eecd1a2931976421fde83842764e Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 7 Jul 2023 10:21:55 +0200 Subject: [PATCH] monitor DCI for other SI --- openair2/LAYER2/NR_MAC_UE/config_ue.c | 2 + openair2/LAYER2/NR_MAC_UE/mac_defs.h | 78 ++++++++++--------- openair2/LAYER2/NR_MAC_UE/mac_proto.h | 1 + .../NR_MAC_UE/nr_ue_dci_configuration.c | 61 ++++++++++++++- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 1 + openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c | 75 +++++++++--------- openair2/RRC/NR_UE/rrc_UE.c | 2 +- 7 files changed, 145 insertions(+), 75 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index d2ac527a00..d9b9cf6f10 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -717,11 +717,13 @@ void nr_rrc_mac_config_req_mib(module_id_t module_id, void nr_rrc_mac_config_req_sib1(module_id_t module_id, int cc_idP, + struct NR_SI_SchedulingInfo *si_SchedulingInfo, NR_ServingCellConfigCommonSIB_t *scc) { NR_UE_MAC_INST_t *mac = get_mac_inst(module_id); AssertFatal(scc, "SIB1 SCC should not be NULL\n"); mac->scc_SIB = scc; + mac->si_SchedulingInfo = si_SchedulingInfo; mac->nr_band = *scc->downlinkConfigCommon.frequencyInfoDL.frequencyBandList.list.array[0]->freqBandIndicatorNR; config_common_ue_sa(mac, module_id, cc_idP); configure_current_BWP(mac, scc, NULL); diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h index 74bee1eca5..5051d92143 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h @@ -382,6 +382,43 @@ typedef struct NR_UL_TIME_ALIGNMENT { int slot; } NR_UL_TIME_ALIGNMENT_t; +// The PRACH Config period is a series of selected slots in one or multiple frames +typedef struct prach_conf_period { + prach_occasion_slot_t prach_occasion_slot_map[MAX_NB_FRAME_IN_PRACH_CONF_PERIOD][MAX_NB_SLOT_IN_FRAME]; + uint16_t nb_of_prach_occasion; // Total number of PRACH occasions in the PRACH Config period + uint8_t nb_of_frame; // Size of the PRACH Config period in number of 10ms frames + uint8_t nb_of_slot; // Nb of slots in each frame +} prach_conf_period_t; + +// The association period is a series of PRACH Config periods +typedef struct prach_association_period { + prach_conf_period_t *prach_conf_period_list[MAX_NB_PRACH_CONF_PERIOD_IN_ASSOCIATION_PERIOD]; + uint8_t nb_of_prach_conf_period; // Nb of PRACH configuration periods within the association period + uint8_t nb_of_frame; // Total number of frames included in the association period +} prach_association_period_t; + +// The association pattern is a series of Association periods +typedef struct prach_association_pattern { + prach_association_period_t prach_association_period_list[MAX_NB_ASSOCIATION_PERIOD_IN_ASSOCIATION_PATTERN_PERIOD]; + prach_conf_period_t prach_conf_period_list[MAX_NB_PRACH_CONF_PERIOD_IN_ASSOCIATION_PATTERN_PERIOD]; + uint8_t nb_of_assoc_period; // Nb of association periods within the association pattern + uint8_t nb_of_prach_conf_period_in_max_period; // Nb of PRACH configuration periods within the maximum association pattern period (according to the size of the configured PRACH + uint8_t nb_of_frame; // Total number of frames included in the association pattern period (after mapping the SSBs and determining the real association pattern length) +} prach_association_pattern_t; + +// SSB details +typedef struct ssb_info { + bool transmitted; // True if the SSB index is transmitted according to the SSB positions map configuration + prach_occasion_info_t *mapped_ro[MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN]; // List of mapped RACH Occasions to this SSB index + uint32_t nb_mapped_ro; // Total number of mapped ROs to this SSB index +} ssb_info_t; + +// List of all the possible SSBs and their details +typedef struct ssb_list_info { + ssb_info_t tx_ssb[MAX_NB_SSB]; + uint8_t nb_tx_ssb; +} ssb_list_info_t; + /*!\brief Top level UE MAC structure */ typedef struct { NR_UE_L2_STATE_t state; @@ -402,6 +439,9 @@ typedef struct { NR_PHR_Config_t *phr_Config; NR_RNTI_Value_t *cs_RNTI; NR_MIB_t *mib; + struct NR_SI_SchedulingInfo *si_SchedulingInfo; + int si_window_start; + ssb_list_info_t ssb_list; NR_UE_DL_BWP_t current_DL_BWP; NR_UE_UL_BWP_t current_UL_BWP; @@ -485,43 +525,5 @@ typedef struct { } NR_UE_MAC_INST_t; - -// The PRACH Config period is a series of selected slots in one or multiple frames -typedef struct prach_conf_period { - prach_occasion_slot_t prach_occasion_slot_map[MAX_NB_FRAME_IN_PRACH_CONF_PERIOD][MAX_NB_SLOT_IN_FRAME]; - uint16_t nb_of_prach_occasion; // Total number of PRACH occasions in the PRACH Config period - uint8_t nb_of_frame; // Size of the PRACH Config period in number of 10ms frames - uint8_t nb_of_slot; // Nb of slots in each frame -} prach_conf_period_t; - -// The association period is a series of PRACH Config periods -typedef struct prach_association_period { - prach_conf_period_t *prach_conf_period_list[MAX_NB_PRACH_CONF_PERIOD_IN_ASSOCIATION_PERIOD]; - uint8_t nb_of_prach_conf_period; // Nb of PRACH configuration periods within the association period - uint8_t nb_of_frame; // Total number of frames included in the association period -} prach_association_period_t; - -// The association pattern is a series of Association periods -typedef struct prach_association_pattern { - prach_association_period_t prach_association_period_list[MAX_NB_ASSOCIATION_PERIOD_IN_ASSOCIATION_PATTERN_PERIOD]; - prach_conf_period_t prach_conf_period_list[MAX_NB_PRACH_CONF_PERIOD_IN_ASSOCIATION_PATTERN_PERIOD]; - uint8_t nb_of_assoc_period; // Nb of association periods within the association pattern - uint8_t nb_of_prach_conf_period_in_max_period; // Nb of PRACH configuration periods within the maximum association pattern period (according to the size of the configured PRACH - uint8_t nb_of_frame; // Total number of frames included in the association pattern period (after mapping the SSBs and determining the real association pattern length) -} prach_association_pattern_t; - -// SSB details -typedef struct ssb_info { - bool transmitted; // True if the SSB index is transmitted according to the SSB positions map configuration - prach_occasion_info_t *mapped_ro[MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN]; // List of mapped RACH Occasions to this SSB index - uint32_t nb_mapped_ro; // Total number of mapped ROs to this SSB index -} ssb_info_t; - -// List of all the possible SSBs and their details -typedef struct ssb_list_info { - ssb_info_t tx_ssb[MAX_NB_SSB]; - uint8_t nb_tx_ssb; -} ssb_list_info_t; - /*@}*/ #endif /*__LAYER2_MAC_DEFS_H__ */ diff --git a/openair2/LAYER2/NR_MAC_UE/mac_proto.h b/openair2/LAYER2/NR_MAC_UE/mac_proto.h index 12ab08e38f..fbfc2b450c 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_proto.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_proto.h @@ -110,6 +110,7 @@ void nr_rrc_mac_config_req_mib(module_id_t module_id, void nr_rrc_mac_config_req_sib1(module_id_t module_id, int cc_idP, + struct NR_SI_SchedulingInfo *si_SchedulingInfo, NR_ServingCellConfigCommonSIB_t *scc); /**\brief initialization NR UE MAC instance(s), total number of MAC instance based on NB_NR_UE_MAC_INST*/ diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c index 9f91a74889..2097aa41c9 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c @@ -365,6 +365,63 @@ bool is_ss_monitor_occasion(const int frame, const int slot, const int slots_per return monitor; } +bool montior_dci_for_other_SI(NR_UE_MAC_INST_t *mac, + const NR_SearchSpace_t *ss, + const int slots_per_frame, + const int frame, + const int slot) +{ + const struct NR_SI_SchedulingInfo *si_SchedulingInfo = mac->si_SchedulingInfo; + // 5.2.2.3.2 in 331 + if (!si_SchedulingInfo) + return false; + const int si_window_slots = 5 << si_SchedulingInfo->si_WindowLength; + const int abs_slot = frame * slots_per_frame + slot; + for (int n = 0; n < si_SchedulingInfo->schedulingInfoList.list.count; n++) { + struct NR_SchedulingInfo *sched_Info = si_SchedulingInfo->schedulingInfoList.list.array[n]; + if(mac->si_window_start == -1) { + int x = n * si_window_slots; + int T = 8 << sched_Info->si_Periodicity; // radio frame periodicity + if ((frame % T) == (x / slots_per_frame) && + (x % slots_per_frame == 0)) + mac->si_window_start = abs_slot; // in terms of absolute slot number + } + if (mac->si_window_start == -1) { + // out of window + return false; + } + else if (abs_slot > mac->si_window_start + si_window_slots) { + // window expired + mac->si_window_start = -1; + return false; + } + else { + const int duration = ss->duration ? *ss->duration : 1; + int period, offset; + get_monitoring_period_offset(ss, &period, &offset); + for (int i = 0; i < duration; i++) { + if (((frame * slots_per_frame + slot - offset - i) % period) == 0) { + int N = mac->ssb_list.nb_tx_ssb; + int K = 0; // k_th transmitted SSB + for (int i = 0; i < mac->mib_ssb; i++) { + if(mac->ssb_list.tx_ssb[i].transmitted) + K++; + } + // numbering current frame and slot in terms of monitoring occasions in window + int current_monitor_occasion = ((abs_slot - mac->si_window_start) % period) + + (duration * (abs_slot - mac->si_window_start) / period); + if (current_monitor_occasion % N == K) + return true; + else + return false; + } + } + } + } + return false; +} + + void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl_config, const frame_t frame, const int slot) { const NR_UE_DL_BWP_t *current_DL_BWP = &mac->current_DL_BWP; @@ -375,8 +432,10 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl // are same as PDCCH monitoring occasions for SIB1 const NR_SearchSpace_t *ss = mac->otherSI_SS ? mac->otherSI_SS : mac->search_space_zero; // TODO configure SI-window - if (is_ss_monitor_occasion(frame, slot, slots_per_frame, ss)) + if (montior_dci_for_other_SI(mac, ss, slots_per_frame, frame, slot)) { + LOG_D(NR_MAC, "Monitoring DCI for other SIs in frame %d slot %d\n", frame, slot); config_dci_pdu(mac, dl_config, NR_RNTI_SI, slot, ss); + } } if (mac->state == UE_PERFORMING_RA && mac->ra.ra_state >= WAIT_RAR) { diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 8f4f0ff3fe..0ab43889e4 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -168,6 +168,7 @@ void nr_ue_init_mac(module_id_t module_idP) mac->get_otherSI = false; mac->phy_config_request_sent = false; mac->state = UE_NOT_SYNC; + mac->si_window_start = -1; } void nr_ue_mac_default_configs(NR_UE_MAC_INST_t *mac) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c index 81771629f2..4d58a7240a 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c @@ -58,7 +58,6 @@ //#define SRS_DEBUG static prach_association_pattern_t prach_assoc_pattern; -static ssb_list_info_t ssb_list; void fill_ul_config(fapi_nr_ul_config_request_t *ul_config, frame_t frame_tx, int slot_tx, uint8_t pdu_type){ @@ -1658,6 +1657,7 @@ static void build_ssb_list(NR_UE_MAC_INST_t *mac) { BIT_STRING_t *ssb_bitmap; uint64_t ssb_positionsInBurst; uint8_t ssb_idx = 0; + ssb_list_info_t *ssb_list = &mac->ssb_list; if (mac->scc) { NR_ServingCellConfigCommon_t *scc = mac->scc; @@ -1671,8 +1671,8 @@ static void build_ssb_list(NR_UE_MAC_INST_t *mac) { for (uint8_t bit_nb=3; bit_nb<=3; bit_nb--) { // If SSB is transmitted if ((ssb_positionsInBurst>>bit_nb) & 0x01) { - ssb_list.nb_tx_ssb++; - ssb_list.tx_ssb[ssb_idx].transmitted = true; + ssb_list->nb_tx_ssb++; + ssb_list->tx_ssb[ssb_idx].transmitted = true; LOG_D(NR_MAC,"SSB idx %d transmitted\n", ssb_idx); } ssb_idx++; @@ -1687,8 +1687,8 @@ static void build_ssb_list(NR_UE_MAC_INST_t *mac) { for (uint8_t bit_nb=7; bit_nb<=7; bit_nb--) { // If SSB is transmitted if ((ssb_positionsInBurst>>bit_nb) & 0x01) { - ssb_list.nb_tx_ssb++; - ssb_list.tx_ssb[ssb_idx].transmitted = true; + ssb_list->nb_tx_ssb++; + ssb_list->tx_ssb[ssb_idx].transmitted = true; LOG_D(NR_MAC,"SSB idx %d transmitted\n", ssb_idx); } ssb_idx++; @@ -1703,8 +1703,8 @@ static void build_ssb_list(NR_UE_MAC_INST_t *mac) { for (uint8_t bit_nb=63; bit_nb<=63; bit_nb--) { // If SSB is transmitted if ((ssb_positionsInBurst>>bit_nb) & 0x01) { - ssb_list.nb_tx_ssb++; - ssb_list.tx_ssb[ssb_idx].transmitted = true; + ssb_list->nb_tx_ssb++; + ssb_list->tx_ssb[ssb_idx].transmitted = true; LOG_D(NR_MAC,"SSB idx %d transmitted\n", ssb_idx); } ssb_idx++; @@ -1726,8 +1726,8 @@ static void build_ssb_list(NR_UE_MAC_INST_t *mac) { for (uint8_t bit_nb=7; bit_nb<=7; bit_nb--) { // If SSB is transmitted if ((ssb_positionsInBurst>>bit_nb) & 0x01) { - ssb_list.nb_tx_ssb++; - ssb_list.tx_ssb[ssb_idx].transmitted = true; + ssb_list->nb_tx_ssb++; + ssb_list->tx_ssb[ssb_idx].transmitted = true; LOG_D(NR_MAC,"SSB idx %d transmitted\n", ssb_idx); } ssb_idx++; @@ -1797,15 +1797,15 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac) { // There is only one possible association period which can contain up to 16 PRACH configuration periods LOG_D(NR_MAC,"Evaluate the number of PRACH configuration periods required to map all the SSBs and set the association period\n"); if (true == multiple_ssb_per_ro) { - required_nb_of_prach_occasion = ((ssb_list.nb_tx_ssb-1) + ssb_rach_ratio) / ssb_rach_ratio; + required_nb_of_prach_occasion = ((mac->ssb_list.nb_tx_ssb-1) + ssb_rach_ratio) / ssb_rach_ratio; } else { - required_nb_of_prach_occasion = ssb_list.nb_tx_ssb * ssb_rach_ratio; + required_nb_of_prach_occasion = mac->ssb_list.nb_tx_ssb * ssb_rach_ratio; } AssertFatal(prach_assoc_pattern.prach_conf_period_list[0].nb_of_prach_occasion>0, "prach_assoc_pattern.prach_conf_period_list[0].nb_of_prach_occasion shouldn't be 0 (ssb_list.nb_tx_ssb %d, ssb_rach_ratio %d\n", - ssb_list.nb_tx_ssb,ssb_rach_ratio); + mac->ssb_list.nb_tx_ssb,ssb_rach_ratio); required_nb_of_prach_conf_period = ((required_nb_of_prach_occasion-1) + prach_assoc_pattern.prach_conf_period_list[0].nb_of_prach_occasion) / prach_assoc_pattern.prach_conf_period_list[0].nb_of_prach_occasion; @@ -1885,17 +1885,20 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac) { // this is true if no PRACH occasions are conflicting with SSBs nor TDD_UL_DL_ConfigurationCommon schedule for (; ssb_idxssb_list.tx_ssb[ssb_idx].transmitted) { ro_p->mapped_ssb_idx[ro_p->nb_mapped_ssb] = ssb_idx; ro_p->nb_mapped_ssb++; - ssb_list.tx_ssb[ssb_idx].mapped_ro[ssb_list.tx_ssb[ssb_idx].nb_mapped_ro] = ro_p; - ssb_list.tx_ssb[ssb_idx].nb_mapped_ro++; - AssertFatal(MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN > ssb_list.tx_ssb[ssb_idx].nb_mapped_ro,"Too many mapped ROs (%d) to a single SSB\n", ssb_list.tx_ssb[ssb_idx].nb_mapped_ro); + mac->ssb_list.tx_ssb[ssb_idx].mapped_ro[mac->ssb_list.tx_ssb[ssb_idx].nb_mapped_ro] = ro_p; + mac->ssb_list.tx_ssb[ssb_idx].nb_mapped_ro++; + AssertFatal(MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN > mac->ssb_list.tx_ssb[ssb_idx].nb_mapped_ro, + "Too many mapped ROs (%d) to a single SSB\n", + mac->ssb_list.tx_ssb[ssb_idx].nb_mapped_ro); - LOG_D(NR_MAC,"Mapped ssb_idx %u to RO slot-symbol %u-%u, %u-%u-%u/%u\n", + LOG_D(NR_MAC, "Mapped ssb_idx %u to RO slot-symbol %u-%u, %u-%u-%u/%u\n", ssb_idx, ro_p->slot, ro_p->start_symbol, slot, ro_in_time, ro_in_freq, prach_conf_period_p->prach_occasion_slot_map[frame][slot].nb_of_prach_occasion_in_freq); - LOG_D(NR_MAC,"Nb mapped ROs for this ssb idx: in the association period only %u\n", ssb_list.tx_ssb[ssb_idx].nb_mapped_ro); + LOG_D(NR_MAC, "Nb mapped ROs for this ssb idx: in the association period only %u\n", + mac->ssb_list.tx_ssb[ssb_idx].nb_mapped_ro); // If all the required SSBs are mapped to this RO, exit the loop of SSBs if (ro_p->nb_mapped_ssb == ssb_rach_ratio) { @@ -1941,12 +1944,11 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac) { // Go through the list of transmitted SSBs for (ssb_idx=0; ssb_idx %d\n", - ssb_idx,ssb_list.tx_ssb[ssb_idx].transmitted); + LOG_D(NR_MAC,"Checking ssb_idx %d => %d\n", + ssb_idx, mac->ssb_list.tx_ssb[ssb_idx].transmitted); // Map only the transmitted ssb_idx - if (true == ssb_list.tx_ssb[ssb_idx].transmitted) { + if (true == mac->ssb_list.tx_ssb[ssb_idx].transmitted) { // Map all the required ROs to this SSB // Go through the list of PRACH config periods within this association period @@ -1964,17 +1966,18 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac) { ro_p->mapped_ssb_idx[0] = ssb_idx; ro_p->nb_mapped_ssb = 1; - ssb_list.tx_ssb[ssb_idx].mapped_ro[ssb_list.tx_ssb[ssb_idx].nb_mapped_ro] = ro_p; - ssb_list.tx_ssb[ssb_idx].nb_mapped_ro++; - AssertFatal(MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN > ssb_list.tx_ssb[ssb_idx].nb_mapped_ro,"Too many mapped ROs (%d) to a single SSB\n", - ssb_list.tx_ssb[ssb_idx].nb_mapped_ro); + mac->ssb_list.tx_ssb[ssb_idx].mapped_ro[mac->ssb_list.tx_ssb[ssb_idx].nb_mapped_ro] = ro_p; + mac->ssb_list.tx_ssb[ssb_idx].nb_mapped_ro++; + AssertFatal(MAX_NB_RO_PER_SSB_IN_ASSOCIATION_PATTERN > mac->ssb_list.tx_ssb[ssb_idx].nb_mapped_ro, + "Too many mapped ROs (%d) to a single SSB\n", + mac->ssb_list.tx_ssb[ssb_idx].nb_mapped_ro); nb_mapped_ro_in_association_period++; LOG_D(NR_MAC,"Mapped ssb_idx %u to RO slot-symbol %u-%u, %u-%u-%u/%u\n", ssb_idx, ro_p->slot, ro_p->start_symbol, slot, ro_in_time, ro_in_freq, prach_conf_period_p->prach_occasion_slot_map[frame][slot].nb_of_prach_occasion_in_freq); - LOG_D(NR_MAC,"Nb mapped ROs for this ssb idx: in the association period only %u / total %u\n", - ssb_list.tx_ssb[ssb_idx].nb_mapped_ro, nb_mapped_ro_in_association_period); + LOG_D(NR_MAC, "Nb mapped ROs for this ssb idx: in the association period only %u / total %u\n", + mac->ssb_list.tx_ssb[ssb_idx].nb_mapped_ro, nb_mapped_ro_in_association_period); // Exit the loop if this SSB has been mapped to all the required ROs // WIP: Assuming that ssb_rach_ratio equals the maximum nb of times a given ssb_idx is mapped within an association period: @@ -2024,8 +2027,9 @@ static void map_ssb_to_ro(NR_UE_MAC_INST_t *mac) { static int get_nr_prach_info_from_ssb_index(uint8_t ssb_idx, int frame, int slot, - prach_occasion_info_t **prach_occasion_info_pp) { - + ssb_list_info_t *ssb_list, + prach_occasion_info_t **prach_occasion_info_pp) +{ ssb_info_t *ssb_info_p; prach_occasion_slot_t *prach_occasion_slot_p = NULL; @@ -2036,7 +2040,7 @@ static int get_nr_prach_info_from_ssb_index(uint8_t ssb_idx, // - ssb_idx mapped to one of the ROs in that RO slot // - exact slot number // - frame offset - ssb_info_p = &ssb_list.tx_ssb[ssb_idx]; + ssb_info_p = &ssb_list->tx_ssb[ssb_idx]; LOG_D(NR_MAC,"checking for prach : ssb_info_p->nb_mapped_ro %d\n",ssb_info_p->nb_mapped_ro); for (uint8_t n_mapped_ro=0; n_mapped_ronb_mapped_ro; n_mapped_ro++) { LOG_D(NR_MAC,"%d.%d: mapped_ro[%d]->frame.slot %d.%d, prach_assoc_pattern.nb_of_frame %d\n", @@ -2104,7 +2108,7 @@ void build_ssb_to_ro_map(NR_UE_MAC_INST_t *mac) { // Clear all the lists and maps memset(&prach_assoc_pattern, 0, sizeof(prach_association_pattern_t)); - memset(&ssb_list, 0, sizeof(ssb_list_info_t)); + memset(&mac->ssb_list, 0, sizeof(ssb_list_info_t)); // Build the list of all the valid RACH occasions in the maximum association pattern period according to the PRACH config LOG_D(NR_MAC,"Build RO list\n"); @@ -2523,9 +2527,10 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s // Get any valid PRACH occasion in the current slot for the selected SSB index prach_occasion_info_t *prach_occasion_info_p; int is_nr_prach_slot = get_nr_prach_info_from_ssb_index(selected_gnb_ssb_idx, - (int)frameP, - (int)slotP, - &prach_occasion_info_p); + (int)frameP, + (int)slotP, + &mac->ssb_list, + &prach_occasion_info_p); if (is_nr_prach_slot) { AssertFatal(NULL != prach_occasion_info_p,"PRACH Occasion Info not returned in a valid NR Prach Slot\n"); diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index cbab54b9ab..604000e94b 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -736,7 +736,7 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(module_id_t module_id, nr_rrc_set_sib1_timers_and_constants(&NR_UE_rrc_inst[module_id].timers_and_constants, sib1); // take ServingCellConfigCommon and configure L1/L2 NR_UE_rrc_inst[module_id].servingCellConfigCommonSIB = sib1->servingCellConfigCommon; - nr_rrc_mac_config_req_sib1(module_id, 0, sib1->servingCellConfigCommon); + nr_rrc_mac_config_req_sib1(module_id, 0, sib1->si_SchedulingInfo, sib1->servingCellConfigCommon); nr_rrc_ue_generate_ra_msg(module_id, gNB_index); break;