Commit a738eead authored by tct-labo4's avatar tct-labo4

ue using new thread index instead of modulo

parent 767606f9
...@@ -60,8 +60,8 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -60,8 +60,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%RX_NB_TH].dl_ch_estimates_time[eNB_id][aa])[(i<<2)]; Re = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[(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)]; Im = ((int16_t*)ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_id][aa])[1+(i<<2)];
temp += (Re*Re/2) + (Im*Im/2); temp += (Re*Re/2) + (Im*Im/2);
} }
...@@ -78,7 +78,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -78,7 +78,7 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15; max_pos_fil = ((max_pos_fil * coef) + (max_pos * ncoef)) >> 15;
// do not filter to have proactive timing adjustment // do not filter to have proactive timing adjustment
//max_pos_fil = max_pos; max_pos_fil = max_pos;
if(subframe == 6) if(subframe == 6)
{ {
......
...@@ -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)%RX_NB_TH][eNB_id]; LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[Ns>>1]][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)%RX_NB_TH].rxdataF; rxdataF = phy_vars_ue->common_vars.common_vars_rx_data_per_thread[phy_vars_ue->current_thread_id[Ns>>1]].rxdataF;
dl_bf_ch_estimates = phy_vars_ue->pdsch_vars[(Ns>>1)%RX_NB_TH][eNB_id]->dl_bf_ch_estimates; dl_bf_ch_estimates = phy_vars_ue->pdsch_vars[phy_vars_ue->current_thread_id[Ns>>1]][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,10 +50,10 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -50,10 +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;
uint8_t previous_sfn = ((Ns>>1) - 1 )< 0 ? 9 : (Ns>>1) - 1; uint8_t previous_thread_id = ue->current_thread_id[Ns>>1]==0 ? (RX_NB_TH-1):(ue->current_thread_id[Ns>>1]-1);
int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].dl_ch_estimates[eNB_offset]; int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset];
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 **dl_ch_estimates_previous=ue->common_vars.common_vars_rx_data_per_thread[previous_thread_id].dl_ch_estimates[eNB_offset];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[(Ns>>1)%RX_NB_TH].rxdataF; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF;
if (ue->frame_parms.Ncp == 0) { // normal prefix if (ue->frame_parms.Ncp == 0) { // normal prefix
pilot1 = 4; pilot1 = 4;
...@@ -800,15 +800,15 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -800,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)%RX_NB_TH].dl_ch_estimates[eNB_offset][(p<<1)+aarx]) if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx])
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], idft((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset][(p<<1)+aarx][8],
(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); (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].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)%RX_NB_TH].dl_ch_estimates_time[eNB_offset][0][0], 512 * 4)); T_INT(0), T_BUFFER(&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].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%RX_NB_TH].dl_ch_estimates[0]; int **dl_ch_estimates=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[0];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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%RX_NB_TH].dl_ch_estimates[eNB_offset][aa]) { if (ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8], idft128((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8], idft512((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8], idft1024((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8], idft1536((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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%RX_NB_TH].dl_ch_estimates[eNB_offset][aa][8], idft2048((int16_t*) &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_offset][aa][8],
(int16_t*) ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates_time[eNB_offset][aa], (int16_t*) ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates_time[eNB_offset][aa],
1); 1);
break; break;
default: default:
......
...@@ -184,8 +184,9 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -184,8 +184,9 @@ void ue_rrc_measurements(PHY_VARS_UE *ue,
uint16_t Nid_cell = ue->frame_parms.Nid_cell; uint16_t Nid_cell = ue->frame_parms.Nid_cell;
uint8_t eNB_offset,nu,l,nushift,k; uint8_t eNB_offset,nu,l,nushift,k;
uint16_t off; uint16_t off;
uint8_t previous_thread_id = ue->current_thread_id[subframe]==0 ? (RX_NB_TH-1):(ue->current_thread_id[subframe]-1);
//uint8_t isPss; // indicate if this is a slot for extracting PSS //uint8_t isPss; // indicate if this is a slot for extracting PSS
//uint8_t isSss; // indicate if this is a slot for extracting SSS //uint8_t isSss; // indicate if this is a slot for extracting SSS
//int32_t pss_ext[4][72]; // contain the extracted 6*12 REs for mapping the PSS //int32_t pss_ext[4][72]; // contain the extracted 6*12 REs for mapping the PSS
//int32_t sss_ext[4][72]; // contain the extracted 6*12 REs for mapping the SSS //int32_t sss_ext[4][72]; // contain the extracted 6*12 REs for mapping the SSS
...@@ -210,13 +211,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -210,13 +211,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%RX_NB_TH].rxdataF[aarx][(5*ue->frame_parms.ofdm_symbol_size)]; rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(5*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)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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)%RX_NB_TH].rxdataF[aarx][(13*ue->frame_parms.ofdm_symbol_size)]; rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[previous_thread_id].rxdataF[aarx][(13*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)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF[aarx][(2*ue->frame_parms.ofdm_symbol_size)];
} }
//-ve spectrum from SSS //-ve spectrum from SSS
...@@ -234,13 +235,13 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -234,13 +235,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%RX_NB_TH].rxdataF[aarx][(6*ue->frame_parms.ofdm_symbol_size)]; rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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][(7*ue->frame_parms.ofdm_symbol_size)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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)%RX_NB_TH].rxdataF[aarx][(14*ue->frame_parms.ofdm_symbol_size)]; rxF_sss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[previous_thread_id].rxdataF[aarx][(14*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)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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 +276,10 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -275,10 +276,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%RX_NB_TH)].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(ue->current_thread_id[subframe])].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)%RX_NB_TH].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[previous_thread_id].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 +304,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -303,7 +304,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%RX_NB_TH].rxdataF[aarx][(7*ue->frame_parms.ofdm_symbol_size)]; rxF_pss = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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 +350,7 @@ void ue_rrc_measurements(PHY_VARS_UE *ue, ...@@ -349,7 +350,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%RX_NB_TH].rxdataF[aarx][(l*ue->frame_parms.ofdm_symbol_size)]; rxF = (int16_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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 +516,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -515,7 +516,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%RX_NB_TH].dl_ch_estimates[eNB_id][(aatx<<1) + aarx][0], (signal_energy_nodc(&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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 +609,8 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -608,8 +609,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%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4]; dl_ch0 = &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][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]; dl_ch1 = &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][2+aarx][4];
for (subband=0; subband<nb_subbands; subband++) { for (subband=0; subband<nb_subbands; subband++) {
...@@ -664,13 +665,13 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -664,13 +665,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%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4]; dl_ch0_128 = (__m128i *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][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]; dl_ch1_128 = (__m128i *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4]; dl_ch0_128 = (int16x8_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][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]; dl_ch1_128 = (int16x8_t *)&ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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 +765,7 @@ void lte_ue_measurements(PHY_VARS_UE *ue, ...@@ -764,7 +765,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%RX_NB_TH].dl_ch_estimates[eNB_id][aarx][4]; dl_ch0 = &ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][aarx][4];
for (subband=0; subband<7; subband++) { for (subband=0; subband<7; subband++) {
......
This diff is collapsed.
...@@ -7355,7 +7355,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -7355,7 +7355,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%RX_NB_TH][0]; LTE_UE_DLSCH_t **dlsch = ue->dlsch[ue->current_thread_id[subframe]][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];
...@@ -8162,7 +8162,7 @@ int generate_ue_ulsch_params_from_dci(void *dci_pdu, ...@@ -8162,7 +8162,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%RX_NB_TH][eNB_id][0]->harq_ack[dl_subframe].send_harq_status>0) { // we have downlink transmission if (ue->dlsch[ue->current_thread_id[subframe]][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;
...@@ -8921,7 +8921,7 @@ double sinr_eff_cqi_calc(PHY_VARS_UE *ue, uint8_t eNB_id, uint8_t subframe) ...@@ -8921,7 +8921,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 %RX_NB_TH].dl_ch_estimates[eNB_id]; int32_t **dl_channel_est = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].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%RX_NB_TH]; /*harq_pid = dlsch->current_harq_pid[phy_vars_ue->current_thread_id[subframe]];
if (harq_pid >= 8) { if (harq_pid >= 8) {
printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid); printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid);
return(max_turbo_iterations); return(max_turbo_iterations);
...@@ -962,9 +962,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -962,9 +962,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
case PDSCH: // TB0 case PDSCH: // TB0
dlsch_ue = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]; dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0];
harq_pid = dlsch_ue->current_harq_pid; harq_pid = dlsch_ue->current_harq_pid;
ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[subframe%RX_NB_TH][(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]); ue_id= (uint32_t)find_ue((int16_t)phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][(uint32_t)eNB_id]->crnti,PHY_vars_eNB_g[eNB_id2][CC_id]);
DevAssert( ue_id != (uint32_t)-1 ); DevAssert( ue_id != (uint32_t)-1 );
dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch[ue_id][0]; dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch[ue_id][0];
...@@ -1008,9 +1008,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -1008,9 +1008,9 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
case PDSCH1: { // TB1 case PDSCH1: { // TB1
dlsch_ue = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][1]; dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][1];
harq_pid = dlsch_ue->current_harq_pid; harq_pid = dlsch_ue->current_harq_pid;
int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[subframe%RX_NB_TH][eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] ); int8_t UE_id = find_ue( phy_vars_ue->pdcch_vars[phy_vars_ue->current_thread_id[subframe]][eNB_id]->crnti, PHY_vars_eNB_g[eNB_id2][CC_id] );
DevAssert( UE_id != -1 ); DevAssert( UE_id != -1 );
dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch[UE_id][1]; dlsch_eNB = PHY_vars_eNB_g[eNB_id2][CC_id]->dlsch[UE_id][1];
// reset HARQ // reset HARQ
...@@ -1062,7 +1062,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue, ...@@ -1062,7 +1062,7 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
break; break;
default: default:
dlsch_ue = phy_vars_ue->dlsch[subframe%RX_NB_TH][eNB_id][0]; dlsch_ue = phy_vars_ue->dlsch[phy_vars_ue->current_thread_id[subframe]][eNB_id][0];
LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id); LOG_E(PHY,"dlsch_decoding_emul: FATAL, unknown DLSCH_id %d\n",dlsch_id);
dlsch_ue->last_iteration_cnt = 1+dlsch_ue->max_turbo_iterations; dlsch_ue->last_iteration_cnt = 1+dlsch_ue->max_turbo_iterations;
return(1+dlsch_ue->max_turbo_iterations); return(1+dlsch_ue->max_turbo_iterations);
......
...@@ -1078,7 +1078,7 @@ void rx_phich(PHY_VARS_UE *ue, ...@@ -1078,7 +1078,7 @@ void rx_phich(PHY_VARS_UE *ue,
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%RX_NB_TH][eNB_id]; LTE_UE_PDCCH **pdcch_vars = &ue->pdcch_vars[ue->current_thread_id[subframe]][eNB_id];
// uint8_t HI; // uint8_t HI;
uint8_t harq_pid = phich_subframe_to_harq_pid(frame_parms,proc->frame_rx,subframe); uint8_t harq_pid = phich_subframe_to_harq_pid(frame_parms,proc->frame_rx,subframe);
......
...@@ -74,7 +74,7 @@ void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,in ...@@ -74,7 +74,7 @@ void dump_mch(PHY_VARS_UE *ue,uint8_t eNB_id,uint16_t coded_bits_per_codeword,in
write_output(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_magb0[0],12*N_RB_DL*nsymb_pmch,1,1); write_output(fname,vname,ue->pdsch_vars_MCH[eNB_id]->dl_ch_magb0[0],12*N_RB_DL*nsymb_pmch,1,1);
write_output("mch00_ch0.m","pmch00_ch0", write_output("mch00_ch0.m","pmch00_ch0",
&(ue->common_vars.common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id][0][0]), &(ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id][0][0]),
ue->frame_parms.ofdm_symbol_size*12,1,1); ue->frame_parms.ofdm_symbol_size*12,1,1);
write_output("rxsig_mch.m","rxs_mch", write_output("rxsig_mch.m","rxs_mch",
...@@ -969,8 +969,8 @@ int rx_pmch(PHY_VARS_UE *ue, ...@@ -969,8 +969,8 @@ int rx_pmch(PHY_VARS_UE *ue,
//printf("*********************mch: symbol %d\n",symbol); //printf("*********************mch: symbol %d\n",symbol);
mch_extract_rbs(common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].rxdataF, mch_extract_rbs(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
common_vars->common_vars_rx_data_per_thread[subframe%RX_NB_TH].dl_ch_estimates[eNB_id], common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
pdsch_vars[eNB_id]->rxdataF_ext, pdsch_vars[eNB_id]->rxdataF_ext,
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[eNB_id]->dl_ch_estimates_ext,
symbol, symbol,
......
...@@ -2530,7 +2530,7 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *eNB, ...@@ -2530,7 +2530,7 @@ int32_t rx_pucch_emul(PHY_VARS_eNB *eNB,
rnti = eNB->ulsch[UE_index]->rnti; rnti = eNB->ulsch[UE_index]->rnti;
for (UE_id=0; UE_id<NB_UE_INST; UE_id++) { for (UE_id=0; UE_id<NB_UE_INST; UE_id++) {
if (rnti == PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[subframe%RX_NB_TH][0]->crnti) if (rnti == PHY_vars_UE_g[UE_id][CC_id]->pdcch_vars[PHY_vars_UE_g[UE_id][CC_id]->current_thread_id[subframe]][0]->crnti)
break; break;
} }
......
...@@ -160,6 +160,7 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue, ...@@ -160,6 +160,7 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
int32_t *pss_rxF,*pss_rxF_ext; int32_t *pss_rxF,*pss_rxF_ext;
int32_t *sss_rxF,*sss_rxF_ext; int32_t *sss_rxF,*sss_rxF_ext;
LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; LTE_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
uint8_t next_thread_id = ue->current_thread_id[subframe]== (RX_NB_TH-1) ? 0:(ue->current_thread_id[subframe]+1);
int rx_offset = frame_parms->ofdm_symbol_size-3*12; int rx_offset = frame_parms->ofdm_symbol_size-3*12;
uint8_t pss_symb,sss_symb; uint8_t pss_symb,sss_symb;
...@@ -173,7 +174,7 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue, ...@@ -173,7 +174,7 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
pss_symb = 6-frame_parms->Ncp; pss_symb = 6-frame_parms->Ncp;
sss_symb = pss_symb-1; sss_symb = pss_symb-1;
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))]; pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))];
sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))]; sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))];
...@@ -183,18 +184,18 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue, ...@@ -183,18 +184,18 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
if(subframe==5 || subframe==0) if(subframe==5 || subframe==0)
{ {
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))]; sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))];
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[((subframe+1)%RX_NB_TH)].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF;
pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))]; pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))];
} }
else if(subframe==6 || subframe==1) else if(subframe==6 || subframe==1)
{ {
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))]; pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))];
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)%RX_NB_TH].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF;
sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))]; sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))];
} }
else else
...@@ -222,18 +223,18 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue, ...@@ -222,18 +223,18 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
{ {
if(subframe==5 || subframe==0) if(subframe==5 || subframe==0)
{ {
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
sss_rxF = &rxdataF[aarx][(1 + (sss_symb*(frame_parms->ofdm_symbol_size)))]; sss_rxF = &rxdataF[aarx][(1 + (sss_symb*(frame_parms->ofdm_symbol_size)))];
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[((subframe+1)%RX_NB_TH)].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF;
pss_rxF = &rxdataF[aarx][(1 + (pss_symb*(frame_parms->ofdm_symbol_size)))]; pss_rxF = &rxdataF[aarx][(1 + (pss_symb*(frame_parms->ofdm_symbol_size)))];
} }
else if(subframe==6 || subframe==1) else if(subframe==6 || subframe==1)
{ {
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe%RX_NB_TH)].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF;
pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))]; pss_rxF = &rxdataF[aarx][(rx_offset + (pss_symb*(frame_parms->ofdm_symbol_size)))];
rxdataF = ue->common_vars.common_vars_rx_data_per_thread[(subframe+1)%RX_NB_TH].rxdataF; rxdataF = ue->common_vars.common_vars_rx_data_per_thread[next_thread_id].rxdataF;
sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))]; sss_rxF = &rxdataF[aarx][(rx_offset + (sss_symb*(frame_parms->ofdm_symbol_size)))];
} }
else else
......
...@@ -262,7 +262,7 @@ uint32_t ulsch_encoding(uint8_t *a, ...@@ -262,7 +262,7 @@ uint32_t ulsch_encoding(uint8_t *a,
// fill CQI/PMI information // fill CQI/PMI information
if (ulsch->O>0) { if (ulsch->O>0) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING_FILL_CQI, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ULSCH_ENCODING_FILL_CQI, VCD_FUNCTION_IN);
rnti = ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->crnti; rnti = ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->crnti;
fill_CQI(ulsch,meas,0,harq_pid,ue->frame_parms.N_RB_DL,rnti, tmode,ue->sinr_eff); fill_CQI(ulsch,meas,0,harq_pid,ue->frame_parms.N_RB_DL,rnti, tmode,ue->sinr_eff);
LOG_D(PHY,"ULSCH Encoding rnti %x \n", rnti); LOG_D(PHY,"ULSCH Encoding rnti %x \n", rnti);
...@@ -971,7 +971,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer, ...@@ -971,7 +971,7 @@ int ulsch_encoding_emul(uint8_t *ulsch_buffer,
LTE_UE_DLSCH_t **dlsch = ue->dlsch[0][eNB_id]; LTE_UE_DLSCH_t **dlsch = ue->dlsch[0][eNB_id];
PHY_MEASUREMENTS *meas = &ue->measurements;