Commit d2b131af authored by francescomani's avatar francescomani

msg3 retransmission rounds at gnb

parent 13980b5e
...@@ -773,6 +773,7 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t ...@@ -773,6 +773,7 @@ void nr_generate_Msg3_retransmission(module_id_t module_idP, int CC_id, frame_t
memset(pusch_pdu, 0, sizeof(nfapi_nr_pusch_pdu_t)); memset(pusch_pdu, 0, sizeof(nfapi_nr_pusch_pdu_t));
fill_msg3_pusch_pdu(pusch_pdu, scc, fill_msg3_pusch_pdu(pusch_pdu, scc,
ra->msg3_round,
startSymbolAndLength, startSymbolAndLength,
ra->rnti, scs, ra->rnti, scs,
bwpSize, bwpStart, bwpSize, bwpStart,
...@@ -956,6 +957,7 @@ void nr_get_Msg3alloc(module_id_t module_id, ...@@ -956,6 +957,7 @@ void nr_get_Msg3alloc(module_id_t module_id,
void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu, void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
int round,
int startSymbolAndLength, int startSymbolAndLength,
rnti_t rnti, int scs, rnti_t rnti, int scs,
int bwp_size, int bwp_start, int bwp_size, int bwp_start,
...@@ -1006,9 +1008,9 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu, ...@@ -1006,9 +1008,9 @@ void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
pusch_pdu->start_symbol_index = start_symbol_index; pusch_pdu->start_symbol_index = start_symbol_index;
pusch_pdu->nr_of_symbols = nr_of_symbols; pusch_pdu->nr_of_symbols = nr_of_symbols;
//Optional Data only included if indicated in pduBitmap //Optional Data only included if indicated in pduBitmap
pusch_pdu->pusch_data.rv_index = 0; // 8.3 in 38.213 pusch_pdu->pusch_data.rv_index = nr_rv_round_map[round];
pusch_pdu->pusch_data.harq_process_id = 0; pusch_pdu->pusch_data.harq_process_id = 0;
pusch_pdu->pusch_data.new_data_indicator = 1; // new data pusch_pdu->pusch_data.new_data_indicator = 1;
pusch_pdu->pusch_data.num_cb = 0; pusch_pdu->pusch_data.num_cb = 0;
pusch_pdu->pusch_data.tb_size = nr_compute_tbs(pusch_pdu->qam_mod_order, pusch_pdu->pusch_data.tb_size = nr_compute_tbs(pusch_pdu->qam_mod_order,
pusch_pdu->target_code_rate, pusch_pdu->target_code_rate,
...@@ -1097,6 +1099,7 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t ...@@ -1097,6 +1099,7 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
bwp_start = ibwp_start; bwp_start = ibwp_start;
fill_msg3_pusch_pdu(pusch_pdu,scc, fill_msg3_pusch_pdu(pusch_pdu,scc,
ra->msg3_round,
startSymbolAndLength, startSymbolAndLength,
ra->rnti, scs, ra->rnti, scs,
ibwp_size, bwp_start, ibwp_size, bwp_start,
......
...@@ -795,7 +795,15 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -795,7 +795,15 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
if( (frameP!=ra->Msg3_frame) || (slotP!=ra->Msg3_slot)) if( (frameP!=ra->Msg3_frame) || (slotP!=ra->Msg3_slot))
continue; continue;
LOG_W(NR_MAC, "Random Access %i failed at state %i (CRC did not pass)\n", i, ra->state); if (ra->msg3_round >= MAX_HARQ_ROUNDS - 1) {
LOG_W(NR_MAC, "Random Access %i failed at state %i (Reached msg3 max harq rounds)\n", i, ra->state);
nr_mac_remove_ra_rnti(gnb_mod_idP, ra->rnti);
nr_clear_ra_proc(gnb_mod_idP, CC_idP, frameP, ra);
return;
}
LOG_W(NR_MAC, "Random Access %i Msg3 CRC did not pass)\n", i);
ra->msg3_round++;
ra->state = Msg3_retransmission; ra->state = Msg3_retransmission;
} }
} }
......
...@@ -138,6 +138,7 @@ void nr_fill_rar(uint8_t Mod_idP, ...@@ -138,6 +138,7 @@ void nr_fill_rar(uint8_t Mod_idP,
void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu, void fill_msg3_pusch_pdu(nfapi_nr_pusch_pdu_t *pusch_pdu,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
int round,
int startSymbolAndLength, int startSymbolAndLength,
rnti_t rnti, int scs, rnti_t rnti, int scs,
int bwp_size, int bwp_start, int bwp_size, int bwp_start,
......
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