Commit 0c2b3a1e authored by Roberto Louro Magueta's avatar Roberto Louro Magueta

Remove some variables from nr_csi_rs_info_t

parent 85802b82
...@@ -48,10 +48,10 @@ typedef struct { ...@@ -48,10 +48,10 @@ typedef struct {
} fapi_nr_uci_pdu_rel15_t; } fapi_nr_uci_pdu_rel15_t;
typedef struct { typedef struct {
uint8_t *rank_indicator; uint8_t rank_indicator;
uint8_t *i1; uint8_t i1;
uint8_t *i2; uint8_t i2;
uint8_t *cqi; uint8_t cqi;
} fapi_nr_csirs_measurements_t; } fapi_nr_csirs_measurements_t;
typedef struct { typedef struct {
......
...@@ -358,12 +358,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) ...@@ -358,12 +358,6 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
AssertFatal(ue->nr_csi_rs_info->nr_gold_csi_rs[slot][symb]!=NULL, "NR init: csi reference signal for slot %d symbol %d - malloc failed\n", slot, symb); AssertFatal(ue->nr_csi_rs_info->nr_gold_csi_rs[slot][symb]!=NULL, "NR init: csi reference signal for slot %d symbol %d - malloc failed\n", slot, symb);
} }
} }
ue->nr_csi_rs_info->noise_power = (uint32_t*)malloc16_clear(sizeof(uint32_t));
ue->nr_csi_rs_info->rank_indicator = (uint8_t*)malloc16_clear(sizeof(uint8_t));
ue->nr_csi_rs_info->i1 = (uint8_t*)malloc16_clear(3*sizeof(uint8_t));
ue->nr_csi_rs_info->i2 = (uint8_t*)malloc16_clear(sizeof(uint8_t));
ue->nr_csi_rs_info->precoded_sinr_dB = (uint32_t*)malloc16_clear(sizeof(uint32_t));
ue->nr_csi_rs_info->cqi = (uint8_t*)malloc16_clear(sizeof(uint8_t));
ue->nr_csi_rs_info->csi_rs_generated_signal = (int32_t **)malloc16(NR_MAX_NB_PORTS * sizeof(int32_t *) ); ue->nr_csi_rs_info->csi_rs_generated_signal = (int32_t **)malloc16(NR_MAX_NB_PORTS * sizeof(int32_t *) );
for (i=0; i<NR_MAX_NB_PORTS; i++) { for (i=0; i<NR_MAX_NB_PORTS; i++) {
ue->nr_csi_rs_info->csi_rs_generated_signal[i] = (int32_t *) malloc16_clear(fp->samples_per_frame_wCP * sizeof(int32_t)); ue->nr_csi_rs_info->csi_rs_generated_signal[i] = (int32_t *) malloc16_clear(fp->samples_per_frame_wCP * sizeof(int32_t));
...@@ -497,7 +491,6 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) ...@@ -497,7 +491,6 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
for (int gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) { for (int gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
for (int th_id = 0; th_id < RX_NB_TH_MAX; th_id++) { for (int th_id = 0; th_id < RX_NB_TH_MAX; th_id++) {
free_and_zero(ue->pdcch_vars[th_id][gNB_id]); free_and_zero(ue->pdcch_vars[th_id][gNB_id]);
} }
...@@ -519,17 +512,7 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) ...@@ -519,17 +512,7 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
} }
free_and_zero(ue->nr_csi_rs_info->nr_gold_csi_rs[slot]); free_and_zero(ue->nr_csi_rs_info->nr_gold_csi_rs[slot]);
} }
free_and_zero(ue->nr_csi_rs_info->noise_power);
free_and_zero(ue->nr_csi_rs_info->rank_indicator);
free_and_zero(ue->nr_csi_rs_info->i1);
free_and_zero(ue->nr_csi_rs_info->i2);
free_and_zero(ue->nr_csi_rs_info->precoded_sinr_dB);
free_and_zero(ue->nr_csi_rs_info->cqi);
free_and_zero(ue->nr_csi_rs_info->nr_gold_csi_rs); free_and_zero(ue->nr_csi_rs_info->nr_gold_csi_rs);
free_and_zero(ue->nr_csi_rs_info->csi_rs_generated_signal);
free_and_zero(ue->nr_csi_rs_info->csi_rs_received_signal);
free_and_zero(ue->nr_csi_rs_info->csi_rs_ls_estimated_channel);
free_and_zero(ue->nr_csi_rs_info->csi_rs_estimated_channel_freq);
free_and_zero(ue->nr_csi_rs_info); free_and_zero(ue->nr_csi_rs_info);
free_and_zero(ue->nr_csi_im_info); free_and_zero(ue->nr_csi_im_info);
......
This diff is collapsed.
...@@ -269,19 +269,6 @@ typedef struct { ...@@ -269,19 +269,6 @@ typedef struct {
int32_t **csi_rs_received_signal; int32_t **csi_rs_received_signal;
int32_t ***csi_rs_ls_estimated_channel; int32_t ***csi_rs_ls_estimated_channel;
int32_t ***csi_rs_estimated_channel_freq; int32_t ***csi_rs_estimated_channel_freq;
int16_t log2_re;
int16_t log2_maxh;
int32_t csi_rs_estimated_conjch_ch[4][4][4][4][NR_MAX_OFDM_SYMBOL_SIZE] __attribute__((aligned(32)));
int32_t csi_rs_estimated_A_MF[2][2][NR_MAX_OFDM_SYMBOL_SIZE] __attribute__((aligned(32)));
int32_t csi_rs_estimated_A_MF_sq[2][2][NR_MAX_OFDM_SYMBOL_SIZE] __attribute__((aligned(32)));
int32_t csi_rs_estimated_determ_fin[NR_MAX_OFDM_SYMBOL_SIZE] __attribute__((aligned(32)));
int32_t csi_rs_estimated_numer_fin[NR_MAX_OFDM_SYMBOL_SIZE] __attribute__((aligned(32)));
uint32_t *noise_power;
uint8_t *rank_indicator;
uint8_t *i1;
uint8_t *i2;
uint32_t *precoded_sinr_dB;
uint8_t *cqi;
} nr_csi_rs_info_t; } nr_csi_rs_info_t;
typedef struct { typedef struct {
......
...@@ -2688,16 +2688,16 @@ uint8_t get_csirs_RI_PMI_CQI_payload(NR_UE_MAC_INST_t *mac, ...@@ -2688,16 +2688,16 @@ uint8_t get_csirs_RI_PMI_CQI_payload(NR_UE_MAC_INST_t *mac,
int cri_bitlen = csi_report->csi_meas_bitlen.cri_bitlen; int cri_bitlen = csi_report->csi_meas_bitlen.cri_bitlen;
int ri_bitlen = csi_report->csi_meas_bitlen.ri_bitlen; int ri_bitlen = csi_report->csi_meas_bitlen.ri_bitlen;
int pmi_x1_bitlen = csi_report->csi_meas_bitlen.pmi_x1_bitlen[*mac->csirs_measurements.rank_indicator]; int pmi_x1_bitlen = csi_report->csi_meas_bitlen.pmi_x1_bitlen[mac->csirs_measurements.rank_indicator];
int pmi_x2_bitlen = csi_report->csi_meas_bitlen.pmi_x2_bitlen[*mac->csirs_measurements.rank_indicator]; int pmi_x2_bitlen = csi_report->csi_meas_bitlen.pmi_x2_bitlen[mac->csirs_measurements.rank_indicator];
int cqi_bitlen = csi_report->csi_meas_bitlen.cqi_bitlen[*mac->csirs_measurements.rank_indicator]; int cqi_bitlen = csi_report->csi_meas_bitlen.cqi_bitlen[mac->csirs_measurements.rank_indicator];
int padding_bitlen = n_bits - (cri_bitlen + ri_bitlen + pmi_x1_bitlen + pmi_x2_bitlen + cqi_bitlen); int padding_bitlen = n_bits - (cri_bitlen + ri_bitlen + pmi_x1_bitlen + pmi_x2_bitlen + cqi_bitlen);
// TODO: Improvements will be needed to cri_bitlen>0 and pmi_x1_bitlen>0 // TODO: Improvements will be needed to cri_bitlen>0 and pmi_x1_bitlen>0
temp_payload = (*mac->csirs_measurements.rank_indicator<<(cri_bitlen+cqi_bitlen+pmi_x2_bitlen+padding_bitlen+pmi_x1_bitlen)) | temp_payload = (mac->csirs_measurements.rank_indicator<<(cri_bitlen+cqi_bitlen+pmi_x2_bitlen+padding_bitlen+pmi_x1_bitlen)) |
(*mac->csirs_measurements.i1<<(cri_bitlen+cqi_bitlen+pmi_x2_bitlen)) | (mac->csirs_measurements.i1<<(cri_bitlen+cqi_bitlen+pmi_x2_bitlen)) |
(*mac->csirs_measurements.i2<<(cri_bitlen+cqi_bitlen)) | (mac->csirs_measurements.i2<<(cri_bitlen+cqi_bitlen)) |
(*mac->csirs_measurements.cqi<<cri_bitlen) | (mac->csirs_measurements.cqi<<cri_bitlen) |
0; 0;
reverse_n_bits((uint8_t *)&temp_payload, n_bits); reverse_n_bits((uint8_t *)&temp_payload, n_bits);
......
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