Skip to content

Commit 77be7d3

Browse files
Merge branch 'dev' into agpl_main
2 parents f9c7eca + 2622a8d commit 77be7d3

File tree

6 files changed

+101
-35
lines changed

6 files changed

+101
-35
lines changed

.gitlab/ci/retina_request_rf.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
- name: srs-gnb
3131
type: gnb
32-
image: registry.gitlab.com/softwareradiosystems/retina/images/srsgnb:0.1.1_0.2.0
32+
image: registry.gitlab.com/softwareradiosystems/retina/images/srsgnb:0.1.1_0.2.2
3333
resources:
3434
- type: sdr
3535
model: b200

.gitlab/ci/retina_request_zmq.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
- name: srs-gnb
3030
type: gnb
31-
image: registry.gitlab.com/softwareradiosystems/retina/images/srsgnb:0.1.1_0.2.0
31+
image: registry.gitlab.com/softwareradiosystems/retina/images/srsgnb:0.1.1_0.2.2
3232
resources:
3333
- type: zmq
3434
path: ../../build/apps/gnb/gnb

apps/gnb/gnb_appconfig_cli11_schema.cpp

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static void configure_cli11_log_args(CLI::App& app, log_appconfig& log_params)
5454
app.add_option("--sdap_level", log_params.sdap_level, "SDAP log level")->capture_default_str()->check(level_check);
5555
app.add_option("--gtpu_level", log_params.gtpu_level, "GTPU log level")->capture_default_str()->check(level_check);
5656
app.add_option("--fapi_level", log_params.fapi_level, "FAPI log level")->capture_default_str()->check(level_check);
57-
app.add_option("--hex_max_size", log_params.hex_max_size, "Number of bytes to print in hex")
57+
app.add_option("--hex_max_size", log_params.hex_max_size, "Maximum number of bytes to print in hex")
5858
->capture_default_str()
5959
->check(CLI::Range(0, 1024));
6060
app.add_option("--broadcast_enabled",
@@ -63,12 +63,10 @@ static void configure_cli11_log_args(CLI::App& app, log_appconfig& log_params)
6363
->always_capture_default();
6464
app.add_option("--phy_rx_symbols_filename",
6565
log_params.phy_rx_symbols_filename,
66-
"Set to a valid file path to print the received symbols.")
66+
"Set to a valid file path to print the received symbols")
6767
->always_capture_default();
6868

