From eca56653c1b1900dc88c2853ad8d2c612c333719 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 16 Jan 2024 12:34:00 +0100 Subject: [PATCH] Increase oai0_config maximum antennas to 8 Certain FH 7.2 use cases require 8 antennas, so make room to propagate this down. --- executables/nr-ru.c | 3 +++ radio/COMMON/common_lib.h | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/executables/nr-ru.c b/executables/nr-ru.c index c32fc0dc2f..8924c5729a 100644 --- a/executables/nr-ru.c +++ b/executables/nr-ru.c @@ -898,6 +898,9 @@ static void fill_rf_config(RU_t *ru, char *rf_config_file) cfg->configFilename = rf_config_file; + AssertFatal(ru->nb_tx > 0 && ru->nb_tx <= 8, "openair0 does not support more than 8 antennas\n"); + AssertFatal(ru->nb_rx > 0 && ru->nb_rx <= 8, "openair0 does not support more than 8 antennas\n"); + cfg->Mod_id = 0; cfg->num_rb_dl=N_RB; cfg->tx_num_channels=ru->nb_tx; diff --git a/radio/COMMON/common_lib.h b/radio/COMMON/common_lib.h index 4a3ab9d083..3ba6a381dc 100644 --- a/radio/COMMON/common_lib.h +++ b/radio/COMMON/common_lib.h @@ -226,31 +226,31 @@ typedef struct openair0_config { //! tx daughter card char* tx_subdev; //! \brief RX base addresses for mmapped_dma - int32_t *rxbase[4]; + int32_t *rxbase[8]; //! \brief RX buffer size for direct access int rxsize; //! \brief TX base addresses for mmapped_dma or direct access - int32_t *txbase[4]; + int32_t *txbase[8]; //! \brief Center frequency in Hz for RX. //! index: [0..rx_num_channels[ - double rx_freq[4]; + double rx_freq[8]; //! \brief Center frequency in Hz for TX. //! index: [0..rx_num_channels[ !!! see lte-ue.c:427 FIXME iterates over rx_num_channels - double tx_freq[4]; + double tx_freq[8]; double tune_offset; //! \brief memory //! \brief Pointer to Calibration table for RX gains rx_gain_calib_table_t *rx_gain_calib_table; //! mode for rxgain (ExpressMIMO2) - rx_gain_t rxg_mode[4]; + rx_gain_t rxg_mode[8]; //! \brief Gain for RX in dB. //! index: [0..rx_num_channels] - double rx_gain[4]; + double rx_gain[8]; //! \brief Gain offset (for calibration) in dB //! index: [0..rx_num_channels] - double rx_gain_offset[4]; + double rx_gain_offset[8]; //! gain for TX in dB - double tx_gain[4]; + double tx_gain[8]; //! RX bandwidth in Hz double rx_bw; //! TX bandwidth in Hz @@ -262,7 +262,7 @@ typedef struct openair0_config { //! Manual SDR IP address char *sdr_addrs; //! Auto calibration flag - int autocal[4]; + int autocal[8]; //! rf devices work with x bits iqs when oai have its own iq format //! the two following parameters are used to convert iqs int iq_txshift; @@ -295,9 +295,9 @@ typedef struct openair0_config { //! NR scs for raster int nr_scs_for_raster; //! Core IDs for RX FH - int rxfh_cores[4]; + int rxfh_cores[8]; //! Core IDs for TX FH - int txfh_cores[4]; + int txfh_cores[8]; //! select the GPIO control method gpio_control_t gpio_controller; //! this interface is reused for split 7, so split 7 options provided below