Commit e32702c4 authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge branch 'feature-247-tm89' into feature-230-tm3_scheduler

Conflicts:
	openair1/SIMULATION/LTE_PHY/dlsim.c
parents 50b8b98a 672f95a6
...@@ -692,6 +692,11 @@ void phy_config_dedicated_eNB(uint8_t Mod_id, ...@@ -692,6 +692,11 @@ void phy_config_dedicated_eNB(uint8_t Mod_id,
eNB->do_precoding = 1; eNB->do_precoding = 1;
eNB->transmission_mode[UE_id] = 7; eNB->transmission_mode[UE_id] = 7;
break; break;
case AntennaInfoDedicated__transmissionMode_tm8_v920:
lte_gold_ue_spec(eNB->lte_gold_uespec_table,eNB->frame_parms.Nid_cell,NULL);
eNB->do_precoding = 1;
eNB->transmission_mode[UE_id] = 8;
break;
default: default:
LOG_E(PHY,"Unknown transmission mode!\n"); LOG_E(PHY,"Unknown transmission mode!\n");
break; break;
...@@ -1411,7 +1416,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -1411,7 +1416,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
if (eNB->node_function != NGFI_RRU_IF5) { if (eNB->node_function != NGFI_RRU_IF5) {
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) { if (i<fp->nb_antenna_ports_eNB || i==5 || i==7 || i==8) {
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",
...@@ -1436,7 +1441,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -1436,7 +1441,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) { if (i<fp->nb_antenna_ports_eNB || i==5 || i==7 || i==8) {
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));
...@@ -1638,6 +1643,9 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB, ...@@ -1638,6 +1643,9 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
init_prach_tables(839); init_prach_tables(839);
} // node_function != NGFI_RRU_IF4p5 } // node_function != NGFI_RRU_IF4p5
/*init the ue spec reference sequence for TM8/9*/
lte_gold_ue_spec(eNB->lte_gold_uespec_table,eNB->frame_parms.Nid_cell, NULL);
return (0); return (0);
} }
...@@ -42,11 +42,12 @@ unsigned int lte_gold_generic(unsigned int *x1, unsigned int *x2, unsigned char ...@@ -42,11 +42,12 @@ unsigned int lte_gold_generic(unsigned int *x1, unsigned int *x2, unsigned char
@param frame_parms LTE DL Frame parameters @param frame_parms LTE DL Frame parameters
@param lte_gold_table pointer to table where sequences are stored @param lte_gold_table pointer to table where sequences are stored
@param Nid_cell Cell Id (to compute sequences for local and adjacent cells) */ @param Nid_cell Cell Id (to compute sequences for local and adjacent cells) */
void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14],uint16_t Nid_cell); void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14],uint16_t Nid_cell);
void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_table[2][20][2][21],uint16_t Nid_cell, uint16_t *n_idDMRS); /*! \brief This function generates the LTE Gold sequence for DL UE-specific pilots for antenna ports 7,...,14 (transmission modes 8/9) */
void lte_gold_ue_spec(uint32_t lte_gold_uespec_table[2][20][2][21],uint16_t Nid_cell, uint16_t *n_idDMRS);
/*! \brief This function generates the LTE Gold sequence for DL UE-specific pilots for antenna port 5 (transmission mode 7) */
void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_t Nid_cell, uint16_t n_rnti); void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_t Nid_cell, uint16_t n_rnti);
/*!\brief This function generates the LTE Gold sequence (36-211, Sec 7.2), specifically for DL UE-specific reference signals for antenna ports 7..14. /*!\brief This function generates the LTE Gold sequence (36-211, Sec 7.2), specifically for DL UE-specific reference signals for antenna ports 7..14.
...@@ -54,7 +55,6 @@ void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_ ...@@ -54,7 +55,6 @@ void lte_gold_ue_spec_port5(uint32_t lte_gold_uespec_port5_table[20][38],uint16_
@param lte_gold_uespec_table pointer to table where sequences are stored @param lte_gold_uespec_table pointer to table where sequences are stored
@param Nid_cell Cell Id (to compute sequences for local and adjacent cells) @param Nid_cell Cell Id (to compute sequences for local and adjacent cells)
@param n_idDMRS Scrambling identity for TM10*/ @param n_idDMRS Scrambling identity for TM10*/
void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_MBSFN); void lte_gold_mbsfn(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_mbsfn_table[10][3][42],uint16_t Nid_MBSFN);
......
...@@ -81,7 +81,7 @@ void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14] ...@@ -81,7 +81,7 @@ void lte_gold(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_table[20][2][14]
} }
} }
void lte_gold_ue_spec(LTE_DL_FRAME_PARMS *frame_parms,uint32_t lte_gold_uespec_table[2][20][2][21],uint16_t Nid_cell, uint16_t *n_idDMRS) void lte_gold_ue_spec(uint32_t lte_gold_uespec_table[2][20][2][21],uint16_t Nid_cell, uint16_t *n_idDMRS)
{ {
unsigned char ns,l; unsigned char ns,l;
......
...@@ -885,6 +885,7 @@ int generate_eNB_dlsch_params_from_dci(int frame, ...@@ -885,6 +885,7 @@ int generate_eNB_dlsch_params_from_dci(int frame,
uint8_t rah=0; uint8_t rah=0;
uint8_t TPC=0; uint8_t TPC=0;
uint8_t TB0_active=0,TB1_active=0; uint8_t TB0_active=0,TB1_active=0;
uint8_t ndi1=0,ndi2=0;
LTE_DL_eNB_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL; LTE_DL_eNB_HARQ_t *dlsch0_harq=NULL,*dlsch1_harq=NULL;
// printf("Generate eNB DCI, format %d, rnti %x (pdu %p)\n",dci_format,rnti,dci_pdu); // printf("Generate eNB DCI, format %d, rnti %x (pdu %p)\n",dci_format,rnti,dci_pdu);
...@@ -2124,172 +2125,246 @@ int generate_eNB_dlsch_params_from_dci(int frame, ...@@ -2124,172 +2125,246 @@ int generate_eNB_dlsch_params_from_dci(int frame,
break; break;
case format2B: case format2B:
switch (frame_parms->N_RB_DL) {
switch (frame_parms->N_RB_DL) { case 6:
if (frame_type == TDD) {
mcs1 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rballoc;
rv1 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rv2;
ndi1 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->ndi1;
ndi2 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->ndi2;
harq_pid = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->harq_pid;
} else {
mcs1 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rballoc;
rv1 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rv2;
ndi1 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->ndi1;
ndi2 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->ndi2;
harq_pid = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->harq_pid;
}
case 6: break;
if (frame_type == TDD) {
mcs1 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rballoc;
rv1 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->rv2;
harq_pid = ((DCI2B_1_5MHz_TDD_t *)dci_pdu)->harq_pid;
} else {
mcs1 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rballoc;
rv1 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->rv2;
harq_pid = ((DCI2B_1_5MHz_FDD_t *)dci_pdu)->harq_pid;
}
break; case 25:
if (frame_type == TDD) {
mcs1 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rv2;
ndi1 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->ndi1;
ndi2 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->ndi2;
harq_pid = ((DCI2B_5MHz_TDD_t *)dci_pdu)->harq_pid;
} else {
mcs1 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rv2;
ndi1 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->ndi1;
ndi2 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->ndi2;
harq_pid = ((DCI2B_5MHz_FDD_t *)dci_pdu)->harq_pid;
}
case 25: break;
if (frame_type == TDD) {
mcs1 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_5MHz_TDD_t *)dci_pdu)->rv2;
harq_pid = ((DCI2B_5MHz_TDD_t *)dci_pdu)->harq_pid;
} else {
mcs1 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_5MHz_FDD_t *)dci_pdu)->rv2;
harq_pid = ((DCI2B_5MHz_FDD_t *)dci_pdu)->harq_pid;
}
break; case 50:
if (frame_type == TDD) {
mcs1 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rv2;
ndi1 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->ndi1;
ndi2 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->ndi2;
harq_pid = ((DCI2B_10MHz_TDD_t *)dci_pdu)->harq_pid;
} else {
mcs1 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rv2;
ndi1 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->ndi1;
ndi2 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->ndi2;
harq_pid = ((DCI2B_10MHz_FDD_t *)dci_pdu)->harq_pid;
}
case 50: break;
if (frame_type == TDD) {
mcs1 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_10MHz_TDD_t *)dci_pdu)->rv2;
harq_pid = ((DCI2B_10MHz_TDD_t *)dci_pdu)->harq_pid;
} else {
mcs1 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_10MHz_FDD_t *)dci_pdu)->rv2;
harq_pid = ((DCI2B_10MHz_FDD_t *)dci_pdu)->harq_pid;
}
break; case 100:
if (frame_type == TDD) {
mcs1 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rv2;
ndi1 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->ndi1;
ndi2 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->ndi2;
harq_pid = ((DCI2B_20MHz_TDD_t *)dci_pdu)->harq_pid;
} else {
mcs1 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rv2;
ndi1 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->ndi1;
ndi2 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->ndi2;
harq_pid = ((DCI2B_20MHz_FDD_t *)dci_pdu)->harq_pid;
}
case 100: break;
if (frame_type == TDD) {
mcs1 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_20MHz_TDD_t *)dci_pdu)->rv2;
harq_pid = ((DCI2B_20MHz_TDD_t *)dci_pdu)->harq_pid;
} else {
mcs1 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->mcs1;
mcs2 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->mcs2;
rballoc = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rballoc;
rah = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rah;
rv1 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rv1;
rv2 = ((DCI2B_20MHz_FDD_t *)dci_pdu)->rv2;
harq_pid = ((DCI2B_20MHz_FDD_t *)dci_pdu)->harq_pid;
} }
break; if (harq_pid>=8) {
} LOG_E(PHY,"ERROR: Format 2_2A: harq_pid=%d >= 8\n", harq_pid);
return(-1);
}
if (harq_pid>=8) {
LOG_E(PHY,"ERROR: Format 2_2A: harq_pid=%d >= 8\n", harq_pid);
return(-1);
}
dlsch0 = dlsch[0];
dlsch1 = dlsch[1];
dlsch0->subframe_tx[subframe] = 1;
dlsch0->current_harq_pid = harq_pid;
dlsch1->current_harq_pid = harq_pid;
dlsch0->harq_ids[subframe] = harq_pid;
dlsch1->harq_ids[subframe] = harq_pid;
// printf("Setting DLSCH harq id %d to subframe %d\n",harq_pid,subframe);
dlsch0_harq = dlsch0->harq_processes[harq_pid];
dlsch1_harq = dlsch1->harq_processes[harq_pid];
// Needs to be checked
dlsch0_harq->codeword=0;
dlsch1_harq->codeword=1;
conv_rballoc(rah,
rballoc,
frame_parms->N_RB_DL,
dlsch0_harq->rb_alloc);
dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0];
dlsch0_harq->nb_rb = conv_nprb(rah,
rballoc,
frame_parms->N_RB_DL);
dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
dlsch0_harq->mcs = mcs1; /*
dlsch1_harq->mcs = mcs2; If both transport blocks are enabled, the number of layers equals two; transport block 1 is mapped to codeword 0; and transport block 2 is mapped to codeword 1. Antenna ports 7 and 8 are used for spatial multiplexing.
dlsch0_harq->rvidx = rv1; In case one of the transport blocks is disabled, the number of layers equals one; the active transport block is mapped to codeword 0; and the antenna port for single-antenna port transmission is according to the ndi of the disabled TB (0 -> 7, 1 -> 8)
dlsch1_harq->rvidx = rv2; */
TB0_active = 1;
TB1_active = 1;
// check if either TB is disabled (see 36-213 V8.6 p. 26) if ((rv1 == 1) && (mcs1 == 0)) {
TB0_active=0;
}
if ((rv2 == 1) && (mcs2 == 0)) {
TB1_active=0;
}
if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) if (TB0_active && TB1_active) {
dlsch0_harq->status = DISABLED; dlsch0=dlsch[0];
dlsch1=dlsch[1];
dlsch0->active = 1;
dlsch1->active = 1;
dlsch0_harq = dlsch0->harq_processes[harq_pid];
dlsch1_harq = dlsch1->harq_processes[harq_pid];
dlsch0_harq->mcs = mcs1;
dlsch1_harq->mcs = mcs2;
dlsch0_harq->rvidx = rv1;
dlsch1_harq->rvidx = rv2;
dlsch0_harq->status = ACTIVE;
dlsch1_harq->status = ACTIVE;
dlsch0_harq->codeword=0;
dlsch1_harq->codeword=1;
dlsch0_harq->first_layer=7;
dlsch1_harq->first_layer=8;
#ifdef DEBUG_HARQ
printf("\n ENB: BOTH ACTIVE\n");
#endif
}
else if (TB0_active && (TB1_active==0)) {
dlsch0=dlsch[0];
dlsch0->active = 1;
dlsch0_harq = dlsch0->harq_processes[harq_pid];
dlsch0_harq->mcs = mcs1;
dlsch0_harq->rvidx = rv1;
dlsch0_harq->status = ACTIVE;
dlsch0_harq->codeword = 0;
dlsch0_harq->first_layer = (ndi2==0 ? 7 : 8);
dlsch1=NULL;
dlsch1_harq = NULL;
#ifdef DEBUG_HARQ
printf("\n ENB: TB1 is deactivated, retransmit TB0 transmit in TM6\n");
#endif
}
else if ((TB0_active==0) && TB1_active) {
dlsch1=dlsch[1];
dlsch1->active = 1;
dlsch1_harq = dlsch1->harq_processes[harq_pid];
dlsch1_harq->mcs = mcs2;
dlsch1_harq->rvidx = rv2;
dlsch1_harq->status = ACTIVE;
dlsch1_harq->codeword = 0;
dlsch1_harq->first_layer = (ndi1==0 ? 7 : 8);
dlsch0=NULL;
dlsch0_harq = NULL;
#ifdef DEBUG_HARQ
printf("\n ENB: TB0 is deactivated, retransmit TB1 transmit in TM6\n");
#endif
}
else {
LOG_E(PHY,"should not happen!\n");
}
if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) if (dlsch0 != NULL) {
dlsch1_harq->status = DISABLED; dlsch0->rnti = rnti;
dlsch0->subframe_tx[subframe] = 1;
dlsch0->current_harq_pid = harq_pid;
dlsch0->harq_ids[subframe] = harq_pid;
}
dlsch0_harq->Nl = 1; if (dlsch1 != NULL) {
dlsch1->rnti = rnti;
dlsch1->subframe_tx[subframe] = 1;
dlsch1->current_harq_pid = harq_pid;
dlsch1->harq_ids[subframe] = harq_pid;
}
// printf("Setting DLSCH harq id %d to subframe %d\n",harq_pid,subframe);
if (dlsch0_harq->round == 0) { if (dlsch0 != NULL) {
dlsch0_harq->status = ACTIVE; conv_rballoc(rah,
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid); rballoc,
} frame_parms->N_RB_DL,
dlsch0_harq->rb_alloc);
dlsch0_harq->nb_rb = conv_nprb(rah,
rballoc,
frame_parms->N_RB_DL);
dlsch0_harq->mcs = mcs1; if (dlsch1!=NULL) {
dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0];
dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
}
} else if ((dlsch0 == NULL ) && (dlsch1 != NULL )) {
conv_rballoc(rah,
rballoc,
frame_parms->N_RB_DL,
dlsch1_harq->rb_alloc);
dlsch1_harq->nb_rb = conv_nprb(rah, rballoc, frame_parms->N_RB_DL);
}
if (dlsch0_harq->nb_rb > 0) { if (dlsch0_harq != NULL) {
dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1]; if (dlsch0_harq->nb_rb > 0) {
} else { dlsch0_harq->TBS = TBStable[get_I_TBS(dlsch0_harq->mcs)][dlsch0_harq->nb_rb-1];
dlsch0_harq->TBS = 0; } else {
} dlsch0_harq->TBS = 0;
}
dlsch0->active = 1; dlsch0_harq->Nl = 1;
dlsch0_harq->dl_power_off = 1;
dlsch0_harq->mimo_mode = TM8; //this DCI can only be used in TM8
dlsch0_harq->Nlayers = 1;
}
dlsch0->rnti = rnti; if (dlsch1_harq != NULL) {
dlsch1->rnti = rnti; if (dlsch1_harq->nb_rb > 0) {
dlsch1_harq->TBS = TBStable[get_I_TBS(dlsch1_harq->mcs)][dlsch1_harq->nb_rb-1];
} else {
dlsch1_harq->TBS = 0;
}
dlsch0_harq->dl_power_off = 1; dlsch1_harq->Nl = 1;
dlsch1_harq->dl_power_off = 1; dlsch1_harq->dl_power_off = 1;
dlsch1_harq->mimo_mode = TM8; //this DCI can only be used in TM8
dlsch1_harq->Nlayers = 1;
}
break; break;
case format2C: case format2C:
......
...@@ -162,7 +162,7 @@ typedef struct { ...@@ -162,7 +162,7 @@ typedef struct {
uint8_t Nl; uint8_t Nl;
/// Number of layers for this PDSCH transmission (TM8-10) /// Number of layers for this PDSCH transmission (TM8-10)
uint8_t Nlayers; uint8_t Nlayers;
/// First layer for this PSCH transmission /// First layer for this PDSCH transmission
uint8_t first_layer; uint8_t first_layer;
/// codeword this transport block is mapped to /// codeword this transport block is mapped to
uint8_t codeword; uint8_t codeword;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* \note * \note
* \warning * \warning
*/ */
//#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "SCHED/defs.h" #include "SCHED/defs.h"
#include "defs.h" #include "defs.h"
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
* \note * \note
* \warning * \warning
*/ */
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "PHY/CODING/defs.h" #include "PHY/CODING/defs.h"
...@@ -66,7 +67,7 @@ uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2nd ...@@ -66,7 +67,7 @@ uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2nd
{ {
return(1); return(1);
}*/ }*/
uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode) uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode, uint8_t Ns)
{ {
uint8_t offset = (lprime==1||lprime==3)?2:0; uint8_t offset = (lprime==1||lprime==3)?2:0;
if (lprime==-1) if (lprime==-1)
...@@ -86,6 +87,21 @@ uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, ...@@ -86,6 +87,21 @@ uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp,
} }
break; break;
case 8:/*ToDo (36.211 v11.3 p86)*/ /* Mapping to REs */
if (Ncp == NORMAL){
if ((re!=offset+1) && (re!=5+offset+1) && (re!=10+offset+1))
return(1);
} else {
if (Ns%2==0) { // even slot in a subframe
if ((re!=offset+1) && (re!=3+offset+1) && (re!=6+offset+1) && (re!=9+offset+1))
return(1);
} else { // odd slot in a subframe
if ((re!=offset+2) && (re!=3+offset+2) && (re!=6+offset+2) && (re!=9+offset+2))
return(1);
}
}
break;
default: default:
msg("is_not_UEspecRS() [dlsch_modulation.c] : ERROR, unknown beamforming_mode %d\n",beamforming_mode); msg("is_not_UEspecRS() [dlsch_modulation.c] : ERROR, unknown beamforming_mode %d\n",beamforming_mode);
return(-1); return(-1);
...@@ -258,7 +274,7 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -258,7 +274,7 @@ int allocate_REs_in_RB_pilots_16QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
{ {
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_eNB->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms;
uint8_t *x0 = dlsch0_harq->e; uint8_t *x0 = dlsch0_harq->e;
uint32_t qam16_table_offset_re = 0; uint32_t qam16_table_offset_re = 0;
...@@ -485,7 +501,7 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -485,7 +501,7 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
{ {
LTE_DL_FRAME_PARMS *frame_parms=&phy_vars_eNB->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_eNB->frame_parms;
uint8_t *x0 = dlsch0_harq->e; uint8_t *x0 = dlsch0_harq->e;
uint32_t qam64_table_offset_re = 0; uint32_t qam64_table_offset_re = 0;
...@@ -554,7 +570,7 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB, ...@@ -554,7 +570,7 @@ int allocate_REs_in_RB_pilots_64QAM_siso(PHY_VARS_eNB* phy_vars_eNB,
return(0); return(0);
} }
int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, int allocate_REs_in_RB(PHY_VARS_eNB *phy_vars_eNB,
int32_t **txdataF, int32_t **txdataF,
uint32_t *jj, uint32_t *jj,
uint32_t *jj2, uint32_t *jj2,
...@@ -620,20 +636,29 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -620,20 +636,29 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
int32_t tmp_sample1,tmp_sample2; int32_t tmp_sample1,tmp_sample2;
int16_t tmp_amp=amp; int16_t tmp_amp=amp;
int s=1; int s=1;
int mprime2 = mprime,ind,ind_dword,ind_qpsk_symb; int mprime2 = mprime,ind,ind_dword,ind_qpsk_symb,p,n_PRB,w;
int Wbar_NCP[8][4] = {{1,1,1,1},{1,-1,1,-1},{1,1,1,1},{1,-1,1,-1},{1,1,-1,-1},{-1,-1,1,1},{1,-1,-1,1},{-1,1,1,-1}} ;
gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)>>15); gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)>>15);
int32_t qpsk[4]; int32_t qpsk[4],nqpsk[4],*qpsk_p;
((int16_t *)&qpsk[0])[0] = gain_lin_QPSK; ((int16_t *)&qpsk[0])[0] = gain_lin_QPSK;
((int16_t *)&qpsk[0])[1] = gain_lin_QPSK; ((int16_t *)&qpsk[0])[1] = gain_lin_QPSK;
((int16_t *)&qpsk[1])[0] = -gain_lin_QPSK; ((int16_t *)&qpsk[1])[0] = -gain_lin_QPSK;
((int16_t *)&qpsk[1])[1] = gain_lin_QPSK;; ((int16_t *)&qpsk[1])[1] = gain_lin_QPSK;
((int16_t *)&qpsk[2])[0] = gain_lin_QPSK;; ((int16_t *)&qpsk[2])[0] = gain_lin_QPSK;
((int16_t *)&qpsk[2])[1] = -gain_lin_QPSK;; ((int16_t *)&qpsk[2])[1] = -gain_lin_QPSK;
((int16_t *)&qpsk[3])[0] = -gain_lin_QPSK;; ((int16_t *)&qpsk[3])[0] = -gain_lin_QPSK;
((int16_t *)&qpsk[3])[1] = -gain_lin_QPSK; ((int16_t *)&qpsk[3])[1] = -gain_lin_QPSK;
((int16_t *)&nqpsk[0])[0] = -gain_lin_QPSK;
((int16_t *)&nqpsk[0])[1] = -gain_lin_QPSK;
((int16_t *)&nqpsk[1])[0] = gain_lin_QPSK;
((int16_t *)&nqpsk[1])[1] = -gain_lin_QPSK;
((int16_t *)&nqpsk[2])[0] = -gain_lin_QPSK;
((int16_t *)&nqpsk[2])[1] = gain_lin_QPSK;
((int16_t *)&nqpsk[3])[0] = gain_lin_QPSK;
((int16_t *)&nqpsk[3])[1] = gain_lin_QPSK;
if ((dlsch0_harq != NULL) && (dlsch1_harq != NULL)) { //this is for TM3, TM4 if ((dlsch0_harq != NULL) && (dlsch1_harq != NULL)) { //this is for TM3, TM4
x0 = dlsch0_harq->e; x0 = dlsch0_harq->e;
...@@ -1456,7 +1481,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -1456,7 +1481,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
if (mimo_mode == TM7) { if (mimo_mode == TM7) {
*re_allocated = *re_allocated + 1; *re_allocated = *re_allocated + 1;
if (is_not_UEspecRS(lprime,re,frame_parms->Nid_cell%3,frame_parms->Ncp,7)) { if (is_not_UEspecRS(lprime,re,frame_parms->Nid_cell%3,frame_parms->Ncp,7,Ns)) {
switch (mod_order0){ switch (mod_order0){
case 2: //QPSK case 2: //QPSK
...@@ -1559,7 +1584,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -1559,7 +1584,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
} else if (mimo_mode >= TM8) { //TM8,TM9,TM10 } else if (mimo_mode >= TM8) { //TM8,TM9,TM10
//uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode) //uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode)
if (is_not_UEspecRS(lprime,re,frame_parms->nushift,frame_parms->Ncp,8)) { if (is_not_UEspecRS(lprime,re,frame_parms->nushift,frame_parms->Ncp,8,Ns)) {
switch (mod_order0) { switch (mod_order0) {
case 2: //QPSK case 2: //QPSK
...@@ -1574,7 +1599,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -1574,7 +1599,7 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
break; break;
case 4: //16QAM case 4: //16QAM
if (is_not_UEspecRS(lprime,re,frame_parms->nushift,frame_parms->Ncp,8)) { if (is_not_UEspecRS(lprime,re,frame_parms->nushift,frame_parms->Ncp,8,Ns)) {
qam16_table_offset_re = 0; qam16_table_offset_re = 0;
qam16_table_offset_im = 0; qam16_table_offset_im = 0;
...@@ -1650,6 +1675,41 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB, ...@@ -1650,6 +1675,41 @@ int allocate_REs_in_RB(PHY_VARS_eNB* phy_vars_eNB,
} }
} }
else {
/* TM8 ToDo: fill in UE spec RS (based on phy_vars_eNB->lte_gold_uespec_table multilied with the spreading sequence)*/
for (p=first_layer0; p<(first_layer0+Nlayers0); p++) {
for (n_PRB=0; n_PRB<dlsch0_harq->nb_rb; n_PRB+=2) {
if (frame_parms->Ncp==0) {
ind = 3*lprime*dlsch0_harq->nb_rb+3*n_PRB/*rb_alloc_ind*/+mprime2 ;
ind_dword = ind>>4 ;
ind_qpsk_symb = ind&0xf ;
if (((mprime2+n_PRB)%12)==0) {
w = Wbar_NCP[p-7][lprime] ;
} else {
w = Wbar_NCP[p-7][3-lprime] ;
}
} else {
ind = 4*lprime*dlsch0_harq->nb_rb+4*n_PRB/*rb_alloc_ind*/+mprime2 ;
ind_dword = ind>>4 ;
ind_qpsk_symb = ind&0xf ;
int l = lprime%2 ;
if ((mprime2%12)==0) {
w = Wbar_NCP[p-7][l] ;
} else {
w = Wbar_NCP[p-7][1-l] ;
}
}
qpsk_p = (w==1) ? qpsk : nqpsk;
}
/* pointer to the frequency domain Tx signal */
// txdataF[7][tti_offset] = qpsk[(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3] ;
txdataF[p][tti_offset] = qpsk_p[(phy_vars_eNB->lte_gold_uespec_table[0][Ns][lprime][ind_dword]>>(2*ind_qpsk_symb))&3] ;
mprime2++ ;
}
}
} else if (mimo_mode>=TM9_10) { } else if (mimo_mode>=TM9_10) {
printf("allocate_REs_in_RB() [dlsch.c] : ERROR, unknown mimo_mode %d\n",mimo_mode); printf("allocate_REs_in_RB() [dlsch.c] : ERROR, unknown mimo_mode %d\n",mimo_mode);
return(-1); return(-1);
...@@ -2207,12 +2267,77 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB, ...@@ -2207,12 +2267,77 @@ int dlsch_modulation(PHY_VARS_eNB* phy_vars_eNB,
lprime=-1; lprime=-1;
} }
// mapping ue specific beamforming weights from UE specified DLSCH structure to common space
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][5][aa])[i+1] = (phy_vars_eNB->dlsch[0][0]->ue_spec_bf_weights[0][aa])[i+frame_parms->N_RB_DL*12/2] ;
//memcpy(PHY_vars_eNB->lte_eNB_common_vars.beam_weights[0][5][aa][i], PHY_vars_eNB->dlsch_eNB[0][0]->ue_spec_bf_weights[0][aa][i+149], 300) ;
}
}
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){ for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
memcpy(phy_vars_eNB->common_vars.beam_weights[0][5][aa],dlsch0->ue_spec_bf_weights[0][aa],frame_parms->ofdm_symbol_size*sizeof(int32_t)); for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][5][aa])[i+frame_parms->first_carrier_offset] = (phy_vars_eNB->dlsch[0][0]->ue_spec_bf_weights[0][aa])[i] ;
// memcpy(PHY_vars_eNB->lte_eNB_common_vars.beam_weights[0][5][aa][i+363], PHY_vars_eNB->dlsch_eNB[0][0]->ue_spec_bf_weights[0][aa][i], 300) ;
}
} }
//printf("beam_weights[0][5][0][363]\n", PHY_vars_eNB->lte_eNB_common_vars.beam_weights[0][5][0][363]) ;
//printf("beam_weights[0][5][0][362]\n", PHY_vars_eNB->lte_eNB_common_vars.beam_weights[0][5][0][362]) ;
} }
else if (mimo_mode==TM8) { /*TODO (p 86 36.211 v11.3)*/
mprime = 0;
if (frame_parms->Ncp==0) {
if (l==13)
lprime=3;
else if (l==12)
lprime=2;
else if (l==6)
lprime=1;
else if (l==5)
lprime=0;
else
lprime=-1;
} else {
if (l==13)
lprime=3;
else if (l==12)
lprime=2;
else if (l==5)
lprime=1;
else if (l==4)
lprime=0;
else
lprime=-1;
}
/*NOTE: the antenna port 7 and 8 should be replaced with dlsch0_harq->first_layer and dlsch1_harq->first_layer below (when first_layer is actually initialized)*/
if (dlsch0 != NULL) {
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][7][aa])[i+1] = (dlsch0->ue_spec_bf_weights[0][aa])[i+frame_parms->N_RB_DL*12/2] ;
}
}
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][7][aa])[i+frame_parms->first_carrier_offset] = (dlsch0->ue_spec_bf_weights[0][aa])[i] ;
}
}
}
if (dlsch1 != NULL) {
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][8][aa])[i+1] = (dlsch1->ue_spec_bf_weights[0][aa])[i+frame_parms->N_RB_DL*12/2] ;
}
}
for (aa=0;aa<frame_parms->nb_antennas_tx;aa++){
for (i=0;i<frame_parms->N_RB_DL*12/2;i++){
(phy_vars_eNB->common_vars.beam_weights[0][8][aa])[i+frame_parms->first_carrier_offset] = (dlsch1->ue_spec_bf_weights[0][aa])[i] ;
}
}
}
}
Ns = 2*subframe_offset+(l>=(nsymb>>1)); Ns = 2*subframe_offset+(l>=(nsymb>>1));
...@@ -2580,13 +2705,13 @@ int mch_modulation(int32_t **txdataF, ...@@ -2580,13 +2705,13 @@ int mch_modulation(int32_t **txdataF,
int16_t amp, int16_t amp,
uint32_t subframe_offset, uint32_t subframe_offset,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
LTE_eNB_DLSCH_t *dlsch) LTE_eNB_DLSCH_t *dlsch_eNB)
{ {
uint8_t nsymb,nsymb_pmch; uint8_t nsymb,nsymb_pmch;
uint32_t i,jj,re_allocated,symbol_offset; uint32_t i,jj,re_allocated,symbol_offset;
uint16_t l,rb,re_offset; uint16_t l,rb,re_offset;
uint8_t skip_dc=0; uint8_t skip_dc=0;
uint8_t mod_order = get_Qm(dlsch->harq_processes[0]->mcs); uint8_t mod_order = get_Qm(dlsch_eNB->harq_processes[0]->mcs);
int16_t qam16_table_a[4],qam64_table_a[8];//,qam16_table_b[4],qam64_table_b[8]; int16_t qam16_table_a[4],qam64_table_a[8];//,qam16_table_b[4],qam64_table_b[8];
int16_t *qam_table_s; int16_t *qam_table_s;
...@@ -2639,7 +2764,7 @@ int mch_modulation(int32_t **txdataF, ...@@ -2639,7 +2764,7 @@ int mch_modulation(int32_t **txdataF,
&jj, &jj,
re_offset, re_offset,
symbol_offset, symbol_offset,
dlsch->harq_processes[0]->e, dlsch_eNB->harq_processes[0]->e,
l, l,
mod_order, mod_order,
amp, amp,
...@@ -2661,7 +2786,7 @@ int mch_modulation(int32_t **txdataF, ...@@ -2661,7 +2786,7 @@ int mch_modulation(int32_t **txdataF,
} }
#ifdef DEBUG_DLSCH_MODULATION #ifdef DEBUG_DLSCH_MODULATION
printf("generate_dlsch(MCH) : jj = %d,re_allocated = %d (G %d)\n",jj,re_allocated,get_G(frame_parms,dlsch->harq_processes[0]->nb_rb,dlsch->harq_processes[0]->rb_alloc,mod_order,1,2,0,subframe_offset,1/*transmission mode*/)); printf("generate_dlsch(MCH) : jj = %d,re_allocated = %d (G %d)\n",jj,re_allocated,get_G(frame_parms,dlsch_eNB->harq_processes[0]->nb_rb,dlsch->harq_processes[0]->rb_alloc,mod_order,1,2,0,subframe_offset,1/*transmission mode*/));
#endif #endif
return (re_allocated); return (re_allocated);
......
...@@ -2169,7 +2169,7 @@ int is_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parm ...@@ -2169,7 +2169,7 @@ int is_pmch_subframe(frame_t frame, int subframe, LTE_DL_FRAME_PARMS *frame_parm
uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2ndpilots); uint8_t is_not_pilot(uint8_t pilots, uint8_t re, uint8_t nushift, uint8_t use2ndpilots);
uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode); uint8_t is_not_UEspecRS(int8_t lprime, uint8_t re, uint8_t nushift, uint8_t Ncp, uint8_t beamforming_mode, uint8_t Ns);
uint32_t dlsch_decoding_abstraction(double *dlsch_MIPB, uint32_t dlsch_decoding_abstraction(double *dlsch_MIPB,
LTE_DL_FRAME_PARMS *lte_frame_parms, LTE_DL_FRAME_PARMS *lte_frame_parms,
......
...@@ -56,7 +56,7 @@ int beam_precoding(int32_t **txdataF, ...@@ -56,7 +56,7 @@ int beam_precoding(int32_t **txdataF,
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));
for (p=0; p<NB_ANTENNA_PORTS_ENB; p++) { for (p=0; p<NB_ANTENNA_PORTS_ENB; p++) {
if (p<frame_parms->nb_antenna_ports_eNB || p==5) { if (p<frame_parms->nb_antenna_ports_eNB || p==5 || p==7 || p==8) {
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);
......
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
#define DMA_BLKS_PER_SLOT (SLOT_LENGTH_BYTES/2048) // Number of DMA blocks per slot #define DMA_BLKS_PER_SLOT (SLOT_LENGTH_BYTES/2048) // Number of DMA blocks per slot
#define SLOT_TIME_NS (SLOT_LENGTH_SAMPLES*(1e3)/7.68) // slot time in ns #define SLOT_TIME_NS (SLOT_LENGTH_SAMPLES*(1e3)/7.68) // slot time in ns
#define NB_ANTENNA_PORTS_ENB 6 // total number of eNB antenna ports #define NB_ANTENNA_PORTS_ENB 9 // total number of eNB antenna ports
#ifdef EXMIMO #ifdef EXMIMO
#define TARGET_RX_POWER 55 // Target digital power for the AGC #define TARGET_RX_POWER 55 // Target digital power for the AGC
......
...@@ -51,7 +51,6 @@ ...@@ -51,7 +51,6 @@
#include "unitary_defs.h" #include "unitary_defs.h"
#include "PHY/TOOLS/lte_phy_scope.h" #include "PHY/TOOLS/lte_phy_scope.h"
PHY_VARS_eNB *eNB; PHY_VARS_eNB *eNB;
...@@ -92,35 +91,7 @@ uint64_t DLSCH_alloc_pdu_1[2]; ...@@ -92,35 +91,7 @@ uint64_t DLSCH_alloc_pdu_1[2];
#define CCCH_RB_ALLOC computeRIV(eNB->frame_parms.N_RB_UL,0,2) #define CCCH_RB_ALLOC computeRIV(eNB->frame_parms.N_RB_UL,0,2)
//#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13 //#define DLSCH_RB_ALLOC 0x1fbf // igore DC component,RB13
//#define DLSCH_RB_ALLOC 0x0001 //#define DLSCH_RB_ALLOC 0x0001
void do_OFDM_mod_l(int32_t **txdataF, int32_t **txdata, uint16_t next_slot, LTE_DL_FRAME_PARMS *frame_parms)
{
int aa, slot_offset, slot_offset_F;
slot_offset_F = (next_slot)*(frame_parms->ofdm_symbol_size)*((frame_parms->Ncp==1) ? 6 : 7);
slot_offset = (next_slot)*(frame_parms->samples_per_tti>>1);
for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
// printf("Thread %d starting ... aa %d (%llu)\n",omp_get_thread_num(),aa,rdtsc());
if (frame_parms->Ncp == 1)
PHY_ofdm_mod(&txdataF[aa][slot_offset_F], // input
&txdata[aa][slot_offset], // output
frame_parms->ofdm_symbol_size,
6, // number of symbols
frame_parms->nb_prefix_samples, // number of prefix samples
CYCLIC_PREFIX);
else {
normal_prefix_mod(&txdataF[aa][slot_offset_F],
&txdata[aa][slot_offset],
7,
frame_parms);
}
}
}
void DL_channel(PHY_VARS_eNB *eNB,PHY_VARS_UE *UE,int subframe,int awgn_flag,double SNR, int tx_lev,int hold_channel,int abstx, int num_rounds, int trials, int round, channel_desc_t *eNB2UE[4], void DL_channel(PHY_VARS_eNB *eNB,PHY_VARS_UE *UE,int subframe,int awgn_flag,double SNR, int tx_lev,int hold_channel,int abstx, int num_rounds, int trials, int round, channel_desc_t *eNB2UE[4],
double *s_re[2],double *s_im[2],double *r_re[2],double *r_im[2],FILE *csv_fd) { double *s_re[2],double *s_im[2],double *r_re[2],double *r_im[2],FILE *csv_fd) {
...@@ -1110,7 +1081,6 @@ fill_DCI ( ...@@ -1110,7 +1081,6 @@ fill_DCI (
*num_common_dci = *num_common_dci + 1; *num_common_dci = *num_common_dci + 1;
*num_dci = *num_dci + 1; *num_dci = *num_dci + 1;
} }
break; break;
case 5: case 5:
...@@ -1131,6 +1101,116 @@ fill_DCI ( ...@@ -1131,6 +1101,116 @@ fill_DCI (
*num_dci = *num_dci + 1; *num_dci = *num_dci + 1;
break; break;
case 8:
if (common_flag == 0) {
if (eNB->frame_parms.frame_type == TDD) {
switch (eNB->frame_parms.N_RB_DL) {
case 6:
dci_length = sizeof_DCI2B_1_5MHz_TDD_t;
dci_length_bytes = sizeof(DCI2B_1_5MHz_TDD_t);
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc = DLSCH_RB_ALLOC;
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->scrambling_id = 0;
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->TPC = 0;
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->dai = 0;
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid = 0;
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->mcs1 = mcs1;
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi1 = ndi1;
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv1 = rv1;
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->mcs2 = mcs2;
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi2 = ndi2;
((DCI2B_1_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv2 = rv2;
break;
case 25:
dci_length = sizeof_DCI2B_5MHz_TDD_t;
dci_length_bytes = sizeof(DCI2B_5MHz_TDD_t);
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rah = 0;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->scrambling_id = 0;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc = DLSCH_RB_ALLOC;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->TPC = 0;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->dai = 0;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid = 0;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->mcs1 = mcs1;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi1 = ndi1;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv1 = rv1;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->mcs2 = mcs2;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi2 = ndi2;
((DCI2B_5MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv2 = rv2;
break;
case 50:
dci_length = sizeof_DCI2B_10MHz_TDD_t;
dci_length_bytes = sizeof(DCI2B_10MHz_TDD_t);
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rah = 0;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->scrambling_id = 0;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc = DLSCH_RB_ALLOC;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->TPC = 0;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->dai = 0;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid = 0;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->mcs1 = mcs1;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi1 = ndi1;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv1 = rv1;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->mcs2 = mcs2;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi2 = ndi2;
((DCI2B_10MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv2 = rv2;
break;
case 100:
dci_length = sizeof_DCI2B_20MHz_TDD_t;
dci_length_bytes = sizeof(DCI2B_20MHz_TDD_t);
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rah = 0;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->scrambling_id = 0;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rballoc = DLSCH_RB_ALLOC;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->TPC = 0;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->dai = 0;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->harq_pid = 0;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->mcs1 = mcs1;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi1 = ndi1;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv1 = rv1;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->mcs2 = mcs2;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi2 = ndi2;
((DCI2B_20MHz_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv2 = rv2;
break;
}
}
else {
printf("FDD DCI alloc todo!\n");
exit(-1);
}
memcpy(&dci_alloc[*num_dci].dci_pdu[0],&DLSCH_alloc_pdu_1[k],dci_length_bytes);
dci_alloc[*num_dci].dci_length = dci_length;
dci_alloc[*num_dci].L = 1;
dci_alloc[*num_dci].rnti = n_rnti+k;
dci_alloc[*num_dci].format = format2B;
dump_dci(&eNB->frame_parms,&dci_alloc[*num_dci]);
//printf("Generating dlsch params for user %d / format 2A (%d)\n",k,format2A);
generate_eNB_dlsch_params_from_dci(0,
subframe,
&DLSCH_alloc_pdu_1[0],
n_rnti+k,
format2B,
eNB->dlsch[0],
&eNB->frame_parms,
eNB->pdsch_config_dedicated,
SI_RNTI,
0,
P_RNTI,
eNB->UE_stats[0].DL_pmi_single,
transmission_mode>=7?transmission_mode:0);
*num_dci = *num_dci + 1;
*num_ue_spec_dci = *num_ue_spec_dci + 1;
}
else {
printf("DCI format 2B does not support common RNTIs\n");
}
printf("Generated DCI format 2B (Transmission Mode 8)\n");
break;
default: default:
printf ("Unsupported Transmission Mode!!!"); printf ("Unsupported Transmission Mode!!!");
exit (-1); exit (-1);
...@@ -1189,7 +1269,7 @@ int main(int argc, char **argv) ...@@ -1189,7 +1269,7 @@ int main(int argc, char **argv)
{ {
int c; int c;
int k,i,aa; int k,i,aa,p;
int re; int re;
int s,Kr,Kr_bytes; int s,Kr,Kr_bytes;
...@@ -1243,34 +1323,21 @@ int main(int argc, char **argv) ...@@ -1243,34 +1323,21 @@ int main(int argc, char **argv)
char input_trch_val[16]; char input_trch_val[16];
// unsigned char pbch_pdu[6];
int tpmi = 0; int tpmi = 0;
// FILE *rx_frame_file;
int n_frames; int n_frames;
int n_ch_rlz = 1; int n_ch_rlz = 1;
channel_desc_t *eNB2UE[4]; channel_desc_t *eNB2UE[4];
//uint8_t num_pdcch_symbols_2=0;
uint8_t rx_sample_offset = 0; uint8_t rx_sample_offset = 0;
//char stats_buffer[4096];
//int len;
uint8_t num_rounds = 4;//,fix_rounds=0; uint8_t num_rounds = 4;//,fix_rounds=0;
//int u;
int n=0; int n=0;
int abstx=0; int abstx=0;
//int iii;
int ch_realization; int ch_realization;
//int pmi_feedback=0; //int pmi_feedback=0;
int hold_channel=0; int hold_channel=0;
// void *data;
// int ii;
// int bler;
double blerr[4],uncoded_ber; //,avg_ber; double blerr[4],uncoded_ber; //,avg_ber;
short *uncoded_ber_bit=NULL; short *uncoded_ber_bit=NULL;
uint8_t N_RB_DL=25,osf=1; uint8_t N_RB_DL=25,osf=1;
...@@ -1280,12 +1347,9 @@ int main(int argc, char **argv) ...@@ -1280,12 +1347,9 @@ int main(int argc, char **argv)
char title[255]; char title[255];
int numCCE=0; int numCCE=0;
//int dci_length_bytes=0,dci_length=0;
//double channel_bandwidth = 5.0, sampling_rate=7.68;
int common_flag=0,TPC=0; int common_flag=0,TPC=0;
double cpu_freq_GHz; double cpu_freq_GHz;
// time_stats_t ts;//,sts,usts;
int avg_iter,iter_trials; int avg_iter,iter_trials;
int rballocset=0; int rballocset=0;
int print_perf=0; int print_perf=0;
...@@ -1320,9 +1384,19 @@ int main(int argc, char **argv) ...@@ -1320,9 +1384,19 @@ int main(int argc, char **argv)
int two_thread_flag=0; int two_thread_flag=0;
int DLSCH_RB_ALLOC = 0; int DLSCH_RB_ALLOC = 0;
int log_level = LOG_ERR; int log_level = LOG_DEBUG;
int dci_received; int dci_received;
logInit();
// enable these lines if you need debug info
set_comp_log(PHY,LOG_DEBUG,LOG_HIGH,1);
set_glog(log_level,LOG_HIGH);
// moreover you need to init itti with the following line
// however itti will catch all signals, so ctrl-c won't work anymore
// alternatively you can disable ITTI completely in CMakeLists.txt
//itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
#if defined(__arm__) #if defined(__arm__)
FILE *proc_fd = NULL; FILE *proc_fd = NULL;
char buf[64]; char buf[64];
...@@ -1621,12 +1695,13 @@ int main(int argc, char **argv) ...@@ -1621,12 +1695,13 @@ int main(int argc, char **argv)
(transmission_mode!=4) && (transmission_mode!=4) &&
(transmission_mode!=5) && (transmission_mode!=5) &&
(transmission_mode!=6) && (transmission_mode!=6) &&
(transmission_mode!=7)) { (transmission_mode!=7) &&
(transmission_mode!=8)) {
msg("Unsupported transmission mode %d\n",transmission_mode); msg("Unsupported transmission mode %d\n",transmission_mode);
exit(-1); exit(-1);
} }
if (transmission_mode>1 && transmission_mode<7) { if (transmission_mode>1 && transmission_mode<8) {
n_tx_port = 2; n_tx_port = 2;
} }
...@@ -1636,7 +1711,7 @@ int main(int argc, char **argv) ...@@ -1636,7 +1711,7 @@ int main(int argc, char **argv)
n_tx_phy=atoi(optarg); n_tx_phy=atoi(optarg);
if (n_tx_phy < n_tx_port) { if (n_tx_phy < n_tx_port) {
msg("n_tx_phy mush not be smaller than n_tx_port"); msg("n_tx_phy must not be smaller than n_tx_port");
exit(-1); exit(-1);
} }
...@@ -1677,6 +1752,7 @@ int main(int argc, char **argv) ...@@ -1677,6 +1752,7 @@ int main(int argc, char **argv)
case 'L': case 'L':
log_level=atoi(optarg); log_level=atoi(optarg);
set_glog(log_level,LOG_HIGH);
break; break;
case 'h': case 'h':
...@@ -1717,16 +1793,6 @@ int main(int argc, char **argv) ...@@ -1717,16 +1793,6 @@ int main(int argc, char **argv)
} }
} }
logInit();
// enable these lines if you need debug info
set_comp_log(PHY,LOG_DEBUG,LOG_HIGH,1);
set_glog(log_level,LOG_HIGH);
// moreover you need to init itti with the following line
// however itti will catch all signals, so ctrl-c won't work anymore
// alternatively you can disable ITTI completely in CMakeLists.txt
//itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info, messages_definition_xml, NULL);
if (common_flag == 0) { if (common_flag == 0) {
switch (N_RB_DL) { switch (N_RB_DL) {
case 6: case 6:
...@@ -2321,9 +2387,11 @@ int main(int argc, char **argv) ...@@ -2321,9 +2387,11 @@ int main(int argc, char **argv)
//PMI_FEEDBACK: //PMI_FEEDBACK:
// printf("Trial %d : Round %d, pmi_feedback %d \n",trials,round,pmi_feedback); // printf("Trial %d : Round %d, pmi_feedback %d \n",trials,round,pmi_feedback);
for (aa=0; aa<eNB->frame_parms.nb_antennas_tx; aa++) { for (p=0; p<NB_ANTENNA_PORTS_ENB; p++) {
memset(&eNB->common_vars.txdataF[eNB_id][aa][0],0,FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(int32_t)); if (p<frame_parms->nb_antenna_ports_eNB || p==5 || i==7 || i==8) {
} memset(&eNB->common_vars.txdataF[eNB_id][p][0],0,FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX*sizeof(int32_t));
}
}
if (input_fd==NULL) { if (input_fd==NULL) {
...@@ -2405,18 +2473,6 @@ int main(int argc, char **argv) ...@@ -2405,18 +2473,6 @@ int main(int argc, char **argv)
start_meas(&eNB->ofdm_mod_stats); start_meas(&eNB->ofdm_mod_stats);
/*
do_OFDM_mod_l(eNB->common_vars.txdataF[eNB_id],
eNB->common_vars.txdata[eNB_id],
(subframe*2),
&eNB->frame_parms);
do_OFDM_mod_l(eNB->common_vars.txdataF[eNB_id],
eNB->common_vars.txdata[eNB_id],
(subframe*2)+1,
&eNB->frame_parms);
*/
do_OFDM_mod_symbol(&eNB->common_vars, do_OFDM_mod_symbol(&eNB->common_vars,
eNB_id, eNB_id,
(subframe*2), (subframe*2),
...@@ -2438,10 +2494,11 @@ int main(int argc, char **argv) ...@@ -2438,10 +2494,11 @@ int main(int argc, char **argv)
phy_procedures_eNB_TX(eNB,proc_eNB,no_relay,NULL,0,dci_flag); phy_procedures_eNB_TX(eNB,proc_eNB,no_relay,NULL,0,dci_flag);
do_OFDM_mod_l(eNB->common_vars.txdataF[eNB_id], do_OFDM_mod_symbol(&eNB->common_vars,
eNB->common_vars.txdata[eNB_id], eNB_id,
(subframe*2)+2, (subframe*2)+2,
&eNB->frame_parms); &eNB->frame_parms,
eNB->do_precoding);
proc_eNB->frame_tx++; proc_eNB->frame_tx++;
...@@ -2462,13 +2519,14 @@ int main(int argc, char **argv) ...@@ -2462,13 +2519,14 @@ int main(int argc, char **argv)
write_output("txsig0.m","txs0", &eNB->common_vars.txdata[eNB_id][0][subframe* eNB->frame_parms.samples_per_tti], eNB->frame_parms.samples_per_tti,1,1); write_output("txsig0.m","txs0", &eNB->common_vars.txdata[eNB_id][0][subframe* eNB->frame_parms.samples_per_tti], eNB->frame_parms.samples_per_tti,1,1);
if (transmission_mode<7) { for (p=0; p<NB_ANTENNA_PORTS_ENB; p++) {
write_output("txsigF0.m","txsF0", &eNB->common_vars.txdataF[eNB_id][0][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1); if (p<frame_parms->nb_antenna_ports_eNB || p==5 || p==7 || p==8) {
} else if (transmission_mode == 7) { sprintf(fname,"txsigF%d.m",p);
write_output("txsigF0.m","txsF0", &eNB->common_vars.txdataF[eNB_id][5][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1); sprintf(vname,"txsF%d",p);
write_output("txsigF0_BF.m","txsF0_BF", &eNB->common_vars.txdataF_BF[eNB_id][0][0],eNB->frame_parms.ofdm_symbol_size,1,1); write_output(fname,vname, &eNB->common_vars.txdataF[eNB_id][p][subframe*nsymb*eNB->frame_parms.ofdm_symbol_size],nsymb*eNB->frame_parms.ofdm_symbol_size,1,1);
} }
} }
}
} }
DL_channel(eNB,UE,subframe,awgn_flag,SNR,tx_lev,hold_channel,abstx,num_rounds,trials,round,eNB2UE,s_re,s_im,r_re,r_im,csv_fd); DL_channel(eNB,UE,subframe,awgn_flag,SNR,tx_lev,hold_channel,abstx,num_rounds,trials,round,eNB2UE,s_re,s_im,r_re,r_im,csv_fd);
......
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