Commit 96db5ea5 authored by tct-labo4's avatar tct-labo4

ue fix 3 threads and add define for slot parallelization function

parent f5be2be5
...@@ -118,9 +118,10 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -118,9 +118,10 @@ void lte_adjust_synch(LTE_DL_FRAME_PARMS *frame_parms,
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
LOG_D(PHY,"AbsSubframe %d.%d: diff =%i rx_offset (final) = %i : clear %d,max_pos = %d,max_pos_fil = %d (peak %d) max_val %d target_pos %d \n", LOG_D(PHY,"AbsSubframe %d.%d: ThreadId %d diff =%i rx_offset (final) = %i : clear %d,max_pos = %d,max_pos_fil = %d (peak %d) max_val %d target_pos %d \n",
ue->proc.proc_rxtx[subframe%RX_NB_TH].frame_rx, ue->proc.proc_rxtx[ue->current_thread_id[subframe]].frame_rx,
subframe, subframe,
ue->current_thread_id[subframe],
diff, diff,
ue->rx_offset, ue->rx_offset,
clear, clear,
......
...@@ -49,12 +49,13 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -49,12 +49,13 @@ 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,pilot0,pilot1,pilot2,pilot3;
uint8_t previous_thread_id = ue->current_thread_id[Ns>>1]==0 ? (RX_NB_TH-1):(ue->current_thread_id[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[ue->current_thread_id[Ns>>1]].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_thread_id].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[ue->current_thread_id[Ns>>1]].rxdataF; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF;
pilot0 = 0;
if (ue->frame_parms.Ncp == 0) { // normal prefix if (ue->frame_parms.Ncp == 0) { // normal prefix
pilot1 = 4; pilot1 = 4;
pilot2 = 7; pilot2 = 7;
...@@ -93,7 +94,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -93,7 +94,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
k = (nu + nushift)%6; k = (nu + nushift)%6;
#ifdef DEBUG_CH #ifdef DEBUG_CH
printf("Channel Estimation : eNB_offset %d cell_id %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d\n",eNB_offset,Nid_cell,ch_offset,ue->frame_parms.ofdm_symbol_size, printf("Channel Estimation : ThreadId %d, eNB_offset %d cell_id %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d\n",ue->current_thread_id[Ns>>1], eNB_offset,Nid_cell,ch_offset,ue->frame_parms.ofdm_symbol_size,
ue->frame_parms.Ncp,l,Ns,k); ue->frame_parms.Ncp,l,Ns,k);
#endif #endif
...@@ -797,17 +798,22 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, ...@@ -797,17 +798,22 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue,
break; break;
} }
if( ((Ns%2) == 0) && (l == pilot0))
{
// 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[ue->current_thread_id[Ns>>1]].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])
{
//LOG_I(PHY,"Channel Impulse Computation Slot %d ThreadId %d Symbol %d \n", Ns, ue->current_thread_id[Ns>>1], l);
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], 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[ue->current_thread_id[Ns>>1]].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[ue->current_thread_id[Ns>>1].frame_rx%1024), T_INT(ue->proc.proc_rxtx[ue->current_thread_id[Ns>>1].subframe_rx),
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)); 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
......
...@@ -1890,16 +1890,16 @@ int32_t rx_pdcch(PHY_VARS_UE *ue, ...@@ -1890,16 +1890,16 @@ int32_t rx_pdcch(PHY_VARS_UE *ue,
// process pdcch ofdm symbol 1 and 2 if necessary // process pdcch ofdm symbol 1 and 2 if necessary
for (int s=1; s<n_pdcch_symbols; s++){ for (int s=1; 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%RX_NB_TH].rxdataF, pdcch_extract_rbs_single(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+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[ue->current_thread_id[subframe]].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%RX_NB_TH].rxdataF, pdcch_extract_rbs_single(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_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[ue->current_thread_id[subframe]].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,
...@@ -1907,16 +1907,16 @@ pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX ...@@ -1907,16 +1907,16 @@ pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[subframe%RX
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%RX_NB_TH].rxdataF, pdcch_extract_rbs_dual(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],
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%RX_NB_TH].rxdataF, pdcch_extract_rbs_single(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],
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,
...@@ -3077,7 +3077,7 @@ uint16_t dci_CRNTI_decoding_procedure(PHY_VARS_UE *ue, ...@@ -3077,7 +3077,7 @@ uint16_t dci_CRNTI_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%RX_NB_TH]; LTE_UE_PDCCH **pdcch_vars = ue->pdcch_vars[ue->current_thread_id[subframe]];
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;
......
...@@ -270,7 +270,7 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -270,7 +270,7 @@ int rx_pdsch(PHY_VARS_UE *ue,
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#endif #endif
nb_rb = dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF, nb_rb = dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].rxdataF,
common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id], common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe]].dl_ch_estimates[eNB_id],
...@@ -380,18 +380,18 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -380,18 +380,18 @@ int rx_pdsch(PHY_VARS_UE *ue,
} }
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot%d Symbol %d Flag %d type %d: Pilot/Data extraction %5.2f \n",frame,subframe,slot, printf("[AbsSFN %d.%d] Slot%d Symbol %d Flag %d type %d: Pilot/Data extraction %5.2f \n",frame,subframe,slot,
symbol,ue->high_speed_flag,type,symbol,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); symbol,ue->high_speed_flag,type,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#else #else
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d Flag %d type %d: Pilot/Data extraction %5.2f \n",frame,subframe,slot,symbol, LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d Flag %d type %d: Pilot/Data extraction %5.2f \n",frame,subframe,slot,symbol,
ue->high_speed_flag,type,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); ue->high_speed_flag,type,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#endif #endif
aatx = frame_parms->nb_antenna_ports_eNB; aatx = frame_parms->nb_antenna_ports_eNB;
aarx = frame_parms->nb_antennas_rx; aarx = frame_parms->nb_antennas_rx;
...@@ -416,16 +416,16 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -416,16 +416,16 @@ int rx_pdsch(PHY_VARS_UE *ue,
} }
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#else #else
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d: Channel Scale %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#endif #endif
if (first_symbol_flag==1) { if (first_symbol_flag==1) {
if (beamforming_mode==0){ if (beamforming_mode==0){
...@@ -538,17 +538,17 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -538,17 +538,17 @@ int rx_pdsch(PHY_VARS_UE *ue,
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,subframe,slot,symbol,first_symbol_flag,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,subframe,slot,symbol,first_symbol_flag,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#else #else
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,subframe,slot,symbol,first_symbol_flag,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d first_symbol_flag %d: Channel Level %5.2f \n",frame,subframe,slot,symbol,first_symbol_flag,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#endif #endif
// Now channel compensation // Now channel compensation
if (dlsch0_harq->mimo_mode<LARGE_CDD) { if (dlsch0_harq->mimo_mode<LARGE_CDD) {
...@@ -745,16 +745,16 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -745,16 +745,16 @@ int rx_pdsch(PHY_VARS_UE *ue,
} }
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#else #else
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,subframe,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
// MRC // MRC
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#endif #endif
if (frame_parms->nb_antennas_rx > 1) { if (frame_parms->nb_antennas_rx > 1) {
...@@ -824,16 +824,16 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -824,16 +824,16 @@ int rx_pdsch(PHY_VARS_UE *ue,
} }
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#else #else
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d: Channel Combine %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); start_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#endif #endif
//printf("LLR dlsch0_harq->Qm %d rx_type %d cw0 %d cw1 %d symbol %d \n",dlsch0_harq->Qm,rx_type,codeword_TB0,codeword_TB1,symbol); //printf("LLR dlsch0_harq->Qm %d rx_type %d cw0 %d cw1 %d symbol %d \n",dlsch0_harq->Qm,rx_type,codeword_TB0,codeword_TB1,symbol);
// compute LLRs // compute LLRs
...@@ -1183,11 +1183,11 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -1183,11 +1183,11 @@ int rx_pdsch(PHY_VARS_UE *ue,
} }
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[subframe%RX_NB_TH][slot]); stop_meas(&ue->generic_stat_bis[ue->current_thread_id[subframe]][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#else #else
LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[subframe%RX_NB_TH][slot].p_time/(cpuf*1000.0)); LOG_I(PHY, "[AbsSFN %d.%d] Slot%d Symbol %d: LLR Computation %5.2f \n",frame,subframe,slot,symbol,ue->generic_stat_bis[ue->current_thread_id[subframe]][slot].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
// Please keep it: useful for debugging // Please keep it: useful for debugging
......
...@@ -259,6 +259,7 @@ int front_end_fft(PHY_VARS_UE *ue, ...@@ -259,6 +259,7 @@ int front_end_fft(PHY_VARS_UE *ue,
unsigned int slot_offset; unsigned int slot_offset;
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10; unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
unsigned int rx_offset; unsigned int rx_offset;
uint8_t threadId;
/*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id]; /*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id];
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid; unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
...@@ -321,8 +322,10 @@ int front_end_fft(PHY_VARS_UE *ue, ...@@ -321,8 +322,10 @@ int front_end_fft(PHY_VARS_UE *ue,
threadId = ue->current_thread_id[Ns>>1];
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) { for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
memset(&common_vars->common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],0,frame_parms->ofdm_symbol_size*sizeof(int)); // change thread index
memset(&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],0,frame_parms->ofdm_symbol_size*sizeof(int));
rx_offset = sample_offset + slot_offset + nb_prefix_samples0 + subframe_offset - SOFFSET; rx_offset = sample_offset + slot_offset + nb_prefix_samples0 + subframe_offset - SOFFSET;
// Align with 256 bit // Align with 256 bit
...@@ -340,12 +343,12 @@ int front_end_fft(PHY_VARS_UE *ue, ...@@ -340,12 +343,12 @@ int front_end_fft(PHY_VARS_UE *ue,
(void *)&common_vars->rxdata[aa][rx_offset % frame_length_samples], (void *)&common_vars->rxdata[aa][rx_offset % frame_length_samples],
frame_parms->ofdm_symbol_size*sizeof(int)); frame_parms->ofdm_symbol_size*sizeof(int));
dft((int16_t *)tmp_dft_in, dft((int16_t *)tmp_dft_in,
(int16_t *)&common_vars->common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1); (int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
} else { // use dft input from RX buffer directly } else { // use dft input from RX buffer directly
start_meas(&ue->rx_dft_stats); start_meas(&ue->rx_dft_stats);
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples], dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
(int16_t *)&common_vars->common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1); (int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
stop_meas(&ue->rx_dft_stats); stop_meas(&ue->rx_dft_stats);
} }
...@@ -355,7 +358,8 @@ int front_end_fft(PHY_VARS_UE *ue, ...@@ -355,7 +358,8 @@ int front_end_fft(PHY_VARS_UE *ue,
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
// if (ue->frame <100) // if (ue->frame <100)
LOG_I(PHY,"slot_fep: frame %d: slot %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d, frame_length_samples %d\n", ue->proc.proc_rxtx[(Ns>>1)&1].frame_rx,Ns, symbol, LOG_I(PHY,"slot_fep: frame %d: slot %d, threadId %d, symbol %d, nb_prefix_samples %d, nb_prefix_samples0 %d, slot_offset %d, subframe_offset %d, sample_offset %d,rx_offset %d, frame_length_samples %d\n",
ue->proc.proc_rxtx[threadId].frame_rx,Ns, threadId,symbol,
nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset,frame_length_samples); nb_prefix_samples,nb_prefix_samples0,slot_offset,subframe_offset,sample_offset,rx_offset,frame_length_samples);
#endif #endif
...@@ -371,11 +375,11 @@ int front_end_fft(PHY_VARS_UE *ue, ...@@ -371,11 +375,11 @@ int front_end_fft(PHY_VARS_UE *ue,
(void *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples], (void *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
frame_parms->ofdm_symbol_size*sizeof(int)); frame_parms->ofdm_symbol_size*sizeof(int));
dft((int16_t *)tmp_dft_in, dft((int16_t *)tmp_dft_in,
(int16_t *)&common_vars->common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1); (int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
} else { // use dft input from RX buffer directly } else { // use dft input from RX buffer directly
dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples], dft((int16_t *)&common_vars->rxdata[aa][(rx_offset) % frame_length_samples],
(int16_t *)&common_vars->common_vars_rx_data_per_thread[(Ns>>1)&0x1].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1); (int16_t *)&common_vars->common_vars_rx_data_per_thread[threadId].rxdataF[aa][frame_parms->ofdm_symbol_size*symbol],1);
} }
stop_meas(&ue->rx_dft_stats); stop_meas(&ue->rx_dft_stats);
...@@ -385,7 +389,7 @@ int front_end_fft(PHY_VARS_UE *ue, ...@@ -385,7 +389,7 @@ int front_end_fft(PHY_VARS_UE *ue,
#ifdef DEBUG_FEP #ifdef DEBUG_FEP
// if (ue->frame <100) // if (ue->frame <100)
printf("slot_fep: frame %d: symbol %d rx_offset %d\n", ue->proc.proc_rxtx[(Ns>>1)&1].frame_rx, symbol,rx_offset); printf("slot_fep: frame %d: symbol %d rx_offset %d\n", ue->proc.proc_rxtx[threadId].frame_rx, symbol,rx_offset);
#endif #endif
} }
return(0); return(0);
......
...@@ -3291,7 +3291,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ...@@ -3291,7 +3291,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
(void *)&dci_alloc_rx[i].dci_pdu, (void *)&dci_alloc_rx[i].dci_pdu,
SI_RNTI, SI_RNTI,
dci_alloc_rx[i].format, dci_alloc_rx[i].format,
ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id], ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id],
ue->pdsch_vars_SI[eNB_id], ue->pdsch_vars_SI[eNB_id],
&ue->dlsch_SI[eNB_id], &ue->dlsch_SI[eNB_id],
&ue->frame_parms, &ue->frame_parms,
...@@ -3324,7 +3324,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ...@@ -3324,7 +3324,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
(void *)&dci_alloc_rx[i].dci_pdu, (void *)&dci_alloc_rx[i].dci_pdu,
P_RNTI, P_RNTI,
dci_alloc_rx[i].format, dci_alloc_rx[i].format,
ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id], ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id],
ue->pdsch_vars_p[eNB_id], ue->pdsch_vars_p[eNB_id],
&ue->dlsch_SI[eNB_id], &ue->dlsch_SI[eNB_id],
&ue->frame_parms, &ue->frame_parms,
...@@ -3360,7 +3360,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint ...@@ -3360,7 +3360,7 @@ int ue_pdcch_procedures(uint8_t eNB_id,PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint
(DCI1A_5MHz_TDD_1_6_t *)&dci_alloc_rx[i].dci_pdu, (DCI1A_5MHz_TDD_1_6_t *)&dci_alloc_rx[i].dci_pdu,
ue->prach_resources[eNB_id]->ra_RNTI, ue->prach_resources[eNB_id]->ra_RNTI,
format1A, format1A,
ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id], ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id],
ue->pdsch_vars_ra[eNB_id], ue->pdsch_vars_ra[eNB_id],
&ue->dlsch_ra[eNB_id], &ue->dlsch_ra[eNB_id],
&ue->frame_parms, &ue->frame_parms,
...@@ -3721,7 +3721,7 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC ...@@ -3721,7 +3721,7 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC
uint8_t slot = 0; uint8_t slot = 0;
if(m >= ue->frame_parms.symbols_per_tti>>1) if(m >= ue->frame_parms.symbols_per_tti>>1)
slot = 1; slot = 1;
start_meas(&ue->dlsch_llr_stats[subframe_rx%RX_NB_TH][slot]); start_meas(&ue->dlsch_llr_stats[ue->current_thread_id[subframe_rx]][slot]);
#endif #endif
// process DLSCH received in first slot // process DLSCH received in first slot
rx_pdsch(ue, rx_pdsch(ue,
...@@ -3737,11 +3737,11 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC ...@@ -3737,11 +3737,11 @@ void ue_pdsch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc, int eNB_id, PDSC
i_mod, i_mod,
dlsch0->current_harq_pid); dlsch0->current_harq_pid);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->dlsch_llr_stats[subframe_rx%RX_NB_TH][slot]); stop_meas(&ue->dlsch_llr_stats[ue->current_thread_id[subframe_rx]][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats[subframe_rx%RX_NB_TH][slot].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats[ue->current_thread_id[subframe_rx]][slot].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats[subframe_rx%RX_NB_TH][slot].p_time/(cpuf*1000.0)); LOG_D(PHY, "[AbsSFN %d.%d] LLR Computation Symbol %d %5.2f \n",proc->frame_rx,subframe_rx,m,ue->dlsch_llr_stats[ue->current_thread_id[subframe_rx]][slot].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
...@@ -4234,6 +4234,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue, ...@@ -4234,6 +4234,7 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
* \param arg is a pointer to a \ref PHY_VARS_UE structure. * \param arg is a pointer to a \ref PHY_VARS_UE structure.
* \returns a pointer to an int. The storage is not on the heap and must not be freed. * \returns a pointer to an int. The storage is not on the heap and must not be freed.
*/ */
#ifdef UE_SLOT_PARALLELISATION
#define FIFO_PRIORITY 40 #define FIFO_PRIORITY 40
void *UE_thread_slot1_dl_processing(void *arg) { void *UE_thread_slot1_dl_processing(void *arg) {
...@@ -4297,7 +4298,7 @@ void *UE_thread_slot1_dl_processing(void *arg) { ...@@ -4297,7 +4298,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
slot1 = (subframe_rx<<1) + 1; slot1 = (subframe_rx<<1) + 1;
pilot0 = 0; pilot0 = 0;
printf("AbsSubframe %d.%d execute dl slot1 processing \n", frame_rx, subframe_rx); //printf("AbsSubframe %d.%d execute dl slot1 processing \n", frame_rx, subframe_rx);
if (ue->frame_parms.Ncp == 0) { // normal prefix if (ue->frame_parms.Ncp == 0) { // normal prefix
pilot1 = 4; pilot1 = 4;
...@@ -4307,7 +4308,7 @@ void *UE_thread_slot1_dl_processing(void *arg) { ...@@ -4307,7 +4308,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
/**** Slot1 FE Processing ****/ /**** Slot1 FE Processing ****/
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->ue_front_end_per_slot_stat[subframe_rx%RX_NB_TH][1]); start_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1]);
#endif #endif
// I- start dl slot1 processing // I- start dl slot1 processing
// do first symbol of next downlink subframe for channel estimation // do first symbol of next downlink subframe for channel estimation
...@@ -4372,7 +4373,7 @@ void *UE_thread_slot1_dl_processing(void *arg) { ...@@ -4372,7 +4373,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
usleep(1); usleep(1);
wait++; wait++;
} }
printf("[slot1 dl processing] ChanEst symbol %d slot %d wait%d\n",l,slot1,wait); //printf("[slot1 dl processing] ChanEst symbol %d slot %d wait%d\n",l,slot1,wait);
} }
//printf("AbsSubframe %d.%d ChanEst slot %d, symbol %d\n", frame_rx,subframe_rx,slot1,l); //printf("AbsSubframe %d.%d ChanEst slot %d, symbol %d\n", frame_rx,subframe_rx,slot1,l);
front_end_chanEst(ue, front_end_chanEst(ue,
...@@ -4393,18 +4394,18 @@ void *UE_thread_slot1_dl_processing(void *arg) { ...@@ -4393,18 +4394,18 @@ void *UE_thread_slot1_dl_processing(void *arg) {
} }
proc->chan_est_slot1_available = 1; proc->chan_est_slot1_available = 1;
printf("Set available slot 1channelEst to 1 AbsSubframe %d.%d \n",frame_rx,subframe_rx); //printf("Set available slot 1channelEst to 1 AbsSubframe %d.%d \n",frame_rx,subframe_rx);
printf(" [slot1 dl processing] ==> FFT/CHanEst Done for AbsSubframe %d.%d \n", proc->frame_rx, proc->subframe_rx); //printf(" [slot1 dl processing] ==> FFT/CHanEst Done for AbsSubframe %d.%d \n", proc->frame_rx, proc->subframe_rx);
//printf(" [slot1 dl processing] ==> Start LLR Comuptation slot1 for AbsSubframe %d.%d \n", proc->frame_rx, proc->subframe_rx); //printf(" [slot1 dl processing] ==> Start LLR Comuptation slot1 for AbsSubframe %d.%d \n", proc->frame_rx, proc->subframe_rx);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->ue_front_end_per_slot_stat[subframe_rx%RX_NB_TH][1]); stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[subframe_rx%RX_NB_TH][1].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[subframe_rx%RX_NB_TH][1].p_time/(cpuf*1000.0)); LOG_D(PHY, "[AbsSFN %d.%d] Slot1: FFT + Channel Estimate + Pdsch Proc Slot0 %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
...@@ -4416,23 +4417,23 @@ void *UE_thread_slot1_dl_processing(void *arg) { ...@@ -4416,23 +4417,23 @@ void *UE_thread_slot1_dl_processing(void *arg) {
usleep(1); usleep(1);
wait++; wait++;
} }
printf("[slot1 dl processing] AbsSubframe %d.%d LLR Computation Start wait DCI %d\n",frame_rx,subframe_rx,wait); //printf("[slot1 dl processing] AbsSubframe %d.%d LLR Computation Start wait DCI %d\n",frame_rx,subframe_rx,wait);
/**** Pdsch Procedure Slot1 ****/ /**** Pdsch Procedure Slot1 ****/
// start slot1 thread for Pdsch Procedure (slot1) // start slot1 thread for Pdsch Procedure (slot1)
// do procedures for C-RNTI // do procedures for C-RNTI
printf("AbsSubframe %d.%d Pdsch Procedure (slot1)\n",frame_rx,subframe_rx); //printf("AbsSubframe %d.%d Pdsch Procedure (slot1)\n",frame_rx,subframe_rx);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->pdsch_procedures_per_slot_stat[subframe_rx%RX_NB_TH][1]); start_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1]);
#endif #endif
// start slave thread for Pdsch Procedure (slot1) // start slave thread for Pdsch Procedure (slot1)
// do procedures for C-RNTI // do procedures for C-RNTI
uint8_t eNB_id = 0; uint8_t eNB_id = 0;
uint8_t abstraction_flag = 0; uint8_t abstraction_flag = 0;
if (ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0]->active == 1) { if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
//wait until first ofdm symbol is processed //wait until first ofdm symbol is processed
//wait = 0; //wait = 0;
//while(proc->first_symbol_available == 0) //while(proc->first_symbol_available == 0)
...@@ -4447,7 +4448,7 @@ void *UE_thread_slot1_dl_processing(void *arg) { ...@@ -4447,7 +4448,7 @@ void *UE_thread_slot1_dl_processing(void *arg) {
proc, proc,
eNB_id, eNB_id,
PDSCH, PDSCH,
ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0], ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0],
NULL, NULL,
(ue->frame_parms.symbols_per_tti>>1), (ue->frame_parms.symbols_per_tti>>1),
ue->frame_parms.symbols_per_tti-1, ue->frame_parms.symbols_per_tti-1,
...@@ -4495,14 +4496,14 @@ void *UE_thread_slot1_dl_processing(void *arg) { ...@@ -4495,14 +4496,14 @@ void *UE_thread_slot1_dl_processing(void *arg) {
} }
proc->llr_slot1_available=1; proc->llr_slot1_available=1;
printf("Set available LLR slot1 to 1 AbsSubframe %d.%d \n",frame_rx,subframe_rx); //printf("Set available LLR slot1 to 1 AbsSubframe %d.%d \n",frame_rx,subframe_rx);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->pdsch_procedures_per_slot_stat[subframe_rx%RX_NB_TH][1]); stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[subframe_rx%RX_NB_TH][1].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[subframe_rx%RX_NB_TH][1].p_time/(cpuf*1000.0)); LOG_D(PHY, "[AbsSFN %d.%d] Slot1: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][1].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
...@@ -4521,8 +4522,9 @@ void *UE_thread_slot1_dl_processing(void *arg) { ...@@ -4521,8 +4522,9 @@ void *UE_thread_slot1_dl_processing(void *arg) {
free(arg); free(arg);
return &UE_dl_slot1_processing_retval; return &UE_dl_slot1_processing_retval;
} }
#endif
#ifdef UE_SLOT_PARALLELISATION
int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode, uint8_t abstraction_flag,uint8_t do_pdcch_flag,runmode_t mode,
relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn) { relaying_type_t r_type,PHY_VARS_RN *phy_vars_rn) {
...@@ -4553,18 +4555,18 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4553,18 +4555,18 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->phy_proc_rx[subframe_rx%RX_NB_TH]); start_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
start_meas(&ue->ue_front_end_stat[subframe_rx%RX_NB_TH]); start_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
#endif #endif
pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0; pmch_flag = is_pmch_subframe(frame_rx,subframe_rx,&ue->frame_parms) ? 1 : 0;
if (do_pdcch_flag) { if (do_pdcch_flag) {
// deactivate reception until we scan pdcch // deactivate reception until we scan pdcch
if (ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0]) if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0])
ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0]->active = 0; ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active = 0;
if (ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][1]) if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][1])
ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][1]->active = 0; ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][1]->active = 0;
if (ue->dlsch_SI[eNB_id]) if (ue->dlsch_SI[eNB_id])
ue->dlsch_SI[eNB_id]->active = 0; ue->dlsch_SI[eNB_id]->active = 0;
...@@ -4630,7 +4632,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4630,7 +4632,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
proc->instance_cnt_slot1_dl_processing++; proc->instance_cnt_slot1_dl_processing++;
if (proc->instance_cnt_slot1_dl_processing == 0) if (proc->instance_cnt_slot1_dl_processing == 0)
{ {
LOG_I(PHY,"unblock slot1 dl processing thread blocked on instance_cnt_slot1_dl_processing : %d \n", proc->instance_cnt_slot1_dl_processing ); LOG_D(PHY,"unblock slot1 dl processing thread blocked on instance_cnt_slot1_dl_processing : %d \n", proc->instance_cnt_slot1_dl_processing );
if (pthread_cond_signal(&proc->cond_slot1_dl_processing) != 0) { if (pthread_cond_signal(&proc->cond_slot1_dl_processing) != 0) {
LOG_E( PHY, "[SCHED][UE %d][Slot0] ERROR pthread_cond_signal for UE slot1 processing thread\n", ue->Mod_id); LOG_E( PHY, "[SCHED][UE %d][Slot0] ERROR pthread_cond_signal for UE slot1 processing thread\n", ue->Mod_id);
exit_fun("nothing to add"); exit_fun("nothing to add");
...@@ -4653,7 +4655,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4653,7 +4655,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
/**** Slot0 FE Processing ****/ /**** Slot0 FE Processing ****/
// I- start main thread for FFT/ChanEst symbol: 0/1 --> 7 // I- start main thread for FFT/ChanEst symbol: 0/1 --> 7
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->ue_front_end_per_slot_stat[subframe_rx%RX_NB_TH][0]); start_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0]);
#endif #endif
// 1- perform FFT for pilot ofdm symbols first (ofdmSym7 ofdmSym4 or (ofdmSym6 ofdmSym3)) // 1- perform FFT for pilot ofdm symbols first (ofdmSym7 ofdmSym4 or (ofdmSym6 ofdmSym3))
//printf("AbsSubframe %d.%d FFT slot %d, symbol %d\n", frame_rx,subframe_rx,slot1,pilot0); //printf("AbsSubframe %d.%d FFT slot %d, symbol %d\n", frame_rx,subframe_rx,slot1,pilot0);
...@@ -4679,7 +4681,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4679,7 +4681,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
slot1, slot1,
0); 0);
proc->chan_est_pilot0_slot1_available = 1; proc->chan_est_pilot0_slot1_available = 1;
printf("Set available channelEst to 1 AbsSubframe %d.%d \n",frame_rx,subframe_rx); //printf("Set available channelEst to 1 AbsSubframe %d.%d \n",frame_rx,subframe_rx);
// 2- perform FFT for other ofdm symbols other than pilots // 2- perform FFT for other ofdm symbols other than pilots
for (l=first_ofdm_sym; l<=l2; l++) for (l=first_ofdm_sym; l<=l2; l++)
...@@ -4719,16 +4721,16 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4719,16 +4721,16 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
if (do_pdcch_flag) { if (do_pdcch_flag) {
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->pdcch_procedures_stat[subframe_rx%RX_NB_TH]); start_meas(&ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]]);
#endif #endif
if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) { if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) {
LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx); LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->pdcch_procedures_stat[subframe_rx%RX_NB_TH]); stop_meas(&ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); LOG_D(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
//proc->dci_slot0_available = 1; //proc->dci_slot0_available = 1;
...@@ -4736,24 +4738,24 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4736,24 +4738,24 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
} }
//proc->dci_slot0_available=1; //proc->dci_slot0_available=1;
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->pdcch_procedures_stat[subframe_rx%RX_NB_TH]); stop_meas(&ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); LOG_D(PHY, "[AbsSFN %d.%d] Slot0: PDCCH %5.2f \n",frame_rx,subframe_rx,ue->pdcch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
} }
printf("num_pdcch_symbols %d\n",ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->num_pdcch_symbols); //printf("num_pdcch_symbols %d\n",ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols);
// first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH) // first slot has been processed (FFTs + Channel Estimation, PCFICH/PHICH/PDCCH)
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->ue_front_end_per_slot_stat[subframe_rx%RX_NB_TH][0]); stop_meas(&ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[subframe_rx%RX_NB_TH][0].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[subframe_rx%RX_NB_TH][0].p_time/(cpuf*1000.0)); LOG_D(PHY, "[AbsSFN %d.%d] Slot0: FFT + Channel Estimate + PCFICH/PHICH/PDCCH %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
...@@ -4766,11 +4768,11 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4766,11 +4768,11 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
} }
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->ue_front_end_stat[subframe_rx%RX_NB_TH]); stop_meas(&ue->ue_front_end_stat[ue->current_thread_id[subframe_rx]]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[subframe_rx%RX_NB_TH][0].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[subframe_rx%RX_NB_TH][0].p_time/(cpuf*1000.0)); LOG_D(PHY, "[AbsSFN %d.%d] FULL FE Processing %5.2f \n",frame_rx,subframe_rx,ue->ue_front_end_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
/**** End Subframe FE Processing ****/ /**** End Subframe FE Processing ****/
...@@ -4785,25 +4787,25 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4785,25 +4787,25 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
/**** Pdsch Procedure Slot0 ****/ /**** Pdsch Procedure Slot0 ****/
// start main thread for Pdsch Procedure (slot0) // start main thread for Pdsch Procedure (slot0)
// do procedures for C-RNTI // do procedures for C-RNTI
printf("AbsSubframe %d.%d Pdsch Procedure (slot0)\n",frame_rx%1024,subframe_rx); //printf("AbsSubframe %d.%d Pdsch Procedure (slot0)\n",frame_rx%1024,subframe_rx);
printf("AbsSubframe %d.%d Pdsch Procedure PDSCH Active %d \n",frame_rx%1024,subframe_rx, ue->dlsch[subframe_rx%RX_NB_TH][0][0]->active); //printf("AbsSubframe %d.%d Pdsch Procedure PDSCH Active %d \n",frame_rx%1024,subframe_rx, ue->dlsch[ue->current_thread_id[subframe_rx]][0][0]->active);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->pdsch_procedures_stat[subframe_rx%RX_NB_TH]); start_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->pdsch_procedures_per_slot_stat[subframe_rx%RX_NB_TH][0]); start_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0]);
#endif #endif
if (ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0]->active == 1) { if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
ue_pdsch_procedures(ue, ue_pdsch_procedures(ue,
proc, proc,
eNB_id, eNB_id,
PDSCH, PDSCH,
ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0], ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0],
NULL, NULL,
ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->num_pdcch_symbols, ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
(ue->frame_parms.symbols_per_tti>>1)-1, (ue->frame_parms.symbols_per_tti>>1)-1,
abstraction_flag); abstraction_flag);
...@@ -4819,7 +4821,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4819,7 +4821,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
SI_PDSCH, SI_PDSCH,
ue->dlsch_SI[eNB_id], ue->dlsch_SI[eNB_id],
NULL, NULL,
ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->num_pdcch_symbols, ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
(ue->frame_parms.symbols_per_tti>>1)-1, (ue->frame_parms.symbols_per_tti>>1)-1,
abstraction_flag); abstraction_flag);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_SI, VCD_FUNCTION_OUT);
...@@ -4834,7 +4836,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4834,7 +4836,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
P_PDSCH, P_PDSCH,
ue->dlsch_p[eNB_id], ue->dlsch_p[eNB_id],
NULL, NULL,
ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->num_pdcch_symbols, ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
(ue->frame_parms.symbols_per_tti>>1)-1, (ue->frame_parms.symbols_per_tti>>1)-1,
abstraction_flag); abstraction_flag);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_P, VCD_FUNCTION_OUT);
...@@ -4849,7 +4851,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4849,7 +4851,7 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
RA_PDSCH, RA_PDSCH,
ue->dlsch_ra[eNB_id], ue->dlsch_ra[eNB_id],
NULL, NULL,
ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->num_pdcch_symbols, ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
(ue->frame_parms.symbols_per_tti>>1)-1, (ue->frame_parms.symbols_per_tti>>1)-1,
abstraction_flag); abstraction_flag);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_RA, VCD_FUNCTION_OUT);
...@@ -4858,15 +4860,15 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4858,15 +4860,15 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
#if 1 #if 1
// LLR linear // LLR linear
proc->dci_slot0_available=1; proc->dci_slot0_available=1;
printf("Set available dci slot0 to 1 AbsSubframe %d.%d \n",frame_rx%1024,subframe_rx); //printf("Set available dci slot0 to 1 AbsSubframe %d.%d \n",frame_rx%1024,subframe_rx);
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->pdsch_procedures_per_slot_stat[subframe_rx%RX_NB_TH][0]); stop_meas(&ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[subframe_rx%RX_NB_TH][0].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[subframe_rx%RX_NB_TH][0].p_time/(cpuf*1000.0)); LOG_D(PHY, "[AbsSFN %d.%d] Slot0: LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_per_slot_stat[ue->current_thread_id[subframe_rx]][0].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
...@@ -4882,34 +4884,34 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4882,34 +4884,34 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->pdsch_procedures_stat[subframe_rx%RX_NB_TH]); stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); LOG_D(PHY, "[AbsSFN %d.%d] Full LLR Computation %5.2f \n",frame_rx,subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
printf("[slot0 dl processing] AbsSubframe %d.%d Channel Decoder Start wait %d\n",frame_rx,subframe_rx,wait); //printf("[slot0 dl processing] AbsSubframe %d.%d Channel Decoder Start wait %d\n",frame_rx,subframe_rx,wait);
//=====================================================================// //=====================================================================//
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->dlsch_procedures_stat[subframe_rx%RX_NB_TH]); start_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
#endif #endif
LOG_I(PHY,"==> Start Turbo Decoder active dlsch %d SI %d RA %d \n",ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0]->active, LOG_D(PHY,"==> Start Turbo Decoder active dlsch %d SI %d RA %d \n",ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active,
ue->dlsch_SI[eNB_id]->active, ue->dlsch_SI[eNB_id]->active,
//ue->dlsch_p[eNB_id]->active, //ue->dlsch_p[eNB_id]->active,
ue->dlsch_ra[eNB_id]->active); ue->dlsch_ra[eNB_id]->active);
// Start Turbo decoder // Start Turbo decoder
if (ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0]->active == 1) { if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); //VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
ue_dlsch_procedures(ue, ue_dlsch_procedures(ue,
proc, proc,
eNB_id, eNB_id,
PDSCH, PDSCH,
ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0], ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0],
ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][1], ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][1],
&ue->dlsch_errors[eNB_id], &ue->dlsch_errors[eNB_id],
mode, mode,
abstraction_flag); abstraction_flag);
...@@ -4958,28 +4960,28 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -4958,28 +4960,28 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
} }
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->dlsch_procedures_stat[subframe_rx%RX_NB_TH]); stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); printf("[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); LOG_D(PHY, "[AbsSFN %d.%d] Channel Decoder: %5.2f \n",frame_rx,subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
// duplicate harq structure // duplicate harq structure
uint8_t current_harq_pid = ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0]->current_harq_pid; uint8_t current_harq_pid = ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->current_harq_pid;
LTE_DL_UE_HARQ_t *current_harq_processes = ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0]->harq_processes[current_harq_pid]; LTE_DL_UE_HARQ_t *current_harq_processes = ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_processes[current_harq_pid];
harq_status_t *current_harq_ack = &ue->dlsch[subframe_rx%RX_NB_TH][eNB_id][0]->harq_ack[subframe_rx]; harq_status_t *current_harq_ack = &ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->harq_ack[subframe_rx];
// For Debug parallelisation // For Debug parallelisation
if (current_harq_ack->ack == 0) { //if (current_harq_ack->ack == 0) {
printf("[slot0 dl processing][End of Channel Decoding] AbsSubframe %d.%d Decode Fail for HarqId%d Round%d\n",frame_rx,subframe_rx,current_harq_pid,current_harq_processes->round); //printf("[slot0 dl processing][End of Channel Decoding] AbsSubframe %d.%d Decode Fail for HarqId%d Round%d\n",frame_rx,subframe_rx,current_harq_pid,current_harq_processes->round);
} //}
for(uint8_t rx_th_idx=0; rx_th_idx<RX_NB_TH; rx_th_idx++) for(uint8_t rx_th_idx=1; rx_th_idx<RX_NB_TH; rx_th_idx++)
{ {
LTE_DL_UE_HARQ_t *harq_processes_dest = ue->dlsch[(subframe_rx+rx_th_idx)%RX_NB_TH][eNB_id][0]->harq_processes[current_harq_pid]; LTE_DL_UE_HARQ_t *harq_processes_dest = ue->dlsch[ue->current_thread_id[(subframe_rx+rx_th_idx)%10]][eNB_id][0]->harq_processes[current_harq_pid];
harq_status_t *harq_ack_dest = &ue->dlsch[(subframe_rx+rx_th_idx)%RX_NB_TH][eNB_id][0]->harq_ack[subframe_rx]; harq_status_t *harq_ack_dest = &ue->dlsch[ue->current_thread_id[(subframe_rx+rx_th_idx)%10]][eNB_id][0]->harq_ack[subframe_rx];
copy_harq_proc_struct(harq_processes_dest, current_harq_processes); copy_harq_proc_struct(harq_processes_dest, current_harq_processes);
copy_ack_struct(harq_ack_dest, current_harq_ack); copy_ack_struct(harq_ack_dest, current_harq_ack);
...@@ -5031,17 +5033,18 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr ...@@ -5031,17 +5033,18 @@ int phy_procedures_slot_parallelization_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *pr
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_OUT);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->phy_proc_rx[subframe_rx%RX_NB_TH]); stop_meas(&ue->phy_proc_rx[ue->current_thread_id[subframe_rx]]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); printf("------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); LOG_D(PHY, "------FULL RX PROC [AbsSFN %d.%d]: %5.2f ------\n",frame_rx,subframe_rx,ue->phy_proc_rx[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx); LOG_D(PHY," ****** end RX-Chain for AbsSubframe %d.%d ****** \n", frame_rx%1024, subframe_rx);
return (0); return (0);
} }
#endif
int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
...@@ -5155,15 +5158,15 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, ...@@ -5155,15 +5158,15 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
((pmch_flag==1)&(l==l2))) { ((pmch_flag==1)&(l==l2))) {
LOG_D(PHY,"[UE %d] Frame %d: Calling pdcch procedures (eNB %d)\n",ue->Mod_id,frame_rx,eNB_id); LOG_D(PHY,"[UE %d] Frame %d: Calling pdcch procedures (eNB %d)\n",ue->Mod_id,frame_rx,eNB_id);
//start_meas(&ue->rx_pdcch_stats[subframe_rx%RX_NB_TH]); //start_meas(&ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]]);
if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) { if (ue_pdcch_procedures(eNB_id,ue,proc,abstraction_flag) == -1) {
LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx); LOG_E(PHY,"[UE %d] Frame %d, subframe %d: Error in pdcch procedures\n",ue->Mod_id,frame_rx,subframe_rx);
return(-1); return(-1);
} }
//stop_meas(&ue->rx_pdcch_stats[subframe_rx%RX_NB_TH]); //stop_meas(&ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]]);
//printf("subframe %d n_pdcch_sym %d pdcch procedures %5.3f \n", //printf("subframe %d n_pdcch_sym %d pdcch procedures %5.3f \n",
// subframe_rx, ue->pdcch_vars[subframe_rx%RX_NB_TH][eNB_id]->num_pdcch_symbols, // subframe_rx, ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols,
// (ue->rx_pdcch_stats[subframe_rx%RX_NB_TH].p_time)/(cpuf*1000.0)); // (ue->rx_pdcch_stats[ue->current_thread_id[subframe_rx]].p_time)/(cpuf*1000.0));
LOG_D(PHY,"num_pdcch_symbols %d\n",ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols); LOG_D(PHY,"num_pdcch_symbols %d\n",ue->pdcch_vars[ue->current_thread_id[subframe_rx]][eNB_id]->num_pdcch_symbols);
} }
} }
...@@ -5325,7 +5328,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, ...@@ -5325,7 +5328,7 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) { if (ue->dlsch[ue->current_thread_id[subframe_rx]][eNB_id][0]->active == 1) {
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->pdsch_procedures_stat[subframe_rx%RX_NB_TH]); start_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]);
#endif #endif
ue_pdsch_procedures(ue, ue_pdsch_procedures(ue,
proc, proc,
...@@ -5339,8 +5342,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, ...@@ -5339,8 +5342,8 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); LOG_D(PHY," ------ end PDSCH ChannelComp/LLR slot 0: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
LOG_D(PHY," ------ --> PDSCH Turbo Decoder slot 0/1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx); LOG_D(PHY," ------ --> PDSCH Turbo Decoder slot 0/1: AbsSubframe %d.%d ------ \n", frame_rx%1024, subframe_rx);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->pdsch_procedures_stat[subframe_rx%RX_NB_TH]); stop_meas(&ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
start_meas(&ue->dlsch_procedures_stat[subframe_rx%RX_NB_TH]); start_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
#endif #endif
ue_dlsch_procedures(ue, ue_dlsch_procedures(ue,
proc, proc,
...@@ -5352,13 +5355,13 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id, ...@@ -5352,13 +5355,13 @@ int phy_procedures_UE_RX(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,
mode, mode,
abstraction_flag); abstraction_flag);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->dlsch_procedures_stat[subframe_rx%RX_NB_TH]); stop_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); printf("[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); printf("[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#else #else
LOG_D(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); LOG_D(PHY, "[SFN %d] Slot1: Pdsch Proc %5.2f\n",subframe_rx,ue->pdsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
LOG_D(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[subframe_rx%RX_NB_TH].p_time/(cpuf*1000.0)); LOG_D(PHY, "[SFN %d] Slot0 Slot1: Dlsch Proc %5.2f\n",subframe_rx,ue->dlsch_procedures_stat[ue->current_thread_id[subframe_rx]].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
...@@ -5583,7 +5586,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u ...@@ -5583,7 +5586,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,1); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,1);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
start_meas(&ue->phy_proc[subframe_rx%RX_NB_TH]); start_meas(&ue->phy_proc[ue->current_thread_id[subframe_rx]]);
#endif #endif
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
...@@ -5678,7 +5681,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u ...@@ -5678,7 +5681,7 @@ void phy_procedures_UE_lte(PHY_VARS_UE *ue,UE_rxtx_proc_t *proc,uint8_t eNB_id,u
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,0); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_LTE,0);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->phy_proc[subframe_rx%RX_NB_TH]); stop_meas(&ue->phy_proc[ue->current_thread_id[subframe_rx]]);
#endif #endif
} // slot } // slot
} }
......
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