Commit f0982d31 authored by Florian Kaltenberger's avatar Florian Kaltenberger

small performance improvements for perfect channel estimation in dlsim

parent 60115531
...@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8) ...@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators") set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True) set(PHYSIM True)
set(RF_BOARD None) set(RF_BOARD None)
set(XFORMS False) set(XFORMS True)
set(DEBUG_PHY False) set(DEBUG_PHY False)
set(MU_RECIEVER False) set(MU_RECIEVER False)
......
...@@ -2791,8 +2791,16 @@ PMI_FEEDBACK: ...@@ -2791,8 +2791,16 @@ PMI_FEEDBACK:
random_channel(eNB2UE[2],0); random_channel(eNB2UE[2],0);
random_channel(eNB2UE[3],0); random_channel(eNB2UE[3],0);
} }
}
if (PHY_vars_UE->perfect_ce==1) {
// fill in perfect channel estimates
freq_channel(eNB2UE[round],PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1);
/*
write_output("channel.m","ch",eNB2UE[round]->ch[0],eNB2UE[round]->channel_length,1,8);
write_output("channelF.m","chF",eNB2UE[round]->chF[0],12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1,1,8);
*/
}
}
if(abstx) { if(abstx) {
if (trials==0 && round==0) { if (trials==0 && round==0) {
...@@ -2938,11 +2946,6 @@ PMI_FEEDBACK: ...@@ -2938,11 +2946,6 @@ PMI_FEEDBACK:
if (PHY_vars_UE->perfect_ce==1) { if (PHY_vars_UE->perfect_ce==1) {
if (awgn_flag==0) { if (awgn_flag==0) {
// fill in perfect channel estimates
freq_channel(eNB2UE[round],PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1);
//write_output("channel.m","ch",desc1->ch[0],desc1->channel_length,1,8);
//write_output("channelF.m","chF",desc1->chF[0],nb_samples,1,8);
for(k=0; k<NUMBER_OF_eNB_MAX; k++) { for(k=0; k<NUMBER_OF_eNB_MAX; k++) {
for(aa=0; aa<frame_parms->nb_antennas_tx; aa++) { for(aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
......
...@@ -64,7 +64,7 @@ int init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) ...@@ -64,7 +64,7 @@ int init_freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
delta_f = nb_rb*180000/(n_samples-1); delta_f = nb_rb*180000/(n_samples-1);
for (f=-(n_samples>>1); f<(n_samples>>1); f++) { for (f=-(n_samples>>1); f<=(n_samples>>1); f++) {
freq=delta_f*(double)f*1e-6;// due to the fact that delays is in mus freq=delta_f*(double)f*1e-6;// due to the fact that delays is in mus
cos_lut[f+(n_samples>>1)] = (double *)malloc((int)desc->nb_taps*sizeof(double)); cos_lut[f+(n_samples>>1)] = (double *)malloc((int)desc->nb_taps*sizeof(double));
...@@ -122,7 +122,7 @@ int freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples) ...@@ -122,7 +122,7 @@ int freq_channel(channel_desc_t *desc,uint16_t nb_rb,int16_t n_samples)
start_meas(&desc->interp_freq); start_meas(&desc->interp_freq);
for (f=-n_samples_max/2,f2=-n_samples/2; f<n_samples_max/2; f+=d,f2++) { for (f=-n_samples_max/2,f2=-n_samples/2; f<=n_samples_max/2; f+=d,f2++) {
clut = cos_lut[n_samples_max/2+f]; clut = cos_lut[n_samples_max/2+f];
slut = sin_lut[n_samples_max/2+f]; slut = sin_lut[n_samples_max/2+f];
......
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