Commit 6ce8c374 authored by Francesco Mani's avatar Francesco Mani

minor fixes in pbchsim

parent bacd48a4
...@@ -74,7 +74,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -74,7 +74,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
k = nushift; k = nushift;
#ifdef DEBUG_CH #ifdef DEBUG_CH
printf("PBCH Channel Estimation : ThreadId %d, eNB_offset %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",ue->current_thread_id[Ns>>1], eNB_offset,ch_offset,ue->frame_parms.ofdm_symbol_size, printf("PBCH Channel Estimation : ThreadId %d, eNB_offset %d ch_offset %d, OFDM size %d, Ncp=%d, Ns=%d, k=%d symbol %d\n",ue->current_thread_id[Ns], eNB_offset,ch_offset,ue->frame_parms.ofdm_symbol_size,
ue->frame_parms.Ncp,Ns,k, symbol); ue->frame_parms.Ncp,Ns,k, symbol);
#endif #endif
......
...@@ -899,7 +899,7 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain ...@@ -899,7 +899,7 @@ int pss_search_time_nr(int **rxdata, ///rx data in time domain
if (fo_flag){ if (fo_flag){
// fractional frequency offser computation according to Cross-correlation Synchronization Algorithm Using PSS // fractional frequency offset computation according to Cross-correlation Synchronization Algorithm Using PSS
// Shoujun Huang, Yongtao Su, Ying He and Shan Tang, "Joint time and frequency offset estimation in LTE downlink," 7th International Conference on Communications and Networking in China, 2012. // Shoujun Huang, Yongtao Su, Ying He and Shan Tang, "Joint time and frequency offset estimation in LTE downlink," 7th International Conference on Communications and Networking in China, 2012.
int64_t result1,result2; int64_t result1,result2;
......
...@@ -412,6 +412,7 @@ int main(int argc, char **argv) ...@@ -412,6 +412,7 @@ int main(int argc, char **argv)
// computation of integer and fractional FO to compare with estimation results // computation of integer and fractional FO to compare with estimation results
int IFO; int IFO;
if(eps!=0.0){ if(eps!=0.0){
UE->UE_fo_compensation = 1;
printf("Introducing a CFO of %lf relative to SCS of %d kHz\n",eps,(int)(scs/1000)); printf("Introducing a CFO of %lf relative to SCS of %d kHz\n",eps,(int)(scs/1000));
if (eps>0) if (eps>0)
IFO=(int)(eps+0.5); IFO=(int)(eps+0.5);
...@@ -520,7 +521,7 @@ int main(int argc, char **argv) ...@@ -520,7 +521,7 @@ int main(int argc, char **argv)
} else { } else {
printf("Reading %d samples from file to antenna buffer %d\n",frame_length_complex_samples,0); printf("Reading %d samples from file to antenna buffer %d\n",frame_length_complex_samples,0);
UE->UE_fo_compensation = 1; // perform fo compensation when samples from file are used
if (fread(txdata[0], if (fread(txdata[0],
sizeof(int32_t), sizeof(int32_t),
frame_length_complex_samples, frame_length_complex_samples,
...@@ -594,9 +595,9 @@ int main(int argc, char **argv) ...@@ -594,9 +595,9 @@ int main(int argc, char **argv)
} }
if (n_trials==1) { if (n_trials==1) {
LOG_M("rxsig0.m","rxs0", UE->common_vars.rxdata[0],frame_parms->samples_per_subframe,1,1); LOG_M("rxsig0.m","rxs0", UE->common_vars.rxdata[0],frame_parms->samples_per_frame,1,1);
if (gNB->frame_parms.nb_antennas_tx>1) if (gNB->frame_parms.nb_antennas_tx>1)
LOG_M("rxsig1.m","rxs1", UE->common_vars.rxdata[1],frame_parms->samples_per_subframe,1,1); LOG_M("rxsig1.m","rxs1", UE->common_vars.rxdata[1],frame_parms->samples_per_frame,1,1);
} }
if (UE->is_synchronized == 0) { if (UE->is_synchronized == 0) {
......
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