Commit 66395ff7 authored by cig's avatar cig

Set RA offset at UE to compensate for 2 frames offset introduced by gNB

parent 8394ee82
......@@ -188,6 +188,8 @@ typedef struct {
/* Random Access parameters */
/// state of RA procedure
RA_state_t ra_state;
/// RA rx frame offset: compensate RA rx offset introduced by OAI gNB.
uint8_t RA_offset;
/// RA-rnti
uint16_t ra_rnti;
/// Temporary CRNTI
......
......@@ -887,6 +887,8 @@ void nr_ue_prach_scheduler(module_id_t module_idP, frame_t frameP, sub_frame_t s
NR_RACH_ConfigGeneric_t *rach_ConfigGeneric = &setup->rach_ConfigGeneric;
config_index = rach_ConfigGeneric->prach_ConfigurationIndex;
mac->RA_offset = 2; // to compensate the rx frame offset at the gNB
if (is_nr_UL_slot(scc, slotP)) {
if (setup->msg1_SubcarrierSpacing)
......
......@@ -120,7 +120,7 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
if (mac->generate_nr_prach){
uint16_t monitoring_slot_period, monitoring_offset;
uint16_t rach_frame = mac->scheduled_response.ul_config->sfn;
uint16_t rx_rach_frame = (rach_frame + 2) % MAX_FRAME_NUMBER; // compensate 2 frames offset delay at gNB side
uint16_t rx_rach_frame = (rach_frame + mac->RA_offset) % MAX_FRAME_NUMBER; // compensate 2 frames offset delay at gNB side
uint16_t rach_slot = mac->scheduled_response.ul_config->slot;
nr_ue_msg2_scheduler(module_id, rx_rach_frame, rach_slot, &mac->msg2_rx_frame, &mac->msg2_rx_slot);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment