MAC beam allocation for scheduling request
This commit is contained in:
@@ -1169,10 +1169,7 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot)
|
|||||||
const int pucch_index = get_pucch_index(SFN, slot, n_slots_frame, tdd, sched_ctrl->sched_pucch_size);
|
const int pucch_index = get_pucch_index(SFN, slot, n_slots_frame, tdd, sched_ctrl->sched_pucch_size);
|
||||||
NR_sched_pucch_t *curr_pucch = &sched_ctrl->sched_pucch[pucch_index];
|
NR_sched_pucch_t *curr_pucch = &sched_ctrl->sched_pucch[pucch_index];
|
||||||
|
|
||||||
if (curr_pucch->active &&
|
if (curr_pucch->active && curr_pucch->frame == SFN && curr_pucch->ul_slot == slot && curr_pucch->resource_indicator == idx)
|
||||||
curr_pucch->frame == SFN &&
|
|
||||||
curr_pucch->ul_slot == slot &&
|
|
||||||
curr_pucch->resource_indicator == idx)
|
|
||||||
curr_pucch->sr_flag = true;
|
curr_pucch->sr_flag = true;
|
||||||
else if (curr_pucch->active) {
|
else if (curr_pucch->active) {
|
||||||
LOG_E(NR_MAC,
|
LOG_E(NR_MAC,
|
||||||
@@ -1185,9 +1182,10 @@ void nr_sr_reporting(gNB_MAC_INST *nrmac, frame_t SFN, sub_frame_t slot)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
int beam_idx = 0; // TODO proper beam allocation
|
NR_beam_alloc_t beam = beam_allocation_procedure(&nrmac->beam_info, SFN, slot, UE->UE_beam_index, n_slots_frame);
|
||||||
|
AssertFatal(beam.idx >= 0, "Cannot allocate SR in any available beam\n");
|
||||||
const int index = ul_buffer_index(SFN, slot, ul_bwp->scs, nrmac->vrb_map_UL_size);
|
const int index = ul_buffer_index(SFN, slot, ul_bwp->scs, nrmac->vrb_map_UL_size);
|
||||||
uint16_t *vrb_map_UL = &nrmac->common_channels[CC_id].vrb_map_UL[beam_idx][index * MAX_BWP_SIZE];
|
uint16_t *vrb_map_UL = &nrmac->common_channels[CC_id].vrb_map_UL[beam.idx][index * MAX_BWP_SIZE];
|
||||||
const int bwp_start = ul_bwp->BWPStart;
|
const int bwp_start = ul_bwp->BWPStart;
|
||||||
const int bwp_size = ul_bwp->BWPSize;
|
const int bwp_size = ul_bwp->BWPSize;
|
||||||
set_pucch_allocation(ul_bwp, -1, bwp_size, curr_pucch);
|
set_pucch_allocation(ul_bwp, -1, bwp_size, curr_pucch);
|
||||||
|
|||||||
Reference in New Issue
Block a user