Commit 08b8b314 authored by Cedric Roux's avatar Cedric Roux

Merge branch 'develop_integration_w25' into 'develop'

develop_integration_w25 into develop

Summary of changes:
- UE: configurable thread
- UE: fix in dci format1c decoding
- bladeRF hack
- configuration files for oaisim

See merge request !209
parents f364d13d 4deeb083
This diff is collapsed.
...@@ -58,8 +58,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -58,8 +58,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
temp = 0; temp = 0;
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) { for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_id][aa])[(i<<2)]; Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_id][aa])[(i<<2)];
Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)]; Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
temp += (Re*Re/2) + (Im*Im/2); temp += (Re*Re/2) + (Im*Im/2);
} }
......
...@@ -51,7 +51,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -51,7 +51,7 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
int uespec_pilot[300]; int uespec_pilot[300];
LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &phy_vars_ue->frame_parms;
LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[(Ns>>1)&0x1][eNB_id]; LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[(Ns>>1)%RX_NB_TH][eNB_id];
LTE_DL_UE_HARQ_t *dlsch0_harq; LTE_DL_UE_HARQ_t *dlsch0_harq;
harq_pid = dlsch_ue[0]->current_harq_pid; harq_pid = dlsch_ue[0]->current_harq_pid;
...@@ -63,9 +63,9 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -63,9 +63,9 @@ int lte_dl_bf_channel_estimation(PHY_VARS_UE *phy_vars_ue,
else else
rballoc = dlsch0_harq->rb_alloc_even; rballoc = dlsch0_harq->rb_alloc_even;
rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF; rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].rxdataF;
dl_bf_ch_estimates = phy_vars_ue->pdsch_vars[(Ns>>1)&0x1][eNB_id]->dl_bf_ch_estimates; dl_bf_ch_estimates = phy_vars_ue->pdsch_vars[(Ns>>1)%RX_NB_TH][eNB_id]->dl_bf_ch_estimates;
beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0; beamforming_mode = phy_vars_ue->transmission_mode[eNB_id]>6 ? phy_vars_ue->transmission_mode[eNB_id] : 0;
if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage if (phy_vars_ue->high_speed_flag == 0) // use second channel estimate position for temporary storage
......
...@@ -50,9 +50,10 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -50,9 +50,10 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1]; uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
uint8_t nushift,pilot1,pilot2,pilot3; uint8_t nushift,pilot1,pilot2,pilot3;
int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates[eNB_offset]; uint8_t previous_sfn = ((Ns>>1) - 1 )< 0 ? 9 : (Ns>>1) - 1;
int **dl_ch_estimates_previous=ue->common_vars.common_vars_rx_data_per_thread[((Ns>>1)+1)&0x1].dl_ch_estimates[eNB_offset]; int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates[eNB_offset];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF; int **dl_ch_estimates_previous=ue->common_vars.common_vars_rx_data_per_thread[(previous_sfn)%RX_NB_TH].dl_ch_estimates[eNB_offset];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].rxdataF;
if (ue->frame_parms.Ncp == 0) { // normal prefix if (ue->frame_parms.Ncp == 0) { // normal prefix
pilot1 = 4; pilot1 = 4;
...@@ -799,15 +800,15 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -799,15 +800,15 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
// do ifft of channel estimate // do ifft of channel estimate
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) { for (p=0; p<ue->frame_parms.nb_antenna_ports_eNB; p++) {
if (ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates[eNB_offset][(p<<1)+aarx]) if (ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates[eNB_offset][(p<<1)+aarx])
idft((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8], idft((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1); (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates_time[eNB_offset][(p<<1)+aarx],1);
} }
#if T_TRACER #if T_TRACER
T(T_UE_PHY_DL_CHANNEL_ESTIMATE, T_INT(eNB_id), T_INT(ue->Mod_id), T(T_UE_PHY_DL_CHANNEL_ESTIMATE, T_INT(eNB_id), T_INT(ue->Mod_id),
T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].frame_rx%1024), T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].subframe_rx), T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].frame_rx%1024), T_INT(ue->proc.proc_rxtx[(Ns>>1)&1].subframe_rx),
T_INT(0), T_BUFFER(&ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)&0x1].dl_ch_estimates_time[eNB_offset][0][0], 512 * 4)); T_INT(0), T_BUFFER(&ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates_time[eNB_offset][0][0], 512 * 4));
#endif #endif
return(0); return(0);
......
...@@ -44,8 +44,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue, ...@@ -44,8 +44,8 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
// unsigned int n; // unsigned int n;
// int i; // int i;
int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[0]; int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[0];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF;
ch_offset = (l*(ue->frame_parms.ofdm_symbol_size)); ch_offset = (l*(ue->frame_parms.ofdm_symbol_size));
symbol_offset = ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l; symbol_offset = ch_offset;//phy_vars_ue->lte_frame_parms.ofdm_symbol_size*l;
...@@ -734,31 +734,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue, ...@@ -734,31 +734,31 @@ int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *ue,
// do ifft of channel estimate // do ifft of channel estimate
for (aa=0; aa<ue->frame_parms.nb_antennas_rx*ue->frame_parms.nb_antennas_tx; aa++) { for (aa=0; aa<ue->frame_parms.nb_antennas_rx*ue->frame_parms.nb_antennas_tx; aa++) {
if (ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa]) { if (ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa]) {
switch (ue->frame_parms.N_RB_DL) { switch (ue->frame_parms.N_RB_DL) {
case 6: case 6:
idft128((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8], idft128((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 25: case 25:
idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8], idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 50: case 50:
idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8], idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 75: case 75:
idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8], idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
case 100: case 100:
idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_offset][aa][8], idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
default: default:
......
...@@ -210,13 +210,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -210,13 +210,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
if(ue->frame_parms.frame_type == FDD) if(ue->frame_parms.frame_type == FDD)
{ {
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(5*ue->frame_parms.ofdm_symbol_size)]; rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(5*ue->frame_parms.ofdm_symbol_size)];
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)];
} }
else else
{ {
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)&0x1].rxdataF[aarx][(13*ue->frame_parms.ofdm_symbol_size)]; rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)%RX_NB_TH].rxdataF[aarx][(13*ue->frame_parms.ofdm_symbol_size)];
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(2*ue->frame_parms.ofdm_symbol_size)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(2*ue->frame_parms.ofdm_symbol_size)];
} }
//-ve spectrum from SSS //-ve spectrum from SSS
...@@ -234,13 +234,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -234,13 +234,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
// printf("pss32 %d\n",ue->measurements.n0_power[aarx]); //-ve spectrum from PSS // printf("pss32 %d\n",ue->measurements.n0_power[aarx]); //-ve spectrum from PSS
if(ue->frame_parms.frame_type == FDD) if(ue->frame_parms.frame_type == FDD)
{ {
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)]; rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)];
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)];
} }
else else
{ {
rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)&0x1].rxdataF[aarx][(14*ue->frame_parms.ofdm_symbol_size)]; rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)%RX_NB_TH].rxdataF[aarx][(14*ue->frame_parms.ofdm_symbol_size)];
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(3*ue->frame_parms.ofdm_symbol_size)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(3*ue->frame_parms.ofdm_symbol_size)];
} }
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71])); // ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71]));
// printf("pssm36 %d\n",ue->measurements.n0_power[aarx]); // printf("pssm36 %d\n",ue->measurements.n0_power[aarx]);
...@@ -275,10 +275,10 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -275,10 +275,10 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
if (ue->frame_parms.Ncp==NORMAL) { if (ue->frame_parms.Ncp==NORMAL) {
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) { for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe&0x1)].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF;
rxF_pss = (int16_t *) &rxdataF[aarx][((pss_symb*(ue->frame_parms.ofdm_symbol_size)))]; rxF_pss = (int16_t *) &rxdataF[aarx][((pss_symb*(ue->frame_parms.ofdm_symbol_size)))];
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)&0x1].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)%RX_NB_TH].rxdataF;
rxF_sss = (int16_t *) &rxdataF[aarx][((sss_symb*(ue->frame_parms.ofdm_symbol_size)))]; rxF_sss = (int16_t *) &rxdataF[aarx][((sss_symb*(ue->frame_parms.ofdm_symbol_size)))];
//-ve spectrum from SSS //-ve spectrum from SSS
...@@ -303,7 +303,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -303,7 +303,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+66]*rxF_pss[2+66])+((int32_t)rxF_pss[2+65]*rxF_pss[2+65])); ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+66]*rxF_pss[2+66])+((int32_t)rxF_pss[2+65]*rxF_pss[2+65]));
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+64]*rxF_pss[2+64])+((int32_t)rxF_pss[2+63]*rxF_pss[2+63])); // ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[2+64]*rxF_pss[2+64])+((int32_t)rxF_pss[2+63]*rxF_pss[2+63]));
// printf("pss32 %d\n",ue->measurements.n0_power[aarx]); //-ve spectrum from PSS // printf("pss32 %d\n",ue->measurements.n0_power[aarx]); //-ve spectrum from PSS
rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)];
// ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71])); // ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-72]*rxF_pss[-72])+((int32_t)rxF_pss[-71]*rxF_pss[-71]));
// printf("pssm36 %d\n",ue->measurements.n0_power[aarx]); // printf("pssm36 %d\n",ue->measurements.n0_power[aarx]);
ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-70]*rxF_pss[-70])+((int32_t)rxF_pss[-69]*rxF_pss[-69])); ue->measurements.n0_power[aarx] += (((int32_t)rxF_pss[-70]*rxF_pss[-70])+((int32_t)rxF_pss[-69]*rxF_pss[-69]));
...@@ -349,7 +349,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -349,7 +349,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
#endif #endif
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) { for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
rxF = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].rxdataF[aarx][(l*ue->frame_parms.ofdm_symbol_size)]; rxF = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF[aarx][(l*ue->frame_parms.ofdm_symbol_size)];
off = (ue->frame_parms.first_carrier_offset+k)<<1; off = (ue->frame_parms.first_carrier_offset+k)<<1;
if (l==(4-ue->frame_parms.Ncp)) { if (l==(4-ue->frame_parms.Ncp)) {
...@@ -515,7 +515,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -515,7 +515,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) { for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
ue->measurements.rx_spatial_power[eNB_id][aatx][aarx] = ue->measurements.rx_spatial_power[eNB_id][aatx][aarx] =
(signal_energy_nodc(&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][(aatx<<1) + aarx][0], (signal_energy_nodc(&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][(aatx<<1) + aarx][0],
(N_RB_DL*12))); (N_RB_DL*12)));
//- ue->measurements.n0_power[aarx]; //- ue->measurements.n0_power[aarx];
...@@ -608,8 +608,8 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -608,8 +608,8 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
// cqi/pmi information // cqi/pmi information
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
dl_ch0 = &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][aarx][4]; dl_ch0 = &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4];
dl_ch1 = &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2+aarx][4]; dl_ch1 = &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][2+aarx][4];
for (subband=0; subband<nb_subbands; subband++) { for (subband=0; subband<nb_subbands; subband++) {
...@@ -664,13 +664,13 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -664,13 +664,13 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
__m128i pmi128_re,pmi128_im,mmtmpPMI0,mmtmpPMI1 /* ,mmtmpPMI2,mmtmpPMI3 */ ; __m128i pmi128_re,pmi128_im,mmtmpPMI0,mmtmpPMI1 /* ,mmtmpPMI2,mmtmpPMI3 */ ;
dl_ch0_128 = (__m128i *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][aarx][4]; dl_ch0_128 = (__m128i *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4];
dl_ch1_128 = (__m128i *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2+aarx][4]; dl_ch1_128 = (__m128i *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][2+aarx][4];
#elif defined(__arm__) #elif defined(__arm__)
int32x4_t pmi128_re,pmi128_im,mmtmpPMI0,mmtmpPMI1,mmtmpPMI0b,mmtmpPMI1b; int32x4_t pmi128_re,pmi128_im,mmtmpPMI0,mmtmpPMI1,mmtmpPMI0b,mmtmpPMI1b;
dl_ch0_128 = (int16x8_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][aarx][4]; dl_ch0_128 = (int16x8_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4];
dl_ch1_128 = (int16x8_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][2+aarx][4]; dl_ch1_128 = (int16x8_t *)&ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][2+aarx][4];
#endif #endif
for (subband=0; subband<nb_subbands; subband++) { for (subband=0; subband<nb_subbands; subband++) {
...@@ -764,7 +764,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -764,7 +764,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue,
else { else {
// cqi information only for mode 1 // cqi information only for mode 1
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
dl_ch0 = &ue->common_vars.common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id][aarx][4]; dl_ch0 = &ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4];
for (subband=0; subband<7; subband++) { for (subband=0; subband<7; subband++) {
......
...@@ -1693,7 +1693,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1693,7 +1693,7 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
LTE_UE_COMMON *common_vars = &ue->common_vars; LTE_UE_COMMON *common_vars = &ue->common_vars;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
LTE_UE_PDCCH **pdcch_vars = ue->pdcch_vars[subframe & 0x1]; LTE_UE_PDCCH **pdcch_vars = ue->pdcch_vars[subframe%RX_NB_TH];
uint8_t log2_maxh,aatx,aarx; uint8_t log2_maxh,aatx,aarx;
#ifdef MU_RECEIVER #ifdef MU_RECEIVER
...@@ -1707,16 +1707,16 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1707,16 +1707,16 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
for (s=0; s<n_pdcch_symbols; s++) { for (s=0; s<n_pdcch_symbols; s++) {
if (is_secondary_ue == 1) { if (is_secondary_ue == 1) {
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe&0x1].rxdataF, pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id+1], //add 1 to eNB_id to compensate for the shifted B/F'd pilots from the SeNB common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id+1], //add 1 to eNB_id to compensate for the shifted B/F'd pilots from the SeNB
pdcch_vars[eNB_id]->rxdataF_ext, pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s, s,
high_speed_flag, high_speed_flag,
frame_parms); frame_parms);
#ifdef MU_RECEIVER #ifdef MU_RECEIVER
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe&0x1].rxdataF, pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id_i - 1],//subtract 1 to eNB_id_i to compensate for the non-shifted pilots from the PeNB common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id_i - 1],//subtract 1 to eNB_id_i to compensate for the non-shifted pilots from the PeNB
pdcch_vars[eNB_id_i]->rxdataF_ext,//shift by two to simulate transmission from a second antenna pdcch_vars[eNB_id_i]->rxdataF_ext,//shift by two to simulate transmission from a second antenna
pdcch_vars[eNB_id_i]->dl_ch_estimates_ext,//shift by two to simulate transmission from a second antenna pdcch_vars[eNB_id_i]->dl_ch_estimates_ext,//shift by two to simulate transmission from a second antenna
s, s,
...@@ -1724,16 +1724,16 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1724,16 +1724,16 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
frame_parms); frame_parms);
#endif //MU_RECEIVER #endif //MU_RECEIVER
} else if (frame_parms->nb_antenna_ports_eNB>1) { } else if (frame_parms->nb_antenna_ports_eNB>1) {
pdcch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[subframe&0x1].rxdataF, pdcch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id], common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext, pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s, s,
high_speed_flag, high_speed_flag,
frame_parms); frame_parms);
} else { } else {
pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe&0x1].rxdataF, pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe&0x1].dl_ch_estimates[eNB_id], common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id],
pdcch_vars[eNB_id]->rxdataF_ext, pdcch_vars[eNB_id]->rxdataF_ext,
pdcch_vars[eNB_id]->dl_ch_estimates_ext, pdcch_vars[eNB_id]->dl_ch_estimates_ext,
s, s,
...@@ -2031,7 +2031,7 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci, ...@@ -2031,7 +2031,7 @@ uint8_t get_num_pdcch_symbols(uint8_t num_dci,
} }
LOG_I(PHY," dci.c: get_num_pdcch_symbols subframe %d FATAL, illegal numCCE %d (num_dci %d)\n",subframe,numCCE,num_dci); LOG_D(PHY," dci.c: get_num_pdcch_symbols subframe %d FATAL, illegal numCCE %d (num_dci %d)\n",subframe,numCCE,num_dci);
//for (i=0;i<num_dci;i++) { //for (i=0;i<num_dci;i++) {
// printf("dci_alloc[%d].L = %d\n",i,dci_alloc[i].L); // printf("dci_alloc[%d].L = %d\n",i,dci_alloc[i].L);
//} //}
...@@ -2514,7 +2514,7 @@ void dci_decoding(uint8_t DCI_LENGTH, ...@@ -2514,7 +2514,7 @@ void dci_decoding(uint8_t DCI_LENGTH,
} }
static uint8_t dci_decoded_output[2][(MAX_DCI_SIZE_BITS+64)/8]; static uint8_t dci_decoded_output[RX_NB_TH][(MAX_DCI_SIZE_BITS+64)/8];
uint16_t get_nCCE(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uint8_t mi) uint16_t get_nCCE(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uint8_t mi)
{ {
...@@ -2818,12 +2818,12 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, ...@@ -2818,12 +2818,12 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
dci_decoding(sizeof_bits, dci_decoding(sizeof_bits,
L, L,
&pdcch_vars[eNB_id]->e_rx[CCEind*72], &pdcch_vars[eNB_id]->e_rx[CCEind*72],
&dci_decoded_output[subframe&0x1][0]); &dci_decoded_output[subframe%RX_NB_TH][0]);
/* /*
for (i=0;i<3+(sizeof_bits>>3);i++) for (i=0;i<3+(sizeof_bits>>3);i++)
printf("dci_decoded_output[%d] => %x\n",i,dci_decoded_output[i]); printf("dci_decoded_output[%d] => %x\n",i,dci_decoded_output[i]);
*/ */
crc = (crc16(&dci_decoded_output[subframe&0x1][0],sizeof_bits)>>16) ^ extract_crc(&dci_decoded_output[subframe&0x1][0],sizeof_bits); crc = (crc16(&dci_decoded_output[subframe%RX_NB_TH][0],sizeof_bits)>>16) ^ extract_crc(&dci_decoded_output[subframe%RX_NB_TH][0],sizeof_bits);
#ifdef DEBUG_DCI_DECODING #ifdef DEBUG_DCI_DECODING
printf("crc =>%x\n",crc); printf("crc =>%x\n",crc);
#endif #endif
...@@ -2839,29 +2839,29 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, ...@@ -2839,29 +2839,29 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
//printf("DCI FOUND !!! crc =>%x, sizeof_bits %d, sizeof_bytes %d \n",crc, sizeof_bits, sizeof_bytes); //printf("DCI FOUND !!! crc =>%x, sizeof_bits %d, sizeof_bytes %d \n",crc, sizeof_bits, sizeof_bytes);
if (sizeof_bytes<=4) { if (sizeof_bytes<=4) {
dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[subframe&0x1][0]; dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[subframe%RX_NB_TH][0];
dci_alloc[*dci_cnt].dci_pdu[2] = dci_decoded_output[subframe&0x1][1]; dci_alloc[*dci_cnt].dci_pdu[2] = dci_decoded_output[subframe%RX_NB_TH][1];
dci_alloc[*dci_cnt].dci_pdu[1] = dci_decoded_output[subframe&0x1][2]; dci_alloc[*dci_cnt].dci_pdu[1] = dci_decoded_output[subframe%RX_NB_TH][2];
dci_alloc[*dci_cnt].dci_pdu[0] = dci_decoded_output[subframe&0x1][3]; dci_alloc[*dci_cnt].dci_pdu[0] = dci_decoded_output[subframe%RX_NB_TH][3];
#ifdef DEBUG_DCI_DECODING #ifdef DEBUG_DCI_DECODING
printf("DCI => %x,%x,%x,%x\n",dci_decoded_output[subframe&0x1][0], printf("DCI => %x,%x,%x,%x\n",dci_decoded_output[subframe%RX_NB_TH][0],
dci_decoded_output[subframe&0x1][1], dci_decoded_output[subframe%RX_NB_TH][1],
dci_decoded_output[subframe&0x1][2], dci_decoded_output[subframe%RX_NB_TH][2],
dci_decoded_output[subframe&0x1][3]); dci_decoded_output[subframe%RX_NB_TH][3]);
#endif #endif
} else { } else {
dci_alloc[*dci_cnt].dci_pdu[7] = dci_decoded_output[subframe&0x1][0]; dci_alloc[*dci_cnt].dci_pdu[7] = dci_decoded_output[subframe%RX_NB_TH][0];
dci_alloc[*dci_cnt].dci_pdu[6] = dci_decoded_output[subframe&0x1][1]; dci_alloc[*dci_cnt].dci_pdu[6] = dci_decoded_output[subframe%RX_NB_TH][1];
dci_alloc[*dci_cnt].dci_pdu[5] = dci_decoded_output[subframe&0x1][2]; dci_alloc[*dci_cnt].dci_pdu[5] = dci_decoded_output[subframe%RX_NB_TH][2];
dci_alloc[*dci_cnt].dci_pdu[4] = dci_decoded_output[subframe&0x1][3]; dci_alloc[*dci_cnt].dci_pdu[4] = dci_decoded_output[subframe%RX_NB_TH][3];
dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[subframe&0x1][4]; dci_alloc[*dci_cnt].dci_pdu[3] = dci_decoded_output[subframe%RX_NB_TH][4];
dci_alloc[*dci_cnt].dci_pdu[2] = dci_decoded_output[subframe&0x1][5]; dci_alloc[*dci_cnt].dci_pdu[2] = dci_decoded_output[subframe%RX_NB_TH][5];
dci_alloc[*dci_cnt].dci_pdu[1] = dci_decoded_output[subframe&0x1][6]; dci_alloc[*dci_cnt].dci_pdu[1] = dci_decoded_output[subframe%RX_NB_TH][6];
dci_alloc[*dci_cnt].dci_pdu[0] = dci_decoded_output[subframe&0x1][7]; dci_alloc[*dci_cnt].dci_pdu[0] = dci_decoded_output[subframe%RX_NB_TH][7];
#ifdef DEBUG_DCI_DECODING #ifdef DEBUG_DCI_DECODING
printf("DCI => %x,%x,%x,%x,%x,%x,%x,%x\n", printf("DCI => %x,%x,%x,%x,%x,%x,%x,%x\n",
dci_decoded_output[subframe&0x1][0],dci_decoded_output[subframe&0x1][1],dci_decoded_output[subframe&0x1][2],dci_decoded_output[subframe&0x1][3], dci_decoded_output[subframe%RX_NB_TH][0],dci_decoded_output[subframe%RX_NB_TH][1],dci_decoded_output[subframe%RX_NB_TH][2],dci_decoded_output[subframe%RX_NB_TH][3],
dci_decoded_output[subframe&0x1][4],dci_decoded_output[subframe&0x1][5],dci_decoded_output[subframe&0x1][6],dci_decoded_output[subframe&0x1][7]); dci_decoded_output[subframe%RX_NB_TH][4],dci_decoded_output[subframe%RX_NB_TH][5],dci_decoded_output[subframe%RX_NB_TH][6],dci_decoded_output[subframe%RX_NB_TH][7]);
#endif #endif
} }
...@@ -2878,7 +2878,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars, ...@@ -2878,7 +2878,7 @@ void dci_decoding_procedure0(LTE_UE_PDCCH **pdcch_vars,
*dci_cnt = *dci_cnt+1; *dci_cnt = *dci_cnt+1;
} else if (crc==pdcch_vars[eNB_id]->crnti) { } else if (crc==pdcch_vars[eNB_id]->crnti) {
if ((mode&UL_DCI)&&(format_c == format0)&&((dci_decoded_output[subframe&0x1][0]&0x80)==0)) {// check if pdu is format 0 or 1A if ((mode&UL_DCI)&&(format_c == format0)&&((dci_decoded_output[subframe%RX_NB_TH][0]&0x80)==0)) {// check if pdu is format 0 or 1A
if (*format0_found == 0) { if (*format0_found == 0) {
dci_alloc[*dci_cnt].format = format0; dci_alloc[*dci_cnt].format = format0;
*format0_found = 1; *format0_found = 1;
...@@ -2946,7 +2946,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue, ...@@ -2946,7 +2946,7 @@ uint16_t dci_decoding_procedure(PHY_VARS_UE *ue,
uint8_t dci_cnt=0,old_dci_cnt=0; uint8_t dci_cnt=0,old_dci_cnt=0;
uint32_t CCEmap0=0,CCEmap1=0,CCEmap2=0; uint32_t CCEmap0=0,CCEmap1=0,CCEmap2=0;
LTE_UE_PDCCH **pdcch_vars = ue->pdcch_vars[subframe & 0x1]; LTE_UE_PDCCH **pdcch_vars = ue->pdcch_vars[subframe%RX_NB_TH];
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
uint8_t mi = get_mi(&ue->frame_parms,subframe); uint8_t mi = get_mi(&ue->frame_parms,subframe);
uint16_t ra_rnti=99; uint16_t ra_rnti=99;
......
...@@ -4788,8 +4788,8 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format, ...@@ -4788,8 +4788,8 @@ int check_dci_format1_1a_coherency(DCI_format_t dci_format,
LOG_I(PHY,"[DCI-FORMAT-1-1A] rah %d\n", rah); LOG_I(PHY,"[DCI-FORMAT-1-1A] rah %d\n", rah);
LOG_I(PHY,"[DCI-FORMAT-1-1A] rballoc %x\n", rballoc); LOG_I(PHY,"[DCI-FORMAT-1-1A] rballoc %x\n", rballoc);
LOG_I(PHY,"[DCI-FORMAT-1-1A] mcs1 %d\n", mcs1); LOG_I(PHY,"[DCI-FORMAT-1-1A] mcs1 %d\n", mcs1);
LOG_I(PHY,"[DCI-FORMAT-1-1A] rv1 %d\n", rv1); //LOG_I(PHY,"[DCI-FORMAT-1-1A] rv1 %d\n", rv1);
LOG_I(PHY,"[DCI-FORMAT-1-1A] ndi1 %d\n", ndi1); //LOG_I(PHY,"[DCI-FORMAT-1-1A] ndi1 %d\n", ndi1);
LOG_I(PHY,"[DCI-FORMAT-1-1A] TPC %d\n", TPC); LOG_I(PHY,"[DCI-FORMAT-1-1A] TPC %d\n", TPC);
#endif #endif
...@@ -4933,7 +4933,7 @@ int check_dci_format1c_coherency(uint8_t N_RB_DL, ...@@ -4933,7 +4933,7 @@ int check_dci_format1c_coherency(uint8_t N_RB_DL,
// I- check dci content minimum coherency // I- check dci content minimum coherency
if((rnti!=si_rnti) || (rnti!=p_rnti) || (rnti!=ra_rnti)) if((rnti!=si_rnti) && (rnti!=p_rnti) && (rnti!=ra_rnti))
return(0); return(0);
switch (N_RB_DL) { switch (N_RB_DL) {
...@@ -6411,11 +6411,11 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6411,11 +6411,11 @@ int generate_ue_dlsch_params_from_dci(int frame,
if (dlsch[0] && (dlsch[0]->rnti != 0xffff)) { if (dlsch[0] && (dlsch[0]->rnti != 0xffff)) {
LOG_I(PHY,"dci_format:%d Abssubframe: %d.%d \n",dci_format,frame%1024,subframe); LOG_I(PHY,"dci_format:%d Abssubframe: %d.%d \n",dci_format,frame%1024,subframe);
LOG_D(PHY,"PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti); LOG_I(PHY,"PDSCH dlsch0 UE: rnti %x\n",dlsch[0]->rnti);
LOG_D(PHY,"PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb); LOG_D(PHY,"PDSCH dlsch0 UE: NBRB %d\n",dlsch0_harq->nb_rb);
LOG_D(PHY,"PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc_even[0]); LOG_D(PHY,"PDSCH dlsch0 UE: rballoc %x\n",dlsch0_harq->rb_alloc_even[0]);
LOG_D(PHY,"PDSCH dlsch0 UE: harq_pid %d\n",harq_pid); LOG_I(PHY,"PDSCH dlsch0 UE: harq_pid %d\n",dci_info_extarcted.harq_pid);
LOG_D(PHY,"PDSCH dlsch0 UE: g %d\n",dlsch[0]->g_pucch); LOG_I(PHY,"PDSCH dlsch0 UE: g %d\n",dlsch[0]->g_pucch);
LOG_D(PHY,"PDSCH dlsch0 UE: round %d\n",dlsch0_harq->round); LOG_D(PHY,"PDSCH dlsch0 UE: round %d\n",dlsch0_harq->round);
LOG_D(PHY,"PDSCH dlsch0 UE: DCINdi %d\n",dlsch0_harq->DCINdi); LOG_D(PHY,"PDSCH dlsch0 UE: DCINdi %d\n",dlsch0_harq->DCINdi);
LOG_D(PHY,"PDSCH dlsch0 UE: rvidx %d\n",dlsch0_harq->rvidx); LOG_D(PHY,"PDSCH dlsch0 UE: rvidx %d\n",dlsch0_harq->rvidx);
...@@ -7229,7 +7229,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -7229,7 +7229,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
uint8_t transmission_mode = ue->transmission_mode[eNB_id]; uint8_t transmission_mode = ue->transmission_mode[eNB_id];
ANFBmode_t AckNackFBMode; ANFBmode_t AckNackFBMode;
LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id]; LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id];
LTE_UE_DLSCH_t **dlsch = ue->dlsch[subframe&0x1][0]; LTE_UE_DLSCH_t **dlsch = ue->dlsch[subframe%RX_NB_TH][0];
PHY_MEASUREMENTS *meas = &ue->measurements; PHY_MEASUREMENTS *meas = &ue->measurements;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
// uint32_t current_dlsch_cqi = ue->current_dlsch_cqi[eNB_id]; // uint32_t current_dlsch_cqi = ue->current_dlsch_cqi[eNB_id];
...@@ -8036,7 +8036,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -8036,7 +8036,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu,
//int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4); //int dl_subframe = (subframe<4) ? (subframe+6) : (subframe-4);
int dl_subframe = subframe; int dl_subframe = subframe;
if (ue->dlsch[dl_subframe&0x1][eNB_id][0]->harq_ack[dl_subframe].send_harq_status>0) { // we have downlink transmission if (ue->dlsch[dl_subframe%RX_NB_TH][eNB_id][0]->harq_ack[dl_subframe].send_harq_status>0) { // we have downlink transmission
ulsch->harq_processes[harq_pid]->O_ACK = 1; ulsch->harq_processes[harq_pid]->O_ACK = 1;
} else { } else {
ulsch->harq_processes[harq_pid]->O_ACK = 0; ulsch->harq_processes[harq_pid]->O_ACK = 0;
...@@ -8795,7 +8795,7 @@ double sinr_eff_cqi_calc(PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe) ...@@ -8795,7 +8795,7 @@ double sinr_eff_cqi_calc(PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe)
uint8_t transmission_mode = ue->transmission_mode[eNB_id]; uint8_t transmission_mode = ue->transmission_mode[eNB_id];
PHY_MEASUREMENTS *meas = &ue->measurements; PHY_MEASUREMENTS *meas = &ue->measurements;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
int32_t **dl_channel_est = ue->common_vars.common_vars_rx_data_per_thread[subframe &0x1].dl_ch_estimates[eNB_id]; int32_t **dl_channel_est = ue->common_vars.common_vars_rx_data_per_thread[subframe %RX_NB_TH].dl_ch_estimates[eNB_id];
double *s_dB; double *s_dB;
s_dB = ue->sinr_CQI_dB; s_dB = ue->sinr_CQI_dB;
// LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id]; // LTE_UE_ULSCH_t *ulsch = ue->ulsch[eNB_id];
......
...@@ -272,7 +272,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue, ...@@ -272,7 +272,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
return(max_turbo_iterations); return(max_turbo_iterations);
}*/ }*/
/*harq_pid = dlsch->current_harq_pid[subframe&0x1]; /*harq_pid = dlsch->current_harq_pid[subframe%RX_NB_TH];
if (harq_pid >= 8) { if (harq_pid >= 8) {
printf("dlsch_decoding.c: Illega