Commit ff0ca090 authored by Raymond Knopp's avatar Raymond Knopp

changed precoder initialization for cell-specific antenna ports

parent 6bfbb77e
...@@ -111,6 +111,9 @@ int phy_init_RU(RU_t *ru) { ...@@ -111,6 +111,9 @@ int phy_init_RU(RU_t *ru) {
LOG_D(PHY,"[INIT] %s() RC.nb_L1_inst:%d \n", __FUNCTION__, RC.nb_L1_inst); LOG_D(PHY,"[INIT] %s() RC.nb_L1_inst:%d \n", __FUNCTION__, RC.nb_L1_inst);
int starting_antenna_index=0;
for (i=0; i<ru->idx;i++) starting_antenna_index+=ru->nb_tx;
for (i=0; i<RC.nb_L1_inst; i++) { for (i=0; i<RC.nb_L1_inst; i++) {
for (p=0;p<15;p++) { for (p=0;p<15;p++) {
LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB); LOG_D(PHY,"[INIT] %s() nb_antenna_ports_eNB:%d \n", __FUNCTION__, ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB);
...@@ -119,10 +122,14 @@ int phy_init_RU(RU_t *ru) { ...@@ -119,10 +122,14 @@ int phy_init_RU(RU_t *ru) {
ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*)); ru->beam_weights[i][p] = (int32_t **)malloc16_clear(ru->nb_tx*sizeof(int32_t*));
for (j=0; j<ru->nb_tx; j++) { for (j=0; j<ru->nb_tx; j++) {
ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t)); ru->beam_weights[i][p][j] = (int32_t *)malloc16_clear(fp->ofdm_symbol_size*sizeof(int32_t));
// antenna ports 0-3 are mapped on antennas 0-3 // antenna ports 0-3 are mapped on antennas 0-3 as follows
// - antenna port p is mapped to antenna j on ru->idx as: p = (starting_antenna_index+j)%nb_anntena_ports_eNB
// antenna port 4 is mapped on antenna 0 // antenna port 4 is mapped on antenna 0
// antenna ports 5-14 are mapped on all antennas // antenna ports 5-14 are mapped on all antennas
if (((p<4) && (p==j)) || ((p==4) && (j==0))) {
if (((p<4) &&
(p==((starting_antenna_index+j)%ru->eNB_list[i]->frame_parms.nb_antenna_ports_eNB))) ||
((p==4) && (j==0))) {
for (re=0; re<fp->ofdm_symbol_size; re++) for (re=0; re<fp->ofdm_symbol_size; re++)
{ {
ru->beam_weights[i][p][j][re] = 0x00007fff; ru->beam_weights[i][p][j][re] = 0x00007fff;
......
...@@ -454,65 +454,37 @@ void feptx_prec(RU_t *ru) { ...@@ -454,65 +454,37 @@ void feptx_prec(RU_t *ru) {
// pdcch region, copy entire signal from txdataF->txdataF_BF (bf_mask = 1) // pdcch region, copy entire signal from txdataF->txdataF_BF (bf_mask = 1)
// else do beamforming for pdcch according to beam_weights // else do beamforming for pdcch according to beam_weights
// to be updated for eMBMS (p=4) // to be updated for eMBMS (p=4)
// For the moment this does nothing different than below.
/* AssertFatal(bf_mask[p][0]>=0 && bf_mask[p][0] < 3, for (l=0;l<pdcch_vars->num_pdcch_symbols;l++)
"Illegal bf_mask[%d][0] %d\n",p,bf_mask[p][0]); // for (rb=0;rb<fp->N_RB_DL;rb++)
*/ beam_precoding(eNB->common_vars.txdataF,
/*if (bf_mask_pdcch == 1) ru->common.txdataF_BF,
memcpy((void*)ru->common.txdataF_BF[aa], fp,
(void*)&eNB->common_vars.txdataF[p][0], ru->beam_weights,
pdcch_vars->num_pdcch_symbols*fp->ofdm_symbol_size*sizeof(int32_t)); l,
else if (bf_mask_pdcch == 2) {*/ aa,
for (l=0;l<pdcch_vars->num_pdcch_symbols;l++) p);
// for (rb=0;rb<fp->N_RB_DL;rb++)
beam_precoding(eNB->common_vars.txdataF,
ru->common.txdataF_BF,
fp,
ru->beam_weights,
l,
aa,
p);
//} // else if (bf_mask_pdcch == 2)
} //if (p<fp->nb_antenna_ports_eNB) } //if (p<fp->nb_antenna_ports_eNB)
// PDSCH region // PDSCH region
if (p<fp->nb_antenna_ports_eNB || p==5 || p==7 || p==8) { if (p<fp->nb_antenna_ports_eNB || p==5 || p==7 || p==8) {
for (l=pdcch_vars->num_pdcch_symbols;l<fp->symbols_per_tti;l++) { for (l=pdcch_vars->num_pdcch_symbols;l<fp->symbols_per_tti;l++) {
beam_precoding(eNB->common_vars.txdataF, beam_precoding(eNB->common_vars.txdataF,
ru->common.txdataF_BF, ru->common.txdataF_BF,
fp, fp,
ru->beam_weights, ru->beam_weights,
l, l,
aa, aa,
p); p);
/*for (rb=0;rb<fp->N_RB_DL;rb++) { } // for (l=pdcch_vars ....)
AssertFatal(bf_mask[p][rb]>=0 && bf_mask[p][rb] < 3,
"Illegal bf_mask[%d][%d] %d\n",p,rb,bf_mask[p][rb]);
if (bf_mask[p][rb]==1) {
memcpy((void*)&ru->common.txdataF_BF[aa][l*fp->ofdm_symbol_size],
(void*)&eNB->common_vars.txdataF[p][l*fp->ofdm_symbol_size],
fp->ofdm_symbol_size*sizeof(int32_t));
} else if (bf_mask[p][rb]==2) {
beam_precoding(eNB->common_vars.txdataF,
ru->common.txdataF_BF,
fp,
ru->beam_weights,
l,
aa,
p,
rb,
0);
} // else if (bf_mask[p][rb]==1)
}// for (rb=0;rb<...)*/
} // for (l=pdcch_vars ....)
} // if (p<fp->nb_antenna_ports_eNB) ... } // if (p<fp->nb_antenna_ports_eNB) ...
} // for (p=0...) } // for (p=0...)
} // for (aa=0 ...) } // for (aa=0 ...)
if(ru->idx<2) if(ru->idx<2)
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+ru->idx , 0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+ru->idx , 0);
// VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RU_FEPTX_PREC+ru->idx,0); // VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RU_FEPTX_PREC+ru->idx,0);
/////////////////////////////////////////////////// ///////////////////////////////////////////////////
...@@ -540,6 +512,7 @@ void feptx_prec(RU_t *ru) { ...@@ -540,6 +512,7 @@ void feptx_prec(RU_t *ru) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+ru->idx , 0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_PREC+ru->idx , 0);
} }
else { else {
AssertFatal(1==0,"Handling of multi-L1 case not ready yet\n");
for (i=0;i<ru->num_eNB;i++) { for (i=0;i<ru->num_eNB;i++) {
eNB = eNB_list[i]; eNB = eNB_list[i];
fp = &eNB->frame_parms; fp = &eNB->frame_parms;
......
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