Commit f67dd8eb authored by Francesco Mani's avatar Francesco Mani

controlling availability of beam for msg3

parent 627f4f88
...@@ -595,7 +595,8 @@ void nr_get_Msg3alloc(module_id_t module_id, ...@@ -595,7 +595,8 @@ void nr_get_Msg3alloc(module_id_t module_id,
NR_BWP_Uplink_t *ubwp, NR_BWP_Uplink_t *ubwp,
sub_frame_t current_slot, sub_frame_t current_slot,
frame_t current_frame, frame_t current_frame,
NR_RA_t *ra) { NR_RA_t *ra,
int16_t *tdd_beam_association) {
// msg3 is schedulend in mixed slot in the following TDD period // msg3 is schedulend in mixed slot in the following TDD period
// for now we consider a TBS of 18 bytes // for now we consider a TBS of 18 bytes
...@@ -624,6 +625,18 @@ void nr_get_Msg3alloc(module_id_t module_id, ...@@ -624,6 +625,18 @@ void nr_get_Msg3alloc(module_id_t module_id,
else else
ra->Msg3_frame = current_frame + (temp_slot/nr_slots_per_frame[mu]); ra->Msg3_frame = current_frame + (temp_slot/nr_slots_per_frame[mu]);
// beam association for FR2
if (*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0] >= 257) {
uint8_t tdd_period_slot = scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSlots + scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots;
if ((scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofDownlinkSymbols > 0) || (scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols > 0))
tdd_period_slot++;
int num_tdd_period = ra->Msg3_slot/tdd_period_slot;
if((tdd_beam_association[num_tdd_period]!=-1)&&(tdd_beam_association[num_tdd_period]!=ra->beam_id))
AssertFatal(1==0,"Cannot schedule MSG3\n");
else
tdd_beam_association[num_tdd_period] = ra->beam_id;
}
LOG_I(MAC, "[RAPROC] Msg3 slot %d: current slot %u Msg3 frame %u k2 %u Msg3_tda_id %u start symbol index %u\n", ra->Msg3_slot, current_slot, ra->Msg3_frame, k2,ra->Msg3_tda_id, StartSymbolIndex); LOG_I(MAC, "[RAPROC] Msg3 slot %d: current slot %u Msg3 frame %u k2 %u Msg3_tda_id %u start symbol index %u\n", ra->Msg3_slot, current_slot, ra->Msg3_frame, k2,ra->Msg3_tda_id, StartSymbolIndex);
uint16_t *vrb_map_UL = uint16_t *vrb_map_UL =
&RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[ra->Msg3_slot * 275]; &RC.nrmac[module_id]->common_channels[CC_id].vrb_map_UL[ra->Msg3_slot * 275];
...@@ -968,7 +981,7 @@ void nr_generate_Msg2(module_id_t module_idP, ...@@ -968,7 +981,7 @@ void nr_generate_Msg2(module_id_t module_idP,
dl_req->nPDUs+=2; dl_req->nPDUs+=2;
// Program UL processing for Msg3 // Program UL processing for Msg3
nr_get_Msg3alloc(module_idP, CC_id, scc, ubwp, slotP, frameP, ra); nr_get_Msg3alloc(module_idP, CC_id, scc, ubwp, slotP, frameP, ra, nr_mac->tdd_beam_association);
LOG_I(MAC, "Frame %d, Subframe %d: Setting Msg3 reception for Frame %d Subframe %d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot); LOG_I(MAC, "Frame %d, Subframe %d: Setting Msg3 reception for Frame %d Subframe %d\n", frameP, slotP, ra->Msg3_frame, ra->Msg3_slot);
nr_add_msg3(module_idP, CC_id, frameP, slotP); nr_add_msg3(module_idP, CC_id, frameP, slotP);
ra->state = WAIT_Msg3; ra->state = WAIT_Msg3;
......
...@@ -131,7 +131,8 @@ void nr_get_Msg3alloc(module_id_t module_id, ...@@ -131,7 +131,8 @@ void nr_get_Msg3alloc(module_id_t module_id,
NR_BWP_Uplink_t *ubwp, NR_BWP_Uplink_t *ubwp,
sub_frame_t current_subframe, sub_frame_t current_subframe,
frame_t current_frame, frame_t current_frame,
NR_RA_t *ra); NR_RA_t *ra,
int16_t *tdd_beam_association);
/* \brief Function in gNB to fill RAR pdu when requested by PHY. /* \brief Function in gNB to fill RAR pdu when requested by PHY.
@param ra Instance of RA resources of gNB @param ra Instance of RA resources of gNB
......
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