|
|
@ -249,6 +249,8 @@ bool cc_worker::work_dl_regular()
|
|
|
|
|
|
|
|
|
|
|
|
// If found a dci for this carrier, generate a grant, pass it to MAC and decode the associated PDSCH
|
|
|
|
// If found a dci for this carrier, generate a grant, pass it to MAC and decode the associated PDSCH
|
|
|
|
if (has_dl_grant) {
|
|
|
|
if (has_dl_grant) {
|
|
|
|
|
|
|
|
// PDCCH order has no associated PDSCH to decode
|
|
|
|
|
|
|
|
if (not dci_dl.is_pdcch_order) {
|
|
|
|
// Read last TB from last retx for this pid
|
|
|
|
// Read last TB from last retx for this pid
|
|
|
|
for (uint32_t i = 0; i < SRSRAN_MAX_CODEWORDS; i++) {
|
|
|
|
for (uint32_t i = 0; i < SRSRAN_MAX_CODEWORDS; i++) {
|
|
|
|
ue_dl_cfg.cfg.pdsch.grant.last_tbs[i] = phy->last_dl_tbs[dci_dl.pid][cc_idx][i];
|
|
|
|
ue_dl_cfg.cfg.pdsch.grant.last_tbs[i] = phy->last_dl_tbs[dci_dl.pid][cc_idx][i];
|
|
|
@ -266,7 +268,7 @@ bool cc_worker::work_dl_regular()
|
|
|
|
|
|
|
|
|
|
|
|
// Set RNTI
|
|
|
|
// Set RNTI
|
|
|
|
ue_dl_cfg.cfg.pdsch.rnti = dci_dl.rnti;
|
|
|
|
ue_dl_cfg.cfg.pdsch.rnti = dci_dl.rnti;
|
|
|
|
|
|
|
|
}
|
|
|
|
// Generate MAC grant
|
|
|
|
// Generate MAC grant
|
|
|
|
mac_interface_phy_lte::mac_grant_dl_t mac_grant = {};
|
|
|
|
mac_interface_phy_lte::mac_grant_dl_t mac_grant = {};
|
|
|
|
dl_phy_to_mac_grant(&ue_dl_cfg.cfg.pdsch.grant, &dci_dl, &mac_grant);
|
|
|
|
dl_phy_to_mac_grant(&ue_dl_cfg.cfg.pdsch.grant, &dci_dl, &mac_grant);
|
|
|
@ -357,6 +359,11 @@ void cc_worker::dl_phy_to_mac_grant(srsran_pdsch_grant_t*
|
|
|
|
mac_grant->pid = dl_dci->pid;
|
|
|
|
mac_grant->pid = dl_dci->pid;
|
|
|
|
mac_grant->rnti = dl_dci->rnti;
|
|
|
|
mac_grant->rnti = dl_dci->rnti;
|
|
|
|
mac_grant->tti = CURRENT_TTI;
|
|
|
|
mac_grant->tti = CURRENT_TTI;
|
|
|
|
|
|
|
|
mac_grant->is_pdcch_order = dl_dci->is_pdcch_order;
|
|
|
|
|
|
|
|
if (dl_dci->is_pdcch_order) {
|
|
|
|
|
|
|
|
mac_grant->preamble_idx = dl_dci->preamble_idx;
|
|
|
|
|
|
|
|
mac_grant->prach_mask_idx = dl_dci->prach_mask_idx;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < SRSRAN_MAX_CODEWORDS; i++) {
|
|
|
|
for (int i = 0; i < SRSRAN_MAX_CODEWORDS; i++) {
|
|
|
|
mac_grant->tb[i].ndi = dl_dci->tb[i].ndi;
|
|
|
|
mac_grant->tb[i].ndi = dl_dci->tb[i].ndi;
|
|
|
|