Refactor ue config for eutra and nr config section

master
David Rupprecht 4 years ago committed by Andre Puschmann
parent 77b6b60b82
commit 6ed6da1f12

@ -48,8 +48,8 @@ endif(NOT SRSGUI_FOUND)
# Checks that ue.conf.example is valid and it does not leak memory if RF fails
if (ZEROMQ_FOUND)
add_test(ue_rf_failure srsue ${CMAKE_SOURCE_DIR}/srsue/ue.conf.example --rf.device_name=zmq)
add_test(ue_rf_failure_max_channels srsue ${CMAKE_SOURCE_DIR}/srsue/ue.conf.example --rf.device_name=zmq --rf.nof_antennas=4 --rf.nof_carriers=5)
add_test(ue_rf_failure_exceeds_channels srsue ${CMAKE_SOURCE_DIR}/srsue/ue.conf.example --rf.device_name=zmq --rf.nof_antennas=5 --rf.nof_carriers=5)
add_test(ue_rf_failure_max_channels srsue ${CMAKE_SOURCE_DIR}/srsue/ue.conf.example --rf.device_name=zmq --rf.nof_antennas=4 --rat.eutra.nof_carriers=5)
add_test(ue_rf_failure_exceeds_channels srsue ${CMAKE_SOURCE_DIR}/srsue/ue.conf.example --rf.device_name=zmq --rf.nof_antennas=5 --rat.eutra.nof_carriers=5)
endif(ZEROMQ_FOUND)
########################################################################

