From c4f4f8d9198630872a3da9890538d9851b70f3ee Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Tue, 29 Jul 2025 16:56:17 +0200 Subject: [PATCH] Remove threequarter_fs, log_level; make functions static 2 functions with same name as static to make it clearer they are separate. remove unused copy of log_level global var. remove threequarter sampling variable from the radio board general configuration. The decision of sampling rate is made above. A better behavior can be done later, like ask to the radio board what sampling rate it can do,then use it to decide the appropiate sampling rate from the gNB configuration. In UE case, it is another issue, as the sampling rate would change after we decode SIB1, but also it is not developped yet. --- executables/lte-uesoftmodem.c | 3 ++- executables/nr-uesoftmodem.c | 3 +-- openair1/SIMULATION/NR_PHY/ulsim.c | 6 ++++-- radio/COMMON/common_lib.h | 4 ---- radio/ETHERNET/ethernet_lib.c | 1 - radio/fhi_72/oran-config.c | 2 -- 6 files changed, 7 insertions(+), 12 deletions(-) diff --git a/executables/lte-uesoftmodem.c b/executables/lte-uesoftmodem.c index ea48edd801..7de3014ee9 100644 --- a/executables/lte-uesoftmodem.c +++ b/executables/lte-uesoftmodem.c @@ -384,7 +384,8 @@ void set_default_frame_parms(LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]) { } } -void init_openair0(LTE_DL_FRAME_PARMS *frame_parms,int rxgain) { +static void init_openair0(LTE_DL_FRAME_PARMS *frame_parms, int rxgain) +{ int card; int i; diff --git a/executables/nr-uesoftmodem.c b/executables/nr-uesoftmodem.c index 6ed407a507..8b331e4976 100644 --- a/executables/nr-uesoftmodem.c +++ b/executables/nr-uesoftmodem.c @@ -249,7 +249,7 @@ void set_options(int CC_id, PHY_VARS_NR_UE *UE){ } -void init_openair0() +static void init_openair0() { int card; int freq_off = 0; @@ -261,7 +261,6 @@ void init_openair0() for (card=0; cardthreequarter_fs; openair0_cfg[card].sample_rate = frame_parms->samples_per_subframe * 1e3; openair0_cfg[card].samples_per_frame = frame_parms->samples_per_frame; diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index b2b2dc38bb..b5bd02aefd 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -237,6 +237,8 @@ int main(int argc, char *argv[]) int max_ldpc_iterations = 5; int num_antennas_per_thread = 1; uint32_t log_format = 0; + int threequarter_fs = 0; + if ((uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY)) == 0) { exit_fun("[NR_ULSIM] Error, configuration module init failed\n"); } @@ -351,7 +353,7 @@ int main(int argc, char *argv[]) case 'k': printf("Setting threequarter_fs_flag\n"); - openair0_cfg[0].threequarter_fs= 1; + threequarter_fs = 1; break; case 'm': @@ -584,7 +586,7 @@ int main(int argc, char *argv[]) uint32_t samples; get_samplerate_and_bw(mu, N_RB_DL, - openair0_cfg[0].threequarter_fs, + threequarter_fs, &sampling_frequency, &samples, &tx_bandwidth, diff --git a/radio/COMMON/common_lib.h b/radio/COMMON/common_lib.h index 86d09b00fb..f928d554a8 100644 --- a/radio/COMMON/common_lib.h +++ b/radio/COMMON/common_lib.h @@ -204,8 +204,6 @@ typedef struct split7_config { typedef struct openair0_config { //! Module ID for this configuration int Mod_id; - //! device log level - int log_level; //! duplexing mode duplex_mode_t duplex_mode; //! number of downlink resource blocks @@ -292,8 +290,6 @@ typedef struct openair0_config { double rx_sample_rate; //! the sample rate for transmit. double tx_sample_rate; - //! check for threequarter sampling rate - int8_t threequarter_fs; //! Flag to indicate this configuration is for NR int nr_flag; //! NR band number diff --git a/radio/ETHERNET/ethernet_lib.c b/radio/ETHERNET/ethernet_lib.c index eb23ef28cc..2a4d021afc 100644 --- a/radio/ETHERNET/ethernet_lib.c +++ b/radio/ETHERNET/ethernet_lib.c @@ -617,7 +617,6 @@ void dump_dev(openair0_device *device) eth_state_t *eth = (eth_state_t*)device->priv; printf("Ethernet device interface %i configuration:\n" ,device->openair0_cfg->Mod_id); - printf(" Log level is %i :\n" ,device->openair0_cfg->log_level); printf(" RB number: %i, sample rate: %lf \n" , device->openair0_cfg->num_rb_dl, device->openair0_cfg->sample_rate); printf(" RAU configured for %i tx/%i rx channels)\n", diff --git a/radio/fhi_72/oran-config.c b/radio/fhi_72/oran-config.c index 4eff24aacf..89c1838fa3 100644 --- a/radio/fhi_72/oran-config.c +++ b/radio/fhi_72/oran-config.c @@ -884,8 +884,6 @@ static bool set_fh_config(void *mplane_api, int ru_idx, int num_rus, enum xran_c for (int i = 1; i < oai0->rx_num_channels; ++i) DevAssert(oai0->rx_freq[0] == oai0->rx_freq[i]); DevAssert(oai0->nr_band > 0); - AssertFatal(oai0->threequarter_fs == 0, "cannot use three-quarter sampling with O-RAN 7.2 split\n"); - paramdef_t FHconfigs[] = ORAN_FH_DESC; paramlist_def_t FH_ConfigList = {CONFIG_STRING_ORAN_FH}; char aprefix[MAX_OPTNAME_SIZE] = {0};