Commit ddbbaef3 authored by francescomani's avatar francescomani

remove nr_csi_info_t from gNB (unused)

parent 7e009781
...@@ -150,10 +150,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB) ...@@ -150,10 +150,6 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB)
nr_generate_modulation_table(); nr_generate_modulation_table();
nr_init_pbch_interleaver(gNB->nr_pbch_interleaver); nr_init_pbch_interleaver(gNB->nr_pbch_interleaver);
// CSI RS init
// ceil((NB_RB*8(max allocation per RB)*2(QPSK))/32)
gNB->nr_csi_info = (nr_csi_info_t *)malloc16_clear(sizeof(nr_csi_info_t));
generate_ul_reference_signal_sequences(SHRT_MAX); generate_ul_reference_signal_sequences(SHRT_MAX);
/* Generate low PAPR type 1 sequences for PUSCH DMRS, these are used if transform precoding is enabled. */ /* Generate low PAPR type 1 sequences for PUSCH DMRS, these are used if transform precoding is enabled. */
...@@ -241,8 +237,6 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB) ...@@ -241,8 +237,6 @@ void phy_free_nr_gNB(PHY_VARS_gNB *gNB)
free_and_zero(meas->n0_subband_power); free_and_zero(meas->n0_subband_power);
free_and_zero(meas->n0_subband_power_dB); free_and_zero(meas->n0_subband_power_dB);
free_and_zero(gNB->nr_csi_info);
for (int id = 0; id < gNB->max_nb_srs; id++) { for (int id = 0; id < gNB->max_nb_srs; id++) {
for(int i=0; i<MAX_NUM_NR_SRS_AP; i++) { for(int i=0; i<MAX_NUM_NR_SRS_AP; i++) {
free_and_zero(gNB->nr_srs_info[id]->srs_generated_signal[i]); free_and_zero(gNB->nr_srs_info[id]->srs_generated_signal[i]);
......
...@@ -41,7 +41,6 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB, ...@@ -41,7 +41,6 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms, void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms,
int32_t **dataF, int32_t **dataF,
const int16_t amp, const int16_t amp,
nr_csi_info_t *nr_csi_info,
const nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *csi_params, const nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *csi_params,
const int slot, const int slot,
const csi_mapping_parms_t *phy_csi_parms); const csi_mapping_parms_t *phy_csi_parms);
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms, void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms,
int32_t **dataF, int32_t **dataF,
const int16_t amp, const int16_t amp,
nr_csi_info_t *nr_csi_info,
const nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *csi_params, const nfapi_nr_dl_tti_csi_rs_pdu_rel15_t *csi_params,
const int slot, const int slot,
const csi_mapping_parms_t *phy_csi_parms) const csi_mapping_parms_t *phy_csi_parms)
...@@ -54,7 +53,6 @@ void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms, ...@@ -54,7 +53,6 @@ void nr_generate_csi_rs(const NR_DL_FRAME_PARMS *frame_parms,
int csi_rs_length = frame_parms->N_RB_DL << 4; int csi_rs_length = frame_parms->N_RB_DL << 4;
int16_t mod_csi[frame_parms->symbols_per_slot][csi_rs_length>>1] __attribute__((aligned(16))); int16_t mod_csi[frame_parms->symbols_per_slot][csi_rs_length>>1] __attribute__((aligned(16)));
uint32_t beta = amp; uint32_t beta = amp;
nr_csi_info->csi_rs_generated_signal_bits = log2_approx(amp);
// setting the frequency density from its index // setting the frequency density from its index
double rho = 0; double rho = 0;
......
...@@ -886,14 +886,16 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, ...@@ -886,14 +886,16 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
csirs_config_pdu->freq_domain, csirs_config_pdu->freq_domain,
csirs_config_pdu->symb_l0, csirs_config_pdu->symb_l0,
csirs_config_pdu->symb_l1); csirs_config_pdu->symb_l1);
nr_csi_info_t *csi_info = ue->nr_csi_info;
nr_generate_csi_rs(frame_parms, nr_generate_csi_rs(frame_parms,
ue->nr_csi_info->csi_rs_generated_signal, csi_info->csi_rs_generated_signal,
AMP, AMP,
ue->nr_csi_info,
&csi_params, &csi_params,
proc->nr_slot_rx, proc->nr_slot_rx,
&mapping_parms); &mapping_parms);
csi_info->csi_rs_generated_signal_bits = log2_approx(AMP);
int32_t csi_rs_ls_estimated_channel[frame_parms->nb_antennas_rx][mapping_parms.ports][frame_parms->ofdm_symbol_size]; int32_t csi_rs_ls_estimated_channel[frame_parms->nb_antennas_rx][mapping_parms.ports][frame_parms->ofdm_symbol_size];
int32_t csi_rs_estimated_channel_freq[frame_parms->nb_antennas_rx][mapping_parms.ports][frame_parms->ofdm_symbol_size + FILTER_MARGIN]; int32_t csi_rs_estimated_channel_freq[frame_parms->nb_antennas_rx][mapping_parms.ports][frame_parms->ofdm_symbol_size + FILTER_MARGIN];
...@@ -906,7 +908,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, ...@@ -906,7 +908,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
nr_get_csi_rs_signal(ue, nr_get_csi_rs_signal(ue,
proc, proc,
csirs_config_pdu, csirs_config_pdu,
ue->nr_csi_info, csi_info,
&mapping_parms, &mapping_parms,
CDM_group_size, CDM_group_size,
csi_rs_received_signal, csi_rs_received_signal,
...@@ -920,8 +922,8 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, ...@@ -920,8 +922,8 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
nr_csi_rs_channel_estimation(frame_parms, nr_csi_rs_channel_estimation(frame_parms,
proc, proc,
csirs_config_pdu, csirs_config_pdu,
ue->nr_csi_info, csi_info,
(const int32_t **) ue->nr_csi_info->csi_rs_generated_signal, (const int32_t **) csi_info->csi_rs_generated_signal,
csi_rs_received_signal, csi_rs_received_signal,
&mapping_parms, &mapping_parms,
CDM_group_size, CDM_group_size,
...@@ -936,7 +938,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, ...@@ -936,7 +938,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
if (csirs_config_pdu->measurement_bitmap & 2) { if (csirs_config_pdu->measurement_bitmap & 2) {
nr_csi_rs_ri_estimation(ue, nr_csi_rs_ri_estimation(ue,
csirs_config_pdu, csirs_config_pdu,
ue->nr_csi_info, csi_info,
mapping_parms.ports, mapping_parms.ports,
mem_offset, mem_offset,
csi_rs_estimated_channel_freq, csi_rs_estimated_channel_freq,
...@@ -948,11 +950,11 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, ...@@ -948,11 +950,11 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue,
if (csirs_config_pdu->measurement_bitmap & 8) { if (csirs_config_pdu->measurement_bitmap & 8) {
nr_csi_rs_pmi_estimation(ue, nr_csi_rs_pmi_estimation(ue,
csirs_config_pdu, csirs_config_pdu,
ue->nr_csi_info, csi_info,
mapping_parms.ports, mapping_parms.ports,
mem_offset, mem_offset,
csi_rs_estimated_channel_freq, csi_rs_estimated_channel_freq,
ue->nr_csi_info->csi_im_meas_computed ? ue->nr_csi_info->interference_plus_noise_power : noise_power, csi_info->csi_im_meas_computed ? csi_info->interference_plus_noise_power : noise_power,
rank_indicator, rank_indicator,
log2_re, log2_re,
i1, i1,
......
...@@ -464,9 +464,6 @@ typedef struct PHY_VARS_gNB_s { ...@@ -464,9 +464,6 @@ typedef struct PHY_VARS_gNB_s {
/// SRS variables /// SRS variables
nr_srs_info_t **nr_srs_info; nr_srs_info_t **nr_srs_info;
/// CSI variables
nr_csi_info_t *nr_csi_info;
// reference amplitude for TX // reference amplitude for TX
int16_t TX_AMP; int16_t TX_AMP;
......
...@@ -310,6 +310,13 @@ typedef struct { ...@@ -310,6 +310,13 @@ typedef struct {
fapi_nr_dl_config_csirs_pdu_rel15_t csirs_config_pdu; fapi_nr_dl_config_csirs_pdu_rel15_t csirs_config_pdu;
} NR_UE_CSI_RS; } NR_UE_CSI_RS;
typedef struct {
uint8_t csi_rs_generated_signal_bits;
int32_t **csi_rs_generated_signal;
bool csi_im_meas_computed;
uint32_t interference_plus_noise_power;
} nr_csi_info_t;
typedef struct { typedef struct {
bool active; bool active;
fapi_nr_ul_config_srs_pdu srs_config_pdu; fapi_nr_ul_config_srs_pdu srs_config_pdu;
......
...@@ -119,13 +119,6 @@ typedef struct { ...@@ -119,13 +119,6 @@ typedef struct {
nfapi_nr_srs_pdu_t srs_pdu; nfapi_nr_srs_pdu_t srs_pdu;
} nr_srs_info_t; } nr_srs_info_t;
typedef struct {
uint8_t csi_rs_generated_signal_bits;
int32_t **csi_rs_generated_signal;
bool csi_im_meas_computed;
uint32_t interference_plus_noise_power;
} nr_csi_info_t;
typedef struct NR_DL_FRAME_PARMS NR_DL_FRAME_PARMS; typedef struct NR_DL_FRAME_PARMS NR_DL_FRAME_PARMS;
typedef uint32_t (*get_samples_per_slot_t)(int slot, const NR_DL_FRAME_PARMS *fp); typedef uint32_t (*get_samples_per_slot_t)(int slot, const NR_DL_FRAME_PARMS *fp);
......
...@@ -227,7 +227,6 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, ...@@ -227,7 +227,6 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
nr_generate_csi_rs(&gNB->frame_parms, nr_generate_csi_rs(&gNB->frame_parms,
(int32_t **)gNB->common_vars.txdataF, (int32_t **)gNB->common_vars.txdataF,
gNB->TX_AMP, gNB->TX_AMP,
gNB->nr_csi_info,
csi_params, csi_params,
slot, slot,
&mapping_parms); &mapping_parms);
......
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