Msg3 delay is added to harq delay

master
Ismael Gomez 7 years ago
parent 99a5500527
commit a180b5ebac

@ -45,7 +45,7 @@
#define SRSLTE_N_RADIO_BEARERS 11
#define HARQ_DELAY_MS 4
#define MSG3_DELAY_MS 6
#define MSG3_DELAY_MS 2 // Delay added to HARQ_DELAY_MS
#define TTI_TX(tti) ((tti+HARQ_DELAY_MS)%10240)
#define TTI_RX_ACK(tti) ((tti+(2*HARQ_DELAY_MS))%10240)

@ -541,7 +541,7 @@ int sched::dl_sched_rar(dl_sched_rar_t rar[MAX_RAR_LIST])
pending_rar[j].rar_tti = 0;
// Save UL resources
uint32_t pending_tti=(current_tti+MSG3_DELAY_MS)%10;
uint32_t pending_tti=(current_tti+MSG3_DELAY_MS+HARQ_DELAY_MS)%10;
pending_msg3[pending_tti].enabled = true;
pending_msg3[pending_tti].rnti = pending_rar[j].rnti;
pending_msg3[pending_tti].L = L_prb;

@ -137,15 +137,13 @@ void phch_common::set_rar_grant(uint32_t tti, uint8_t grant_payload[SRSLTE_RAR_G
{
srslte_dci_rar_grant_unpack(&rar_grant, grant_payload);
rar_grant_pending = true;
int delay = MSG3_DELAY_MS-HARQ_DELAY_MS;
if (delay < 0) {
fprintf(stderr, "Error MSG3_DELAY_MS can't be lower than HARQ_DELAY_MS\n");
delay = 0;
if (MSG3_DELAY_MS < 0) {
fprintf(stderr, "Error MSG3_DELAY_MS can't be negative\n");
}
if (rar_grant.ul_delay) {
rar_grant_tti = (tti + delay + 1) % 10240;
rar_grant_tti = (tti + MSG3_DELAY_MS + 1) % 10240;
} else {
rar_grant_tti = (tti + delay) % 10240;
rar_grant_tti = (tti + MSG3_DELAY_MS) % 10240;
}
}

Loading…
Cancel
Save