Harmonize and update Frequency Range computation to the current values specified by the standard

3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges
- FR1 from 410 MHz to 7125 MHz
- FR2 from 24.25 GHz to 71 GHz
This commit is contained in:
luis_pereira87
2025-03-20 20:41:21 +00:00
parent 82fb9fcc7c
commit c152177327
11 changed files with 53 additions and 18 deletions
+29
View File
@@ -1441,3 +1441,32 @@ unsigned short get_m_srs(int c_srs, int b_srs) {
unsigned short get_N_b_srs(int c_srs, int b_srs) {
return srs_bandwidth_config[c_srs][b_srs][1];
}
frequency_range_t get_freq_range_from_freq(uint64_t freq)
{
// 3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges
if (freq >= 410000000 && freq <= 7125000000)
return FR1;
if (freq >= 24250000000 && freq <= 71000000000)
return FR2;
AssertFatal(false, "Undefined Frequency Range for frequency %ld Hz\n", freq);
}
frequency_range_t get_freq_range_from_arfcn(uint32_t arfcn)
{
// 3GPP TS 38.101-1 Version 19.0.0 Table 5.1-1: Definition of frequency ranges
if (arfcn >= 82000 && arfcn <= 875000)
return FR1;
if (arfcn >= 2016667 && arfcn <= 2795832)
return FR2;
AssertFatal(false, "Undefined Frequency Range for ARFCN %d\n", arfcn);
}
frequency_range_t get_freq_range_from_band(uint16_t band)
{
return band <= 256 ? FR1 : FR2;
}
+4
View File
@@ -299,6 +299,10 @@ unsigned int get_prach_K(int prach_sequence_length, int prach_fmt_id, int pusch_
int get_slot_idx_in_period(const int slot, const frame_structure_t *fs);
frequency_range_t get_freq_range_from_freq(uint64_t freq);
frequency_range_t get_freq_range_from_arfcn(uint32_t arfcn);
frequency_range_t get_freq_range_from_band(uint16_t band);
#define CEILIDIV(a,b) ((a+b-1)/b)
#define ROUNDIDIV(a,b) (((a<<1)+b)/(b<<1))