Commit fcd77ea1 authored by cig's avatar cig

Review Msg3 tranmission

- now transmitting resetting Msg3 slot and frame to -1 after transmission
- cleanup in Msg3 scheduling
- checked Msg3 pdu configuration against the 3GPP specs
parent 70028ba4
...@@ -285,9 +285,9 @@ typedef struct { ...@@ -285,9 +285,9 @@ typedef struct {
int starting_preamble_nb; int starting_preamble_nb;
/// Scheduled TX frame for RA Msg3 /// Scheduled TX frame for RA Msg3
frame_t msg3_frame; int msg3_frame;
/// Scheduled TX slot for RA Msg3 /// Scheduled TX slot for RA Msg3
slot_t msg3_slot; int msg3_slot;
/// Received TPC command (in dB) from RAR /// Received TPC command (in dB) from RAR
int8_t Msg3_TPC; int8_t Msg3_TPC;
/// Flag to indicate whether it is the first Msg3 to be transmitted /// Flag to indicate whether it is the first Msg3 to be transmitted
......
...@@ -482,6 +482,7 @@ void nr_Msg3_transmitted(module_id_t mod_id, uint8_t CC_id, frame_t frameP, uint ...@@ -482,6 +482,7 @@ void nr_Msg3_transmitted(module_id_t mod_id, uint8_t CC_id, frame_t frameP, uint
// - fix rrc data req logic // - fix rrc data req logic
// - retrieve TBS // - retrieve TBS
// - add mac_rrc_nr_data_req_ue, etc ... // - add mac_rrc_nr_data_req_ue, etc ...
// - Msg3 Retransmissions to be scheduled by DCI 0_0
uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
fapi_nr_ul_config_prach_pdu *prach_pdu, fapi_nr_ul_config_prach_pdu *prach_pdu,
module_id_t mod_id, module_id_t mod_id,
...@@ -591,7 +592,6 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources, ...@@ -591,7 +592,6 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
if (ra->RA_window_cnt >= 0 && ra->RA_RAPID_found == 1) { if (ra->RA_window_cnt >= 0 && ra->RA_RAPID_found == 1) {
// Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213) // Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213)
// TbD Msg3 Retransmissions to be scheduled by DCI 0_0
nr_ra_succeeded(mod_id, frame, nr_slot_tx); nr_ra_succeeded(mod_id, frame, nr_slot_tx);
......
...@@ -1277,9 +1277,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in ...@@ -1277,9 +1277,7 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id); NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id);
RA_config_t *ra = &mac->ra; RA_config_t *ra = &mac->ra;
if (ra->ra_state == WAIT_RAR){ if (ul_info->slot_tx == ra->msg3_slot && ul_info->frame_tx == ra->msg3_frame){
if (ra->RA_active && ul_info->slot_tx == ra->msg3_slot && ul_info->frame_tx == ra->msg3_frame){
uint8_t ulsch_input_buffer[MAX_ULSCH_PAYLOAD_BYTES]; uint8_t ulsch_input_buffer[MAX_ULSCH_PAYLOAD_BYTES];
nr_scheduled_response_t scheduled_response; nr_scheduled_response_t scheduled_response;
...@@ -1341,8 +1339,13 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in ...@@ -1341,8 +1339,13 @@ NR_UE_L2_STATE_t nr_ue_scheduler(nr_downlink_indication_t *dl_info, nr_uplink_in
nr_Msg3_transmitted(ul_info->module_id, ul_info->cc_id, ul_info->frame_tx, ul_info->gNB_index); nr_Msg3_transmitted(ul_info->module_id, ul_info->cc_id, ul_info->frame_tx, ul_info->gNB_index);
} }
// disable future transmissions of Msg3 at the next (frame, slot) occasion
ra->msg3_slot = -1;
ra->msg3_frame = -1;
} }
} else if (ra->ra_state == RA_SUCCEEDED || get_softmodem_params()->phy_test) {
if (ra->ra_state == RA_SUCCEEDED || get_softmodem_params()->phy_test) {
uint8_t nb_dmrs_re_per_rb; uint8_t nb_dmrs_re_per_rb;
uint8_t ulsch_input_buffer[MAX_ULSCH_PAYLOAD_BYTES]; uint8_t ulsch_input_buffer[MAX_ULSCH_PAYLOAD_BYTES];
......
...@@ -52,6 +52,14 @@ ...@@ -52,6 +52,14 @@
// #define DEBUG_RAR // #define DEBUG_RAR
// #define DEBUG_MSG3 // #define DEBUG_MSG3
// Configuration of Msg3 PDU according to clauses:
// - 8.3 of 3GPP TS 38.213 version 16.3.0 Release 16
// - 6.1.2.2 of TS 38.214
// - 6.1.3 of TS 38.214
// - 6.2.2 of TS 38.214
// - 6.1.4.2 of TS 38.214
// - 6.4.1.1.1 of TS 38.211
// - 6.3.1.7 of 38.211
void nr_config_Msg3_pdu(NR_UE_MAC_INST_t *mac, void nr_config_Msg3_pdu(NR_UE_MAC_INST_t *mac,
int Msg3_f_alloc, int Msg3_f_alloc,
uint8_t Msg3_t_alloc, uint8_t Msg3_t_alloc,
...@@ -75,11 +83,8 @@ void nr_config_Msg3_pdu(NR_UE_MAC_INST_t *mac, ...@@ -75,11 +83,8 @@ void nr_config_Msg3_pdu(NR_UE_MAC_INST_t *mac,
printf("[DEBUG_MSG3] Configuring 1 Msg3 PDU of %d UL pdus \n", ul_config->number_pdus); printf("[DEBUG_MSG3] Configuring 1 Msg3 PDU of %d UL pdus \n", ul_config->number_pdus);
#endif #endif
// Num PRB Overhead from PUSCH-ServingCellConfig // For Msg3 or MsgA PUSCH transmission the N_PRB_oh is always set to 0
if (mac->scg->spCellConfig->spCellConfigDedicated->uplinkConfig->pusch_ServingCellConfig->choice.setup->xOverhead == NULL)
N_PRB_oh = 0; N_PRB_oh = 0;
else
N_PRB_oh = *mac->scg->spCellConfig->spCellConfigDedicated->uplinkConfig->pusch_ServingCellConfig->choice.setup->xOverhead;
// active BWP start // active BWP start
int abwp_start = NRRIV2PRBOFFSET(ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); int abwp_start = NRRIV2PRBOFFSET(ubwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE);
...@@ -129,7 +134,11 @@ void nr_config_Msg3_pdu(NR_UE_MAC_INST_t *mac, ...@@ -129,7 +134,11 @@ void nr_config_Msg3_pdu(NR_UE_MAC_INST_t *mac,
// Frequency hopping // Frequency hopping
pusch_config_pdu->frequency_hopping = freq_hopping; pusch_config_pdu->frequency_hopping = freq_hopping;
// TC-RNTI // TC-RNTI
if (ra->t_crnti) {
pusch_config_pdu->rnti = ra->t_crnti; pusch_config_pdu->rnti = ra->t_crnti;
} else {
pusch_config_pdu->rnti = mac->crnti;
}
// DM-RS configuration according to 6.2.2 UE DM-RS transmission procedure in 38.214 // DM-RS configuration according to 6.2.2 UE DM-RS transmission procedure in 38.214
pusch_config_pdu->dmrs_config_type = pusch_dmrs_type1; pusch_config_pdu->dmrs_config_type = pusch_dmrs_type1;
......
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