Commit 59e6d72e authored by hongzhi wang's avatar hongzhi wang

ue pbch update

parent 51ffa4f6
......@@ -151,8 +151,8 @@ int nr_pbch_dmrs_rx(unsigned int *nr_gold_pbch,
((int16_t*)output)[(m<<1)+1] = nr_mod_table[((1 + ((nr_gold_pbch[m>>5]&(1<<(m&0x1f)))>>(m&0x1f)))<<1) + 1];
#ifdef DEBUG_PBCH
//printf("nr_gold_pbch[m>>5] %x\n",nr_gold_pbch[m>>5]);
if (m<6)
printf("m %d output %d %d addr %p\n", m, output[2*m], output[2*m+1],&output[0]);
if (m<16)
printf("m %d output %d %d addr %p\n", m, ((int16_t*)output)[m<<1], ((int16_t*)output)[(m<<1)+1],&output[0]);
#endif
}
......
......@@ -46,15 +46,15 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
uint8_t nushift;
uint8_t nushift, Lmax, ssb_index=1, n_hf=0;
uint8_t previous_thread_id = ue->current_thread_id[Ns>>1]==0 ? (RX_NB_TH-1):(ue->current_thread_id[Ns>>1]-1);
int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF;
// recompute nushift with eNB_offset corresponding to adjacent eNB on which to perform channel estimation
nushift = Nid_cell%4;
Lmax = 8; //to be updated
nushift = (Lmax < 8)? ssb_index&3 : ssb_index&7;
ue->frame_parms.nushift = nushift;
if (ue->high_speed_flag == 0) // use second channel estimate position for temporary storage
ch_offset = ue->frame_parms.ofdm_symbol_size ;
else
......@@ -124,11 +124,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
break;
}
// generate pilot
nr_pbch_dmrs_rx(ue->nr_gold_pbch,
&pilot[p][0]);
nr_pbch_dmrs_rx(ue->nr_gold_pbch[n_hf][ssb_index], &pilot[p][0]);
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
......
......@@ -107,7 +107,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
ue->high_speed_flag,
frame_mod4);
pbch_decoded = 1;
pbch_decoded = 0; //to be updated
// break;
//}
......
......@@ -617,11 +617,11 @@ uint16_t nr_rx_pbch( PHY_VARS_NR_UE *ue,
for (i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS); i++)
decoded_output[(NR_POLAR_PBCH_PAYLOAD_BITS)-i-1] = pbch_a[i];
#ifdef DEBUG_PBCH
//#ifdef DEBUG_PBCH
for (i=0; i<(NR_POLAR_PBCH_PAYLOAD_BITS); i++)
printf("unscrambling pbch_a[%d] = %d \n", i,pbch_a[i]);
for (i=0; i<NR_POLAR_PBCH_PAYLOAD_BITS; i++)
printf("[PBCH] decoder_output[%d] = %x\n",i,decoded_output[i]);
#endif
//for (i=0; i<NR_POLAR_PBCH_PAYLOAD_BITS; i++)
// printf("[PBCH] decoder_output[%d] = %x\n",i,decoded_output[i]);
//#endif
}
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