Add Sidelink (SL) carrier frequency
1. Adding a "SL" frequency for Sidelink mode. The importance of this variable is to ensure that when we are in mode 1 (UE+UE+gNB), that the slot configuration and frequencies do not overlap. This SL frequency is important for rotation and allows us to utilize the OFDM modulation and demodulation functions that already exist in OAI. 2. Adding sl_mode to the command line for proper UE deployment when in SL mode. sl_mode can be set to 0, 1, or 2. sl_mode 0 indicates no-Sidelink at all, mode 1 is gNB, UE, and UE (3GPP defines mode numbers). sl_mode 2 indicated UE to UE communications with no gNB at all. 3. New functions for calculating the carrier frequency for SL mode.
This commit is contained in:
@@ -128,6 +128,7 @@ int dumpframe = 0;
|
||||
|
||||
uint64_t downlink_frequency[MAX_NUM_CCs][4];
|
||||
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
|
||||
uint64_t sidelink_frequency[MAX_NUM_CCs][4];
|
||||
int rx_input_level_dBm;
|
||||
|
||||
#if MAX_NUM_CCs == 1
|
||||
@@ -317,7 +318,7 @@ void init_openair0(void) {
|
||||
NR_DL_FRAME_PARMS *frame_parms = &PHY_vars_UE_g[0][0]->frame_parms;
|
||||
|
||||
for (card=0; card<MAX_CARDS; card++) {
|
||||
uint64_t dl_carrier, ul_carrier;
|
||||
uint64_t dl_carrier, ul_carrier, sl_carrier;
|
||||
openair0_cfg[card].configFilename = NULL;
|
||||
openair0_cfg[card].threequarter_fs = frame_parms->threequarter_fs;
|
||||
openair0_cfg[card].sample_rate = frame_parms->samples_per_subframe * 1e3;
|
||||
@@ -346,6 +347,12 @@ void init_openair0(void) {
|
||||
nr_get_carrier_frequencies(PHY_vars_UE_g[0][0], &dl_carrier, &ul_carrier);
|
||||
|
||||
nr_rf_card_config_freq(&openair0_cfg[card], ul_carrier, dl_carrier, freq_off);
|
||||
|
||||
if (get_softmodem_params()->sl_mode == 2) {
|
||||
nr_get_carrier_frequencies_sl(PHY_vars_UE_g[0][0], &sl_carrier);
|
||||
nr_rf_card_config_freq(&openair0_cfg[card], sl_carrier, sl_carrier, freq_off);
|
||||
}
|
||||
|
||||
nr_rf_card_config_gain(&openair0_cfg[card], rx_gain_off);
|
||||
|
||||
openair0_cfg[card].configFilename = get_softmodem_params()->rf_config_file;
|
||||
|
||||
Reference in New Issue
Block a user