mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
fix: patch to fix prach num of ports
Co-authored-by: Robert Schmidt <robert.schmidt@openairinterface.org> Signed-off-by: Sakthivel Velumani <s.velumani@northeastern.edu>
This commit is contained in:
@@ -106,6 +106,7 @@ void nr_schedule_rx_prach(PHY_VARS_gNB *gNB, int SFN, int Slot, nfapi_nr_prach_p
|
||||
bitmap,
|
||||
gNB->frame_parms.nb_antennas_rx,
|
||||
gNB->common_vars.beam_id);
|
||||
prach.ant_start = ant_start;
|
||||
}
|
||||
}
|
||||
bool found = spsc_q_put(&gNB->prach_ru_queue, &prach, sizeof(prach));
|
||||
|
||||
@@ -41,6 +41,7 @@ typedef struct {
|
||||
int restricted_set;
|
||||
int numerology_index;
|
||||
int nb_rx;
|
||||
int ant_start;
|
||||
c16_t (*Xu)[839];
|
||||
time_stats_t *rx_prach;
|
||||
c16_t (*prach_buf)[NUMBER_OF_NR_RU_PRACH_OCCASIONS_MAX][NR_PRACH_SEQ_LEN_L];
|
||||
|
||||
@@ -369,6 +369,8 @@ int xran_fh_rx_prach_read_slot(PHY_VARS_gNB *gNB, ru_info_t *ru, int *frame, int
|
||||
); // `p.slot` = slot in which PRACH is scheduled
|
||||
if (is_prach_slot) {
|
||||
ru->prach_buf = p.prach_buf;
|
||||
ru->nb_prach_rx = p.nb_rx;
|
||||
ru->start_prach_rx = p.ant_start;
|
||||
} else {
|
||||
LOG_W(HW, "[%d.%d] Expected PRACH reception of scheduled slot %d\n", *frame, *slot, p.slot);
|
||||
}
|
||||
@@ -408,13 +410,13 @@ int xran_fh_rx_prach_read_slot(PHY_VARS_gNB *gNB, ru_info_t *ru, int *frame, int
|
||||
int nb_rx_per_ru = ru->nb_rx / fh_init->xran_ports;
|
||||
|
||||
for (uint16_t cc_id = 0; cc_id < 1 /*nSectorNum*/; cc_id++) { // OAI does not support multiple CC yet.
|
||||
for (int aa = 0; aa < ru->nb_rx; aa++) {
|
||||
for (int aa = ru->start_prach_rx; aa < ru->start_prach_rx + ru->nb_prach_rx; aa++) {
|
||||
for (sym_idx = prach_start_sym; sym_idx < prach_end_sym; sym_idx++) {
|
||||
int16_t *dst, *src;
|
||||
int idx = 0;
|
||||
oran_buf_list_t *bufs = get_xran_buffers(aa / nb_rx_per_ru);
|
||||
// hardcoded to use only first prach occasion
|
||||
dst = (int16_t *)ru->prach_buf[aa][0];
|
||||
dst = (int16_t *)ru->prach_buf[aa - ru->start_prach_rx][0];
|
||||
#if defined K_RELEASE
|
||||
struct xran_prb_map * pPrbMap = (struct xran_prb_map *)bufs->prachdstdecomp[aa % nb_rx_per_ru][tti % XRAN_N_FE_BUF_LEN].pBuffers->pData;
|
||||
struct xran_rx_packet_ctl *p_rx_packet_ctl = &pPrbMap->sFrontHaulRxPacketCtrl[sym_idx];
|
||||
|
||||
@@ -35,6 +35,8 @@ typedef struct ru_info_s {
|
||||
|
||||
// Needed for Prach
|
||||
c16_t (*prach_buf)[NUMBER_OF_NR_RU_PRACH_OCCASIONS_MAX][NR_PRACH_SEQ_LEN_L];
|
||||
int nb_prach_rx;
|
||||
int start_prach_rx;
|
||||
} ru_info_t;
|
||||
|
||||
void print_fhi_counters(ru_info_t *ru, const int frame, const int slot);
|
||||
|
||||
Reference in New Issue
Block a user