Merge remote-tracking branch 'origin/reworking_BWP_configuration' into integration_2025_w37 (!3607)
Reworking BWP configuration This MR reworks the configuration via fail of additional BWPs. Moreover, it allows for a single BWP to be configured for a given UE at a given time (BWP switch possible only via reconfiguration). It also reworks PTRS configuration for consistency with the BWP one.
This commit is contained in:
@@ -146,18 +146,8 @@ gNBs =
|
||||
|
||||
);
|
||||
|
||||
servingCellConfigDedicated = ({
|
||||
dl_bwp-Id_1 = 1;
|
||||
dl_bwp1_locationAndBandwidth = 28875; # RBstart=0, L=106 (275*(L-1))+RBstart
|
||||
dl_bwp1_subcarrierSpacing = 1;
|
||||
firstActiveDownlinkBWP-Id = 1;
|
||||
defaultDownlinkBWP-Id = 1;
|
||||
ul_bwp-Id_1 = 1;
|
||||
ul_bwp1_locationAndBandwidth = 28875; # RBstart=0, L=106 (275*(L-1))+RBstart
|
||||
ul_bwp1_subcarrierSpacing = 1;
|
||||
firstActiveUplinkBWP-Id = 1;
|
||||
});
|
||||
|
||||
first_active_bwp = 1;
|
||||
bwp_list = ({ scs = 1; bwpStart = 0; bwpSize = 106;});
|
||||
|
||||
# ------- SCTP definitions
|
||||
SCTP :
|
||||
|
||||
@@ -145,64 +145,10 @@ gNBs =
|
||||
|
||||
);
|
||||
|
||||
# Dedicated Serving Cell Configuration
|
||||
servingCellConfigDedicated = ({
|
||||
# BWP-Downlink
|
||||
# BWP 1 Configuration
|
||||
dl_bwp-Id_1 = 1;
|
||||
dl_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_bwp1_subcarrierSpacing = 1;
|
||||
|
||||
# BWP 2 Configuration
|
||||
dl_bwp-Id_2 = 2;
|
||||
dl_bwp2_locationAndBandwidth = 13750; // RBstart=0, L=51 (20 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_bwp2_subcarrierSpacing = 1;
|
||||
|
||||
# BWP 3 Configuration
|
||||
dl_bwp-Id_3 = 3;
|
||||
dl_bwp3_locationAndBandwidth = 6325; // RBstart=0, L=24 (10 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_bwp3_subcarrierSpacing = 1;
|
||||
|
||||
firstActiveDownlinkBWP-Id = 1; #BWP-Id
|
||||
defaultDownlinkBWP-Id = 1; #BWP-Id
|
||||
|
||||
# bwp-InactivityTimer ENUMERATED {ms2, ms3, ms4, ms5, ms6, ms8, ms10, ms20, ms30,
|
||||
# ms40,ms50, ms60, ms80,ms100, ms200,ms300, ms500,
|
||||
# ms750, ms1280, ms1920, ms2560, spare10, spare9, spare8,
|
||||
# spare7, spare6, spare5, spare4, spare3, spare2, spare1 }
|
||||
|
||||
# UplinkConfig
|
||||
# BWP-Uplink
|
||||
# BWP 1 Configuration
|
||||
ul_bwp-Id_1 = 1;
|
||||
ul_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_bwp1_subcarrierSpacing = 1;
|
||||
|
||||
# BWP 2 Configuration
|
||||
ul_bwp-Id_2 = 2;
|
||||
ul_bwp2_locationAndBandwidth = 13750; // RBstart=0, L=51 (20 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_bwp2_subcarrierSpacing = 1;
|
||||
|
||||
# BWP 3 Configuration
|
||||
ul_bwp-Id_3 = 3;
|
||||
ul_bwp3_locationAndBandwidth = 6325; // RBstart=0, L=24 (10 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
ul_bwp3_subcarrierSpacing = 1;
|
||||
|
||||
firstActiveUplinkBWP-Id = 1; #BWP-Id
|
||||
}
|
||||
);
|
||||
first_active_bwp = 1;
|
||||
bwp_list = ({ scs = 1; bwpStart = 0; bwpSize = 106;},
|
||||
{ scs = 1; bwpStart = 0; bwpSize = 51;},
|
||||
{ scs = 1; bwpStart = 0; bwpSize = 24;});
|
||||
|
||||
|
||||
# ------- SCTP definitions
|
||||
|
||||
+10
-17
@@ -17,35 +17,28 @@ A UE can be configured with a set of 4 BWPs in uplink (UL) and downlink (DL) dir
|
||||
|
||||
A maximum of 4 dedicated BWPs can be configured for a UE.
|
||||
|
||||
To configure multiple BWPs, add the following parameters to the gNB configuration file under "servingCellConfigDedicated":
|
||||
To configure multiple BWPs, add the following parameters in the physical parameters section:
|
||||
|
||||
## Setup of the Configuration files ##
|
||||
|
||||
In the configuration file you have the option to select the 1st active BWP, the RIV and SCS of each BWP in the following way (example with 3 additional BWPs):
|
||||
```
|
||||
firstActiveDownlinkBWP-Id = 1; #BWP-Id
|
||||
defaultDownlinkBWP-Id = 1; #BWP-Id
|
||||
firstActiveUplinkBWP-Id = 1; #BWP-Id
|
||||
first_active_bwp = 1;
|
||||
bwp_list = ({ scs = 1; bwpStart = 0; bwpSize = 106;},
|
||||
{ scs = 1; bwpStart = 0; bwpSize = 51;},
|
||||
{ scs = 1; bwpStart = 0; bwpSize = 24;});
|
||||
```
|
||||
|
||||
Each dedicated BWP must have:
|
||||
```
|
||||
# BWP 1 Configuration
|
||||
dl_bwp-Id_1 = 1;
|
||||
dl_bwp1_locationAndBandwidth = 28875; // RBstart=0, L=106 (40 MHz BW)
|
||||
# subcarrierSpacing
|
||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||
dl_bwp1_subcarrierSpacing = 1;
|
||||
```
|
||||
|
||||
Find these parameters in this configuration file: "targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf"
|
||||
This example configures 3 additional BWPs, with IDs from 1 to 3. Find these parameters in this configuration file: "ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf"
|
||||
|
||||
# Testing gNB and UE in RF simulator
|
||||
|
||||
## gNB command:
|
||||
```
|
||||
sudo ./nr-softmodem -O ../../../targets/PROJECTS/GENERIC-NR-5GC/CONF/gnb.sa.band78.fr1.106PRB.usrpb210.conf --gNBs.[0].min_rxtxtime 6 --rfsim
|
||||
sudo ./nr-softmodem -O ../../../ci-scripts/conf_files/gnb.sa.band78.106prb.rfsim.neighbour.conf --rfsim --rfsimulator.serveraddr server
|
||||
```
|
||||
|
||||
## UE command:
|
||||
```
|
||||
sudo ./nr-uesoftmodem -r 106 --numerology 1 --band 78 -C 3619200000 --rfsim --uicc0.imsi 208990000000001 --rfsimulator.serveraddr 127.0.0.1
|
||||
sudo ./nr-uesoftmodem -C 3319680000 -r 106 --numerology 1 --ssb 516 --band 78 --rfsim --rfsimulator.serveraddr 127.0.0.1
|
||||
```
|
||||
|
||||
@@ -701,6 +701,8 @@ printf("%d\n", slot);
|
||||
.minRXTXTIME = 6,
|
||||
.do_CSIRS = 0,
|
||||
.do_SRS = 0,
|
||||
.num_dlharq = 16,
|
||||
.num_ulharq = 16,
|
||||
.maxMIMO_layers = g_nrOfLayers,
|
||||
.force_256qam_off = false,
|
||||
.timer_config.sr_ProhibitTimer = 0,
|
||||
@@ -743,7 +745,7 @@ printf("%d\n", slot);
|
||||
RC.nb_nr_mac_CC = (int*)malloc(RC.nb_nr_macrlc_inst*sizeof(int));
|
||||
for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
|
||||
RC.nb_nr_mac_CC[i] = 1;
|
||||
mac_top_init_gNB(ngran_gNB, scc, NULL, &conf, &rlc_config);
|
||||
mac_top_init_gNB(ngran_gNB, scc, &conf, &rlc_config);
|
||||
gNB_mac = RC.nrmac[0];
|
||||
nr_mac_config_scc(RC.nrmac[0], scc, &conf);
|
||||
|
||||
@@ -791,11 +793,6 @@ printf("%d\n", slot);
|
||||
NR_ServingCellConfigCommon_t *scc = secondaryCellGroup->spCellConfig->reconfigurationWithSync->spCellConfigCommon;
|
||||
*/
|
||||
|
||||
NR_ServingCellConfig_t *scd = calloc(1,sizeof(*scd));
|
||||
prepare_scd(scd);
|
||||
/* removes unnecessary BWPs, if any */
|
||||
fix_scd(scd);
|
||||
|
||||
gNB->ap_N1 = pdsch_AntennaPorts.N1;
|
||||
gNB->ap_N2 = pdsch_AntennaPorts.N2;
|
||||
gNB->ap_XP = pdsch_AntennaPorts.XP;
|
||||
@@ -806,7 +803,7 @@ printf("%d\n", slot);
|
||||
prepare_sim_uecap(UE_Capability_nr, scc, mu, N_RB_DL, g_mcsTableIdx, 0);
|
||||
rnti_t rnti = 0x1234;
|
||||
int uid = 0;
|
||||
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, uid);
|
||||
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, UE_Capability_nr, 0, 1, &conf, uid);
|
||||
secondaryCellGroup->spCellConfig->reconfigurationWithSync = get_reconfiguration_with_sync(rnti, uid, scc);
|
||||
|
||||
/* -U option modify DMRS */
|
||||
|
||||
@@ -658,6 +658,8 @@ int main(int argc, char *argv[])
|
||||
.minRXTXTIME = 0,
|
||||
.do_CSIRS = 0,
|
||||
.do_SRS = 0,
|
||||
.num_dlharq = 16,
|
||||
.num_ulharq = 16,
|
||||
.force_256qam_off = false,
|
||||
.timer_config.sr_ProhibitTimer = 0,
|
||||
.timer_config.sr_TransMax = 64,
|
||||
@@ -698,19 +700,14 @@ int main(int argc, char *argv[])
|
||||
RC.nb_nr_mac_CC = (int*)malloc(RC.nb_nr_macrlc_inst*sizeof(int));
|
||||
for (i = 0; i < RC.nb_nr_macrlc_inst; i++)
|
||||
RC.nb_nr_mac_CC[i] = 1;
|
||||
mac_top_init_gNB(ngran_gNB, scc, NULL /* scd will be updated further below */, &conf, &rlc_config);
|
||||
mac_top_init_gNB(ngran_gNB, scc, &conf, &rlc_config);
|
||||
nr_mac_config_scc(RC.nrmac[0], scc, &conf);
|
||||
|
||||
NR_ServingCellConfig_t *scd = calloc(1,sizeof(NR_ServingCellConfig_t));
|
||||
prepare_scd(scd);
|
||||
/* removes unnecessary BWPs, if any */
|
||||
fix_scd(scd);
|
||||
|
||||
NR_UE_NR_Capability_t* UE_Capability_nr = CALLOC(1,sizeof(NR_UE_NR_Capability_t));
|
||||
prepare_sim_uecap(UE_Capability_nr, scc, mu, N_RB_UL, 0, mcs_table);
|
||||
rnti_t rnti = 0x1234;
|
||||
int uid = 0;
|
||||
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, scd, UE_Capability_nr, 0, 1, &conf, uid);
|
||||
NR_CellGroupConfig_t *secondaryCellGroup = get_default_secondaryCellGroup(scc, UE_Capability_nr, 0, 1, &conf, uid);
|
||||
secondaryCellGroup->spCellConfig->reconfigurationWithSync = get_reconfiguration_with_sync(rnti, uid, scc);
|
||||
|
||||
NR_BCCH_BCH_Message_t *mib = get_new_MIB_NR(scc);
|
||||
|
||||
@@ -136,53 +136,6 @@
|
||||
#define GNB_CONFIG_STRING_TA_COMMONDRIFT "ta-CommonDrift-r17"
|
||||
|
||||
#define CARRIERBANDWIDTH_OKVALUES {11,18,24,25,31,32,38,51,52,65,66,78,79,93,106,107,121,132,133,135,160,162,189,216,217,245,264,270,273}
|
||||
|
||||
/* Serving Cell Config Dedicated */
|
||||
#define GNB_CONFIG_STRING_SERVINGCELLCONFIGDEDICATED "servingCellConfigDedicated"
|
||||
#define GNB_CONFIG_STRING_DLPTRSFREQDENSITY0_0 "dl_ptrsFreqDensity0_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSFREQDENSITY1_0 "dl_ptrsFreqDensity1_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSTIMEDENSITY0_0 "dl_ptrsTimeDensity0_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSTIMEDENSITY1_0 "dl_ptrsTimeDensity1_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSTIMEDENSITY2_0 "dl_ptrsTimeDensity2_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSEPRERATIO_0 "dl_ptrsEpreRatio_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSREOFFSET_0 "dl_ptrsReOffset_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSFREQDENSITY0_0 "ul_ptrsFreqDensity0_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSFREQDENSITY1_0 "ul_ptrsFreqDensity1_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSTIMEDENSITY0_0 "ul_ptrsTimeDensity0_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSTIMEDENSITY1_0 "ul_ptrsTimeDensity1_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSTIMEDENSITY2_0 "ul_ptrsTimeDensity2_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSREOFFSET_0 "ul_ptrsReOffset_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSMAXPORTS_0 "ul_ptrsMaxPorts_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSPOWER_0 "ul_ptrsPower_0"
|
||||
|
||||
#define GNB_CONFIG_STRING_DLBWP1_ID "dl_bwp-Id_1"
|
||||
#define GNB_CONFIG_STRING_DLBWP2_ID "dl_bwp-Id_2"
|
||||
#define GNB_CONFIG_STRING_DLBWP3_ID "dl_bwp-Id_3"
|
||||
#define GNB_CONFIG_STRING_DLBWP4_ID "dl_bwp-Id_4"
|
||||
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP1 "dl_bwp1_locationAndBandwidth"
|
||||
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP2 "dl_bwp2_locationAndBandwidth"
|
||||
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP3 "dl_bwp3_locationAndBandwidth"
|
||||
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP4 "dl_bwp4_locationAndBandwidth"
|
||||
#define GNB_CONFIG_STRING_SCS_DLBWP1 "dl_bwp1_subcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_SCS_DLBWP2 "dl_bwp2_subcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_SCS_DLBWP3 "dl_bwp3_subcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_SCS_DLBWP4 "dl_bwp4_subcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_FIRSTACTIVEDLBWP_ID "firstActiveDownlinkBWP-Id"
|
||||
#define GNB_CONFIG_STRING_DEFAULTDLBWP_ID "defaultDownlinkBWP-Id"
|
||||
#define GNB_CONFIG_STRING_ULBWP1_ID "ul_bwp-Id_1"
|
||||
#define GNB_CONFIG_STRING_ULBWP2_ID "ul_bwp-Id_2"
|
||||
#define GNB_CONFIG_STRING_ULBWP3_ID "ul_bwp-Id_3"
|
||||
#define GNB_CONFIG_STRING_ULBWP4_ID "ul_bwp-Id_4"
|
||||
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP1 "ul_bwp1_locationAndBandwidth"
|
||||
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP2 "ul_bwp2_locationAndBandwidth"
|
||||
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP3 "ul_bwp3_locationAndBandwidth"
|
||||
#define GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP4 "ul_bwp4_locationAndBandwidth"
|
||||
#define GNB_CONFIG_STRING_SCS_ULBWP1 "ul_bwp1_subcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_SCS_ULBWP2 "ul_bwp2_subcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_SCS_ULBWP3 "ul_bwp3_subcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_SCS_ULBWP4 "ul_bwp4_subcarrierSpacing"
|
||||
#define GNB_CONFIG_STRING_FIRSTACTIVEULBWP_ID "firstActiveUplinkBWP-Id"
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
@@ -272,53 +225,6 @@
|
||||
{GNB_CONFIG_STRING_NROFUPLINKSLOTS2,NULL, 0,.i64ptr=&pattern2.nrofUplinkSlots,.defint64val=-1,TYPE_INT64,0},\
|
||||
{GNB_CONFIG_STRING_NROFUPLINKSYMBOLS2,NULL, 0,.i64ptr=&pattern2.nrofUplinkSymbols,.defint64val=-1,TYPE_INT64,0}}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* Serving Cell Config Dedicated configuration parameters */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#define SCDPARAMS_DESC(scd) { \
|
||||
{GNB_CONFIG_STRING_DLPTRSFREQDENSITY0_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->frequencyDensity->list.array[0],.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSFREQDENSITY1_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->frequencyDensity->list.array[1],.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY0_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->timeDensity->list.array[0],.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY1_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->timeDensity->list.array[1],.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY2_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->timeDensity->list.array[2],.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSEPRERATIO_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->epre_Ratio,.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSREOFFSET_0,NULL,0,.i64ptr=scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->phaseTrackingRS->choice.setup->resourceElementOffset,.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSFREQDENSITY0_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->frequencyDensity->list.array[0],.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSFREQDENSITY1_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->frequencyDensity->list.array[1],.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY0_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[0],.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY1_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[1],.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY2_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[2],.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSREOFFSET_0,NULL,0,.i64ptr=scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->resourceElementOffset,.defint64val=-1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSMAXPORTS_0,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->maxNrofPorts,.defint64val=0,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSPOWER_0,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup->transformPrecoderDisabled->ptrs_Power,.defint64val=0,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_FIRSTACTIVEDLBWP_ID,NULL,0,.i64ptr=scd->firstActiveDownlinkBWP_Id,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_FIRSTACTIVEULBWP_ID,NULL,0,.i64ptr=scd->uplinkConfig->firstActiveUplinkBWP_Id,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DLBWP1_ID,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Id,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DLBWP2_ID,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Id,.defint64val=2,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DLBWP3_ID,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Id,.defint64val=3,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DLBWP4_ID,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Id,.defint64val=4,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_SCS_DLBWP1,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_SCS_DLBWP2,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_SCS_DLBWP3,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_SCS_DLBWP4,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP1,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP2,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP3,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_DLBWP4,NULL,0,.i64ptr=&scd->downlinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULBWP1_ID,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Id,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULBWP2_ID,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Id,.defint64val=2,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULBWP3_ID,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Id,.defint64val=3,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_ULBWP4_ID,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Id,.defint64val=4,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_SCS_ULBWP1,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_SCS_ULBWP2,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_SCS_ULBWP3,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_SCS_ULBWP4,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.subcarrierSpacing,.defint64val=1,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP1,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP2,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[1]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP3,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[2]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_LOCATIONANDBANDWIDTH_ULBWP4,NULL,0,.i64ptr=&scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[3]->bwp_Common->genericParameters.locationAndBandwidth,.defint64val=0,TYPE_INT64,0}, \
|
||||
{GNB_CONFIG_STRING_DEFAULTDLBWP_ID,NULL,0,.i64ptr=scd->defaultDownlinkBWP_Id,.defint64val=0,TYPE_INT64,0}}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* Serving Cell Config Common configuration parameters to apply in RA 2-Step */
|
||||
|
||||
+78
-265
@@ -661,233 +661,6 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc, uint64_t ssbmap)
|
||||
}
|
||||
}
|
||||
|
||||
/* Function to allocate dedicated serving cell config strutures */
|
||||
void prepare_scd(NR_ServingCellConfig_t *scd) {
|
||||
// Allocate downlink structures
|
||||
scd->downlinkBWP_ToAddModList = calloc_or_fail(1, sizeof(*scd->downlinkBWP_ToAddModList));
|
||||
scd->uplinkConfig = calloc_or_fail(1, sizeof(*scd->uplinkConfig));
|
||||
scd->uplinkConfig->uplinkBWP_ToAddModList = calloc_or_fail(1, sizeof(*scd->uplinkConfig->uplinkBWP_ToAddModList));
|
||||
scd->bwp_InactivityTimer = calloc_or_fail(1, sizeof(*scd->bwp_InactivityTimer));
|
||||
scd->uplinkConfig->firstActiveUplinkBWP_Id = calloc_or_fail(1, sizeof(*scd->uplinkConfig->firstActiveUplinkBWP_Id));
|
||||
scd->firstActiveDownlinkBWP_Id = calloc_or_fail(1, sizeof(*scd->firstActiveDownlinkBWP_Id));
|
||||
*scd->firstActiveDownlinkBWP_Id = 1;
|
||||
*scd->uplinkConfig->firstActiveUplinkBWP_Id = 1;
|
||||
scd->defaultDownlinkBWP_Id = calloc_or_fail(1, sizeof(*scd->defaultDownlinkBWP_Id));
|
||||
*scd->defaultDownlinkBWP_Id = 0;
|
||||
|
||||
for (int j = 0; j < NR_MAX_NUM_BWP; j++) {
|
||||
|
||||
// Downlink bandwidth part
|
||||
NR_BWP_Downlink_t *bwp = calloc_or_fail(1, sizeof(*bwp));
|
||||
bwp->bwp_Id = j+1;
|
||||
|
||||
// Allocate downlink dedicated bandwidth part and PDSCH structures
|
||||
bwp->bwp_Common = calloc_or_fail(1, sizeof(*bwp->bwp_Common));
|
||||
bwp->bwp_Common->pdcch_ConfigCommon = calloc_or_fail(1, sizeof(*bwp->bwp_Common->pdcch_ConfigCommon));
|
||||
bwp->bwp_Common->pdsch_ConfigCommon = calloc_or_fail(1, sizeof(*bwp->bwp_Common->pdsch_ConfigCommon));
|
||||
bwp->bwp_Dedicated = calloc_or_fail(1, sizeof(*bwp->bwp_Dedicated));
|
||||
bwp->bwp_Dedicated->pdsch_Config = calloc_or_fail(1, sizeof(*bwp->bwp_Dedicated->pdsch_Config));
|
||||
struct NR_SetupRelease_PDSCH_Config *pdsch_Config = bwp->bwp_Dedicated->pdsch_Config;
|
||||
pdsch_Config->present = NR_SetupRelease_PDSCH_Config_PR_setup;
|
||||
pdsch_Config->choice.setup = calloc_or_fail(1, sizeof(*pdsch_Config->choice.setup));
|
||||
struct NR_PDSCH_Config *pc_setup = pdsch_Config->choice.setup;
|
||||
pc_setup->dmrs_DownlinkForPDSCH_MappingTypeA = calloc_or_fail(1, sizeof(*pc_setup->dmrs_DownlinkForPDSCH_MappingTypeA));
|
||||
struct NR_SetupRelease_DMRS_DownlinkConfig *typeA = pc_setup->dmrs_DownlinkForPDSCH_MappingTypeA;
|
||||
typeA->present = NR_SetupRelease_DMRS_DownlinkConfig_PR_setup;
|
||||
|
||||
// Allocate DL DMRS and PTRS configuration
|
||||
typeA->choice.setup = calloc_or_fail(1, sizeof(*typeA->choice.setup));
|
||||
NR_DMRS_DownlinkConfig_t *NR_DMRS_DownlinkCfg = typeA->choice.setup;
|
||||
NR_DMRS_DownlinkCfg->phaseTrackingRS = calloc_or_fail(1, sizeof(*NR_DMRS_DownlinkCfg->phaseTrackingRS));
|
||||
NR_DMRS_DownlinkCfg->phaseTrackingRS->present = NR_SetupRelease_PTRS_DownlinkConfig_PR_setup;
|
||||
NR_DMRS_DownlinkCfg->phaseTrackingRS->choice.setup =
|
||||
calloc_or_fail(1, sizeof(*NR_DMRS_DownlinkCfg->phaseTrackingRS->choice.setup));
|
||||
NR_PTRS_DownlinkConfig_t *NR_PTRS_DownlinkCfg = NR_DMRS_DownlinkCfg->phaseTrackingRS->choice.setup;
|
||||
NR_PTRS_DownlinkCfg->frequencyDensity = calloc_or_fail(1, sizeof(*NR_PTRS_DownlinkCfg->frequencyDensity));
|
||||
for (int i=0;i<2;i++) {
|
||||
long *a = calloc_or_fail(1, sizeof(*a));
|
||||
asn1cSeqAdd(&NR_PTRS_DownlinkCfg->frequencyDensity->list, a);
|
||||
}
|
||||
NR_PTRS_DownlinkCfg->timeDensity = calloc_or_fail(1, sizeof(*NR_PTRS_DownlinkCfg->timeDensity));
|
||||
for (int i=0;i<3;i++) {
|
||||
long *dl_mcs = calloc_or_fail(1, sizeof(*dl_mcs));
|
||||
asn1cSeqAdd(&NR_PTRS_DownlinkCfg->timeDensity->list, dl_mcs);
|
||||
}
|
||||
NR_PTRS_DownlinkCfg->epre_Ratio = calloc_or_fail(1, sizeof(*NR_PTRS_DownlinkCfg->epre_Ratio));
|
||||
NR_PTRS_DownlinkCfg->resourceElementOffset = calloc_or_fail(1, sizeof(*NR_PTRS_DownlinkCfg->resourceElementOffset));
|
||||
*NR_PTRS_DownlinkCfg->resourceElementOffset = 0;
|
||||
asn1cSeqAdd(&scd->downlinkBWP_ToAddModList->list,bwp);
|
||||
|
||||
// Allocate uplink structures
|
||||
|
||||
NR_PUSCH_Config_t *pusch_Config = calloc_or_fail(1, sizeof(*pusch_Config));
|
||||
|
||||
// Allocate UL DMRS and PTRS structures
|
||||
pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB = calloc_or_fail(1, sizeof(*pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB));
|
||||
pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->present = NR_SetupRelease_DMRS_UplinkConfig_PR_setup;
|
||||
pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup =
|
||||
calloc_or_fail(1, sizeof(*pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup));
|
||||
NR_DMRS_UplinkConfig_t *NR_DMRS_UplinkConfig = pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup;
|
||||
NR_DMRS_UplinkConfig->phaseTrackingRS = calloc_or_fail(1, sizeof(*NR_DMRS_UplinkConfig->phaseTrackingRS));
|
||||
NR_DMRS_UplinkConfig->phaseTrackingRS->present = NR_SetupRelease_PTRS_UplinkConfig_PR_setup;
|
||||
NR_DMRS_UplinkConfig->phaseTrackingRS->choice.setup =
|
||||
calloc_or_fail(1, sizeof(*NR_DMRS_UplinkConfig->phaseTrackingRS->choice.setup));
|
||||
NR_PTRS_UplinkConfig_t *NR_PTRS_UplinkConfig = NR_DMRS_UplinkConfig->phaseTrackingRS->choice.setup;
|
||||
NR_PTRS_UplinkConfig->transformPrecoderDisabled = calloc_or_fail(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled));
|
||||
NR_PTRS_UplinkConfig->transformPrecoderDisabled->frequencyDensity =
|
||||
calloc_or_fail(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled->frequencyDensity));
|
||||
for (int i=0;i<2;i++) {
|
||||
long *n_rbs = calloc_or_fail(1, sizeof(*n_rbs));
|
||||
asn1cSeqAdd(&NR_PTRS_UplinkConfig->transformPrecoderDisabled->frequencyDensity->list, n_rbs);
|
||||
}
|
||||
NR_PTRS_UplinkConfig->transformPrecoderDisabled->timeDensity =
|
||||
calloc_or_fail(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled->timeDensity));
|
||||
for (int i = 0; i < 3; i++) {
|
||||
long *ptrs_mcs = calloc_or_fail(1, sizeof(*ptrs_mcs));
|
||||
asn1cSeqAdd(&NR_PTRS_UplinkConfig->transformPrecoderDisabled->timeDensity->list, ptrs_mcs);
|
||||
}
|
||||
NR_PTRS_UplinkConfig->transformPrecoderDisabled->resourceElementOffset =
|
||||
calloc_or_fail(1, sizeof(*NR_PTRS_UplinkConfig->transformPrecoderDisabled->resourceElementOffset));
|
||||
*NR_PTRS_UplinkConfig->transformPrecoderDisabled->resourceElementOffset = 0;
|
||||
|
||||
// UL bandwidth part
|
||||
NR_BWP_Uplink_t *ubwp = calloc_or_fail(1, sizeof(*ubwp));
|
||||
ubwp->bwp_Id = j+1;
|
||||
ubwp->bwp_Common = calloc_or_fail(1, sizeof(*ubwp->bwp_Common));
|
||||
ubwp->bwp_Dedicated = calloc_or_fail(1, sizeof(*ubwp->bwp_Dedicated));
|
||||
|
||||
ubwp->bwp_Dedicated->pusch_Config = calloc_or_fail(1, sizeof(*ubwp->bwp_Dedicated->pusch_Config));
|
||||
ubwp->bwp_Dedicated->pusch_Config->present = NR_SetupRelease_PUSCH_Config_PR_setup;
|
||||
ubwp->bwp_Dedicated->pusch_Config->choice.setup = pusch_Config;
|
||||
|
||||
asn1cSeqAdd(&scd->uplinkConfig->uplinkBWP_ToAddModList->list,ubwp);
|
||||
}
|
||||
}
|
||||
|
||||
/* This function checks dedicated serving cell configuration and performs fixes as needed */
|
||||
void fix_scd(NR_ServingCellConfig_t *scd) {
|
||||
|
||||
// Remove unused BWPs
|
||||
int b = 0;
|
||||
while (b<scd->downlinkBWP_ToAddModList->list.count) {
|
||||
if (scd->downlinkBWP_ToAddModList->list.array[b]->bwp_Common->genericParameters.locationAndBandwidth == 0) {
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_BWP_Downlink, scd->downlinkBWP_ToAddModList->list.array[b]);
|
||||
asn_sequence_del(&scd->downlinkBWP_ToAddModList->list,b,1);
|
||||
} else {
|
||||
b++;
|
||||
}
|
||||
}
|
||||
|
||||
b = 0;
|
||||
while (b<scd->uplinkConfig->uplinkBWP_ToAddModList->list.count) {
|
||||
if (scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[b]->bwp_Common->genericParameters.locationAndBandwidth == 0) {
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_BWP_Uplink, scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[b]);
|
||||
asn_sequence_del(&scd->uplinkConfig->uplinkBWP_ToAddModList->list,b,1);
|
||||
} else {
|
||||
b++;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for DL PTRS parameters validity
|
||||
for (int bwp_i = 0 ; bwp_i<scd->downlinkBWP_ToAddModList->list.count; bwp_i++) {
|
||||
|
||||
NR_DMRS_DownlinkConfig_t *dmrs_dl_config = scd->downlinkBWP_ToAddModList->list.array[bwp_i]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup;
|
||||
|
||||
if (dmrs_dl_config->phaseTrackingRS) {
|
||||
// If any of the frequencyDensity values are not set or are out of bounds, PTRS is assumed to be not present
|
||||
for (int i = dmrs_dl_config->phaseTrackingRS->choice.setup->frequencyDensity->list.count - 1; i >= 0; i--) {
|
||||
if ((*dmrs_dl_config->phaseTrackingRS->choice.setup->frequencyDensity->list.array[i] < 1)
|
||||
|| (*dmrs_dl_config->phaseTrackingRS->choice.setup->frequencyDensity->list.array[i] > 276)) {
|
||||
LOG_I(GNB_APP, "DL PTRS frequencyDensity %d not set. Assuming PTRS not present! \n", i);
|
||||
free(dmrs_dl_config->phaseTrackingRS);
|
||||
dmrs_dl_config->phaseTrackingRS = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dmrs_dl_config->phaseTrackingRS) {
|
||||
// If any of the timeDensity values are not set or are out of bounds, PTRS is assumed to be not present
|
||||
for (int i = dmrs_dl_config->phaseTrackingRS->choice.setup->timeDensity->list.count - 1; i >= 0; i--) {
|
||||
if ((*dmrs_dl_config->phaseTrackingRS->choice.setup->timeDensity->list.array[i] < 0)
|
||||
|| (*dmrs_dl_config->phaseTrackingRS->choice.setup->timeDensity->list.array[i] > 29)) {
|
||||
LOG_I(GNB_APP, "DL PTRS timeDensity %d not set. Assuming PTRS not present! \n", i);
|
||||
free(dmrs_dl_config->phaseTrackingRS);
|
||||
dmrs_dl_config->phaseTrackingRS = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dmrs_dl_config->phaseTrackingRS) {
|
||||
if (*dmrs_dl_config->phaseTrackingRS->choice.setup->resourceElementOffset > 2) {
|
||||
LOG_I(GNB_APP, "Freeing DL PTRS resourceElementOffset \n");
|
||||
free(dmrs_dl_config->phaseTrackingRS->choice.setup->resourceElementOffset);
|
||||
dmrs_dl_config->phaseTrackingRS->choice.setup->resourceElementOffset = NULL;
|
||||
}
|
||||
if (*dmrs_dl_config->phaseTrackingRS->choice.setup->epre_Ratio > 1) {
|
||||
LOG_I(GNB_APP, "Freeing DL PTRS epre_Ratio \n");
|
||||
free(dmrs_dl_config->phaseTrackingRS->choice.setup->epre_Ratio);
|
||||
dmrs_dl_config->phaseTrackingRS->choice.setup->epre_Ratio = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check for UL PTRS parameters validity
|
||||
for (int bwp_i = 0 ; bwp_i<scd->uplinkConfig->uplinkBWP_ToAddModList->list.count; bwp_i++) {
|
||||
|
||||
NR_DMRS_UplinkConfig_t *dmrs_ul_config = scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[bwp_i]->bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup;
|
||||
|
||||
if (dmrs_ul_config->phaseTrackingRS) {
|
||||
// If any of the frequencyDensity values are not set or are out of bounds, PTRS is assumed to be not present
|
||||
for (int i = dmrs_ul_config->phaseTrackingRS->choice.setup->transformPrecoderDisabled->frequencyDensity->list.count-1; i >= 0; i--) {
|
||||
if ((*dmrs_ul_config->phaseTrackingRS->choice.setup->transformPrecoderDisabled->frequencyDensity->list.array[i] < 1)
|
||||
|| (*dmrs_ul_config->phaseTrackingRS->choice.setup->transformPrecoderDisabled->frequencyDensity->list.array[i] > 276)) {
|
||||
LOG_I(GNB_APP, "UL PTRS frequencyDensity %d not set. Assuming PTRS not present! \n", i);
|
||||
free(dmrs_ul_config->phaseTrackingRS);
|
||||
dmrs_ul_config->phaseTrackingRS = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dmrs_ul_config->phaseTrackingRS) {
|
||||
// If any of the timeDensity values are not set or are out of bounds, PTRS is assumed to be not present
|
||||
for (int i = dmrs_ul_config->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.count-1; i >= 0; i--) {
|
||||
if ((*dmrs_ul_config->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[i] < 0)
|
||||
|| (*dmrs_ul_config->phaseTrackingRS->choice.setup->transformPrecoderDisabled->timeDensity->list.array[i] > 29)) {
|
||||
LOG_I(GNB_APP, "UL PTRS timeDensity %d not set. Assuming PTRS not present! \n", i);
|
||||
free(dmrs_ul_config->phaseTrackingRS);
|
||||
dmrs_ul_config->phaseTrackingRS = NULL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (dmrs_ul_config->phaseTrackingRS) {
|
||||
// Check for UL PTRS parameters validity
|
||||
if (*dmrs_ul_config->phaseTrackingRS->choice.setup->transformPrecoderDisabled->resourceElementOffset > 2) {
|
||||
LOG_I(GNB_APP, "Freeing UL PTRS resourceElementOffset \n");
|
||||
free(dmrs_ul_config->phaseTrackingRS->choice.setup->transformPrecoderDisabled->resourceElementOffset);
|
||||
dmrs_ul_config->phaseTrackingRS->choice.setup->transformPrecoderDisabled->resourceElementOffset = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (scd->downlinkBWP_ToAddModList->list.count == 0) {
|
||||
free(scd->downlinkBWP_ToAddModList->list.array);
|
||||
free(scd->downlinkBWP_ToAddModList);
|
||||
scd->downlinkBWP_ToAddModList = NULL;
|
||||
}
|
||||
|
||||
if (scd->uplinkConfig->uplinkBWP_ToAddModList->list.count == 0) {
|
||||
free(scd->uplinkConfig->uplinkBWP_ToAddModList->list.array);
|
||||
free(scd->uplinkConfig->uplinkBWP_ToAddModList);
|
||||
scd->uplinkConfig->uplinkBWP_ToAddModList = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void verify_gnb_param_notset(paramdef_t *params, int paramidx, const char *paramname)
|
||||
{
|
||||
char aprefix[MAX_OPTNAME_SIZE * 2 + 8];
|
||||
@@ -1261,39 +1034,6 @@ static NR_ServingCellConfigCommon_t *get_scc_config(configmodule_interface_t *cf
|
||||
return scc;
|
||||
}
|
||||
|
||||
static NR_ServingCellConfig_t *get_scd_config(configmodule_interface_t *cfg)
|
||||
{
|
||||
NR_ServingCellConfig_t *scd = calloc(1, sizeof(*scd));
|
||||
prepare_scd(scd);
|
||||
|
||||
char aprefix[MAX_OPTNAME_SIZE * 2 + 8];
|
||||
snprintf(aprefix, sizeof(aprefix), "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0);
|
||||
GET_PARAMS_LIST(SCDsParamList, SCDsParams, SCDPARAMS_DESC(scd), GNB_CONFIG_STRING_SERVINGCELLCONFIGDEDICATED, aprefix);
|
||||
|
||||
if (SCDsParamList.numelt > 0) {
|
||||
snprintf(aprefix, sizeof(aprefix), "%s.[%i].%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0, GNB_CONFIG_STRING_SERVINGCELLCONFIGDEDICATED, 0);
|
||||
GET_PARAMS(SCDsParams, SCDPARAMS_DESC(scd), aprefix);
|
||||
const NR_BWP_UplinkDedicated_t *bwp_Dedicated = scd->uplinkConfig->uplinkBWP_ToAddModList->list.array[0]->bwp_Dedicated;
|
||||
const NR_PTRS_UplinkConfig_t *setup =
|
||||
bwp_Dedicated->pusch_Config->choice.setup->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup->phaseTrackingRS->choice.setup;
|
||||
LOG_I(RRC,
|
||||
"Read in ServingCellConfigDedicated UL (FreqDensity_0 %ld, FreqDensity_1 %ld, TimeDensity_0 %ld, TimeDensity_1 %ld, "
|
||||
"TimeDensity_2 %ld, RE offset %ld, First_active_BWP_ID %ld SCS %ld, LocationandBW %ld\n",
|
||||
*setup->transformPrecoderDisabled->frequencyDensity->list.array[0],
|
||||
*setup->transformPrecoderDisabled->frequencyDensity->list.array[1],
|
||||
*setup->transformPrecoderDisabled->timeDensity->list.array[0],
|
||||
*setup->transformPrecoderDisabled->timeDensity->list.array[1],
|
||||
*setup->transformPrecoderDisabled->timeDensity->list.array[2],
|
||||
*setup->transformPrecoderDisabled->resourceElementOffset,
|
||||
*scd->firstActiveDownlinkBWP_Id,
|
||||
scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.subcarrierSpacing,
|
||||
scd->downlinkBWP_ToAddModList->list.array[0]->bwp_Common->genericParameters.locationAndBandwidth);
|
||||
}
|
||||
fix_scd(scd);
|
||||
|
||||
return scd;
|
||||
}
|
||||
|
||||
static int read_du_cell_info(configmodule_interface_t *cfg,
|
||||
bool separate_du,
|
||||
uint32_t *gnb_id,
|
||||
@@ -1465,6 +1205,49 @@ static f1ap_setup_req_t *RC_read_F1Setup(uint64_t id,
|
||||
return req;
|
||||
}
|
||||
|
||||
static nr_ptrs_config_t *get_ptrs_config(int gnb_idx)
|
||||
{
|
||||
char aprefix[MAX_OPTNAME_SIZE * 2 + 8];
|
||||
snprintf(aprefix, sizeof(aprefix), "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0);
|
||||
GET_PARAMS_LIST(ptrs_ParamsList, ptrs_Params, GNB_PTRS_PARAMS_DESC, GNB_CONFIG_STRING_PTRS, aprefix);
|
||||
if (ptrs_ParamsList.numelt == 0) {
|
||||
LOG_I(GNB_APP, "No PTRS configuration found\n");
|
||||
return NULL;
|
||||
}
|
||||
nr_ptrs_config_t *ptrs = calloc_or_fail(1, sizeof(*ptrs));
|
||||
ptrs->dl_FreqDensity0_0 = *ptrs_ParamsList.paramarray[0][GNB_DLPTRSFREQDENSITY0_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: dl_FreqDensity0_0 %d\n", ptrs->dl_FreqDensity0_0);
|
||||
ptrs->dl_FreqDensity1_0 = *ptrs_ParamsList.paramarray[0][GNB_DLPTRSFREQDENSITY1_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: dl_FreqDensity1_0 %d\n", ptrs->dl_FreqDensity1_0);
|
||||
ptrs->dl_TimeDensity0_0 = *ptrs_ParamsList.paramarray[0][GNB_DLPTRSTIMEDENSITY0_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: dl_TimeDensity0_0 %d\n", ptrs->dl_TimeDensity0_0);
|
||||
ptrs->dl_TimeDensity1_0 = *ptrs_ParamsList.paramarray[0][GNB_DLPTRSTIMEDENSITY1_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: dl_TimeDensity1_0 %d\n", ptrs->dl_TimeDensity1_0);
|
||||
ptrs->dl_TimeDensity2_0 = *ptrs_ParamsList.paramarray[0][GNB_DLPTRSTIMEDENSITY2_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: dl_TimeDensity2_0 %d\n", ptrs->dl_TimeDensity2_0);
|
||||
ptrs->dl_EpreRatio_0 = *ptrs_ParamsList.paramarray[0][GNB_DLPTRSEPRERATIO_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: dl_EpreRatio_0 %d\n", ptrs->dl_EpreRatio_0);
|
||||
ptrs->dl_ReOffset_0 = *ptrs_ParamsList.paramarray[0][GNB_DLPTRSREOFFSET_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: dl_ReOffset_0 %d\n", ptrs->dl_ReOffset_0);
|
||||
ptrs->ul_FreqDensity0_0 = *ptrs_ParamsList.paramarray[0][GNB_ULPTRSFREQDENSITY0_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: ul_FreqDensity0_0 %d\n", ptrs->ul_FreqDensity0_0);
|
||||
ptrs->ul_FreqDensity1_0 = *ptrs_ParamsList.paramarray[0][GNB_ULPTRSFREQDENSITY1_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: ul_FreqDensity1_0 %d\n", ptrs->ul_FreqDensity1_0);
|
||||
ptrs->ul_TimeDensity0_0 = *ptrs_ParamsList.paramarray[0][GNB_ULPTRSTIMEDENSITY0_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: ul_TimeDensity0_0 %d\n", ptrs->ul_TimeDensity0_0);
|
||||
ptrs->ul_TimeDensity1_0 = *ptrs_ParamsList.paramarray[0][GNB_ULPTRSTIMEDENSITY1_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: ul_TimeDensity1_0 %d\n", ptrs->ul_TimeDensity1_0);
|
||||
ptrs->ul_TimeDensity2_0 = *ptrs_ParamsList.paramarray[0][GNB_ULPTRSTIMEDENSITY2_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: ul_TimeDensity2_0 %d\n", ptrs->ul_TimeDensity2_0);
|
||||
ptrs->ul_ReOffset_0 = *ptrs_ParamsList.paramarray[0][GNB_ULPTRSREOFFSET_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: ul_ReOffset_0 %d\n", ptrs->ul_ReOffset_0);
|
||||
ptrs->ul_MaxPorts_0 = *ptrs_ParamsList.paramarray[0][GNB_ULPTRSMAXPORTS_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: ul_MaxPorts_0 %d\n", ptrs->ul_MaxPorts_0);
|
||||
ptrs->ul_Power_0 = *ptrs_ParamsList.paramarray[0][GNB_ULPTRSPOWER_0_IDX].iptr;
|
||||
LOG_I(GNB_APP, "PTRS configuration: ul_Power_0 %d\n", ptrs->ul_Power_0);
|
||||
return ptrs;
|
||||
}
|
||||
|
||||
static nr_redcap_config_t *get_redcap_config(int gnb_idx)
|
||||
{
|
||||
paramdef_t RedCap_Params[] = GNB_REDCAP_PARAMS_DESC;
|
||||
@@ -1479,7 +1262,7 @@ static nr_redcap_config_t *get_redcap_config(int gnb_idx)
|
||||
// Check for default/non-existing values in configuration file
|
||||
if (*RedCap_Params[GNB_REDCAP_CELL_BARRED_REDCAP1_RX_R17_IDX].i8ptr == -1
|
||||
|| *RedCap_Params[GNB_REDCAP_CELL_BARRED_REDCAP2_RX_R17_IDX].i8ptr == -1) {
|
||||
LOG_I(NR_MAC, "No RedCap configuration found\n");
|
||||
LOG_I(GNB_APP, "No RedCap configuration found\n");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1571,6 +1354,31 @@ void config_pdcp(configmodule_interface_t *cfg, nr_pdcp_configuration_t *pdcp_co
|
||||
pdcp_config->drb.discard_timer = config_get_processedint(cfg, &pdcp_params[CONFIG_NR_PDCP_DRB_DISCARD_TIMER_IDX]);
|
||||
}
|
||||
|
||||
static void get_bwp_config(nr_mac_config_t *configuration)
|
||||
{
|
||||
char path[MAX_OPTNAME_SIZE * 2 + 8];
|
||||
snprintf(path, sizeof(path), "%s.[%i]", GNB_CONFIG_STRING_GNB_LIST, 0);
|
||||
GET_PARAMS_LIST(BWPParamList, BWPParams, GNBBWPPARAMS_DESC, GNB_CONFIG_STRING_BWP_LIST, path, BWPPARAMS_CHECK);
|
||||
configuration->num_additional_bwps = BWPParamList.numelt;
|
||||
AssertFatal(configuration->num_additional_bwps >= 0 && configuration->num_additional_bwps <= 4,
|
||||
"Invalid number of additional BWPs %d\n",
|
||||
configuration->num_additional_bwps);
|
||||
for (int i = 0; i < configuration->num_additional_bwps; i++) {
|
||||
configuration->bwp_config[i].id = i + 1;
|
||||
int bwp_start = *BWPParamList.paramarray[i][GNB_BWP_START_IDX].iptr;
|
||||
int bwp_size = *BWPParamList.paramarray[i][GNB_BWP_SIZE_IDX].iptr;
|
||||
configuration->bwp_config[i].location_and_bw = PRBalloc_to_locationandbandwidth(bwp_size, bwp_start);
|
||||
configuration->bwp_config[i].scs = *BWPParamList.paramarray[i][GNB_BWP_SCS_IDX].iptr;
|
||||
LOG_I(GNB_APP,
|
||||
"BWP %d, start PRB %d size %d locationandbandwidth %d, scs %d\n",
|
||||
configuration->bwp_config[i].id,
|
||||
bwp_start,
|
||||
bwp_size,
|
||||
configuration->bwp_config[i].location_and_bw,
|
||||
configuration->bwp_config[i].scs);
|
||||
}
|
||||
}
|
||||
|
||||
void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
{
|
||||
int j = 0;
|
||||
@@ -1596,6 +1404,12 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
config.pdsch_AntennaPorts.XP,
|
||||
config.pusch_AntennaPorts);
|
||||
|
||||
// BWP
|
||||
get_bwp_config(&config);
|
||||
AssertFatal(config.num_additional_bwps <= 4, "Impossible to configure more than 4 additional BWPs\n");
|
||||
config.first_active_bwp = *GNBParamList.paramarray[0][GNB_1ST_ACTIVE_BWP_IDX].iptr;
|
||||
AssertFatal(config.first_active_bwp <= config.num_additional_bwps, "1st active BWP does not belog to the configured BWPs\n");
|
||||
|
||||
// RU
|
||||
GET_PARAMS_LIST(RUParamList, RUParams, RUPARAMS_DESC, CONFIG_STRING_RU_LIST, NULL);
|
||||
int num_tx = 0;
|
||||
@@ -1604,8 +1418,7 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
num_tx += *(RUParamList.paramarray[i][RU_NB_TX_IDX].uptr);
|
||||
AssertFatal(num_tx >= config.pdsch_AntennaPorts.XP * config.pdsch_AntennaPorts.N1 * config.pdsch_AntennaPorts.N2,
|
||||
"Number of logical antenna ports (set in config file with pdsch_AntennaPorts) cannot be larger than physical antennas (nb_tx)\n");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
// TODO temporary solution for 3rd party RU or nFAPI, in which case we don't have RU section present in the config file
|
||||
num_tx = config.pdsch_AntennaPorts.XP * config.pdsch_AntennaPorts.N1 * config.pdsch_AntennaPorts.N2;
|
||||
LOG_E(GNB_APP, "RU information not present in config file. Assuming physical antenna ports equal to logical antenna ports %d\n", num_tx);
|
||||
@@ -1641,6 +1454,7 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
AssertFatal(config.maxMIMO_layers != 0 && config.maxMIMO_layers <= tot_ant, "Invalid maxMIMO_layers %d\n", config.maxMIMO_layers);
|
||||
|
||||
config.redcap = get_redcap_config(0);
|
||||
config.ptrs = get_ptrs_config(0);
|
||||
|
||||
char aprefix[MAX_OPTNAME_SIZE * 2 + 8];
|
||||
snprintf(aprefix, sizeof(aprefix), "%s.[%d].%s", GNB_CONFIG_STRING_GNB_LIST, 0, GNB_CONFIG_STRING_TIMERS_CONFIG);
|
||||
@@ -1694,7 +1508,6 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc = get_scc_config(cfg, config.minRXTXTIME, config.do_SRS);
|
||||
//xer_fprint(stdout, &asn_DEF_NR_ServingCellConfigCommon, scc);
|
||||
NR_ServingCellConfig_t *scd = get_scd_config(cfg);
|
||||
|
||||
if (MacRLC_ParamList.numelt > 0) {
|
||||
/* NR RLC config is needed by mac_top_init_gNB() */
|
||||
@@ -1702,7 +1515,7 @@ void RCconfig_nr_macrlc(configmodule_interface_t *cfg)
|
||||
config_rlc(cfg, &default_rlc_config);
|
||||
|
||||
ngran_node_t node_type = get_node_type();
|
||||
mac_top_init_gNB(node_type, scc, scd, &config, &default_rlc_config);
|
||||
mac_top_init_gNB(node_type, scc, &config, &default_rlc_config);
|
||||
RC.nb_nr_mac_CC = (int *)malloc(RC.nb_nr_macrlc_inst * sizeof(int));
|
||||
|
||||
for (j = 0; j < RC.nb_nr_macrlc_inst; j++) {
|
||||
|
||||
@@ -138,6 +138,7 @@ typedef enum {
|
||||
#define GNB_CONFIG_STRING_CU_SIB_LIST "cu_sibs"
|
||||
#define GNB_CONFIG_STRING_DU_SIB_LIST "du_sibs"
|
||||
#define GNB_CONFIG_STRING_DOSINR "do_SINR"
|
||||
#define GNB_CONFIG_STRING_1ST_ACTIVE_BWP "first_active_bwp"
|
||||
|
||||
#define GNB_CONFIG_HLP_STRING_ENABLE_SDAP "enable the SDAP layer\n"
|
||||
#define GNB_CONFIG_HLP_FORCE256QAMOFF "suppress activation of 256 QAM despite UE support"
|
||||
@@ -153,6 +154,7 @@ typedef enum {
|
||||
#define GNB_CONFIG_HLP_DU_SIBS "List of DU generated SIBs to be transmitted"
|
||||
#define GNB_CONFIG_HLP_DOSINR "Enable CSI feedback using SINR measurements on SSB"
|
||||
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* cell configuration parameters */
|
||||
/* optname helpstr paramflags XXXptr defXXXval type numelt */
|
||||
@@ -199,6 +201,7 @@ typedef enum {
|
||||
{GNB_CONFIG_STRING_CU_SIB_LIST, GNB_CONFIG_HLP_CU_SIBS, 0, .iptr=NULL, .defintarrayval=0, TYPE_INTARRAY, 0}, \
|
||||
{GNB_CONFIG_STRING_DU_SIB_LIST, GNB_CONFIG_HLP_DU_SIBS, 0, .iptr=NULL, .defintarrayval=0, TYPE_INTARRAY, 0}, \
|
||||
{GNB_CONFIG_STRING_DOSINR, GNB_CONFIG_HLP_DOSINR, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_1ST_ACTIVE_BWP, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
@@ -242,6 +245,7 @@ typedef enum {
|
||||
#define GNB_CU_SIBS_IDX 36
|
||||
#define GNB_DU_SIBS_IDX 37
|
||||
#define GNB_DO_SINR_IDX 38
|
||||
#define GNB_1ST_ACTIVE_BWP_IDX 39
|
||||
|
||||
#define TRACKING_AREA_CODE_OKRANGE {0x0001,0xFFFD}
|
||||
#define NUM_DL_HARQ_OKVALUES {2,4,6,8,10,12,16,32}
|
||||
@@ -287,9 +291,33 @@ typedef enum {
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#define GNB_CONFIG_STRING_BWP_LIST "bwp_list"
|
||||
|
||||
#define GNB_CONFIG_STRING_BWP_SCS "scs"
|
||||
#define GNB_CONFIG_STRING_BWP_START "bwpStart"
|
||||
#define GNB_CONFIG_STRING_BWP_SIZE "bwpSize"
|
||||
|
||||
#define GNB_BWP_SCS_IDX 0
|
||||
#define GNB_BWP_START_IDX 1
|
||||
#define GNB_BWP_SIZE_IDX 2
|
||||
|
||||
#define GNBBWPPARAMS_DESC { \
|
||||
{GNB_CONFIG_STRING_BWP_SCS, NULL, 0, .iptr=NULL, .defintarrayval=0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_BWP_START, NULL, 0, .iptr=NULL, .defintarrayval=0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_BWP_SIZE, NULL, 0, .iptr=NULL, .defintarrayval=0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
#define BWPPARAMS_CHECK { \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
{ .s5 = { NULL } }, \
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* Neighbour Cell Configurations*/
|
||||
@@ -516,6 +544,60 @@ typedef enum {
|
||||
#define GNB_REDCAP_CELL_BARRED_REDCAP2_RX_R17_IDX 1
|
||||
#define GNB_REDCAP_INTRA_FREQ_RESELECTION_REDCAP_R17_IDX 2
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* PTRS configuration parameters */
|
||||
/*-------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#define GNB_CONFIG_STRING_PTRS "phaseTrackingRS"
|
||||
#define GNB_CONFIG_STRING_DLPTRSFREQDENSITY0_0 "dl_ptrsFreqDensity0_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSFREQDENSITY1_0 "dl_ptrsFreqDensity1_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSTIMEDENSITY0_0 "dl_ptrsTimeDensity0_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSTIMEDENSITY1_0 "dl_ptrsTimeDensity1_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSTIMEDENSITY2_0 "dl_ptrsTimeDensity2_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSEPRERATIO_0 "dl_ptrsEpreRatio_0"
|
||||
#define GNB_CONFIG_STRING_DLPTRSREOFFSET_0 "dl_ptrsReOffset_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSFREQDENSITY0_0 "ul_ptrsFreqDensity0_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSFREQDENSITY1_0 "ul_ptrsFreqDensity1_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSTIMEDENSITY0_0 "ul_ptrsTimeDensity0_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSTIMEDENSITY1_0 "ul_ptrsTimeDensity1_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSTIMEDENSITY2_0 "ul_ptrsTimeDensity2_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSREOFFSET_0 "ul_ptrsReOffset_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSMAXPORTS_0 "ul_ptrsMaxPorts_0"
|
||||
#define GNB_CONFIG_STRING_ULPTRSPOWER_0 "ul_ptrsPower_0"
|
||||
|
||||
#define GNB_PTRS_PARAMS_DESC { \
|
||||
{GNB_CONFIG_STRING_DLPTRSFREQDENSITY0_0, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSFREQDENSITY1_0, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY0_0, NULL, 0, .iptr=NULL, .defintval=-1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY1_0, NULL, 0, .iptr=NULL, .defintval=-1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSTIMEDENSITY2_0, NULL, 0, .iptr=NULL, .defintval=-1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSEPRERATIO_0, NULL, 0, .iptr=NULL, .defintval=-1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DLPTRSREOFFSET_0, NULL, 0, .iptr=NULL, .defintval=-1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSFREQDENSITY0_0, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSFREQDENSITY1_0, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY0_0, NULL, 0, .iptr=NULL, .defintval=-1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY1_0, NULL, 0, .iptr=NULL, .defintval=-1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSTIMEDENSITY2_0, NULL, 0, .iptr=NULL, .defintval=-1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSREOFFSET_0, NULL, 0, .iptr=NULL, .defintval=-1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSMAXPORTS_0, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_ULPTRSPOWER_0, NULL, 0, .iptr=NULL, .defintval=0, TYPE_INT, 0}}
|
||||
|
||||
#define GNB_DLPTRSFREQDENSITY0_0_IDX 0
|
||||
#define GNB_DLPTRSFREQDENSITY1_0_IDX 1
|
||||
#define GNB_DLPTRSTIMEDENSITY0_0_IDX 2
|
||||
#define GNB_DLPTRSTIMEDENSITY1_0_IDX 3
|
||||
#define GNB_DLPTRSTIMEDENSITY2_0_IDX 4
|
||||
#define GNB_DLPTRSEPRERATIO_0_IDX 5
|
||||
#define GNB_DLPTRSREOFFSET_0_IDX 6
|
||||
#define GNB_ULPTRSFREQDENSITY0_0_IDX 7
|
||||
#define GNB_ULPTRSFREQDENSITY1_0_IDX 8
|
||||
#define GNB_ULPTRSTIMEDENSITY0_0_IDX 9
|
||||
#define GNB_ULPTRSTIMEDENSITY1_0_IDX 10
|
||||
#define GNB_ULPTRSTIMEDENSITY2_0_IDX 11
|
||||
#define GNB_ULPTRSREOFFSET_0_IDX 12
|
||||
#define GNB_ULPTRSMAXPORTS_0_IDX 13
|
||||
#define GNB_ULPTRSPOWER_0_IDX 14
|
||||
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/*---------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* SCTP configuration parameters section name */
|
||||
|
||||
@@ -2680,8 +2680,8 @@ static void configure_BWPs(NR_UE_MAC_INST_t *mac, NR_ServingCellConfig_t *scd)
|
||||
if (scd->downlinkBWP_ToReleaseList) {
|
||||
for (int i = 0; i < scd->downlinkBWP_ToReleaseList->list.count; i++) {
|
||||
for (int j = 0; j < mac->dl_BWPs.count; j++) {
|
||||
if (*scd->downlinkBWP_ToReleaseList->list.array[i] == mac->dl_BWPs.array[i]->bwp_id)
|
||||
release_dl_BWP(mac, i);
|
||||
if (*scd->downlinkBWP_ToReleaseList->list.array[i] == mac->dl_BWPs.array[j]->bwp_id)
|
||||
release_dl_BWP(mac, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2702,8 +2702,8 @@ static void configure_BWPs(NR_UE_MAC_INST_t *mac, NR_ServingCellConfig_t *scd)
|
||||
if (scd->uplinkConfig->uplinkBWP_ToReleaseList) {
|
||||
for (int i = 0; i < scd->uplinkConfig->uplinkBWP_ToReleaseList->list.count; i++) {
|
||||
for (int j = 0; j < mac->ul_BWPs.count; j++) {
|
||||
if (*scd->uplinkConfig->uplinkBWP_ToReleaseList->list.array[i] == mac->ul_BWPs.array[i]->bwp_id)
|
||||
release_ul_BWP(mac, i);
|
||||
if (*scd->uplinkConfig->uplinkBWP_ToReleaseList->list.array[i] == mac->ul_BWPs.array[j]->bwp_id)
|
||||
release_ul_BWP(mac, j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3473,13 +3473,59 @@ void nr_measgap_scheduling(gNB_MAC_INST *nr_mac, frame_t frame, sub_frame_t slot
|
||||
}
|
||||
}
|
||||
|
||||
void clean_bwp_structures(NR_SpCellConfig_t *spCellConfig)
|
||||
{
|
||||
NR_ServingCellConfig_t *spCellConfigDedicated = spCellConfig->spCellConfigDedicated;
|
||||
if (spCellConfigDedicated->downlinkBWP_ToReleaseList) {
|
||||
struct NR_ServingCellConfig__downlinkBWP_ToReleaseList *rel_dl = spCellConfigDedicated->downlinkBWP_ToReleaseList;
|
||||
struct NR_ServingCellConfig__downlinkBWP_ToAddModList *add_dl = spCellConfigDedicated->downlinkBWP_ToAddModList;
|
||||
int num_rel = rel_dl->list.count;
|
||||
int num_add = add_dl->list.count;
|
||||
for (int i = 0; i < num_rel; i++) {
|
||||
NR_BWP_Id_t *rel_id = rel_dl->list.array[i];
|
||||
for (int j = 0; j < num_add; j++) {
|
||||
NR_BWP_Downlink_t *dl_bwp = add_dl->list.array[j];
|
||||
if (*rel_id == dl_bwp->bwp_Id) {
|
||||
asn_sequence_del(&add_dl->list, j, 1);
|
||||
}
|
||||
}
|
||||
asn_sequence_del(&rel_dl->list, i, 1);
|
||||
}
|
||||
if (rel_dl->list.count == 0)
|
||||
free_and_zero(rel_dl);
|
||||
if (add_dl->list.count == 0)
|
||||
free_and_zero(add_dl);
|
||||
}
|
||||
if (spCellConfigDedicated->uplinkConfig->uplinkBWP_ToReleaseList) {
|
||||
struct NR_UplinkConfig__uplinkBWP_ToReleaseList *rel_ul = spCellConfigDedicated->uplinkConfig->uplinkBWP_ToReleaseList;
|
||||
struct NR_UplinkConfig__uplinkBWP_ToAddModList *add_ul = spCellConfigDedicated->uplinkConfig->uplinkBWP_ToAddModList;
|
||||
int num_rel = rel_ul->list.count;
|
||||
int num_add = add_ul->list.count;
|
||||
for (int i = 0; i < num_rel; i++) {
|
||||
NR_BWP_Id_t *rel_id = rel_ul->list.array[i];
|
||||
for (int j = 0; j < num_add; j++) {
|
||||
NR_BWP_Uplink_t *ul_bwp = add_ul->list.array[j];
|
||||
if (*rel_id == ul_bwp->bwp_Id) {
|
||||
asn_sequence_del(&add_ul->list, j, 1);
|
||||
}
|
||||
}
|
||||
asn_sequence_del(&rel_ul->list, i, 1);
|
||||
}
|
||||
if (rel_ul->list.count == 0)
|
||||
free_and_zero(rel_ul);
|
||||
if (add_ul->list.count == 0)
|
||||
free_and_zero(add_ul);
|
||||
}
|
||||
}
|
||||
|
||||
void nr_mac_clean_cellgroup(NR_CellGroupConfig_t *cell_group)
|
||||
{
|
||||
DevAssert(cell_group != NULL);
|
||||
NR_SpCellConfig_t *spCellConfig = cell_group->spCellConfig;
|
||||
/* remove a reconfigurationWithSync, we don't need it anymore */
|
||||
if (cell_group->spCellConfig && cell_group->spCellConfig->reconfigurationWithSync != NULL) {
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_ReconfigurationWithSync, cell_group->spCellConfig->reconfigurationWithSync);
|
||||
cell_group->spCellConfig->reconfigurationWithSync = NULL;
|
||||
if (spCellConfig && spCellConfig->reconfigurationWithSync != NULL) {
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_ReconfigurationWithSync, spCellConfig->reconfigurationWithSync);
|
||||
spCellConfig->reconfigurationWithSync = NULL;
|
||||
}
|
||||
/* remove the rlc_BearerToReleaseList, we don't need it anymore */
|
||||
if (cell_group->rlc_BearerToReleaseList != NULL) {
|
||||
@@ -3491,6 +3537,8 @@ void nr_mac_clean_cellgroup(NR_CellGroupConfig_t *cell_group)
|
||||
/* remove reestablishRLC, we don't need it anymore */
|
||||
for (int i = 0; i < cell_group->rlc_BearerToAddModList->list.count; ++i)
|
||||
free_and_zero(cell_group->rlc_BearerToAddModList->list.array[i]->reestablishRLC);
|
||||
/* clean BWP structures */
|
||||
clean_bwp_structures(spCellConfig);
|
||||
}
|
||||
|
||||
int nr_mac_get_reconfig_delay_slots(NR_SubcarrierSpacing_t scs)
|
||||
@@ -3776,8 +3824,7 @@ bool prepare_initial_ul_rrc_message(gNB_MAC_INST *mac, NR_UE_info_t *UE)
|
||||
int CC_id = 0;
|
||||
int srb_id = 1;
|
||||
const NR_ServingCellConfigCommon_t *scc = mac->common_channels[CC_id].ServingCellConfigCommon;
|
||||
const NR_ServingCellConfig_t *sccd = UE->is_redcap ? NULL : mac->common_channels[CC_id].pre_ServingCellConfig;
|
||||
NR_CellGroupConfig_t *cellGroupConfig = get_initial_cellGroupConfig(UE->uid, scc, sccd, &mac->radio_config, &mac->rlc_config);
|
||||
NR_CellGroupConfig_t *cellGroupConfig = get_initial_cellGroupConfig(UE->uid, scc, &mac->radio_config, &mac->rlc_config);
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, UE->CellGroup);
|
||||
UE->CellGroup = cellGroupConfig;
|
||||
|
||||
@@ -3873,11 +3920,29 @@ bool nr_mac_check_ul_failure(gNB_MAC_INST *nrmac, int rnti, NR_UE_sched_ctrl_t *
|
||||
return false;
|
||||
}
|
||||
|
||||
void nr_mac_trigger_reconfiguration(const gNB_MAC_INST *nrmac, const NR_UE_info_t *UE)
|
||||
void nr_mac_trigger_reconfiguration(const gNB_MAC_INST *nrmac, const NR_UE_info_t *UE, int new_bwp_id)
|
||||
{
|
||||
DevAssert(UE->CellGroup != NULL);
|
||||
NR_CellGroupConfig_t *cellGroup_for_UE = NULL;
|
||||
if (new_bwp_id >= 0) {
|
||||
AssertFatal(UE->current_DL_BWP.bwp_id == UE->current_UL_BWP.bwp_id, "We only support same BWP for UL and DL\n");
|
||||
if (new_bwp_id == UE->current_DL_BWP.bwp_id)
|
||||
LOG_E(NR_MAC, "Source BWP ID and target BWP ID are the same, can't perform switch\n");
|
||||
else
|
||||
cellGroup_for_UE = update_cellGroupConfig_for_BWP_switch(UE->CellGroup,
|
||||
&nrmac->radio_config,
|
||||
UE->capability,
|
||||
nrmac->common_channels[0].ServingCellConfigCommon,
|
||||
UE->uid,
|
||||
UE->current_DL_BWP.bwp_id,
|
||||
new_bwp_id);
|
||||
}
|
||||
uint8_t buf[2048];
|
||||
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, NULL, UE->CellGroup, buf, sizeof(buf));
|
||||
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig,
|
||||
NULL,
|
||||
cellGroup_for_UE ? cellGroup_for_UE : UE->CellGroup,
|
||||
buf,
|
||||
sizeof(buf));
|
||||
AssertFatal(enc_rval.encoded > 0, "ASN1 encoding of CellGroupConfig failed, failed type %s\n", enc_rval.failed_type->name);
|
||||
du_to_cu_rrc_information_t du2cu = {
|
||||
.cellGroupConfig = buf,
|
||||
@@ -3892,6 +3957,8 @@ void nr_mac_trigger_reconfiguration(const gNB_MAC_INST *nrmac, const NR_UE_info_
|
||||
.cause_value = F1AP_CauseRadioNetwork_action_desirable_for_radio_reasons,
|
||||
};
|
||||
nrmac->mac_rrc.ue_context_modification_required(&required);
|
||||
if (cellGroup_for_UE)
|
||||
free_cellGroupConfig(cellGroup_for_UE);
|
||||
}
|
||||
|
||||
/* \brief add bearers from CellGroupConfig.
|
||||
|
||||
@@ -882,7 +882,7 @@ static void nr_rx_ra_sdu(const module_id_t mod_id,
|
||||
if (!old_UE->reconfigSpCellConfig) {
|
||||
LOG_I(NR_MAC, "Received UL_SCH_LCID_C_RNTI with C-RNTI 0x%04x, triggering RRC Reconfiguration\n", crnti);
|
||||
// Trigger RRCReconfiguration
|
||||
nr_mac_trigger_reconfiguration(mac, old_UE);
|
||||
nr_mac_trigger_reconfiguration(mac, old_UE, -1);
|
||||
// we configure the UE using common search space with DCIX0 while waiting for a reconfiguration
|
||||
configure_UE_BWP(mac, scc, old_UE, false, NR_SearchSpace__searchSpaceType_PR_common, -1, -1);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,6 @@ void delete_nr_ue_data(NR_UE_info_t *UE, NR_COMMON_channels_t *ccPtr, uid_alloca
|
||||
|
||||
void mac_top_init_gNB(ngran_node_t node_type,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
NR_ServingCellConfig_t *scd,
|
||||
const nr_mac_config_t *conf,
|
||||
const nr_rlc_configuration_t *default_rlc_config);
|
||||
void mac_top_destroy_gNB(gNB_MAC_INST *mac);
|
||||
@@ -478,12 +477,12 @@ bool nr_mac_check_release(NR_UE_sched_ctrl_t *sched_ctrl, int rnti);
|
||||
void nr_mac_trigger_release_complete(gNB_MAC_INST *mac, int rnti);
|
||||
void nr_mac_release_ue(gNB_MAC_INST *mac, int rnti);
|
||||
bool nr_mac_request_release_ue(const gNB_MAC_INST *nrmac, int rnti);
|
||||
|
||||
void clean_bwp_structures(NR_SpCellConfig_t *spCellConfig);
|
||||
void nr_mac_trigger_ul_failure(NR_UE_sched_ctrl_t *sched_ctrl, NR_SubcarrierSpacing_t subcarrier_spacing);
|
||||
void nr_mac_reset_ul_failure(NR_UE_sched_ctrl_t *sched_ctrl);
|
||||
bool nr_mac_check_ul_failure(gNB_MAC_INST *nrmac, int rnti, NR_UE_sched_ctrl_t *sched_ctrl);
|
||||
|
||||
void nr_mac_trigger_reconfiguration(const gNB_MAC_INST *nrmac, const NR_UE_info_t *UE);
|
||||
void nr_mac_trigger_reconfiguration(const gNB_MAC_INST *nrmac, const NR_UE_info_t *UE, int new_bwp_id);
|
||||
|
||||
void process_addmod_bearers_cellGroupConfig(NR_UE_sched_ctrl_t *sched_ctrl,
|
||||
const struct NR_CellGroupConfig__rlc_BearerToAddModList *addmod);
|
||||
|
||||
@@ -569,14 +569,13 @@ static NR_UE_info_t *create_new_UE(gNB_MAC_INST *mac, uint32_t cu_id, const NR_C
|
||||
NR_CellGroupConfig_t *cellGroupConfig = NULL;
|
||||
NR_COMMON_channels_t *cc = &mac->common_channels[CC_id];
|
||||
const NR_ServingCellConfigCommon_t *scc = cc->ServingCellConfigCommon;
|
||||
const NR_ServingCellConfig_t *sccd = cc->pre_ServingCellConfig;
|
||||
const nr_mac_config_t *configuration = &mac->radio_config;
|
||||
if (is_SA) {
|
||||
cellGroupConfig = get_initial_cellGroupConfig(UE->uid, scc, sccd, &mac->radio_config, &mac->rlc_config);
|
||||
cellGroupConfig = get_initial_cellGroupConfig(UE->uid, scc, &mac->radio_config, &mac->rlc_config);
|
||||
cellGroupConfig->spCellConfig->reconfigurationWithSync = get_reconfiguration_with_sync(UE->rnti, UE->uid, scc);
|
||||
} else {
|
||||
NR_UE_NR_Capability_t *cap = get_ue_nr_cap_from_cg_config_info(cgci);
|
||||
cellGroupConfig = get_default_secondaryCellGroup(scc, sccd, cap, 1, 1, configuration, UE->uid);
|
||||
cellGroupConfig = get_default_secondaryCellGroup(scc, cap, 1, 1, configuration, UE->uid);
|
||||
cellGroupConfig->spCellConfig->reconfigurationWithSync = get_reconfiguration_with_sync(UE->rnti, UE->uid, scc);
|
||||
// TODO: in NSA we assign capabilities here, otherwise outside => not logic
|
||||
UE->capability = cap;
|
||||
@@ -786,8 +785,8 @@ void ue_context_modification_request(const f1ap_ue_context_mod_req_t *req)
|
||||
}
|
||||
}
|
||||
// we re-configure the BWP to apply the CellGroup and to use UE specific Search Space with DCIX1
|
||||
nr_mac_clean_cellgroup(UE->CellGroup);
|
||||
configure_UE_BWP(mac, scc, UE, false, NR_SearchSpace__searchSpaceType_PR_ue_Specific, -1, -1);
|
||||
nr_mac_clean_cellgroup(UE->CellGroup);
|
||||
}
|
||||
|
||||
if (ue_cap != NULL) {
|
||||
|
||||
@@ -255,7 +255,6 @@ static void mac_rrc_init(gNB_MAC_INST *mac, ngran_node_t node_type)
|
||||
|
||||
void mac_top_init_gNB(ngran_node_t node_type,
|
||||
NR_ServingCellConfigCommon_t *scc,
|
||||
NR_ServingCellConfig_t *scd,
|
||||
const nr_mac_config_t *config,
|
||||
const nr_rlc_configuration_t *default_rlc_config)
|
||||
{
|
||||
@@ -290,8 +289,6 @@ void mac_top_init_gNB(ngran_node_t node_type,
|
||||
RC.nrmac[i]->radio_config = *config;
|
||||
RC.nrmac[i]->rlc_config = *default_rlc_config;
|
||||
|
||||
RC.nrmac[i]->common_channels[0].pre_ServingCellConfig = scd;
|
||||
|
||||
RC.nrmac[i]->first_MIB = true;
|
||||
RC.nrmac[i]->num_scheduled_prach_rx = 0;
|
||||
RC.nrmac[i]->common_channels[0].mib = get_new_MIB_NR(scc);
|
||||
@@ -345,7 +342,6 @@ void mac_top_destroy_gNB(gNB_MAC_INST *mac)
|
||||
NR_COMMON_channels_t *cc = &mac->common_channels[0];
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_BCCH_BCH_Message, cc->mib);
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_BCCH_DL_SCH_Message, cc->sib1);
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_ServingCellConfig, cc->pre_ServingCellConfig);
|
||||
ASN_STRUCT_FREE(asn_DEF_NR_ServingCellConfigCommon, cc->ServingCellConfigCommon);
|
||||
NR_UEs_t *UE_info = &mac->UE_info;
|
||||
for (int i = 0; i < sizeofArray(UE_info->connected_ue_list); ++i)
|
||||
|
||||
@@ -155,6 +155,30 @@ typedef struct nr_redcap_config {
|
||||
uint8_t intraFreqReselectionRedCap_r17;
|
||||
} nr_redcap_config_t;
|
||||
|
||||
typedef struct {
|
||||
int dl_FreqDensity0_0;
|
||||
int dl_FreqDensity1_0;
|
||||
int dl_TimeDensity0_0;
|
||||
int dl_TimeDensity1_0;
|
||||
int dl_TimeDensity2_0;
|
||||
int dl_EpreRatio_0;
|
||||
int dl_ReOffset_0;
|
||||
int ul_FreqDensity0_0;
|
||||
int ul_FreqDensity1_0;
|
||||
int ul_TimeDensity0_0;
|
||||
int ul_TimeDensity1_0;
|
||||
int ul_TimeDensity2_0;
|
||||
int ul_ReOffset_0;
|
||||
int ul_MaxPorts_0;
|
||||
int ul_Power_0;
|
||||
} nr_ptrs_config_t;
|
||||
|
||||
typedef struct {
|
||||
int id;
|
||||
int scs;
|
||||
int location_and_bw;
|
||||
} nr_bwp_config_t;
|
||||
|
||||
typedef struct nr_mac_config_t {
|
||||
int sib1_tda;
|
||||
nr_pdsch_AntennaPorts_t pdsch_AntennaPorts;
|
||||
@@ -172,11 +196,16 @@ typedef struct nr_mac_config_t {
|
||||
nr_mac_timers_t timer_config;
|
||||
int num_dlharq;
|
||||
int num_ulharq;
|
||||
// BWP information
|
||||
int num_additional_bwps;
|
||||
int first_active_bwp;
|
||||
nr_bwp_config_t bwp_config[4];
|
||||
/// beamforming weight matrix size
|
||||
int nb_bfw[2];
|
||||
int32_t *bw_list;
|
||||
int num_agg_level_candidates[NUM_PDCCH_AGG_LEVELS];
|
||||
nr_redcap_config_t *redcap;
|
||||
nr_ptrs_config_t *ptrs;
|
||||
bool do_SINR;
|
||||
} nr_mac_config_t;
|
||||
|
||||
@@ -263,8 +292,6 @@ typedef struct {
|
||||
NR_BCCH_DL_SCH_Message_t *sib1;
|
||||
seq_arr_t *du_SIBs;
|
||||
NR_ServingCellConfigCommon_t *ServingCellConfigCommon;
|
||||
/// pre-configured ServingCellConfig that is default for every UE
|
||||
NR_ServingCellConfig_t *pre_ServingCellConfig;
|
||||
/// Outgoing MIB PDU for PHY
|
||||
uint8_t MIB_pdu[3];
|
||||
/// Outgoing BCCH pdu for PHY
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -89,7 +89,6 @@ NR_SIB19_r17_t *get_SIB19_NR(const NR_ServingCellConfigCommon_t *scc);
|
||||
|
||||
NR_CellGroupConfig_t *get_initial_cellGroupConfig(int uid,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
const NR_ServingCellConfig_t *servingcellconfigdedicated,
|
||||
const nr_mac_config_t *configuration,
|
||||
const nr_rlc_configuration_t *default_rlc_config);
|
||||
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
@@ -105,7 +104,6 @@ NR_CellGroupConfig_t *decode_cellGroupConfig(const uint8_t *buffer, int max_buff
|
||||
* configuration, but it will also overwrite the ServingCellConfig passed in
|
||||
* parameter servingcellconfigdedicated! */
|
||||
NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigCommon_t *servingcellconfigcommon,
|
||||
const NR_ServingCellConfig_t *servingcellconfigdedicated,
|
||||
const NR_UE_NR_Capability_t *uecap,
|
||||
int scg_id,
|
||||
int servCellIndex,
|
||||
@@ -123,7 +121,13 @@ NR_RLC_BearerConfig_t *get_DRB_RLC_BearerConfig(long lcChannelId,
|
||||
NR_RLC_Config_PR rlc_conf,
|
||||
long priority,
|
||||
const nr_rlc_configuration_t *default_rlc_config);
|
||||
|
||||
NR_CellGroupConfig_t * update_cellGroupConfig_for_BWP_switch(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
const nr_mac_config_t *configuration,
|
||||
const NR_UE_NR_Capability_t *uecap,
|
||||
const NR_ServingCellConfigCommon_t *scc,
|
||||
int uid,
|
||||
int old_bwp,
|
||||
int new_bwp);
|
||||
NR_MeasurementTimingConfiguration_t *get_nr_mtc(uint8_t *buf, uint32_t len);
|
||||
measgap_config_t create_measgap_config(const NR_MeasurementTimingConfiguration_t *mtc, int scs, int min_rxtxtime);
|
||||
int encode_measgap_config(const measgap_config_t *c, uint8_t *buf);
|
||||
|
||||
@@ -144,8 +144,8 @@ gNBs =
|
||||
|
||||
);
|
||||
|
||||
# Dedicated Serving Cell Configuration
|
||||
servingCellConfigDedicated = (
|
||||
# PTRS Configuration
|
||||
phaseTrackingRS = (
|
||||
{
|
||||
# DL PTRS related parameters.
|
||||
# 3GPP TS 38.331 PTRS-DownlinkConfig
|
||||
|
||||
@@ -19,6 +19,12 @@ gNBs:
|
||||
# Physical parameters:
|
||||
do_CSIRS: 1
|
||||
do_SRS: 1
|
||||
first_active_bwp: 1;
|
||||
bwp_list:
|
||||
-
|
||||
scs: 1
|
||||
bwpStart: 0
|
||||
bwpSize: 106
|
||||
#uess_agg_levels: [0,1,1,1,1]
|
||||
servingCellConfigCommon:
|
||||
#spCellConfigCommon
|
||||
@@ -132,17 +138,6 @@ gNBs:
|
||||
|
||||
ssPBCH_BlockPower: -25
|
||||
|
||||
servingCellConfigDedicated:
|
||||
- dl_bwp-Id_1: 1
|
||||
dl_bwp1_locationAndBandwidth: 28875
|
||||
dl_bwp1_subcarrierSpacing: 1
|
||||
firstActiveDownlinkBWP-Id: 1
|
||||
defaultDownlinkBWP-Id: 1
|
||||
ul_bwp-Id_1: 1
|
||||
ul_bwp1_locationAndBandwidth: 28875
|
||||
ul_bwp1_subcarrierSpacing: 1
|
||||
firstActiveUplinkBWP-Id: 1
|
||||
|
||||
RedCap:
|
||||
cellBarredRedCap1Rx_r17: 1
|
||||
cellBarredRedCap2Rx_r17: 1
|
||||
|
||||
Reference in New Issue
Block a user