fapi new data indicator as bool and storage of previous NDI value to HARQ structures
This commit is contained in:
@@ -104,8 +104,6 @@ typedef struct {
|
||||
typedef struct {
|
||||
/// Indicator of first reception
|
||||
uint8_t first_rx;
|
||||
/// Last Ndi received for this process on DCI (used for C-RNTI only)
|
||||
uint8_t Ndi;
|
||||
/// DLSCH status flag indicating
|
||||
SCH_status_t status;
|
||||
/// Transport block size
|
||||
|
||||
@@ -311,14 +311,14 @@ static void configure_dlsch(NR_UE_DLSCH_t *dlsch0,
|
||||
if ((dlsch_config_pdu->dmrs_ports>>i)&0x01) Nl += 1;
|
||||
}
|
||||
dlsch0->Nl = Nl;
|
||||
if (dlsch_config_pdu->ndi) {
|
||||
if (dlsch_config_pdu->new_data_indicator) {
|
||||
dlsch0_harq->first_rx = true;
|
||||
dlsch0_harq->DLround = 0;
|
||||
} else {
|
||||
dlsch0_harq->first_rx = false;
|
||||
dlsch0_harq->DLround++;
|
||||
}
|
||||
downlink_harq_process(dlsch0_harq, current_harq_pid, dlsch_config_pdu->ndi, dlsch_config_pdu->rv, dlsch0->rnti_type);
|
||||
downlink_harq_process(dlsch0_harq, current_harq_pid, dlsch_config_pdu->new_data_indicator, dlsch_config_pdu->rv, dlsch0->rnti_type);
|
||||
if (dlsch0_harq->status != ACTIVE) {
|
||||
// dlsch0_harq->status not ACTIVE due to false retransmission
|
||||
// Reset the following flag to skip PDSCH procedures in that case and retrasmit harq status
|
||||
|
||||
@@ -115,7 +115,6 @@ void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq)
|
||||
dl_harq->status = SCH_IDLE;
|
||||
dl_harq->first_rx = 1;
|
||||
dl_harq->DLround = 0;
|
||||
dl_harq->Ndi = 2; // set to an invalid value
|
||||
dl_harq->ack = DL_ACKNACK_NO_SET;
|
||||
}
|
||||
|
||||
@@ -152,31 +151,9 @@ void downlink_harq_process(NR_DL_UE_HARQ_t *dl_harq, int harq_pid, int dci_ndi,
|
||||
rv,
|
||||
dci_ndi,
|
||||
rnti_type,
|
||||
dl_harq->Ndi != dci_ndi ? "yes" : "no");
|
||||
dci_ndi ? "yes" : "no");
|
||||
AssertFatal(rv<4 && rv>=0, "invalid redondancy version %d\n", rv);
|
||||
if (dci_ndi!=dl_harq->Ndi) {
|
||||
if (dl_harq->ack == DL_NACK)
|
||||
LOG_D(PHY,"New transmission on a harq pid (%d) never acknowledged\n", harq_pid);
|
||||
else
|
||||
LOG_D(PHY,"Starting new transmission on a harq pid (%d)\n", harq_pid);
|
||||
} else {
|
||||
if (dl_harq->ack != DL_NACK)
|
||||
LOG_D(PHY,"gNB asked for retransmission even if we sent ACK\n");
|
||||
else
|
||||
LOG_D(PHY,"Starting retransmission on a harq pid (%d), rv (%d)\n", harq_pid, rv);
|
||||
}
|
||||
|
||||
if (dci_ndi!=dl_harq->Ndi) {
|
||||
dl_harq->first_rx = true;
|
||||
dl_harq->DLround = 0;
|
||||
} else {
|
||||
dl_harq->first_rx = false;
|
||||
dl_harq->DLround++;
|
||||
}
|
||||
|
||||
dl_harq->status = ACTIVE;
|
||||
|
||||
dl_harq->Ndi = dci_ndi;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user