Commit 5d65ef2c authored by Thomas Schlichter's avatar Thomas Schlichter

NR_UE: correctly scale UL frequency offset (relevant for FDD)

parent ef2a2403
...@@ -86,16 +86,17 @@ void nr_rf_card_config_freq(openair0_config_t *openair0_cfg, ...@@ -86,16 +86,17 @@ void nr_rf_card_config_freq(openair0_config_t *openair0_cfg,
uint8_t cc_id = 0; uint8_t cc_id = 0;
PHY_VARS_NR_UE *ue = PHY_vars_UE_g[mod_id][cc_id]; PHY_VARS_NR_UE *ue = PHY_vars_UE_g[mod_id][cc_id];
int rf_chain = ue->rf_map.chain; int rf_chain = ue->rf_map.chain;
double freq_scale = (double)(dl_carrier + freq_offset) / dl_carrier;
for (int i = rf_chain; i < rf_chain + 4; i++) { for (int i = rf_chain; i < rf_chain + 4; i++) {
if (i < openair0_cfg->rx_num_channels) if (i < openair0_cfg->rx_num_channels)
openair0_cfg->rx_freq[i + rf_chain] = dl_carrier + freq_offset; openair0_cfg->rx_freq[i + rf_chain] = dl_carrier * freq_scale;
else else
openair0_cfg->rx_freq[i] = 0.0; openair0_cfg->rx_freq[i] = 0.0;
if (i<openair0_cfg->tx_num_channels) if (i<openair0_cfg->tx_num_channels)
openair0_cfg->tx_freq[i] = ul_carrier + freq_offset; openair0_cfg->tx_freq[i] = ul_carrier * freq_scale;
else else
openair0_cfg->tx_freq[i] = 0.0; openair0_cfg->tx_freq[i] = 0.0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment