Introduced configuration of RU IF offset from configuration file
- the RU now supports IF equipment with custom FR1 TX/RX frequencies - this configuration parameter together with the if_freq parameter allows to set a custom IF RX frequency for the gNB - if the IF offset is not specified, legacy code applies
This commit is contained in:
+6
-2
@@ -1149,8 +1149,11 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
if (ru->if_frequency == 0) {
|
||||
cfg->tx_freq[i] = (double)fp->dl_CarrierFreq;
|
||||
cfg->rx_freq[i] = (double)fp->ul_CarrierFreq;
|
||||
}
|
||||
else {
|
||||
} else if (ru->if_freq_offset){
|
||||
cfg->tx_freq[i] = (double)(ru->if_frequency);
|
||||
cfg->rx_freq[i] = (double)(ru->if_frequency + ru->if_freq_offset);
|
||||
LOG_I(PHY, "Setting IF TX frequency to %lu Hz with IF RX frequency offset %d Hz\n", ru->if_frequency, ru->if_freq_offset);
|
||||
} else {
|
||||
cfg->tx_freq[i] = (double)ru->if_frequency;
|
||||
cfg->rx_freq[i] = (double)(ru->if_frequency+fp->ul_CarrierFreq-fp->dl_CarrierFreq);
|
||||
}
|
||||
@@ -2494,6 +2497,7 @@ void RCconfig_RU(void)
|
||||
RC.ru[j]->att_tx = *(RUParamList.paramarray[j][RU_ATT_TX_IDX].uptr);
|
||||
RC.ru[j]->att_rx = *(RUParamList.paramarray[j][RU_ATT_RX_IDX].uptr);
|
||||
RC.ru[j]->if_frequency = *(RUParamList.paramarray[j][RU_IF_FREQUENCY].u64ptr);
|
||||
RC.ru[j]->if_freq_offset = *(RUParamList.paramarray[j][RU_IF_FREQ_OFFSET].iptr);
|
||||
|
||||
if (config_isparamset(RUParamList.paramarray[j], RU_BF_WEIGHTS_LIST_IDX)) {
|
||||
RC.ru[j]->nb_bfw = RUParamList.paramarray[j][RU_BF_WEIGHTS_LIST_IDX].numelt;
|
||||
|
||||
@@ -624,6 +624,8 @@ typedef struct RU_t_s {
|
||||
int wakeup_L1_sleep_cnt_max;
|
||||
/// DL IF frequency in Hz
|
||||
uint64_t if_frequency;
|
||||
/// UL IF frequency offset to DL IF frequency in Hz
|
||||
int if_freq_offset;
|
||||
} RU_t;
|
||||
|
||||
|
||||
|
||||
@@ -96,6 +96,7 @@ typedef enum {
|
||||
#define CONFIG_STRING_RU_OTA_SYNC_ENABLE "ota_sync_enabled"
|
||||
#define CONFIG_STRING_RU_BF_WEIGHTS_LIST "bf_weights"
|
||||
#define CONFIG_STRING_RU_IF_FREQUENCY "if_freq"
|
||||
#define CONFIG_STRING_RU_IF_FREQ_OFFSET "if_offset"
|
||||
|
||||
#define RU_LOCAL_IF_NAME_IDX 0
|
||||
#define RU_LOCAL_ADDRESS_IDX 1
|
||||
@@ -124,6 +125,7 @@ typedef enum {
|
||||
#define RU_OTA_SYNC_ENABLE_IDX 24
|
||||
#define RU_BF_WEIGHTS_LIST_IDX 25
|
||||
#define RU_IF_FREQUENCY 26
|
||||
#define RU_IF_FREQ_OFFSET 27
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* RU configuration parameters */
|
||||
@@ -157,6 +159,7 @@ typedef enum {
|
||||
{CONFIG_STRING_RU_OTA_SYNC_ENABLE, NULL, 0, strptr:NULL, defstrval:"no", TYPE_STRING, 0}, \
|
||||
{CONFIG_STRING_RU_BF_WEIGHTS_LIST, NULL, 0, iptr:NULL, defintarrayval:DEFBFW, TYPE_INTARRAY, 0}, \
|
||||
{CONFIG_STRING_RU_IF_FREQUENCY, NULL, 0, u64ptr:NULL, defuintval:0, TYPE_UINT64, 0}, \
|
||||
{CONFIG_STRING_RU_IF_FREQ_OFFSET, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user