Added SSB center frequency to band helper

This commit is contained in:
Andre Puschmann 2021-10-04 17:56:34 +02:00
parent 91e17337db
commit 5b0767772b
1 changed files with 57 additions and 49 deletions

View File

@ -115,7 +115,7 @@ public:
uint32_t get_abs_freq_point_a_arfcn(uint32_t nof_prb, uint32_t arfcn);
/**
* @brief Compute the absolute frequency of the SSB for a DL ARFCN and a band. sThis selects an SSB center frequency
* @brief Compute the absolute frequency of the SSB for a DL ARFCN and a band. This selects an SSB center frequency
* following the band SS/PBCH frequency raster provided by 38.104 table 5.4.3.1-1 as close as possible to PointA
* without letting any SS/PBCH subcarrier below PointA
*
@ -126,6 +126,13 @@ public:
*/
uint32_t get_abs_freq_ssb_arfcn(uint16_t band, srsran_subcarrier_spacing_t scs, uint32_t freq_point_a_arfcn);
/**
* @brief Compute SSB center frequency for NR carrier
* @param carrier Const Reference to a carrier struct including PRB, abs. frequency point A and carrier offset.
* @return double Frequency in Hz
*/
double get_ssb_center_freq(const srsran_carrier_nr_t& carrier);
class sync_raster_t
{
protected:
@ -313,8 +320,8 @@ private:
}};
static const uint32_t nof_nr_bands_fr2 = 8;
static constexpr std::array<nr_band, nof_nr_bands_fr2> nr_band_table_fr2 = {
{{257, KHZ_60, 2054166, 1, 2104165, 2054166, 1, 2104165},
static constexpr std::array<nr_band, nof_nr_bands_fr2> nr_band_table_fr2 = {{
{257, KHZ_60, 2054166, 1, 2104165, 2054166, 1, 2104165},
{257, KHZ_120, 2054167, 2, 2104165, 2054167, 20, 2104165},
{258, KHZ_60, 2016667, 1, 2070832, 2016667, 1, 2070832},
@ -324,7 +331,8 @@ private:
{260, KHZ_120, 2229167, 2, 2279165, 2229167, 2, 2279165},
{261, KHZ_60, 2070833, 1, 2084999, 2070833, 1, 2084999},
{261, KHZ_120, 2070833, 2, 2084999, 2070833, 2, 2084999}}};
{261, KHZ_120, 2070833, 2, 2084999, 2070833, 2, 2084999}
}};
// Elements of TS 38.101-1 Table 5.4.3.3-1 : Applicable SS raster entries per operating band
struct nr_band_ss_raster {