Fix Msg4 Ack at gNB and pdsch_to_harq_feedback_time_ind at UE
This commit is contained in:
@@ -748,7 +748,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* PDSCH_TO_HARQ_FEEDBACK_TIME_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/
|
/* PDSCH_TO_HARQ_FEEDBACK_TIME_IND (only if CRC scrambled by C-RNTI or CS-RNTI or new-RNTI)*/
|
||||||
dlsch_config_pdu_1_0->pdsch_to_harq_feedback_time_ind = dci->pdsch_to_harq_feedback_timing_indicator.val;
|
dlsch_config_pdu_1_0->pdsch_to_harq_feedback_time_ind = mac->ULbwp[mac->UL_BWP_Id-1]->bwp_Dedicated->pucch_Config->choice.setup->dl_DataToUL_ACK->list.array[dci->pdsch_to_harq_feedback_timing_indicator.val][0];
|
||||||
|
|
||||||
LOG_D(MAC,"(nr_ue_procedures.c) rnti = %x dl_config->number_pdus = %d\n",
|
LOG_D(MAC,"(nr_ue_procedures.c) rnti = %x dl_config->number_pdus = %d\n",
|
||||||
dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti,
|
dl_config->dl_config_list[dl_config->number_pdus].dlsch_config_pdu.rnti,
|
||||||
|
|||||||
@@ -1096,7 +1096,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
|||||||
NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp;
|
NR_BWP_Downlink_t *bwp = nr_mac->sched_ctrlCommon->active_bwp;
|
||||||
NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset;
|
NR_ControlResourceSet_t *coreset = nr_mac->sched_ctrlCommon->coreset;
|
||||||
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||||
NR_TDD_UL_DL_Pattern_t *tdd = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
|
|
||||||
|
|
||||||
int UE_id = find_nr_UE_id(module_idP, ra->rnti);
|
int UE_id = find_nr_UE_id(module_idP, ra->rnti);
|
||||||
NR_UE_info_t *UE_info = &nr_mac->UE_info;
|
NR_UE_info_t *UE_info = &nr_mac->UE_info;
|
||||||
@@ -1105,10 +1104,6 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
|||||||
long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
|
long BWPSize = NRRIV2BW(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
|
||||||
long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
|
long BWPStart = NRRIV2PRBOFFSET(scc->downlinkConfigCommon->initialDownlinkBWP->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
|
||||||
|
|
||||||
int nr_mix_slots = tdd->nrofDownlinkSymbols != 0 || tdd->nrofUplinkSymbols != 0;
|
|
||||||
int nr_slots_period = tdd->nrofDownlinkSlots + tdd->nrofUplinkSlots + nr_mix_slots;
|
|
||||||
int first_ul_slot_tdd = tdd->nrofDownlinkSlots + nr_slots_period * (slotP / nr_slots_period);
|
|
||||||
|
|
||||||
// HARQ management
|
// HARQ management
|
||||||
int8_t current_harq_pid = sched_ctrl->dl_harq_pid;
|
int8_t current_harq_pid = sched_ctrl->dl_harq_pid;
|
||||||
if (current_harq_pid < 0) {
|
if (current_harq_pid < 0) {
|
||||||
@@ -1125,9 +1120,11 @@ void nr_generate_Msg4(module_id_t module_idP, int CC_id, frame_t frameP, sub_fra
|
|||||||
DevAssert(!harq->is_waiting);
|
DevAssert(!harq->is_waiting);
|
||||||
add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid);
|
add_tail_nr_list(&sched_ctrl->feedback_dl_harq, current_harq_pid);
|
||||||
harq->is_waiting = true;
|
harq->is_waiting = true;
|
||||||
harq->feedback_slot = first_ul_slot_tdd;
|
|
||||||
ra->harq_pid = current_harq_pid;
|
ra->harq_pid = current_harq_pid;
|
||||||
|
|
||||||
|
nr_acknack_scheduling(module_idP, UE_id, frameP, slotP);
|
||||||
|
harq->feedback_slot = sched_ctrl->sched_pucch->ul_slot;
|
||||||
|
|
||||||
// Bytes to be transmitted
|
// Bytes to be transmitted
|
||||||
uint8_t *buf = (uint8_t *) harq->tb;
|
uint8_t *buf = (uint8_t *) harq->tb;
|
||||||
uint16_t mac_pdu_length = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, buf, 255, ra->cont_res_id);
|
uint16_t mac_pdu_length = nr_write_ce_dlsch_pdu(module_idP, nr_mac->sched_ctrlCommon, buf, 255, ra->cont_res_id);
|
||||||
@@ -1397,9 +1394,9 @@ void nr_check_Msg4_Ack(module_id_t module_id, int CC_id, frame_t frame, sub_fram
|
|||||||
{
|
{
|
||||||
if (harq->round == 0)
|
if (harq->round == 0)
|
||||||
{
|
{
|
||||||
|
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti);
|
||||||
nr_clear_ra_proc(module_id, CC_id, frame, ra);
|
nr_clear_ra_proc(module_id, CC_id, frame, ra);
|
||||||
UE_info->active[UE_id] = true;
|
UE_info->active[UE_id] = true;
|
||||||
LOG_I(NR_MAC, "(ue %i, rnti 0x%04x) Received Ack of RA-Msg4. CBRA procedure succeeded!\n", UE_id, ra->rnti);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user