Commit e511cb25 authored by Marwan Hammouda's avatar Marwan Hammouda

fixes for timing offset compensation during initial sync

parent 7f8dee12
...@@ -937,6 +937,14 @@ void *UE_thread(void *arg) ...@@ -937,6 +937,14 @@ void *UE_thread(void *arg)
UE->rx_offset_slot++; UE->rx_offset_slot++;
UL_TO_Tx_ofs = 2*rx_offset_slot; //to adapt the UE's transmission time in order to get aligned at gNB UL_TO_Tx_ofs = 2*rx_offset_slot; //to adapt the UE's transmission time in order to get aligned at gNB
acc_UL_To_TX += UL_TO_Tx_ofs; acc_UL_To_TX += UL_TO_Tx_ofs;
if(UE->rx_offset_slot > ((2*nb_slot_frame) + 1))
{
UE->rx_offset_slot = 1;
UE->rx_offset_comp = 0;
}
//LOG_A(PHY, "UE->rx_offset_TO: %d, UE->rx_offset_slot: %d, UE->rx_offset_comp: %d, rx_offset_slot: %d\n", UE->rx_offset_TO, UE->rx_offset_slot, UE->rx_offset_comp, rx_offset_slot);
} }
readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms) + rx_offset_slot; readBlockSize=get_readBlockSize(slot_nr, &UE->frame_parms) + rx_offset_slot;
......
...@@ -647,7 +647,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac, ...@@ -647,7 +647,7 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
pusch_config_pdu->pusch_data.harq_process_id = dci->harq_pid; pusch_config_pdu->pusch_data.harq_process_id = dci->harq_pid;
/* TPC_PUSCH */ /* TPC_PUSCH */
// according to TS 38.213 Table Table 7.1.1-1 // according to TS 38.213 Table Table 7.1.1-1
if (pusch_Config->pusch_PowerControl->tpc_Accumulation != NULL) { // TPC ACCUMULATION DISABLED if IE present if ((pusch_Config!=NULL) && (pusch_Config->pusch_PowerControl->tpc_Accumulation != NULL)) { // TPC ACCUMULATION DISABLED if IE present
if (dci->tpc == 0) { if (dci->tpc == 0) {
pusch_config_pdu->absolute_delta_PUSCH = -4; pusch_config_pdu->absolute_delta_PUSCH = -4;
} }
......
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