From 9fb091262aedb0f32be272968ffbe04e604886eb Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 3 May 2021 18:14:32 +0200 Subject: [PATCH] Duplicate NR PDSCH transmits ACK and add ACK Tx TTI to trace --- srsue/src/phy/nr/cc_worker.cc | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/srsue/src/phy/nr/cc_worker.cc b/srsue/src/phy/nr/cc_worker.cc index 9d7eb9503..454a24378 100644 --- a/srsue/src/phy/nr/cc_worker.cc +++ b/srsue/src/phy/nr/cc_worker.cc @@ -229,9 +229,14 @@ bool cc_worker::work_dl() mac_dl_grant.tti = dl_slot_cfg.idx; phy->stack->new_grant_dl(0, mac_dl_grant, &dl_action); - // Early stop if MAC says it doesn't need the TB + // Abort if MAC says it doesn't need the TB if (not dl_action.tb.enabled) { - logger.info("Decoding not required. Skipping PDSCH"); + // Force positive ACK + if (pdsch_cfg.grant.rnti_type == srsran_rnti_type_c) { + phy->set_pending_ack(dl_slot_cfg.idx, ack_resource, true); + } + + logger.info("Decoding not required. Skipping PDSCH. ack_tti_tx=%d", TTI_ADD(dl_slot_cfg.idx, ack_resource.k1)); return true; } @@ -270,8 +275,13 @@ bool cc_worker::work_dl() str.data(), str_extra.data()); } else { - logger.info( - pdsch_res.tb[0].payload, pdsch_cfg.grant.tb[0].tbs / 8, "PDSCH: cc=%d pid=%d %s", cc_idx, pid, str.data()); + logger.info(pdsch_res.tb[0].payload, + pdsch_cfg.grant.tb[0].tbs / 8, + "PDSCH: cc=%d pid=%d %s ack_tti_tx=%d", + cc_idx, + pid, + str.data(), + TTI_ADD(dl_slot_cfg.idx, ack_resource.k1)); } }