Remove previously added bwp_size and bwp_start fields from struct...

Remove previously added bwp_size and bwp_start fields from struct fapi_nr_dl_config_csirs_pdu_rel15_t.
Create function to obtain nfapi_nr_dl_tti_csi_rs_pdu_rel15_t from fapi_nr_dl_config_csirs_pdu_rel15_t without bwp_size and bwp_start.
Replace previously problematic cast with call to created function.
parent c603bcc1
...@@ -500,8 +500,6 @@ typedef struct { ...@@ -500,8 +500,6 @@ typedef struct {
typedef struct { typedef struct {
uint16_t bwp_size; // Needed for SCF222 10.02
uint16_t bwp_start; // Needed for SCF222 10.02
uint8_t subcarrier_spacing; // subcarrierSpacing [3GPP TS 38.211, sec 4.2], Value:0->4 uint8_t subcarrier_spacing; // subcarrierSpacing [3GPP TS 38.211, sec 4.2], Value:0->4
uint8_t cyclic_prefix; // Cyclic prefix type [3GPP TS 38.211, sec 4.2], 0: Normal; 1: Extended uint8_t cyclic_prefix; // Cyclic prefix type [3GPP TS 38.211, sec 4.2], 0: Normal; 1: Extended
uint16_t start_rb; // PRB where this CSI resource starts related to common resource block #0 (CRB#0). Only multiples of 4 are allowed. [3GPP TS 38.331, sec 6.3.2 parameter CSIFrequencyOccupation], Value: 0 ->274 uint16_t start_rb; // PRB where this CSI resource starts related to common resource block #0 (CRB#0). Only multiples of 4 are allowed. [3GPP TS 38.331, sec 6.3.2 parameter CSIFrequencyOccupation], Value: 0 ->274
......
...@@ -834,6 +834,26 @@ int nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t r ...@@ -834,6 +834,26 @@ int nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t r
return 0; return 0;
} }
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *convert_csirs_pdu(fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu)
{
nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *dl_tti_csi_rs_pdu = calloc(1, sizeof(nfapi_nr_dl_tti_csi_rs_pdu_rel15_t));
dl_tti_csi_rs_pdu->subcarrier_spacing = csirs_config_pdu->subcarrier_spacing;
dl_tti_csi_rs_pdu->cyclic_prefix = csirs_config_pdu->cyclic_prefix;
dl_tti_csi_rs_pdu->start_rb = csirs_config_pdu->start_rb;
dl_tti_csi_rs_pdu->nr_of_rbs = csirs_config_pdu->nr_of_rbs;
dl_tti_csi_rs_pdu->csi_type = csirs_config_pdu->csi_type;
dl_tti_csi_rs_pdu->row = csirs_config_pdu->row;
dl_tti_csi_rs_pdu->freq_domain = csirs_config_pdu->freq_domain;
dl_tti_csi_rs_pdu->symb_l0 = csirs_config_pdu->symb_l0;
dl_tti_csi_rs_pdu->symb_l1 = csirs_config_pdu->symb_l1;
dl_tti_csi_rs_pdu->cdm_type = csirs_config_pdu->cdm_type;
dl_tti_csi_rs_pdu->freq_density = csirs_config_pdu->freq_density;
dl_tti_csi_rs_pdu->scramb_id = csirs_config_pdu->scramb_id;
dl_tti_csi_rs_pdu->power_control_offset = csirs_config_pdu->power_control_offset;
dl_tti_csi_rs_pdu->power_control_offset_ss = csirs_config_pdu->power_control_offset_ss;
return dl_tti_csi_rs_pdu;
}
void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]) void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP])
{ {
...@@ -891,7 +911,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t ...@@ -891,7 +911,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t
ue->nr_csi_info->csi_rs_generated_signal, ue->nr_csi_info->csi_rs_generated_signal,
AMP, AMP,
ue->nr_csi_info, ue->nr_csi_info,
(nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *) csirs_config_pdu, convert_csirs_pdu((fapi_nr_dl_config_csirs_pdu_rel15_t*)&ue->csirs_vars[gNB_id]->csirs_config_pdu),
proc->nr_slot_rx, proc->nr_slot_rx,
&N_cdm_groups, &N_cdm_groups,
&CDM_group_size, &CDM_group_size,
......
...@@ -2308,8 +2308,6 @@ void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) { ...@@ -2308,8 +2308,6 @@ void nr_schedule_csirs_reception(NR_UE_MAC_INST_t *mac, int frame, int slot) {
continue; continue;
LOG_D(MAC,"Scheduling reception of CSI-RS in frame %d slot %d\n", frame, slot); LOG_D(MAC,"Scheduling reception of CSI-RS in frame %d slot %d\n", frame, slot);
fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu = &dl_config->dl_config_list[dl_config->number_pdus].csirs_config_pdu.csirs_config_rel15; fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu = &dl_config->dl_config_list[dl_config->number_pdus].csirs_config_pdu.csirs_config_rel15;
csirs_config_pdu->bwp_size = bwp_size;
csirs_config_pdu->bwp_start = bwp_start;
csirs_config_pdu->measurement_bitmap = set_csirs_measurement_bitmap(csi_measconfig, csi_res_id); csirs_config_pdu->measurement_bitmap = set_csirs_measurement_bitmap(csi_measconfig, csi_res_id);
NR_CSI_RS_ResourceMapping_t resourceMapping = nzpcsi->resourceMapping; NR_CSI_RS_ResourceMapping_t resourceMapping = nzpcsi->resourceMapping;
csirs_config_pdu->subcarrier_spacing = mu; csirs_config_pdu->subcarrier_spacing = mu;
......
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