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
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
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]->dl_ch_estimates_ext,//shift by two to simulate transmission from a second antenna
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
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
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
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]->dl_ch_estimates_ext,//shift by two to simulate transmission from a second antenna
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
/** \brief This function performs channel compensation (matched filtering) on the received RBs for this allocation. In addition, it computes the squared-magnitude of the channel with weightings for 16QAM/64QAM detection as well as dual-stream detection (cross-correlation)
@param rxdataF_ext Frequency-domain received signal in RBs to be demodulated
@param dl_ch_estimates_ext Frequency-domain channel estimates in RBs to be demodulated
// printf("trx_read <- USRP TS %lu (offset %d sf %d, f %d, first_rx %d)\n", proc->timestamp_rx,eNB->ts_offset,proc->subframe_rx,proc->frame_rx,proc->first_rx);
if(proc->first_rx==0){
if(proc->subframe_rx!=*subframe){
LOG_E(PHY,"rx_rf_freq: Received Timestamp in frequency (%"PRId64") doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->timestamp_rx,proc->subframe_rx,*subframe);
exit_fun("Exiting1");
}
intf2=(*frame+proc->frame_offset)&1023;
if(proc->frame_rx!=f2){
LOG_E(PHY,"rx_rf_freq: Received Timestamp in frequency (%"PRId64") doesn't correspond to the time we think it is (proc->frame_rx %d frame %d, frame_offset %d, f2 %d)\n",proc->timestamp_rx,proc->frame_rx,*frame,proc->frame_offset,f2);
phy_vars_ue[CC_id]->common_vars.common_vars_rx_data_per_thread[0].rxdataF[i]=thread0_rxdataF[i];// what about the "-N_TA_offset" ? // N_TA offset for TDD
phy_vars_ue[CC_id]->common_vars.common_vars_rx_data_per_thread[1].rxdataF[i]=thread1_rxdataF[i];// what about the "-N_TA_offset" ? // N_TA offset for TDD
1e3/eNB2UE[eNB_id][UE_id][CC_id]->sampling_rate,// sampling time (ns)
(double)PHY_vars_UE_g[UE_id][CC_id]->rx_total_gain_dB-66.227);// rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
#ifdef DEBUG_SIM
rx_pwr=signal_energy_fp(r_re0_f,r_im0_f,
nb_antennas_rx,
frame_parms->ofdm_symbol_size,//?
sf_offset)/(12.0*frame_parms->N_RB_DL);
LOG_D(OCM,"[SIM][DL] UE %d : ADC in (eNB %d) %f dBm/RE for subframe %d\n",
1e3/UE2eNB[0][eNB_id][CC_id]->sampling_rate,// sampling time (ns)
(double)PHY_vars_eNB_g[eNB_id][CC_id]->rx_total_gain_dB-66.227);// rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
1e3/UE2eNB[0][eNB_id][CC_id]->sampling_rate,// sampling time (ns)
(double)PHY_vars_eNB_g[eNB_id][CC_id]->rx_total_gain_dB-66.227);// rx_gain (dB) (66.227 = 20*log10(pow2(11)) = gain from the adc that will be applied later)
// to make channel reciprocal uncomment following line instead of previous. However this only works for SISO at the moment. For MIMO the channel would need to be transposed.