Remove the usage of global mem for rach rx process
saves about 600MB of memory allocation Move the definition of PRACH items and the PRACH list to the defs_nr_commons.h file. Do not re-write the entire structure in nr_schedule_rx_prach(), as it is quite large now.
This commit is contained in:
committed by
Robert Schmidt
parent
fff95cc075
commit
1292cd68b7
@@ -184,12 +184,17 @@ static int read_prach_data(ru_info_t *ru, int frame, int slot)
|
||||
int nb_rx_per_ru = ru->nb_rx / fh_init->xran_ports;
|
||||
/* If it is PRACH slot, copy prach IQ from XRAN PRACH buffer to OAI PRACH buffer */
|
||||
if (is_prach_slot) {
|
||||
if (!ru->prach_buf) {
|
||||
LOG_W(HW, "we get rach data from ru, but it is not scheduled %d.%d\n", frame, slot);
|
||||
return -1;
|
||||
}
|
||||
for (sym_idx = 0; sym_idx < prach_sym; sym_idx++) {
|
||||
for (int aa = 0; aa < ru->nb_rx; aa++) {
|
||||
int16_t *dst, *src;
|
||||
int idx = 0;
|
||||
oran_buf_list_t *bufs = get_xran_buffers(aa / nb_rx_per_ru);
|
||||
dst = ru->prach_buf[aa]; // + (sym_idx*576));
|
||||
// hardcoded to use only first prach occasion
|
||||
dst = (int16_t *)ru->prach_buf[0][aa];
|
||||
src = (int16_t *)bufs->prachdstdecomp[aa % nb_rx_per_ru][tti % XRAN_N_FE_BUF_LEN].pBuffers[sym_idx].pData;
|
||||
/* convert Network order to host order */
|
||||
if (ru_conf->compMeth_PRACH == XRAN_COMPMETHOD_NONE) {
|
||||
|
||||
+17
-13
@@ -31,6 +31,7 @@
|
||||
#include "common/utils/LOG/log.h"
|
||||
#include "common/utils/LOG/vcd_signal_dumper.h"
|
||||
#include "openair1/PHY/defs_gNB.h"
|
||||
#include "openair1/PHY/NR_TRANSPORT/nr_transport_proto.h"
|
||||
#include "oaioran.h"
|
||||
#include "oran-config.h"
|
||||
|
||||
@@ -212,13 +213,15 @@ int trx_oran_ctlrecv(openair0_device *device, void *msg, ssize_t msg_len)
|
||||
|
||||
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]
|
||||
prach_item_t *prach_id = find_nr_prach(&ru->gNB_list[0]->prach_list, *frame, *slot, SEARCH_EXIST);
|
||||
ru_info_t ru_info = {
|
||||
.nb_rx = ru->nb_rx * ru->num_beams_period,
|
||||
.nb_tx = ru->nb_tx * ru->num_beams_period,
|
||||
.rxdataF = ru->common.rxdataF,
|
||||
.beam_id = ru->common.beam_id,
|
||||
.num_beams_period = ru->num_beams_period,
|
||||
.prach_buf = prach_id ? prach_id->rxsigF : NULL,
|
||||
};
|
||||
|
||||
RU_proc_t *proc = &ru->proc;
|
||||
int f, sl;
|
||||
@@ -269,12 +272,13 @@ void oran_fh_if4p5_south_in(RU_t *ru, int *frame, int *slot)
|
||||
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;
|
||||
ru_info_t ru_info = {
|
||||
.nb_rx = ru->nb_rx * ru->num_beams_period,
|
||||
.nb_tx = ru->nb_tx * ru->num_beams_period,
|
||||
.txdataF_BF = ru->common.txdataF_BF,
|
||||
.beam_id = ru->common.beam_id,
|
||||
.num_beams_period = ru->num_beams_period,
|
||||
};
|
||||
|
||||
// printf("south_out:\tframe=%d\tslot=%d\ttimestamp=%ld\n",frame,slot,timestamp);
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "xran_fh_o_du.h"
|
||||
|
||||
#include "openair1/PHY/impl_defs_nr.h"
|
||||
#include "openair1/PHY/TOOLS/tools_defs.h"
|
||||
/*
|
||||
* Structure added to bear the information needed from OAI RU
|
||||
*/
|
||||
@@ -50,7 +51,7 @@ typedef struct ru_info_s {
|
||||
int num_beams_period;
|
||||
|
||||
// Needed for Prach
|
||||
int16_t **prach_buf;
|
||||
c16_t (*prach_buf)[NB_ANTENNAS_RX][NR_PRACH_SEQ_LEN_L];
|
||||
} ru_info_t;
|
||||
|
||||
/** @brief Reads RX data (PRACH/PUSCH) of next slot.
|
||||
|
||||
Reference in New Issue
Block a user