improve handling of ssb_perRACH_OccasionAndCB_PreamblesPerSSB according to need code

(also removing unused FAPI element ssb_per_rach)
This commit is contained in:
francescomani
2025-11-29 22:39:43 +08:00
committed by alexjiao
parent d56945e45e
commit 56f20d49bc
5 changed files with 13 additions and 14 deletions
@@ -697,7 +697,6 @@ typedef struct
uint8_t restricted_set_config;//PRACH restricted set config Value: 0: unrestricted 1: restricted set type A 2: restricted set type B
uint8_t num_prach_fd_occasions;//Corresponds to the parameter 𝑀 in [38.211, sec 6.3.3.2] which equals the higher layer parameter msg1FDM Value: 1,2,4,8
fapi_nr_num_prach_fd_occasions_t* num_prach_fd_occasions_list;
uint8_t ssb_per_rach;//SSB-per-RACH-occasion Value: 0: 1/8 1:1/4, 2:1/2 3:1 4:2 5:4, 6:8 7:16
uint8_t prach_multiple_carriers_in_a_band;//0 = disabled 1 = enabled
uint8_t root_seq_computed; // flag set and used only in PHY to indicate if table is computed with this config
+7 -7
View File
@@ -262,8 +262,6 @@ static void config_common_ue_sa(NR_UE_MAC_INST_t *mac, NR_ServingCellConfigCommo
mac->frequency_range);
//prach_fd_occasion->num_unused_root_sequences = ???
}
cfg->prach_config.ssb_per_rach = rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present-1;
}
// computes round-trip-time between ue and sat based on SIB19 ephemeris data
@@ -547,7 +545,6 @@ static void config_common_ue(NR_UE_MAC_INST_t *mac, NR_ServingCellConfigCommon_t
prach_fd_occasion->num_root_sequences =
compute_nr_root_seq(rach_ConfigCommon, nb_preambles, frame_type, mac->frequency_range);
cfg->prach_config.ssb_per_rach = rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB->present - 1;
// prach_fd_occasion->num_unused_root_sequences = ???
}
}
@@ -1718,10 +1715,13 @@ static void configure_common_BWP_ul(NR_UE_MAC_INST_t *mac, int bwp_id, NR_BWP_Up
mac->sc_info.initial_ul_BWPStart = bwp->BWPStart;
}
if (ul_common->rach_ConfigCommon) {
HANDLE_SETUPRELEASE_DIRECT(bwp->rach_ConfigCommon,
ul_common->rach_ConfigCommon,
NR_RACH_ConfigCommon_t,
asn_DEF_NR_RACH_ConfigCommon);
// ssb_perRACH_OccasionAndCB_PreamblesPerSSB is need M
// if NULL we need to maintain the information
NR_SetupRelease_RACH_ConfigCommon_t *rachcommon = ul_common->rach_ConfigCommon;
if (rachcommon->present == NR_SetupRelease_RACH_ConfigCommon_PR_setup
&& rachcommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB)
mac->ssb_ro_preambles = get_ssb_ro_preambles_4step(rachcommon->choice.setup->ssb_perRACH_OccasionAndCB_PreamblesPerSSB);
HANDLE_SETUPRELEASE_DIRECT(bwp->rach_ConfigCommon, rachcommon, NR_RACH_ConfigCommon_t, asn_DEF_NR_RACH_ConfigCommon);
}
if (ul_common->ext1 && ul_common->ext1->msgA_ConfigCommon_r16) {
HANDLE_SETUPRELEASE_DIRECT(bwp->msgA_ConfigCommon_r16,
+2
View File
@@ -148,6 +148,7 @@
// Define the UE L2 states with X-Macro
#define NR_UE_L2_STATES \
UE_STATE(UE_NOT_SYNC) \
UE_STATE(UE_NOT_SYNC_RECONF) \
UE_STATE(UE_BARRED) \
UE_STATE(UE_RECEIVING_SIB) \
UE_STATE(UE_PERFORMING_RA) \
@@ -639,6 +640,7 @@ typedef struct NR_UE_MAC_INST_s {
NR_SSB_meas_t ssb_measurements[MAX_NB_SSB];
NR_CSIRS_meas_t csirs_measurements;
ssb_ro_preambles_t ssb_ro_preambles;
dci_pdu_rel15_t def_dci_pdu_rel15[NR_MAX_SLOTS_PER_FRAME][8];
+1 -1
View File
@@ -360,5 +360,5 @@ int sl_nr_ue_slot_select(const sl_nr_phy_config_request_t *cfg, int nr_slot, uin
void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind, NR_UE_MAC_INST_t *mac);
NR_SearchSpace_t *get_common_search_space(const NR_UE_MAC_INST_t *mac, const NR_SearchSpaceId_t ss_id);
ssb_ro_preambles_t get_ssb_ro_preambles_4step(struct NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB *config);
#endif
+3 -5
View File
@@ -190,7 +190,7 @@ static void select_preamble_group(NR_UE_MAC_INST_t *mac)
// else if Msg3 is being retransmitted, we keep what used in first transmission of Msg3
}
static ssb_ro_preambles_t get_ssb_ro_preambles_4step(struct NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB *config)
ssb_ro_preambles_t get_ssb_ro_preambles_4step(struct NR_RACH_ConfigCommon__ssb_perRACH_OccasionAndCB_PreamblesPerSSB *config)
{
ssb_ro_preambles_t ret = {0};
switch (config->present) {
@@ -293,9 +293,7 @@ static void config_preamble_index(NR_UE_MAC_INST_t *mac)
bool groupBconfigured = false;
int preamb_ga = 0;
if (ra->ra_type == RA_4_STEP) {
AssertFatal(nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB,
"Not expeting ssb_perRACH_OccasionAndCB_PreamblesPerSSB to be NULL here\n");
ra->ssb_ro_config = get_ssb_ro_preambles_4step(nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB);
ra->ssb_ro_config = mac->ssb_ro_preambles;
if (nr_rach_ConfigCommon->totalNumberOfRA_Preambles)
nb_of_preambles = *nr_rach_ConfigCommon->totalNumberOfRA_Preambles;
// Amongst the contention-based Random Access Preambles associated with an SSB the first numberOfRA-PreamblesGroupA
@@ -321,7 +319,7 @@ static void config_preamble_index(NR_UE_MAC_INST_t *mac)
if (twostep->msgA_SSB_PerRACH_OccasionAndCB_PreamblesPerSSB_r16)
ra->ssb_ro_config = get_ssb_ro_preambles_2step(twostep->msgA_SSB_PerRACH_OccasionAndCB_PreamblesPerSSB_r16);
else
ra->ssb_ro_config = get_ssb_ro_preambles_4step(nr_rach_ConfigCommon->ssb_perRACH_OccasionAndCB_PreamblesPerSSB);
ra->ssb_ro_config = mac->ssb_ro_preambles;
if (twostep->msgA_TotalNumberOfRA_Preambles_r16)
nb_of_preambles = *twostep->msgA_TotalNumberOfRA_Preambles_r16;
}