Commit 63454ceb authored by Ejaz Ahmed's avatar Ejaz Ahmed

Added option in conf file to activate/deactivate csi-rs

parent bb13bfa1
...@@ -31,11 +31,12 @@ ...@@ -31,11 +31,12 @@
/* Sidelink CSI-RS configuration parameters for MAC*/ /* Sidelink CSI-RS configuration parameters for MAC*/
#define SL_CONFIG_STRING_SL_CSI_RS_LIST "sl_csi_rs" #define SL_CONFIG_STRING_SL_CSI_RS_LIST "sl_csi_rs"
#define SL_CONFIG_STRING_SL_CSI_RS_SYMB_L0 "symb_l0" #define SL_CONFIG_STRING_SL_CSI_RS_SYMB_L0 "symb_l0"
#define SL_CONFIG_STRING_SL_CSI_RS_CSI_TYPE "csi_type" #define SL_CONFIG_STRING_SL_CSI_RS_CSI_TYPE "csi_Type"
#define SL_CONFIG_STRING_SL_CSI_RS_SLOT_OFFSET "slot_offset" #define SL_CONFIG_STRING_SL_CSI_RS_SLOT_OFFSET "slot_Offset"
#define SL_CONFIG_STRING_SL_CSI_RS_SLOT_PERIODICITY "slot_periodicity" #define SL_CONFIG_STRING_SL_CSI_RS_SLOT_PERIODICITY "slot_Periodicity"
#define SL_CONFIG_STRING_SL_CSI_RS_POWER_CONTROL_OFFSET "power_control_offset" #define SL_CONFIG_STRING_SL_CSI_RS_POWER_CONTROL_OFFSET "sl_powerControlOffset"
#define SL_CONFIG_STRING_SL_CSI_RS_POWER_CONTROL_OFFSET_SS "power_control_offset_ss" #define SL_CONFIG_STRING_SL_CSI_RS_POWER_CONTROL_OFFSET_SS "sl_powerControlOffsetSS"
#define SL_CONFIG_STRING_SL_CSI_RS_SL_CSI_ACQUISITION "sl_CSI_Acquisition"
#define SL_CSI_RS_DESC(sl_csi_info) { \ #define SL_CSI_RS_DESC(sl_csi_info) { \
{SL_CONFIG_STRING_SL_CSI_RS_SYMB_L0,NULL,0,.u8ptr=&sl_csi_info->symb_l0,.defuintval=1,TYPE_UINT8,0}, \ {SL_CONFIG_STRING_SL_CSI_RS_SYMB_L0,NULL,0,.u8ptr=&sl_csi_info->symb_l0,.defuintval=1,TYPE_UINT8,0}, \
...@@ -43,7 +44,8 @@ ...@@ -43,7 +44,8 @@
{SL_CONFIG_STRING_SL_CSI_RS_POWER_CONTROL_OFFSET,NULL,0,.u8ptr=&sl_csi_info->power_control_offset,.defuintval=1,TYPE_UINT8,0}, \ {SL_CONFIG_STRING_SL_CSI_RS_POWER_CONTROL_OFFSET,NULL,0,.u8ptr=&sl_csi_info->power_control_offset,.defuintval=1,TYPE_UINT8,0}, \
{SL_CONFIG_STRING_SL_CSI_RS_POWER_CONTROL_OFFSET_SS,NULL,0,.u8ptr=&sl_csi_info->power_control_offset_ss,.defuintval=1,TYPE_UINT8,0}, \ {SL_CONFIG_STRING_SL_CSI_RS_POWER_CONTROL_OFFSET_SS,NULL,0,.u8ptr=&sl_csi_info->power_control_offset_ss,.defuintval=1,TYPE_UINT8,0}, \
{SL_CONFIG_STRING_SL_CSI_RS_SLOT_OFFSET,NULL,0,.u8ptr=&sl_csi_info->slot_offset,.defuintval=1,TYPE_UINT8,0}, \ {SL_CONFIG_STRING_SL_CSI_RS_SLOT_OFFSET,NULL,0,.u8ptr=&sl_csi_info->slot_offset,.defuintval=1,TYPE_UINT8,0}, \
{SL_CONFIG_STRING_SL_CSI_RS_SLOT_PERIODICITY,NULL,0,.u8ptr=&sl_csi_info->slot_periodicity,.defuintval=1,TYPE_UINT8,0}} {SL_CONFIG_STRING_SL_CSI_RS_SLOT_PERIODICITY,NULL,0,.u8ptr=&sl_csi_info->slot_periodicity,.defuintval=1,TYPE_UINT8,0}, \
{SL_CONFIG_STRING_SL_CSI_RS_SL_CSI_ACQUISITION,NULL,0,.u8ptr=&sl_csi_info->sl_csi_acquisition,.defuintval=1,TYPE_UINT8,0}}
typedef struct sl_csi_info { typedef struct sl_csi_info {
uint8_t symb_l0; uint8_t symb_l0;
...@@ -52,6 +54,7 @@ typedef struct sl_csi_info { ...@@ -52,6 +54,7 @@ typedef struct sl_csi_info {
uint8_t slot_periodicity; uint8_t slot_periodicity;
uint8_t power_control_offset; uint8_t power_control_offset;
uint8_t power_control_offset_ss; uint8_t power_control_offset_ss;
uint8_t sl_csi_acquisition;
} sl_csi_info_t; } sl_csi_info_t;
void sl_ue_mac_free(uint8_t module_id) void sl_ue_mac_free(uint8_t module_id)
...@@ -393,9 +396,6 @@ int nr_rrc_mac_config_req_sl_preconfig(module_id_t module_id, ...@@ -393,9 +396,6 @@ int nr_rrc_mac_config_req_sl_preconfig(module_id_t module_id,
sl_mac->sl_SSB_PriorityNR = (sl_preconfig->sl_SSB_PriorityNR_r16) sl_mac->sl_SSB_PriorityNR = (sl_preconfig->sl_SSB_PriorityNR_r16)
? *sl_preconfig->sl_SSB_PriorityNR_r16 : 0; ? *sl_preconfig->sl_SSB_PriorityNR_r16 : 0;
//Indicates if CSI Reporting is enabled in UNICAST. is 0-ENABLED, 1-DISABLED
sl_mac->sl_CSI_Acquisition = (sl_preconfig->sl_CSI_Acquisition_r16) ? 0 : 1;
//Used for DFN calculation in case Sync source = GNSS. //Used for DFN calculation in case Sync source = GNSS.
uint32_t sl_OffsetDFN = (sl_preconfig->sl_OffsetDFN_r16) uint32_t sl_OffsetDFN = (sl_preconfig->sl_OffsetDFN_r16)
? *sl_preconfig->sl_OffsetDFN_r16 : 0; ? *sl_preconfig->sl_OffsetDFN_r16 : 0;
...@@ -673,6 +673,7 @@ void nr_sl_params_read_conf(module_id_t module_id) { ...@@ -673,6 +673,7 @@ void nr_sl_params_read_conf(module_id_t module_id) {
sl_mac->slot_offset = sl_csi_rs_info->slot_offset; sl_mac->slot_offset = sl_csi_rs_info->slot_offset;
sl_mac->slot_periodicity = sl_csi_rs_info->slot_periodicity; sl_mac->slot_periodicity = sl_csi_rs_info->slot_periodicity;
sl_mac->measurement_bitmap = 0b00011011; sl_mac->measurement_bitmap = 0b00011011;
sl_mac->sl_CSI_Acquisition = sl_csi_rs_info->sl_csi_acquisition;
// Based on 38211 Table 7.4.1.5.3-1, for density of 1 and ports 1 & 2 ENUMERATED {noCDM, fd-CDM2} // Based on 38211 Table 7.4.1.5.3-1, for density of 1 and ports 1 & 2 ENUMERATED {noCDM, fd-CDM2}
sl_mac->cdm_type = get_nrUE_params()->nb_antennas_tx == 1 ? 0 : 1; sl_mac->cdm_type = get_nrUE_params()->nb_antennas_tx == 1 ? 0 : 1;
sl_mac->row = get_nrUE_params()->nb_antennas_tx == 1 ? 2 : 3; sl_mac->row = get_nrUE_params()->nb_antennas_tx == 1 ? 2 : 3;
......
...@@ -80,7 +80,8 @@ bool nr_schedule_slsch(NR_UE_MAC_INST_t *mac, int frameP,int slotP, nr_sci_pdu_t ...@@ -80,7 +80,8 @@ bool nr_schedule_slsch(NR_UE_MAC_INST_t *mac, int frameP,int slotP, nr_sci_pdu_t
sci2_pdu->harq_feedback = psfch_period ? 1 : 0; sci2_pdu->harq_feedback = psfch_period ? 1 : 0;
sci2_pdu->cast_type = 1; sci2_pdu->cast_type = 1;
if (format2 == NR_SL_SCI_FORMAT_2C || format2 == NR_SL_SCI_FORMAT_2A) { if (format2 == NR_SL_SCI_FORMAT_2C || format2 == NR_SL_SCI_FORMAT_2A) {
sci2_pdu->csi_req = ((slots_per_frame * frameP + slotP - sl_mac->slot_offset) % sl_mac->slot_periodicity) && (!mac->SL_MAC_PARAMS->sl_CSI_Acquisition) ? 0 : 1; sci2_pdu->csi_req = mac->SL_MAC_PARAMS->sl_CSI_Acquisition ? 0 :
((slots_per_frame * frameP + slotP - sl_mac->slot_offset) % sl_mac->slot_periodicity) && (!mac->SL_MAC_PARAMS->sl_CSI_Acquisition) ? 0 : 1;
} }
if (format2 == NR_SL_SCI_FORMAT_2B) if (format2 == NR_SL_SCI_FORMAT_2B)
sci2_pdu->zone_id = 0; sci2_pdu->zone_id = 0;
......
...@@ -10,11 +10,13 @@ SIDELINK_PRECONFIGURATION = ( ...@@ -10,11 +10,13 @@ SIDELINK_PRECONFIGURATION = (
{ {
symb_l0 = 4; symb_l0 = 4;
# csi_type 2 is not supported 38211, 8.4.1.5.3 # csi_type 2 is not supported 38211, 8.4.1.5.3
csi_type = 1; csi_Type = 1;
power_control_offset = 1; sl_powerControlOffset = 1;
power_control_offset_ss = 1; sl_powerControlOffsetSS = 1;
slot_offset = 0; slot_Offset = 0;
slot_periodicity = 4; slot_Periodicity = 4;
# Indicates if CSI Reporting is enabled in UNICAST. is 0-ENABLED, 1-DISABLED
sl_CSI_Acquisition = 0;
} }
); );
sl_FrequencyCommonConfig = ( sl_FrequencyCommonConfig = (
......
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