Commit 131ac75b authored by masayuki.harada's avatar masayuki.harada Committed by Haruki NAOI

Fix pucch sim and calculation of pucch interference power.

(cherry picked from commit f28d8e1ad8e79508f8c8f777dc0979a5bc82f7ea)
parent fc7b2180
......@@ -620,7 +620,7 @@ function main() {
echo_info "Compiling unitary tests simulators"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
#simlist="dlsim_tm4 dlsim ulsim pucchsim prachsim pdcchsim pbchsim mbmssim"
simlist="dlsim ulsim"
simlist="dlsim ulsim pucchsim"
for f in $simlist ; do
compilations \
lte-simulators $f \
......
......@@ -723,12 +723,11 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
int16_t *zptr;
int16_t rxcomp[NB_ANTENNAS_RX][2*12*14];
uint8_t ns,N_UL_symb,nsymb;
uint8_t c = (frame_parms->Ncp==0) ? 3 : 2;
uint16_t i,j,re_offset;
uint8_t m,l;
uint8_t n_cs,alpha_ind;
int16_t tmp_re,tmp_im,W_re=0,W_im=0;
int16_t W4_nouse[4]={1,1,-1,-1};
int16_t W4_nouse[4]={32767,32767,-32768,-32768};
int32_t interference_power;
int16_t *rxptr;
uint32_t symbol_offset;
......@@ -834,9 +833,9 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
} // symbol
} // antenna
}
calc_cnt/=12;
//printf("pucch noise %d %d %d\n",interference_power,calc_cnt,eNB->measurements.n0_subband_power_tot_dB[0]);
calc_cnt;
eNB->measurements.n0_pucch_dB = dB_fixed_x10(interference_power/calc_cnt)/10;
//printf("pucch noise %d %d %d\n",interference_power,calc_cnt,eNB->measurements.n0_pucch_dB);
return 0;
}
......
This diff is collapsed.
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