Made FD interpolation by default

PRB based averaging can activated from command line options
This commit is contained in:
Sakthivel Velumani
2021-08-14 09:05:49 +05:30
parent 3ab21d8fd1
commit 255a5acbfa
10 changed files with 22 additions and 22 deletions
@@ -187,7 +187,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
#endif
//if ((gNB->frame_parms.N_RB_UL&1)==0) {
if (pusch_pdu->dmrs_config_type == pusch_dmrs_type1 && gNB->fd_interpolation == 1){
if (pusch_pdu->dmrs_config_type == pusch_dmrs_type1 && gNB->prb_interpolation == 0){
LOG_D(PHY,"PUSCH estimation DMRS type 1, Freq-domain interpolation");
// Treat first 2 pilots specially (left edge)
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
@@ -432,7 +432,7 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB,
}
#endif
}
else if (pusch_pdu->dmrs_config_type == pusch_dmrs_type2 && gNB->fd_interpolation == 1) { //pusch_dmrs_type2 |p_r,p_l,d,d,d,d,p_r,p_l,d,d,d,d|
else if (pusch_pdu->dmrs_config_type == pusch_dmrs_type2 && gNB->prb_interpolation == 0) { //pusch_dmrs_type2 |p_r,p_l,d,d,d,d,p_r,p_l,d,d,d,d|
LOG_D(PHY,"PUSCH estimation DMRS type 2, Freq-domain interpolation");
// Treat first DMRS specially (left edge)
@@ -785,7 +785,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
printf("rxF addr %p p %d\n", rxF,p);
printf("dl_ch addr %p nushift %d\n",dl_ch,nushift);
#endif
if (config_type == NFAPI_NR_DMRS_TYPE1 && ue->fd_lin_interpolation == 1) {
if (config_type == NFAPI_NR_DMRS_TYPE1 && ue->prb_interpolation == 0) {
// Treat first 2 pilots specially (left edge)
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
@@ -962,7 +962,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
8);
}
}
} else if (config_type == NFAPI_NR_DMRS_TYPE2 && ue->fd_lin_interpolation == 1){ //pdsch_dmrs_type2 |dmrs_r,dmrs_l,0,0,0,0,dmrs_r,dmrs_l,0,0,0,0|
} else if (config_type == NFAPI_NR_DMRS_TYPE2 && ue->prb_interpolation == 0){ //pdsch_dmrs_type2 |dmrs_r,dmrs_l,0,0,0,0,dmrs_r,dmrs_l,0,0,0,0|
// Treat first 4 pilots specially (left edge)
ch_l[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
+1 -1
View File
@@ -840,7 +840,7 @@ typedef struct PHY_VARS_gNB_s {
int **dl_precoder_SgNB[3];
char log2_maxp; /// holds the maximum channel/precoder coefficient
int fd_interpolation;
int prb_interpolation;
/// if ==0 enables phy only test mode
int mac_enabled;
+3 -3
View File
@@ -861,9 +861,9 @@ typedef struct {
uint32_t perfect_ce;
// flag to activate linear interpolation in frequency-domain channel estimation
// when off (default), this just averages channel on per-PRB basis
int fd_lin_interpolation;
// flag to activate PRB based averaging of channel estimates
// when off, defaults to frequency domain interpolation
int prb_interpolation;
int16_t ch_est_alpha;
int generate_ul_signal[NUMBER_OF_CONNECTED_gNB_MAX];
+3 -3
View File
@@ -477,7 +477,7 @@ int main(int argc, char **argv)
break;
case 'i':
fd_inter=1;
prb_inter=1;
break;
case 'n':
@@ -638,7 +638,7 @@ int main(int argc, char **argv)
printf("-g [A,B,C,D,E,F,G,R] Use 3GPP SCM (A,B,C,D) or 36-101 (E-EPA,F-EVA,G-ETU) models or R for MIMO model (ignores delay spread and Ricean factor)\n");
printf("-y Number of TX antennas used in gNB\n");
printf("-z Number of RX antennas used in UE\n");
printf("-i Activate freq domain interpolation for channel estimation. Average over 1 PRB by default.\n");
printf("-i Activate PRB based averaging for channel estimation. Frequncy domain interpolation by default.\n");
//printf("-j Relative strength of second intefering gNB (in dB) - cell_id mod 3 = 2\n");
printf("-R N_RB_DL\n");
printf("-O oversampling factor (1,2,4,8,16)\n");
@@ -905,7 +905,7 @@ int main(int argc, char **argv)
UE->if_inst->phy_config_request = nr_ue_phy_config_request;
UE->if_inst->dl_indication = nr_ue_dl_indication;
UE->if_inst->ul_indication = dummy_nr_ue_ul_indication;
UE->fd_lin_interpolation = fd_inter;
UE->prb_interpolation = prb_inter;
UE_mac->if_module = nr_ue_if_module_init(0);
+3 -3
View File
@@ -425,7 +425,7 @@ int main(int argc, char **argv)
break;
case 'i':
fd_inter=1;
prb_inter=1;
break;
case 'k':
@@ -587,7 +587,7 @@ int main(int argc, char **argv)
printf("-f Number of frames to simulate\n");
printf("-g [A,B,C,D,E,F,G] Use 3GPP SCM (A,B,C,D) or 36-101 (E-EPA,F-EVA,G-ETU) models (ignores delay spread and Ricean factor)\n");
printf("-h This message\n");
printf("-i Activate freq domain interpolation for channel estimation. Average over 1 PRB by default.\n");
printf("-i Activate PRB based averaging for channel estimation. Frequncy domain interpolation by default.\n");
//printf("-j Relative strength of second intefering eNB (in dB) - cell_id mod 3 = 2\n");
printf("-s Starting SNR, runs from SNR0 to SNR0 + 10 dB if ending SNR isn't given\n");
printf("-m MCS value\n");
@@ -675,7 +675,7 @@ int main(int argc, char **argv)
gNB->UL_INFO.crc_ind.crc_list = (nfapi_nr_crc_t *)malloc(NB_UE_INST*sizeof(nfapi_nr_crc_t));
gNB->UL_INFO.rx_ind.number_of_pdus = 0;
gNB->UL_INFO.crc_ind.number_crcs = 0;
gNB->fd_interpolation = fd_inter;
gNB->prb_interpolation = prb_inter;
frame_parms = &gNB->frame_parms; //to be initialized I suppose (maybe not necessary for PBCH)