Set TX nBeamIndex according to beam allocation

Initialize ru_info structure with beam information, and set beams on TX
direction. Initialize the number of antennas for both RX/TX in both
cases for completeness.
This commit is contained in:
Mario Joa-Ng
2025-10-20 17:21:12 +02:00
committed by Robert Schmidt
parent c645e8b096
commit 2d27e0fc0a
3 changed files with 23 additions and 0 deletions
+8
View File
@@ -512,6 +512,14 @@ int xran_fh_tx_send_slot(ru_info_t *ru, int frame, int slot, uint64_t timestamp)
for (idxElm = 0; idxElm < pRbMap->nPrbElm; idxElm++) {
struct xran_section_desc *p_sec_desc = NULL;
p_prbMapElm = &pRbMap->prbMap[idxElm];
if (sym_idx == 0) {
// ant_id / no of antenna per beam gives the beam_nb
p_prbMapElm->nBeamIndex = ru->beam_id[ant_id / (ru->nb_tx / ru->num_beams_period)][slot * XRAN_NUM_OF_SYMBOL_PER_SLOT];
// In phy-f-1.0/fhi_lib/lib/api/xran_pkt_cp.h, beamId:15 is of 15bit. -1 set extension bit ef:1 to 1 mistakenly.
if (p_prbMapElm->nBeamIndex == -1)
p_prbMapElm->nBeamIndex = 0;
}
// assumes one fragment per symbol
#ifdef E_RELEASE
p_sec_desc = p_prbMapElm->p_sec_desc[sym_id][0];
+7
View File
@@ -214,7 +214,10 @@ void oran_fh_if4p5_south_in(RU_t *ru, int *frame, int *slot)
{
ru_info_t ru_info;
ru_info.nb_rx = ru->nb_rx * ru->num_beams_period;
ru_info.nb_tx = ru->nb_tx * ru->num_beams_period;
ru_info.rxdataF = ru->common.rxdataF;
ru_info.beam_id = ru->common.beam_id;
ru_info.num_beams_period = ru->num_beams_period;
ru_info.prach_buf = ru->prach_rxsigF[0]; // index: [prach_oca][ant_id]
RU_proc_t *proc = &ru->proc;
@@ -267,8 +270,12 @@ void oran_fh_if4p5_south_out(RU_t *ru, int frame, int slot, uint64_t timestamp)
{
start_meas(&ru->tx_fhaul);
ru_info_t ru_info;
ru_info.nb_rx = ru->nb_rx * ru->num_beams_period;
ru_info.nb_tx = ru->nb_tx * ru->num_beams_period;
ru_info.txdataF_BF = ru->common.txdataF_BF;
ru_info.beam_id = ru->common.beam_id;
ru_info.num_beams_period = ru->num_beams_period;
// printf("south_out:\tframe=%d\tslot=%d\ttimestamp=%ld\n",frame,slot,timestamp);
int ret = xran_fh_tx_send_slot(&ru_info, frame, slot, timestamp);
+8
View File
@@ -41,6 +41,14 @@ typedef struct ru_info_s {
int nb_tx;
int32_t **txdataF_BF;
/// \brief Anaglogue beam ID for each OFDM symbol (used when beamforming not done in RU)
/// - first index: concurrent beam
/// - second index: beam_id [0.. symbols_per_frame]
int32_t **beam_id;
/// number of concurrent analog beams in period
int num_beams_period;
// Needed for Prach
int16_t **prach_buf;
} ru_info_t;