@ -66,13 +66,8 @@ static int parse_args(all_args_t* args, int argc, char* argv[])
("ue.phy", bpo::value<string>(&args->phy.type)->default_value("lte"), "Type of the PHY [lte]")
("ue.stack", bpo::value<string>(&args->stack.type)->default_value("lte"), "Type of the upper stack [lte, nr]")
("rf.dl_earfcn", bpo::value<string>(&args->phy.dl_earfcn)->default_value("3400"), "Downlink EARFCN list")
("rf.ul_earfcn", bpo::value<string>(&args->phy.ul_earfcn), "Uplink EARFCN list. Optional.")
("rf.dl_nr_arfcn", bpo::value<string>(&args->phy.dl_nr_arfcn)->default_value("632628"), "Downlink NR-ARFCN list")
("rf.srate", bpo::value<double>(&args->rf.srate_hz)->default_value(0.0), "Force Tx and Rx sampling rate in Hz")
("rf.freq_offset", bpo::value<float>(&args->rf.freq_offset)->default_value(0), "(optional) Frequency offset")
("rf.dl_freq", bpo::value<float>(&args->phy.dl_freq)->default_value(-1), "Downlink Frequency (if positive overrides EARFCN)")
("rf.ul_freq", bpo::value<float>(&args->phy.ul_freq)->default_value(-1), "Uplink Frequency (if positive overrides EARFCN)")
("rf.rx_gain", bpo::value<float>(&args->rf.rx_gain)->default_value(-1), "Front-end receiver gain")
("rf.tx_gain", bpo::value<float>(&args->rf.tx_gain)->default_value(-1), "Front-end transmitter gain (all channels)")
("rf.tx_gain[0]", bpo::value<float>(&args->rf.tx_gain_ch[0])->default_value(-1), "Front-end transmitter gain CH0")
@ -85,7 +80,6 @@ static int parse_args(all_args_t* args, int argc, char* argv[])
("rf.rx_gain[2]", bpo::value<float>(&args->rf.rx_gain_ch[2])->default_value(-1), "Front-end receiver gain CH2")
("rf.rx_gain[3]", bpo::value<float>(&args->rf.rx_gain_ch[3])->default_value(-1), "Front-end receiver gain CH3")
("rf.rx_gain[4]", bpo::value<float>(&args->rf.rx_gain_ch[4])->default_value(-1), "Front-end receiver gain CH4")
("rf.nof_carriers", bpo::value<uint32_t>(&args->rf.nof_carriers)->default_value(1), "Number of carriers")
("rf.nof_antennas", bpo::value<uint32_t>(&args->rf.nof_antennas)->default_value(1), "Number of antennas per carrier")
("rf.device_name", bpo::value<string>(&args->rf.device_name)->default_value("auto"), "Front-end device name")
@ -115,11 +109,22 @@ static int parse_args(all_args_t* args, int argc, char* argv[])
("rf.bands.tx[4].min", bpo::value<float>(&args->rf.ch_tx_bands[4].min)->default_value(0), "Lower frequency boundary for CH4-TX")
("rf.bands.tx[4].max", bpo::value<float>(&args->rf.ch_tx_bands[4].max)->default_value(0), "Higher frequency boundary for CH4-TX")
("rat.eutra.dl_earfcn", bpo::value<string>(&args->phy.dl_earfcn)->default_value("3400"), "Downlink EARFCN list")
("rat.eutra.ul_earfcn", bpo::value<string>(&args->phy.ul_earfcn), "Uplink EARFCN list. Optional.")
("rat.eutra.dl_freq", bpo::value<float>(&args->phy.dl_freq)->default_value(-1), "Downlink Frequency (if positive overrides EARFCN)")
("rat.eutra.ul_freq", bpo::value<float>(&args->phy.ul_freq)->default_value(-1), "Uplink Frequency (if positive overrides EARFCN)")
("rat.eutra.nof_carriers", bpo::value<uint32_t>(&args->phy.nof_lte_carriers)->default_value(1), "Number of carriers")
("rat.nr.dl_arfcn", bpo::value<string>(&args->phy.dl_nr_arfcn)->default_value("634240"), "Downlink NR-ARFCN list")
("rat.nr.dl_freq", bpo::value<double>(&args->phy.nr_freq_hz)->default_value(3513.6e6), "NR DL frequency")
("rat.nr.nof_carriers", bpo::value<uint32_t>(&args->phy.nof_nr_carriers)->default_value(0), "Number of NR carriers")
("rat.nr.nof_prb", bpo::value<uint32_t>(&args->phy.nr_nof_prb)->default_value(52), "NR carrier bandwidth")
("rrc.feature_group", bpo::value<uint32_t>(&args->stack.rrc.feature_group)->default_value(0xe6041000), "Hex value of the featureGroupIndicators field in the"
"UECapabilityInformation message. Default 0xe6041000")
("rrc.ue_category", bpo::value<string>(&args->stack.rrc.ue_category_str)->default_value(SRSRAN_UE_CATEGORY_DEFAULT), "UE Category (1 to 10)")
("rrc.ue_category_dl", bpo::value<int>(&args->stack.rrc.ue_category_dl)->default_value(-1), "UE Category DL v12 (valid values: 0, 4, 6, 7, 9 to 16)")
("rrc.ue_category_ul", bpo::value<int>(&args->stack.rrc.ue_category_ul)->default_value(-1), "UE Category UL v12 (valid values: 0, 3, 5, 7, 8 and 13)")
("rrc.ue_category_dl", bpo::value<int>(&args->stack.rrc.ue_category_dl)->default_value(-1), "UE Category DL v12 (valid values: 0, 4, 6, 7, 9 to 16)")
("rrc.ue_category_ul", bpo::value<int>(&args->stack.rrc.ue_category_ul)->default_value(-1), "UE Category UL v12 (valid values: 0, 3, 5, 7, 8 and 13)")
("rrc.release", bpo::value<uint32_t>(&args->stack.rrc.release)->default_value(SRSRAN_RELEASE_DEFAULT), "UE Release (8 to 12)")
("rrc.mbms_service_id", bpo::value<int32_t>(&args->stack.rrc.mbms_service_id)->default_value(-1), "MBMS service id for autostart (-1 means disabled)")
("rrc.mbms_service_port", bpo::value<uint32_t>(&args->stack.rrc.mbms_service_port)->default_value(4321), "Port of the MBMS service")
@ -438,9 +443,6 @@ static int parse_args(all_args_t* args, int argc, char* argv[])
("vnf.type", bpo::value<string>(&args->phy.vnf_args.type)->default_value("ue"), "VNF instance type [gnb,ue]")
("vnf.addr", bpo::value<string>(&args->phy.vnf_args.bind_addr)->default_value("localhost"), "Address to bind VNF interface")
("vnf.port", bpo::value<uint16_t>(&args->phy.vnf_args.bind_port)->default_value(3334), "Bind port")
("nr.nof_carriers", bpo::value<uint32_t>(&args->phy.nof_nr_carriers)->default_value(0), "Number of NR carriers")
("nr.nof_prb", bpo::value<uint32_t>(&args->phy.nr_nof_prb)->default_value(50), "NR carrier bandwidth")
("nr.freq", bpo::value<double>(&args->phy.nr_freq_hz)->default_value(2630e6), "NR carrier bandwidth")
;
// Positional options - config file location

