Commit 0d681a0e authored by Xiwen JIANG's avatar Xiwen JIANG

use nb_antennas_tx as physical antenna number and nb_antennas_tx_eNB as antenna port

parent 67262694
......@@ -1275,10 +1275,10 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
if (abstraction_flag==0) {
// TX vars
eNB_common_vars->txdata[eNB_id] = (int32_t**)malloc16(phy_vars_eNB->nb_antennas_tx_phy*sizeof(int32_t*) );
eNB_common_vars->txdataF[eNB_id] = (mod_sym_t **)malloc16(phy_vars_eNB->nb_antennas_tx_phy*sizeof(mod_sym_t*) );
eNB_common_vars->txdata[eNB_id] = (int32_t**)malloc16(frame_parms->nb_antennas_tx*sizeof(int32_t*) );
eNB_common_vars->txdataF[eNB_id] = (mod_sym_t **)malloc16(frame_parms->nb_antennas_tx*sizeof(mod_sym_t*) );
for (i=0; i<phy_vars_eNB->nb_antennas_tx_phy; i++) {
for (i=0; i<frame_parms->nb_antennas_tx; i++) {
#ifdef USER_MODE
eNB_common_vars->txdata[eNB_id][i] = (int32_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES*sizeof(int32_t) );
eNB_common_vars->txdataF[eNB_id][i] = (mod_sym_t*)malloc16_clear( FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(mod_sym_t) );
......@@ -1295,9 +1295,9 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
}
// RX vars
eNB_common_vars->rxdata[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_rx*sizeof(int32_t*) );
eNB_common_vars->rxdata_7_5kHz[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_rx*sizeof(int32_t*) );
eNB_common_vars->rxdataF[eNB_id] = (int32_t**)malloc16( frame_parms->nb_antennas_rx*sizeof(int32_t*) );
eNB_common_vars->rxdata[eNB_id] = (int32_t**)malloc16(frame_parms->nb_antennas_rx*sizeof(int32_t*) );
eNB_common_vars->rxdata_7_5kHz[eNB_id] = (int32_t**)malloc16(frame_parms->nb_antennas_rx*sizeof(int32_t*) );
eNB_common_vars->rxdataF[eNB_id] = (int32_t**)malloc16(frame_parms->nb_antennas_rx*sizeof(int32_t*) );
for (i=0; i<frame_parms->nb_antennas_rx; i++) {
#ifndef USER_MODE
......
......@@ -192,7 +192,6 @@ int allocate_REs_in_RB(PHY_VARS_eNB *phy_vars_eNB,
uint8_t *x1=NULL;
uint8_t mod_order1=2;
uint8_t nb_antennas_tx_phy = phy_vars_eNB->nb_antennas_tx_phy;
// Fill these in later for TM8-10
// int Nlayers1;
......@@ -917,7 +916,7 @@ break;
*jj = *jj + 1;
//printf("%d(%d) : %d,%d => ",tti_offset,*jj,((int16_t*)&tmp_sample1)[0],((int16_t*)&tmp_sample1)[1]);
for (aa=0; aa<nb_antennas_tx_phy; aa++) {
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
((int16_t*)&txdataF[aa][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((int16_t*)&beamforming_weights[re][aa])[0])>>15);
((int16_t*)&txdataF[aa][tti_offset])[0] +=-(int16_t)((((int16_t*)&tmp_sample1)[1]*((int16_t*)&beamforming_weights[re][aa])[1])>>15);
((int16_t*)&txdataF[aa][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((int16_t*)&beamforming_weights[re][aa])[1])>>15);
......@@ -956,7 +955,7 @@ break;
((int16_t*)&tmp_sample1)[0] = (int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
((int16_t*)&tmp_sample1)[1] = (int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
for (aa=0; aa<nb_antennas_tx_phy; aa++) {
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
((int16_t*)&txdataF[aa][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((int16_t*)&beamforming_weights[re][aa])[0])>>15);
((int16_t*)&txdataF[aa][tti_offset])[0] +=-(int16_t)((((int16_t*)&tmp_sample1)[1]*((int16_t*)&beamforming_weights[re][aa])[1])>>15);
((int16_t*)&txdataF[aa][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((int16_t*)&beamforming_weights[re][aa])[1])>>15);
......@@ -1004,7 +1003,7 @@ break;
((int16_t*)&tmp_sample1)[0] = (int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
((int16_t*)&tmp_sample1)[1] = (int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
for (aa=0; aa<nb_antennas_tx_phy; aa++) {
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
((int16_t*)&txdataF[aa][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((int16_t*)&beamforming_weights[re][aa])[0])>>15);
((int16_t*)&txdataF[aa][tti_offset])[0] +=-(int16_t)((((int16_t*)&tmp_sample1)[1]*((int16_t*)&beamforming_weights[re][aa])[1])>>15);
((int16_t*)&txdataF[aa][tti_offset])[1] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((int16_t*)&beamforming_weights[re][aa])[1])>>15);
......@@ -1025,7 +1024,7 @@ break;
tmp_sample1 = qpsk[(phy_vars_eNB->lte_gold_uespec_port5_table[0][Ns][ind_dword]>>(2*ind_qpsk_symb))&3];
mprime2++;
for (aa=0; aa<nb_antennas_tx_phy; aa++) {
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
((int16_t*)&txdataF[aa][tti_offset])[0] += (int16_t)((((int16_t*)&tmp_sample1)[0]*((int16_t*)&beamforming_weights[re][aa])[0])>>15);
((int16_t*)&txdataF[aa][tti_offset])[0] +=-(int16_t)((((int16_t*)&tmp_sample1)[1]*((int16_t*)&beamforming_weights[re][aa])[1])>>15);
......
......@@ -68,7 +68,7 @@ void generate_ue_spec_pilots(PHY_VARS_eNB *phy_vars_eNB,
printf("generate_dl_ue_spec:tti_offset=%d\n",tti_offset);
if(frame_parms->Ncp==0) {
for(aa=0;aa<phy_vars_eNB->nb_antennas_tx_phy;aa++){
for(aa=0;aa<frame_parms->nb_antennas_tx;aa++){
//antenna port 5 symbol 0 slot 0
lte_dl_ue_spec(phy_vars_eNB,
UE_id,
......
......@@ -209,7 +209,6 @@ typedef struct PHY_VARS_eNB_s {
eNB_proc_t proc[NUM_ENB_THREADS];
uint8_t local_flag;
uint32_t rx_total_gain_eNB_dB;
uint8_t nb_antennas_tx_phy;
LTE_DL_FRAME_PARMS lte_frame_parms;
PHY_MEASUREMENTS_eNB PHY_measurements_eNB[NUMBER_OF_eNB_SECTORS_MAX]; /// Measurement variables
LTE_eNB_COMMON lte_eNB_common_vars;
......
This diff is collapsed.
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