diff --git a/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf b/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf index 7cc7a9e3f9..d5b1695d5c 100644 --- a/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf +++ b/ci-scripts/conf_files/gnb.sa.band261.u3.32prb.rfsim.conf @@ -21,7 +21,6 @@ gNBs = sib1_tda = 15; min_rxtxtime = 6; - beam_weights = [0]; // single SSB -> one analog beam servingCellConfigCommon = ( { @@ -179,6 +178,7 @@ MACRLCs = ({ set_analog_beamforming = 1; beam_duration = 1; beams_per_period = 1; + beam_weights = [0]; // single SSB -> one analog beam }); L1s = ( diff --git a/doc/analog_beamforming.md b/doc/analog_beamforming.md index 6bdb99b82d..3c695c5464 100644 --- a/doc/analog_beamforming.md +++ b/doc/analog_beamforming.md @@ -20,8 +20,7 @@ In the `MACRLC` section of configuration files, there are three new parameters: - `set_analog_beamforming` can be set to 1 or 0 to activate or desactivate analog beamforming (default value is 0) - `beam_duration` is the number of slots (currently minimum duration of a beam) the scheduler is tied to a beam (default value is 1) - `beams_per_period` is the number of concurrent beams the RU can handle in the beam duration (default value is 1) - -In the `gNBs` section of the configuration file, under the phyisical parameters, a vector field containing the set of beam indices to be provided by the OAI L1 to the RU is also required. This field is called `beam_weights`. In current implementation, the number of beam indices should be equal to the number of SSBs transmitted. +- `beam_weights` is a vector field containing the set of beam indices to be provided by the OAI L1 to the RU is also required. In current implementation, the number of beam indices should be equal to the number of SSBs transmitted. # Implementation in OAI scheduler diff --git a/openair2/GNB_APP/MACRLC_nr_paramdef.h b/openair2/GNB_APP/MACRLC_nr_paramdef.h index e682c559fa..c1382d7b70 100644 --- a/openair2/GNB_APP/MACRLC_nr_paramdef.h +++ b/openair2/GNB_APP/MACRLC_nr_paramdef.h @@ -76,6 +76,7 @@ #define CONFIG_STRING_MACRLC_ANALOG_BEAMFORMING "set_analog_beamforming" #define CONFIG_STRING_MACRLC_BEAM_DURATION "beam_duration" #define CONFIG_STRING_MACRLC_BEAMS_PERIOD "beams_per_period" +#define CONFIG_STRING_MACRLC_BEAM_WEIGHTS_LIST "beam_weights" #define CONFIG_STRING_MACRLC_PUSCH_RSSI_THRESHOLD "pusch_RSSI_Threshold" #define CONFIG_STRING_MACRLC_PUCCH_RSSI_THRESHOLD "pucch_RSSI_Threshold" @@ -143,6 +144,7 @@ {CONFIG_STRING_MACRLC_ANALOG_BEAMFORMING, HLP_MACRLC_AB, PARAMFLAG_BOOL, .u8ptr=NULL, .defintval=0, TYPE_UINT8, 0}, \ {CONFIG_STRING_MACRLC_BEAM_DURATION, HLP_MACRLC_BEAM_DURATION, 0, .u8ptr=NULL, .defintval=1, TYPE_UINT8, 0}, \ {CONFIG_STRING_MACRLC_BEAMS_PERIOD, HLP_MACRLC_BEAMS_PERIOD, 0, .u8ptr=NULL, .defintval=1, TYPE_UINT8, 0}, \ + {CONFIG_STRING_MACRLC_BEAM_WEIGHTS_LIST, NULL, 0, .iptr=NULL, .defintarrayval=0, TYPE_INTARRAY,0}, \ {CONFIG_STRING_MACRLC_PUSCH_RSSI_THRESHOLD, HLP_MACRLC_PUSCH_RSSI_THRESHOLD, \ 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \ {CONFIG_STRING_MACRLC_PUCCH_RSSI_THRESHOLD, HLP_MACRLC_PUCCH_RSSI_THRESHOLD, \ @@ -189,8 +191,9 @@ #define MACRLC_ANALOG_BEAMFORMING_IDX 36 #define MACRLC_ANALOG_BEAM_DURATION_IDX 37 #define MACRLC_ANALOG_BEAMS_PERIOD_IDX 38 -#define MACRLC_PUSCH_RSSI_THRES_IDX 39 -#define MACRLC_PUCCH_RSSI_THRES_IDX 40 +#define MACRLC_BEAMWEIGHTS_IDX 39 +#define MACRLC_PUSCH_RSSI_THRES_IDX 40 +#define MACRLC_PUCCH_RSSI_THRES_IDX 41 #define MACRLCPARAMS_CHECK { \ { .s5 = { NULL } }, \ @@ -232,6 +235,7 @@ { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ { .s5 = { NULL } }, \ + { .s5 = { NULL } }, \ { .s2 = { config_check_intrange, {-1280, 0}} }, /* PUSCH RSSI threshold range */ \ { .s2 = { config_check_intrange, {-1280, 0}} }, /* PUCCH RSSI threshold range */ \ } diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 4b34c3858d..aab1ca831c 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -1566,19 +1566,6 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) config.timer_config.n311, config.timer_config.t319); - if (config_isparamset(GNBParamList.paramarray[0], GNB_BEAMWEIGHTS_IDX)) { - int n = GNBParamList.paramarray[0][GNB_BEAMWEIGHTS_IDX].numelt; - AssertFatal(n % num_tx == 0, "Error! Number of beam input needs to be multiple of TX antennas\n"); - // each beam is described by a set of weights (one for each antenna) - // on the other hand in case of analog beamforming an index to the RU beam identifier is provided - config.nb_bfw[0] = num_tx; // number of tx antennas - config.nb_bfw[1] = n; // number of beams weights/indices - config.bw_list = malloc16_clear(n * sizeof(*config.bw_list)); - for (int b = 0; b < n; b++) { - config.bw_list[b] = GNBParamList.paramarray[0][GNB_BEAMWEIGHTS_IDX].iptr[b]; - } - } - // Construct default aggragation level list or read from config int uess_num_agg_level_candidates[NUM_PDCCH_AGG_LEVELS]; uess_num_agg_level_candidates[PDCCH_AGG_LEVEL1] = NR_SearchSpace__nrofCandidates__aggregationLevel1_n0; @@ -1711,6 +1698,22 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg) beam_info->beams_per_period = beams_per_period; beam_info->beam_allocation_size = -1; // to be initialized once we have information on frame configuration } + if (config_isparamset(MacRLC_ParamList.paramarray[j], MACRLC_BEAMWEIGHTS_IDX)) { + int n = MacRLC_ParamList.paramarray[j][MACRLC_BEAMWEIGHTS_IDX].numelt; + int num_beam = n; + if (!ab) { + AssertFatal(n % num_tx == 0, "Error! Number of beam input needs to be multiple of TX antennas\n"); + num_beam = n / num_tx; + } + // each beam is described by a set of weights (one for each antenna) + // in case of analog beamforming an index to the RU beam identifier is provided + // (one for each beam regardless of the number of antennas per beam) + config.nb_bfw[0] = num_tx; // number of tx antennas + config.nb_bfw[1] = num_beam; // number of beams weights/indices + config.bw_list = calloc_or_fail(n, sizeof(*config.bw_list)); + for (int b = 0; b < n; b++) + config.bw_list[b] = MacRLC_ParamList.paramarray[j][MACRLC_BEAMWEIGHTS_IDX].iptr[b]; + } // triggers also PHY initialization in case we have L1 via FAPI nr_mac_config_scc(RC.nrmac[j], scc, &config); } // for (j=0;j