diff --git a/radio/fhi_72/oaioran.c b/radio/fhi_72/oaioran.c index fc9f58a492..d6a31f3bc1 100644 --- a/radio/fhi_72/oaioran.c +++ b/radio/fhi_72/oaioran.c @@ -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]; diff --git a/radio/fhi_72/oran_isolate.c b/radio/fhi_72/oran_isolate.c index 3bdbe1df12..48e95e7344 100644 --- a/radio/fhi_72/oran_isolate.c +++ b/radio/fhi_72/oran_isolate.c @@ -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); diff --git a/radio/fhi_72/oran_isolate.h b/radio/fhi_72/oran_isolate.h index 174c1399a6..7dd61ad739 100644 --- a/radio/fhi_72/oran_isolate.h +++ b/radio/fhi_72/oran_isolate.h @@ -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;