Merge remote-tracking branch 'origin/sib19-ue-utilization' into integration_2024_w50 (!3019)
SIB19 utilization on UE Following SIB19 initialization and scheduling on gNB (!2899 - merged) and Receive SIB19 on nrUE (!2920 - merged), this merge request aims to introduce the actual use of the SIB19 provided parameters by gNB in UE. Changes needed for utilization include: initialization of position coordinates parameters for UE (which are needed to calculate propagation delay between UE and SAT), propagation delay calculations and timing advance adjusts. Moreover, this change removes the now unused arguments for ntn_koffset, ntn_ta_common and ntn_ta_commondrift
This commit is contained in:
@@ -338,6 +338,8 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
|
||||
free_and_zero(ue->prs_vars[idx]);
|
||||
}
|
||||
|
||||
free_and_zero(ue->ntn_config_message);
|
||||
|
||||
sl_ue_free(ue);
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,15 @@
|
||||
#define UNUSED(x) (void)x;
|
||||
#define NUM_DL_ACTORS 4
|
||||
|
||||
// Set the number of barriers for processSlotTX to 512. This value has to be at least 483 for NTN where
|
||||
// DL-to-UL offset is up to 483. The selected value is also half of the frame range so that
|
||||
// (slot + frame * slots_per_frame) % NUM_PROCESS_SLOT_TX_BARRIERS is contiguous between the last slot of
|
||||
// frame 1023 and first slot of frame 0
|
||||
// e.g. in numerology 1:
|
||||
// (19 + 1023 * 20) % 512 = 511
|
||||
// (0 + 0 * 20) % 512 = 0
|
||||
#define NUM_PROCESS_SLOT_TX_BARRIERS 512
|
||||
|
||||
#include "impl_defs_top.h"
|
||||
#include "impl_defs_nr.h"
|
||||
#include "time_meas.h"
|
||||
@@ -322,6 +331,11 @@ typedef struct UE_NR_SCAN_INFO_s {
|
||||
int32_t freq_offset_Hz[3][10];
|
||||
} UE_NR_SCAN_INFO_t;
|
||||
|
||||
typedef struct {
|
||||
bool update;
|
||||
fapi_nr_dl_ntn_config_command_pdu ntn_config_params;
|
||||
} ntn_config_message_t;
|
||||
|
||||
/// Top-level PHY Data Structure for UE
|
||||
typedef struct PHY_VARS_NR_UE_s {
|
||||
/// \brief Module ID indicator for this instance
|
||||
@@ -394,7 +408,6 @@ typedef struct PHY_VARS_NR_UE_s {
|
||||
uint8_t prs_active_gNBs;
|
||||
NR_DL_UE_HARQ_t dl_harq_processes[2][NR_MAX_DLSCH_HARQ_PROCESSES];
|
||||
NR_UL_UE_HARQ_t ul_harq_processes[NR_MAX_ULSCH_HARQ_PROCESSES];
|
||||
|
||||
//Paging parameters
|
||||
uint32_t IMSImod1024;
|
||||
uint32_t PF;
|
||||
@@ -523,7 +536,7 @@ typedef struct PHY_VARS_NR_UE_s {
|
||||
void *phy_sim_pdsch_dl_ch_estimates_ext;
|
||||
uint8_t *phy_sim_dlsch_b;
|
||||
|
||||
dynamic_barrier_t process_slot_tx_barriers[NR_MAX_SLOTS_PER_FRAME];
|
||||
dynamic_barrier_t process_slot_tx_barriers[NUM_PROCESS_SLOT_TX_BARRIERS];
|
||||
|
||||
// Gain change required for automation RX gain change
|
||||
int adjust_rxgain;
|
||||
@@ -533,6 +546,9 @@ typedef struct PHY_VARS_NR_UE_s {
|
||||
sl_nr_ue_phy_params_t SL_UE_PHY_PARAMS;
|
||||
Actor_t sync_actor;
|
||||
Actor_t dl_actors[NUM_DL_ACTORS];
|
||||
|
||||
ntn_config_message_t* ntn_config_message;
|
||||
|
||||
} PHY_VARS_NR_UE;
|
||||
|
||||
typedef struct {
|
||||
@@ -540,6 +556,10 @@ typedef struct {
|
||||
int gNB_id;
|
||||
/// NR slot index within frame_tx [0 .. slots_per_frame - 1] to act upon for transmission
|
||||
int nr_slot_tx;
|
||||
/// NR slot index tx offset to resume
|
||||
/// in case of NTN, tx_offset can be changed dynamically via SIB19
|
||||
/// we need to notify the right tx thread slot based on TX offset change
|
||||
int nr_slot_tx_offset;
|
||||
int rx_slot_type;
|
||||
/// NR slot index within frame_rx [0 .. slots_per_frame - 1] to act upon for transmission
|
||||
int nr_slot_rx;
|
||||
|
||||
@@ -276,20 +276,6 @@
|
||||
/* - between reception of un uplink grant and its related transmission (k2) */
|
||||
#define NR_UE_CAPABILITY_SLOT_RX_TO_TX (3)
|
||||
|
||||
/* When the OAI UE receives RX slot N, it starts sending TX slot N+DURATION_RX_TO_TX.
|
||||
* Therefore DURATION_RX_TO_TX must not be larger than the minimum k1 and k2 values (NR_UE_CAPABILITY_SLOT_RX_TO_TX).
|
||||
* In case of NTN, the propagation delay is so large, that the TX slot needs to be transmitted far in advance.
|
||||
* Therefore, the NTN_UE_Koffset is added to DURATION_RX_TO_TX.
|
||||
*
|
||||
* Note: currently, the UE requires this to be a constant.
|
||||
* But in case of NTN, Koffset is only known after receiving SIB19.
|
||||
* Therefore, support should be added to allow changing DURATION_RX_TO_TX on reception of SIB19 (via FAPI-like interface).
|
||||
* E.g. no transmission before successful reception of SIB19, and re-sync with disabled transmission if Koffset changes.
|
||||
* When this has been implemented, the global variable NTN_UE_Koffset should be removed, too.
|
||||
*/
|
||||
extern unsigned int NTN_UE_Koffset;
|
||||
#define DURATION_RX_TO_TX (NR_UE_CAPABILITY_SLOT_RX_TO_TX + NTN_UE_Koffset)
|
||||
|
||||
#define NR_MAX_ULSCH_HARQ_PROCESSES (NR_MAX_HARQ_PROCESSES) /* cf 38.214 6.1 UE procedure for receiving the physical uplink shared channel */
|
||||
#define NR_MAX_DLSCH_HARQ_PROCESSES (NR_MAX_HARQ_PROCESSES) /* cf 38.214 5.1 UE procedure for receiving the physical downlink shared channel */
|
||||
#endif
|
||||
@@ -317,6 +303,6 @@ typedef struct {
|
||||
#include "common/openairinterface5g_limits.h"
|
||||
#include "assertions.h"
|
||||
|
||||
#endif //__PHY_IMPLEMENTATION_DEFS_H__
|
||||
/**@}
|
||||
#endif //__PHY_IMPLEMENTATION_DEFS_H__
|
||||
/**@}
|
||||
*/
|
||||
|
||||
@@ -326,6 +326,19 @@ static void configure_dlsch(NR_UE_DLSCH_t *dlsch0,
|
||||
}
|
||||
}
|
||||
|
||||
static void configure_ntn_params(PHY_VARS_NR_UE *ue, fapi_nr_dl_ntn_config_command_pdu* ntn_params_message)
|
||||
{
|
||||
if (!ue->ntn_config_message) {
|
||||
ue->ntn_config_message = CALLOC(1, sizeof(*ue->ntn_config_message));
|
||||
}
|
||||
|
||||
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.N_common_ta_adj = ntn_params_message->N_common_ta_adj;
|
||||
ue->ntn_config_message->ntn_config_params.ntn_ta_commondrift = ntn_params_message->ntn_ta_commondrift;
|
||||
ue->ntn_config_message->ntn_config_params.ntn_total_time_advance_ms = ntn_params_message->ntn_total_time_advance_ms;
|
||||
ue->ntn_config_message->update = true;
|
||||
}
|
||||
|
||||
static void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_command_pdu)
|
||||
{
|
||||
/* Time Alignment procedure
|
||||
@@ -451,6 +464,9 @@ static void nr_ue_scheduled_response_dl(NR_UE_MAC_INST_t *mac,
|
||||
case FAPI_NR_CONFIG_TA_COMMAND:
|
||||
configure_ta_command(phy, &pdu->ta_command_pdu);
|
||||
break;
|
||||
case FAPI_NR_DL_NTN_CONFIG_PARAMS:
|
||||
configure_ntn_params(phy, &pdu->ntn_config_command_pdu);
|
||||
break;
|
||||
default:
|
||||
LOG_W(PHY, "unhandled dl pdu type %d \n", pdu->pdu_type);
|
||||
}
|
||||
|
||||
@@ -729,8 +729,9 @@ static bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
if (is_cw0_active != ACTIVE && is_cw1_active != ACTIVE) {
|
||||
// don't wait anymore
|
||||
LOG_E(NR_PHY, "Internal error nr_ue_dlsch_procedure() called but no active cw on slot %d, harq %d\n", nr_slot_rx, harq_pid);
|
||||
const int ack_nack_slot = (proc->nr_slot_rx + dlsch[0].dlsch_config.k1_feedback) % ue->frame_parms.slots_per_frame;
|
||||
dynamic_barrier_join(&ue->process_slot_tx_barriers[ack_nack_slot]);
|
||||
const int ack_nack_slot_and_frame =
|
||||
(proc->nr_slot_rx + dlsch[0].dlsch_config.k1_feedback) + proc->frame_rx * ue->frame_parms.slots_per_frame;
|
||||
dynamic_barrier_join(&ue->process_slot_tx_barriers[ack_nack_slot_and_frame % NUM_PROCESS_SLOT_TX_BARRIERS]);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -865,8 +866,9 @@ static bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
|
||||
|
||||
// DLSCH decoding finished! don't wait anymore in Tx process, we know if we should answer ACK/NACK PUCCH
|
||||
if (dlsch[0].rnti_type == TYPE_C_RNTI_) {
|
||||
const int ack_nack_slot = (proc->nr_slot_rx + dlsch[0].dlsch_config.k1_feedback) % ue->frame_parms.slots_per_frame;
|
||||
dynamic_barrier_join(&ue->process_slot_tx_barriers[ack_nack_slot]);
|
||||
const int ack_nack_slot_and_frame =
|
||||
(proc->nr_slot_rx + dlsch[0].dlsch_config.k1_feedback) + proc->frame_rx * ue->frame_parms.slots_per_frame;
|
||||
dynamic_barrier_join(&ue->process_slot_tx_barriers[ack_nack_slot_and_frame % NUM_PROCESS_SLOT_TX_BARRIERS]);
|
||||
}
|
||||
|
||||
if (ue->phy_sim_dlsch_b)
|
||||
@@ -1148,8 +1150,9 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
|
||||
nr_ue_dlsch_procedures(ue, proc, dlsch, llr, G);
|
||||
else {
|
||||
LOG_E(NR_PHY, "Demodulation impossible, internal error\n");
|
||||
int ack_nack_slot = (proc->nr_slot_rx + dlsch_config->k1_feedback) % ue->frame_parms.slots_per_frame;
|
||||
dynamic_barrier_join(&ue->process_slot_tx_barriers[ack_nack_slot]);
|
||||
const int ack_nack_slot_and_frame =
|
||||
proc->nr_slot_rx + dlsch_config->k1_feedback + proc->frame_rx * ue->frame_parms.slots_per_frame;
|
||||
dynamic_barrier_join(&ue->process_slot_tx_barriers[ack_nack_slot_and_frame % NUM_PROCESS_SLOT_TX_BARRIERS]);
|
||||
LOG_W(NR_PHY, "nr_ue_pdsch_procedures failed in slot %d\n", proc->nr_slot_rx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user