From 93b08c5f20445c27e0d80b9a51fb1efc83fe8a9c Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 20 Dec 2024 11:30:55 +0100 Subject: [PATCH] bugfix in L1 analog beam allocation the allocation in L1 is done symbol-wise but the L2 is scheduling beams slot-based this means we need to check for beam availability in the whole slot --- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index ca90965ebc..b626aa59cd 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -58,9 +58,8 @@ int beam_index_allocation(int fapi_beam_index, int idx = -1; int ru_beam_idx = analog_bf->analog_beam_list[fapi_beam_index].value; for (int j = 0; j < common_vars->num_beams_period; j++) { + // L2 analog beam implementation is slot based, so we need to verify occupancy for the whole slot for (int i = 0; i < symbols_per_slot; i++) { - if (((bitmap_symbols >> i) & 0x01) == 0) - continue; int current_beam = common_vars->beam_id[j][slot * symbols_per_slot + i]; if (current_beam == -1 || current_beam == ru_beam_idx) idx = j; @@ -77,7 +76,7 @@ int beam_index_allocation(int fapi_beam_index, if (((bitmap_symbols >> j) & 0x01)) common_vars->beam_id[idx][slot * symbols_per_slot + j] = ru_beam_idx; } - LOG_D(PHY, "Allocating beam %d in slot %d\n", idx, slot); + LOG_D(PHY, "Allocating beam_id[%d] %d in slot %d\n", idx, ru_beam_idx, slot); return idx; }