@ -196,23 +196,21 @@ int ue::parse_args(const all_args_t& args_)
return SRSRAN_ERROR;
}
if (args.rf.nof_carriers > SRSRAN_MAX_CARRIERS) {
fprintf(stderr, "Maximum number of carriers exceeded (%d > %d)\n", args.rf.nof_carriers, SRSRAN_MAX_CARRIERS);
return SRSRAN_ERROR;
}
args.rf.nof_carriers = args.phy.nof_lte_carriers + args.phy.nof_nr_carriers;
if (args.rf.nof_carriers <= args.phy.nof_nr_carriers) {
if (args.rf.nof_carriers > SRSRAN_MAX_CARRIERS) {
fprintf(stderr,
"Maximum number of carriers enough for NR and LTE (%d <= %d)\n",
"Maximum number of carriers exceeded (%d > %d) (nof_lte_carriers %d + nof_nr_carriers %d)\n",
args.rf.nof_carriers,
SRSRAN_MAX_CARRIERS,
args.phy.nof_lte_carriers,
args.phy.nof_nr_carriers);
return SRSRAN_ERROR;
}
// replicate some RF parameter to make them available to PHY
args.phy.nof_lte_carriers = args.rf.nof_carriers - args.phy.nof_nr_carriers;
args.phy.nof_rx_ant = args.rf.nof_antennas;
args.phy.agc_enable = args.rf.rx_gain < 0.0f;
args.phy.nof_rx_ant = args.rf.nof_antennas;
args.phy.agc_enable = args.rf.rx_gain < 0.0f;
// populate DL EARFCN list
if (not args.phy.dl_earfcn.empty()) {

@ -5,16 +5,10 @@
#####################################################################
# RF configuration
#
# dl_earfcn: Downlink EARFCN code.
# freq_offset: Uplink and Downlink optional frequency offset (in Hz)
# tx_gain: Transmit gain (dB).
# rx_gain: Optional receive gain (dB). If disabled, AGC if enabled
#
# Optional parameters:
# dl_nr_arfcn: Downlink NR ARFCN for EN-DC
# dl_freq: Override DL frequency corresponding to dl_earfcn
# ul_freq: Override UL frequency corresponding to dl_earfcn
# nof_carriers: Number of carriers
# nof_antennas: Number of antennas per carrier (all carriers have the same number of antennas)
# device_name: Device driver family. Supported options: "auto" (uses first found), "UHD" or "bladeRF"
# device_args: Arguments for the device driver. Options are "auto" or any string.
@ -29,13 +23,10 @@
# Default is auto (yes for UHD, no for rest)
#####################################################################
[rf]
dl_earfcn = 3350
#dl_nr_arfcn = 632628
freq_offset = 0
tx_gain = 80
#rx_gain = 40
#nof_carriers = 1
#nof_antennas = 1
# For best performance in 2x2 MIMO and >= 15 MHz use the following device_args settings:
@ -52,6 +43,35 @@ tx_gain = 80
#device_name = zmq
#device_args = tx_port=tcp://*:2001,rx_port=tcp://localhost:2000,id=ue,base_srate=23.04e6
#####################################################################
# EUTRA RAT configuration
#
# dl_earfcn: Downlink EARFCN list.
#
# Optional parameters:
# dl_freq: Override DL frequency corresponding to dl_earfcn
# ul_freq: Override UL frequency corresponding to dl_earfcn
# nof_carriers: Number of carriers
#####################################################################
[rat.eutra]
dl_earfcn = 3350
#nof_carriers = 1
#####################################################################
# NR RAT configuration
#
# Optional parameters:
# dl_arfcn: Downlink NR ARFCN for EN-DC
# dl_freq: Override DL frequency corresponding to rat.nr.dl_arfcn
# nof_carriers: Number of NR carriers (must be at least 1 for DC support)
# nof_prb: Number of PRBs
#####################################################################
[rat.nr]
# dl_arfcn = 634240
# dl_freq = 3513.6e6
# nof_prb = 52
# nof_carriers = 0
#####################################################################
# Packet capture configuration
#

Loading…
Cancel
Save