Commit 56f0b708 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/NR_SL_RRC' into integration_2023_w30

parents 051fb056 1b986287
......@@ -1303,6 +1303,7 @@ set(NR_L2_SRC_UE
${NR_UE_RRC_DIR}/rrc_UE.c
${NR_UE_RRC_DIR}/rrc_nsa.c
${NR_UE_RRC_DIR}/rrc_timers_and_constants.c
${NR_UE_RRC_DIR}/rrc_sl_preconfig.c
)
set (MAC_SRC
......
......@@ -451,6 +451,10 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* uecap_file, char* rrc_config_
{
LOG_D(NR_RRC, "In NSA mode \n");
}
if (get_softmodem_params()->sl_mode) {
configure_NR_SL_Preconfig(get_softmodem_params()->sync_ref);
}
}
else{
NR_UE_rrc_inst = NULL;
......
......@@ -173,6 +173,7 @@ void handle_rlf_sync(NR_UE_Timers_Constants_t *tac,
void nr_rrc_handle_SetupRelease_RLF_TimersAndConstants(NR_UE_RRC_INST_t *rrc,
struct NR_SetupRelease_RLF_TimersAndConstants *rlf_TimersAndConstants);
int configure_NR_SL_Preconfig(int sync_source);
/** @}*/
#endif
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#define RRC_SL_PRECONFIG
#define RRC_SL_PRECONFIG_C
#include "oai_asn1.h"
#include "NR_SL-PreconfigurationNR-r16.h"
#include "common/utils/LOG/log.h"
#include "sl_preconfig_paramvalues.h"
#include "common/config/config_userapi.h"
static void prepare_NR_SL_SyncConfig(NR_SL_SyncConfig_r16_t *sl_syncconfig)
{
// Hysteris when evaluating SyncRef UE
sl_syncconfig->sl_SyncRefMinHyst_r16 = NULL;
// Hysteris when evaluating SyncRef UE
sl_syncconfig->sl_SyncRefDiffHyst_r16 = NULL;
// Filtering for SL RSRP
sl_syncconfig->sl_filterCoefficient_r16 = NULL;
// SSB Periodicity within 16 frames.
sl_syncconfig->sl_SSB_TimeAllocation1_r16 = calloc(1, sizeof(NR_SL_SSB_TimeAllocation_r16_t));
sl_syncconfig->sl_SSB_TimeAllocation1_r16->sl_NumSSB_WithinPeriod_r16 = calloc(1, sizeof(long));
sl_syncconfig->sl_SSB_TimeAllocation1_r16->sl_TimeOffsetSSB_r16 = calloc(1, sizeof(long));
sl_syncconfig->sl_SSB_TimeAllocation1_r16->sl_TimeInterval_r16 = calloc(1, sizeof(long));
sl_syncconfig->sl_SSB_TimeAllocation2_r16 = NULL;
sl_syncconfig->sl_SSB_TimeAllocation3_r16 = NULL;
//SLSS Id
sl_syncconfig->sl_SSID_r16 = NULL;
// Threshold to be used in coverage
sl_syncconfig->txParameters_r16.syncTxThreshIC_r16 = NULL;
// Threshold to be used when Out of coverage
sl_syncconfig->txParameters_r16.syncTxThreshOoC_r16 = NULL;
// Syncconfig is used when UE is synced to GNSS if set, else if UE is synced to eNB/gNB
sl_syncconfig->gnss_Sync_r16 = calloc(1, sizeof(long));
*sl_syncconfig->gnss_Sync_r16 = 0; // GNSS
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
paramdef_t SL_SYNCCFGPARAMS[] = SL_SYNCPARAMS_DESC(sl_syncconfig);
paramlist_def_t SL_SYNCFGParamList = {SL_CONFIG_STRING_SL_SYNCCONFIG_LIST, NULL, 0};
sprintf(aprefix, "%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0);
config_getlist(&SL_SYNCFGParamList, NULL, 0, aprefix);
LOG_I(RRC, "NUM SL-SYNCCFG elem in cfg file:%d\n", SL_SYNCFGParamList.numelt);
sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0,SL_CONFIG_STRING_SL_SYNCCONFIG_LIST, 0);
config_get(SL_SYNCCFGPARAMS,sizeof(SL_SYNCCFGPARAMS)/sizeof(paramdef_t),aprefix);
}
static void prepare_NR_SL_ResourcePool(NR_SL_ResourcePool_r16_t *sl_res_pool,
uint16_t is_txpool,
uint16_t is_sl_syncsource)
{
// PSCCH configuration
sl_res_pool->sl_PSCCH_Config_r16 = calloc(1, sizeof(*sl_res_pool->sl_PSCCH_Config_r16));
sl_res_pool->sl_PSCCH_Config_r16->present = NR_SetupRelease_SL_PSCCH_Config_r16_PR_setup;
sl_res_pool->sl_PSCCH_Config_r16->choice.setup = calloc(1, sizeof(NR_SL_PSCCH_Config_r16_t));
// Indicates number of symbols for PSCCH in a resource pool
sl_res_pool->sl_PSCCH_Config_r16->choice.setup->sl_TimeResourcePSCCH_r16 = calloc(1, sizeof(long));
// Indicates number of PRBs for PSCCH in a resource pool
sl_res_pool->sl_PSCCH_Config_r16->choice.setup->sl_FreqResourcePSCCH_r16 = calloc(1, sizeof(long));
// Inititation during PSCCH DMRS Sequence generation
sl_res_pool->sl_PSCCH_Config_r16->choice.setup->sl_DMRS_ScrambleID_r16 = calloc(1, sizeof(long));
*sl_res_pool->sl_PSCCH_Config_r16->choice.setup->sl_DMRS_ScrambleID_r16 = 0;
// num reserve bits used for first stage SCI
sl_res_pool->sl_PSCCH_Config_r16->choice.setup->sl_NumReservedBits_r16 = calloc(1, sizeof(long));
*sl_res_pool->sl_PSCCH_Config_r16->choice.setup->sl_NumReservedBits_r16 = 2;
//PSSCH Configuration
sl_res_pool->sl_PSSCH_Config_r16 = calloc(1, sizeof(NR_SetupRelease_SL_PSSCH_Config_r16_t));
sl_res_pool->sl_PSSCH_Config_r16->present = NR_SetupRelease_SL_PSSCH_Config_r16_PR_setup;
sl_res_pool->sl_PSSCH_Config_r16->choice.setup = calloc(1, sizeof(NR_SL_PSSCH_Config_r16_t));
sl_res_pool->sl_PSSCH_Config_r16->choice.setup->sl_PSSCH_DMRS_TimePatternList_r16 =
calloc(1, sizeof(*sl_res_pool->sl_PSSCH_Config_r16->choice.setup->sl_PSSCH_DMRS_TimePatternList_r16));
for(int i=0; i<3; i++) {
long *p = calloc(1, sizeof(long));
*p = 2+i; // valid values: 2..4
ASN_SEQUENCE_ADD(&sl_res_pool->sl_PSSCH_Config_r16->choice.setup->sl_PSSCH_DMRS_TimePatternList_r16->list, p);
}
//PSFCH configuration
sl_res_pool->sl_PSFCH_Config_r16 = NULL;
// indicates allowed sync sources which are allowed to use this resource pool
sl_res_pool->sl_SyncAllowed_r16 = calloc(1, sizeof(NR_SL_SyncAllowed_r16_t));
//configured resources can be used if UE is directly/indirectly synced to network.
sl_res_pool->sl_SyncAllowed_r16->gnbEnb_Sync_r16 = NULL;
//configured resources can be used if UE is directly/indirectly synced to GNSS.
sl_res_pool->sl_SyncAllowed_r16->gnss_Sync_r16 = calloc(1, sizeof(long));
*sl_res_pool->sl_SyncAllowed_r16->gnss_Sync_r16 = NR_SL_SyncAllowed_r16__gnss_Sync_r16_true;
//configured resources can be used if UE is directly/indirectly synced to SYNC REF UE.
sl_res_pool->sl_SyncAllowed_r16->ue_Sync_r16 = calloc(1, sizeof(long));
*sl_res_pool->sl_SyncAllowed_r16->ue_Sync_r16 = NR_SL_SyncAllowed_r16__ue_Sync_r16_true;
//Min freq domain resources used for resource sensing. Size of Subchannels
sl_res_pool->sl_SubchannelSize_r16 = calloc(1, sizeof(long));
sl_res_pool->dummy = NULL;
// lowest RB index of lowest subch in this resource pool
sl_res_pool->sl_StartRB_Subchannel_r16 = calloc(1, sizeof(long));
//number of subchannels in this res pool. contiguous PRBs
sl_res_pool->sl_NumSubchannel_r16 = calloc(1, sizeof(long));
// 64QAM table is default. in case other MCS tables needs tobe used.
sl_res_pool->sl_Additional_MCS_Table_r16 = NULL;
sl_res_pool->sl_ThreshS_RSSI_CBR_r16 = NULL;
sl_res_pool->sl_TimeWindowSizeCBR_r16 = NULL;
sl_res_pool->sl_TimeWindowSizeCR_r16 = NULL;
sl_res_pool->sl_PTRS_Config_r16 = NULL;
sl_res_pool->sl_UE_SelectedConfigRP_r16 = NULL;
sl_res_pool->sl_RxParametersNcell_r16 = NULL;
sl_res_pool->sl_ZoneConfigMCR_List_r16 = NULL;
sl_res_pool->sl_FilterCoefficient_r16 = NULL;
//number of contiguous PRBS in this res pool.
sl_res_pool->sl_RB_Number_r16 = calloc(1, sizeof(long));
sl_res_pool->sl_PreemptionEnable_r16 = NULL;
sl_res_pool->sl_PriorityThreshold_UL_URLLC_r16 = NULL;
sl_res_pool->sl_PriorityThreshold_r16 = NULL;
sl_res_pool->sl_X_Overhead_r16 = NULL;
sl_res_pool->sl_PowerControl_r16 = NULL;
sl_res_pool->sl_TxPercentageList_r16 = NULL;
sl_res_pool->sl_MinMaxMCS_List_r16 = NULL;
sl_res_pool->ext1 = calloc(1, sizeof(*sl_res_pool->ext1));
sl_res_pool->ext1->sl_TimeResource_r16 = calloc(1, sizeof(*sl_res_pool->ext1->sl_TimeResource_r16));
sl_res_pool->ext1->sl_TimeResource_r16->size = 8;
sl_res_pool->ext1->sl_TimeResource_r16->bits_unused = 4;
sl_res_pool->ext1->sl_TimeResource_r16->buf = calloc(sl_res_pool->ext1->sl_TimeResource_r16->size, sizeof(uint8_t));
// EX: BITMAP 10101010.. indicating every alternating slot supported for sidelink
for (int i=0;i<sl_res_pool->ext1->sl_TimeResource_r16->size;i++) {
if (is_txpool) {
sl_res_pool->ext1->sl_TimeResource_r16->buf[i] = (is_sl_syncsource) ? 0xAA //0x88;//0xAA;
: 0x55;//0x11;//0x55;
} else {
sl_res_pool->ext1->sl_TimeResource_r16->buf[i] = (is_sl_syncsource) ? 0x55 //0x88;//0xAA;
: 0xAA;//0x11;//0x55;
}
}
// mask out unused bits
sl_res_pool->ext1->sl_TimeResource_r16->buf[sl_res_pool->ext1->sl_TimeResource_r16->size - 1] &= (0 - (1 << (sl_res_pool->ext1->sl_TimeResource_r16->bits_unused)));
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
paramdef_t SL_POOLPARAMS[] = SL_RESPOOLPARAMS_DESC(sl_res_pool);
if (is_txpool)
sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0,SL_CONFIG_STRING_SL_TX_RPOOL_LIST, 0);
else
sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0,SL_CONFIG_STRING_SL_RX_RPOOL_LIST, 0);
config_get(SL_POOLPARAMS,sizeof(SL_POOLPARAMS)/sizeof(paramdef_t),aprefix);
}
static void prepare_NR_SL_BWPConfigCommon(NR_SL_BWP_ConfigCommon_r16_t *sl_bwp,
uint16_t num_tx_pools,
uint16_t num_rx_pools,
uint16_t sl_syncsource)
{
sl_bwp->sl_BWP_Generic_r16 = calloc(1, sizeof(NR_SL_BWP_Generic_r16_t));
sl_bwp->sl_BWP_Generic_r16->sl_BWP_r16 = calloc(1, sizeof(NR_BWP_t));
// if Cyclicprefix is NULL, then default value Normal cyclic prefix is configured. else EXT CP.
sl_bwp->sl_BWP_Generic_r16->sl_BWP_r16->cyclicPrefix = NULL;
// Value can be between symbols 7 to 14
sl_bwp->sl_BWP_Generic_r16->sl_LengthSymbols_r16 = calloc(1, sizeof(long));
// Value can be between symbols 0 to 7
sl_bwp->sl_BWP_Generic_r16->sl_StartSymbol_r16 = calloc(1, sizeof(long));
sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16 = calloc(1,sizeof(NR_SL_PSBCH_Config_r16_t));
// PSBCH CONFIG contains PO and alpha for PSBCH powercontrol.
sl_bwp->sl_BWP_Generic_r16->sl_PSBCH_Config_r16->present = NR_SetupRelease_SL_PSBCH_Config_r16_PR_release;
sl_bwp->sl_BWP_Generic_r16->sl_TxDirectCurrentLocation_r16 = NULL;
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
paramdef_t SL_BWPPARAMS[] = SL_BWPPARAMS_DESC(sl_bwp);
paramlist_def_t SL_BWPParamList = {SL_CONFIG_STRING_SL_BWP_LIST, NULL, 0};
sprintf(aprefix, "%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0);
config_getlist(&SL_BWPParamList, NULL, 0, aprefix);
LOG_I(RRC, "NUM SL-BWP elem in cfg file:%d\n", SL_BWPParamList.numelt);
sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0, SL_CONFIG_STRING_SL_BWP_LIST, 0);
config_get( SL_BWPPARAMS,sizeof(SL_BWPPARAMS)/sizeof(paramdef_t),aprefix);
sl_bwp->sl_BWP_PoolConfigCommon_r16 = calloc(1, sizeof(NR_SL_BWP_PoolConfigCommon_r16_t));
paramlist_def_t SL_RxPoolParamList = {SL_CONFIG_STRING_SL_RX_RPOOL_LIST, NULL, 0};
sprintf(aprefix, "%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0);
config_getlist(&SL_RxPoolParamList, NULL, 0, aprefix);
LOG_I(RRC, "NUM Rx RPOOLs in cfg file:%d\n", SL_RxPoolParamList.numelt);
AssertFatal(SL_RxPoolParamList.numelt <= 1 && num_rx_pools <= 1, "Only Max 1 RX Respool Supported now\n");
if (num_rx_pools || SL_RxPoolParamList.numelt) {
// Receiving resource pool.
NR_SL_ResourcePool_r16_t *respool = calloc(1, sizeof(*respool));
sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16 = calloc(1, sizeof(*sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16));
ASN_SEQUENCE_ADD(&sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16->list, respool);
// Fill RX resource pool
prepare_NR_SL_ResourcePool(sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16->list.array[0], 0, sl_syncsource);
} else
sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16 = NULL;
paramlist_def_t SL_TxPoolParamList = {SL_CONFIG_STRING_SL_TX_RPOOL_LIST, NULL, 0};
sprintf(aprefix, "%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0);
config_getlist(&SL_TxPoolParamList, NULL, 0, aprefix);
LOG_I(RRC, "NUM Tx RPOOL in cfg file:%d\n", SL_TxPoolParamList.numelt);
AssertFatal(SL_TxPoolParamList.numelt <= 1 && num_tx_pools <= 1, "Only Max 1 TX Respool Supported now\n");
if (num_tx_pools || SL_TxPoolParamList.numelt) {
//resource pool(s) to transmit NR SL
NR_SL_ResourcePoolConfig_r16_t *respoolcfg = calloc(1, sizeof(*respoolcfg));
sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16 =
calloc(1, sizeof(*sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16));
ASN_SEQUENCE_ADD(&sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16->list, respoolcfg);
sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16->list.array[0]->sl_ResourcePoolID_r16 = 0;
sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16->list.array[0]->sl_ResourcePool_r16 = calloc(1, sizeof(NR_SL_ResourcePool_r16_t));
// Fill tx resource pool
prepare_NR_SL_ResourcePool(sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16->list.array[0]->sl_ResourcePool_r16, 1, sl_syncsource);
} else
sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16 = NULL;
sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolExceptional_r16 = NULL;
}
static void prepare_NR_SL_FreqConfigCommon(NR_SL_FreqConfigCommon_r16_t *sl_fcfg,
uint16_t num_tx_pools,
uint16_t num_rx_pools,
uint16_t sl_syncsource)
{
// Sub carrier spacing used on this frequency configured.
NR_SCS_SpecificCarrier_t *scs_specific = calloc(1, sizeof(*scs_specific));
ASN_SEQUENCE_ADD(&sl_fcfg->sl_SCS_SpecificCarrierList_r16.list, scs_specific);
// NR bands for Sidelink n47, n38.
// N47band - 5855Mhz - 5925Mhz
//sl_fcfg->sl_AbsoluteFrequencyPointA_r16 = 792000; //freq 5880Mhz
//SL SSB chosen to be located from RB10 to RB21. points to the middle of the SSB block.
//SSB location should be within Sidelink BWP
//792000 + 10*12*2 + 66*2. channel raster is 15Khz for band47
sl_fcfg->sl_AbsoluteFrequencySSB_r16 = calloc(1, sizeof(NR_ARFCN_ValueNR_t));
//NR SL transmission with a 7.5 Khz shift to the LTE raster. if absent, freq shift is disabled.
//Required if carrier freq configured for NR SL shared by LTE SL
sl_fcfg->frequencyShift7p5khzSL_r16 = NULL;
//NR SL transmission with valueN*5Khz shift to LTE raster.
sl_fcfg->valueN_r16 = 0;
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
paramdef_t SL_FCCPARAMS[] = SL_FCCPARAMS_DESC(sl_fcfg);
paramlist_def_t SL_FCCParamList = {SL_CONFIG_STRING_SL_FCC_LIST, NULL, 0};
sprintf(aprefix, "%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION,0);
config_getlist(&SL_FCCParamList, NULL, 0, aprefix);
LOG_I(RRC, "NUM SL-FCC elem in cfg file:%d\n", SL_FCCParamList.numelt);
sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION,0, SL_CONFIG_STRING_SL_FCC_LIST, 0);
config_get( SL_FCCPARAMS,sizeof(SL_FCCPARAMS)/sizeof(paramdef_t),aprefix);
// Sidelink BWP configuration.
// In REL16, 17 SUPPORTS only 1 SIDELINK Bandwidth part
NR_SL_BWP_ConfigCommon_r16_t *bwpcfgcommon = calloc(1, sizeof(*bwpcfgcommon));
sl_fcfg->sl_BWP_List_r16 = calloc(1, sizeof(*sl_fcfg->sl_BWP_List_r16));
ASN_SEQUENCE_ADD(&sl_fcfg->sl_BWP_List_r16->list, bwpcfgcommon);
prepare_NR_SL_BWPConfigCommon(sl_fcfg->sl_BWP_List_r16->list.array[0], num_tx_pools, num_rx_pools, sl_syncsource);
// sync prio between GNSS and gNB/eNB
sl_fcfg->sl_SyncPriority_r16 = calloc(1, sizeof(long));
*sl_fcfg->sl_SyncPriority_r16 = 0; // Set to GNSS
// If TRUE/1 - Network can be selected as sync source directly/indirectly in case syncprio = GNSS.
sl_fcfg->sl_NbAsSync_r16 = calloc(1, sizeof(long));
*sl_fcfg->sl_NbAsSync_r16 = 1;
// config info related to rx and tx of SL SYNC SIGNALS (SLSS)
NR_SL_SyncConfig_r16_t *synccfg = calloc(1, sizeof(*synccfg));
sl_fcfg->sl_SyncConfigList_r16 = calloc(1, sizeof(*sl_fcfg->sl_SyncConfigList_r16));
ASN_SEQUENCE_ADD(&sl_fcfg->sl_SyncConfigList_r16->list, synccfg);
prepare_NR_SL_SyncConfig(sl_fcfg->sl_SyncConfigList_r16->list.array[0]);
}
NR_SL_PreconfigurationNR_r16_t *prepare_NR_SL_PRECONFIGURATION(uint16_t num_tx_pools,
uint16_t num_rx_pools,
uint16_t sl_syncsource)
{
NR_SL_PreconfigurationNR_r16_t *sl_preconfiguration = CALLOC(1, sizeof(NR_SL_PreconfigurationNR_r16_t));
NR_SidelinkPreconfigNR_r16_t *sl_preconfig = &sl_preconfiguration->sidelinkPreconfigNR_r16;
//FILL in Frequency config common
NR_SL_FreqConfigCommon_r16_t *freqcfgcommon = calloc(1, sizeof(*freqcfgcommon));
sl_preconfig->sl_PreconfigFreqInfoList_r16 = calloc(1, sizeof(*sl_preconfig->sl_PreconfigFreqInfoList_r16));
//Supported only 1 FREQs for NR SL communication.
ASN_SEQUENCE_ADD(&sl_preconfig->sl_PreconfigFreqInfoList_r16->list, freqcfgcommon);
prepare_NR_SL_FreqConfigCommon(sl_preconfig->sl_PreconfigFreqInfoList_r16->list.array[0],
num_tx_pools, num_rx_pools, sl_syncsource);
// NR Frequency list
sl_preconfig->sl_PreconfigNR_AnchorCarrierFreqList_r16 = NULL;
// EUTRA Frequency list
sl_preconfig->sl_PreconfigEUTRA_AnchorCarrierFreqList_r16 = NULL;
// NR sidelink radio bearer(s) configuration(s)
sl_preconfig->sl_RadioBearerPreConfigList_r16 = NULL; // fill later
// NR sidelink RLC bearer(s) configuration(s)
sl_preconfig->sl_RLC_BearerPreConfigList_r16 = NULL; // fill later
//Measurement and reporting configuration
sl_preconfig->sl_MeasPreConfig_r16 = NULL;
//DFN timing offset used if GNSS is used as sync source.
//1-.001ms, 2 - .002ms so on. value 0 if absent.
sl_preconfig->sl_OffsetDFN_r16 = NULL;
// t400 started upon txn of RRCreconfSidelink.
sl_preconfig->t400_r16 = NULL;
//Max num consecutive HARQ DTX before triggering SL RLF.
sl_preconfig->sl_MaxNumConsecutiveDTX_r16 = NULL;
//Priority of SSB transmission and reception. used in comparison to UL rxns/txns
sl_preconfig->sl_SSB_PriorityNR_r16 = NULL;
//Contains TDD ULDL confiuguration to be used by the sync source UE.
//Currently set to the default used in OAI 5G. Changes TBD..
//For the UE with sync reference as another UE, TDD ULDL config is determined from SL-MIB
sl_preconfig->sl_PreconfigGeneral_r16 = calloc(1, sizeof(NR_SL_PreconfigGeneral_r16_t));
sl_preconfig->sl_PreconfigGeneral_r16->sl_TDD_Configuration_r16 = calloc(1, sizeof(NR_TDD_UL_DL_ConfigCommon_t));
NR_TDD_UL_DL_ConfigCommon_t *tdd_uldl_cfg = sl_preconfig->sl_PreconfigGeneral_r16->sl_TDD_Configuration_r16;
tdd_uldl_cfg->pattern1.ext1 = NULL;
tdd_uldl_cfg->pattern2 = NULL;
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
sprintf(aprefix, "%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION,0);
paramdef_t SLTDDCFG_PARAMS[] = SL_TDDCONFIGPARAMS_DESC(tdd_uldl_cfg);
config_get(SLTDDCFG_PARAMS,sizeof(SLTDDCFG_PARAMS)/sizeof(paramdef_t),aprefix);
NR_SL_FreqConfigCommon_r16_t *fcc = sl_preconfig->sl_PreconfigFreqInfoList_r16->list.array[0];
tdd_uldl_cfg->referenceSubcarrierSpacing =
fcc->sl_SCS_SpecificCarrierList_r16.list.array[0]->subcarrierSpacing;
NR_SL_BWP_ConfigCommon_r16_t *sl_bwp = fcc->sl_BWP_List_r16->list.array[0];
sl_bwp->sl_BWP_Generic_r16->sl_BWP_r16->subcarrierSpacing =
fcc->sl_SCS_SpecificCarrierList_r16.list.array[0]->subcarrierSpacing;
// Configurations used for UE autonomous resource selection
sl_preconfig->sl_UE_SelectedPreConfig_r16 = NULL;
// indicates if CSI reporting supported in SL unicast.
sl_preconfig->sl_CSI_Acquisition_r16 = NULL;
// ROHC profiles for NR SL
sl_preconfig->sl_RoHC_Profiles_r16 = NULL;
// MaxCID value for PDCP as specified in 38.323
sl_preconfig->sl_MaxCID_r16 = NULL;
return sl_preconfiguration;
}
int configure_NR_SL_Preconfig(int sync_source)
{
NR_SL_PreconfigurationNR_r16_t *sl_preconfig = NULL;
int num_txpools = 0, num_rxpools = 0;
if (sync_source) {
//SL-Preconfiguration with 1 txpool, 0 rxpool if UE is a syncsource
num_txpools = 1;
sl_preconfig = prepare_NR_SL_PRECONFIGURATION(num_txpools,num_rxpools,sync_source);
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_NR_SL_PreconfigurationNR_r16, sl_preconfig);
}
} else {
//SL-Preconfiguration with 0 txpool, 1 rxpool if UE is not a syncsource
num_rxpools = 1;
sl_preconfig = prepare_NR_SL_PRECONFIGURATION(num_txpools,num_rxpools,sync_source);
if (LOG_DEBUGFLAG(DEBUG_ASN1)) {
xer_fprint(stdout, &asn_DEF_NR_SL_PreconfigurationNR_r16, sl_preconfig);
}
}
ASN_STRUCT_FREE(asn_DEF_NR_SL_PreconfigurationNR_r16, sl_preconfig);
sl_preconfig = NULL;
//END.......
return 0;
}
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef __SL_PRECONFIG_PARAMSVALUES__H__
#define __SL_PRECONFIG_PARAMSVALUES__H__
#include "NR_SL-PreconfigurationNR-r16.h"
#include "common/config/config_userapi.h"
#define SL_CONFIG_STRING_SL_PRECONFIGURATION "SIDELINK_PRECONFIGURATION"
/* Sidelink Frequency common configuration in SL-Preconfig */
#define SL_CONFIG_STRING_SL_FCC_LIST "sl_FrequencyCommonConfig"
#define SL_CONFIG_STRING_SLOFFSETTOCARRIER "sl_offstToCarrier"
#define SL_CONFIG_STRING_FCC_SUBCARRIERSPACING "sl_subcarrierSpacing"
#define SL_CONFIG_STRING_SLCARRIERBANDWIDTH "sl_carrierBandwidth"
#define SL_CONFIG_STRING_SLABSOLUTEFREQUENCYSSB "sl_absoluteFrequencySSB"
#define SL_CONFIG_STRING_SLABSOLUEFREQUENCYPOINTA "sl_absoluteFrequencyPointA"
// Sidelink TDD ULDL configuration parameters in SL-Preconfig
#define SL_CONFIG_STRING_DLULTRANSMISSIONPERIODICITY "sl_dl_UL_TransmissionPeriodicity"
#define SL_CONFIG_STRING_NROFDOWNLINKSLOTS "sl_nrofDownlinkSlots"
#define SL_CONFIG_STRING_NROFDOWNLINKSYMBOLS "sl_nrofDownlinkSymbols"
#define SL_CONFIG_STRING_NROFUPLINKSLOTS "sl_nrofUplinkSlots"
#define SL_CONFIG_STRING_NROFUPLINKSYMBOLS "sl_nrofUplinkSymbols"
// Sidelink sync config parameters in SL-Preconfig.
// 3 sets possible per sync config list entry
#define SL_CONFIG_STRING_SL_SYNCCONFIG_LIST "sl_syncCfg"
#define SL_CONFIG_STRING_SL_NUMSSB_WITHINPERIOD_0 "sl_NumSSB_WithinPeriod_0"
#define SL_CONFIG_STRING_SL_TIMEOFFSET_SSB_0 "sl_TimeOffsetSSB_0"
#define SL_CONFIG_STRING_SL_TIMEINTERVAL_0 "sl_TimeInterval_0"
#define SL_CONFIG_STRING_SL_NUMSSB_WITHINPERIOD_1 "sl_NumSSB_WithinPeriod_1"
#define SL_CONFIG_STRING_SL_TIMEOFFSET_SSB_1 "sl_TimeOffsetSSB_1"
#define SL_CONFIG_STRING_SL_TIMEINTERVAL_1 "sl_TimeInterval_1"
#define SL_CONFIG_STRING_SL_NUMSSB_WITHINPERIOD_2 "sl_NumSSB_WithinPeriod_2"
#define SL_CONFIG_STRING_SL_TIMEOFFSET_SSB_2 "sl_TimeOffsetSSB_2"
#define SL_CONFIG_STRING_SL_TIMEINTERVAL_2 "sl_TimeInterval_2"
/*Sidelink Bandwidth related parameters in SL-Preconfig */
#define SL_CONFIG_STRING_SL_BWP_LIST "sl_BWP"
#define SL_CONFIG_STRING_SL_BWP_START_AND_SIZE "sl_locationAndBandwidth"
#define SL_CONFIG_STRING_SL_BWP_NUM_SYMBOLS "sl_LengthSymbols"
#define SL_CONFIG_STRING_SL_BWP_START_SYMBOL "sl_StartSymbol"
/*Sidelink Resource pool related parameters in SL-Preconfig */
#define SL_CONFIG_STRING_SL_RX_RPOOL_LIST "sl_RxResPools"
#define SL_CONFIG_STRING_SL_TX_RPOOL_LIST "sl_TxResPools"
#define SL_CONFIG_STRING_RESPOOL_PSCCH_NUMSYM "sl_TimeResourcePSCCH"
#define SL_CONFIG_STRING_RESPOOL_PSCCH_NUMRBS "sl_FreqResourcePSCCH"
#define SL_CONFIG_STRING_RESPOOL_SUBCH_SIZE_IN_RBS "sl_SubchannelSize"
#define SL_CONFIG_STRING_RESPOOL_SUBCH_START_RB "sl_StartRB_Subchannel"
#define SL_CONFIG_STRING_RESPOOL_NUM_RBS "sl_RB_Number"
#define SL_CONFIG_STRING_RESPOOL_NUM_SUBCHS "sl_NumSubchannel"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Sidelink Frequency common Cell Config parameters */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Please refer to 3GPP SPEC 38.331 (RRC Specification) for details about these parameters
sl_AbsoluteFrequencyPointA_r16 - ARFCN of the lowest subcarrier for sidelink operation
sl_AbsoluteFrequencySSB_r16 - ARFCN of the center RE of sidelink SSB of length 11 RBs
*/
#define SL_FCCPARAMS_DESC(sl_fcc) { \
{SL_CONFIG_STRING_SLOFFSETTOCARRIER,NULL,0,.i64ptr=&sl_fcc->sl_SCS_SpecificCarrierList_r16.list.array[0]->offsetToCarrier,.defint64val=0,TYPE_INT64,0}, \
{SL_CONFIG_STRING_FCC_SUBCARRIERSPACING,NULL,0,.i64ptr=&sl_fcc->sl_SCS_SpecificCarrierList_r16.list.array[0]->subcarrierSpacing,.defint64val=NR_SubcarrierSpacing_kHz30,TYPE_INT64,0},\
{SL_CONFIG_STRING_SLCARRIERBANDWIDTH,NULL,0,.i64ptr=&sl_fcc->sl_SCS_SpecificCarrierList_r16.list.array[0]->carrierBandwidth,.defint64val=106,TYPE_INT64,0}, \
{SL_CONFIG_STRING_SLABSOLUEFREQUENCYPOINTA,NULL,0,.i64ptr=&sl_fcc->sl_AbsoluteFrequencyPointA_r16,.defint64val=792000,TYPE_INT64,0},\
{SL_CONFIG_STRING_SLABSOLUTEFREQUENCYSSB,NULL,0,.i64ptr=sl_fcc->sl_AbsoluteFrequencySSB_r16,.defint64val=792372,TYPE_INT64,0}}
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Sidelink TDD ULDL Config parameters */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Please refer to 3GPP SPEC 38.331 (RRC Specification) for details about these parameters
TDD ul dl configuration used for sidelink operation set in Sidelink Preconfiguration IE
*/
#define SL_TDDCONFIGPARAMS_DESC(sl_tdd_ul_dl_cfg) { \
{SL_CONFIG_STRING_DLULTRANSMISSIONPERIODICITY,NULL,0,.i64ptr=&sl_tdd_ul_dl_cfg->pattern1.dl_UL_TransmissionPeriodicity,.defint64val=6,TYPE_INT64,0}, \
{SL_CONFIG_STRING_NROFDOWNLINKSLOTS,NULL,0,.i64ptr=&sl_tdd_ul_dl_cfg->pattern1.nrofDownlinkSlots,.defint64val=7,TYPE_INT64,0},\
{SL_CONFIG_STRING_NROFDOWNLINKSYMBOLS,NULL,0,.i64ptr=&sl_tdd_ul_dl_cfg->pattern1.nrofDownlinkSymbols,.defint64val=10,TYPE_INT64,0}, \
{SL_CONFIG_STRING_NROFUPLINKSLOTS,NULL,0,.i64ptr=&sl_tdd_ul_dl_cfg->pattern1.nrofUplinkSlots,.defint64val=2,TYPE_INT64,0},\
{SL_CONFIG_STRING_NROFUPLINKSYMBOLS,NULL,0,.i64ptr=&sl_tdd_ul_dl_cfg->pattern1.nrofUplinkSymbols,.defint64val=4,TYPE_INT64,0}}
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Sidelink Sync config parameters */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Please refer to 3GPP SPEC 38.331 (RRC Specification) for details about these parameters
These parameters indicate the repetition of Sidelink SSB
sl_NumSSB_WithinPeriod_r16 - number of SSB transmissions within 16 frames
sl_TimeOffsetSSB_r16 - timeoffset in slots for the first SL-SSB transmission within 16 frames
sl_TimeInterval_r16 - interval in slots between SL-SSB transmissions
*/
#define SL_SYNCPARAMS_DESC(sl_syncconfig) { \
{SL_CONFIG_STRING_SL_NUMSSB_WITHINPERIOD_0,NULL,0,.i64ptr=sl_syncconfig->sl_SSB_TimeAllocation1_r16->sl_NumSSB_WithinPeriod_r16,.defint64val=1,TYPE_INT64,0}, \
{SL_CONFIG_STRING_SL_TIMEOFFSET_SSB_0,NULL,0,.i64ptr=sl_syncconfig->sl_SSB_TimeAllocation1_r16->sl_TimeOffsetSSB_r16,.defint64val=8,TYPE_INT64,0},\
{SL_CONFIG_STRING_SL_TIMEINTERVAL_0,NULL,0,.i64ptr=sl_syncconfig->sl_SSB_TimeAllocation1_r16->sl_TimeInterval_r16,.defint64val=60,TYPE_INT64,0}}
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Sidelink BWP Config parameters */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Please refer to 3GPP SPEC 38.331 (RRC Specification) for details about these parameters
Sidelink BandWidthPart parameters
locationAndBandwidth - determines the start and size of Sidelink BWP
sl_LengthSymbols_r16 - number of symbols in a slot used for sidelink operation
sl_StartSymbol_r16 - start symbol for sidelink operation in a slot
*/
#define SL_BWPPARAMS_DESC(sl_bwp) { \
{SL_CONFIG_STRING_SL_BWP_START_AND_SIZE,NULL,0,.i64ptr=&sl_bwp->sl_BWP_Generic_r16->sl_BWP_r16->locationAndBandwidth,.defint64val=28875,TYPE_INT64,0}, \
{SL_CONFIG_STRING_SL_BWP_NUM_SYMBOLS,NULL,0,.i64ptr=sl_bwp->sl_BWP_Generic_r16->sl_LengthSymbols_r16,.defint64val=7,TYPE_INT64,0}, \
{SL_CONFIG_STRING_SL_BWP_START_SYMBOL,NULL,0,.i64ptr=sl_bwp->sl_BWP_Generic_r16->sl_StartSymbol_r16,.defint64val=0,TYPE_INT64,0}}
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Sidelink Resource pool parameters */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Please refer to 3GPP SPEC 38.331 (RRC Specification) for details about these parameters
Sidelink TX/RX resource pool parameters
sl_TimeResourcePSCCH_r16 - number of symbols used for PSCCH
sl_SubchannelSize_r16 - number of PRBs in every subchannel in a resource pool
sl_StartRB_Subchannel_r16 - lowest RB of a lowest subchannel in a resource pool
sl_RB_Number_r16 - number of RBs in a resource pool
*/
#define SL_RESPOOLPARAMS_DESC(sl_res_pool) { \
{SL_CONFIG_STRING_RESPOOL_PSCCH_NUMSYM,NULL,0,.i64ptr=sl_res_pool->sl_PSCCH_Config_r16->choice.setup->sl_TimeResourcePSCCH_r16,.defint64val=1,TYPE_INT64,0}, \
{SL_CONFIG_STRING_RESPOOL_PSCCH_NUMRBS,NULL,0,.i64ptr=sl_res_pool->sl_PSCCH_Config_r16->choice.setup->sl_FreqResourcePSCCH_r16,.defint64val=4,TYPE_INT64,0}, \
{SL_CONFIG_STRING_RESPOOL_SUBCH_SIZE_IN_RBS,NULL,0,.i64ptr=sl_res_pool->sl_SubchannelSize_r16,.defint64val=0,TYPE_INT64,0},\
{SL_CONFIG_STRING_RESPOOL_SUBCH_START_RB,NULL,0,.i64ptr=sl_res_pool->sl_StartRB_Subchannel_r16,.defint64val=0,TYPE_INT64,0},\
{SL_CONFIG_STRING_RESPOOL_NUM_RBS,NULL,0,.i64ptr=sl_res_pool->sl_RB_Number_r16,.defint64val=106,TYPE_INT64,0},\
{SL_CONFIG_STRING_RESPOOL_NUM_SUBCHS,NULL,0,.i64ptr=sl_res_pool->sl_NumSubchannel_r16,.defint64val=10,TYPE_INT64,0}}
#endif
#Configure Sidelink Preconfiguration params here.
SIDELINK_PRECONFIGURATION = (
{
# TDD ULDL CONFIG used for sidelink
sl_dl_UL_TransmissionPeriodicity = 6;
sl_nrofDownlinkSlots = 7;
sl_nrofDownlinkSymbols = 10;
sl_nrofUplinkSlots = 2;
sl_nrofUplinkSymbols = 4;
sl_FrequencyCommonConfig = (
{
sl_offstToCarrier = 0;
sl_subcarrierSpacing = 1;//0-15Khz, 1-30Khz
sl_carrierBandwidth = 106;//numPRBs
#NR bands for Sidelink n47, n38. N47 - 5855Mhz - 5925Mhz
#SL SSB chosen to be located from RB10 to RB21. points to the middle of the SSB block.
#SSB location should be within Sidelink BWP
#792000 + 10*12*2 + 66*2. channel raster is 15Khz for band47
sl_absoluteFrequencySSB = 792372;
sl_absoluteFrequencyPointA = 792000;
}
);
sl_BWP = (
{
#RB start 0, RB size = 106. occupies complete Bw.
sl_locationAndBandwidth = 28875;
#Num Symbols used for Sidelink in an uplink slot
#Value can be between 0 to 7 indicating 7 to 14 symbols.
sl_LengthSymbols = 4;
#Sidelink Starting symbol in a slot
#Value can be between symbols 0 to 7
sl_StartSymbol = 0;
}
);
sl_syncCfg = (
{
#NUM SL-SSB within 16 frames
sl_NumSSB_WithinPeriod_0 = 2;
#Slot Offset for the first txn in the 16 frame period
sl_TimeOffsetSSB_0 = 8;
#interval in slots for repetition of SL-SSB
sl_TimeInterval_0 = 120;
}
);
sl_RxResPools = (
{
#Number of symbols which carry PSCCH.
#Possible values 0 means 2 symbols, 1 - means 3 symbols.
sl_TimeResourcePSCCH = 1;
#Number of RBS which carry PSCCH
#Possible values {n10,n12,n15,n20,n25}
sl_FreqResourcePSCCH = 4; //25RBs
#Size of subchannel in RBs
#Possible values - {n10,n12,n15,n20,n25,n50,n75,n100}
sl_SubchannelSize = 5;//50RBs
#start in RB of the lowest subchannel in a rpool
sl_StartRB_Subchannel = 0;
#number of PRBs in a rpool
sl_RB_Number = 50;
sl_NumSubchannel = 1;
}
);
}
);
#Configure Sidelink Preconfiguration params here.
SIDELINK_PRECONFIGURATION = (
{
# TDD ULDL CONFIG used for sidelink
sl_dl_UL_TransmissionPeriodicity = 6;
sl_nrofDownlinkSlots = 7;
sl_nrofDownlinkSymbols = 10;
sl_nrofUplinkSlots = 2;
sl_nrofUplinkSymbols = 4;
sl_FrequencyCommonConfig = (
{
sl_offstToCarrier = 0;
sl_subcarrierSpacing = 1;//0-15Khz, 1-30Khz
sl_carrierBandwidth = 106;//numPRBs
#NR bands for Sidelink n47, n38. N47 - 5855Mhz - 5925Mhz
#SL SSB chosen to be located from RB10 to RB21. points to the middle of the SSB block.
#SSB location should be within Sidelink BWP
#792000 + 10*12*2 + 66*2. channel raster is 15Khz for band47
sl_absoluteFrequencySSB = 792372;
sl_absoluteFrequencyPointA = 792000;
}
);
sl_BWP = (
{
#RB start 0, RB size = 106. occupies complete Bw.
sl_locationAndBandwidth = 28875;
#Num Symbols used for Sidelink in an uplink slot
#Value can be between symbols 7 to 14
sl_LengthSymbols = 4;
#Sidelink Starting symbol in a slot
#Value can be between symbols 0 to 7
sl_StartSymbol = 0;
}
);
sl_syncCfg = (
{
#NUM SL-SSB within 16 frames
sl_NumSSB_WithinPeriod_0 = 2;
#Slot Offset for the first txn in the 16 frame period
sl_TimeOffsetSSB_0 = 8;
#interval in slots for repetition of SL-SSB
sl_TimeInterval_0 = 120;
}
);
sl_RxResPools = (
{
#Number of symbols which carry PSCCH.
#Possible values 0 means 2 symbols, 1 - means 3 symbols.
sl_TimeResourcePSCCH = 1;
#Number of RBS which carry PSCCH
#Possible values {n10,n12,n15,n20,n25}
sl_FreqResourcePSCCH = 4; //25RBs
#Size of subchannel in RBs
#Possible values - {n10,n12,n15,n20,n25,n50,n75,n100}
sl_SubchannelSize = 5;//10RBs
#start in RB of the lowest subchannel in a rpool
sl_StartRB_Subchannel = 0;
#number of PRBs in a rpool
sl_RB_Number = 50;
sl_NumSubchannel = 1;
}
);
sl_TxResPools = (
{
#Number of symbols which carry PSCCH.
#Possible values 0 means 2 symbols, 1 - means 3 symbols.
sl_TimeResourcePSCCH = 1;
#Number of RBS which carry PSCCH
#Possible values {n10,n12,n15,n20,n25}
sl_FreqResourcePSCCH = 4; //25RBs
#Size of subchannel in RBs
#Possible values - {n10,n12,n15,n20,n25,n50,n75,n100}
sl_SubchannelSize = 5;//50RBs
#start in RB of the lowest subchannel in a rpool
sl_StartRB_Subchannel = 0;
#number of PRBs in a rpool
sl_RB_Number = 50;
sl_NumSubchannel = 1;
}
);
}
);
#Configure Sidelink Preconfiguration params here.
SIDELINK_PRECONFIGURATION = (
{
# TDD ULDL CONFIG used for sidelink
sl_dl_UL_TransmissionPeriodicity = 6;
sl_nrofDownlinkSlots = 7;
sl_nrofDownlinkSymbols = 10;
sl_nrofUplinkSlots = 2;
sl_nrofUplinkSymbols = 4;
sl_FrequencyCommonConfig = (
{
sl_offstToCarrier = 0;
sl_subcarrierSpacing = 1;//0-15Khz, 1-30Khz
sl_carrierBandwidth = 106;//numPRBs
#NR bands for Sidelink n47, n38. N47 - 5855Mhz - 5925Mhz
#SL SSB chosen to be located from RB10 to RB21. points to the middle of the SSB block.
#SSB location should be within Sidelink BWP
#792000 + 10*12*2 + 66*2. channel raster is 15Khz for band47
sl_absoluteFrequencySSB = 792372;
sl_absoluteFrequencyPointA = 792000;
}
);
sl_BWP = (
{
#RB start 0, RB size = 106. occupies complete Bw.
sl_locationAndBandwidth = 28875;
#Num Symbols used for Sidelink in an uplink slot
#Value can be between 0 to 7 indicating 7 to 14 symbols.
sl_LengthSymbols = 4;
#Sidelink Starting symbol in a slot
#Value can be between symbols 0 to 7
sl_StartSymbol = 0;
}
);
sl_syncCfg = (
{
#NUM SL-SSB within 16 frames
sl_NumSSB_WithinPeriod_0 = 2;
#Slot Offset for the first txn in the 16 frame period
sl_TimeOffsetSSB_0 = 8;
#interval in slots for repetition of SL-SSB
sl_TimeInterval_0 = 120;
}
);
sl_TxResPools = (
{
#Number of symbols which carry PSCCH.
#Possible values 0 means 2 symbols, 1 - means 3 symbols.
sl_TimeResourcePSCCH = 1;
#Number of RBS which carry PSCCH
#Possible values {n10,n12,n15,n20,n25}
sl_FreqResourcePSCCH = 4; //25RBs
#Size of subchannel in RBs
#Possible values - {n10,n12,n15,n20,n25,n50,n75,n100}
sl_SubchannelSize = 5;//50RBs
#start in RB of the lowest subchannel in a rpool
sl_StartRB_Subchannel = 0;
#number of PRBs in a rpool
sl_RB_Number = 50;
sl_NumSubchannel = 1;
}
);
}
);
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