Move TTI to PID mapping to MAC

master
Ismael Gomez 4 years ago
parent 9d15a44c73
commit 77f905dc64

@ -67,6 +67,7 @@ public:
*/
typedef struct {
srslte_dci_ul_t dci;
uint32_t pid;
uint32_t current_tx_nb;
uint8_t* data;
bool needs_pdcch;

@ -299,22 +299,20 @@ void cc_worker::decode_pusch_rnti(stack_interface_phy_lte::ul_sched_grant_t& ul_
return;
}
uint32_t ul_pid = TTI_RX(ul_sf.tti) % SRSLTE_FDD_NOF_HARQ;
// Handle Format0 adaptive retx
// Use last TBS for this TB in case of mcs>28
if (ul_grant.dci.tb.mcs_idx > 28) {
int rv_idx = grant.tb.rv;
grant.tb = phy->ue_db.get_last_ul_tb(rnti, cc_idx, ul_pid);
grant.tb = phy->ue_db.get_last_ul_tb(rnti, cc_idx, ul_grant.pid);
grant.tb.rv = rv_idx;
Info("Adaptive retx: rnti=0x%x, pid=%d, rv_idx=%d, mcs=%d, old_tbs=%d",
rnti,
ul_pid,
ul_grant.pid,
grant.tb.rv,
ul_grant.dci.tb.mcs_idx,
grant.tb.tbs / 8);
}
phy->ue_db.set_last_ul_tb(rnti, cc_idx, ul_pid, grant.tb);
phy->ue_db.set_last_ul_tb(rnti, cc_idx, ul_grant.pid, grant.tb);
// Run PUSCH decoder
ul_cfg.pusch.softbuffers.rx = ul_grant.softbuffer_rx;

@ -906,6 +906,7 @@ int mac::get_ul_sched(uint32_t tti_tx_ul, ul_sched_list_t& ul_sched_res_list)
if (ue_db.count(rnti)) {
// Copy grant info
phy_ul_sched_res->pusch[n].current_tx_nb = sched_result.pusch[i].current_tx_nb;
phy_ul_sched_res->pusch[n].pid = TTI_RX(tti_tx_ul) % SRSLTE_FDD_NOF_HARQ;
phy_ul_sched_res->pusch[n].needs_pdcch = sched_result.pusch[i].needs_pdcch;
phy_ul_sched_res->pusch[n].dci = sched_result.pusch[i].dci;
phy_ul_sched_res->pusch[n].softbuffer_rx =

Loading…
Cancel
Save