remove expert config and split into PHY and general config, cleanup ue.conf.example

master
Andre Puschmann 6 years ago committed by Xavier Arteaga
parent bfb16e2545
commit 886858a30a

@ -69,7 +69,7 @@ typedef struct {
float metrics_period_secs; float metrics_period_secs;
bool metrics_csv_enable; bool metrics_csv_enable;
std::string metrics_csv_filename; std::string metrics_csv_filename;
} expert_args_t; } general_args_t;
typedef struct { typedef struct {
srslte::rf_args_t rf; srslte::rf_args_t rf;
@ -81,7 +81,7 @@ typedef struct {
stack_args_t stack; stack_args_t stack;
gw_args_t gw; gw_args_t gw;
expert_args_t expert; general_args_t general;
} all_args_t; } all_args_t;
/******************************************************************************* /*******************************************************************************

@ -172,126 +172,114 @@ void parse_args(all_args_t* args, int argc, char* argv[])
("channel.ul.rlf.t_on_ms", bpo::value<uint32_t >(&args->phy.ul_channel_args.rlf_t_on_ms)->default_value(10000), "Time for On state of the channel (ms)") ("channel.ul.rlf.t_on_ms", bpo::value<uint32_t >(&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<uint32_t >(&args->phy.ul_channel_args.rlf_t_off_ms)->default_value(2000), "Time for Off state of the channel (ms)") ("channel.ul.rlf.t_off_ms", bpo::value<uint32_t >(&args->phy.ul_channel_args.rlf_t_off_ms)->default_value(2000), "Time for Off state of the channel (ms)")
/* Expert section */ /* PHY section */
("expert.phy.worker_cpu_mask", ("phy.worker_cpu_mask",
bpo::value<int>(&args->phy.worker_cpu_mask)->default_value(-1), bpo::value<int>(&args->phy.worker_cpu_mask)->default_value(-1),
"cpu bit mask (eg 255 = 1111 1111)") "cpu bit mask (eg 255 = 1111 1111)")
("expert.phy.sync_cpu_affinity", ("phy.sync_cpu_affinity",
bpo::value<int>(&args->phy.sync_cpu_affinity)->default_value(-1), bpo::value<int>(&args->phy.sync_cpu_affinity)->default_value(-1),
"index of the core used by the sync thread") "index of the core used by the sync thread")
("expert.metrics_period_secs", ("phy.pregenerate_signals",
bpo::value<float>(&args->expert.metrics_period_secs)->default_value(1.0),
"Periodicity for metrics in seconds")
("expert.metrics_csv_enable",
bpo::value<bool>(&args->expert.metrics_csv_enable)->default_value(false),
"Write UE metrics to CSV file")
("expert.metrics_csv_filename",
bpo::value<string>(&args->expert.metrics_csv_filename)->default_value("/tmp/ue_metrics.csv"),
"Metrics CSV filename")
("expert.pregenerate_signals",
bpo::value<bool>(&args->phy.pregenerate_signals)->default_value(false), bpo::value<bool>(&args->phy.pregenerate_signals)->default_value(false),
"Pregenerate uplink signals after attach. Improves CPU performance.") "Pregenerate uplink signals after attach. Improves CPU performance.")
("expert.rx_gain_offset", ("phy.rx_gain_offset",
bpo::value<float>(&args->phy.rx_gain_offset)->default_value(62), bpo::value<float>(&args->phy.rx_gain_offset)->default_value(62),
"RX Gain offset to add to rx_gain to correct RSRP value") "RX Gain offset to add to rx_gain to correct RSRP value")
("expert.prach_gain", ("phy.prach_gain",
bpo::value<float>(&args->phy.prach_gain)->default_value(-1.0), bpo::value<float>(&args->phy.prach_gain)->default_value(-1.0),
"Disable PRACH power control") "Disable PRACH power control")
("expert.cqi_max", ("phy.cqi_max",
bpo::value<int>(&args->phy.cqi_max)->default_value(15), bpo::value<int>(&args->phy.cqi_max)->default_value(15),
"Upper bound on the maximum CQI to be reported. Default 15.") "Upper bound on the maximum CQI to be reported. Default 15.")
("expert.cqi_fixed", ("phy.cqi_fixed",
bpo::value<int>(&args->phy.cqi_fixed)->default_value(-1), bpo::value<int>(&args->phy.cqi_fixed)->default_value(-1),
"Fixes the reported CQI to a constant value. Default disabled.") "Fixes the reported CQI to a constant value. Default disabled.")
("expert.sfo_correct_period", ("phy.sfo_correct_period",
bpo::value<uint32_t>(&args->phy.sfo_correct_period)->default_value(DEFAULT_SAMPLE_OFFSET_CORRECT_PERIOD), bpo::value<uint32_t>(&args->phy.sfo_correct_period)->default_value(DEFAULT_SAMPLE_OFFSET_CORRECT_PERIOD),
"Period in ms to correct sample time") "Period in ms to correct sample time")
("expert.sfo_emma", ("phy.sfo_emma",
bpo::value<float>(&args->phy.sfo_ema)->default_value(DEFAULT_SFO_EMA_COEFF), bpo::value<float>(&args->phy.sfo_ema)->default_value(DEFAULT_SFO_EMA_COEFF),
"EMA coefficient to average sample offsets used to compute SFO") "EMA coefficient to average sample offsets used to compute SFO")
("expert.snr_ema_coeff", ("phy.snr_ema_coeff",
bpo::value<float>(&args->phy.snr_ema_coeff)->default_value(0.1), bpo::value<float>(&args->phy.snr_ema_coeff)->default_value(0.1),
"Sets the SNR exponential moving average coefficient (Default 0.1)") "Sets the SNR exponential moving average coefficient (Default 0.1)")
("expert.snr_estim_alg", ("phy.snr_estim_alg",
bpo::value<string>(&args->phy.snr_estim_alg)->default_value("refs"), bpo::value<string>(&args->phy.snr_estim_alg)->default_value("refs"),
"Sets the noise estimation algorithm. (Default refs)") "Sets the noise estimation algorithm. (Default refs)")
("expert.pdsch_max_its", ("phy.pdsch_max_its",
bpo::value<int>(&args->phy.pdsch_max_its)->default_value(8), bpo::value<int>(&args->phy.pdsch_max_its)->default_value(8),
"Maximum number of turbo decoder iterations") "Maximum number of turbo decoder iterations")
("expert.nof_phy_threads", ("phy.nof_phy_threads",
bpo::value<int>(&args->phy.nof_phy_threads)->default_value(3), bpo::value<int>(&args->phy.nof_phy_threads)->default_value(3),
"Number of PHY threads") "Number of PHY threads")
("expert.equalizer_mode", ("phy.equalizer_mode",
bpo::value<string>(&args->phy.equalizer_mode)->default_value("mmse"), bpo::value<string>(&args->phy.equalizer_mode)->default_value("mmse"),
"Equalizer mode") "Equalizer mode")
("expert.intra_freq_meas_len_ms", ("phy.intra_freq_meas_len_ms",
bpo::value<uint32_t>(&args->phy.intra_freq_meas_len_ms)->default_value(20), bpo::value<uint32_t>(&args->phy.intra_freq_meas_len_ms)->default_value(20),
"Duration of the intra-frequency neighbour cell measurement in ms.") "Duration of the intra-frequency neighbour cell measurement in ms.")
("expert.intra_freq_meas_period_ms", ("phy.intra_freq_meas_period_ms",
bpo::value<uint32_t>(&args->phy.intra_freq_meas_period_ms)->default_value(200), bpo::value<uint32_t>(&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.") "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<bool>(&args->phy.cfo_is_doppler)->default_value(false), bpo::value<bool>(&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" "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<bool>(&args->phy.cfo_integer_enabled)->default_value(false), bpo::value<bool>(&args->phy.cfo_integer_enabled)->default_value(false),
"Enables integer CFO estimation and correction.") "Enables integer CFO estimation and correction.")
("expert.cfo_correct_tol_hz", ("phy.cfo_correct_tol_hz",
bpo::value<float>(&args->phy.cfo_correct_tol_hz)->default_value(1.0), bpo::value<float>(&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.") "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<float>(&args->phy.cfo_pss_ema)->default_value(DEFAULT_CFO_EMA_TRACK), bpo::value<float>(&args->phy.cfo_pss_ema)->default_value(DEFAULT_CFO_EMA_TRACK),
"CFO Exponential Moving Average coefficient for PSS estimation during TRACK.") "CFO Exponential Moving Average coefficient for PSS estimation during TRACK.")
("expert.cfo_ref_mask", ("phy.cfo_ref_mask",
bpo::value<uint32_t>(&args->phy.cfo_ref_mask)->default_value(1023), bpo::value<uint32_t>(&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)") "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<float>(&args->phy.cfo_loop_bw_pss)->default_value(DEFAULT_CFO_BW_PSS), bpo::value<float>(&args->phy.cfo_loop_bw_pss)->default_value(DEFAULT_CFO_BW_PSS),
"CFO feedback loop bandwidth for samples from PSS") "CFO feedback loop bandwidth for samples from PSS")
("expert.cfo_loop_bw_ref", ("phy.cfo_loop_bw_ref",
bpo::value<float>(&args->phy.cfo_loop_bw_ref)->default_value(DEFAULT_CFO_BW_REF), bpo::value<float>(&args->phy.cfo_loop_bw_ref)->default_value(DEFAULT_CFO_BW_REF),
"CFO feedback loop bandwidth for samples from RS") "CFO feedback loop bandwidth for samples from RS")
("expert.cfo_loop_pss_tol", ("phy.cfo_loop_pss_tol",
bpo::value<float>(&args->phy.cfo_loop_pss_tol)->default_value(DEFAULT_CFO_PSS_MIN), bpo::value<float>(&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" "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<float>(&args->phy.cfo_loop_ref_min)->default_value(DEFAULT_CFO_REF_MIN), bpo::value<float>(&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") "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<uint32_t>(&args->phy.cfo_loop_pss_conv)->default_value(DEFAULT_PSS_STABLE_TIMEOUT), bpo::value<uint32_t>(&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.") "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<bool>(&args->phy.sic_pss_enabled)->default_value(false), bpo::value<bool>(&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.") "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<bool>(&args->phy.interpolate_subframe_enabled)->default_value(false), bpo::value<bool>(&args->phy.interpolate_subframe_enabled)->default_value(false),
"Interpolates in the time domain the channel estimates within 1 subframe.") "Interpolates in the time domain the channel estimates within 1 subframe.")
("expert.estimator_fil_auto", ("phy.estimator_fil_auto",
bpo::value<bool>(&args->phy.estimator_fil_auto)->default_value(false), bpo::value<bool>(&args->phy.estimator_fil_auto)->default_value(false),
"The channel estimator smooths the channel estimate with an adaptative filter.") "The channel estimator smooths the channel estimate with an adaptative filter.")
("expert.estimator_fil_stddev", ("phy.estimator_fil_stddev",
bpo::value<float>(&args->phy.estimator_fil_stddev)->default_value(1.0f), bpo::value<float>(&args->phy.estimator_fil_stddev)->default_value(1.0f),
"Sets the channel estimator smooth gaussian filter standard deviation.") "Sets the channel estimator smooth gaussian filter standard deviation.")
("expert.estimator_fil_order", ("phy.estimator_fil_order",
bpo::value<uint32_t>(&args->phy.estimator_fil_order)->default_value(4), bpo::value<uint32_t>(&args->phy.estimator_fil_order)->default_value(4),
"Sets the channel estimator smooth gaussian filter order (even values perform better).") "Sets the channel estimator smooth gaussian filter order (even values perform better).")
("expert.snr_to_cqi_offset", ("phy.snr_to_cqi_offset",
bpo::value<float>(&args->phy.snr_to_cqi_offset)->default_value(0), bpo::value<float>(&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.") "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<string>(&args->phy.sss_algorithm)->default_value("full"), bpo::value<string>(&args->phy.sss_algorithm)->default_value("full"),
"Selects the SSS estimation algorithm.") "Selects the SSS estimation algorithm.")
("expert.pdsch_csi_enabled", ("phy.pdsch_csi_enabled",
bpo::value<bool>(&args->phy.pdsch_csi_enabled)->default_value(true), bpo::value<bool>(&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.") "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<bool>(&args->phy.pdsch_8bit_decoder)->default_value(false), bpo::value<bool>(&args->phy.pdsch_8bit_decoder)->default_value(false),
"Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental)") "Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental)")
("expert.force_ul_amplitude", ("phy.force_ul_amplitude",
bpo::value<float>(&args->phy.force_ul_amplitude)->default_value(0.0), bpo::value<float>(&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<float>(&args->general.metrics_period_secs)->default_value(1.0),
"Periodicity for metrics in seconds")
("general.metrics_csv_enable",
bpo::value<bool>(&args->general.metrics_csv_enable)->default_value(false),
"Write UE metrics to CSV file")
("general.metrics_csv_filename",
bpo::value<string>(&args->general.metrics_csv_filename)->default_value("/tmp/ue_metrics.csv"),
"Metrics CSV filename");
// Positional options - config file location // Positional options - config file location
bpo::options_description position("Positional options"); bpo::options_description position("Positional options");
position.add_options() position.add_options()
@ -537,12 +538,12 @@ int main(int argc, char* argv[])
} }
srslte::metrics_hub<ue_metrics_t> metricshub; srslte::metrics_hub<ue_metrics_t> metricshub;
metricshub.init(&ue, args.expert.metrics_period_secs); metricshub.init(&ue, args.general.metrics_period_secs);
metricshub.add_listener(&metrics_screen); metricshub.add_listener(&metrics_screen);
metrics_screen.set_ue_handle(&ue); metrics_screen.set_ue_handle(&ue);
metrics_csv metrics_file(args.expert.metrics_csv_filename); metrics_csv metrics_file(args.general.metrics_csv_filename);
if (args.expert.metrics_csv_enable) { if (args.general.metrics_csv_enable) {
metricshub.add_listener(&metrics_file); metricshub.add_listener(&metrics_file);
metrics_file.set_ue_handle(&ue); metrics_file.set_ue_handle(&ue);
} }

@ -211,7 +211,7 @@ enable = false
#ul.rlf.t_off_ms = 2000 #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 # 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., # 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 # Must be disabled if cells have identical channel and timing, for instance if generated from
# the same source. # 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 # 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. # 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) # 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 #rx_gain_offset = 62
#prach_gain = 30 #prach_gain = 30
#cqi_max = 15 #cqi_max = 15
@ -297,21 +274,20 @@ enable = false
#interpolate_subframe_enabled = false #interpolate_subframe_enabled = false
#sic_pss_enabled = true #sic_pss_enabled = true
#pregenerate_signals = false #pregenerate_signals = false
#metrics_csv_enable = false
#metrics_period_secs = 1
#metrics_csv_filename = /tmp/ue_metrics.csv
#pdsch_csi_enabled = true #pdsch_csi_enabled = true
#pdsch_8bit_decoder = false #pdsch_8bit_decoder = false
#force_ul_amplitude = 0 #force_ul_amplitude = 0
# CFO related values #####################################################################
#cfo_is_doppler = false # General configuration options
#cfo_integer_enabled = false #
#cfo_correct_tol_hz = 1.0 # metrics_csv_enable: Write UE metrics to CSV file.
#cfo_pss_ema = 0.05 #
#cfo_ref_mask = 1023 # metrics_period_secs: Sets the period at which metrics are requested from the UE.
#cfo_loop_bw_pss = 0.05 #
#cfo_loop_bw_ref = 0.01 # metrics_csv_filename: File path to use for CSV metrics.
#cfo_loop_pss_tol = 400 #
#cfo_loop_ref_min = 0 #####################################################################
#cfo_loop_pss_conv = 20 #metrics_csv_enable = false
#metrics_period_secs = 1
#metrics_csv_filename = /tmp/ue_metrics.csv

Loading…
Cancel
Save