fix retransmission of acknack in pucch after ack missed detection
This commit is contained in:
@@ -131,9 +131,10 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
|
|||||||
dlsch0_harq->mcs_table=dlsch_config_pdu->mcs_table;
|
dlsch0_harq->mcs_table=dlsch_config_pdu->mcs_table;
|
||||||
downlink_harq_process(dlsch0_harq, dlsch0->current_harq_pid, dlsch_config_pdu->ndi, dlsch_config_pdu->rv, dlsch0->rnti_type);
|
downlink_harq_process(dlsch0_harq, dlsch0->current_harq_pid, dlsch_config_pdu->ndi, dlsch_config_pdu->rv, dlsch0->rnti_type);
|
||||||
if (dlsch0_harq->status != ACTIVE) {
|
if (dlsch0_harq->status != ACTIVE) {
|
||||||
// dlsch0_harq->status not ACTIVE may be due to false retransmission. Reset the
|
// dlsch0_harq->status not ACTIVE due to false retransmission
|
||||||
// following flag to skip PDSCH procedures in that case.
|
// Reset the following flag to skip PDSCH procedures in that case and retrasmit harq status
|
||||||
dlsch0->active = 0;
|
dlsch0->active = 0;
|
||||||
|
update_harq_status(module_id,dlsch0->current_harq_pid,dlsch0_harq->ack);
|
||||||
}
|
}
|
||||||
/* PTRS */
|
/* PTRS */
|
||||||
dlsch0_harq->PTRSFreqDensity = dlsch_config_pdu->PTRSFreqDensity;
|
dlsch0_harq->PTRSFreqDensity = dlsch_config_pdu->PTRSFreqDensity;
|
||||||
|
|||||||
@@ -43,5 +43,6 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response);
|
|||||||
\param scheduled_response including transmission config(dl_config, ul_config) and data transmission (tx_req)*/
|
\param scheduled_response including transmission config(dl_config, ul_config) and data transmission (tx_req)*/
|
||||||
int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config);
|
int8_t nr_ue_phy_config_request(nr_phy_config_t *phy_config);
|
||||||
|
|
||||||
|
void update_harq_status(module_id_t module_id, uint8_t harq_pid, uint8_t ack_nack);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -215,9 +215,6 @@ void set_harq_status(NR_UE_MAC_INST_t *mac,
|
|||||||
frame_t frame,
|
frame_t frame,
|
||||||
int slot);
|
int slot);
|
||||||
|
|
||||||
void update_harq_status(nr_downlink_indication_t *dl_info,
|
|
||||||
int pdu_id);
|
|
||||||
|
|
||||||
uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
|
uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
|
||||||
frame_t frame,
|
frame_t frame,
|
||||||
int slot,
|
int slot,
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ int8_t nr_ue_decode_mib(module_id_t module_id,
|
|||||||
uint16_t ssb_start_subcarrier,
|
uint16_t ssb_start_subcarrier,
|
||||||
uint16_t cell_id)
|
uint16_t cell_id)
|
||||||
{
|
{
|
||||||
LOG_I(MAC,"[L2][MAC] decode mib\n");
|
LOG_D(MAC,"[L2][MAC] decode mib\n");
|
||||||
|
|
||||||
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||||
mac->physCellId = cell_id;
|
mac->physCellId = cell_id;
|
||||||
@@ -1233,23 +1233,6 @@ void set_harq_status(NR_UE_MAC_INST_t *mac,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void update_harq_status(nr_downlink_indication_t *dl_info, int pdu_id) {
|
|
||||||
|
|
||||||
NR_UE_MAC_INST_t *mac = get_mac_inst(dl_info->module_id);
|
|
||||||
uint8_t harq_pid = dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.harq_pid;
|
|
||||||
NR_UE_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[harq_pid];
|
|
||||||
|
|
||||||
if (current_harq->active) {
|
|
||||||
current_harq->ack = dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.ack_nack;
|
|
||||||
current_harq->ack_received = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
//shouldn't get here
|
|
||||||
LOG_E(MAC, "Trying to process acknack for an inactive harq process (%d)\n", harq_pid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
|
void nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
|
||||||
int slot,
|
int slot,
|
||||||
uint16_t rnti,
|
uint16_t rnti,
|
||||||
@@ -2067,7 +2050,7 @@ uint8_t get_downlink_ack(NR_UE_MAC_INST_t *mac,
|
|||||||
reverse_n_bits(&o_ACK,number_harq_feedback);
|
reverse_n_bits(&o_ACK,number_harq_feedback);
|
||||||
pucch->ack_payload = o_ACK;
|
pucch->ack_payload = o_ACK;
|
||||||
|
|
||||||
LOG_D(MAC,"frame %d slot %d pucch payload %d\n",frame,slot,o_ACK);
|
LOG_D(MAC,"frame %d slot %d pucch acknack payload %d\n",frame,slot,o_ACK);
|
||||||
|
|
||||||
return(number_harq_feedback);
|
return(number_harq_feedback);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,13 +81,30 @@ int handle_dci(module_id_t module_id, int cc_id, unsigned int gNB_index, frame_t
|
|||||||
// Note: sdu should always be processed because data and timing advance updates are transmitted by the UE
|
// Note: sdu should always be processed because data and timing advance updates are transmitted by the UE
|
||||||
int8_t handle_dlsch(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t *ul_time_alignment, int pdu_id){
|
int8_t handle_dlsch(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_t *ul_time_alignment, int pdu_id){
|
||||||
|
|
||||||
update_harq_status(dl_info, pdu_id);
|
update_harq_status(dl_info->module_id,
|
||||||
|
dl_info->rx_ind->rx_indication_body[pdu_id].pdsch_pdu.harq_pid,
|
||||||
|
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)
|
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);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void update_harq_status(module_id_t module_id, uint8_t harq_pid, uint8_t ack_nack) {
|
||||||
|
|
||||||
|
NR_UE_MAC_INST_t *mac = get_mac_inst(module_id);
|
||||||
|
NR_UE_HARQ_STATUS_t *current_harq = &mac->dl_harq_info[harq_pid];
|
||||||
|
|
||||||
|
if (current_harq->active) {
|
||||||
|
current_harq->ack = ack_nack;
|
||||||
|
current_harq->ack_received = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
//shouldn't get here
|
||||||
|
LOG_E(MAC, "Trying to process acknack for an inactive harq process (%d)\n", harq_pid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
|
int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
|
||||||
|
|
||||||
NR_UE_L2_STATE_t ret;
|
NR_UE_L2_STATE_t ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user