Skip to content

Commit f4a2741

Browse files
frankistcodebot
authored andcommitted
gnb: allow selecting between ue-dedicated and common search space for UE search space 2
1 parent 96555d5 commit f4a2741

File tree

4 files changed

+38
-4
lines changed

4 files changed

+38
-4
lines changed

apps/gnb/gnb.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -602,9 +602,9 @@ int main(int argc, char** argv)
602602
phy_rx_symbol_req_adapter.connect(&lower->get_request_handler());
603603

604604
// Create FAPI adaptors.
605-
const std::vector<du_cell_config>& du_cfg = generate_du_cell_config(gnb_cfg);
606-
unsigned sector = du_cfg.size() - 1;
607-
subcarrier_spacing scs = du_cfg.front().scs_common;
605+
std::vector<du_cell_config> du_cfg = generate_du_cell_config(gnb_cfg);
606+
unsigned sector = du_cfg.size() - 1;
607+
subcarrier_spacing scs = du_cfg.front().scs_common;
608608

609609
auto phy_adaptor = build_phy_fapi_adaptor(sector,
610610
scs,

apps/gnb/gnb_appconfig.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "srsran/ran/bs_channel_bandwidth.h"
1515
#include "srsran/ran/pci.h"
1616
#include "srsran/ran/pdcch/aggregation_level.h"
17+
#include "srsran/ran/pdcch/search_space.h"
1718
#include "srsran/ran/subcarrier_spacing.h"
1819
#include <string>
1920
#include <thread>
@@ -64,6 +65,12 @@ struct prach_appconfig {
6465
unsigned max_msg3_harq_retx = 4;
6566
};
6667

68+
/// PDCCH application configuration.
69+
struct pdcch_appconfig {
70+
/// Use an UE-dedicated or Common Search Space.
71+
search_space_configuration::type_t ue_ss_type = search_space_configuration::type_t::ue_dedicated;
72+
};
73+
6774
/// PDSCH application configuration.
6875
struct pdsch_appconfig {
6976
/// UE modulation and coding scheme index.
@@ -108,6 +115,8 @@ struct base_cell_appconfig {
108115
std::string plmn = "00101";
109116
/// TAC.
110117
unsigned tac = 7;
118+
/// PDCCH configuration.
119+
pdcch_appconfig pdcch_cfg;
111120
/// PDSCH configuration.
112121
pdsch_appconfig pdsch_cfg;
113122
/// PRACH configuration.

apps/gnb/gnb_appconfig_cli11_schema.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,19 @@ static void configure_cli11_expert_phy_args(CLI::App& app, expert_phy_appconfig&
161161
->capture_default_str();
162162
}
163163

164+
static void configure_cli11_pdcch_args(CLI::App& app, pdcch_appconfig& pdcch_params)
165+
{
166+
app.add_option_function<std::string>(
167+
"--ss_type",
168+
[&pdcch_params](const std::string& value) {
169+
pdcch_params.ue_ss_type = (value == "common") ? search_space_configuration::type_t::common
170+
: search_space_configuration::type_t::ue_dedicated;
171+
},
172+
"SearchSpace type for UE data")
173+
->default_str("ue_dedicated")
174+
->check(CLI::IsMember({"common", "ue_dedicated"}, CLI::ignore_case));
175+
}
176+
164177
static void configure_cli11_pdsch_args(CLI::App& app, pdsch_appconfig& pdsch_params)
165178
{
166179
app.add_option("--fixed_ue_mcs", pdsch_params.fixed_ue_mcs, "Fixed UE MCS")
@@ -169,7 +182,7 @@ static void configure_cli11_pdsch_args(CLI::App& app, pdsch_appconfig& pdsch_par
169182
app.add_option("--fixed_rar_mcs", pdsch_params.fixed_rar_mcs, "Fixed RAR MCS")
170183
->capture_default_str()
171184
->check(CLI::Range(0, 28));
172-
app.add_option("--fixed_sib1_mci", pdsch_params.fixed_sib1_mcs, "Fixed SIB1 MCS")
185+
app.add_option("--fixed_sib1_mcs", pdsch_params.fixed_sib1_mcs, "Fixed SIB1 MCS")
173186
->capture_default_str()
174187
->check(CLI::Range(0, 28));
175188
}
@@ -269,6 +282,10 @@ static void configure_cli11_common_cell_args(CLI::App& app, base_cell_appconfig&
269282
return (tac <= 0xffffffU) ? "" : "TAC value out of range";
270283
});
271284

285+
// PDCCH configuration.
286+
CLI::App* pdcch_subcmd = app.add_subcommand("pdcch", "PDCCH parameters");
287+
configure_cli11_pdcch_args(*pdcch_subcmd, cell_params.pdcch_cfg);
288+
272289
// PDSCH configuration.
273290
CLI::App* pdsch_subcmd = app.add_subcommand("pdsch", "PDSCH parameters");
274291
configure_cli11_pdsch_args(*pdsch_subcmd, cell_params.pdsch_cfg);

apps/gnb/gnb_appconfig_translators.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@ std::vector<du_cell_config> srsran::generate_du_cell_config(const gnb_appconfig&
9696
rach_cfg.prach_root_seq_index = base_cell.prach_cfg.prach_root_sequence_index;
9797
rach_cfg.rach_cfg_generic.zero_correlation_zone_config = base_cell.prach_cfg.zero_correlation_zone;
9898

99+
// UE-dedicated config.
100+
if (config.common_cell_cfg.pdcch_cfg.ue_ss_type == search_space_configuration::type_t::common) {
101+
search_space_configuration& ss_cfg =
102+
out_cell.ue_ded_serv_cell_cfg.dl_bwps[0].bwp_dl_common->pdcch_common.search_spaces[0];
103+
ss_cfg.type = search_space_configuration::type_t::common;
104+
ss_cfg.common.f0_0_and_f1_0 = true;
105+
}
106+
99107
error_type<std::string> error = is_du_cell_config_valid(out_cfg.back());
100108
if (!error) {
101109
report_error("Invalid configuration DU cell detected: {}\n", error.error());

0 commit comments

Comments
 (0)