Commit 5e930b0b authored by francescomani's avatar francescomani

MAC beam allocation for DLSCH

parent f235b249
...@@ -558,23 +558,13 @@ int get_cce_index(const gNB_MAC_INST *nrmac, ...@@ -558,23 +558,13 @@ int get_cce_index(const gNB_MAC_INST *nrmac,
const uint32_t Y = is_common ? 0 : get_Y(ss, slot, rnti); const uint32_t Y = is_common ? 0 : get_Y(ss, slot, rnti);
uint8_t nr_of_candidates; uint8_t nr_of_candidates;
for (int i=0; i<5; i++) { for (int i = 0; i < 5; i++) {
// for now taking the lowest value among the available aggregation levels // for now taking the lowest value among the available aggregation levels
find_aggregation_candidates(aggregation_level, find_aggregation_candidates(aggregation_level, &nr_of_candidates, ss, 1 << i);
&nr_of_candidates, if(nr_of_candidates > 0)
ss,
1<<i);
if(nr_of_candidates>0)
break; break;
} }
int CCEIndex = find_pdcch_candidate(nrmac, int CCEIndex = find_pdcch_candidate(nrmac, CC_id, *aggregation_level, nr_of_candidates, beam_idx, sched_pdcch, coreset, Y);
CC_id,
*aggregation_level,
nr_of_candidates,
beam_idx,
sched_pdcch,
coreset,
Y);
return CCEIndex; return CCEIndex;
} }
......
...@@ -983,7 +983,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac, ...@@ -983,7 +983,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac,
NR_UE_info_t *UE, NR_UE_info_t *UE,
frame_t frame, frame_t frame,
sub_frame_t slot, sub_frame_t slot,
int beam_index, int ue_beam,
int r_pucch, int r_pucch,
int is_common) int is_common)
{ {
...@@ -1073,7 +1073,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac, ...@@ -1073,7 +1073,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac,
else { // unoccupied occasion else { // unoccupied occasion
// checking if in ul_slot the resources potentially to be assigned to this PUCCH are available // checking if in ul_slot the resources potentially to be assigned to this PUCCH are available
set_pucch_allocation(ul_bwp, r_pucch, bwp_size, curr_pucch); set_pucch_allocation(ul_bwp, r_pucch, bwp_size, curr_pucch);
NR_beam_alloc_t beam = beam_allocation_procedure(&mac->beam_info, pucch_frame, pucch_slot, beam_index, n_slots_frame); NR_beam_alloc_t beam = beam_allocation_procedure(&mac->beam_info, pucch_frame, pucch_slot, ue_beam, n_slots_frame);
if (beam.idx < 0) { if (beam.idx < 0) {
LOG_D(NR_MAC, LOG_D(NR_MAC,
"DL %4d.%2d, UL_ACK %4d.%2d beam resources for this occasion are already occupied, move to the following occasion\n", "DL %4d.%2d, UL_ACK %4d.%2d beam resources for this occasion are already occupied, move to the following occasion\n",
...@@ -1093,7 +1093,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac, ...@@ -1093,7 +1093,7 @@ int nr_acknack_scheduling(gNB_MAC_INST *mac,
slot, slot,
pucch_frame, pucch_frame,
pucch_slot); pucch_slot);
reset_beam_status(&mac->beam_info, pucch_frame, pucch_slot, beam_index, n_slots_frame, beam.new_beam); reset_beam_status(&mac->beam_info, pucch_frame, pucch_slot, ue_beam, n_slots_frame, beam.new_beam);
continue; continue;
} }
// allocating a new PUCCH structure for this occasion // allocating a new PUCCH structure for this occasion
......
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