enb,ue: add cmdline arg to enable usage of default LTE sample rate

some RF boards might have issues with the sharp filters that are needed
for the reduced sample rate operation that we use by default.

This switch allows to use the default LTE sampling rates and
configure this at run-time, not compile time.
This commit is contained in:
Andre Puschmann 2020-11-06 09:59:50 +01:00
parent a6ac80cfbf
commit 35373d1385
3 changed files with 12 additions and 1 deletions

View File

@ -47,7 +47,6 @@ struct phy_args_t {
std::string type;
srslte::phy_log_args_t log;
float sampling_rate_hz = 0.0f;
float max_prach_offset_us = 10;
int pusch_max_its = 10;
bool pusch_8bit_decoder = false;

View File

@ -58,6 +58,7 @@ void parse_args(all_args_t* args, int argc, char* argv[])
string mcc;
string mnc;
string enb_id;
bool use_standard_lte_rates = false;
// Command line only options
bpo::options_description general("General options");
@ -198,6 +199,7 @@ void parse_args(all_args_t* args, int argc, char* argv[])
("expert.max_prach_offset_us", bpo::value<float>(&args->phy.max_prach_offset_us)->default_value(30), "Maximum allowed RACH offset (in us)")
("expert.equalizer_mode", bpo::value<string>(&args->phy.equalizer_mode)->default_value("mmse"), "Equalizer mode")
("expert.estimator_fil_w", bpo::value<float>(&args->phy.estimator_fil_w)->default_value(0.1), "Chooses the coefficients for the 3-tap channel estimator centered filter.")
("expert.lte_sample_rates", bpo::value<bool>(&use_standard_lte_rates)->default_value(false), "Whether to use default LTE sample rates instead of shorter variants.")
("expert.rrc_inactivity_timer", bpo::value<uint32_t>(&args->general.rrc_inactivity_timer)->default_value(30000), "Inactivity timer in ms.")
("expert.print_buffer_state", bpo::value<bool>(&args->general.print_buffer_state)->default_value(false), "Prints on the console the buffer state every 10 seconds")
("expert.eea_pref_list", bpo::value<string>(&args->general.eea_pref_list)->default_value("EEA0, EEA2, EEA1"), "Ordered preference list for the selection of encryption algorithm (EEA) (default: EEA0, EEA2, EEA1).")
@ -396,6 +398,8 @@ void parse_args(all_args_t* args, int argc, char* argv[])
cout << "Failed to read DRB configuration file " << args->enb_files.drb_config << " - exiting" << endl;
exit(1);
}
srslte_use_standard_symbol_size(use_standard_lte_rates);
}
static bool do_metrics = false;

View File

@ -61,6 +61,8 @@ string config_file;
static int parse_args(all_args_t* args, int argc, char* argv[])
{
bool use_standard_lte_rates = false;
// Command line only options
bpo::options_description general("General options");
@ -391,6 +393,10 @@ static int parse_args(all_args_t* args, int argc, char* argv[])
bpo::value<uint32_t>(&args->phy.nof_out_of_sync_events)->default_value(20),
"Number of PHY out-sync events before sending an out-sync event to RRC")
("expert.lte_sample_rates",
bpo::value<bool>(&use_standard_lte_rates)->default_value(false),
"Whether to use default LTE sample rates instead of shorter variants.")
// UE simulation args
("sim.airplane_t_on_ms",
bpo::value<int>(&args->stack.nas.sim.airplane_t_on_ms)->default_value(-1),
@ -576,6 +582,8 @@ static int parse_args(all_args_t* args, int argc, char* argv[])
args->stack.sync_queue_size = MULTIQUEUE_DEFAULT_CAPACITY;
}
srslte_use_standard_symbol_size(use_standard_lte_rates);
return SRSLTE_SUCCESS;
}