Commit d2475e0d authored by Ejaz Ahmed's avatar Ejaz Ahmed

Added separate conf files for sync_ref & nearby ue; reverted tx scheduling conditions

parent c584baf9
...@@ -3615,7 +3615,7 @@ void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind) { ...@@ -3615,7 +3615,7 @@ void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind) {
nr_ue_sl_pscch_rx_scheduler(sl_ind, mac->sl_bwp, mac->sl_rx_res_pool,&rx_config, &tti_action); nr_ue_sl_pscch_rx_scheduler(sl_ind, mac->sl_bwp, mac->sl_rx_res_pool,&rx_config, &tti_action);
} }
if (!is_psbch_slot && tx_allowed) { if (!is_psbch_slot && tx_allowed && sl_ind->slot_type == SIDELINK_SLOT_TYPE_TX) {
//Check if reserved slot or a sidelink resource configured in Rx/Tx resource pool timeresource bitmap //Check if reserved slot or a sidelink resource configured in Rx/Tx resource pool timeresource bitmap
bool schedule_slsch = nr_ue_sl_pssch_scheduler(mac, sl_ind, mac->sl_bwp, mac->sl_tx_res_pool, &tx_config, &tti_action); bool schedule_slsch = nr_ue_sl_pssch_scheduler(mac, sl_ind, mac->sl_bwp, mac->sl_tx_res_pool, &tx_config, &tti_action);
bool is_csi_rs_sent = false; bool is_csi_rs_sent = false;
...@@ -3625,7 +3625,7 @@ void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind) { ...@@ -3625,7 +3625,7 @@ void nr_ue_sidelink_scheduler(nr_sidelink_indication_t *sl_ind) {
is_csi_rs_sent = true; is_csi_rs_sent = true;
LOG_D(NR_MAC, "%4d.%2d Scheduling CSI-RS\n", frame, slot); LOG_D(NR_MAC, "%4d.%2d Scheduling CSI-RS\n", frame, slot);
} }
if (mac->sci_pdu_rx.harq_feedback) { if (mac->sci_pdu_rx.harq_feedback && mac->sl_tx_res_pool->sl_PSFCH_Config_r16 && mac->sl_tx_res_pool->sl_PSFCH_Config_r16->choice.setup) {
NR_SL_PSFCH_Config_r16_t *sl_psfch_config = mac->sl_tx_res_pool->sl_PSFCH_Config_r16->choice.setup; NR_SL_PSFCH_Config_r16_t *sl_psfch_config = mac->sl_tx_res_pool->sl_PSFCH_Config_r16->choice.setup;
const uint8_t psfch_periods[] = {0,1,2,4}; const uint8_t psfch_periods[] = {0,1,2,4};
long psfch_period = (sl_psfch_config->sl_PSFCH_Period_r16) long psfch_period = (sl_psfch_config->sl_PSFCH_Period_r16)
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "rrc_defs.h" #include "rrc_defs.h"
#include "rrc_vars.h" #include "rrc_vars.h"
#include "LAYER2/NR_MAC_UE/mac_proto.h" #include "LAYER2/NR_MAC_UE/mac_proto.h"
#include "RRC/NAS/nas_config.h"
#define GNSS_SUPPORT 0 #define GNSS_SUPPORT 0
...@@ -245,7 +246,7 @@ static void prepare_NR_SL_ResourcePool(NR_SL_ResourcePool_r16_t *sl_res_pool, ...@@ -245,7 +246,7 @@ static void prepare_NR_SL_ResourcePool(NR_SL_ResourcePool_r16_t *sl_res_pool,
if (*nr_sl_psfch_config->sl_PSFCH_Period_r16 > 0) { if (*nr_sl_psfch_config->sl_PSFCH_Period_r16 > 0) {
const uint8_t psfch_periods[] = {0,1,2,4}; const uint8_t psfch_periods[] = {0,1,2,4};
AssertFatal(*nr_sl_psfch_config->sl_PSFCH_Period_r16 < 4, "sl_PSFCH_Period_r16 index must be less than 4\n"); AssertFatal(*nr_sl_psfch_config->sl_PSFCH_Period_r16 < 4, "sl_PSFCH_Period_r16 index must be less than 4\n");
LOG_I(NR_PHY,"Configuring PSFCH Period %d\n",*nr_sl_psfch_config->sl_PSFCH_Period_r16); LOG_I(NR_PHY, "Configuring PSFCH Period %ld\n", *nr_sl_psfch_config->sl_PSFCH_Period_r16);
uint8_t psfch_period = psfch_periods[*nr_sl_psfch_config->sl_PSFCH_Period_r16]; uint8_t psfch_period = psfch_periods[*nr_sl_psfch_config->sl_PSFCH_Period_r16];
uint16_t prod_numCh_period = *sl_res_pool->sl_NumSubchannel_r16*psfch_period; uint16_t prod_numCh_period = *sl_res_pool->sl_NumSubchannel_r16*psfch_period;
uint16_t num_prbs = (*sl_res_pool->sl_RB_Number_r16 / prod_numCh_period) * prod_numCh_period; uint16_t num_prbs = (*sl_res_pool->sl_RB_Number_r16 / prod_numCh_period) * prod_numCh_period;
...@@ -589,8 +590,7 @@ void nr_UE_configure_Sidelink(uint8_t id, uint8_t is_sync_source) { ...@@ -589,8 +590,7 @@ void nr_UE_configure_Sidelink(uint8_t id, uint8_t is_sync_source) {
sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0, SL_CONFIG_STRING_UEINFO, 0); sprintf(aprefix, "%s.[%i].%s.[%i]", SL_CONFIG_STRING_SL_PRECONFIGURATION, 0, SL_CONFIG_STRING_UEINFO, 0);
config_get(SL_UEINFO,sizeof(SL_UEINFO)/sizeof(paramdef_t),aprefix); config_get(SL_UEINFO,sizeof(SL_UEINFO)/sizeof(paramdef_t),aprefix);
LOG_I(NR_RRC,"SL L2 SRCid %x, SL ipv4 addr X.X.%d.%d\n",ueinfo.srcid,ueinfo.thirdOctet,ueinfo.fourthOctet); LOG_I(NR_RRC,"SL L2 SRCid %x, SL ipv4 addr X.X.%d.%d\n",ueinfo.srcid,ueinfo.thirdOctet,ueinfo.fourthOctet);
nas_config(1,ueinfo.thirdOctet,ueinfo.fourthOctet,"oai_sl_tun"); nas_config(1 + ueinfo.srcid, ueinfo.thirdOctet, ueinfo.fourthOctet, "oai_sl_tun");
//nas_config(1 + ueinfo.srcid,ueinfo.thirdOctet,ueinfo.fourthOctet + ueinfo.srcid,"oai_sl_tun");
nr_rrc_mac_config_req_sl_preconfig(id, sl_preconfig, sync_source, ueinfo.srcid); nr_rrc_mac_config_req_sl_preconfig(id, sl_preconfig, sync_source, ueinfo.srcid);
......
...@@ -41,7 +41,7 @@ SIDELINK_PRECONFIGURATION = ( ...@@ -41,7 +41,7 @@ SIDELINK_PRECONFIGURATION = (
# Num Symbols used for Sidelink in an uplink slot # Num Symbols used for Sidelink in an uplink slot
# Herein, sl_LengthSymbols represents an index; not the number of symbols. # Herein, sl_LengthSymbols represents an index; not the number of symbols.
# This index value can be from 0 to 7 representing the (7 to 14 symbols) # This index value can be from 0 to 7 representing the (7 to 14 symbols)
sl_LengthSymbols = 5; sl_LengthSymbols = 7;
#Sidelink Starting symbol in a slot #Sidelink Starting symbol in a slot
#Value can be between symbols 0 to 7 #Value can be between symbols 0 to 7
sl_StartSymbol = 0; sl_StartSymbol = 0;
...@@ -77,7 +77,7 @@ SIDELINK_PRECONFIGURATION = ( ...@@ -77,7 +77,7 @@ SIDELINK_PRECONFIGURATION = (
sl_NumSubchannel = 1; sl_NumSubchannel = 1;
# period of PSFCH resource in units of slots within this resource pool # period of PSFCH resource in units of slots within this resource pool
# Possible values sl0 means no PSFCH resource, {sl0, sl1, sl2, sl4} # Possible values sl0 means no PSFCH resource, {sl0, sl1, sl2, sl4}
sl_PSFCH_Period = 0; //sl0 sl_PSFCH_Period = 3; //sl0
# Number of cyclic shift pairs used for a PSFCH transmission that can be multiplexed in a PRB # Number of cyclic shift pairs used for a PSFCH transmission that can be multiplexed in a PRB
# Possible values {n1, n2, n3, n4} # Possible values {n1, n2, n3, n4}
sl_NumMuxCS_Pair = 1; sl_NumMuxCS_Pair = 1;
...@@ -108,7 +108,7 @@ SIDELINK_PRECONFIGURATION = ( ...@@ -108,7 +108,7 @@ SIDELINK_PRECONFIGURATION = (
sl_NumSubchannel = 1; sl_NumSubchannel = 1;
# period of PSFCH resource in units of slots within this resource pool # period of PSFCH resource in units of slots within this resource pool
# Possible values sl0 means no PSFCH resource, {sl0, sl1, sl2, sl4} # Possible values sl0 means no PSFCH resource, {sl0, sl1, sl2, sl4}
sl_PSFCH_Period = 0; //sl0 sl_PSFCH_Period = 3; //sl0
# Number of cyclic shift pairs used for a PSFCH transmission that can be multiplexed in a PRB # Number of cyclic shift pairs used for a PSFCH transmission that can be multiplexed in a PRB
# Possible values {n1, n2, n3, n4} # Possible values {n1, n2, n3, n4}
sl_NumMuxCS_Pair = 1; sl_NumMuxCS_Pair = 1;
...@@ -123,7 +123,7 @@ SIDELINK_PRECONFIGURATION = ( ...@@ -123,7 +123,7 @@ SIDELINK_PRECONFIGURATION = (
sl_UEINFO = ( sl_UEINFO = (
{ {
srcid = 1; srcid = 0;
thirdOctet = 0; thirdOctet = 0;
fourthOctet = 1; fourthOctet = 1;
} }
......
SIDELINK_PRECONFIGURATION = (
{
# TDD ULDL CONFIG used for sidelink
sl_dl_UL_TransmissionPeriodicity = 6;
sl_nrofDownlinkSlots = 1;
sl_nrofDownlinkSymbols = 10;
sl_nrofUplinkSlots = 8;
sl_nrofUplinkSymbols = 4;
sl_csi_rs = (
{
symb_l0 = 5;
# csi_type 2 is not supported 38211, 8.4.1.5.3
csi_Type = 1;
sl_powerControlOffset = 1;
sl_powerControlOffsetSS = 1;
slot_Offset = 0;
slot_Periodicity = 4;
# Indicates if CSI Reporting is enabled in UNICAST. is 0-ENABLED, 1-DISABLED
sl_CSI_Acquisition = 0;
}
);
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
# this is 2584.95 MHz => 301 REs from PointA 25 PRBs + 1 RE
sl_absoluteFrequencySSB = 516990;
# this is 2575.92 MHz (center frequency is 2585.1 MHz
sl_absoluteFrequencyPointA = 515184;
}
);
sl_BWP = (
{
#RB start 0, RB size = 106. occupies complete Bw.
sl_locationAndBandwidth = 28875;
# Num Symbols used for Sidelink in an uplink slot
# Herein, sl_LengthSymbols represents an index; not the number of symbols.
# This index value can be from 0 to 7 representing the (7 to 14 symbols)
sl_LengthSymbols = 7;
#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 = 4;
#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 = 0;
#Number of RBS which carry PSCCH
#Possible values {n10,n12,n15,n20,n25}
sl_FreqResourcePSCCH = 1; //12RBs
#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;
# period of PSFCH resource in units of slots within this resource pool
# Possible values sl0 means no PSFCH resource, {sl0, sl1, sl2, sl4}
sl_PSFCH_Period = 3; //sl0
# Number of cyclic shift pairs used for a PSFCH transmission that can be multiplexed in a PRB
# Possible values {n1, n2, n3, n4}
sl_NumMuxCS_Pair = 1;
# Minimum time gap between PSFCH and the associated PSSCH in the unit of slots {sl2, sl3}
sl_MinTimeGapPSFCH = 1; //sl3
# Scrambling ID {0..1023} for sequence hopping of the PSFCH used in the resource pool
sl_PSFCH_HopID = 1;
# Number of PSFCH resources available {startSubCH, allocSubCH} for multiplexing HARQ-ACK information in a PSFCH transmission
sl_PSFCH_CandidateResourceType = 0; // startSubCH
}
);
sl_TxResPools = (
{
#Number of symbols which carry PSCCH.
#Possible values 0 means 2 symbols, 1 - means 3 symbols.
sl_TimeResourcePSCCH = 0;
#Number of RBS which carry PSCCH
#Possible values {n10,n12,n15,n20,n25}
sl_FreqResourcePSCCH = 1; //12RBs
#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;
# period of PSFCH resource in units of slots within this resource pool
# Possible values sl0 means no PSFCH resource, {sl0, sl1, sl2, sl4}
sl_PSFCH_Period = 3; //sl0
# Number of cyclic shift pairs used for a PSFCH transmission that can be multiplexed in a PRB
# Possible values {n1, n2, n3, n4}
sl_NumMuxCS_Pair = 1;
# Minimum time gap between PSFCH and the associated PSSCH in the unit of slots {sl2, sl3}
sl_MinTimeGapPSFCH = 1; //sl3
# Scrambling ID {0..1023} for sequence hopping of the PSFCH used in the resource pool
sl_PSFCH_HopID = 1;
# Number of PSFCH resources available {startSubCH, allocSubCH} for multiplexing HARQ-ACK information in a PSFCH transmission
sl_PSFCH_CandidateResourceType = 0; // startSubCH
}
);
sl_UEINFO = (
{
srcid = 1;
thirdOctet = 0;
fourthOctet = 2;
}
);
}
);
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