Commit 4b51859b authored by Raghavendra Dinavahi's avatar Raghavendra Dinavahi

Enabling configuration files read for SL-Preconfig

	- for example when running nr-uesoftmodem with sidelink
	  use "-O ../../../targets/PROJECTS/NR-SIDELINK/CONF/sidelink_preconfig_1rxpool_1txpool.conf"
parent daf8e373
......@@ -36,6 +36,8 @@
#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) {
......@@ -370,6 +372,127 @@ NR_SL_PreconfigurationNR_r16_t *prepare_NR_SL_PRECONFIGURATION(uint16_t num_tx_p
return sl_preconfiguration;
}
static void get_NR_SL_Preconfig_params(NR_SL_PreconfigurationNR_r16_t *sl_preconfig) {
char aprefix[MAX_OPTNAME_SIZE*2 + 8];
sprintf(aprefix, "%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION,0);
NR_TDD_UL_DL_ConfigCommon_t *sl_tdd_uldl_cfg =
sl_preconfig->sidelinkPreconfigNR_r16.sl_PreconfigGeneral_r16->sl_TDD_Configuration_r16;
paramdef_t SLTDDCFG_PARAMS[] = SL_TDDCONFIGPARAMS_DESC(sl_tdd_uldl_cfg);
config_get(SLTDDCFG_PARAMS,sizeof(SLTDDCFG_PARAMS)/sizeof(paramdef_t),aprefix);
NR_SL_FreqConfigCommon_r16_t *sl_fcc = sl_preconfig->sidelinkPreconfigNR_r16.sl_PreconfigFreqInfoList_r16->list.array[0];
paramdef_t SL_FCCPARAMS[] = SL_FCCPARAMS_DESC(sl_fcc);
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);
if (SL_FCCParamList.numelt > 0) {
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);
}
NR_SL_BWP_ConfigCommon_r16_t *sl_bwp = sl_fcc->sl_BWP_List_r16->list.array[0];
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);
if (SL_BWPParamList.numelt > 0) {
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_Generic_r16->sl_BWP_r16->subcarrierSpacing =
sl_fcc->sl_SCS_SpecificCarrierList_r16.list.array[0]->subcarrierSpacing;
sl_tdd_uldl_cfg->referenceSubcarrierSpacing =
sl_fcc->sl_SCS_SpecificCarrierList_r16.list.array[0]->subcarrierSpacing;
NR_SL_SyncConfig_r16_t *sl_synccfg = sl_fcc->sl_SyncConfigList_r16->list.array[0];
paramdef_t SL_SYNCCFGPARAMS[] = SL_SYNCPARAMS_DESC(sl_synccfg);
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);
if (SL_SYNCFGParamList.numelt > 0) {
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);
}
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, "Only Max 1 RX Respool Supported now\n");
if (SL_RxPoolParamList.numelt > 0) {
NR_SL_ResourcePool_r16_t *rxpool = NULL;
if (sl_bwp->sl_BWP_PoolConfigCommon_r16 == NULL)
sl_bwp->sl_BWP_PoolConfigCommon_r16 = calloc(1, sizeof(*sl_bwp->sl_BWP_PoolConfigCommon_r16));
if (sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16 == NULL)
sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16 = calloc(1, sizeof(*sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16));
if (sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16->list.count == 0) {
rxpool = calloc(1, sizeof(NR_SL_ResourcePool_r16_t));
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, rxpool);
// Fill RX resource pool
prepare_NR_SL_ResourcePool(sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16->list.array[0], 0, 0);
}
rxpool = sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_RxPool_r16->list.array[0];
paramdef_t SL_RXPOOLPARAMS[] = SL_RESPOOLPARAMS_DESC(rxpool);
sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0,SL_CONFIG_STRING_SL_RX_RPOOL_LIST, 0);
config_get(SL_RXPOOLPARAMS,sizeof(SL_RXPOOLPARAMS)/sizeof(paramdef_t),aprefix);
} else {
if (sl_bwp->sl_BWP_PoolConfigCommon_r16)
ASN_STRUCT_FREE(asn_DEF_NR_SL_BWP_ConfigCommon_r16, sl_bwp->sl_BWP_PoolConfigCommon_r16);
}
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, "Only Max 1 TX Respool Supported now\n");
if (SL_TxPoolParamList.numelt > 0) {
NR_SL_ResourcePool_r16_t *txpool = NULL;
if (sl_bwp->sl_BWP_PoolConfigCommon_r16 == NULL)
sl_bwp->sl_BWP_PoolConfigCommon_r16 = calloc(1, sizeof(*sl_bwp->sl_BWP_PoolConfigCommon_r16));
if (sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16 == NULL)
sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16 =
calloc(1, sizeof(*sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16));
if (sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16->list.count == 0) {
NR_SL_ResourcePoolConfig_r16_t *respoolcfg = calloc(1, sizeof(*respoolcfg));
respoolcfg->sl_ResourcePoolID_r16 = 0;
respoolcfg->sl_ResourcePool_r16 = calloc(1, sizeof(NR_SL_ResourcePool_r16_t));
ASN_SEQUENCE_ADD(&sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16->list, respoolcfg);
// Fill TX resource pool
prepare_NR_SL_ResourcePool(sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16->list.array[0]->sl_ResourcePool_r16, 1, 0);
}
txpool = sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16->list.array[0]->sl_ResourcePool_r16;
paramdef_t SL_TXPOOLPARAMS[] = SL_RESPOOLPARAMS_DESC(txpool);
sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0,SL_CONFIG_STRING_SL_TX_RPOOL_LIST, 0);
config_get(SL_TXPOOLPARAMS,sizeof(SL_TXPOOLPARAMS)/sizeof(paramdef_t),aprefix);
} else {
if (sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16) {
ASN_STRUCT_FREE(asn_DEF_NR_SL_ResourcePoolConfig_r16, sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16->list.array[0]);
free(sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16);
sl_bwp->sl_BWP_PoolConfigCommon_r16->sl_TxPoolSelectedNormal_r16 = NULL;
}
}
return;
}
static void dump_NR_SL_ResourcePoolParams(NR_SL_ResourcePool_r16_t *respool) {
......@@ -564,6 +687,11 @@ int configure_NR_SL_Preconfig() {
NR_SL_PreconfigurationNR_r16_t *sl_preconfig = prepare_NR_SL_PRECONFIGURATION(1,1,0);
dump_NR_SL_Preconfiguration(sl_preconfig);
if (!CONFIG_ISFLAGSET(CONFIG_NOOOPT)) {
get_NR_SL_Preconfig_params(sl_preconfig);
dump_NR_SL_Preconfiguration(sl_preconfig);
}
ASN_STRUCT_FREE(asn_DEF_NR_SL_PreconfigurationNR_r16, sl_preconfig);
sl_preconfig = NULL;
//END.......
......@@ -572,6 +700,11 @@ int configure_NR_SL_Preconfig() {
sl_preconfig = prepare_NR_SL_PRECONFIGURATION(1,0,1);
dump_NR_SL_Preconfiguration(sl_preconfig);
if (!CONFIG_ISFLAGSET(CONFIG_NOOOPT)) {
get_NR_SL_Preconfig_params(sl_preconfig);
dump_NR_SL_Preconfiguration(sl_preconfig);
}
ASN_STRUCT_FREE(asn_DEF_NR_SL_PreconfigurationNR_r16, sl_preconfig);
sl_preconfig = NULL;
//END
......@@ -580,6 +713,11 @@ int configure_NR_SL_Preconfig() {
sl_preconfig = prepare_NR_SL_PRECONFIGURATION(0,1,0);
dump_NR_SL_Preconfiguration(sl_preconfig);
if (!CONFIG_ISFLAGSET(CONFIG_NOOOPT)) {
get_NR_SL_Preconfig_params(sl_preconfig);
dump_NR_SL_Preconfiguration(sl_preconfig);
}
ASN_STRUCT_FREE(asn_DEF_NR_SL_PreconfigurationNR_r16, sl_preconfig);
sl_preconfig = NULL;
......
/*
* 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
*/
/* \file sl_preconfig_paramvalues.h
* \brief
* \author Raghavendra Dinavahi
* \date
* \version 0.1
* \company
* \email:
* \note
* \warning
*/
#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"
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Params to fill Sidelink PRECONFIG */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define SL_PRECONFIG_DESC(x,y) {\
{SL_CONFIG_STRING_SL_BWP_NUM_RX_POOLS,NULL,0,.uptr=&x,.defintval=0,TYPE_UINT,0},\
{SL_CONFIG_STRING_SL_BWP_NUM_RX_POOLS,NULL,0,.uptr=&y,.defintval=0,TYPE_UINT,0}}
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* Sidelink Frequency common Cell Config parameters */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#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 */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#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 */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#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=8,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 */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#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=14,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 */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#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