From 13bbd326d196bf2adc6f18774f684ee0ee6e0a84 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Fri, 13 Jan 2023 15:37:41 +0000 Subject: [PATCH] Fix mismatched bounds in functions in .h and .c --- openair1/PHY/MODULATION/modulation_UE.h | 2 +- .../PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c | 5 ++--- openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h | 6 +++--- openair1/SIMULATION/NR_PHY/pbchsim.c | 11 ++++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/openair1/PHY/MODULATION/modulation_UE.h b/openair1/PHY/MODULATION/modulation_UE.h index 147e0855d0..420cf07e3d 100644 --- a/openair1/PHY/MODULATION/modulation_UE.h +++ b/openair1/PHY/MODULATION/modulation_UE.h @@ -50,7 +50,7 @@ int slot_fep(PHY_VARS_UE *phy_vars_ue, int nr_slot_fep(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, - unsigned char l, + unsigned char symbol, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]); int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue, 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 2b858e9a91..6b988393d3 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -722,11 +722,10 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue, return(0); } - int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, int estimateSz, - struct complex16 dl_ch_estimates [][estimateSz], - struct complex16 dl_ch_estimates_time [][ue->frame_parms.ofdm_symbol_size], + struct complex16 dl_ch_estimates[][estimateSz], + struct complex16 dl_ch_estimates_time[][ue->frame_parms.ofdm_symbol_size], UE_nr_rxtx_proc_t *proc, unsigned char symbol, int dmrss, diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h index cf4917369a..b779882c86 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_estimation.h @@ -69,8 +69,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue, int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, int estimateSz, - struct complex16 dl_ch_estimates [][estimateSz], - struct complex16 dl_ch_estimates_time [][estimateSz], + struct complex16 dl_ch_estimates[][estimateSz], + struct complex16 dl_ch_estimates_time[][ue->frame_parms.ofdm_symbol_size], UE_nr_rxtx_proc_t *proc, unsigned char symbol, int dmrss, @@ -90,7 +90,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, unsigned short bwp_start_subcarrier, unsigned short nb_rb_pdsch, uint32_t pdsch_est_size, - int32_t pdsch_dl_ch_estimates[][pdsch_est_size], + int32_t dl_ch_estimates[][pdsch_est_size], c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]); void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms, diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 7d0be09585..2cbe2ae97f 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -751,11 +751,12 @@ int main(int argc, char **argv) UE->rx_offset=0; uint8_t ssb_index = 0; - const int estimateSz=7*2*sizeof(int)*frame_parms->ofdm_symbol_size; - __attribute__ ((aligned(32))) struct complex16 dl_ch_estimates[frame_parms->nb_antennas_rx][estimateSz]; - __attribute__ ((aligned(32))) struct complex16 dl_ch_estimates_time[frame_parms->nb_antennas_rx][estimateSz]; - while (!((SSB_positions >> ssb_index) & 0x01)) ssb_index++; // to select the first transmitted ssb - UE->symbol_offset = nr_get_ssb_start_symbol(frame_parms,ssb_index); + const int estimateSz = frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size; + __attribute__((aligned(32))) struct complex16 dl_ch_estimates[frame_parms->nb_antennas_rx][estimateSz]; + __attribute__((aligned(32))) struct complex16 dl_ch_estimates_time[frame_parms->nb_antennas_rx][frame_parms->ofdm_symbol_size]; + while (!((SSB_positions >> ssb_index) & 0x01)) + ssb_index++; // to select the first transmitted ssb + UE->symbol_offset = nr_get_ssb_start_symbol(frame_parms, ssb_index); int ssb_slot = (UE->symbol_offset/14)+(n_hf*(frame_parms->slots_per_frame>>1)); proc.nr_slot_rx = ssb_slot;