From 886858a30aef247f4382ab3be18bfacde75b490e Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 11 Jul 2019 22:35:19 +0200 Subject: [PATCH] remove expert config and split into PHY and general config, cleanup ue.conf.example --- srsue/hdr/ue.h | 4 +- srsue/src/main.cc | 109 +++++++++++++++++++++--------------------- srsue/ue.conf.example | 54 ++++++--------------- 3 files changed, 72 insertions(+), 95 deletions(-) diff --git a/srsue/hdr/ue.h b/srsue/hdr/ue.h index 142f3d7fe..e3469459c 100644 --- a/srsue/hdr/ue.h +++ b/srsue/hdr/ue.h @@ -69,7 +69,7 @@ typedef struct { float metrics_period_secs; bool metrics_csv_enable; std::string metrics_csv_filename; -} expert_args_t; +} general_args_t; typedef struct { srslte::rf_args_t rf; @@ -81,7 +81,7 @@ typedef struct { stack_args_t stack; gw_args_t gw; - expert_args_t expert; + general_args_t general; } all_args_t; /******************************************************************************* diff --git a/srsue/src/main.cc b/srsue/src/main.cc index 93a915054..04f448cb2 100644 --- a/srsue/src/main.cc +++ b/srsue/src/main.cc @@ -172,126 +172,114 @@ void parse_args(all_args_t* args, int argc, char* argv[]) ("channel.ul.rlf.t_on_ms", bpo::value(&args->phy.ul_channel_args.rlf_t_on_ms)->default_value(10000), "Time for On state of the channel (ms)") ("channel.ul.rlf.t_off_ms", bpo::value(&args->phy.ul_channel_args.rlf_t_off_ms)->default_value(2000), "Time for Off state of the channel (ms)") - /* Expert section */ - ("expert.phy.worker_cpu_mask", + /* PHY section */ + ("phy.worker_cpu_mask", bpo::value(&args->phy.worker_cpu_mask)->default_value(-1), "cpu bit mask (eg 255 = 1111 1111)") - ("expert.phy.sync_cpu_affinity", + ("phy.sync_cpu_affinity", bpo::value(&args->phy.sync_cpu_affinity)->default_value(-1), "index of the core used by the sync thread") - ("expert.metrics_period_secs", - bpo::value(&args->expert.metrics_period_secs)->default_value(1.0), - "Periodicity for metrics in seconds") - - ("expert.metrics_csv_enable", - bpo::value(&args->expert.metrics_csv_enable)->default_value(false), - "Write UE metrics to CSV file") - - ("expert.metrics_csv_filename", - bpo::value(&args->expert.metrics_csv_filename)->default_value("/tmp/ue_metrics.csv"), - "Metrics CSV filename") - - ("expert.pregenerate_signals", + ("phy.pregenerate_signals", bpo::value(&args->phy.pregenerate_signals)->default_value(false), "Pregenerate uplink signals after attach. Improves CPU performance.") - ("expert.rx_gain_offset", + ("phy.rx_gain_offset", bpo::value(&args->phy.rx_gain_offset)->default_value(62), "RX Gain offset to add to rx_gain to correct RSRP value") - ("expert.prach_gain", + ("phy.prach_gain", bpo::value(&args->phy.prach_gain)->default_value(-1.0), "Disable PRACH power control") - ("expert.cqi_max", + ("phy.cqi_max", bpo::value(&args->phy.cqi_max)->default_value(15), "Upper bound on the maximum CQI to be reported. Default 15.") - ("expert.cqi_fixed", + ("phy.cqi_fixed", bpo::value(&args->phy.cqi_fixed)->default_value(-1), "Fixes the reported CQI to a constant value. Default disabled.") - ("expert.sfo_correct_period", + ("phy.sfo_correct_period", bpo::value(&args->phy.sfo_correct_period)->default_value(DEFAULT_SAMPLE_OFFSET_CORRECT_PERIOD), "Period in ms to correct sample time") - ("expert.sfo_emma", + ("phy.sfo_emma", bpo::value(&args->phy.sfo_ema)->default_value(DEFAULT_SFO_EMA_COEFF), "EMA coefficient to average sample offsets used to compute SFO") - ("expert.snr_ema_coeff", + ("phy.snr_ema_coeff", bpo::value(&args->phy.snr_ema_coeff)->default_value(0.1), "Sets the SNR exponential moving average coefficient (Default 0.1)") - ("expert.snr_estim_alg", + ("phy.snr_estim_alg", bpo::value(&args->phy.snr_estim_alg)->default_value("refs"), "Sets the noise estimation algorithm. (Default refs)") - ("expert.pdsch_max_its", + ("phy.pdsch_max_its", bpo::value(&args->phy.pdsch_max_its)->default_value(8), "Maximum number of turbo decoder iterations") - ("expert.nof_phy_threads", + ("phy.nof_phy_threads", bpo::value(&args->phy.nof_phy_threads)->default_value(3), "Number of PHY threads") - ("expert.equalizer_mode", + ("phy.equalizer_mode", bpo::value(&args->phy.equalizer_mode)->default_value("mmse"), "Equalizer mode") - ("expert.intra_freq_meas_len_ms", + ("phy.intra_freq_meas_len_ms", bpo::value(&args->phy.intra_freq_meas_len_ms)->default_value(20), "Duration of the intra-frequency neighbour cell measurement in ms.") - ("expert.intra_freq_meas_period_ms", + ("phy.intra_freq_meas_period_ms", bpo::value(&args->phy.intra_freq_meas_period_ms)->default_value(200), "Period of intra-frequency neighbour cell measurement in ms. Maximum as per 3GPP is 200 ms.") - ("expert.cfo_is_doppler", + ("phy.cfo_is_doppler", bpo::value(&args->phy.cfo_is_doppler)->default_value(false), "Assume detected CFO is doppler and correct the UL in the same direction. If disabled, the CFO is assumed" - "to be caused by the local oscillator and the UL correction is in the opposite direction. Default assumes oscillator.") + "to be caused by the local oscillator and the UL correction is in the opposite direction. Default assumes oscillator.") - ("expert.cfo_integer_enabled", + ("phy.cfo_integer_enabled", bpo::value(&args->phy.cfo_integer_enabled)->default_value(false), "Enables integer CFO estimation and correction.") - ("expert.cfo_correct_tol_hz", + ("phy.cfo_correct_tol_hz", bpo::value(&args->phy.cfo_correct_tol_hz)->default_value(1.0), "Tolerance (in Hz) for digital CFO compensation (needs to be low if interpolate_subframe_enabled=true.") - ("expert.cfo_pss_ema", + ("phy.cfo_pss_ema", bpo::value(&args->phy.cfo_pss_ema)->default_value(DEFAULT_CFO_EMA_TRACK), "CFO Exponential Moving Average coefficient for PSS estimation during TRACK.") - ("expert.cfo_ref_mask", + ("phy.cfo_ref_mask", bpo::value(&args->phy.cfo_ref_mask)->default_value(1023), "Bitmask for subframes on which to run RS estimation (set to 0 to disable, default all sf)") - ("expert.cfo_loop_bw_pss", + ("phy.cfo_loop_bw_pss", bpo::value(&args->phy.cfo_loop_bw_pss)->default_value(DEFAULT_CFO_BW_PSS), "CFO feedback loop bandwidth for samples from PSS") - ("expert.cfo_loop_bw_ref", + ("phy.cfo_loop_bw_ref", bpo::value(&args->phy.cfo_loop_bw_ref)->default_value(DEFAULT_CFO_BW_REF), "CFO feedback loop bandwidth for samples from RS") - ("expert.cfo_loop_pss_tol", + ("phy.cfo_loop_pss_tol", bpo::value(&args->phy.cfo_loop_pss_tol)->default_value(DEFAULT_CFO_PSS_MIN), "Tolerance (in Hz) of the PSS estimation method. Below this value, PSS estimation does not feeds back the loop" - "and RS estimations are used instead (when available)") + "and RS estimations are used instead (when available)") - ("expert.cfo_loop_ref_min", + ("phy.cfo_loop_ref_min", bpo::value(&args->phy.cfo_loop_ref_min)->default_value(DEFAULT_CFO_REF_MIN), "Tolerance (in Hz) of the RS estimation method. Below this value, RS estimation does not feeds back the loop") - ("expert.cfo_loop_pss_conv", + ("phy.cfo_loop_pss_conv", bpo::value(&args->phy.cfo_loop_pss_conv)->default_value(DEFAULT_PSS_STABLE_TIMEOUT), "After the PSS estimation is below cfo_loop_pss_tol for cfo_loop_pss_timeout times consecutively, RS adjustments are allowed.") - ("expert.sic_pss_enabled", + ("phy.sic_pss_enabled", bpo::value(&args->phy.sic_pss_enabled)->default_value(false), "Applies Successive Interference Cancellation to PSS signals when searching for neighbour cells. Must be disabled if cells have identical channel and timing.") @@ -299,38 +287,51 @@ void parse_args(all_args_t* args, int argc, char* argv[]) bpo::value(&args->phy.interpolate_subframe_enabled)->default_value(false), "Interpolates in the time domain the channel estimates within 1 subframe.") - ("expert.estimator_fil_auto", + ("phy.estimator_fil_auto", bpo::value(&args->phy.estimator_fil_auto)->default_value(false), "The channel estimator smooths the channel estimate with an adaptative filter.") - ("expert.estimator_fil_stddev", + ("phy.estimator_fil_stddev", bpo::value(&args->phy.estimator_fil_stddev)->default_value(1.0f), "Sets the channel estimator smooth gaussian filter standard deviation.") - ("expert.estimator_fil_order", + ("phy.estimator_fil_order", bpo::value(&args->phy.estimator_fil_order)->default_value(4), "Sets the channel estimator smooth gaussian filter order (even values perform better).") - ("expert.snr_to_cqi_offset", + ("phy.snr_to_cqi_offset", bpo::value(&args->phy.snr_to_cqi_offset)->default_value(0), "Sets an offset in the SNR to CQI table. This is used to adjust the reported CQI.") - ("expert.sss_algorithm", + ("phy.sss_algorithm", bpo::value(&args->phy.sss_algorithm)->default_value("full"), "Selects the SSS estimation algorithm.") - ("expert.pdsch_csi_enabled", + ("phy.pdsch_csi_enabled", bpo::value(&args->phy.pdsch_csi_enabled)->default_value(true), "Stores the Channel State Information and uses it for weightening the softbits. It is only used in TM1.") - ("expert.pdsch_8bit_decoder", + ("phy.pdsch_8bit_decoder", bpo::value(&args->phy.pdsch_8bit_decoder)->default_value(false), "Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental)") - ("expert.force_ul_amplitude", + ("phy.force_ul_amplitude", bpo::value(&args->phy.force_ul_amplitude)->default_value(0.0), - "Forces the peak amplitude in the PUCCH, PUSCH and SRS (set 0.0 to 1.0, set to 0 or negative for disabling)"); + "Forces the peak amplitude in the PUCCH, PUSCH and SRS (set 0.0 to 1.0, set to 0 or negative for disabling)") + /* general options */ + ("general.metrics_period_secs", + bpo::value(&args->general.metrics_period_secs)->default_value(1.0), + "Periodicity for metrics in seconds") + + ("general.metrics_csv_enable", + bpo::value(&args->general.metrics_csv_enable)->default_value(false), + "Write UE metrics to CSV file") + + ("general.metrics_csv_filename", + bpo::value(&args->general.metrics_csv_filename)->default_value("/tmp/ue_metrics.csv"), + "Metrics CSV filename"); + // Positional options - config file location bpo::options_description position("Positional options"); position.add_options() @@ -537,12 +538,12 @@ int main(int argc, char* argv[]) } srslte::metrics_hub metricshub; - metricshub.init(&ue, args.expert.metrics_period_secs); + metricshub.init(&ue, args.general.metrics_period_secs); metricshub.add_listener(&metrics_screen); metrics_screen.set_ue_handle(&ue); - metrics_csv metrics_file(args.expert.metrics_csv_filename); - if (args.expert.metrics_csv_enable) { + metrics_csv metrics_file(args.general.metrics_csv_filename); + if (args.general.metrics_csv_enable) { metricshub.add_listener(&metrics_file); metrics_file.set_ue_handle(&ue); } diff --git a/srsue/ue.conf.example b/srsue/ue.conf.example index 032467c19..e655d0d2a 100644 --- a/srsue/ue.conf.example +++ b/srsue/ue.conf.example @@ -211,7 +211,7 @@ enable = false #ul.rlf.t_off_ms = 2000 ##################################################################### -# Expert configuration options +# PHY configuration options # # rx_gain_offset: RX Gain offset to add to rx_gain to calibrate RSRP readings # prach_gain: PRACH gain (dB). If defined, forces a gain for the tranmsission of PRACH only., @@ -247,29 +247,6 @@ enable = false # Must be disabled if cells have identical channel and timing, for instance if generated from # the same source. # -# metrics_csv_enable: Write UE metrics to CSV file. -# -# metrics_period_secs: Sets the period at which metrics are requested from the UE. -# -# metrics_csv_filename: File path to use for CSV metrics. -# -# cfo_integer_enabled: Enables integer CFO estimation and correction. This needs improvement -# and may lead to incorrect synchronization. Use with caution. -# cfo_correct_tol_hz: Tolerance (in Hz) for digial CFO compensation. Lower tolerance means that -# a new table will be generated more often. -# -# cfo_is_doppler: Assume detected CFO is doppler and correct the UL in the same direction. If disabled, the CFO is assumed -# to be caused by the local oscillator and the UL correction is in the opposite direction. Default assumes oscillator. -# cfo_pss_ema: CFO Exponential Moving Average coefficient for PSS estimation during TRACK. -# cfo_ref_ema: CFO Exponential Moving Average coefficient for RS estimation after PSS acquisition -# cfo_ref_mask: Bitmask for subframes on which to run RS estimation (set to 0 to disable, default sf=[1, 5]) -# cfo_loop_bw: CFO feedback loop bandwidth for samples from PSS or RS -# cfo_loop_pss_tol: Tolerance (in Hz) of the PSS estimation method. Below this value, PSS estimation does not feeds back the loop -# and RS estimations are used instead (when available) -# cfo_loop_ref_min: Tolerance (in Hz) of the RS estimation method. Below this value, RS estimation does not feeds back the loop -# cfo_loop_pss_timeout: After the PSS estimation is below cfo_loop_pss_tol for cfo_loop_pss_timeout times consecutively, -# RS adjustments are allowed. -# # pdsch_csi_enabled: Stores the Channel State Information and uses it for weightening the softbits. It is only # used in TM1. It is True by default. # @@ -277,7 +254,7 @@ enable = false # force_ul_amplitude: Forces the peak amplitude in the PUCCH, PUSCH and SRS (set 0.0 to 1.0, set to 0 or negative for disabling) # ##################################################################### -[expert] +[phy] #rx_gain_offset = 62 #prach_gain = 30 #cqi_max = 15 @@ -297,21 +274,20 @@ enable = false #interpolate_subframe_enabled = false #sic_pss_enabled = true #pregenerate_signals = false -#metrics_csv_enable = false -#metrics_period_secs = 1 -#metrics_csv_filename = /tmp/ue_metrics.csv #pdsch_csi_enabled = true #pdsch_8bit_decoder = false #force_ul_amplitude = 0 -# CFO related values -#cfo_is_doppler = false -#cfo_integer_enabled = false -#cfo_correct_tol_hz = 1.0 -#cfo_pss_ema = 0.05 -#cfo_ref_mask = 1023 -#cfo_loop_bw_pss = 0.05 -#cfo_loop_bw_ref = 0.01 -#cfo_loop_pss_tol = 400 -#cfo_loop_ref_min = 0 -#cfo_loop_pss_conv = 20 +##################################################################### +# General configuration options +# +# metrics_csv_enable: Write UE metrics to CSV file. +# +# metrics_period_secs: Sets the period at which metrics are requested from the UE. +# +# metrics_csv_filename: File path to use for CSV metrics. +# +##################################################################### +#metrics_csv_enable = false +#metrics_period_secs = 1 +#metrics_csv_filename = /tmp/ue_metrics.csv