Fix some merge miss.
This commit is contained in:
@@ -2071,6 +2071,8 @@ void fill_ulsch(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_ulsch_pdu *ulsch_pdu
|
|||||||
ulsch->harq_processes[harq_pid]->round++;
|
ulsch->harq_processes[harq_pid]->round++;
|
||||||
ulsch->harq_processes[harq_pid]->TBS = ulsch_pdu->ulsch_pdu_rel8.size<<3;
|
ulsch->harq_processes[harq_pid]->TBS = ulsch_pdu->ulsch_pdu_rel8.size<<3;
|
||||||
ulsch->harq_processes[harq_pid]->Msc_initial = 12*ulsch_pdu->ulsch_pdu_rel8.number_of_resource_blocks;
|
ulsch->harq_processes[harq_pid]->Msc_initial = 12*ulsch_pdu->ulsch_pdu_rel8.number_of_resource_blocks;
|
||||||
|
ulsch->harq_processes[harq_pid]->Or1 = 0;
|
||||||
|
ulsch->harq_processes[harq_pid]->Or2 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ulsch->rnti = ulsch_pdu->ulsch_pdu_rel8.rnti;
|
ulsch->rnti = ulsch_pdu->ulsch_pdu_rel8.rnti;
|
||||||
|
|||||||
@@ -716,6 +716,7 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
|
|||||||
uint8_t NSF_PHICH = 4;
|
uint8_t NSF_PHICH = 4;
|
||||||
uint8_t pusch_subframe=-1;
|
uint8_t pusch_subframe=-1;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
uint8_t harq_pid = 0;
|
||||||
int subframe = proc->subframe_tx;
|
int subframe = proc->subframe_tx;
|
||||||
phich_config_t *phich;
|
phich_config_t *phich;
|
||||||
|
|
||||||
@@ -748,16 +749,20 @@ void generate_phich_top(PHY_VARS_eNB *eNB,
|
|||||||
|
|
||||||
nseq_PHICH = ((phich->first_rb/Ngroup_PHICH) +
|
nseq_PHICH = ((phich->first_rb/Ngroup_PHICH) +
|
||||||
phich->n_DMRS)%(2*NSF_PHICH);
|
phich->n_DMRS)%(2*NSF_PHICH);
|
||||||
|
harq_pid = subframe2harq_pid(frame_parms,phich_frame2_pusch_frame(frame_parms,proc->frame_tx,subframe),pusch_subframe);
|
||||||
|
if (harq_pid == 255) {
|
||||||
|
LOG_E(PHY,"FATAL ERROR: illegal harq_pid, returning\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
LOG_D(PHY,"[eNB %d][PUSCH %d] Frame %d subframe %d Generating PHICH, AMP %d ngroup_PHICH %d/%d, nseq_PHICH %d : HI %d, first_rb %d)\n",
|
LOG_D(PHY,"[eNB %d][PUSCH %d] Frame %d subframe %d Generating PHICH, AMP %d ngroup_PHICH %d/%d, nseq_PHICH %d : HI %d, first_rb %d)\n",
|
||||||
eNB->Mod_id,subframe2harq_pid(frame_parms,
|
eNB->Mod_id,harq_pid,proc->frame_tx,
|
||||||
phich_frame2_pusch_frame(frame_parms,proc->frame_tx,subframe),pusch_subframe),proc->frame_tx,
|
|
||||||
subframe,amp,ngroup_PHICH,Ngroup_PHICH,nseq_PHICH,
|
subframe,amp,ngroup_PHICH,Ngroup_PHICH,nseq_PHICH,
|
||||||
phich->hi,
|
phich->hi,
|
||||||
phich->first_rb);
|
phich->first_rb);
|
||||||
|
|
||||||
T(T_ENB_PHY_PHICH, T_INT(eNB->Mod_id), T_INT(proc->frame_tx), T_INT(subframe),
|
T(T_ENB_PHY_PHICH, T_INT(eNB->Mod_id), T_INT(proc->frame_tx), T_INT(subframe),
|
||||||
T_INT(-1 /* TODO: rnti */),
|
T_INT(-1 /* TODO: rnti */),
|
||||||
T_INT(subframe2harq_pid(frame_parms,phich_frame2_pusch_frame(frame_parms,proc->frame_tx,subframe),pusch_subframe)),
|
T_INT(harq_pid),
|
||||||
T_INT(Ngroup_PHICH), T_INT(NSF_PHICH),
|
T_INT(Ngroup_PHICH), T_INT(NSF_PHICH),
|
||||||
T_INT(ngroup_PHICH), T_INT(nseq_PHICH),
|
T_INT(ngroup_PHICH), T_INT(nseq_PHICH),
|
||||||
T_INT(phich->hi),
|
T_INT(phich->hi),
|
||||||
|
|||||||
@@ -102,6 +102,34 @@ unsigned char subframe2_ul_harq(LTE_DL_FRAME_PARMS *frame_parms,unsigned char su
|
|||||||
return(subframe&7);
|
return(subframe&7);
|
||||||
|
|
||||||
switch (frame_parms->tdd_config) {
|
switch (frame_parms->tdd_config) {
|
||||||
|
case 1:
|
||||||
|
if (subframe == 6) {
|
||||||
|
return(0);
|
||||||
|
} else if (subframe==9){
|
||||||
|
return(1);
|
||||||
|
} else if (subframe==1){
|
||||||
|
return(2);
|
||||||
|
} else if (subframe==4){
|
||||||
|
return(3);
|
||||||
|
} else {
|
||||||
|
LOG_E(PHY,"phich.c: subframe2_ul_harq, illegal subframe %d for tdd_config %d\n",
|
||||||
|
subframe,frame_parms->tdd_config);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (subframe == 3) {
|
||||||
|
return(1);
|
||||||
|
} else if (subframe==8){
|
||||||
|
return(0);
|
||||||
|
} else {
|
||||||
|
LOG_E(PHY,"phich.c: subframe2_ul_harq, illegal subframe %d for tdd_config %d\n",
|
||||||
|
subframe,frame_parms->tdd_config);
|
||||||
|
return(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if ( (subframe == 8) || (subframe == 9) ) {
|
if ( (subframe == 8) || (subframe == 9) ) {
|
||||||
return(subframe-8);
|
return(subframe-8);
|
||||||
|
|||||||
@@ -741,7 +741,7 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
|
|||||||
uint8_t m,l;
|
uint8_t m,l;
|
||||||
uint8_t n_cs,alpha_ind;
|
uint8_t n_cs,alpha_ind;
|
||||||
int16_t tmp_re,tmp_im,W_re=0,W_im=0;
|
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 n0_IQ[2];
|
int32_t n0_IQ[2];
|
||||||
double interference_power;
|
double interference_power;
|
||||||
int16_t *rxptr;
|
int16_t *rxptr;
|
||||||
@@ -846,7 +846,7 @@ uint32_t calc_pucch_1x_interference(PHY_VARS_eNB *eNB,
|
|||||||
} // antenna
|
} // antenna
|
||||||
}
|
}
|
||||||
interference_power /= calc_cnt;
|
interference_power /= calc_cnt;
|
||||||
eNB->measurements.n0_pucch_dB = dB_fixed_x10((int)(interference_power/calc_cnt))/10;
|
eNB->measurements.n0_pucch_dB = dB_fixed_x10((int)interference_power)/10;
|
||||||
LOG_D(PHY,"estimate pucch noise %lf %d %d\n",interference_power,calc_cnt,eNB->measurements.n0_pucch_dB);
|
LOG_D(PHY,"estimate pucch noise %lf %d %d\n",interference_power,calc_cnt,eNB->measurements.n0_pucch_dB);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1188,7 +1188,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
stat += (stat_re*stat_re);
|
stat += ((stat_re*stat_re) + (stat_im*stat_im));
|
||||||
} //re
|
} //re
|
||||||
} // aa
|
} // aa
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user