Fix UL/DL frequency compensation

master
Xavier Arteaga 3 years ago committed by Andre Puschmann
parent 06fbb58d70
commit 00a6e71f50

@ -419,9 +419,11 @@ phy_cfg_nr_default_t::phy_cfg_nr_default_t(const reference_cfg_t& reference_cfg)
if (duplex.mode == SRSRAN_DUPLEX_MODE_TDD) { if (duplex.mode == SRSRAN_DUPLEX_MODE_TDD) {
carrier.dl_center_frequency_hz = 3513.6e6; carrier.dl_center_frequency_hz = 3513.6e6;
carrier.ul_center_frequency_hz = 3513.6e6;
ssb.scs = srsran_subcarrier_spacing_30kHz; ssb.scs = srsran_subcarrier_spacing_30kHz;
} else { } else {
carrier.dl_center_frequency_hz = 881.5e6; carrier.dl_center_frequency_hz = 881.5e6;
carrier.ul_center_frequency_hz = 836.6e6;
ssb.scs = srsran_subcarrier_spacing_15kHz; ssb.scs = srsran_subcarrier_spacing_15kHz;
} }
carrier.ssb_center_freq_hz = carrier.dl_center_frequency_hz; carrier.ssb_center_freq_hz = carrier.dl_center_frequency_hz;

@ -135,7 +135,7 @@ int srsran_gnb_ul_set_carrier(srsran_gnb_ul_t* q, const srsran_carrier_nr_t* car
ofdm_cfg.rx_window_offset = GNB_UL_NR_FFT_WINDOW_OFFSET; ofdm_cfg.rx_window_offset = GNB_UL_NR_FFT_WINDOW_OFFSET;
ofdm_cfg.symbol_sz = srsran_min_symbol_sz_rb(carrier->nof_prb); ofdm_cfg.symbol_sz = srsran_min_symbol_sz_rb(carrier->nof_prb);
ofdm_cfg.keep_dc = true; ofdm_cfg.keep_dc = true;
ofdm_cfg.phase_compensation_hz = carrier->dl_center_frequency_hz; ofdm_cfg.phase_compensation_hz = carrier->ul_center_frequency_hz;
if (srsran_ofdm_rx_init_cfg(&q->fft, &ofdm_cfg) < SRSRAN_SUCCESS) { if (srsran_ofdm_rx_init_cfg(&q->fft, &ofdm_cfg) < SRSRAN_SUCCESS) {
return SRSRAN_ERROR; return SRSRAN_ERROR;

@ -72,7 +72,7 @@ int srsran_ue_ul_nr_set_carrier(srsran_ue_ul_nr_t* q, const srsran_carrier_nr_t*
fft_cfg.nof_prb = carrier->nof_prb; fft_cfg.nof_prb = carrier->nof_prb;
fft_cfg.symbol_sz = srsran_min_symbol_sz_rb(carrier->nof_prb); fft_cfg.symbol_sz = srsran_min_symbol_sz_rb(carrier->nof_prb);
fft_cfg.keep_dc = true; fft_cfg.keep_dc = true;
fft_cfg.phase_compensation_hz = carrier->dl_center_frequency_hz; fft_cfg.phase_compensation_hz = carrier->ul_center_frequency_hz;
if (srsran_ofdm_tx_init_cfg(&q->ifft, &fft_cfg) < SRSRAN_SUCCESS) { if (srsran_ofdm_tx_init_cfg(&q->ifft, &fft_cfg) < SRSRAN_SUCCESS) {
ERROR("Initiating OFDM"); ERROR("Initiating OFDM");
return SRSRAN_ERROR; return SRSRAN_ERROR;

Loading…
Cancel
Save