Merge remote-tracking branch 'origin/nr_ue_sib19_ta' into integration_2025_w50 (!3638)
NR UE: calculate TA based on SIB19 information in NTN mode, if autonomous TA is not enabled To achieve the goal, the hyper frame number (HFN) is introduced at the NR UE PHY, MAC and RRC layers. Besides this, we also implemented an orbit propagation to improve the accuracy of N_UE_TA_adj, and a fix to keep the N_TA from RAR and MAC CE. Fixes #981
This commit is contained in:
@@ -324,7 +324,7 @@ nr_initial_sync_t sl_nr_slss_search(PHY_VARS_NR_UE *UE, UE_nr_rxtx_proc_t *proc,
|
||||
|
||||
int32_t sync_pos = -1; // sync_pos_frame = -1;
|
||||
int32_t metric_tdd_ncp = 0;
|
||||
uint8_t phase_tdd_ncp;
|
||||
uint8_t phase_tdd_ncp = 0;
|
||||
double im, re;
|
||||
int ret = -1;
|
||||
uint16_t rx_slss_id = 65535;
|
||||
|
||||
@@ -467,7 +467,8 @@ typedef struct PHY_VARS_NR_UE_s {
|
||||
|
||||
/// Timing Advance updates variables
|
||||
/// Timing advance update computed from the TA command signalled from gNB
|
||||
int timing_advance;
|
||||
int timing_advance; /// corresponds to N_TA
|
||||
int timing_advance_ntn; /// corresponds to N_common_TA_adj + N_UE_TA_adj
|
||||
int N_TA_offset; ///timing offset used in TDD
|
||||
int ta_frame;
|
||||
int ta_slot;
|
||||
@@ -538,11 +539,14 @@ typedef struct {
|
||||
/// NR slot index within frame_rx [0 .. slots_per_frame - 1] to act upon for transmission
|
||||
int nr_slot_rx;
|
||||
int tx_slot_type;
|
||||
//#endif
|
||||
/// frame to act upon for transmission
|
||||
int frame_tx;
|
||||
/// frame to act upon for reception
|
||||
int frame_rx;
|
||||
/// hyper frame number to act upon for transmission
|
||||
int hfn_tx;
|
||||
/// hyper frame number to act upon for reception
|
||||
int hfn_rx;
|
||||
} UE_nr_rxtx_proc_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -95,12 +95,20 @@ static void configure_ntn_params(PHY_VARS_NR_UE *ue, fapi_nr_dl_ntn_config_comma
|
||||
ue->ntn_config_message = CALLOC(1, sizeof(*ue->ntn_config_message));
|
||||
}
|
||||
|
||||
ue->ntn_config_message->ntn_config_params.epoch_hfn = ntn_params_message->epoch_hfn;
|
||||
ue->ntn_config_message->ntn_config_params.epoch_sfn = ntn_params_message->epoch_sfn;
|
||||
ue->ntn_config_message->ntn_config_params.epoch_subframe = ntn_params_message->epoch_subframe;
|
||||
|
||||
ue->ntn_config_message->ntn_config_params.omega = ntn_params_message->omega;
|
||||
ue->ntn_config_message->ntn_config_params.pos_sat_0 = ntn_params_message->pos_sat_0;
|
||||
ue->ntn_config_message->ntn_config_params.pos_sat_90 = ntn_params_message->pos_sat_90;
|
||||
|
||||
ue->ntn_config_message->ntn_config_params.N_common_ta_adj = ntn_params_message->N_common_ta_adj;
|
||||
ue->ntn_config_message->ntn_config_params.N_common_ta_drift = ntn_params_message->N_common_ta_drift;
|
||||
ue->ntn_config_message->ntn_config_params.N_common_ta_drift_variant = ntn_params_message->N_common_ta_drift_variant;
|
||||
|
||||
ue->ntn_config_message->ntn_config_params.cell_specific_k_offset = ntn_params_message->cell_specific_k_offset;
|
||||
ue->ntn_config_message->ntn_config_params.ntn_total_time_advance_ms = ntn_params_message->ntn_total_time_advance_ms;
|
||||
ue->ntn_config_message->ntn_config_params.ntn_total_time_advance_drift = ntn_params_message->ntn_total_time_advance_drift;
|
||||
ue->ntn_config_message->ntn_config_params.ntn_total_time_advance_drift_variant = ntn_params_message->ntn_total_time_advance_drift_variant;
|
||||
|
||||
ue->ntn_config_message->update = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -95,6 +95,7 @@ void nr_fill_dl_indication(nr_downlink_indication_t *dl_ind,
|
||||
dl_ind->gNB_index = proc->gNB_id;
|
||||
dl_ind->module_id = ue->Mod_id;
|
||||
dl_ind->cc_id = ue->CC_id;
|
||||
dl_ind->hfn = proc->hfn_rx;
|
||||
dl_ind->frame = proc->frame_rx;
|
||||
dl_ind->slot = proc->nr_slot_rx;
|
||||
dl_ind->phy_data = phy_data;
|
||||
|
||||
@@ -44,8 +44,10 @@ void nr_fill_sl_indication(nr_sidelink_indication_t *sl_ind,
|
||||
sl_ind->gNB_index = proc->gNB_id;
|
||||
sl_ind->module_id = ue->Mod_id;
|
||||
sl_ind->cc_id = ue->CC_id;
|
||||
sl_ind->hfn_rx = proc->hfn_rx;
|
||||
sl_ind->frame_rx = proc->frame_rx;
|
||||
sl_ind->slot_rx = proc->nr_slot_rx;
|
||||
sl_ind->hfn_tx = proc->hfn_tx;
|
||||
sl_ind->frame_tx = proc->frame_tx;
|
||||
sl_ind->slot_tx = proc->nr_slot_tx;
|
||||
sl_ind->phy_data = phy_data;
|
||||
|
||||
@@ -965,7 +965,7 @@ int main(int argc, char **argv)
|
||||
//Configure UE
|
||||
NR_BCCH_BCH_Message_t *mib = get_new_MIB_NR(scc);
|
||||
nr_rrc_mac_config_req_mib(0, 0, mib->message.choice.mib, false, false);
|
||||
nr_rrc_mac_config_req_cg(0, 0, UE_CellGroup, UE_Capability_nr);
|
||||
nr_rrc_mac_config_req_cg(0, 0, 0, 0, UE_CellGroup, UE_Capability_nr);
|
||||
|
||||
asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, UE_CellGroup);
|
||||
|
||||
|
||||
@@ -163,6 +163,7 @@ typedef uint32_t channel_t;
|
||||
int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id,
|
||||
const int CC_id,
|
||||
const uint8_t gNB_index,
|
||||
const int hfn,
|
||||
const frame_t frame,
|
||||
const int slot,
|
||||
const rnti_t rnti,
|
||||
|
||||
Reference in New Issue
Block a user