moving decision on DCI format type from L1 to MAC
This commit is contained in:
@@ -1059,14 +1059,9 @@ static int handle_bcch_dlsch(NR_UE_MAC_INST_t *mac,
|
||||
}
|
||||
|
||||
// L2 Abstraction Layer
|
||||
static int handle_dci(NR_UE_MAC_INST_t *mac,
|
||||
int cc_id,
|
||||
unsigned int gNB_index,
|
||||
frame_t frame,
|
||||
int slot,
|
||||
fapi_nr_dci_indication_pdu_t *dci)
|
||||
static nr_dci_format_t handle_dci(NR_UE_MAC_INST_t *mac, frame_t frame, int slot, fapi_nr_dci_indication_pdu_t *dci)
|
||||
{
|
||||
return nr_ue_process_dci_indication_pdu(mac, cc_id, gNB_index, frame, slot, dci);
|
||||
return nr_ue_process_dci_indication_pdu(mac, frame, slot, dci);
|
||||
}
|
||||
|
||||
static void handle_ssb_meas(NR_UE_MAC_INST_t *mac, uint8_t ssb_index, int16_t rsrp_dbm)
|
||||
@@ -1160,26 +1155,18 @@ static uint32_t nr_ue_dl_processing(nr_downlink_indication_t *dl_info)
|
||||
LOG_T(MAC, "[L2][IF MODULE][DL INDICATION][DCI_IND]\n");
|
||||
for (int i = 0; i < dl_info->dci_ind->number_of_dcis; i++) {
|
||||
LOG_T(MAC, ">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d\n", i, dl_info->dci_ind->number_of_dcis);
|
||||
int8_t ret = handle_dci(mac,
|
||||
dl_info->cc_id,
|
||||
dl_info->gNB_index,
|
||||
dl_info->frame,
|
||||
dl_info->slot,
|
||||
dl_info->dci_ind->dci_list + i);
|
||||
if (ret < 0)
|
||||
continue;
|
||||
fapi_nr_dci_indication_pdu_t *dci_index = dl_info->dci_ind->dci_list + i;
|
||||
nr_dci_format_t dci_format = handle_dci(mac, dl_info->frame, dl_info->slot, dl_info->dci_ind->dci_list + i);
|
||||
|
||||
/* The check below filters out UL_DCIs which are being processed as DL_DCIs. */
|
||||
if (dci_index->dci_format != NR_DL_DCI_FORMAT_1_0 && dci_index->dci_format != NR_DL_DCI_FORMAT_1_1) {
|
||||
if (dci_format != NR_DL_DCI_FORMAT_1_0 && dci_format != NR_DL_DCI_FORMAT_1_1) {
|
||||
LOG_D(NR_MAC, "We are filtering a UL_DCI to prevent it from being treated like a DL_DCI\n");
|
||||
continue;
|
||||
}
|
||||
dci_pdu_rel15_t *def_dci_pdu_rel15 = &mac->def_dci_pdu_rel15[dl_info->slot][dci_index->dci_format];
|
||||
dci_pdu_rel15_t *def_dci_pdu_rel15 = &mac->def_dci_pdu_rel15[dl_info->slot][dci_format];
|
||||
g_harq_pid = def_dci_pdu_rel15->harq_pid;
|
||||
LOG_T(NR_MAC, "Setting harq_pid = %d and dci_index = %d (based on format)\n", g_harq_pid, dci_index->dci_format);
|
||||
LOG_T(NR_MAC, "Setting harq_pid = %d and dci_index = %d (based on format)\n", g_harq_pid, dci_format);
|
||||
|
||||
ret_mask |= (ret << FAPI_NR_DCI_IND);
|
||||
ret_mask |= (1 << FAPI_NR_DCI_IND);
|
||||
AssertFatal(nr_ue_if_module_inst[dl_info->module_id] != NULL, "IF module is NULL!\n");
|
||||
fapi_nr_dl_config_request_t *dl_config = get_dl_config_request(mac, dl_info->slot);
|
||||
nr_scheduled_response_t scheduled_response = {.dl_config = dl_config,
|
||||
@@ -1191,71 +1178,71 @@ static uint32_t nr_ue_dl_processing(nr_downlink_indication_t *dl_info)
|
||||
memset(def_dci_pdu_rel15, 0, sizeof(*def_dci_pdu_rel15));
|
||||
}
|
||||
dl_info->dci_ind = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (dl_info->rx_ind != NULL) {
|
||||
if (dl_info->rx_ind != NULL) {
|
||||
|
||||
for (int i = 0; i < dl_info->rx_ind->number_pdus; ++i) {
|
||||
for (int i = 0; i < dl_info->rx_ind->number_pdus; ++i) {
|
||||
|
||||
fapi_nr_rx_indication_body_t rx_indication_body = dl_info->rx_ind->rx_indication_body[i];
|
||||
LOG_D(NR_MAC,
|
||||
"slot %d Sending DL indication to MAC. 1 PDU type %d of %d total number of PDUs \n",
|
||||
dl_info->slot,
|
||||
rx_indication_body.pdu_type,
|
||||
dl_info->rx_ind->number_pdus);
|
||||
fapi_nr_rx_indication_body_t rx_indication_body = dl_info->rx_ind->rx_indication_body[i];
|
||||
LOG_D(NR_MAC,
|
||||
"slot %d Sending DL indication to MAC. 1 PDU type %d of %d total number of PDUs \n",
|
||||
dl_info->slot,
|
||||
rx_indication_body.pdu_type,
|
||||
dl_info->rx_ind->number_pdus);
|
||||
|
||||
switch(rx_indication_body.pdu_type){
|
||||
case FAPI_NR_RX_PDU_TYPE_SSB:
|
||||
handle_rlm(rx_indication_body.ssb_pdu.radiolink_monitoring,
|
||||
dl_info->frame,
|
||||
mac);
|
||||
if(rx_indication_body.ssb_pdu.decoded_pdu) {
|
||||
handle_ssb_meas(mac,
|
||||
rx_indication_body.ssb_pdu.ssb_index,
|
||||
rx_indication_body.ssb_pdu.rsrp_dBm);
|
||||
ret_mask |= (handle_bcch_bch(mac,
|
||||
dl_info->cc_id,
|
||||
dl_info->gNB_index,
|
||||
dl_info->phy_data,
|
||||
rx_indication_body.ssb_pdu.pdu,
|
||||
rx_indication_body.ssb_pdu.additional_bits,
|
||||
rx_indication_body.ssb_pdu.ssb_index,
|
||||
rx_indication_body.ssb_pdu.ssb_length,
|
||||
rx_indication_body.ssb_pdu.ssb_start_subcarrier,
|
||||
rx_indication_body.ssb_pdu.arfcn,
|
||||
rx_indication_body.ssb_pdu.cell_id)) << FAPI_NR_RX_PDU_TYPE_SSB;
|
||||
}
|
||||
break;
|
||||
case FAPI_NR_RX_PDU_TYPE_SIB:
|
||||
ret_mask |= (handle_bcch_dlsch(mac,
|
||||
dl_info->cc_id, dl_info->gNB_index,
|
||||
rx_indication_body.pdsch_pdu.ack_nack,
|
||||
rx_indication_body.pdsch_pdu.pdu,
|
||||
rx_indication_body.pdsch_pdu.pdu_length)) << FAPI_NR_RX_PDU_TYPE_SIB;
|
||||
break;
|
||||
case FAPI_NR_RX_PDU_TYPE_DLSCH:
|
||||
ret_mask |= (handle_dlsch(mac, dl_info, i)) << FAPI_NR_RX_PDU_TYPE_DLSCH;
|
||||
break;
|
||||
case FAPI_NR_RX_PDU_TYPE_RAR:
|
||||
ret_mask |= (handle_dlsch(mac, dl_info, i)) << FAPI_NR_RX_PDU_TYPE_RAR;
|
||||
if (!dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.ack_nack)
|
||||
LOG_W(PHY, "Received a RAR-Msg2 but LDPC decode failed\n");
|
||||
else
|
||||
LOG_I(PHY, "RAR-Msg2 decoded\n");
|
||||
break;
|
||||
case FAPI_NR_CSIRS_IND:
|
||||
ret_mask |= (handle_csirs_measurements(mac,
|
||||
dl_info->frame,
|
||||
dl_info->slot,
|
||||
&rx_indication_body.csirs_measurements)) << FAPI_NR_CSIRS_IND;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch(rx_indication_body.pdu_type){
|
||||
case FAPI_NR_RX_PDU_TYPE_SSB:
|
||||
handle_rlm(rx_indication_body.ssb_pdu.radiolink_monitoring,
|
||||
dl_info->frame,
|
||||
mac);
|
||||
if(rx_indication_body.ssb_pdu.decoded_pdu) {
|
||||
handle_ssb_meas(mac,
|
||||
rx_indication_body.ssb_pdu.ssb_index,
|
||||
rx_indication_body.ssb_pdu.rsrp_dBm);
|
||||
ret_mask |= (handle_bcch_bch(mac,
|
||||
dl_info->cc_id,
|
||||
dl_info->gNB_index,
|
||||
dl_info->phy_data,
|
||||
rx_indication_body.ssb_pdu.pdu,
|
||||
rx_indication_body.ssb_pdu.additional_bits,
|
||||
rx_indication_body.ssb_pdu.ssb_index,
|
||||
rx_indication_body.ssb_pdu.ssb_length,
|
||||
rx_indication_body.ssb_pdu.ssb_start_subcarrier,
|
||||
rx_indication_body.ssb_pdu.arfcn,
|
||||
rx_indication_body.ssb_pdu.cell_id)) << FAPI_NR_RX_PDU_TYPE_SSB;
|
||||
}
|
||||
break;
|
||||
case FAPI_NR_RX_PDU_TYPE_SIB:
|
||||
ret_mask |= (handle_bcch_dlsch(mac,
|
||||
dl_info->cc_id, dl_info->gNB_index,
|
||||
rx_indication_body.pdsch_pdu.ack_nack,
|
||||
rx_indication_body.pdsch_pdu.pdu,
|
||||
rx_indication_body.pdsch_pdu.pdu_length)) << FAPI_NR_RX_PDU_TYPE_SIB;
|
||||
break;
|
||||
case FAPI_NR_RX_PDU_TYPE_DLSCH:
|
||||
ret_mask |= (handle_dlsch(mac, dl_info, i)) << FAPI_NR_RX_PDU_TYPE_DLSCH;
|
||||
break;
|
||||
case FAPI_NR_RX_PDU_TYPE_RAR:
|
||||
ret_mask |= (handle_dlsch(mac, dl_info, i)) << FAPI_NR_RX_PDU_TYPE_RAR;
|
||||
if (!dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.ack_nack)
|
||||
LOG_W(PHY, "Received a RAR-Msg2 but LDPC decode failed\n");
|
||||
else
|
||||
LOG_I(PHY, "RAR-Msg2 decoded\n");
|
||||
break;
|
||||
case FAPI_NR_CSIRS_IND:
|
||||
ret_mask |= (handle_csirs_measurements(mac,
|
||||
dl_info->frame,
|
||||
dl_info->slot,
|
||||
&rx_indication_body.csirs_measurements)) << FAPI_NR_CSIRS_IND;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
dl_info->rx_ind = NULL;
|
||||
}
|
||||
return ret_mask;
|
||||
dl_info->rx_ind = NULL;
|
||||
}
|
||||
return ret_mask;
|
||||
}
|
||||
|
||||
int nr_ue_dl_indication(nr_downlink_indication_t *dl_info)
|
||||
|
||||
Reference in New Issue
Block a user