Commit dbc4b0e3 authored by Melissa Elkadi's avatar Melissa Elkadi

Updating merged code with harq_pid global

The harq_pid is set to inactive during the scheduling
of ACK/NACK, but this is happening before tx_req (PDSCH)
is recevied. We update the global harq_pid then use it
once we get the PDSCH PDU, then we set it to inactive.
Also, the global previously wasnt being set properly because
a memset was changing the def_dci_re15 struct. We now
memset after we update the harq_pid global.
parent 1f4b5520
Branches unavailable
2025.w14 2025.w13 2025.w12 2025.w11 2025.w10 2025.w09 2025.w08 2025.w07 2025.w06 2025.w05 2025.w04 2025.w03 2025.w02 2024.w51 2024.w50 2024.w49 2024.w48 2024.w47 2024.w46 2024.w45 2024.w44 2024.w43 2024.w42 2024.w41 2024.w40 2024.w39 2024.w38 2024.w36 2024.w35 2024.w34 2024.w33 2024.w32 2024.w31 2024.w30 2024.w29 2024.w28 2024.w27 2024.w26 2024.w25 2024.w24 2024.w23 2024.w22 2024.w21 2024.w18 2024.w17 2024.w16 2024.w15 2024.w14 2024.w13 2024.w12 2024.w11 2024.w10 2024.w09 2024.w08 2024.w06 2024.w05 2024.w04 2024.w03 2024.w02 2024.w01 2023.w51 2023.w50 2023.w49 2023.w48 2023.w47 2023.w45 2023.w43 2023.w42 2023.w41 2023.w40 2023.w39 2023.w38 2023.w37 2023.w36 2023.w34 2023.w33 2023.w32 2023.w31 2023.w30 2023.w29 2023.w28 2023.w27 2023.w26 2023.w25 2023.w24 2023.w23 2023.w22 2023.w21 2023.w20 2023.w19 2023.w18 2023.w18b 2023.w16 2023.w15 2023.w14 2023.w13 2023.w12 2023.w11 2023.w11b 2023.w10 2023.w10b 2023.w09 2023.w08 2023.w08b 2023.w07 2023.w06 2023.w05 2023.w03 2023.w02 2022.42 2022.41 2022.w51 2022.w50 2022.w49 2022.w48 2022.w47 2022.w46 2022.w45 2022.w43 2022.w42 2022.w42b 2022.w41 2022.w40 2022.w39 2022.w38 2022.w37 2022.w37b 2022.w36 2022.w35 2022.w33 2022.w32 2022.w31 2022.w31b 2022.w30 2022.w29 2022.w26 2022.w25 2022.w24 2022.w24b 2022.w23 2022.w22 2022.w21 2022.w20 2022.w19 2022.w18 2022.w17 2022.w15 2022.w15b 2022.w14a 2022.w13 2022.w13b 2022.w13a 2022.w12 2022.w10 2022.w09 2022.w09b 2022.w08 2022.w08b 2022.w07 2022.w07b 2022.w06 2022.w06a 2022.w05 2022.w05b 2022.w03_hotfix 2022.w03_b 2022.w02 2022.w01 v2.2.0 v2.1.0 v2.0.0 setparam flexran-eol ARC_1.3
No related merge requests found
...@@ -510,7 +510,6 @@ int nr_ue_process_dci_indication_pdu(module_id_t module_id,int cc_id, int gNB_in ...@@ -510,7 +510,6 @@ int nr_ue_process_dci_indication_pdu(module_id_t module_id,int cc_id, int gNB_in
def_dci_pdu_rel15 = &mac->def_dci_pdu_rel15[dci->dci_format]; def_dci_pdu_rel15 = &mac->def_dci_pdu_rel15[dci->dci_format];
} }
int8_t ret_proc = nr_ue_process_dci(module_id, cc_id, gNB_index, frame, slot, def_dci_pdu_rel15, dci); int8_t ret_proc = nr_ue_process_dci(module_id, cc_id, gNB_index, frame, slot, def_dci_pdu_rel15, dci);
memset(def_dci_pdu_rel15, 0, sizeof(dci_pdu_rel15_t));
return ret_proc; return ret_proc;
} }
...@@ -1961,8 +1960,6 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac, ...@@ -1961,8 +1960,6 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
pucch->n_CCE = current_harq->n_CCE; pucch->n_CCE = current_harq->n_CCE;
pucch->N_CCE = current_harq->N_CCE; pucch->N_CCE = current_harq->N_CCE;
pucch->delta_pucch = current_harq->delta_pucch; pucch->delta_pucch = current_harq->delta_pucch;
current_harq->active = false;
current_harq->ack_received = false;
} }
} }
} }
......
...@@ -314,6 +314,7 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi ...@@ -314,6 +314,7 @@ static void copy_tx_data_req_to_dl_info(nr_downlink_indication_t *dl_info, nfapi
memcpy(pdu, ptr, pdu_list->TLVs[j].length); memcpy(pdu, ptr, pdu_list->TLVs[j].length);
pdu += pdu_list->TLVs[j].length; pdu += pdu_list->TLVs[j].length;
} }
dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.ack_nack = 1; // Melissa we will come back during channel modelling
dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.pdu_length = length; dl_info->rx_ind->rx_indication_body[i].pdsch_pdu.pdu_length = length;
if (tx_data_request->Slot == 7 && mac->ra.ra_state <= WAIT_RAR) { //Melissa this means we have an RAR, sorta hacky though if (tx_data_request->Slot == 7 && mac->ra.ra_state <= WAIT_RAR) { //Melissa this means we have an RAR, sorta hacky though
dl_info->rx_ind->rx_indication_body[i].pdu_type = FAPI_NR_RX_PDU_TYPE_RAR; dl_info->rx_ind->rx_indication_body[i].pdu_type = FAPI_NR_RX_PDU_TYPE_RAR;
...@@ -852,9 +853,27 @@ int8_t handle_dlsch(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t *u ...@@ -852,9 +853,27 @@ int8_t handle_dlsch(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t *u
dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.harq_pid = g_harq_pid; dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.harq_pid = g_harq_pid;
update_harq_status(dl_info, pdu_id); update_harq_status(dl_info, pdu_id);
NR_UE_MAC_INST_t *mac = get_mac_inst(dl_info->module_id);
fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
nr_scheduled_response_t scheduled_response;
fill_scheduled_response(&scheduled_response,
dl_config,
NULL,
NULL,
dl_info->module_id,
dl_info->cc_id,
dl_info->frame,
dl_info->slot,
dl_info->thread_id);
nr_ue_uci_scheduled_response_stub(&scheduled_response);
if(dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.ack_nack) if(dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.ack_nack)
nr_ue_send_sdu(dl_info, ul_time_alignment, pdu_id); nr_ue_send_sdu(dl_info, ul_time_alignment, pdu_id);
NR_UE_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[g_harq_pid];
current_harq->active = false;
current_harq->ack_received = false;
return 0; return 0;
} }
...@@ -922,7 +941,13 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_ ...@@ -922,7 +941,13 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
dl_info->frame, dl_info->frame,
dl_info->slot, dl_info->slot,
dl_info->dci_ind->dci_list+i); dl_info->dci_ind->dci_list+i);
g_harq_pid = mac->def_dci_pdu_rel15[dl_info->dci_ind->dci_list[0].dci_format].harq_pid;
fapi_nr_dci_indication_pdu_t *dci_index = dl_info->dci_ind->dci_list+i;
dci_pdu_rel15_t *def_dci_pdu_rel15 = &mac->def_dci_pdu_rel15[dci_index->dci_format];
g_harq_pid = def_dci_pdu_rel15->harq_pid;
LOG_D(NR_MAC, "Setting harq_pid = %d and dci_index = %d (based on format)\n", g_harq_pid, dci_index->dci_format);
memset(def_dci_pdu_rel15, 0, sizeof(*def_dci_pdu_rel15));
ret_mask |= (ret << FAPI_NR_DCI_IND); ret_mask |= (ret << FAPI_NR_DCI_IND);
if (ret >= 0) { if (ret >= 0) {
AssertFatal( nr_ue_if_module_inst[module_id] != NULL, "IF module is NULL!\n" ); AssertFatal( nr_ue_if_module_inst[module_id] != NULL, "IF module is NULL!\n" );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment