mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
remove band from frame parameters and get_band function not used anymore
This commit is contained in:
@@ -419,77 +419,6 @@ bool compare_relative_ul_channel_bw(int nr_band, int scs, int channel_bandwidth,
|
||||
return rel_bw > limit;
|
||||
}
|
||||
|
||||
static bool check_delta_duplex(int index, uint64_t dlfreq_khz, uint64_t ulfreq_khz, int64_t dlbw, int64_t ulbw)
|
||||
{
|
||||
int uldl_min_offset = nr_bandtable[index].dl_min - nr_bandtable[index].ul_min;
|
||||
int txrx_offset = dlfreq_khz - ulfreq_khz;
|
||||
LOG_I(NR_PHY, "dlfreq:%ld ulfreq:%ld deltaduplex:%d khz, uldl_min_offset:%d khz\n",
|
||||
dlfreq_khz, ulfreq_khz, txrx_offset, uldl_min_offset);
|
||||
if (txrx_offset == uldl_min_offset)
|
||||
return true;
|
||||
|
||||
int band = nr_bandtable[index].band;
|
||||
|
||||
// Refer to section 5.4.4 in spec 38.101-5
|
||||
if (band == 256 && txrx_offset >= 165000 && txrx_offset <= 215000)
|
||||
return true;
|
||||
if (band == 255 && txrx_offset >= -130500 && txrx_offset <= -72500)
|
||||
return true;
|
||||
if (band == 254 && txrx_offset >= 862000 && txrx_offset <= 885000)
|
||||
return true;
|
||||
|
||||
// Refer to section 5.4.4 in spec 38.101-1 for these bands 24, 91-94, 109
|
||||
if (band == 24 && (txrx_offset == -101500 || txrx_offset == -120500))
|
||||
return true;
|
||||
//Delta duplex is also a range for these bands n91-n94, n109.
|
||||
if ((band >= 91 && band <= 94) || band == 109) {
|
||||
dlbw = ((dlbw / 1000) + 1) * 1000;
|
||||
ulbw = ((ulbw / 1000) + 1) * 1000;
|
||||
int lower_limit = nr_bandtable[index].dl_min - nr_bandtable[index].ul_max + ((dlbw + ulbw) >> 1);
|
||||
int upper_limit = nr_bandtable[index].dl_max - nr_bandtable[index].ul_min - ((dlbw + ulbw) >> 1);
|
||||
LOG_I(NR_PHY, "Band %d dlbw:%ld Khz, ulbw: %ld Khz RXTX lower limit:%d khz, upper limit:%d khz\n",
|
||||
band, dlbw, ulbw, lower_limit, upper_limit);
|
||||
|
||||
if (txrx_offset >= lower_limit && txrx_offset <= upper_limit)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex, int64_t dlbw, int64_t ulbw)
|
||||
{
|
||||
const int64_t dl_freq_khz = downlink_frequency / 1000;
|
||||
const int32_t delta_duplex_khz = delta_duplex / 1000;
|
||||
const int64_t ul_freq_khz = dl_freq_khz + delta_duplex_khz;
|
||||
|
||||
uint16_t current_band = 0;
|
||||
|
||||
for (int ind = 0; ind < sizeofArray(nr_bandtable); ind++) {
|
||||
|
||||
if (dl_freq_khz < nr_bandtable[ind].dl_min || dl_freq_khz > nr_bandtable[ind].dl_max)
|
||||
continue;
|
||||
|
||||
if (ul_freq_khz < nr_bandtable[ind].ul_min || ul_freq_khz > nr_bandtable[ind].ul_max)
|
||||
continue;
|
||||
|
||||
if (!check_delta_duplex(ind, dl_freq_khz, ul_freq_khz, dlbw, ulbw))
|
||||
continue;
|
||||
|
||||
current_band = nr_bandtable[ind].band;
|
||||
}
|
||||
|
||||
printf("DL frequency %"PRIu64": band %d, UL frequency %"PRIu64"\n",
|
||||
downlink_frequency, current_band, downlink_frequency+delta_duplex);
|
||||
|
||||
AssertFatal(current_band != 0,
|
||||
"Can't find EUTRA band for frequency %" PRIu64 " and duplex_spacing %d\n",
|
||||
downlink_frequency,
|
||||
delta_duplex);
|
||||
|
||||
return current_band;
|
||||
}
|
||||
|
||||
int NRRIV2BW(int locationAndBandwidth,int N_RB) {
|
||||
int tmp = locationAndBandwidth/N_RB;
|
||||
int tmp2 = locationAndBandwidth%N_RB;
|
||||
|
||||
@@ -296,7 +296,6 @@ int get_coreset_num_cces(const uint8_t *FreqDomainResource, int duration);
|
||||
int get_nr_table_idx(int nr_bandP, uint8_t scs_index);
|
||||
int32_t get_delta_duplex(int nr_bandP, uint8_t scs_index);
|
||||
frame_type_t get_frame_type(uint16_t nr_bandP, uint8_t scs_index);
|
||||
uint16_t get_band(uint64_t downlink_frequency, int32_t delta_duplex, int64_t dlbw, int64_t ulbw);
|
||||
int NRRIV2BW(int locationAndBandwidth,int N_RB);
|
||||
int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB);
|
||||
int PRBalloc_to_locationandbandwidth0(int NPRB,int RBstart,int BWPsize);
|
||||
|
||||
@@ -367,9 +367,8 @@ void nr_phy_config_request(NR_PHY_Config_t *phy_config)
|
||||
fp->ul_CarrierFreq = ((ul_bw_khz>>1) + gNB_config->carrier_config.uplink_frequency.value)*1000 ;
|
||||
|
||||
int32_t dlul_offset = fp->ul_CarrierFreq - fp->dl_CarrierFreq;
|
||||
fp->nr_band = get_band(fp->dl_CarrierFreq, dlul_offset, dl_bw_khz, ul_bw_khz);
|
||||
|
||||
LOG_I(PHY, "DL frequency %lu Hz, UL frequency %lu Hz: band %d, uldl offset %d Hz\n", fp->dl_CarrierFreq, fp->ul_CarrierFreq, fp->nr_band, dlul_offset);
|
||||
LOG_I(PHY, "DL frequency %lu Hz, UL frequency %lu Hz: uldl offset %d Hz\n", fp->dl_CarrierFreq, fp->ul_CarrierFreq, dlul_offset);
|
||||
|
||||
fp->threequarter_fs = get_softmodem_params()->threequarter_fs;
|
||||
LOG_D(PHY,"Configuring MIB for instance %d, : (Nid_cell %d,DL freq %llu, UL freq %llu)\n",
|
||||
|
||||
@@ -101,7 +101,6 @@ TEST(nr_frame_params, test_mu_3)
|
||||
cfg.cell_config.frame_duplex_type.value = TDD;
|
||||
cfg.ssb_config.scs_common.value = mu;
|
||||
fp.dl_CarrierFreq = 27524520000;
|
||||
fp.nr_band = 261;
|
||||
nr_init_frame_parms(&cfg, &fp);
|
||||
nr_dump_frame_parms(&fp);
|
||||
test_coherence_symbol_api(&fp);
|
||||
@@ -121,7 +120,6 @@ TEST(nr_frame_params, test_mu_2)
|
||||
cfg.cell_config.frame_duplex_type.value = TDD;
|
||||
cfg.ssb_config.scs_common.value = mu;
|
||||
fp.dl_CarrierFreq = 27524520000;
|
||||
fp.nr_band = 261;
|
||||
nr_init_frame_parms(&cfg, &fp);
|
||||
nr_dump_frame_parms(&fp);
|
||||
test_coherence_symbol_api(&fp);
|
||||
@@ -141,7 +139,6 @@ TEST(nr_frame_params, test_mu_1)
|
||||
cfg.cell_config.frame_duplex_type.value = TDD;
|
||||
cfg.ssb_config.scs_common.value = mu;
|
||||
fp.dl_CarrierFreq = 3600000000;
|
||||
fp.nr_band = 78;
|
||||
nr_init_frame_parms(&cfg, &fp);
|
||||
nr_dump_frame_parms(&fp);
|
||||
test_coherence_symbol_api(&fp);
|
||||
@@ -161,7 +158,6 @@ TEST(nr_frame_params, test_mu_0)
|
||||
cfg.cell_config.frame_duplex_type.value = TDD;
|
||||
cfg.ssb_config.scs_common.value = mu;
|
||||
fp.dl_CarrierFreq = 2600000000;
|
||||
fp.nr_band = 38;
|
||||
nr_init_frame_parms(&cfg, &fp);
|
||||
nr_dump_frame_parms(&fp);
|
||||
test_coherence_symbol_api(&fp);
|
||||
|
||||
@@ -173,8 +173,6 @@ struct NR_DL_FRAME_PARMS {
|
||||
uint8_t N_RBG;
|
||||
/// Total Number of Resource Block Groups SubSets: this is P
|
||||
uint8_t N_RBGS;
|
||||
/// NR Band
|
||||
uint16_t nr_band;
|
||||
/// DL carrier frequency
|
||||
uint64_t dl_CarrierFreq;
|
||||
/// UL carrier frequency
|
||||
|
||||
Reference in New Issue
Block a user