Skip to content

Commit e4a0490

Browse files
carlo-galcodebot
authored andcommitted
du: remove option to set UL ARFCN in config
Signed-off-by: Carlo Galiotto <[email protected]>
1 parent 97a2ddd commit e4a0490

File tree

8 files changed

+37
-38
lines changed

8 files changed

+37
-38
lines changed

apps/units/flexible_du/du_high/du_high_config.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,6 @@ struct du_high_unit_base_cell_config {
547547
std::optional<unsigned> sector_id;
548548
/// DL ARFCN of "F_REF", which is the RF reference frequency, as per TS 38.104, Section 5.4.2.1.
549549
unsigned dl_f_ref_arfcn = 536020;
550-
/// UL ARFCN of "F_REF", which is the RF reference frequency, as per TS 38.104, Section 5.4.2.1.
551-
/// \remark Only relevant for FDD bands. If set with TDD bands, it will be ignored.
552-
/// For FDD bands, if not set, the UL ARFCN will be computed automatically.
553-
std::optional<unsigned> ul_f_ref_arfcn = std::nullopt;
554550
/// Common subcarrier spacing for the entire resource grid. It must be supported by the band SS raster.
555551
subcarrier_spacing common_scs = subcarrier_spacing::kHz15;
556552
/// NR band.

apps/units/flexible_du/du_high/du_high_config_cli11_schema.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,6 @@ static void configure_cli11_common_cell_args(CLI::App& app, du_high_unit_base_ce
11141114
->capture_default_str()
11151115
->check(CLI::Range(0U, (1U << 14) - 1U));
11161116
add_option(app, "--dl_arfcn", cell_params.dl_f_ref_arfcn, "Downlink ARFCN")->capture_default_str();
1117-
add_option(app, "--ul_arfcn", cell_params.ul_f_ref_arfcn, "Uplink ARFCN")->capture_default_str();
11181117
add_auto_enum_option(app, "--band", cell_params.band, "NR band");
11191118
add_option_function<std::string>(
11201119
app,

apps/units/flexible_du/du_high/du_high_config_translators.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ std::vector<srs_du::du_cell_config> srsran::generate_du_cell_config(const du_hig
230230
param.scs_common = base_cell.common_scs;
231231
param.channel_bw_mhz = base_cell.channel_bw_mhz;
232232
param.dl_f_ref_arfcn = base_cell.dl_f_ref_arfcn;
233-
param.ul_f_ref_arfcn = base_cell.ul_f_ref_arfcn;
234233
param.band = *base_cell.band;
235234
// Enable CSI-RS if the PDSCH mcs is dynamic (min_ue_mcs != max_ue_mcs).
236235
param.csi_rs_enabled = base_cell.csi_cfg.csi_rs_enabled;

apps/units/flexible_du/du_high/du_high_config_validator.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -651,13 +651,12 @@ static bool validate_dl_ul_arfcn_and_band(const du_high_unit_base_cell_config& c
651651
fmt::print("Invalid DL ARFCN={} for band {}. Cause: {}.\n", config.dl_f_ref_arfcn, band, ret.error());
652652
return false;
653653
}
654-
if (config.ul_f_ref_arfcn.has_value()) {
655-
ret =
656-
band_helper::is_ul_arfcn_valid_given_band(*config.band, config.ul_f_ref_arfcn.value(), config.channel_bw_mhz);
657-
if (not ret.has_value()) {
658-
fmt::print("Invalid UL ARFCN={} for band {}. Cause: {}.\n", config.dl_f_ref_arfcn, band, ret.error());
659-
return false;
660-
}
654+
// Check if also the corresponding UL ARFCN is valid.
655+
const uint32_t ul_arfcn = band_helper::get_ul_arfcn_from_dl_arfcn(config.dl_f_ref_arfcn, config.band.value());
656+
ret = band_helper::is_ul_arfcn_valid_given_band(*config.band, ul_arfcn, config.channel_bw_mhz);
657+
if (not ret.has_value()) {
658+
fmt::print("Invalid DL ARFCN={} for band {}. Cause: {}.\n", config.dl_f_ref_arfcn, band, ret.error());
659+
return false;
661660
}
662661
} else {
663662
if (band == nr_band::invalid) {
@@ -769,16 +768,16 @@ static bool validate_base_cell_unit_config(const du_high_unit_base_cell_config&
769768
return false;
770769
}
771770

772-
const auto ssb_scs = band_helper::get_most_suitable_ssb_scs(
773-
band_helper::get_band_from_dl_arfcn(config.dl_f_ref_arfcn), config.common_scs);
771+
const nr_band band =
772+
config.band.has_value() ? config.band.value() : band_helper::get_band_from_dl_arfcn(config.dl_f_ref_arfcn);
773+
const auto ssb_scs = band_helper::get_most_suitable_ssb_scs(band, config.common_scs);
774774
if (ssb_scs != config.common_scs) {
775775
fmt::print("Common SCS {}kHz is not equal to SSB SCS {}kHz. Different SCS for common and SSB is not supported.\n",
776776
scs_to_khz(config.common_scs),
777777
scs_to_khz(ssb_scs));
778778
return false;
779779
}
780-
const nr_band band =
781-
config.band.has_value() ? config.band.value() : band_helper::get_band_from_dl_arfcn(config.dl_f_ref_arfcn);
780+
782781
const unsigned nof_crbs =
783782
band_helper::get_n_rbs_from_bw(config.channel_bw_mhz, config.common_scs, band_helper::get_freq_range(band));
784783

include/srsran/scheduler/config/cell_config_builder_params.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,6 @@ struct cell_config_builder_params {
3131
/// This ARFCN represents "f_ref" for DL, as per TS 38.104, Section 5.4.2.1. As per TS 38.104, Section 5.4.2.2,
3232
/// "f_ref" maps to the central frequency of the band.
3333
unsigned dl_f_ref_arfcn = 365000;
34-
/// This ARFCN represents "f_ref" for UL, as per TS 38.104, Section 5.4.2.1. As per TS 38.104, Section 5.4.2.2,
35-
/// "f_ref" maps to the central frequency of the band.
36-
/// \remark Only relevant for FDD bands.
37-
/// If set, this value has been set by the application user.
38-
std::optional<unsigned> ul_f_ref_arfcn = std::nullopt;
3934
/// <em>NR operating band<\em>, as per Table 5.2-1 and 5.2-2, TS 38.104. If not specified, a valid band for the
4035
/// provided DL ARFCN is automatically derived.
4136
std::optional<nr_band> band;

lib/ran/band_helper.cpp

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,16 @@ srsran::band_helper::is_ul_arfcn_valid_given_band(nr_band band, uint32_t arfcn_f
809809

810810
for (const nr_band_raster& raster_band : nr_band_table) {
811811
if (raster_band.band == band and raster_band.delta_f_rast == band_delta_freq_raster) {
812+
// Check if the ARFCN doesn't exceed the band upper-bound for bands that support asymmetrical UL and DL channel
813+
// BWs.
814+
if ((band == nr_band::n66 or band == nr_band::n70 or band == nr_band::n92 or band == nr_band::n94) and
815+
(arfcn_f_ref < raster_band.ul_nref_first or arfcn_f_ref > raster_band.ul_nref_last)) {
816+
return make_unexpected(
817+
fmt::format("Asymmetrical UL and DL channel BWs are not supported. The UL ARFCN resulting from the DL "
818+
"ARFCN for band n{} must not exceed the band upper-bound={}",
819+
band,
820+
raster_band.ul_nref_last));
821+
}
812822
if (arfcn_f_ref >= raster_band.ul_nref_first and arfcn_f_ref <= raster_band.ul_nref_last and
813823
((arfcn_f_ref - raster_band.ul_nref_first) % raster_band.ul_nref_step) == 0) {
814824
return {};
@@ -845,9 +855,11 @@ uint32_t srsran::band_helper::get_ul_arfcn_from_dl_arfcn(uint32_t dl_arfcn, std:
845855
if (b_it.band == operating_band) {
846856
const uint32_t offset = (dl_arfcn - b_it.dl_nref_first) / b_it.dl_nref_step;
847857
const uint32_t candidate_ul_arfcn = b_it.ul_nref_first + offset * b_it.ul_nref_step;
848-
// For band n65, n66, n70, n92, n94, the UL spectrum is smaller than the corresponding DL spectrum, therefore we
849-
// need to cap the UL ARFCN to its upper-bound.
850-
return std::min(candidate_ul_arfcn, b_it.ul_nref_last);
858+
// For band n66, n70, n92, n94, the UL spectrum is smaller than the corresponding DL spectrum, as these bands
859+
// supports asymmetrical UL anc DL channel operations. However, the current GNB doesn't support this feature.
860+
// If the resulting UL ARFCN is outside the valid range, return 0.
861+
return (candidate_ul_arfcn >= b_it.ul_nref_first and candidate_ul_arfcn <= b_it.ul_nref_last) ? candidate_ul_arfcn
862+
: 0U;
851863
}
852864
}
853865

lib/scheduler/config/serving_cell_config_factory.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ static carrier_configuration make_default_carrier_configuration(const cell_confi
8989
cfg.arfcn_f_ref = params.dl_f_ref_arfcn;
9090
cfg.nof_ant = params.nof_dl_ports;
9191
} else {
92-
cfg.arfcn_f_ref = params.ul_f_ref_arfcn.has_value()
93-
? params.ul_f_ref_arfcn.value()
94-
: band_helper::get_ul_arfcn_from_dl_arfcn(params.dl_f_ref_arfcn, cfg.band);
92+
cfg.arfcn_f_ref = band_helper::get_ul_arfcn_from_dl_arfcn(params.dl_f_ref_arfcn, cfg.band);
9593
cfg.nof_ant = 1;
9694
}
9795
const min_channel_bandwidth min_channel_bw = band_helper::get_min_channel_bw(cfg.band, params.scs_common);
@@ -336,9 +334,7 @@ srsran::config_helpers::make_default_ul_config_common(const cell_config_builder_
336334
{
337335
ul_config_common cfg{};
338336
// This is the ARFCN of the UL f_ref, as per TS 38.104, Section 5.4.2.1.
339-
const uint32_t ul_arfcn = params.ul_f_ref_arfcn.has_value()
340-
? params.ul_f_ref_arfcn.value()
341-
: band_helper::get_ul_arfcn_from_dl_arfcn(params.dl_f_ref_arfcn, params.band);
337+
const uint32_t ul_arfcn = band_helper::get_ul_arfcn_from_dl_arfcn(params.dl_f_ref_arfcn, params.band);
342338
const double ul_absolute_freq_point_a = band_helper::get_abs_freq_point_a_from_f_ref(
343339
band_helper::nr_arfcn_to_freq(ul_arfcn), params.cell_nof_crbs, params.scs_common);
344340
// \c absolute_freq_point_a needs to be expressed as in ARFCN, as per \c absoluteFrequencyPointA definition in 38.211,

tests/unittests/ran/band_helper_test.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,16 @@ TEST(get_ul_arfcn_from_dl_arfcn, mixed_frequencies)
112112
ASSERT_EQ(142600, get_ul_arfcn_from_dl_arfcn(153600, nr_band::n28));
113113
ASSERT_EQ(144608, get_ul_arfcn_from_dl_arfcn(155608, nr_band::n28));
114114

115-
// For n65, m66, n70, n92, n94, the UL spectrum is smaller than the DL spectrum. When we convert the DL ARFCN
116-
// upper-bound to the corresponding UL ARFCN, we need to cap the value to the UL spectrum upper-bound.
117-
ASSERT_EQ(402000, get_ul_arfcn_from_dl_arfcn(440000, nr_band::n65));
118-
ASSERT_EQ(356000, get_ul_arfcn_from_dl_arfcn(440000, nr_band::n66));
119-
ASSERT_EQ(342000, get_ul_arfcn_from_dl_arfcn(404000, nr_band::n70));
120-
ASSERT_EQ(172400, get_ul_arfcn_from_dl_arfcn(303400, nr_band::n92));
121-
ASSERT_EQ(183000, get_ul_arfcn_from_dl_arfcn(303400, nr_band::n94));
115+
// For n66, n70, n92, n94, the UL spectrum is smaller than the DL spectrum. When we convert the DL ARFCN
116+
// to the corresponding UL ARFCN, if the UL ARFCN exceeds the band upper-bound, we return 0.
117+
ASSERT_EQ(356000, get_ul_arfcn_from_dl_arfcn(436000, nr_band::n66));
118+
ASSERT_EQ(0, get_ul_arfcn_from_dl_arfcn(440000, nr_band::n66));
119+
ASSERT_EQ(342000, get_ul_arfcn_from_dl_arfcn(402000, nr_band::n70));
120+
ASSERT_EQ(0, get_ul_arfcn_from_dl_arfcn(404000, nr_band::n70));
121+
ASSERT_EQ(172400, get_ul_arfcn_from_dl_arfcn(292400, nr_band::n92));
122+
ASSERT_EQ(0, get_ul_arfcn_from_dl_arfcn(303400, nr_band::n92));
123+
ASSERT_EQ(183000, get_ul_arfcn_from_dl_arfcn(293400, nr_band::n94));
124+
ASSERT_EQ(0, get_ul_arfcn_from_dl_arfcn(303400, nr_band::n94));
122125
}
123126

124127
TEST(test_get_abs_freq_point_a_arfcn, mixed_frequencies)

0 commit comments

Comments
 (0)