Commit f46240ca authored by Laurent THOMAS's avatar Laurent THOMAS Committed by Robert Schmidt

fix code review remarks

parent e1b9881c
...@@ -468,16 +468,18 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB) ...@@ -468,16 +468,18 @@ void term_nr_ue_signal(PHY_VARS_NR_UE *ue, int nb_connected_gNB)
} }
free_and_zero(ue->nr_gold_pdsch[0]); free_and_zero(ue->nr_gold_pdsch[0]);
for (int gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) { for (int gNB_id = 0; gNB_id < ue->n_connected_gNB+1; gNB_id++) {
// PDSCH // PDSCH
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->pdsch_vars[th_id][gNB_id]->llr_shifts); free_and_zero(ue->pdsch_vars[th_id][gNB_id]->llr_shifts);
free_and_zero(ue->pdsch_vars[th_id][gNB_id]->llr128_2ndstream); free_and_zero(ue->pdsch_vars[th_id][gNB_id]->llr128_2ndstream);
phy_term_nr_ue__PDSCH(ue->pdsch_vars[th_id][gNB_id], fp); phy_term_nr_ue__PDSCH(ue->pdsch_vars[th_id][gNB_id], fp);
free_and_zero(ue->pdsch_vars[th_id][gNB_id]); free_and_zero(ue->pdsch_vars[th_id][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++) {
for (int i = 0; i < fp->nb_antennas_rx; i++) { for (int i = 0; i < fp->nb_antennas_rx; i++) {
......
...@@ -280,35 +280,35 @@ typedef void(*aidftfunc_t)(int16_t *sigF,int16_t *sig,unsigned char scale_flag) ...@@ -280,35 +280,35 @@ typedef void(*aidftfunc_t)(int16_t *sigF,int16_t *sig,unsigned char scale_flag)
#define SZ_FUNC(Sz) void dft ## Sz(int16_t *x,int16_t *y,uint8_t scale_flag); #define SZ_FUNC(Sz) void dft ## Sz(int16_t *x,int16_t *y,uint8_t scale_flag);
FOREACH_DFTSZ(SZ_FUNC) FOREACH_DFTSZ(SZ_FUNC)
#define SZ_iFUNC(Sz) void idft ## Sz(int16_t *x,int16_t *y,uint8_t scale_flag); #define SZ_iFUNC(Sz) void idft ## Sz(int16_t *x,int16_t *y,uint8_t scale_flag);
FOREACH_IDFTSZ(SZ_iFUNC) FOREACH_IDFTSZ(SZ_iFUNC)
#else #else
typedef void(*dftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag); typedef void(*dftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag);
typedef void(*idftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag); typedef void(*idftfunc_t)(uint8_t sizeidx,int16_t *sigF,int16_t *sig,unsigned char scale_flag);
# ifdef OAIDFTS_LOADER # ifdef OAIDFTS_LOADER
dftfunc_t dft; dftfunc_t dft;
idftfunc_t idft; idftfunc_t idft;
# else # else
extern dftfunc_t dft; extern dftfunc_t dft;
extern idftfunc_t idft; extern idftfunc_t idft;
extern int load_dftslib(void); extern int load_dftslib(void);
# endif # endif
#endif #endif
#define SZ_ENUM(Sz) DFT_ ## Sz, #define SZ_ENUM(Sz) DFT_ ## Sz,
typedef enum dft_size_idx { typedef enum dft_size_idx {
FOREACH_DFTSZ(SZ_ENUM) FOREACH_DFTSZ(SZ_ENUM)
DFT_SIZE_IDXTABLESIZE DFT_SIZE_IDXTABLESIZE
} dft_size_idx_t; } dft_size_idx_t;
#define SZ_iENUM(Sz) IDFT_ ## Sz, #define SZ_iENUM(Sz) IDFT_ ## Sz,
typedef enum idft_size_idx { typedef enum idft_size_idx {
FOREACH_IDFTSZ(SZ_iENUM) FOREACH_IDFTSZ(SZ_iENUM)
IDFT_SIZE_IDXTABLESIZE IDFT_SIZE_IDXTABLESIZE
} idft_size_idx_t; } idft_size_idx_t;
...@@ -316,14 +316,20 @@ typedef void(*aidftfunc_t)(int16_t *sigF,int16_t *sig,unsigned char scale_flag) ...@@ -316,14 +316,20 @@ typedef void(*aidftfunc_t)(int16_t *sigF,int16_t *sig,unsigned char scale_flag)
#ifdef OAIDFTS_MAIN #ifdef OAIDFTS_MAIN
#define SZ_PTR(Sz) {dft ## Sz,Sz}, #define SZ_PTR(Sz) {dft ## Sz,Sz},
struct {adftfunc_t func; int size;} dft_ftab[]={ struct {
adftfunc_t func;
int size;
} dft_ftab[]= {
FOREACH_DFTSZ(SZ_PTR) FOREACH_DFTSZ(SZ_PTR)
}; };
#define SZ_iPTR(Sz) {idft ## Sz,Sz}, #define SZ_iPTR(Sz) {idft ## Sz,Sz},
struct {adftfunc_t func; int size;} idft_ftab[]={ struct {
adftfunc_t func;
int size;
} idft_ftab[]= {
FOREACH_IDFTSZ(SZ_iPTR) FOREACH_IDFTSZ(SZ_iPTR)
}; };
#endif #endif
...@@ -378,7 +384,7 @@ int32_t add_real_vector64(int16_t *x, ...@@ -378,7 +384,7 @@ int32_t add_real_vector64(int16_t *x,
uint32_t N); uint32_t N);
int32_t sub_real_vector64(int16_t *x, int32_t sub_real_vector64(int16_t *x,
int16_t* y, int16_t *y,
int16_t *z, int16_t *z,
uint32_t N); uint32_t N);
...@@ -435,7 +441,7 @@ int32_t signal_energy_amp_shift(int32_t *input, uint32_t length); ...@@ -435,7 +441,7 @@ int32_t signal_energy_amp_shift(int32_t *input, uint32_t length);
/*!\fn int32_t signal_energy(int *,uint32_t); /*!\fn int32_t signal_energy(int *,uint32_t);
\brief Computes the signal energy per subcarrier \brief Computes the signal energy per subcarrier
*/ */
int32_t subcarrier_energy(int32_t *,uint32_t, int32_t* subcarrier_energy, uint16_t rx_power_correction); int32_t subcarrier_energy(int32_t *,uint32_t, int32_t *subcarrier_energy, uint16_t rx_power_correction);
#endif #endif
/*!\fn int32_t signal_energy_nodc(int32_t *,uint32_t); /*!\fn int32_t signal_energy_nodc(int32_t *,uint32_t);
......
...@@ -519,4 +519,7 @@ bool nr_find_nb_rb(uint16_t Qm, ...@@ -519,4 +519,7 @@ bool nr_find_nb_rb(uint16_t Qm,
void nr_sr_reporting(int Mod_idP, frame_t frameP, sub_frame_t slotP); void nr_sr_reporting(int Mod_idP, frame_t frameP, sub_frame_t slotP);
void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp); void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp);
void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sched_ctrl);
#endif /*__LAYER2_NR_MAC_PROTO_H__*/ #endif /*__LAYER2_NR_MAC_PROTO_H__*/
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