Commit e84a0017 authored by Florian Kaltenberger's avatar Florian Kaltenberger

choosing the right version of the unresolved merge conflict in beamforming.c

changed the memory allocation of txdataF and beam_weigths
parent 37a18b25
...@@ -1306,7 +1306,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -1306,7 +1306,8 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
common_vars->txdataF_BF[eNB_id] = (int32_t **)malloc16(fp->nb_antennas_tx*sizeof(int32_t*)); common_vars->txdataF_BF[eNB_id] = (int32_t **)malloc16(fp->nb_antennas_tx*sizeof(int32_t*));
if (eNB->node_function != NGFI_RRU_IF5) { if (eNB->node_function != NGFI_RRU_IF5) {
for (i=0; i<((eNB->do_precoding==0)?fp->nb_antennas_tx:14); i++) { for (i=0; i<NB_ANTENNA_PORTS_ENB; i++) {
if (i<fp->nb_antenna_ports_eNB || i==5) {
common_vars->txdataF[eNB_id][i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) ); common_vars->txdataF[eNB_id][i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*fp->symbols_per_tti*10*sizeof(int32_t) );
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
printf("[openair][LTE_PHY][INIT] common_vars->txdataF[%d][%d] = %p (%lu bytes)\n", printf("[openair][LTE_PHY][INIT] common_vars->txdataF[%d][%d] = %p (%lu bytes)\n",
...@@ -1315,6 +1316,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -1315,6 +1316,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
#endif #endif
} }
} }
}
for (i=0; i<fp->nb_antennas_tx; i++) { for (i=0; i<fp->nb_antennas_tx; i++) {
common_vars->txdataF_BF[eNB_id][i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t) ); common_vars->txdataF_BF[eNB_id][i] = (int32_t*)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t) );
if (eNB->node_function != NGFI_RCC_IF4p5) if (eNB->node_function != NGFI_RCC_IF4p5)
...@@ -1329,6 +1331,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -1329,6 +1331,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
} }
for (i=0; i<NB_ANTENNA_PORTS_ENB; i++) { for (i=0; i<NB_ANTENNA_PORTS_ENB; i++) {
if (i<fp->nb_antenna_ports_eNB || i==5) {
common_vars->beam_weights[eNB_id][i] = (int32_t **)malloc16_clear(fp->nb_antennas_tx*sizeof(int32_t*)); common_vars->beam_weights[eNB_id][i] = (int32_t **)malloc16_clear(fp->nb_antennas_tx*sizeof(int32_t*));
for (j=0; j<fp->nb_antennas_tx; j++) { for (j=0; j<fp->nb_antennas_tx; j++) {
common_vars->beam_weights[eNB_id][i][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t)); common_vars->beam_weights[eNB_id][i][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
...@@ -1350,6 +1353,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -1350,6 +1353,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
#endif #endif
} }
} }
}
// RX vars // RX vars
if (eNB->node_function != NGFI_RCC_IF4p5) { if (eNB->node_function != NGFI_RCC_IF4p5) {
......
...@@ -63,35 +63,8 @@ int beam_precoding(int32_t **txdataF, ...@@ -63,35 +63,8 @@ int beam_precoding(int32_t **txdataF,
// clear txdata_BF[aa][re] for each call of ue_spec_beamforming // clear txdata_BF[aa][re] for each call of ue_spec_beamforming
memset(txdataF_BF[aa],0,sizeof(int32_t)*(frame_parms->ofdm_symbol_size)); memset(txdataF_BF[aa],0,sizeof(int32_t)*(frame_parms->ofdm_symbol_size));
#if 0
/* TODO: to be resolved */
<<<<<<< HEAD
for (p=0; p<14; p++) {
//if (p==0 || p==1 || p==5 || p>7)
// mult_cpx_conj_vector((int16_t*)txdataF[p], (int16_t*)beam_weights[p][aa], (int16_t*)txdataF_BF[aa], frame_parms->ofdm_symbol_size, 15);
if (txdataF[p]) {//[slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re]!=0) {
for (re=0;re<frame_parms->ofdm_symbol_size;re++) {
((int16_t*)&txdataF_BF[aa][re])[0] += (int16_t)((((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[0]*((int16_t*)&beam_weights[p][aa][re])[0])>>15);
((int16_t*)&txdataF_BF[aa][re])[0] -= (int16_t)((((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[1]*((int16_t*)&beam_weights[p][aa][re])[1])>>15);
((int16_t*)&txdataF_BF[aa][re])[1] += (int16_t)((((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[0]*((int16_t*)&beam_weights[p][aa][re])[1])>>15);
((int16_t*)&txdataF_BF[aa][re])[1] += (int16_t)((((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[1]*((int16_t*)&beam_weights[p][aa][re])[0])>>15);
/*
printf("beamforming.c:txdataF[%d][%d]=%d+j%d, beam_weights[%d][%d][%d]=%d+j%d,txdata_BF[%d][%d]=%d+j%d\n",
p,slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re,
((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[0],
((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size+re])[1],
p,aa,re,
((int16_t*)&beam_weights[p][aa][re])[0],((int16_t*)&beam_weights[p][aa][re])[1],
aa,re,
((int16_t*)&txdataF_BF[aa][re])[0],
((int16_t*)&txdataF_BF[aa][re])[1]);
*/
}
=======
for (p=0; p<NB_ANTENNA_PORTS_ENB; p++) { for (p=0; p<NB_ANTENNA_PORTS_ENB; p++) {
if (p==0 || p==1 || p==5) { if (p<frame_parms->nb_antenna_ports_eNB || p==5) {
multadd_cpx_vector((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size],(int16_t*)beam_weights[p][aa], (int16_t*)txdataF_BF[aa], 0, frame_parms->ofdm_symbol_size, 15); multadd_cpx_vector((int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size],(int16_t*)beam_weights[p][aa], (int16_t*)txdataF_BF[aa], 0, frame_parms->ofdm_symbol_size, 15);
//mult_cpx_conj_vector((int16_t*)beam_weights[p][aa], (int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size], (int16_t*)txdataF_BF[aa], frame_parms->ofdm_symbol_size, 15, 1); //mult_cpx_conj_vector((int16_t*)beam_weights[p][aa], (int16_t*)&txdataF[p][slot_offset_F+symbol*frame_parms->ofdm_symbol_size], (int16_t*)txdataF_BF[aa], frame_parms->ofdm_symbol_size, 15, 1);
...@@ -114,10 +87,7 @@ int beam_precoding(int32_t **txdataF, ...@@ -114,10 +87,7 @@ int beam_precoding(int32_t **txdataF,
((int16_t*)&txdataF_BF[aa][re])[1]); ((int16_t*)&txdataF_BF[aa][re])[1]);
} }
}*/ }*/
>>>>>>> enhancement-192-beamforming
} }
} }
#endif
return 0; return 0;
} }
...@@ -2002,7 +2002,6 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst ...@@ -2002,7 +2002,6 @@ void init_eNB(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst
eNB->do_prach = NULL; eNB->do_prach = NULL;
eNB->do_precoding = 0; eNB->do_precoding = 0;
eNB->fep = eNB_fep_rru_if5; eNB->fep = eNB_fep_rru_if5;
eNB->do_precoding = 0;
eNB->td = NULL; eNB->td = NULL;
eNB->te = NULL; eNB->te = NULL;
eNB->proc_uespec_rx = NULL; eNB->proc_uespec_rx = NULL;
......
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