bugfix in pbch correlation
This commit is contained in:
@@ -36,6 +36,7 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
|
|||||||
uint8_t eNB_offset,
|
uint8_t eNB_offset,
|
||||||
unsigned char Ns,
|
unsigned char Ns,
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
|
int dmrss,
|
||||||
NR_UE_SSB *current_ssb)
|
NR_UE_SSB *current_ssb)
|
||||||
{
|
{
|
||||||
int pilot[200] __attribute__((aligned(16)));
|
int pilot[200] __attribute__((aligned(16)));
|
||||||
@@ -44,7 +45,7 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
|
|||||||
unsigned int pilot_cnt;
|
unsigned int pilot_cnt;
|
||||||
int16_t ch[2],*pil,*rxF;
|
int16_t ch[2],*pil,*rxF;
|
||||||
int symbol_offset;
|
int symbol_offset;
|
||||||
int dmrss;
|
|
||||||
|
|
||||||
uint8_t nushift;
|
uint8_t nushift;
|
||||||
uint8_t ssb_index=current_ssb->i_ssb;
|
uint8_t ssb_index=current_ssb->i_ssb;
|
||||||
@@ -56,13 +57,9 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
|
|||||||
unsigned int ssb_offset = ue->frame_parms.first_carrier_offset + ue->frame_parms.ssb_start_subcarrier;
|
unsigned int ssb_offset = ue->frame_parms.first_carrier_offset + ue->frame_parms.ssb_start_subcarrier;
|
||||||
if (ssb_offset>= ue->frame_parms.ofdm_symbol_size) ssb_offset-=ue->frame_parms.ofdm_symbol_size;
|
if (ssb_offset>= ue->frame_parms.ofdm_symbol_size) ssb_offset-=ue->frame_parms.ofdm_symbol_size;
|
||||||
|
|
||||||
if (ue->is_synchronized ==0 ) dmrss = symbol-1;
|
AssertFatal(dmrss >= 0 && dmrss < 3,
|
||||||
else dmrss = symbol-5;
|
"symbol %d is illegal for PBCH DM-RS \n",
|
||||||
|
dmrss);
|
||||||
AssertFatal((symbol > 0 && symbol < 4 && ue->is_synchronized == 0) ||
|
|
||||||
(symbol > 4 && symbol < 8 && ue->is_synchronized == 1),
|
|
||||||
"symbol %d is illegal for PBCH DM-RS (is_synchronized %d)\n",
|
|
||||||
symbol,ue->is_synchronized);
|
|
||||||
|
|
||||||
symbol_offset = ue->frame_parms.ofdm_symbol_size*symbol;
|
symbol_offset = ue->frame_parms.ofdm_symbol_size*symbol;
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
|
|||||||
uint8_t eNB_offset,
|
uint8_t eNB_offset,
|
||||||
unsigned char Ns,
|
unsigned char Ns,
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
|
int dmrss,
|
||||||
NR_UE_SSB *current_ssb);
|
NR_UE_SSB *current_ssb);
|
||||||
|
|
||||||
int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
|
|||||||
#endif
|
#endif
|
||||||
// computing correlation between received DMRS symbols and transmitted sequence for current i_ssb and n_hf
|
// computing correlation between received DMRS symbols and transmitted sequence for current i_ssb and n_hf
|
||||||
for(int i=pbch_initial_symbol; i<pbch_initial_symbol+3;i++)
|
for(int i=pbch_initial_symbol; i<pbch_initial_symbol+3;i++)
|
||||||
nr_pbch_dmrs_correlation(ue,0,0,i,current_ssb);
|
nr_pbch_dmrs_correlation(ue,0,0,i,i-pbch_initial_symbol,current_ssb);
|
||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
stop_meas(&ue->dlsch_channel_estimation_stats);
|
stop_meas(&ue->dlsch_channel_estimation_stats);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user