Merge remote-tracking branch 'origin/NR_add_new_BW' into integration_2025_w06 (!3245)

Added Support of 35Mhz,45Mhz,70Mhz Bandwidth

Added Support of 35Mhz,45Mhz,70Mhz Bandwidth for 30Khz Subcarrier
Spacing, Also added 35Mhz, 45Mhz bw for 15Khz Subcarrierspacing.

Referred Spec TS 38.101 v18.6.0 section 5.3.2, table 5.3.2-1
This commit is contained in:
Robert Schmidt
2025-02-11 17:47:59 +01:00
5 changed files with 356 additions and 17 deletions
+48 -9
View File
@@ -188,18 +188,20 @@ uint64_t reverse_bits(uint64_t in, int n_bits)
return rev_bits;
}
static const int tables_5_3_2[5][12] = {
{25, 52, 79, 106, 133, 160, 216, 270, -1, -1, -1, -1}, // 15 FR1
{11, 24, 38, 51, 65, 78, 106, 133, 162, 217, 245, 273}, // 30 FR1
{-1, 11, 18, 24, 31, 38, 51, 65, 79, 107, 121, 135}, // 60 FR1
{66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
{32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1} // 120FR2
#define NUM_BW_ENTRIES 15
static const int tables_5_3_2[5][NUM_BW_ENTRIES] = {
{25, 52, 79, 106, 133, 160, 188, 216, 242, 270, -1, -1, -1, -1, -1}, // 15 FR1
{11, 24, 38, 51, 65, 78, 92, 106, 119, 133, 162, 189, 217, 245, 273}, // 30 FR1
{-1, 11, 18, 24, 31, 38, 44, 51, 58, 65, 79, 93, 107, 121, 135}, // 60 FR1
{66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1}, // 60 FR2
{32, 66, 132, 264, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1} // 120FR2
};
int get_supported_band_index(int scs, frequency_range_t freq_range, int n_rbs)
{
int scs_index = scs + freq_range;
for (int i = 0; i < 12; i++) {
for (int i = 0; i < NUM_BW_ENTRIES; i++) {
if(n_rbs == tables_5_3_2[scs_index][i])
return i;
}
@@ -209,7 +211,7 @@ int get_supported_band_index(int scs, frequency_range_t freq_range, int n_rbs)
int get_smallest_supported_bandwidth_index(int scs, frequency_range_t frequency_range, int n_rbs)
{
int scs_index = scs + frequency_range;
for (int i = 0; i < 12; i++) {
for (int i = 0; i < NUM_BW_ENTRIES; i++) {
if (n_rbs <= tables_5_3_2[scs_index][i])
return i;
}
@@ -422,7 +424,7 @@ void check_ssb_raster(uint64_t freq, int band, int scs)
int get_supported_bw_mhz(frequency_range_t frequency_range, int bw_index)
{
if (frequency_range == FR1) {
int bandwidth_index_to_mhz[] = {5, 10, 15, 20, 25, 30, 40, 50, 60, 80, 90, 100};
int bandwidth_index_to_mhz[] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 60, 70, 80, 90, 100};
AssertFatal(bw_index >= 0 && bw_index <= sizeofArray(bandwidth_index_to_mhz), "Bandwidth index %d is invalid\n", bw_index);
return bandwidth_index_to_mhz[bw_index];
} else {
@@ -824,6 +826,18 @@ void get_samplerate_and_bw(int mu,
*rx_bw = 50e6;
}
break;
case 242: // 45Mhz
case 188: // 35Mhz
if (threequarter_fs) {
*sample_rate = 46.08e6;
*samples_per_frame = 460800;
} else {
*sample_rate = 61.44e6;
*samples_per_frame = 614400;
}
*tx_bw = (n_rb == 242) ? 45e6 : 35e6;
*rx_bw = (n_rb == 242) ? 45e6 : 35e6;
break;
case 216:
if (threequarter_fs) {
*sample_rate=46.08e6;
@@ -924,6 +938,17 @@ void get_samplerate_and_bw(int mu,
*rx_bw = 80e6;
}
break;
case 189:
if (threequarter_fs) {
*sample_rate = 92.16e6;
*samples_per_frame = 921600;
} else {
*sample_rate = 122.88e6;
*samples_per_frame = 1228800;
}
*tx_bw = 70e6;
*rx_bw = 70e6;
break;
case 162 :
if (threequarter_fs) {
AssertFatal(1==0,"N_RB %d cannot use 3/4 sampling\n",n_rb);
@@ -949,6 +974,20 @@ void get_samplerate_and_bw(int mu,
}
break;
case 119: // 45Mhz
case 92: // 35Mhz
if (threequarter_fs) {
*sample_rate = 46.08e6;
*samples_per_frame = 460800;
} else {
*sample_rate = 61.44e6;
*samples_per_frame = 614400;
}
*tx_bw = (n_rb == 119) ? 45e6 : 35e6;
*rx_bw = (n_rb == 119) ? 45e6 : 35e6;
break;
case 106:
if (threequarter_fs) {
*sample_rate=46.08e6;