simpler RU beam management by storing RU beam index at L1 instead of FAPI beam index

This commit is contained in:
francescomani
2025-06-09 12:00:17 +02:00
parent bd05075ac6
commit 8a544b9fbb
8 changed files with 44 additions and 9 deletions
+12 -4
View File
@@ -45,18 +45,24 @@
//#define DEBUG_RXDATA
//#define SRS_IND_DEBUG
int beam_index_allocation(int fapi_beam_index, NR_gNB_COMMON *common_vars, int slot, int symbols_per_slot, int bitmap_symbols)
int beam_index_allocation(int fapi_beam_index,
nfapi_nr_dbt_pdu_t *dbt_config,
NR_gNB_COMMON *common_vars,
int slot,
int symbols_per_slot,
int bitmap_symbols)
{
if (!common_vars->beam_id)
return 0;
int idx = -1;
int ru_beam_idx = dbt_config->dig_beam_list[fapi_beam_index].txru_list[0].dig_beam_weight_Re;
for (int j = 0; j < common_vars->num_beams_period; j++) {
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 == fapi_beam_index)
if (current_beam == -1 || current_beam == ru_beam_idx)
idx = j;
else {
idx = -1;
@@ -66,10 +72,10 @@ int beam_index_allocation(int fapi_beam_index, NR_gNB_COMMON *common_vars, int s
if (idx != -1)
break;
}
AssertFatal(idx >= 0, "Couldn't allocate beam ID %d\n", fapi_beam_index);
AssertFatal(idx >= 0, "Couldn't allocate beam ID %d\n", ru_beam_idx);
for (int j = 0; j < symbols_per_slot; j++) {
if (((bitmap_symbols >> j) & 0x01))
common_vars->beam_id[idx][slot * symbols_per_slot + j] = fapi_beam_index;
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);
return idx;
@@ -132,6 +138,7 @@ void nr_common_signal_procedures(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_n
// beam number in a scenario with multiple concurrent beams
int bitmap = SL_to_bitmap(ssb_start_symbol, 4); // 4 ssb symbols
int beam_nb = beam_index_allocation(pb->prgs_list[0].dig_bf_interface_list[0].beam_idx,
&cfg->dbt_config,
&gNB->common_vars,
slot,
fp->symbols_per_slot,
@@ -273,6 +280,7 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
for (int j = 0; j < mapping_parms.size; j++)
csi_bitmap |= ((1 << lprime_num) - 1) << mapping_parms.loverline[j];
int beam_nb = beam_index_allocation(pb->prgs_list[0].dig_bf_interface_list[0].beam_idx,
&cfg->dbt_config,
&gNB->common_vars,
slot,
fp->symbols_per_slot,