Commit 0f55139d authored by Khodr Saaifan's avatar Khodr Saaifan Committed by Thomas Schlichter

Extend nr_dlsch demoulation to support multiple Rx antennas with MRC

parent b962cc94
...@@ -642,14 +642,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -642,14 +642,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
ue->pdsch_vars[th_id][eNB_id]->llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) ); ue->pdsch_vars[th_id][eNB_id]->llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
ue->pdsch_vars[th_id][eNB_id]->layer_llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) ); ue->pdsch_vars[th_id][eNB_id]->layer_llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) );
ue->pdsch_vars[th_id][eNB_id]->llr128_2ndstream = (int16_t **)malloc16_clear( sizeof(int16_t *) ); ue->pdsch_vars[th_id][eNB_id]->llr128_2ndstream = (int16_t **)malloc16_clear( sizeof(int16_t *) );
ue->pdsch_vars[th_id][eNB_id]->rho = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) ); ue->pdsch_vars[th_id][eNB_id]->rho = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
} }
for (int i=0; i<fp->nb_antennas_rx; i++) {
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id]->rho[i] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
}
}
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) ); ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext = (int32_t **)malloc16_clear( 4*fp->nb_antennas_rx*sizeof(int32_t *) );
...@@ -662,6 +657,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -662,6 +657,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num ); ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num );
ue->pdsch_vars[th_id][eNB_id]->rho[idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) );
} }
} }
......
...@@ -805,6 +805,7 @@ void nr_dlsch_channel_compensation(int32_t **rxdataF_ext, ...@@ -805,6 +805,7 @@ void nr_dlsch_channel_compensation(int32_t **rxdataF_ext,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
int32_t **rho, int32_t **rho,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
uint8_t nb_aatx,
uint8_t symbol, uint8_t symbol,
uint8_t start_symbol, uint8_t start_symbol,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
...@@ -889,6 +890,15 @@ void nr_dlsch_channel_level_median(int **dl_ch_estimates_ext, ...@@ -889,6 +890,15 @@ void nr_dlsch_channel_level_median(int **dl_ch_estimates_ext,
int length, int length,
int start_point); int start_point);
void nr_dlsch_detection_mrc(int **rxdataF_comp,
int **rho,
int **dl_ch_mag,
int **dl_ch_magb,
short n_tx,
short n_rx,
unsigned char symbol,
unsigned short nb_rb);
void nr_dlsch_detection_mrc_core(int **rxdataF_comp, void nr_dlsch_detection_mrc_core(int **rxdataF_comp,
int **rxdataF_comp_i, int **rxdataF_comp_i,
int **rho, int **rho,
...@@ -962,6 +972,7 @@ void dlsch_channel_compensation_TM34(NR_DL_FRAME_PARMS *frame_parms, ...@@ -962,6 +972,7 @@ void dlsch_channel_compensation_TM34(NR_DL_FRAME_PARMS *frame_parms,
*/ */
void nr_dlsch_channel_level(int **dl_ch_estimates_ext, void nr_dlsch_channel_level(int **dl_ch_estimates_ext,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
uint8_t n_tx,
int32_t *avg, int32_t *avg,
uint8_t symbol, uint8_t symbol,
uint32_t len, uint32_t len,
...@@ -993,6 +1004,8 @@ void dlsch_channel_level_TM7(int32_t **dl_bf_ch_estimates_ext, ...@@ -993,6 +1004,8 @@ void dlsch_channel_level_TM7(int32_t **dl_bf_ch_estimates_ext,
void nr_dlsch_scale_channel(int32_t **dl_ch_estimates_ext, void nr_dlsch_scale_channel(int32_t **dl_ch_estimates_ext,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
uint8_t n_tx,
uint8_t n_rx,
NR_UE_DLSCH_t **dlsch_ue, NR_UE_DLSCH_t **dlsch_ue,
uint8_t symbol, uint8_t symbol,
uint8_t start_symbol, uint8_t start_symbol,
......
...@@ -234,7 +234,7 @@ typedef struct { ...@@ -234,7 +234,7 @@ typedef struct {
//! estimated rssi (dBm) //! estimated rssi (dBm)
short rx_rssi_dBm[NUMBER_OF_CONNECTED_eNB_MAX]; short rx_rssi_dBm[NUMBER_OF_CONNECTED_eNB_MAX];
//! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation) //! estimated correlation (wideband linear) between spatial channels (computed in dlsch_demodulation)
int rx_correlation[NUMBER_OF_CONNECTED_eNB_MAX][2]; int rx_correlation[NUMBER_OF_CONNECTED_eNB_MAX][4][4];
//! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation) //! estimated correlation (wideband dB) between spatial channels (computed in dlsch_demodulation)
int rx_correlation_dB[NUMBER_OF_CONNECTED_eNB_MAX][2]; int rx_correlation_dB[NUMBER_OF_CONNECTED_eNB_MAX][2];
...@@ -379,8 +379,8 @@ typedef struct { ...@@ -379,8 +379,8 @@ typedef struct {
int32_t **dl_ch_magb1[8][8]; int32_t **dl_ch_magb1[8][8];
/// \brief Magnitude of Downlink Channel, first layer (256QAM level). /// \brief Magnitude of Downlink Channel, first layer (256QAM level).
int32_t **dl_ch_magr0; int32_t **dl_ch_magr0;
/// \brief Cross-correlation of two eNB signals. /// \brief Cross-correlation Matrix of the gNB Tx channel signals.
/// - first index: rx antenna [0..nb_antennas_rx[ /// - first index: aatx*n_rx+aarx for all aatx=[0..n_tx[ and aarx=[0..nb_rx[
/// - second index: symbol [0..] /// - second index: symbol [0..]
int32_t **rho; int32_t **rho;
/// never used... always send dl_ch_rho_ext instead... /// never used... always send dl_ch_rho_ext instead...
......
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