diff --git a/openair1/PHY/MODULATION/beamforming.c b/openair1/PHY/MODULATION/beamforming.c index 9dd48a02fe..56def37b41 100644 --- a/openair1/PHY/MODULATION/beamforming.c +++ b/openair1/PHY/MODULATION/beamforming.c @@ -86,7 +86,6 @@ void nr_beam_precoding(c16_t **txdataF, c16_t **txdataF_BF, NR_DL_FRAME_PARMS *frame_parms, int32_t ***beam_weights, - int slot, int symbol, int aa, int nb_antenna_ports, diff --git a/openair1/PHY/MODULATION/nr_modulation.h b/openair1/PHY/MODULATION/nr_modulation.h index 2afd9f81f4..ef834db509 100644 --- a/openair1/PHY/MODULATION/nr_modulation.h +++ b/openair1/PHY/MODULATION/nr_modulation.h @@ -80,7 +80,6 @@ void nr_beam_precoding(c16_t **txdataF, c16_t **txdataF_BF, NR_DL_FRAME_PARMS *frame_parms, int32_t ***beam_weights, - int slot, int symbol, int aa, int nb_antenna_ports, diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index 1878fc2d55..4d70db6f02 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -783,6 +783,8 @@ int nr_srs_ls_channel_estimation(int ant, #ifdef SRS_DEBUG LOG_I(NR_PHY, "====================== UE port %d --> gNB Rx antenna %i ======================\n", p_index, ant); LOG_I(NR_PHY, "============================== SRS symbol index %d ===========================\n", srs_symb); +#else + UNUSED(ant); #endif uint16_t subcarrier = CIRCULAR_INC(subcarrier_offset + nr_srs_info->k_0_p[p_index][srs_symb], 0, ofdm_symbol_size); diff --git a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h index 61d8df03b8..e815b3edd7 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h +++ b/openair1/PHY/NR_TRANSPORT/nr_transport_proto.h @@ -88,14 +88,8 @@ void free_gNB_dlsch(NR_gNB_DLSCH_t *dlsch, uint16_t N_RB, const NR_DL_FRAME_PARM @param UE_id id of current UE @param frame Frame number @param slot Slot number - @param harq_pid HARQ process ID */ -int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, - uint8_t ulsch_id, - uint32_t frame, - uint8_t slot, - unsigned char harq_pid, - int beam_nb); +int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, uint8_t ulsch_id, uint32_t frame, uint8_t slot, int beam_nb); /*! \brief This function implements the idft transform precoding in PUSCH @@ -147,9 +141,7 @@ void nr_ulsch_compute_llr(c16_t *rxdataF_comp, void reset_active_stats(PHY_VARS_gNB *gNB, int frame); void reset_active_ulsch(PHY_VARS_gNB *gNB, int frame); -void nr_ulsch_compute_ML_llr(NR_gNB_PUSCH *pusch_vars, - uint32_t symbol, - c16_t *rxdataF_comp0, +void nr_ulsch_compute_ML_llr(c16_t *rxdataF_comp0, c16_t *rxdataF_comp1, c16_t *ul_ch_mag0, c16_t *ul_ch_mag1, diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c index 4674800eb6..ecc0d416ed 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_demodulation.c @@ -80,7 +80,6 @@ static void nr_ulsch_extract_rbs(c16_t* const rxdataF, c16_t *chFext, int rxoffset, int choffset, - int aarx, int is_dmrs_symbol, nfapi_nr_pusch_pdu_t *pusch_pdu, NR_DL_FRAME_PARMS *frame_parms) @@ -266,9 +265,7 @@ static void nr_ulsch_det_HhH(c16_t *after_mf_00, // a c16_t *after_mf_10, // c c16_t *after_mf_11, // d uint32_t *det_fin, // 1/ad-bc - unsigned short nb_rb, - unsigned char symbol, - int32_t shift) + unsigned short nb_rb) { simde__m128i *after_mf_00_128,*after_mf_01_128, *after_mf_10_128, *after_mf_11_128, ad_re_128, bc_re_128; //ad_im_128, bc_im_128; simde__m128i *det_fin_128, det_re_128; //det_im_128, tmp_det0, tmp_det1; @@ -391,8 +388,7 @@ static void nr_ulsch_construct_HhH_elements(c16_t *conjch00_ch00, c16_t *after_mf_01, c16_t *after_mf_10, c16_t *after_mf_11, - unsigned short nb_rb, - unsigned char symbol) + unsigned short nb_rb) { //This function is used to construct the (H_hermitian * H matrix) matrix elements simde__m128i *conjch00_ch00_128 = (simde__m128i *)conjch00_ch00; @@ -679,8 +675,7 @@ static uint8_t nr_ulsch_mmse_2layers(c16_t **rxdataF_comp, af_mf_01, af_mf_10, af_mf_11, - nb_rb_0, - symbol); + nb_rb_0); } if (nb_rx_ant == 2) { nr_ulsch_construct_HhH_elements(conjch00_ch00, @@ -703,8 +698,7 @@ static uint8_t nr_ulsch_mmse_2layers(c16_t **rxdataF_comp, af_mf_01, af_mf_10, af_mf_11, - nb_rb_0, - symbol); + nb_rb_0); } // Add noise_var such that: H^h * H + noise_var * I @@ -726,9 +720,7 @@ static uint8_t nr_ulsch_mmse_2layers(c16_t **rxdataF_comp, af_mf_10,//c af_mf_11,//d determ_fin, - nb_rb_0, - symbol, - shift); + nb_rb_0); /* 2- Compute the channel matrix inversion ********************************** * * |(conj_H_00xH_00+conj_H_10xH_10) (conj_H_00xH_01+conj_H_10xH_11)| @@ -872,10 +864,8 @@ static void inner_rx(PHY_VARS_gNB *gNB, NR_gNB_PUSCH *pusch_vars, nfapi_nr_pusch_pdu_t *rel15_ul, c16_t **rxF, - c16_t **ul_ch, int16_t **llr, int soffset, - int length, int symbol, int output_shift, uint32_t nvar, @@ -907,7 +897,6 @@ static void inner_rx(PHY_VARS_gNB *gNB, chFext[aatx][aarx], soffset+(symbol * frame_parms->ofdm_symbol_size), dmrs_symbol * frame_parms->ofdm_symbol_size, - aarx, dmrs_symbol_flag, rel15_ul, frame_parms); @@ -973,10 +962,8 @@ static void inner_rx(PHY_VARS_gNB *gNB, if (nb_layer == 2) { if (rel15_ul->qam_mod_order <= 6) { - nr_ulsch_compute_ML_llr(pusch_vars, - symbol, - &pusch_vars->rxdataF_comp[0][symbol * buffer_length], - &pusch_vars->rxdataF_comp[nb_rx_ant][symbol * buffer_length], + nr_ulsch_compute_ML_llr((c16_t *)&pusch_vars->rxdataF_comp[0][symbol * buffer_length], + (c16_t *)&pusch_vars->rxdataF_comp[nb_rx_ant][symbol * buffer_length], rxF_ch_maga[0], rxF_ch_maga[1], llr[0], @@ -1058,10 +1045,8 @@ static void nr_pusch_symbol_processing(void *arg) pusch_vars, rel15_ul, gNB->common_vars.rxdataF[rdata->beam_nb], - (c16_t **)gNB->pusch_vars[ulsch_id].ul_ch_estimates, llrss, soffset, - gNB->pusch_vars[ulsch_id].ul_valid_re_per_slot[symbol], symbol, gNB->pusch_vars[ulsch_id].log2_maxh, rdata->nvar, @@ -1114,12 +1099,7 @@ static uint32_t average_u32(const uint32_t *x, uint16_t size) return (uint32_t)(sum_x / size); } -int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, - uint8_t ulsch_id, - uint32_t frame, - uint8_t slot, - unsigned char harq_pid, - int beam_nb) +int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, uint8_t ulsch_id, uint32_t frame, uint8_t slot, int beam_nb) { NR_DL_FRAME_PARMS *frame_parms = &gNB->frame_parms; nfapi_nr_pusch_pdu_t *rel15_ul = &gNB->ulsch[ulsch_id].harq_process->ulsch_pdu; @@ -1324,7 +1304,6 @@ int nr_rx_pusch_tp(PHY_VARS_gNB *gNB, (c16_t*)&ul_ch_estimates_ext[nl * frame_parms->nb_antennas_rx + aarx][meas_symbol * nb_re_pusch], soffset + meas_symbol * frame_parms->ofdm_symbol_size, dmrs_symbol * frame_parms->ofdm_symbol_size, - aarx, (rel15_ul->ul_dmrs_symb_pos >> meas_symbol) & 0x01, rel15_ul, frame_parms); diff --git a/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c b/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c index 0e4ef15d32..318da26b75 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c +++ b/openair1/PHY/NR_TRANSPORT/nr_ulsch_llr_computation.c @@ -1741,12 +1741,7 @@ void nr_ulsch_qam64_qam64(c16_t *stream0_in, #endif } -static void nr_ulsch_shift_llr(int16_t *llr_layer0, - int16_t *llr_layer1, - uint32_t nb_re, - uint32_t rxdataF_ext_offset, - uint8_t mod_order, - int shift) +static void nr_ulsch_shift_llr(int16_t *llr_layer0, int16_t *llr_layer1, uint32_t nb_re, int shift) { simde__m128i *llr_layers0 = (simde__m128i *)llr_layer0; simde__m128i *llr_layers1 = (simde__m128i *)llr_layer1; @@ -1770,9 +1765,7 @@ static void nr_ulsch_shift_llr(int16_t *llr_layer0, } } -void nr_ulsch_compute_ML_llr(NR_gNB_PUSCH *pusch_vars, - uint32_t symbol, - c16_t *rxdataF_comp0, +void nr_ulsch_compute_ML_llr(c16_t *rxdataF_comp0, c16_t *rxdataF_comp1, c16_t *ul_ch_mag0, c16_t *ul_ch_mag1, @@ -1787,7 +1780,7 @@ void nr_ulsch_compute_ML_llr(NR_gNB_PUSCH *pusch_vars, case 2: nr_ulsch_qpsk_qpsk(rxdataF_comp0, rxdataF_comp1, llr_layers0, rho0, nb_re); nr_ulsch_qpsk_qpsk(rxdataF_comp1, rxdataF_comp0, llr_layers1, rho1, nb_re); - nr_ulsch_shift_llr((int16_t *)llr_layers0, (int16_t *)llr_layers1, nb_re, pusch_vars->llr_offset[symbol] >> 1, 2, 4); + nr_ulsch_shift_llr((int16_t *)llr_layers0, (int16_t *)llr_layers1, nb_re, 4); break; case 4: nr_ulsch_qam16_qam16(rxdataF_comp0, rxdataF_comp1, ul_ch_mag0, ul_ch_mag1, llr_layers0, rho0, nb_re); diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index bda26b0d52..8219a7f8cd 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -517,7 +517,6 @@ int nr_prs_channel_estimation(uint8_t gNB_id, } c32_t nr_pbch_dmrs_correlation(const NR_DL_FRAME_PARMS *fp, - const UE_nr_rxtx_proc_t *proc, const int symbol, const int dmrss, const int Nid_cell, @@ -535,8 +534,7 @@ c32_t nr_pbch_dmrs_correlation(const NR_DL_FRAME_PARMS *fp, unsigned int k = Nid_cell % 4; - DEBUG_PBCH("PBCH DMRS Correlation : gNB_id %d , OFDM size %d, Ncp=%d, k=%u symbol %d\n", - proc->gNB_id, + DEBUG_PBCH("PBCH DMRS Correlation : OFDM size %d, Ncp=%d, k=%u symbol %d\n", fp->ofdm_symbol_size, fp->Ncp, k, diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h index a9755283c8..6c5b049634 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h @@ -39,7 +39,6 @@ void nr_pdcch_channel_estimation(const PHY_VARS_NR_UE *ue, c16_t *pilot); c32_t nr_pbch_dmrs_correlation(const NR_DL_FRAME_PARMS *fp, - const UE_nr_rxtx_proc_t *proc, const int symbol, const int dmrss, const int Nid_cell, diff --git a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c index 3914837795..5d35e385e3 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c +++ b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c @@ -211,6 +211,9 @@ static int nr_get_csi_rs_signal(const PHY_VARS_NR_UE *ue, ant_rx, rx_csi_rs_signal[k].r, rx_csi_rs_signal[k].i); +#else + UNUSED(proc); + UNUSED(nr_csi_info); #endif } } @@ -419,14 +422,13 @@ static int nr_csi_rs_channel_estimation( return 0; } -int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue, - const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu, - const nr_csi_info_t *nr_csi_info, - const uint8_t N_ports, - uint8_t mem_offset, - c16_t csi_rs_estimated_channel_freq[][N_ports][ue->frame_parms.ofdm_symbol_size + FILTER_MARGIN], - const int16_t log2_maxh, - uint8_t *rank_indicator) +static int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue, + const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu, + const uint8_t N_ports, + uint8_t mem_offset, + c16_t csi_rs_estimated_channel_freq[][N_ports][ue->frame_parms.ofdm_symbol_size + FILTER_MARGIN], + const int16_t log2_maxh, + uint8_t *rank_indicator) { const NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; const int16_t cond_dB_threshold = 5; @@ -552,18 +554,16 @@ int nr_csi_rs_ri_estimation(const PHY_VARS_NR_UE *ue, return 0; } -int nr_csi_rs_pmi_estimation(const PHY_VARS_NR_UE *ue, - const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu, - const nr_csi_info_t *nr_csi_info, - const uint8_t N_ports, - uint8_t mem_offset, - const c16_t csi_rs_estimated_channel_freq[][N_ports][ue->frame_parms.ofdm_symbol_size + FILTER_MARGIN], - const uint32_t interference_plus_noise_power, - const uint8_t rank_indicator, - const int16_t log2_re, - uint8_t *i1, - uint8_t *i2, - int32_t *precoded_sinr_dB) +static int nr_csi_rs_pmi_estimation(const PHY_VARS_NR_UE *ue, + const fapi_nr_dl_config_csirs_pdu_rel15_t *csirs_config_pdu, + const uint8_t N_ports, + uint8_t mem_offset, + const c16_t csi_rs_estimated_channel_freq[][N_ports][ue->frame_parms.ofdm_symbol_size + FILTER_MARGIN], + const uint32_t interference_plus_noise_power, + const uint8_t rank_indicator, + const int16_t log2_re, + uint8_t *i2, + int32_t *precoded_sinr_dB) { const NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; @@ -788,7 +788,6 @@ static void nr_csi_im_power_estimation(const PHY_VARS_NR_UE *ue, } void nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, - const UE_nr_rxtx_proc_t *proc, const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], const fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu) { @@ -918,7 +917,6 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, if (csirs_config_pdu->measurement_bitmap & 2) { nr_csi_rs_ri_estimation(ue, csirs_config_pdu, - csi_info, mapping_parms.ports, mem_offset, csi_rs_estimated_channel_freq, @@ -934,14 +932,12 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, if (csirs_config_pdu->measurement_bitmap & 8) { nr_csi_rs_pmi_estimation(ue, csirs_config_pdu, - csi_info, mapping_parms.ports, mem_offset, csi_rs_estimated_channel_freq, csi_info->csi_im_meas_computed ? csi_info->interference_plus_noise_power : noise_power, rank_indicator, log2_re, - i1, i2, &precoded_sinr_dB); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c index b7de100b57..b58ebe8049 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_demodulation.c @@ -123,8 +123,7 @@ static void nr_dlsch_channel_compensation(uint32_t rx_size_symbol, int length, unsigned char mod_order, unsigned short nb_rb, - unsigned char output_shift, - PHY_NR_MEASUREMENTS *measurements) + unsigned char output_shift) { simde__m128i *dl_ch128, *dl_ch128_2, *dl_ch_mag128, *dl_ch_mag128b, *dl_ch_mag128r, *rxdataF128, *rxdataF_comp128, *rho128; simde__m128i QAM_amp128 = {0}, QAM_amp128b = {0}, QAM_amp128r = {0}; @@ -967,7 +966,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, memset(dl_ch_estimates_ext, 0, sizeof(dl_ch_estimates_ext)); NR_UE_COMMON *common_vars = &ue->common_vars; - PHY_NR_MEASUREMENTS *measurements = &ue->measurements; const int frame = proc->frame_rx; const int nr_slot_rx = proc->nr_slot_rx; const int gNB_id = proc->gNB_id; @@ -1228,8 +1226,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, nb_re_pdsch, dlsch_config->qamModOrder, nb_rb_pdsch, - *log2_maxh, - measurements); // log2_maxh+I0_shift + *log2_maxh); // log2_maxh+I0_shift stop_meas_nr_ue_phy(ue, DLSCH_CHANNEL_COMPENSATION_STATS); if (meas_enabled) { LOG_D(PHY, diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 87ab4abc57..5f13981b3a 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -59,7 +59,6 @@ static bool nr_pbch_detection(const UE_nr_rxtx_proc_t *proc, cd_t cumul = {0}; for (int i = pbch_initial_symbol; i < pbch_initial_symbol + 3; i++) { c32_t meas = nr_pbch_dmrs_correlation(frame_parms, - proc, i, i - pbch_initial_symbol, Nid_cell, diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 4806a48bda..367d0ba155 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -141,6 +141,7 @@ There is no data in DMRS symbol for other scenarios in type 1. */ static void map_data_dmrs_type1_cdm1_rb(const unsigned int num_cdm_no_data, const c16_t *data, c16_t *out) { + UNUSED(num_cdm_no_data); *(out + 1) = *data++; *(out + 3) = *data++; *(out + 5) = *data++; diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index de72db32db..7a5af5b070 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -1112,7 +1112,7 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, N pusch_decode_done = 1; start_meas(&gNB->rx_pusch_stats); - nr_rx_pusch_tp(gNB, ULSCH_id, frame_rx, slot_rx, ulsch->harq_pid, ulsch->beam_nb); + nr_rx_pusch_tp(gNB, ULSCH_id, frame_rx, slot_rx, ulsch->beam_nb); NR_gNB_PUSCH *pusch_vars = &gNB->pusch_vars[ULSCH_id]; pusch_vars->ulsch_power_tot = 0; pusch_vars->ulsch_noise_power_tot = 0; diff --git a/openair1/SCHED_NR_UE/defs.h b/openair1/SCHED_NR_UE/defs.h index eb952035aa..02c192378a 100644 --- a/openair1/SCHED_NR_UE/defs.h +++ b/openair1/SCHED_NR_UE/defs.h @@ -129,7 +129,6 @@ void nr_pdcch_dci_indication(const UE_nr_rxtx_proc_t *proc, c16_t llr[phy_data->phy_pdcch_config.nb_search_space][max_monOcc][llr_size]); void nr_ue_csi_im_procedures(PHY_VARS_NR_UE *ue, - const UE_nr_rxtx_proc_t *proc, const c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP], const fapi_nr_dl_config_csiim_pdu_rel15_t *csiim_config_pdu); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 0b853820f3..fa63588d85 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -1241,7 +1241,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_ slot_fep_map[symb] = true; } } - nr_ue_csi_im_procedures(ue, proc, rxdataF, &phy_data->csiim_vars.csiim_config_pdu); + nr_ue_csi_im_procedures(ue, rxdataF, &phy_data->csiim_vars.csiim_config_pdu); } // do procedures for CSI-RS