|
7 | 7 | * the distribution. |
8 | 8 | * |
9 | 9 | */ |
| 10 | +///\file |
| 11 | +///\brief pdsch_constants - namespace containing constants related to PDSCH transmissions. |
10 | 12 |
|
11 | 13 | #pragma once |
12 | 14 |
|
| 15 | +#include "srsran/ran/resource_block.h" |
| 16 | +#include "srsran/support/units.h" |
13 | 17 | #include <cstddef> |
14 | 18 |
|
15 | 19 | namespace srsran { |
16 | 20 |
|
17 | | -/// \brief Maximum size in bytes of a PDSCH PDU for a given UE. |
| 21 | +namespace pdsch_constants { |
| 22 | + |
| 23 | +/// \brief Maximum number of RE per resource block in a PDSCH transmission. |
| 24 | +/// |
| 25 | +/// As per TS38.214 Section 5.1.3.2. |
| 26 | +static constexpr unsigned MAX_NRE_PER_RB = 156; |
| 27 | + |
| 28 | +/// \brief Maximum modulation order supported on PDSCH transmissions. |
| 29 | +/// |
| 30 | +/// As per TS38.214 Section 5.1.3.1 with \c mcs-Table set to \c qam256. |
| 31 | +static constexpr unsigned MAX_MODULATION_ORDER = 8; |
| 32 | + |
| 33 | +/// \brief Maximum number of PDSCH transmission layers per codeword. |
| 34 | +/// |
| 35 | +/// As per TS38.211 Table 7.3.1.3-1. |
| 36 | +static constexpr unsigned CODEWORD_MAX_NOF_LAYERS = 4; |
| 37 | + |
| 38 | +/// \brief Maximuym number of codewords that can be contained in a PDSCH transmission. |
| 39 | +/// |
| 40 | +/// As per TS38.211 Table 7.3.1.3-1. |
| 41 | +static constexpr unsigned MAX_NOF_CODEWORDS = 2; |
| 42 | + |
| 43 | +/// \brief Maximum number of PDSCH transmission layers. |
18 | 44 | /// |
19 | | -/// It is not given by the TS. It assumes 156 resource elements for a maximum of 275 PRB, four layers and 256-QAM. |
20 | | -static constexpr size_t MAX_DL_PDU_LENGTH = (156 * 275 * 4 * 8) / 8; |
| 45 | +/// As per TS38.211 Table 7.3.1.3-1. |
| 46 | +static constexpr unsigned MAX_NOF_LAYERS = CODEWORD_MAX_NOF_LAYERS * MAX_NOF_CODEWORDS; |
| 47 | + |
| 48 | +/// \brief Maximum number of resource elements that can be mapped into a single codeword. |
| 49 | +/// |
| 50 | +/// Calculated as the product of maximum number or RE per PRB and the maximum number of PRB in the a resource grid. |
| 51 | +static constexpr unsigned CODEWORD_MAX_NOF_RE = MAX_NRE_PER_RB * MAX_NOF_PRBS; |
| 52 | + |
| 53 | +/// \brief Maximum number of symbols that can be mapped into a single codeword. |
| 54 | +/// |
| 55 | +/// Calculated as the product of the maximum number of resource elements and the maximum layers |
| 56 | +static constexpr unsigned CODEWORD_MAX_SYMBOLS = CODEWORD_MAX_NOF_RE * CODEWORD_MAX_NOF_LAYERS; |
| 57 | + |
| 58 | +/// \brief Maximum number of bits that can be modulated into a single codeword. |
| 59 | +/// |
| 60 | +/// Calculated as the product of the maximum number of resource elements and the maximum modulation order. |
| 61 | +static constexpr units::bits CODEWORD_MAX_SIZE{CODEWORD_MAX_SYMBOLS * MAX_MODULATION_ORDER}; |
| 62 | + |
| 63 | +} // namespace pdsch_constants |
| 64 | + |
| 65 | +/// \brief Maximum size in bytes of a PDSCH PDU for a given UE. |
| 66 | +static constexpr size_t MAX_DL_PDU_LENGTH = pdsch_constants::CODEWORD_MAX_SIZE.round_up_to_bytes().value(); |
21 | 67 |
|
22 | 68 | } // namespace srsran |
0 commit comments