Skip to content

Commit d9e8055

Browse files
xavierarteagacodebot
authored andcommitted
du: more UL-MIMO development
sched: review qweak function for UL-MIMO ran: add end line sched: select PUSCH tx scheme codebook to non-coeherent sched: fix compulation
1 parent ac9b2dc commit d9e8055

27 files changed

+561
-272
lines changed

include/srsran/ran/pdcch/dci_packing.h

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@
1111
#pragma once
1212

1313
#include "srsran/adt/bounded_bitset.h"
14+
#include "srsran/adt/bounded_integer.h"
1415
#include "srsran/adt/expected.h"
1516
#include "srsran/adt/optional.h"
1617
#include "srsran/adt/static_vector.h"
1718
#include "srsran/ran/dmrs.h"
1819
#include "srsran/ran/pdcch/pdcch_constants.h"
1920
#include "srsran/ran/physical_cell_group.h"
21+
#include "srsran/ran/pusch/tx_scheme_configuration.h"
2022
#include "srsran/support/units.h"
23+
#include <variant>
2124

2225
namespace srsran {
2326

@@ -31,14 +34,6 @@ enum class resource_allocation { resource_allocation_type_0, resource_allocation
3134
/// Dynamic resource allocation indicator for DCI formats 0_1 and 1_1.
3235
enum class dynamic_resource_allocation { type_0, type_1 };
3336

34-
/// \brief Subset of PMIs addressed by TPMI, where PMIs are those supported by UEs with maximum coherence capabilities.
35-
/// \remark See TS38.214, Section 6.1.1.1.
36-
enum class tx_scheme_codebook_subset : unsigned {
37-
fully_and_partial_and_non_coherent,
38-
partial_and_non_coherent,
39-
non_coherent
40-
};
41-
4237
/// \brief DCI configuration parameters required to perform the DCI size alignment procedure.
4338
///
4439
/// The size alignment procedure, specified in TS38.212 Section 7.3.1.0, reduces the number of different DCI sizes, to
@@ -137,11 +132,16 @@ struct dci_size_config {
137132
/// Set to \c true if PUSCH frequency hopping is configured, i.e., if the higher layer parameter \e frequencyHopping
138133
/// (see TS38.331 Section 6.3.2, Information Element \e PUSCH-Config) is configured.
139134
bool frequency_hopping_configured;
140-
/// \brief Non-codebook based transmission flag.
135+
/// \brief PUSCH transmission schemes according to TS 38.214 Section 6.1.1.
136+
///
137+
/// The transmit scheme is given by the field \e txConfig in TS 38.331 Section 6.3.2, Information Element
138+
/// \e PUSCH-Config.
141139
///
142-
/// Set to \c true if non-codebook based transmission is configured, i.e., if the higher layer parameter \e txConfig
143-
/// (see TS38.331 Section 6.3.2, Information Element \e PUSCH-Config) is set for non-codebook transmission.
144-
bool tx_config_non_codebook;
140+
/// This field is required for DCI Format 0_1.
141+
///
142+
/// The maximum rank \ref tx_scheme_codebook::max_rank must be smaller than or equal to the number of \ref
143+
/// nof_srs_ports.
144+
std::optional<pusch_tx_scheme_configuration> pusch_tx_scheme;
145145
/// \brief UL transform precoding flag.
146146
///
147147
/// Set to \c true if UL transform precoding is enabled.
@@ -176,8 +176,8 @@ struct dci_size_config {
176176
/// \brief Number of antenna ports used for PUSCH codebook-based transmission.
177177
///
178178
/// Set according to the higher layer parameter \e nrofSRS-Ports (see TS38.331 Section 6.3.2, Information Element \e
179-
/// SRS-Config), as per TS38.214 Section 6.1.1.1, if codebook-based PUSCH transmission is configured, i.e., if \ref
180-
/// tx_config_non_codebook is set to \c false. Otherwise, leave it unset. Values: {1, 2, 4}.
179+
/// SRS-Config), as per TS38.214 Section 6.1.1.1, if the field \e txConfig is present. Otherwise, leave it
180+
/// unset. Values: {1, 2, 4}.
181181
std::optional<unsigned> nof_srs_ports;
182182
/// \brief Parameter \f$N_{SRS}\f$ in TS38.212 Section 7.3.1.1.2, indicating the number of SRS resources.
183183
///
@@ -195,21 +195,6 @@ struct dci_size_config {
195195
///
196196
/// \remark Required if \ref tx_config_non_codebook is set to \c true, indicating non-codebook transmission.
197197
std::optional<unsigned> pusch_max_layers;
198-
/// \brief Maximum UE transmission rank for codebook based operation.
199-
///
200-
/// Specifies the maximum UE transmission rank, determined by the higher layer parameter \e maxRank (see TS38.331
201-
/// Section 6.3.2, Information Element \e PUSCH-Config). Values: {1, ..., 4} and it must be smaller or equal than \ref
202-
/// nof_srs_ports.
203-
///
204-
/// \remark Required for codebook based transmission, i.e., if \ref tx_config_non_codebook is set to \c false.
205-
std::optional<unsigned> max_rank;
206-
/// \brief Subset of PMIs addressed by TPMI.
207-
///
208-
/// Restricts the available PMIs to those supported by the UE, according to its coherence capabilities. Its value is
209-
/// indicated by the higher layer parameter \e codebookSubset (see TS38.331 Section 6.3.2, Information Element \e
210-
/// PUSCH-Config). It is required for codebook based transmission with more than one antenna port, i.e., if \ref
211-
/// tx_config_non_codebook is set to \c false and \ref nof_srs_ports is greater than one. Otherwise, leave it unset.
212-
std::optional<tx_scheme_codebook_subset> cb_subset;
213198
/// \brief UL DM-RS type for DM-RS mapping type A.
214199
///
215200
/// Set according to the higher layer parameter \e dmrs-Type (see TS38.331 Section 6.3.2, Information Element \e
@@ -894,9 +879,9 @@ struct dci_0_1_configuration {
894879
///
895880
/// The content and actual number of bits is defined by TS38.212 Tables 7.3.1.1.2-2/3/4/5, according to whether
896881
/// transform precoding is enabled or disabled, and the values of the higher layer parameters \e maxRank (see
897-
/// dci_size_config::max_rank) and \e codebookSubset (see dci_size_config::cb_subset). It is required for codebook
898-
/// based transmission with more than one antenna port, i.e., if \ref dci_size_config::cb_subset is set when computing
899-
/// the DCI sizes.
882+
/// tx_scheme_codebook::max_rank) and \e codebookSubset (see tx_scheme_codebook::cb_subset). It is required for
883+
/// codebook based transmission with more than one antenna port, i.e., if \ref dci_size_config::cb_subset is set when
884+
/// computing the DCI sizes.
900885
unsigned precoding_info_nof_layers;
901886
/// \brief Antenna ports for PUSCH transmission - 2, 3, 4 or 5 bits.
902887
///
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
*
3+
* Copyright 2021-2024 Software Radio Systems Limited
4+
*
5+
* By using this file, you agree to the terms and conditions set
6+
* forth in the LICENSE file which can be found at the top level of
7+
* the distribution.
8+
*
9+
*/
10+
11+
#pragma once
12+
13+
#include "srsran/adt/static_vector.h"
14+
#include "srsran/ran/srs/srs_resource_configuration.h"
15+
#include "srsran/scheduler/config/dmrs.h"
16+
17+
namespace srsran {
18+
19+
/// \brief Returns the PUSCH antenna ports mapping row index in TS 38.212, table 7.3.1.2.2-6 to 7.3.1.2.2-23.
20+
/// \param[in] nof_layers Number of layers.
21+
/// \param[in] transform_precoder Set to \c true if the transform precoder is used.
22+
/// \param[in] dmrs_cfg_type PUSCH DM-RS configuration type.
23+
/// \param[in] dmrs_max_len PUSCH DM-RS maximum number of OFDM symbols.
24+
/// \return The PUSCH antenna ports mapping row index.
25+
unsigned get_pusch_antenna_port_mapping_row_index(unsigned nof_layers,
26+
bool transform_precoder,
27+
dmrs_config_type dmrs_cfg_type,
28+
dmrs_max_length dmrs_max_len);
29+
30+
/// \brief Returns the PUSCH precoding information mapping row index in TS 38.212, table 7.3.1.1.2-2/3/4/5.
31+
/// \param[in] nof_layers Number of layers.
32+
/// \param[in] max_rank Maximum number of transmission layers.
33+
/// \param[in] transform_precoder Set to \c true if the transform precoder is used.
34+
/// \param[in] dmrs_cfg_type PUSCH DM-RS configuration type.
35+
/// \param[in] dmrs_max_len PUSCH DM-RS maximum number of OFDM symbols.
36+
/// \param[in] tpmi PUSCH TPMI.
37+
/// \return The PUSCH precoding information mapping row index.
38+
unsigned get_pusch_precoding_info_row_index(unsigned nof_layers,
39+
unsigned max_rank,
40+
srs_resource_configuration::one_two_four_enum nof_srs_ports,
41+
bool transform_precoder,
42+
dmrs_config_type dmrs_cfg_type,
43+
dmrs_max_length dmrs_max_len,
44+
unsigned tpmi);
45+
46+
} // namespace srsran

include/srsran/ran/pusch/pusch_configuration.h

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "srsran/ran/alpha.h"
1515
#include "srsran/ran/csi_rs/csi_rs_id.h"
1616
#include "srsran/ran/pusch/pusch_mcs.h"
17+
#include "srsran/ran/pusch/tx_scheme_configuration.h"
1718
#include "srsran/ran/uci/uci_configuration.h"
1819

1920
namespace srsran {
@@ -27,9 +28,6 @@ enum p0_pusch_alphaset_id : uint8_t {
2728
/// \brief Used to configure the UE specific PUSCH parameters applicable to a particular BWP.
2829
/// \remark See TS 38.331, PUSCH-Config.
2930
struct pusch_config {
30-
/// Type of transmission schemes for PUSCH.
31-
enum class tx_config { codebook, non_codebook, not_set };
32-
3331
struct pusch_power_control {
3432
struct p0_pusch_alphaset {
3533
p0_pusch_alphaset_id id;
@@ -132,22 +130,16 @@ struct pusch_config {
132130
/// \remark See TS 38.214, clause 6.1.3.
133131
enum class transform_precoder : unsigned { enabled, disabled, not_set };
134132

135-
/// Subset of PMIs addressed by TPMI, where PMIs are those supported by UEs with maximum coherence capabilities.
136-
/// Applicable to DCI format 0_1.
137-
/// \remark See TS 38.214, clause 6.1.1.1.
138-
enum class codebook_subset : unsigned {
139-
fully_and_partial_and_non_coherent,
140-
partial_and_non_coherent,
141-
non_coherent,
142-
not_set
143-
};
144-
145133
/// Identifier used to initalite data scrambling (c_init) for PUSCH. If the field is absent, the UE applies the
146134
/// physical cell ID. See TS 38.211, clause 6.3.1.1.
147135
std::optional<uint16_t> data_scrambling_id_pusch;
148-
/// UE uses codebook based or non-codebook based transmission (see TS 38.214, clause 6.1.1). If the field is
149-
/// not set, the UE transmits PUSCH on one antenna port.
150-
tx_config tx_cfg{tx_config::not_set};
136+
/// \brief PUSCH transmission schemes according to TS 38.214 Section 6.1.1.
137+
///
138+
/// The transmit scheme is given by the field \e txConfig in TS 38.331 Section 6.3.2, Information Element
139+
/// \e PUSCH-Config.
140+
///
141+
/// The UE is not supposed to receive DCI Format 0_1 if this field is not present.
142+
std::optional<pusch_tx_scheme_configuration> tx_cfg;
151143
/// DMRS configuration for PUSCH transmissions using PUSCH (chosen dynamically via
152144
/// PUSCH-TimeDomainResourceAllocation). Only the fields dmrs-Type, dmrs-AdditionalPosition and maxLength may be set
153145
/// differently for mapping type A and B. The field dmrs-UplinkForPUSCH-MappingTypeA applies to DCI format 0_1.
@@ -162,11 +154,6 @@ struct pusch_config {
162154
/// The UE specific selection of transformer precoder for PUSCH. When the field is not set the UE applies the value of
163155
/// the field msg3-transformPrecoder.
164156
transform_precoder trans_precoder{transform_precoder::not_set};
165-
/// The field is mandatory present if txConfig is set to codebook and absent otherwise.
166-
codebook_subset cb_subset{codebook_subset::not_set};
167-
/// Subset of PMIs addressed by TRIs from 1 to ULmaxRank. The field maxRank applies to DCI format 0_1.
168-
/// The field is mandatory present if txConfig is set to codebook and absent otherwise. Values {1,..,4}.
169-
std::optional<uint8_t> max_rank;
170157

171158
/// \c uci-OnPUSCH.
172159
std::optional<uci_on_pusch> uci_cfg;
@@ -177,8 +164,7 @@ struct pusch_config {
177164
pusch_mapping_type_a_dmrs == rhs.pusch_mapping_type_a_dmrs &&
178165
pusch_mapping_type_b_dmrs == rhs.pusch_mapping_type_b_dmrs && pusch_pwr_ctrl == rhs.pusch_pwr_ctrl &&
179166
res_alloc == rhs.res_alloc && mcs_table == rhs.mcs_table && trans_precoder == rhs.trans_precoder &&
180-
cb_subset == rhs.cb_subset && max_rank == rhs.max_rank && uci_cfg == rhs.uci_cfg &&
181-
pusch_td_alloc_list == rhs.pusch_td_alloc_list;
167+
uci_cfg == rhs.uci_cfg && pusch_td_alloc_list == rhs.pusch_td_alloc_list;
182168
}
183169
bool operator!=(const pusch_config& rhs) const { return !(rhs == *this); }
184170
};

include/srsran/ran/pusch/pusch_tpmi_select.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#pragma once
1212

13+
#include "tx_scheme_configuration.h"
1314
#include "srsran/adt/interval.h"
1415
#include "srsran/adt/optional.h"
1516
#include "srsran/adt/static_vector.h"
@@ -64,9 +65,12 @@ class pusch_tpmi_select_info
6465
/// \brief Selects the Transmit Precoding Matrix Indicator (TPMI) for each possible number of layers supported by the
6566
/// channel topology.
6667
///
67-
/// \param[in] channel Channel coefficient matrix.
68-
/// \param[in] noise_variance Linear noise variance.
68+
/// \param[in] channel Channel coefficient matrix.
69+
/// \param[in] noise_variance Linear noise variance.
70+
/// \param[in] codebook_subset Transmission scheme codebook subset.
6971
/// \return The TPMI information given the channel coefficients and noise variance.
70-
pusch_tpmi_select_info get_tpmi_select_info(const srs_channel_matrix& channel, float noise_variance);
72+
pusch_tpmi_select_info get_tpmi_select_info(const srs_channel_matrix& channel,
73+
float noise_variance,
74+
tx_scheme_codebook_subset codebook_subset);
7175

7276
} // namespace srsran
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
*
3+
* Copyright 2021-2024 Software Radio Systems Limited
4+
*
5+
* By using this file, you agree to the terms and conditions set
6+
* forth in the LICENSE file which can be found at the top level of
7+
* the distribution.
8+
*
9+
*/
10+
11+
#pragma once
12+
13+
#include "srsran/adt/bounded_integer.h"
14+
#include <variant>
15+
16+
namespace srsran {
17+
18+
/// \brief Subset of PMIs addressed by TPMI, where PMIs are those supported by UEs with maximum coherence capabilities.
19+
///
20+
/// The UE maximum coherence capability is given by TS38.331 higher layer capability parameter \e pusch-TransCoherence
21+
/// in TS38.331 Section 6.3.2, Information Element \e MIMO-ParametersPerBand.
22+
///
23+
/// The PUSCH transmission scheme codebook subset is given by the higher layer parameter \e codebookSubset in TS38.331
24+
/// Section 6.3.2, Information Element \e PUSCH-Config.
25+
///
26+
/// See TS38.214, Section 6.1.1.1 for related physical layer procedures.
27+
enum class tx_scheme_codebook_subset : unsigned {
28+
fully_and_partial_and_non_coherent,
29+
partial_and_non_coherent,
30+
non_coherent
31+
};
32+
33+
/// \defgroup tx_schemes PUSCH transmission schemes defined in TS 38.214 Section 6.1.1.
34+
/// @{
35+
/// \brief Codebook based transmit scheme.
36+
struct tx_scheme_codebook {
37+
/// \brief Maximum number of layers in PUSCH. Values {1,..,4}.
38+
///
39+
/// The parameter is given by the field \e maxRank in the TS 38.331 Section 6.3.2, Information Element \e
40+
/// PUSCH-Config.
41+
bounded_integer<uint8_t, 1, 4> max_rank;
42+
/// \brief PUSCH precoding codebook subset.
43+
///
44+
/// Restricts the available PMIs to those supported by the UE, according to its coherence capabilities. Its value is
45+
/// indicated by the higher layer parameter \e codebookSubset (see TS38.331 Section 6.3.2, Information Element \e
46+
/// PUSCH-Config).
47+
tx_scheme_codebook_subset codebook_subset;
48+
49+
bool operator==(const tx_scheme_codebook& rhs) const
50+
{
51+
return rhs.max_rank == max_rank && codebook_subset == rhs.codebook_subset;
52+
}
53+
};
54+
/// Non-codebook based transmission scheme.
55+
struct tx_scheme_non_codebook {
56+
// Empty.
57+
58+
bool operator==(const tx_scheme_non_codebook& rhs) const { return true; }
59+
};
60+
/// @}
61+
62+
/// PUSCH transmit scheme configuration.
63+
using pusch_tx_scheme_configuration = std::variant<tx_scheme_codebook, tx_scheme_non_codebook>;
64+
65+
} // namespace srsran

lib/du/du_high/du_manager/converters/asn1_rrc_config_helpers.cpp

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,17 +1999,39 @@ calculate_pusch_config_diff(asn1::rrc_nr::pusch_cfg_s& out, const pusch_config&
19991999
out.data_scrambling_id_pusch_present = true;
20002000
out.data_scrambling_id_pusch = dest.data_scrambling_id_pusch.value();
20012001
}
2002-
if (dest.tx_cfg != srsran::pusch_config::tx_config::not_set) {
2003-
out.tx_cfg_present = true;
2004-
switch (dest.tx_cfg) {
2005-
case pusch_config::tx_config::codebook:
2006-
out.tx_cfg = pusch_cfg_s::tx_cfg_opts::codebook;
2007-
break;
2008-
case pusch_config::tx_config::non_codebook:
2009-
out.tx_cfg = pusch_cfg_s::tx_cfg_opts::non_codebook;
2010-
break;
2011-
default:
2012-
srsran_assertion_failure("Invalid PUSCH Tx cfg={}", dest.tx_cfg);
2002+
2003+
// According to TS 38.331 Section 6.3.2 Information Element PUSCH-Config, the fields codebookSubset and maxRank must
2004+
// be present if the field txConfig is set to codebook.
2005+
if (dest.tx_cfg.has_value()) {
2006+
if (std::holds_alternative<tx_scheme_codebook>(dest.tx_cfg.value())) {
2007+
// Extract codebook transmit scheme parameters.
2008+
const auto& tx_cfg = std::get<tx_scheme_codebook>(dest.tx_cfg.value());
2009+
2010+
// Set the transmission scheme.
2011+
out.tx_cfg_present = true;
2012+
out.tx_cfg = pusch_cfg_s::tx_cfg_opts::codebook;
2013+
2014+
// Set the codebook subset field.
2015+
out.codebook_subset_present = true;
2016+
switch (tx_cfg.codebook_subset) {
2017+
case tx_scheme_codebook_subset::fully_and_partial_and_non_coherent:
2018+
out.codebook_subset = pusch_cfg_s::codebook_subset_opts::fully_and_partial_and_non_coherent;
2019+
break;
2020+
case tx_scheme_codebook_subset::partial_and_non_coherent:
2021+
out.codebook_subset = pusch_cfg_s::codebook_subset_opts::partial_and_non_coherent;
2022+
break;
2023+
case tx_scheme_codebook_subset::non_coherent:
2024+
out.codebook_subset = pusch_cfg_s::codebook_subset_opts::non_coherent;
2025+
break;
2026+
}
2027+
2028+
// Set maximum rank field.
2029+
out.max_rank_present = true;
2030+
out.max_rank = tx_cfg.max_rank.to_uint();
2031+
} else if (std::holds_alternative<tx_scheme_non_codebook>(dest.tx_cfg.value())) {
2032+
// Set the transmission scheme to non-codebook.
2033+
out.tx_cfg_present = true;
2034+
out.tx_cfg = pusch_cfg_s::tx_cfg_opts::non_codebook;
20132035
}
20142036
}
20152037

@@ -2103,28 +2125,6 @@ calculate_pusch_config_diff(asn1::rrc_nr::pusch_cfg_s& out, const pusch_config&
21032125
}
21042126
}
21052127

2106-
if (dest.cb_subset != srsran::pusch_config::codebook_subset::not_set) {
2107-
out.codebook_subset_present = true;
2108-
switch (dest.cb_subset) {
2109-
case pusch_config::codebook_subset::fully_and_partial_and_non_coherent:
2110-
out.codebook_subset = pusch_cfg_s::codebook_subset_opts::fully_and_partial_and_non_coherent;
2111-
break;
2112-
case pusch_config::codebook_subset::partial_and_non_coherent:
2113-
out.codebook_subset = pusch_cfg_s::codebook_subset_opts::partial_and_non_coherent;
2114-
break;
2115-
case pusch_config::codebook_subset::non_coherent:
2116-
out.codebook_subset = pusch_cfg_s::codebook_subset_opts::non_coherent;
2117-
break;
2118-
default:
2119-
srsran_assertion_failure("Invalid Codebook subset={}", dest.cb_subset);
2120-
}
2121-
}
2122-
2123-
if (dest.max_rank.has_value()) {
2124-
out.max_rank_present = true;
2125-
out.max_rank = dest.max_rank.value();
2126-
}
2127-
21282128
if ((dest.uci_cfg.has_value() && not src.uci_cfg.has_value()) ||
21292129
(dest.uci_cfg.has_value() && src.uci_cfg.has_value() && dest.uci_cfg.has_value() != src.uci_cfg.has_value())) {
21302130
out.uci_on_pusch_present = true;

lib/ran/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ add_library(srsran_ran
3333
prach/prach_helper.cpp
3434
precoding/precoding_codebooks.cpp
3535
ptrs/ptrs_pattern.cpp
36+
pusch/pusch_antenna_port_mapping.cpp
3637
pusch/pusch_mcs.cpp
3738
pusch/pusch_tpmi_select.cpp
3839
pusch/pusch_uci_beta_offset.cpp

0 commit comments

Comments
 (0)