69-
/// Post-parsing callback. This allows us to
70-
/// set the log level to "all" level, if no level
71-
/// is provided.
69+
// Post-parsing callback. This allows us to set the log level to "all" level, if no level is provided.
7270
app.callback([&]() {
7371
if (app.count("--app_level") == 0) {
7472
log_params.app_level = log_params.all_level;
@@ -132,14 +130,14 @@ static void configure_cli11_rf_driver_args(CLI::App& app, rf_driver_appconfig& r
132130
{
133131
app.add_option("--srate", rf_driver_params.srate_MHz, "Sample rate in MHz")->capture_default_str();
134132
app.add_option("--device_driver", rf_driver_params.device_driver, "Device driver name")->capture_default_str();
135-
app.add_option("--device_args", rf_driver_params.device_arguments, "Optional device arguments.")
133+
app.add_option("--device_args", rf_driver_params.device_arguments, "Optional device arguments")
136134
->capture_default_str();
137-
app.add_option("--tx_gain", rf_driver_params.tx_gain_dB, "Transmit gain in decibels.")->capture_default_str();
138-
app.add_option("--rx_gain", rf_driver_params.rx_gain_dB, "Receive gain in decibels.")->capture_default_str();
139-
app.add_option("--lo_offset", rf_driver_params.lo_offset_MHz, "LO frequency offset in MHz.")->capture_default_str();
140-
app.add_option("--clock", rf_driver_params.clock_source, "Clock source.")->capture_default_str();
141-
app.add_option("--sync", rf_driver_params.synch_source, "Time synchronization source.")->capture_default_str();
142-
app.add_option("--otw_format", rf_driver_params.otw_format, "Over-the-wire format.")->capture_default_str();
135+
app.add_option("--tx_gain", rf_driver_params.tx_gain_dB, "Transmit gain in decibels")->capture_default_str();
136+
app.add_option("--rx_gain", rf_driver_params.rx_gain_dB, "Receive gain in decibels")->capture_default_str();
137+
app.add_option("--lo_offset", rf_driver_params.lo_offset_MHz, "LO frequency offset in MHz")->capture_default_str();
138+
app.add_option("--clock", rf_driver_params.clock_source, "Clock source")->capture_default_str();
139+
app.add_option("--sync", rf_driver_params.synch_source, "Time synchronization source")->capture_default_str();
140+
app.add_option("--otw_format", rf_driver_params.otw_format, "Over-the-wire format")->capture_default_str();
143141
app.add_option_function<std::string>(
144142
"--time_alignment_calibration",
145143
[&rf_driver_params](const std::string& value) {
@@ -152,7 +150,7 @@ static void configure_cli11_rf_driver_args(CLI::App& app, rf_driver_appconfig& r
152150
},
153151
"Rx to Tx radio time alignment calibration in samples.\n"
154152
"Positive values reduce the RF transmission delay with respect\n"
155-
"to the RF reception, while negative values increase it.")
153+
"to the RF reception, while negative values increase it")
156154
->check([](const std::string& value) -> std::string {
157155
// Check for valid option "auto".
158156
if (value == "auto") {
@@ -168,17 +166,17 @@ static void configure_cli11_rf_driver_args(CLI::App& app, rf_driver_appconfig& r
168166

169167
static void configure_cli11_expert_phy_args(CLI::App& app, expert_phy_appconfig& expert_phy_params)
170168
{
171-
app.add_option("--nof_ul_threads", expert_phy_params.nof_ul_threads, "Number of threads to process uplink.")
169+
app.add_option("--nof_ul_threads", expert_phy_params.nof_ul_threads, "Number of threads to process uplink")
172170
->capture_default_str()
173171
->check(CLI::Number);
174172
app.add_option("--pusch_dec_max_iterations",
175173
expert_phy_params.pusch_decoder_max_iterations,
176-
"Maximum number of PUSCH LDPC decoder iterations.")
174+
"Maximum number of PUSCH LDPC decoder iterations")
177175
->capture_default_str()
178176
->check(CLI::Number);
179177
app.add_option("--pusch_dec_enable_early_stop",
180178
expert_phy_params.pusch_decoder_early_stop,
181-
"Enables PUSCH LDPC decoder early stop.")
179+
"Enables PUSCH LDPC decoder early stop")
182180
->capture_default_str();
183181
}
184182

@@ -224,7 +222,9 @@ static void configure_cli11_prach_args(CLI::App& app, prach_appconfig& prach_par
224222

225223
static void configure_cli11_amplitude_control_args(CLI::App& app, amplitude_control_appconfig& amplitude_params)
226224
{
227-
app.add_option("--tx_gain_backoff", amplitude_params.gain_backoff_dB, "Gain back-off to accommodate the signal PAPR")
225+
app.add_option("--tx_gain_backoff",
226+
amplitude_params.gain_backoff_dB,
227+
"Gain back-off to accommodate the signal PAPR in decibels")
228228
->capture_default_str();
229229
app.add_option("--enable_clipping", amplitude_params.enable_clipping, "Signal clipping")->capture_default_str();
230230
app.add_option("--ceiling", amplitude_params.power_ceiling_dBFS, "Clipping ceiling referenced to full scale")
@@ -234,7 +234,7 @@ static void configure_cli11_amplitude_control_args(CLI::App& app, amplitude_cont
234234
static void configure_cli11_common_cell_args(CLI::App& app, base_cell_appconfig& cell_params)
235235
{
236236
app.add_option("--pci", cell_params.pci, "PCI")->capture_default_str()->check(CLI::Range(0, 1007));
237-
app.add_option("--dl_arfcn", cell_params.dl_arfcn, "Donwlink ARFCN")->capture_default_str();
237+
app.add_option("--dl_arfcn", cell_params.dl_arfcn, "Downlink ARFCN")->capture_default_str();
238238
add_auto_enum_option(app, "--band", cell_params.band, "NR band");
239239
app.add_option("--common_scs", cell_params.common_scs, "Cell common subcarrier spacing")
240240
->transform([](const std::string& value) {
@@ -323,17 +323,18 @@ static void configure_cli11_rlc_um_args(CLI::App& app, rlc_um_appconfig& rlc_um_
323323
static void configure_cli11_rlc_am_args(CLI::App& app, rlc_am_appconfig& rlc_am_params)
324324
{
325325
CLI::App* rlc_tx_am_subcmd = app.add_subcommand("tx", "AM TX parameters");
326-
rlc_tx_am_subcmd->add_option("--sn", rlc_am_params.tx.sn_field_length, "RLC AM TX SN")->capture_default_str();
327-
rlc_tx_am_subcmd->add_option("--t-poll-retransmit", rlc_am_params.tx.t_poll_retx, "RLC AM TX SN")
326+
rlc_tx_am_subcmd->add_option("--sn", rlc_am_params.tx.sn_field_length, "RLC AM TX SN size")->capture_default_str();
327+
rlc_tx_am_subcmd->add_option("--t-poll-retransmit", rlc_am_params.tx.t_poll_retx, "RLC AM TX t-PollRetransmit (ms)")
328328
->capture_default_str();
329-
rlc_tx_am_subcmd->add_option("--max-retx-threshold", rlc_am_params.tx.max_retx_thresh, "RLC AM TX SN")
329+
rlc_tx_am_subcmd->add_option("--max-retx-threshold", rlc_am_params.tx.max_retx_thresh, "RLC AM max retx threshold")
330330
->capture_default_str();
331-
rlc_tx_am_subcmd->add_option("--poll-pdu", rlc_am_params.tx.poll_pdu, "RLC AM TX SN")->capture_default_str();
332-
rlc_tx_am_subcmd->add_option("--poll-byte", rlc_am_params.tx.poll_byte, "RLC AM TX SN")->capture_default_str();
331+
rlc_tx_am_subcmd->add_option("--poll-pdu", rlc_am_params.tx.poll_pdu, "RLC AM TX PollPdu")->capture_default_str();
332+
rlc_tx_am_subcmd->add_option("--poll-byte", rlc_am_params.tx.poll_byte, "RLC AM TX PollByte")->capture_default_str();
333333
CLI::App* rlc_rx_am_subcmd = app.add_subcommand("rx", "AM RX parameters");
334334
rlc_rx_am_subcmd->add_option("--sn", rlc_am_params.rx.sn_field_length, "RLC AM RX SN")->capture_default_str();
335-
rlc_rx_am_subcmd->add_option("--t-reassembly", rlc_am_params.rx.t_reassembly, "RLC AM RX SN")->capture_default_str();
336-
rlc_rx_am_subcmd->add_option("--t-status-prohibit", rlc_am_params.rx.t_status_prohibit, "RLC AM RX SN")
335+
rlc_rx_am_subcmd->add_option("--t-reassembly", rlc_am_params.rx.t_reassembly, "RLC AM RX t-Reassembly")
336+
->capture_default_str();
337+
rlc_rx_am_subcmd->add_option("--t-status-prohibit", rlc_am_params.rx.t_status_prohibit, "RLC AM RX t-StatusProhibit")
337338
->capture_default_str();
338339
}
339340

@@ -375,7 +376,7 @@ void srsran::configure_cli11_with_gnb_appconfig_schema(CLI::App& app, gnb_appcon
375376
configure_cli11_rf_driver_args(*rf_driver_subcmd, gnb_cfg.rf_driver_cfg);
376377

377378
// Common cell parameters.
378-
CLI::App* common_cell_subcmd = app.add_subcommand("common_cell", "Common cell parameters")->configurable();
379+
CLI::App* common_cell_subcmd = app.add_subcommand("cell_cfg", "Cell configuration")->configurable();
379380
configure_cli11_common_cell_args(*common_cell_subcmd, gnb_cfg.common_cell_cfg);
380381
// Configure the cells to use the common cell parameters once it has been parsed and before parsing the cells.
381382
common_cell_subcmd->parse_complete_callback([&gnb_cfg]() {
@@ -413,7 +414,7 @@ void srsran::configure_cli11_with_gnb_appconfig_schema(CLI::App& app, gnb_appcon
413414
// Prepare the radio bearers
414415
gnb_cfg.qos_cfg.resize(values.size());
415416

416-
//// Format every QoS setting.
417+
// Format every QoS setting.
417418
for (unsigned i = 0, e = values.size(); i != e; ++i) {
418419
CLI::App subapp("QoS parameters");
419420
subapp.config_formatter(create_yaml_config_parser());
@@ -426,7 +427,6 @@ void srsran::configure_cli11_with_gnb_appconfig_schema(CLI::App& app, gnb_appcon
426427
app.add_option_function<std::vector<std::string>>("--qos", qos_lambda, "qos");
427428

428429
// Expert PHY section.
429-
CLI::App* expert_phy_subcmd =
430-
app.add_subcommand("expert_phy", "Expert physical layer configuration.")->configurable();
430+
CLI::App* expert_phy_subcmd = app.add_subcommand("expert_phy", "Expert physical layer configuration")->configurable();
431431
configure_cli11_expert_phy_args(*expert_phy_subcmd, gnb_cfg.expert_phy_cfg);
432432
}

apps/gnb/gnb_appconfig_translators.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,10 @@ radio_configuration::radio srsran::generate_radio_config(const gnb_appconfig&
328328

329329
// Add the tx ports.
330330
if (config.rf_driver_cfg.device_driver == "zmq") {
331-
srsran_assert(sector_id * nof_ports + port_id < zmq_tx_addr.size(),
332-
"Transmission channel arguments out of bounds");
331+
if (sector_id * nof_ports + port_id >= zmq_tx_addr.size()) {
332+
report_error("ZMQ transmission channel arguments out of bounds");
333+
}
334+
333335
tx_ch_config.args = zmq_tx_addr[sector_id * nof_ports + port_id];
334336
}
335337
tx_stream_config.channels.emplace_back(tx_ch_config);
@@ -344,8 +346,10 @@ radio_configuration::radio srsran::generate_radio_config(const gnb_appconfig&
344346
rx_ch_config.gain_dB = config.rf_driver_cfg.rx_gain_dB;
345347

346348
if (config.rf_driver_cfg.device_driver == "zmq") {
347-
srsran_assert(sector_id * nof_ports + port_id < zmq_rx_addr.size(),
348-
"Reception channel arguments out of bounds");
349+
if (sector_id * nof_ports + port_id >= zmq_rx_addr.size()) {
350+
report_error("ZMQ reception channel arguments out of bounds");
351+
}
352+
349353
rx_ch_config.args = zmq_rx_addr[sector_id * nof_ports + port_id];
350354
}
351355
rx_stream_config.channels.emplace_back(rx_ch_config);
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
amf:
2+
addr: 127.0.1.100 # The address or hostname of the AMF.
3+
bind_addr: 127.0.0.1 # A local IP that the gNB binds to for traffic from the AMF.
4+
5+
rf_driver:
6+
device_driver: uhd # The RF driver name.
7+
device_args: type=b200 # Optionally pass arguments to the selected RF driver.
8+
clock: # Specify the clock source used by the RF.
9+
sync: # Specify the sync source used by the RF.
10+
srate: 11.52 # RF sample rate might need to be adjusted according to selected bandwidth.
11+
tx_gain: 50 # Transmit gain of the RF might need to adjusted to the given situation.
12+
rx_gain: 60 # Receive gain of the RF might need to adjusted to the given situation.
13+
14+
cell_cfg:
15+
dl_arfcn: 632628 # ARFCN of the downlink carrier (center frequency).
16+
band: 78 # The NR band.
17+
channel_bandwidth_MHz: 10 # Bandwith in MHz. Number of PRBs will be automatically derived.
18+
common_scs: 30 # Subcarrier spacing in kHz used for data.
19+
plmn: "00101" # PLMN broadcasted by the gNB.
20+
tac: 7 # Tracking area code (needs to match the core configuration).
21+
pci: 1 # Physical cell ID.
22+
23+
log:
24+
filename: /tmp/gnb.log # Path of the log file.
25+
all_level: warning # Logging level applied to all layers.
26+
27+
pcap:
28+
mac_enable: false # Set to true to enable MAC-layer PCAPs.
29+
mac_filename: /tmp/gnb_mac.pcap # Path where the MAC PCAP is stored.
30+
ngap_enable: false # Set to true to enable NGAP PCAPs.
31+
ngap_filename: /tmp/gnb_ngap.pcap # Path where the NGAP PCAP is stored.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
amf:
2+
addr: 127.0.1.100 # The address or hostname of the AMF.
3+
bind_addr: 127.0.0.1 # A local IP that the gNB binds to for traffic from the AMF.
4+
5+
rf_driver:
6+
device_driver: uhd # The RF driver name.
7+
device_args: type=n3xx # Optionally pass arguments to the selected RF driver.
8+
clock: gpsdo # Specify the clock source used by the RF.
9+
sync: gpsdo # Specify the sync source used by the RF.
10+
srate: 30.72 # RF sample rate might need to be adjusted according to selected bandwidth.
11+
tx_gain: 35 # Transmit gain of the RF might need to adjusted to the given situation.
12+
rx_gain: 60 # Receive gain of the RF might need to adjusted to the given situation.
13+
14+
cell_cfg:
15+
dl_arfcn: 368640 # ARFCN of the downlink carrier (center frequency).
16+
band: 3 # The NR band.
17+
channel_bandwidth_MHz: 20 # Bandwith in MHz. Number of PRBs will be automatically derived.
18+
common_scs: 15 # Subcarrier spacing in kHz used for data.
19+
plmn: "00101" # PLMN broadcasted by the gNB.
20+
tac: 7 # Tracking area code (needs to match the core configuration).
21+
pci: 1 # Physical cell ID.
22+
23+
log:
24+
filename: /tmp/gnb.log # Path of the log file.
25+
all_level: warning # Logging level applied to all layers.
26+
27+
pcap:
28+
mac_enable: false # Set to true to enable MAC-layer PCAPs.
29+
mac_filename: /tmp/gnb_mac.pcap # Path where the MAC PCAP is stored.
30+
ngap_enable: false # Set to true to enable NGAP PCAPs.
31+
ngap_filename: /tmp/gnb_ngap.pcap # Path where the NGAP PCAP is stored.

0 commit comments

Comments
 (0)