Fix for async dl scheduling

master
Ismael Gomez 7 years ago
parent 739b8fc457
commit 240eba2af5

@ -52,6 +52,7 @@
#define TTIMOD_SZ (((2*HARQ_DELAY_MS) < 10)?10:20)
#define TTIMOD(tti) (tti%TTIMOD_SZ)
#define MOD_N_PROC (2*HARQ_DELAY_MS-8)
#define ASYNC_DL_SCHED (HARQ_DELAY_MS <= 4)
// Cat 3 UE - Max number of DL-SCH transport block bits received within a TTI

@ -135,7 +135,7 @@ private:
demux demux_unit;
/* DL/UL HARQ */
dl_harq_entity<MAC_NOF_HARQ_PROC, mac_grant_t, tb_action_dl_t, srslte_phy_grant_t> dl_harq;
dl_harq_entity<MAC_NOF_HARQ_PROC+MOD_N_PROC, mac_grant_t, tb_action_dl_t, srslte_phy_grant_t> dl_harq;
ul_harq_entity<MAC_NOF_HARQ_PROC, mac_grant_t, tb_action_ul_t, srslte_phy_grant_t> ul_harq;
/* MAC Uplink-related Procedures */

@ -65,8 +65,7 @@ phch_worker::phch_worker() : tr_exec(10240)
cell_initiated = false;
pregen_enabled = false;
trace_enabled = false;
reset();
reset();
}
@ -97,7 +96,7 @@ void phch_worker::reset()
bzero(&period_cqi, sizeof(srslte_cqi_periodic_cfg_t));
I_sr = 0;
rnti_is_set = false;
rar_cqi_request = false;
rar_cqi_request = false;
cfi = 0;
}
@ -482,7 +481,11 @@ bool phch_worker::decode_pdcch_dl(srsue::mac_interface_phy::mac_grant_t* grant)
/* Fill MAC grant structure */
grant->ndi[0] = dci_unpacked.ndi;
grant->ndi[1] = dci_unpacked.ndi_1;
grant->pid = ASYNC_DL_SCHED?dci_unpacked.harq_process:(tti%(2*HARQ_DELAY_MS));
if (tti < MOD_N_PROC) {
grant->pid = ASYNC_DL_SCHED?dci_unpacked.harq_process:tti+(2*HARQ_DELAY_MS);
} else {
grant->pid = ASYNC_DL_SCHED?dci_unpacked.harq_process:(tti%(2*HARQ_DELAY_MS));
}
grant->n_bytes[0] = grant->phy_grant.dl.mcs[0].tbs / (uint32_t) 8;
grant->n_bytes[1] = grant->phy_grant.dl.mcs[1].tbs / (uint32_t) 8;
grant->tti = tti;

Loading…
Cancel
Save