Commit f835adc0 authored by Haruki NAOI's avatar Haruki NAOI

Fix: rfsim abnormal CCCH reception.

parent d0b7be40
...@@ -1073,28 +1073,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB, ...@@ -1073,28 +1073,6 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
l%(frame_parms->symbols_per_tti/2), l%(frame_parms->symbols_per_tti/2),
l/(frame_parms->symbols_per_tti/2), l/(frame_parms->symbols_per_tti/2),
frame_parms); frame_parms);
for(re=0;re<ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12;re++){
rxF_ext = (short*)&pusch_vars->rxdataF_ext[0][(l*frame_parms->N_RB_UL*12)+re];
ave_power+=rxF_ext[0]*rxF_ext[0]+rxF_ext[1]*rxF_ext[1];
}
}
ave_power/=(double)(ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12*(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active));
LOG_D(PHY,"rxF_ext ave %lf\n",sqrt(ave_power));
if(ave_power>1.0){
shift = 3 - (int)log2(sqrt((double)ave_power));
}
if(shift>0){
short * temp_iq;
for(i=0;i<frame_parms->symbols_per_tti*frame_parms->ofdm_symbol_size;i++){
temp_iq=(short*)&pusch_vars->rxdataF_ext[0][i];
temp_iq[0]<<=shift;
temp_iq[1]<<=shift;
}
}else{
shift=0;
}
for (l=0; l<(frame_parms->symbols_per_tti-ulsch[UE_id]->harq_processes[harq_pid]->srs_active); l++) {
if (lte_ul_channel_estimation(&eNB->frame_parms,proc, if (lte_ul_channel_estimation(&eNB->frame_parms,proc,
eNB->ulsch[UE_id], eNB->ulsch[UE_id],
...@@ -1133,15 +1111,10 @@ void rx_ulsch(PHY_VARS_eNB *eNB, ...@@ -1133,15 +1111,10 @@ void rx_ulsch(PHY_VARS_eNB *eNB,
symbol_offset = frame_parms->N_RB_UL*12*((3 - frame_parms->Ncp)+(7-frame_parms->Ncp)); symbol_offset = frame_parms->N_RB_UL*12*((3 - frame_parms->Ncp)+(7-frame_parms->Ncp));
pusch_vars->ulsch_interference_power[i] += interference_power(&pusch_vars->drs_ch_estimates[i][symbol_offset],ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12); pusch_vars->ulsch_interference_power[i] += interference_power(&pusch_vars->drs_ch_estimates[i][symbol_offset],ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12);
pusch_vars->ulsch_power[i] += signal_power(&pusch_vars->drs_ch_estimates[i][symbol_offset],ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12); pusch_vars->ulsch_power[i] += signal_power(&pusch_vars->drs_ch_estimates[i][symbol_offset],ulsch[UE_id]->harq_processes[harq_pid]->nb_rb*12);
//ave
pusch_vars->ulsch_interference_power[i] >>= 1;
pusch_vars->ulsch_power[i] >>= 1;
pusch_vars->ulsch_interference_power[i] = pusch_vars->ulsch_interference_power[i]/correction_factor; pusch_vars->ulsch_interference_power[i] = pusch_vars->ulsch_interference_power[i]/correction_factor;
pusch_vars->ulsch_power[i] = pusch_vars->ulsch_power[i]/correction_factor; pusch_vars->ulsch_power[i] = pusch_vars->ulsch_power[i]/correction_factor;
pusch_vars->ulsch_power[i] /= pow(4,shift);
pusch_vars->ulsch_interference_power[i] /= pow(4,shift);
if(pusch_vars->ulsch_power[i]>0x20000000){ if(pusch_vars->ulsch_power[i]>0x20000000){
pusch_vars->ulsch_power[i] = 0x20000000; pusch_vars->ulsch_power[i] = 0x20000000;
pusch_vars->ulsch_interference_power[i] = 1; pusch_vars->ulsch_interference_power[i] = 1;
......
...@@ -795,26 +795,6 @@ void fep_full(RU_t *ru, ...@@ -795,26 +795,6 @@ void fep_full(RU_t *ru,
if ((fp->frame_type == TDD) && if ((fp->frame_type == TDD) &&
(subframe_select(fp,subframe) != SF_UL)) return; (subframe_select(fp,subframe) != SF_UL)) return;
for(i=0;i<fp->samples_per_tti;i++){
idx=i+fp->samples_per_tti*subframe - ru->N_TA_offset;
if(idx<0) idx+=fp->samples_per_tti*10;
temp_iq=(short*)&ru->common.rxdata[0][idx];
recv_pow += (double)temp_iq[0]*(double)temp_iq[0]+(double)temp_iq[1]*(double)temp_iq[1];
}
recv_pow /= (double)fp->samples_per_tti;
if(recv_pow>1.0){
shift = 3 - (int)log2(sqrt((double)recv_pow));
}
if(shift>0){
LOG_D(PHY,"ave pow %lf shift %d\n",sqrt((double)recv_pow),shift);
for(i=0;i<fp->samples_per_tti;i++){
idx=i+fp->samples_per_tti*subframe - ru->N_TA_offset;
if(idx<0) idx+=fp->samples_per_tti*10;
temp_iq=(short*)&ru->common.rxdata[0][idx];
temp_iq[0]<<=shift;
temp_iq[1]<<=shift;
}
}
start_meas(&ru->ofdm_demod_stats); start_meas(&ru->ofdm_demod_stats);
if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX+ru->idx, 1 ); if (ru->idx == 0) VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX+ru->idx, 1 );
......
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