Commit 4c9e1768 authored by Thomas Schlichter's avatar Thomas Schlichter

NR_UE: fix using NTN_UE_k2 instead of NTN_UE_slot_Rx_to_Tx

parent 7b630cd1
......@@ -43,6 +43,7 @@
#include "SCHED_NR_UE/phy_sch_processing_time.h"
extern PHY_VARS_NR_UE ***PHY_vars_UE_g;
extern uint16_t NTN_UE_k2; //the additional k2 value at UE
const char *const dl_pdu_type[] = {"DCI", "DLSCH", "RA_DLSCH", "SI_DLSCH", "P_DLSCH", "CSI_RS", "CSI_IM", "TA"};
const char *const ul_pdu_type[] = {"PRACH", "PUCCH", "PUSCH", "SRS"};
......@@ -375,15 +376,9 @@ void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_command
const double t_subframe = 1.0; // subframe duration of 1 msec
const int ul_tx_timing_adjustment = 1 + (int)ceil(slots_per_subframe*(N_t_1 + N_t_2 + N_TA_max + 0.5)/t_subframe);
int ta_slot_temp = ta_command_pdu->ta_slot + ul_tx_timing_adjustment + NTN_UE_slot_Rx_to_Tx;
int ta_slot_temp = ta_command_pdu->ta_slot + ul_tx_timing_adjustment + NTN_UE_k2;
ue->ta_slot = ta_slot_temp % slots_per_frame;
/*
if (ta_slot_temp > slots_per_frame)
ue->ta_frame = (ta_command_pdu->ta_frame + ta_slot_temp/slots_per_frame) % 1024;
else
ue->ta_frame = ta_command_pdu->ta_frame;
*/
ue->ta_frame = (ta_command_pdu->ta_frame + ta_slot_temp/slots_per_frame) % 1024;
ue->ta_frame = (ta_command_pdu->ta_frame + ta_slot_temp/slots_per_frame) % MAX_FRAME_NUMBER;
ue->ta_command = ta_command_pdu->ta_command;
LOG_D(PHY,"TA command received in Frame.Slot %d.%d -- Starting UL time alignment procedures. TA update will be applied at frame %d slot %d\n",
ta_command_pdu->ta_frame, ta_command_pdu->ta_slot, ue->ta_frame, ue->ta_slot);
......
......@@ -754,13 +754,11 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
return -1;
}
if(rnti != ra->ra_rnti && rnti != SI_RNTI && !get_softmodem_params()->no_harq)
{
dci->pdsch_to_harq_feedback_timing_indicator.val = dci->pdsch_to_harq_feedback_timing_indicator.val + NTN_UE_slot_Rx_to_Tx;
dci->pdsch_to_harq_feedback_timing_indicator.val = dci->pdsch_to_harq_feedback_timing_indicator.val + NTN_UE_k2;
if(rnti != ra->ra_rnti && rnti != SI_RNTI)
AssertFatal(1 + dci->pdsch_to_harq_feedback_timing_indicator.val > DURATION_RX_TO_TX,
"PDSCH to HARQ feedback time (%d) needs to be higher than DURATION_RX_TO_TX (%d).\n",
1 + dci->pdsch_to_harq_feedback_timing_indicator.val, DURATION_RX_TO_TX);
}
// set the harq status at MAC for feedback
set_harq_status(mac,
......
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