simpler RU beam management by storing RU beam index at L1 instead of FAPI beam index
This commit is contained in:
@@ -82,6 +82,7 @@ static void nr_generate_dci(PHY_VARS_gNB *gNB,
|
|||||||
// multi-beam number (for concurrent beams)
|
// multi-beam number (for concurrent beams)
|
||||||
int bitmap = SL_to_bitmap(cset_start_symb, pdcch_pdu_rel15->DurationSymbols);
|
int bitmap = SL_to_bitmap(cset_start_symb, pdcch_pdu_rel15->DurationSymbols);
|
||||||
int beam_nb = beam_index_allocation(dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx,
|
int beam_nb = beam_index_allocation(dci_pdu->precodingAndBeamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx,
|
||||||
|
&gNB->gNB_config.dbt_config,
|
||||||
&gNB->common_vars,
|
&gNB->common_vars,
|
||||||
slot,
|
slot,
|
||||||
frame_parms->symbols_per_slot,
|
frame_parms->symbols_per_slot,
|
||||||
|
|||||||
@@ -681,6 +681,7 @@ static int do_one_dlsch(unsigned char *input_ptr, PHY_VARS_gNB *gNB, NR_gNB_DLSC
|
|||||||
// beam number in multi-beam scenario (concurrent beams)
|
// beam number in multi-beam scenario (concurrent beams)
|
||||||
int bitmap = SL_to_bitmap(rel15->StartSymbolIndex, rel15->NrOfSymbols);
|
int bitmap = SL_to_bitmap(rel15->StartSymbolIndex, rel15->NrOfSymbols);
|
||||||
int beam_nb = beam_index_allocation(pb->prgs_list[0].dig_bf_interface_list[0].beam_idx,
|
int beam_nb = beam_index_allocation(pb->prgs_list[0].dig_bf_interface_list[0].beam_idx,
|
||||||
|
&gNB->gNB_config.dbt_config,
|
||||||
&gNB->common_vars,
|
&gNB->common_vars,
|
||||||
slot,
|
slot,
|
||||||
frame_parms->symbols_per_slot,
|
frame_parms->symbols_per_slot,
|
||||||
|
|||||||
@@ -85,7 +85,12 @@ void nr_fill_prach(PHY_VARS_gNB *gNB, int SFN, int Slot, nfapi_nr_prach_pdu_t *p
|
|||||||
// TODO no idea how to compute final prach symbol here so for now we go til the end of the slot
|
// TODO no idea how to compute final prach symbol here so for now we go til the end of the slot
|
||||||
int temp_nb_symbols = NR_NUMBER_OF_SYMBOLS_PER_SLOT - prach_pdu->prach_start_symbol;
|
int temp_nb_symbols = NR_NUMBER_OF_SYMBOLS_PER_SLOT - prach_pdu->prach_start_symbol;
|
||||||
int bitmap = SL_to_bitmap(prach_pdu->prach_start_symbol, temp_nb_symbols);
|
int bitmap = SL_to_bitmap(prach_pdu->prach_start_symbol, temp_nb_symbols);
|
||||||
prach->beam_nb = beam_index_allocation(fapi_beam_idx, &gNB->common_vars, Slot, NR_NUMBER_OF_SYMBOLS_PER_SLOT, bitmap);
|
prach->beam_nb = beam_index_allocation(fapi_beam_idx,
|
||||||
|
&gNB->gNB_config.dbt_config,
|
||||||
|
&gNB->common_vars,
|
||||||
|
Slot,
|
||||||
|
NR_NUMBER_OF_SYMBOLS_PER_SLOT,
|
||||||
|
bitmap);
|
||||||
}
|
}
|
||||||
LOG_D(NR_PHY,"Copying prach pdu %d bytes to index %d\n", (int)sizeof(*prach_pdu), prach_id);
|
LOG_D(NR_PHY,"Copying prach pdu %d bytes to index %d\n", (int)sizeof(*prach_pdu), prach_id);
|
||||||
memcpy(&prach->pdu, prach_pdu, sizeof(*prach_pdu));
|
memcpy(&prach->pdu, prach_pdu, sizeof(*prach_pdu));
|
||||||
|
|||||||
@@ -76,7 +76,12 @@ void nr_fill_ulsch(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_pusch_pdu_t
|
|||||||
if (gNB->common_vars.beam_id) {
|
if (gNB->common_vars.beam_id) {
|
||||||
int fapi_beam_idx = ulsch_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
int fapi_beam_idx = ulsch_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
||||||
int bitmap = SL_to_bitmap(ulsch_pdu->start_symbol_index, ulsch_pdu->nr_of_symbols);
|
int bitmap = SL_to_bitmap(ulsch_pdu->start_symbol_index, ulsch_pdu->nr_of_symbols);
|
||||||
ulsch->beam_nb = beam_index_allocation(fapi_beam_idx, &gNB->common_vars, slot, NR_NUMBER_OF_SYMBOLS_PER_SLOT, bitmap);
|
ulsch->beam_nb = beam_index_allocation(fapi_beam_idx,
|
||||||
|
&gNB->gNB_config.dbt_config,
|
||||||
|
&gNB->common_vars,
|
||||||
|
slot,
|
||||||
|
NR_NUMBER_OF_SYMBOLS_PER_SLOT,
|
||||||
|
bitmap);
|
||||||
}
|
}
|
||||||
ulsch->frame = frame;
|
ulsch->frame = frame;
|
||||||
ulsch->slot = slot;
|
ulsch->slot = slot;
|
||||||
|
|||||||
@@ -73,7 +73,12 @@ void nr_fill_pucch(PHY_VARS_gNB *gNB,
|
|||||||
if (gNB->common_vars.beam_id) {
|
if (gNB->common_vars.beam_id) {
|
||||||
int fapi_beam_idx = pucch_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
int fapi_beam_idx = pucch_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
||||||
int bitmap = SL_to_bitmap(pucch_pdu->start_symbol_index, pucch_pdu->nr_of_symbols);
|
int bitmap = SL_to_bitmap(pucch_pdu->start_symbol_index, pucch_pdu->nr_of_symbols);
|
||||||
pucch->beam_nb = beam_index_allocation(fapi_beam_idx, &gNB->common_vars, slot, NR_NUMBER_OF_SYMBOLS_PER_SLOT, bitmap);
|
pucch->beam_nb = beam_index_allocation(fapi_beam_idx,
|
||||||
|
&gNB->gNB_config.dbt_config,
|
||||||
|
&gNB->common_vars,
|
||||||
|
slot,
|
||||||
|
NR_NUMBER_OF_SYMBOLS_PER_SLOT,
|
||||||
|
bitmap);
|
||||||
}
|
}
|
||||||
memcpy((void *)&pucch->pucch_pdu, (void *)pucch_pdu, sizeof(nfapi_nr_pucch_pdu_t));
|
memcpy((void *)&pucch->pucch_pdu, (void *)pucch_pdu, sizeof(nfapi_nr_pucch_pdu_t));
|
||||||
LOG_D(PHY,
|
LOG_D(PHY,
|
||||||
|
|||||||
@@ -59,7 +59,12 @@ void nr_fill_srs(PHY_VARS_gNB *gNB, frame_t frame, slot_t slot, nfapi_nr_srs_pdu
|
|||||||
if (gNB->common_vars.beam_id) {
|
if (gNB->common_vars.beam_id) {
|
||||||
int bitmap = SL_to_bitmap(srs_pdu->time_start_position, 1 << srs_pdu->num_symbols);
|
int bitmap = SL_to_bitmap(srs_pdu->time_start_position, 1 << srs_pdu->num_symbols);
|
||||||
int fapi_beam_idx = srs_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
int fapi_beam_idx = srs_pdu->beamforming.prgs_list[0].dig_bf_interface_list[0].beam_idx;
|
||||||
srs->beam_nb = beam_index_allocation(fapi_beam_idx, &gNB->common_vars, slot, NR_NUMBER_OF_SYMBOLS_PER_SLOT, bitmap);
|
srs->beam_nb = beam_index_allocation(fapi_beam_idx,
|
||||||
|
&gNB->gNB_config.dbt_config,
|
||||||
|
&gNB->common_vars,
|
||||||
|
slot,
|
||||||
|
NR_NUMBER_OF_SYMBOLS_PER_SLOT,
|
||||||
|
bitmap);
|
||||||
}
|
}
|
||||||
memcpy((void *)&srs->srs_pdu, (void *)srs_pdu, sizeof(nfapi_nr_srs_pdu_t));
|
memcpy((void *)&srs->srs_pdu, (void *)srs_pdu, sizeof(nfapi_nr_srs_pdu_t));
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -45,18 +45,24 @@
|
|||||||
//#define DEBUG_RXDATA
|
//#define DEBUG_RXDATA
|
||||||
//#define SRS_IND_DEBUG
|
//#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)
|
if (!common_vars->beam_id)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
int idx = -1;
|
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 j = 0; j < common_vars->num_beams_period; j++) {
|
||||||
for (int i = 0; i < symbols_per_slot; i++) {
|
for (int i = 0; i < symbols_per_slot; i++) {
|
||||||
if (((bitmap_symbols >> i) & 0x01) == 0)
|
if (((bitmap_symbols >> i) & 0x01) == 0)
|
||||||
continue;
|
continue;
|
||||||
int current_beam = common_vars->beam_id[j][slot * symbols_per_slot + i];
|
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;
|
idx = j;
|
||||||
else {
|
else {
|
||||||
idx = -1;
|
idx = -1;
|
||||||
@@ -66,10 +72,10 @@ int beam_index_allocation(int fapi_beam_index, NR_gNB_COMMON *common_vars, int s
|
|||||||
if (idx != -1)
|
if (idx != -1)
|
||||||
break;
|
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++) {
|
for (int j = 0; j < symbols_per_slot; j++) {
|
||||||
if (((bitmap_symbols >> j) & 0x01))
|
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);
|
LOG_D(PHY, "Allocating beam %d in slot %d\n", idx, slot);
|
||||||
return idx;
|
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
|
// beam number in a scenario with multiple concurrent beams
|
||||||
int bitmap = SL_to_bitmap(ssb_start_symbol, 4); // 4 ssb symbols
|
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,
|
int beam_nb = beam_index_allocation(pb->prgs_list[0].dig_bf_interface_list[0].beam_idx,
|
||||||
|
&cfg->dbt_config,
|
||||||
&gNB->common_vars,
|
&gNB->common_vars,
|
||||||
slot,
|
slot,
|
||||||
fp->symbols_per_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++)
|
for (int j = 0; j < mapping_parms.size; j++)
|
||||||
csi_bitmap |= ((1 << lprime_num) - 1) << mapping_parms.loverline[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,
|
int beam_nb = beam_index_allocation(pb->prgs_list[0].dig_bf_interface_list[0].beam_idx,
|
||||||
|
&cfg->dbt_config,
|
||||||
&gNB->common_vars,
|
&gNB->common_vars,
|
||||||
slot,
|
slot,
|
||||||
fp->symbols_per_slot,
|
fp->symbols_per_slot,
|
||||||
|
|||||||
@@ -47,5 +47,10 @@ void feptx_prec(RU_t *ru,int frame_tx,int tti_tx);
|
|||||||
void nr_phy_init_RU(RU_t *ru);
|
void nr_phy_init_RU(RU_t *ru);
|
||||||
void nr_phy_free_RU(RU_t *ru);
|
void nr_phy_free_RU(RU_t *ru);
|
||||||
void clear_slot_beamid(PHY_VARS_gNB *gNB, int slot);
|
void clear_slot_beamid(PHY_VARS_gNB *gNB, int slot);
|
||||||
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);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user