Skip to content

Commit 184f18c

Browse files
xavierarteagacodebot
authored andcommitted
phy: PDSCH processor benchmark includes precoding
1 parent a957b88 commit 184f18c

File tree

1 file changed

+47
-4
lines changed

1 file changed

+47
-4
lines changed

tests/benchmarks/phy/upper/channel_processors/pdsch_processor_benchmark.cpp

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ static std::string selected_profile_name = "default
7272
static std::string ldpc_encoder_type = "auto";
7373
static std::string pdsch_processor_type = "generic";
7474
static benchmark_modes benchmark_mode = benchmark_modes::throughput_total;
75-
static unsigned nof_tx_layers = 1;
7675
static dmrs_type dmrs = dmrs_type::TYPE1;
7776
static unsigned nof_cdm_groups_without_data = 2;
7877
static bounded_bitset<MAX_NSYMB_PER_SLOT> dmrs_symbol_mask =
@@ -91,12 +90,15 @@ static unsigned finish_count = 0;
9190

9291
// Test profile structure, initialized with default profile values.
9392
struct test_profile {
93+
enum class mimo_topology { one_port_one_layer = 0, two_port_two_layer };
94+
9495
std::string name = "default";
9596
std::string description = "Runs all combinations.";
9697
subcarrier_spacing scs = subcarrier_spacing::kHz15;
9798
std::vector<unsigned> rv_set = {0};
9899
cyclic_prefix cp = cyclic_prefix::NORMAL;
99100
unsigned start_symbol = 2;
101+
mimo_topology mimo = mimo_topology::one_port_one_layer;
100102
unsigned nof_symbols = get_nsymb_per_slot(cyclic_prefix::NORMAL) - 2;
101103
std::vector<unsigned> nof_prb_set = {25, 52, 106, 270};
102104
std::vector<sch_mcs_description> mcs_set = {{modulation_scheme::QPSK, 120.0F},
@@ -120,6 +122,7 @@ static const std::vector<test_profile> profile_set = {
120122
{0},
121123
cyclic_prefix::NORMAL,
122124
0,
125+
test_profile::mimo_topology::one_port_one_layer,
123126
12,
124127
{25},
125128
{{modulation_scheme::QPSK, 120.0F}}},
@@ -130,6 +133,7 @@ static const std::vector<test_profile> profile_set = {
130133
{0},
131134
cyclic_prefix::NORMAL,
132135
0,
136+
test_profile::mimo_topology::one_port_one_layer,
133137
12,
134138
{25},
135139
{{modulation_scheme::QAM256, 948.0F}}},
@@ -140,6 +144,7 @@ static const std::vector<test_profile> profile_set = {
140144
{0},
141145
cyclic_prefix::NORMAL,
142146
0,
147+
test_profile::mimo_topology::one_port_one_layer,
143148
12,
144149
{106},
145150
{{modulation_scheme::QPSK, 120.0F}}},
@@ -150,6 +155,7 @@ static const std::vector<test_profile> profile_set = {
150155
{0},
151156
cyclic_prefix::NORMAL,
152157
0,
158+
test_profile::mimo_topology::one_port_one_layer,
153159
12,
154160
{106},
155161
{{modulation_scheme::QAM16, 658.0F}}},
@@ -160,6 +166,7 @@ static const std::vector<test_profile> profile_set = {
160166
{0},
161167
cyclic_prefix::NORMAL,
162168
0,
169+
test_profile::mimo_topology::one_port_one_layer,
163170
12,
164171
{106},
165172
{{modulation_scheme::QAM64, 873.0F}}},
@@ -170,6 +177,7 @@ static const std::vector<test_profile> profile_set = {
170177
{0},
171178
cyclic_prefix::NORMAL,
172179
0,
180+
test_profile::mimo_topology::one_port_one_layer,
173181
12,
174182
{106},
175183
{{modulation_scheme::QAM256, 948.0F}}},
@@ -180,6 +188,7 @@ static const std::vector<test_profile> profile_set = {
180188
{0},
181189
cyclic_prefix::NORMAL,
182190
0,
191+
test_profile::mimo_topology::one_port_one_layer,
183192
12,
184193
{270},
185194
{{modulation_scheme::QPSK, 120.0F}}},
@@ -190,6 +199,29 @@ static const std::vector<test_profile> profile_set = {
190199
{0},
191200
cyclic_prefix::NORMAL,
192201
0,
202+
test_profile::mimo_topology::one_port_one_layer,
203+
12,
204+
{270},
205+
{{modulation_scheme::QAM256, 948.0F}}},
206+
207+
{"scs30_100MHz_256qam_max",
208+
"Encodes PDSCH with 50 MHz of bandwidth and a 15 kHz SCS, 256-QAM modulation at maximum code rate.",
209+
subcarrier_spacing::kHz30,
210+
{0},
211+
cyclic_prefix::NORMAL,
212+
0,
213+
test_profile::mimo_topology::one_port_one_layer,
214+
12,
215+
{270},
216+
{{modulation_scheme::QAM256, 948.0F}}},
217+
218+
{"2port_2layer_scs30_100MHz_256qam",
219+
"Encodes PDSCH with 50 MHz of bandwidth and a 15 kHz SCS, 256-QAM modulation at maximum code rate.",
220+
subcarrier_spacing::kHz30,
221+
{0},
222+
cyclic_prefix::NORMAL,
223+
0,
224+
test_profile::mimo_topology::two_port_two_layer,
193225
12,
194226
{270},
195227
{{modulation_scheme::QAM256, 948.0F}}},
@@ -283,14 +315,25 @@ static std::vector<test_case_type> generate_test_cases(const test_profile& profi
283315
{
284316
std::vector<test_case_type> test_case_set;
285317

318+
// Select precoding configuration.
319+
precoding_configuration precoding_config;
320+
switch (profile.mimo) {
321+
case test_profile::mimo_topology::one_port_one_layer:
322+
precoding_config = make_single_port();
323+
break;
324+
case test_profile::mimo_topology::two_port_two_layer:
325+
precoding_config = make_wideband_two_layer_two_ports(0);
326+
break;
327+
}
328+
286329
for (sch_mcs_description mcs : profile.mcs_set) {
287330
for (unsigned nof_prb : profile.nof_prb_set) {
288331
for (unsigned i_rv : profile.rv_set) {
289332
// Determine the Transport Block Size.
290333
tbs_calculator_configuration tbs_config = {};
291334
tbs_config.mcs_descr = mcs;
292335
tbs_config.n_prb = nof_prb;
293-
tbs_config.nof_layers = nof_tx_layers;
336+
tbs_config.nof_layers = precoding_config.get_nof_layers();
294337
tbs_config.nof_symb_sh = profile.nof_symbols;
295338
tbs_config.nof_dmrs_prb = dmrs.nof_dmrs_per_rb() * dmrs_symbol_mask.count();
296339
unsigned tbs = tbs_calculator_calculate(tbs_config);
@@ -318,7 +361,7 @@ static std::vector<test_case_type> generate_test_cases(const test_profile& profi
318361
{},
319362
0.0,
320363
0.0,
321-
make_single_port()};
364+
precoding_config};
322365
test_case_set.emplace_back(std::tuple<pdsch_processor::pdu_t, unsigned>(config, tbs));
323366
}
324367
}
@@ -405,7 +448,7 @@ static std::tuple<std::unique_ptr<pdsch_processor>, std::unique_ptr<pdsch_pdu_va
405448
// Creates a resource grid.
406449
static std::unique_ptr<resource_grid> create_resource_grid(unsigned nof_ports, unsigned nof_symbols, unsigned nof_subc)
407450
{
408-
std::shared_ptr<channel_precoder_factory> precoding_factory = create_channel_precoder_factory("generic");
451+
std::shared_ptr<channel_precoder_factory> precoding_factory = create_channel_precoder_factory("auto");
409452
TESTASSERT(precoding_factory != nullptr, "Invalid channel precoder factory.");
410453
std::shared_ptr<resource_grid_factory> rg_factory = create_resource_grid_factory(precoding_factory);
411454
TESTASSERT(rg_factory != nullptr, "Invalid resource grid factory.");

0 commit comments

Comments
 (0)